{
  "resourceType": "StructureDefinition",
  "url": "http://digen.nublar.de/fhir/StructureDefinition/DigenBundesmedikationsplanList",
  "name": "DigenBundesmedikationsplanList",
  "status": "draft",
  "fhirVersion": "3.0.1",
  "mapping": [
    {
      "identity": "rim",
      "uri": "http://hl7.org/v3",
      "name": "RIM Mapping"
    },
    {
      "identity": "w5",
      "uri": "http://hl7.org/fhir/w5",
      "name": "W5 Mapping"
    }
  ],
  "kind": "resource",
  "abstract": false,
  "type": "List",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/List",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "List.id",
        "path": "List.id",
        "max": "0"
      },
      {
        "id": "List.meta.tag",
        "path": "List.meta.tag",
        "max": "0"
      },
      {
        "id": "List.implicitRules",
        "path": "List.implicitRules",
        "max": "0"
      },
      {
        "id": "List.contained",
        "path": "List.contained",
        "slicing": {
          "discriminator": [
            {
              "type": "type",
              "path": "$this"
            }
          ],
          "rules": "open"
        },
        "min": 1
      },
      {
        "id": "List.contained:BMPPresentableMedicationStatements",
        "path": "List.contained",
        "sliceName": "BMPPresentableMedicationStatements",
        "short": "BMP Medikationseinträge",
        "min": 1,
        "type": [
          {
            "code": "Resource",
            "profile": "http://digen.nublar.de/fhir/StructureDefinition/DigenBMPPresentableMedicationStatement"
          }
        ]
      },
      {
        "id": "List.contained:informationSourcePractitionerResource",
        "path": "List.contained",
        "sliceName": "informationSourcePractitionerResource",
        "short": "Ausgedruckt von",
        "comment": "The practitioner (or organization in some cases) that printed out the medication plan for the patient. This must be included inline, as we do not always know the LANR.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Resource",
            "profile": "http://digen.nublar.de/fhir/StructureDefinition/DigenBmpPractitioner"
          }
        ]
      },
      {
        "id": "List.identifier",
        "path": "List.identifier",
        "min": 1,
        "max": "1"
      },
      {
        "id": "List.identifier.id",
        "path": "List.identifier.id",
        "max": "0"
      },
      {
        "id": "List.identifier.use",
        "path": "List.identifier.use",
        "max": "0"
      },
      {
        "id": "List.identifier.type",
        "path": "List.identifier.type",
        "max": "0"
      },
      {
        "id": "List.identifier.type.id",
        "path": "List.identifier.type.id",
        "max": "0"
      },
      {
        "id": "List.identifier.type.coding",
        "path": "List.identifier.type.coding",
        "max": "0"
      },
      {
        "id": "List.identifier.type.coding.id",
        "path": "List.identifier.type.coding.id",
        "max": "0"
      },
      {
        "id": "List.identifier.type.coding.system",
        "path": "List.identifier.type.coding.system",
        "max": "0"
      },
      {
        "id": "List.identifier.type.coding.version",
        "path": "List.identifier.type.coding.version",
        "max": "0"
      },
      {
        "id": "List.identifier.type.coding.code",
        "path": "List.identifier.type.coding.code",
        "definition": "Contains the unique identifier of the Bundesmedikationsplan (BMP), read from Barcode MP.U.",
        "max": "0"
      },
      {
        "id": "List.identifier.type.coding.userSelected",
        "path": "List.identifier.type.coding.userSelected",
        "max": "0"
      },
      {
        "id": "List.identifier.type.text",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "List.identifier.type.text",
        "max": "0"
      },
      {
        "id": "List.identifier.system",
        "path": "List.identifier.system",
        "min": 1,
        "fixedUri": "http://tools.ietf.org/html/rfc4122"
      },
      {
        "id": "List.identifier.value",
        "path": "List.identifier.value",
        "short": "BMP unique ID",
        "definition": "Contains the unique identifier of the Bundesmedikationsplan (BMP), read from Barcode MP.U.",
        "min": 1
      },
      {
        "id": "List.identifier.period",
        "path": "List.identifier.period",
        "max": "0"
      },
      {
        "id": "List.identifier.assigner",
        "path": "List.identifier.assigner",
        "max": "0"
      },
      {
        "id": "List.status",
        "path": "List.status",
        "fixedCode": "current"
      },
      {
        "id": "List.mode",
        "path": "List.mode",
        "fixedCode": "snapshot"
      },
      {
        "id": "List.title",
        "path": "List.title",
        "max": "0"
      },
      {
        "id": "List.code",
        "path": "List.code",
        "min": 1,
        "fixedCodeableConcept": {
          "coding": [
            {
              "system": "http://hl7.org/fhir/list-example-use-codes",
              "code": "medications",
              "display": "medications"
            }
          ]
        }
      },
      {
        "id": "List.code.id",
        "path": "List.code.id",
        "max": "0"
      },
      {
        "id": "List.code.coding.id",
        "path": "List.code.coding.id",
        "max": "0"
      },
      {
        "id": "List.code.coding.version",
        "path": "List.code.coding.version",
        "max": "0"
      },
      {
        "id": "List.code.coding.userSelected",
        "path": "List.code.coding.userSelected",
        "max": "0"
      },
      {
        "id": "List.code.text",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "List.code.text",
        "max": "0"
      },
      {
        "id": "List.subject",
        "path": "List.subject",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/Patient",
            "aggregation": [
              "referenced"
            ]
          }
        ]
      },
      {
        "id": "List.subject.id",
        "path": "List.subject.id",
        "max": "0"
      },
      {
        "id": "List.subject.reference",
        "path": "List.subject.reference",
        "min": 1
      },
      {
        "id": "List.subject.identifier",
        "path": "List.subject.identifier",
        "max": "0"
      },
      {
        "id": "List.subject.display",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "List.subject.display",
        "max": "0"
      },
      {
        "id": "List.encounter",
        "path": "List.encounter",
        "max": "0"
      },
      {
        "id": "List.date",
        "path": "List.date",
        "short": "Ausdrucksdatum des BMP",
        "definition": "The date that the list was prepared, i.e. the date when the medication plan was printed, read from Barcode: MP.A.t."
      },
      {
        "id": "List.source",
        "path": "List.source",
        "short": "Ausdruckender Arzt/Apotheke",
        "definition": "The doctor/pharmacy that printed the medication plan (Bundesmedikationsplan, BMP), read from Barcode: MP.A.*",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://digen.nublar.de/fhir/StructureDefinition/DigenBmpPractitioner",
            "aggregation": [
              "contained"
            ]
          }
        ]
      },
      {
        "id": "List.source.id",
        "path": "List.source.id",
        "max": "0"
      },
      {
        "id": "List.source.reference",
        "path": "List.source.reference",
        "min": 1
      },
      {
        "id": "List.source.identifier",
        "path": "List.source.identifier",
        "max": "0"
      },
      {
        "id": "List.source.display",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "List.source.display",
        "max": "0"
      },
      {
        "id": "List.orderedBy",
        "path": "List.orderedBy",
        "max": "0"
      },
      {
        "id": "List.note",
        "path": "List.note",
        "max": "0"
      },
      {
        "id": "List.entry",
        "path": "List.entry",
        "short": "Medikationseinträge des BMP",
        "definition": "Entries in this list are the several medications statements (PZN), that are part of the medican plan (Bundesmedikationsplan, BMP).",
        "min": 1
      },
      {
        "id": "List.entry.id",
        "path": "List.entry.id",
        "max": "0"
      },
      {
        "id": "List.entry.flag",
        "path": "List.entry.flag",
        "short": "Dosierschemaübernahme",
        "definition": "The flag defines per entry (PZN) if the dosing scheme is to be used to from the medical plan and thus overrides a possibly already existing dosing scheme.",
        "min": 1
      },
      {
        "id": "List.entry.flag.id",
        "path": "List.entry.flag.id",
        "max": "0"
      },
      {
        "id": "List.entry.flag.coding",
        "path": "List.entry.flag.coding",
        "short": "Dosierschemaübernahme",
        "definition": "Defines if a dosing scheme from the BMP (Bundesmedikationsplan) overrides a previously existing dosing scheme.",
        "min": 1,
        "max": "1",
        "binding": {
          "strength": "required",
          "description": "DosingScheme",
          "valueSetUri": "http://digen.nublar.de/fhir/CodeSystem/1.2.276.0.76.3.1.321.1.1.5.10"
        }
      },
      {
        "id": "List.entry.flag.coding.id",
        "path": "List.entry.flag.coding.id",
        "max": "0"
      },
      {
        "id": "List.entry.flag.coding.system",
        "path": "List.entry.flag.coding.system",
        "min": 1
      },
      {
        "id": "List.entry.flag.coding.version",
        "path": "List.entry.flag.coding.version",
        "max": "0"
      },
      {
        "id": "List.entry.flag.coding.code",
        "path": "List.entry.flag.coding.code",
        "short": "Dosierschemaübernahme",
        "definition": "If true, the dosing scheme from the medication plan (BMP) is used to overwrite an existing dosing scheme.",
        "min": 1,
        "binding": {
          "strength": "required",
          "description": "dosingScheme",
          "valueSetUri": "http://digen.nublar.de/fhir/CodeSystem/1.2.276.0.76.3.1.321.1.1.5.10"
        }
      },
      {
        "id": "List.entry.flag.coding.userSelected",
        "path": "List.entry.flag.coding.userSelected",
        "max": "0"
      },
      {
        "id": "List.entry.flag.text",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "List.entry.flag.text",
        "max": "0"
      },
      {
        "id": "List.entry.deleted",
        "path": "List.entry.deleted",
        "max": "0"
      },
      {
        "id": "List.entry.date",
        "path": "List.entry.date",
        "max": "0"
      },
      {
        "id": "List.entry.item",
        "path": "List.entry.item",
        "short": "BMP Medikationseinträge",
        "definition": "A reference to the actual medication plan (Bundesmedikationsplan, BMP), from which the medication entries are read.",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://digen.nublar.de/fhir/StructureDefinition/DigenBMPPresentableMedicationStatement",
            "aggregation": [
              "contained"
            ]
          }
        ]
      },
      {
        "id": "List.entry.item.id",
        "path": "List.entry.item.id",
        "max": "0"
      },
      {
        "id": "List.entry.item.identifier",
        "path": "List.entry.item.identifier",
        "max": "0"
      },
      {
        "id": "List.entry.item.display",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "List.entry.item.display",
        "max": "0"
      },
      {
        "id": "List.emptyReason",
        "path": "List.emptyReason",
        "max": "0"
      }
    ]
  }
}