{
  "resourceType": "StructureDefinition",
  "url": "http://electronichealth.se/fhir/StructureDefinition/NLLNEFId",
  "version": "1.0.0",
  "name": "NLLNEFId",
  "status": "active",
  "date": "2022-01-14",
  "publisher": "Swedish eHealth Agency",
  "fhirVersion": "4.0.1",
  "mapping": [
    {
      "identity": "rim",
      "uri": "http://hl7.org/v3",
      "name": "RIM Mapping"
    }
  ],
  "kind": "complex-type",
  "abstract": false,
  "context": [
    {
      "type": "element",
      "expression": "Identifier"
    }
  ],
  "type": "Extension",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Extension",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Extension",
        "path": "Extension",
        "short": "Legacy id NEF and OR",
        "definition": "IDs used by the old e-prescription format NEF, Nationell E-receptförvaltning and OR, Receptdepå Human."
      },
      {
        "id": "Extension.extension",
        "path": "Extension.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        },
        "min": 1
      },
      {
        "id": "Extension.extension:PrescriptionSetId",
        "path": "Extension.extension",
        "sliceName": "PrescriptionSetId",
        "short": "PrescriptionSetId / Originalordinationsid",
        "definition": "NEF: PrescriptionSetId, OR: originalOrdinationsId is a legacy identifier used by NEF/PIRR and OR. Every prescription created by systems connected before Swedish National Medication List will have a PrescriptionSetId/originalOrdinationsId. However, it does not allways identify a unique prescription. To search for a unique prescriptions the RowId/radnummer and ProductRowId/produktradnummer may be needed as well.",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Extension.extension:PrescriptionSetId.url",
        "path": "Extension.extension.url",
        "fixedUri": "PrescriptionSetId"
      },
      {
        "id": "Extension.extension:PrescriptionSetId.value[x]",
        "path": "Extension.extension.value[x]",
        "type": [
          {
            "code": "string"
          }
        ]
      },
      {
        "id": "Extension.extension:RowId",
        "path": "Extension.extension",
        "sliceName": "RowId",
        "short": "NEF: PrescriptionItemId first part",
        "definition": "NEF: PrescriptionItemId the first part of ReceptradId that corresponds to sekvensnummer/radnummer.",
        "min": 0,
        "max": "1"
      },
      {
        "id": "Extension.extension:RowId.url",
        "path": "Extension.extension.url",
        "fixedUri": "RowId"
      },
      {
        "id": "Extension.extension:RowId.value[x]",
        "path": "Extension.extension.value[x]",
        "type": [
          {
            "code": "positiveInt"
          }
        ]
      },
      {
        "id": "Extension.extension:ProductRowId",
        "path": "Extension.extension",
        "sliceName": "ProductRowId",
        "short": "NEF: PrescriptionItemId second part",
        "definition": "NEF: PrescriptionItemId the second part of ReceptradId that corresponds to löpnummer/produktradnummer.",
        "min": 0,
        "max": "1"
      },
      {
        "id": "Extension.extension:ProductRowId.url",
        "path": "Extension.extension.url",
        "fixedUri": "ProductRowId"
      },
      {
        "id": "Extension.extension:ProductRowId.value[x]",
        "path": "Extension.extension.value[x]",
        "type": [
          {
            "code": "positiveInt"
          }
        ]
      },
      {
        "id": "Extension.url",
        "path": "Extension.url",
        "fixedUri": "http://electronichealth.se/fhir/StructureDefinition/NLLNEFId"
      },
      {
        "id": "Extension.value[x]",
        "path": "Extension.value[x]",
        "max": "0"
      }
    ]
  }
}