{
  "resourceType": "StructureDefinition",
  "url": "http://electronichealth.se/fhir/StructureDefinition/NLLMultiDoseDispMedList",
  "name": "NLLMultiDoseDispMedList",
  "status": "draft",
  "fhirVersion": "4.0.0",
  "mapping": [
    {
      "identity": "EHM",
      "uri": "http://ehalsomyndigheten.se",
      "name": "E-hälsomyndigheten concept"
    }
  ],
  "kind": "resource",
  "abstract": false,
  "type": "List",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/List",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "List",
        "path": "List",
        "short": "Represents a medication list with dose dispensed prescriptions for a patient",
        "definition": "List resource used to represent a medication list with dose dispensed prescriptions. Sv: underlag för en dospatients samlade förskrivningar",
        "mapping": [
          {
            "identity": "EHM",
            "map": "Dosunderlag"
          }
        ]
      },
      {
        "id": "List.extension",
        "path": "List.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "List.extension:contentStatus",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
            "valueCode": "normative"
          },
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version",
            "valueCode": "4.0.0"
          }
        ],
        "path": "List.extension",
        "sliceName": "contentStatus",
        "short": "GODKANT | EJ_GODKANT | AVREGISTRERAT",
        "definition": "Status of the dose dispense medication list (sv: dosunderlag).",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://electronichealth.se/fhir/StructureDefinition/Status"
            ]
          }
        ],
        "binding": {
          "strength": "required",
          "valueSet": "http://electronichealth.se/fhir/ValueSet/content-status-1"
        },
        "mapping": [
          {
            "identity": "EHM",
            "map": "Dosunderlagsstatus"
          }
        ]
      },
      {
        "id": "List.extension:eventHistory",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
            "valueCode": "normative"
          },
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version",
            "valueCode": "4.0.0"
          }
        ],
        "path": "List.extension",
        "sliceName": "eventHistory",
        "short": "A list of events of interest in the lifecycle",
        "definition": "A list of events of interest in the lifecycle. Events are provided in the header X-Provenance. The events in this list are read only.",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://electronichealth.se/fhir/StructureDefinition/NLLMultiDoseEvent"
            ]
          }
        ]
      },
      {
        "id": "List.extension:eventHistory.value[x]",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
            "valueCode": "normative"
          },
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version",
            "valueCode": "4.0.0"
          }
        ],
        "path": "List.extension.value[x]",
        "mapping": [
          {
            "identity": "EHM",
            "map": "Händelse"
          }
        ]
      },
      {
        "id": "List.extension:nllProducingPharmacy",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
            "valueCode": "normative"
          },
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version",
            "valueCode": "4.0.0"
          }
        ],
        "path": "List.extension",
        "sliceName": "nllProducingPharmacy",
        "short": "Producing pharmacy (sv: dosproducent)",
        "definition": "Defines the pharmacy which produces multi dose dispense bags for the patient.",
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://electronichealth.se/fhir/StructureDefinition/NLLReceivingPharmacy"
            ]
          }
        ]
      },
      {
        "id": "List.extension:nllProducingPharmacy.value[x]",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
            "valueCode": "normative"
          },
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version",
            "valueCode": "4.0.0"
          }
        ],
        "path": "List.extension.value[x]",
        "mapping": [
          {
            "identity": "EHM",
            "map": "Dosproducent"
          }
        ]
      },
      {
        "id": "List.extension:nllUrgentProduction",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
            "valueCode": "normative"
          },
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version",
            "valueCode": "4.0.0"
          }
        ],
        "path": "List.extension",
        "sliceName": "nllUrgentProduction",
        "short": "Indicates if the multi dose dispense production should be urgently considered",
        "definition": "Indicates if the multi dose dispense production should be urgently considered for this patient. The value is calculated based on changes in the medication request(s). Sv: akut-flagga",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://electronichealth.se/fhir/StructureDefinition/NLLUrgentProduction"
            ]
          }
        ]
      },
      {
        "id": "List.extension:nllUrgentProduction.value[x]",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
            "valueCode": "normative"
          },
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version",
            "valueCode": "4.0.0"
          }
        ],
        "path": "List.extension.value[x]",
        "mapping": [
          {
            "identity": "EHM",
            "map": "Akut"
          }
        ]
      },
      {
        "id": "List.code",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
            "valueCode": "normative"
          },
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version",
            "valueCode": "4.0.0"
          }
        ],
        "path": "List.code",
        "fixedCodeableConcept": {
          "coding": [
            {
              "system": "http://electronichealth.se/fhir/ValueSet/list-types",
              "code": "multi-dose-disp-list"
            }
          ]
        },
        "mustSupport": true
      },
      {
        "id": "List.subject",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
            "valueCode": "normative"
          },
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version",
            "valueCode": "4.0.0"
          }
        ],
        "path": "List.subject",
        "short": "The common subject of this resource, the patient",
        "definition": "The subject of the list, in this case the patient (sv: dospatient) is always the subject.",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://electronichealth.se/fhir/StructureDefinition/NLLPatient"
            ],
            "aggregation": [
              "referenced"
            ]
          }
        ],
        "mustSupport": true,
        "mapping": [
          {
            "identity": "EHM",
            "map": "Dospatient",
            "comment": "Reference to the patient of this dose dispense list"
          }
        ]
      },
      {
        "id": "List.date",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
            "valueCode": "normative"
          },
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version",
            "valueCode": "4.0.0"
          }
        ],
        "path": "List.date",
        "short": "When the related information for the list was last changed",
        "definition": "When the related information for the list (sv: dosunderlag) was last changed. \r\nRead only.",
        "mustSupport": true,
        "mapping": [
          {
            "identity": "EHM",
            "map": "Senast ändrad",
            "comment": "Sv: tidpunkt för när dosunderlaget ändrar status"
          }
        ]
      }
    ]
  }
}