{
  "resourceType": "OperationDefinition",
  "id": "NamingSystem-preferred-id",
  "text": {
    "status": "generated",
    "div": "\u003cdiv xmlns\u003d\"http://www.w3.org/1999/xhtml\"\u003e\u003cp class\u003d\"res-header-id\"\u003e\u003cb\u003eGenerated Narrative: OperationDefinition NamingSystem-preferred-id\u003c/b\u003e\u003c/p\u003e\u003ca name\u003d\"NamingSystem-preferred-id\"\u003e \u003c/a\u003e\u003ca name\u003d\"hcNamingSystem-preferred-id\"\u003e \u003c/a\u003e\u003cp\u003eURL: [base]/NamingSystem/$preferred-id\u003c/p\u003e\u003ch3\u003eParameters\u003c/h3\u003e\u003ctable class\u003d\"grid\"\u003e\u003ctr\u003e\u003ctd\u003e\u003cb\u003eUse\u003c/b\u003e\u003c/td\u003e\u003ctd\u003e\u003cb\u003eName\u003c/b\u003e\u003c/td\u003e\u003ctd\u003e\u003cb\u003eScope\u003c/b\u003e\u003c/td\u003e\u003ctd\u003e\u003cb\u003eCardinality\u003c/b\u003e\u003c/td\u003e\u003ctd\u003e\u003cb\u003eType\u003c/b\u003e\u003c/td\u003e\u003ctd\u003e\u003cb\u003eBinding\u003c/b\u003e\u003c/td\u003e\u003ctd\u003e\u003cb\u003eDocumentation\u003c/b\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003eIN\u003c/td\u003e\u003ctd\u003eid\u003c/td\u003e\u003ctd/\u003e\u003ctd\u003e1..1\u003c/td\u003e\u003ctd\u003e\u003ca href\u003d\"datatypes.html#string\"\u003estring\u003c/a\u003e\u003c/td\u003e\u003ctd/\u003e\u003ctd\u003e\u003cdiv\u003e\u003cp\u003eThe server parses the provided identifier to see what type it is (e.g. a URI, an OID as a URI, a plain OID, or a v2 table 0396 code). If the server can\u0027t tell what type of identifier it is, it can try it as multiple types. It is an error if more than one system matches the provided identifier\u003c/p\u003e\n\u003c/div\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003eIN\u003c/td\u003e\u003ctd\u003etype\u003c/td\u003e\u003ctd/\u003e\u003ctd\u003e1..1\u003c/td\u003e\u003ctd\u003e\u003ca href\u003d\"datatypes.html#code\"\u003ecode\u003c/a\u003e\u003c/td\u003e\u003ctd\u003e\u003ca href\u003d\"valueset-namingsystem-identifier-type.html\"\u003eNaming System Identifier Type\u003c/a\u003e (Required)\u003c/td\u003e\u003ctd/\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003eIN\u003c/td\u003e\u003ctd\u003edate\u003c/td\u003e\u003ctd/\u003e\u003ctd\u003e0..1\u003c/td\u003e\u003ctd\u003e\u003ca href\u003d\"datatypes.html#dateTime\"\u003edateTime\u003c/a\u003e\u003c/td\u003e\u003ctd/\u003e\u003ctd\u003e\u003cdiv\u003e\u003cp\u003eIf specified, the operation will indicate what the preferred identifier was on the specified date.  If not specified, the operation will provide the preferred identifier as of \u0027now\u0027\u003c/p\u003e\n\u003c/div\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003eOUT\u003c/td\u003e\u003ctd\u003eresult\u003c/td\u003e\u003ctd/\u003e\u003ctd\u003e1..1\u003c/td\u003e\u003ctd\u003e\u003ca href\u003d\"datatypes.html#string\"\u003estring\u003c/a\u003e\u003c/td\u003e\u003ctd/\u003e\u003ctd\u003e\u003cdiv\u003e\u003cp\u003eOIDs are return as plain OIDs (not the URI form).\u003c/p\u003e\n\u003c/div\u003e\u003c/td\u003e\u003c/tr\u003e\u003c/table\u003e\u003cdiv\u003e\u003cp\u003eServers handle this request by finding the provided identifier in their known naming systems, and returning the requested identifier type (\u003ca href\u003d\"namingsystem-definitions.html#NamingSystem.uniqueId.type\"\u003eNamingSystem.uniqueId.type\u003c/a\u003e). If there is more than one identifier of the specified type (for the specified date), then the \u0027preferred\u0027 identifier will be returned.  If there is only one identifier, that identifier will be returned even if it is not preferred.  If there are multiple preferred identifiers or multiple identifiers with none marked as preferred, the system MAY return an error or may list all identifiers applicable for that date and period.\u003c/p\u003e\n\u003cp\u003eIf the server wishes, it can also look through all code systems and value sets it knows about when attempting to find the requested identifier.\u003c/p\u003e\n\u003c/div\u003e\u003c/div\u003e"
  },
  "extension": [
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm",
      "valueInteger": 1
    },
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
      "valueCode": "normative"
    },
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg",
      "valueCode": "vocab"
    }
  ],
  "url": "http://hl7.org/fhir/OperationDefinition/NamingSystem-preferred-id",
  "version": "6.0.0-ballot4",
  "name": "PreferredId",
  "title": "Fetch Preferred id",
  "status": "active",
  "kind": "operation",
  "experimental": false,
  "date": "2026-05-25T22:13:44+00:00",
  "publisher": "HL7 International / Terminology Infrastructure",
  "contact": [
    {
      "telecom": [
        {
          "system": "url",
          "value": "http://hl7.org/fhir"
        },
        {
          "system": "email",
          "value": "fhir@lists.hl7.org"
        }
      ]
    },
    {
      "telecom": [
        {
          "system": "url",
          "value": "http://www.hl7.org/Special/committees/Vocab"
        }
      ]
    }
  ],
  "description": "This operation returns the preferred identifiers for identifiers, and terminologies. The operation takes 2 parameters:     \n\n* a system identifier - either a URI, an OID, or a v2 table 0396 (other) code  \n* a code for what kind of identifier is desired (URI, OID, v2 table 0396 identifier)    \n\nand returns either the requested identifier, or an HTTP errors response with an OperationOutcome because either the provided identifier was not recognized, or the requested identiifer type is not known.    \n\nThe principle use of this operation is when converting between v2, CDA and FHIR Identifier/CX/II and CodeableConcepts/C(N/W)E/CD but the operation may also find use when converting metadata such as profiles.",
  "jurisdiction": [
    {
      "coding": [
        {
          "system": "http://unstats.un.org/unsd/methods/m49/m49.htm",
          "code": "001",
          "display": "World"
        }
      ]
    }
  ],
  "affectsState": false,
  "code": "preferred-id",
  "comment": "Servers handle this request by finding the provided identifier in their known naming systems, and returning the requested identifier type ([NamingSystem.uniqueId.type](namingsystem-definitions.html#NamingSystem.uniqueId.type)). If there is more than one identifier of the specified type (for the specified date), then the \u0027preferred\u0027 identifier will be returned.  If there is only one identifier, that identifier will be returned even if it is not preferred.  If there are multiple preferred identifiers or multiple identifiers with none marked as preferred, the system MAY return an error or may list all identifiers applicable for that date and period.  \n\nIf the server wishes, it can also look through all code systems and value sets it knows about when attempting to find the requested identifier.",
  "resource": [
    "NamingSystem"
  ],
  "system": false,
  "type": true,
  "instance": false,
  "parameter": [
    {
      "name": "id",
      "use": "in",
      "min": 1,
      "max": "1",
      "documentation": "The server parses the provided identifier to see what type it is (e.g. a URI, an OID as a URI, a plain OID, or a v2 table 0396 code). If the server can\u0027t tell what type of identifier it is, it can try it as multiple types. It is an error if more than one system matches the provided identifier",
      "type": "string"
    },
    {
      "name": "type",
      "use": "in",
      "min": 1,
      "max": "1",
      "type": "code",
      "binding": {
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
            "valueString": "NamingSystemIdentifierType"
          }
        ],
        "strength": "required",
        "valueSet": "http://hl7.org/fhir/ValueSet/namingsystem-identifier-type|6.0.0-ballot4"
      }
    },
    {
      "name": "date",
      "use": "in",
      "min": 0,
      "max": "1",
      "documentation": "If specified, the operation will indicate what the preferred identifier was on the specified date.  If not specified, the operation will provide the preferred identifier as of \u0027now\u0027",
      "type": "dateTime"
    },
    {
      "name": "result",
      "use": "out",
      "min": 1,
      "max": "1",
      "documentation": "OIDs are return as plain OIDs (not the URI form).",
      "type": "string"
    }
  ]
}