Implementation Guide
TIFlow - Grenzüberschreitender Datenaustausch
Version 2.0.0-ballot.2 - ballot

## Resource Profile: GEM_ERPEU_PR_MedicationDispense - TTL Profile

Draft as of 2026-06-30

TTL representation of the GEM-ERPEU-PR-MedicationDispense resource profile.

Raw ttl | Download

    @prefix fhir: <http://hl7.org/fhir/> .
    @prefix owl: <http://www.w3.org/2002/07/owl#> .
    @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
    @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

    # - resource -------------------------------------------------------------------

    <http://hl7.org/fhir/StructureDefinition/GEM-ERPEU-PR-MedicationDispense> a fhir:StructureDefinition ;
      fhir:nodeRole fhir:treeRoot ;
      fhir:Resource.id [ fhir:value "GEM-ERPEU-PR-MedicationDispense"] ;
      fhir:DomainResource.text [
         fhir:Narrative.status [ fhir:value "extensions" ] ;
         fhir:Narrative.div "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p class=\"res-header-id\"><b>Generated Narrative: StructureDefinition GEM-ERPEU-PR-MedicationDispense</b></p><a name=\"GEM-ERPEU-PR-MedicationDispense\"> </a><a name=\"hcGEM-ERPEU-PR-MedicationDispense\"> </a><table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border: 0px #F0F0F0 solid; font-size: 11px; font-family: verdana; vertical-align: top;\"><tr style=\"border: 1px #F0F0F0 solid; font-size: 11px; font-family: verdana; vertical-align: top\"><th style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; padding-top: 3px; padding-bottom: 3px\" class=\"hierarchy\"><a href=\"https://build.fhir.org/ig/FHIR/ig-guidance/readingIgs.html#table-views\" title=\"The logical name of the element\">Name</a></th><th style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; padding-top: 3px; padding-bottom: 3px\" class=\"hierarchy\"><a href=\"https://build.fhir.org/ig/FHIR/ig-guidance/readingIgs.html#table-views\" title=\"Information about the use of the element\">Flags</a></th><th style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; padding-top: 3px; padding-bottom: 3px\" class=\"hierarchy\"><a href=\"https://build.fhir.org/ig/FHIR/ig-guidance/readingIgs.html#table-views\" title=\"Minimum and Maximum # of times the element can appear in the instance\">Card.</a></th><th style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; padding-top: 3px; padding-bottom: 3px; width: 100px\" class=\"hierarchy\"><a href=\"https://build.fhir.org/ig/FHIR/ig-guidance/readingIgs.html#table-views\" title=\"Reference to the type of the element\">Type</a></th><th style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; padding-top: 3px; padding-bottom: 3px\" class=\"hierarchy\"><a href=\"https://build.fhir.org/ig/FHIR/ig-guidance/readingIgs.html#table-views\" title=\"Additional information about the element\">Description &amp; Constraints</a><span style=\"float: right\"><a href=\"https://build.fhir.org/ig/FHIR/ig-guidance/readingIgs.html#table-views\" title=\"Legend for this format\"><img src=\"data:image/png;base64, \" alt=\"doco\" style=\"background-color: inherit\"/></a></span></th></tr><tr style=\"border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: white\"><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck1.png)\" class=\"hierarchy\"><img src=\"tbl_spacer.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"icon_resource.png\" alt=\".\" style=\"background-color: white; background-color: inherit\" title=\"Resource\" class=\"hierarchy\"/> <a href=\"StructureDefinition-GEM-ERPEU-PR-MedicationDispense-definitions.html#MedicationDispense\">MedicationDispense</a><a name=\"MedicationDispense\"> </a></td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"/><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><span style=\"opacity: 0.5\">0</span><span style=\"opacity: 0.5\">..</span><span style=\"opacity: 0.5\">*</span></td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><a href=\"https://gematik.de/fhir/ti/1.4.0-ballot.1/StructureDefinition-ti-medication-dispense-dgmp.html\">TIMedicationDispenseDgMP</a></td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><span style=\"opacity: 0.5\">Dispensing a medication to a named patient</span></td></tr>#xD;\n<tr style=\"border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: #F7F7F7\"><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck10.png)\" class=\"hierarchy\"><img src=\"tbl_spacer.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"tbl_vjoin.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"icon_element.gif\" alt=\".\" style=\"background-color: #F7F7F7; background-color: inherit\" title=\"Element\" class=\"hierarchy\"/> <a href=\"StructureDefinition-GEM-ERPEU-PR-MedicationDispense-definitions.html#MedicationDispense.identifier\">identifier</a><a name=\"MedicationDispense.identifier\"> </a></td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"/><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\">1..<span style=\"opacity: 0.5\">*</span></td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><a style=\"opacity: 0.5; opacity: 0.5\" href=\"http://hl7.org/fhir/R4/datatypes.html#Identifier\">Identifier</a></td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\">ePrescription identifier</td></tr>#xD;\n<tr style=\"border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: white\"><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck13.png)\" class=\"hierarchy\"><img src=\"tbl_spacer.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"tbl_vjoin.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"icon_slice.png\" alt=\".\" style=\"background-color: white; background-color: inherit\" title=\"Slice Definition\" class=\"hierarchy\"/> Slices for identifier<a name=\"MedicationDispense.identifier.2\"> </a></td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"/><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"/><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"/><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\">Content/Rules for all slices</td></tr>#xD;\n<tr style=\"border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: #F7F7F7\"><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck125.png)\" class=\"hierarchy\"><img src=\"tbl_spacer.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"tbl_vline.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"tbl_vjoin_end_slicer.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"icon_slice_item.png\" alt=\".\" style=\"background-color: #F7F7F7; background-color: inherit\" title=\"Slice Item\" class=\"hierarchy\"/> <a href=\"StructureDefinition-GEM-ERPEU-PR-MedicationDispense-definitions.html#MedicationDispense.identifier:prescriptionID\" title=\"Slice prescriptionID\">identifier:prescriptionID</a><a name=\"MedicationDispense.identifier:prescriptionID\"> </a></td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"/><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\">1..1</td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><a href=\"https://gematik.de/fhir/ti/1.4.0-ballot.1/StructureDefinition-e-prescription-id.html\" title=\"Identifier\">EPrescriptionId</a></td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><span style=\"opacity: 0.5\">External identifier</span><br/><span style=\"font-weight:bold\">Required Pattern: </span><span style=\"color: darkgreen\">At least the following</span></td></tr>#xD;\n<tr style=\"border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: white\"><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck1240.png)\" class=\"hierarchy\"><img src=\"tbl_spacer.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"tbl_vline.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"tbl_blank.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"tbl_vjoin_end_slice.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"icon_fixed.gif\" alt=\".\" style=\"background-color: white; background-color: inherit\" title=\"Fixed Value\" class=\"hierarchy\"/> <a href=\"http://hl7.org/fhir/R4/datatypes-definitions.html#Identifier.system\">system</a></td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"/><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\">1..1</td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><a href=\"http://hl7.org/fhir/R4/datatypes.html#uri\">uri</a></td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\">The namespace for the identifier value<br/><span style=\"font-weight: bold\">Fixed Value: </span><span style=\"color: darkgreen\">https://gematik.de/fhir/erp/NamingSystem/GEM_ERP_NS_PrescriptionId</span></td></tr>#xD;\n<tr style=\"border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: #F7F7F7\"><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck10.png)\" class=\"hierarchy\"><img src=\"tbl_spacer.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"tbl_vjoin.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"icon_element.gif\" alt=\".\" style=\"background-color: #F7F7F7; background-color: inherit\" title=\"Element\" class=\"hierarchy\"/> <a href=\"StructureDefinition-GEM-ERPEU-PR-MedicationDispense-definitions.html#MedicationDispense.status\">status</a><a name=\"MedicationDispense.status\"> </a></td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"/><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><span style=\"opacity: 0.5\">1</span><span style=\"opacity: 0.5\">..</span><span style=\"opacity: 0.5\">1</span></td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><a style=\"opacity: 0.5; opacity: 0.5\" href=\"http://hl7.org/fhir/R4/datatypes.html#code\">code</a></td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\">completed<br/><span style=\"font-weight:bold\">Fixed Value: </span><span style=\"color: darkgreen\">completed</span></td></tr>#xD;\n<tr style=\"border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: white\"><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck10.png)\" class=\"hierarchy\"><img src=\"tbl_spacer.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"tbl_vjoin.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"icon_reference.png\" alt=\".\" style=\"background-color: white; background-color: inherit\" title=\"Reference to another Resource\" class=\"hierarchy\"/> <a href=\"StructureDefinition-GEM-ERPEU-PR-MedicationDispense-definitions.html#MedicationDispense.medication[x]\" title=\"The MedicationDispense references a medication which was dispensed\">medication[x]</a><a name=\"MedicationDispense.medication_x_\"> </a></td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"/><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><span style=\"opacity: 0.5\">1</span><span style=\"opacity: 0.5\">..</span><span style=\"opacity: 0.5\">1</span></td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><a href=\"http://hl7.org/fhir/R4/references.html\">Reference</a>(<a href=\"StructureDefinition-GEM-ERPEU-PR-Medication.html\">EU-Medication</a>)</td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><span style=\"opacity: 0.5\">What medication was supplied</span></td></tr>#xD;\n<tr style=\"border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: #F7F7F7\"><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck11.png)\" class=\"hierarchy\"><img src=\"tbl_spacer.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"tbl_vjoin.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"icon_element.gif\" alt=\".\" style=\"background-color: #F7F7F7; background-color: inherit\" title=\"Element\" class=\"hierarchy\"/> <a href=\"StructureDefinition-GEM-ERPEU-PR-MedicationDispense-definitions.html#MedicationDispense.performer\" title=\"References a pracitioner role in order to state practitioner and organization information\">performer</a><a name=\"MedicationDispense.performer\"> </a></td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"/><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><span style=\"opacity: 0.5\">1</span><span style=\"opacity: 0.5\">..</span><span style=\"opacity: 0.5\">1</span></td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><a style=\"opacity: 0.5; opacity: 0.5\" href=\"http://hl7.org/fhir/R4/datatypes.html#BackboneElement\">BackboneElement</a></td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><span style=\"opacity: 0.5\">Who performed event</span></td></tr>#xD;\n<tr style=\"border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: white\"><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck100.png)\" class=\"hierarchy\"><img src=\"tbl_spacer.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"tbl_vline.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"tbl_vjoin_end.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"icon_reference.png\" alt=\".\" style=\"background-color: white; background-color: inherit\" title=\"Reference to another Resource\" class=\"hierarchy\"/> <a href=\"StructureDefinition-GEM-ERPEU-PR-MedicationDispense-definitions.html#MedicationDispense.performer.actor\">actor</a><a name=\"MedicationDispense.performer.actor\"> </a></td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"/><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><span style=\"opacity: 0.5\">1</span><span style=\"opacity: 0.5\">..</span><span style=\"opacity: 0.5\">1</span></td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><a href=\"http://hl7.org/fhir/R4/references.html\">Reference</a>(<a href=\"StructureDefinition-GEM-ERPEU-PR-PractitionerRole.html\">PractitionerRole Information Received from the EU</a>)</td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><span style=\"opacity: 0.5\">Individual who was performing</span></td></tr>#xD;\n<tr style=\"border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: #F7F7F7\"><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck11.png)\" class=\"hierarchy\"><img src=\"tbl_spacer.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"tbl_vjoin.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"icon_element.gif\" alt=\".\" style=\"background-color: #F7F7F7; background-color: inherit\" title=\"Element\" class=\"hierarchy\"/> <a href=\"StructureDefinition-GEM-ERPEU-PR-MedicationDispense-definitions.html#MedicationDispense.quantity\">quantity</a><a name=\"MedicationDispense.quantity\"> </a></td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><span style=\"padding-left: 3px; padding-right: 3px; color: white; background-color: #D50000\" title=\"This element must be supported\">S</span><a style=\"padding-left: 3px; padding-right: 3px; border: 1px maroon solid; font-weight: bold; color: #301212; background-color: #fdf4f4;; padding-left: 3px; padding-right: 3px; border: 1px maroon solid; font-weight: bold; color: #301212; background-color: #fdf4f4;\" href=\"http://hl7.org/fhir/R4/conformance-rules.html#constraints\" title=\"This element has or is affected by constraints ( erp-eu-positiveAnzahlPackungen )\">C</a></td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><span style=\"opacity: 0.5\">0</span><span style=\"opacity: 0.5\">..</span><span style=\"opacity: 0.5\">1</span></td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><a style=\"opacity: 0.5; opacity: 0.5\" href=\"http://hl7.org/fhir/R4/datatypes.html#SimpleQuantity\" title=\"Quantity\">SimpleQuantity</a></td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\">Number of dispensed packages/ units<br class=\"constraint\"/><span title=\"null\" class=\"constraint\">Constraints: </span><span style=\"font-weight:bold\" title=\"Der Wert der Packungen muss positiv sein (größer gleich 0).\" class=\"constraint\">erp-eu-positiveAnzahlPackungen</span></td></tr>#xD;\n<tr style=\"border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: white\"><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck110.png)\" class=\"hierarchy\"><img src=\"tbl_spacer.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"tbl_vline.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"tbl_vjoin.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"icon_element.gif\" alt=\".\" style=\"background-color: white; background-color: inherit\" title=\"Element\" class=\"hierarchy\"/> <a href=\"StructureDefinition-GEM-ERPEU-PR-MedicationDispense-definitions.html#MedicationDispense.quantity.value\">value</a><a name=\"MedicationDispense.quantity.value\"> </a></td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><span style=\"padding-left: 3px; padding-right: 3px; color: white; background-color: #D50000\" title=\"This element must be supported\">S</span></td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><span style=\"opacity: 0.5\">0</span><span style=\"opacity: 0.5\">..</span><span style=\"opacity: 0.5\">1</span></td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><a style=\"opacity: 0.5; opacity: 0.5\" href=\"http://hl7.org/fhir/R4/datatypes.html#decimal\">decimal</a></td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><span style=\"opacity: 0.5\">Numerical value (with implicit precision)</span></td></tr>#xD;\n<tr style=\"border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: #F7F7F7\"><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck100.png)\" class=\"hierarchy\"><img src=\"tbl_spacer.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"tbl_vline.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"tbl_vjoin_end.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"icon_element.gif\" alt=\".\" style=\"background-color: #F7F7F7; background-color: inherit\" title=\"Element\" class=\"hierarchy\"/> <a href=\"StructureDefinition-GEM-ERPEU-PR-MedicationDispense-definitions.html#MedicationDispense.quantity.unit\">unit</a><a name=\"MedicationDispense.quantity.unit\"> </a></td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><span style=\"padding-left: 3px; padding-right: 3px; color: white; background-color: #D50000\" title=\"This element must be supported\">S</span></td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><span style=\"opacity: 0.5\">0</span><span style=\"opacity: 0.5\">..</span><span style=\"opacity: 0.5\">1</span></td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><a style=\"opacity: 0.5; opacity: 0.5\" href=\"http://hl7.org/fhir/R4/datatypes.html#string\">string</a></td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><span style=\"opacity: 0.5\">Unit representation</span></td></tr>#xD;\n<tr style=\"border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: white\"><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck10.png)\" class=\"hierarchy\"><img src=\"tbl_spacer.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"tbl_vjoin.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"icon_element.gif\" alt=\".\" style=\"background-color: white; background-color: inherit\" title=\"Element\" class=\"hierarchy\"/> <a href=\"StructureDefinition-GEM-ERPEU-PR-MedicationDispense-definitions.html#MedicationDispense.whenPrepared\">whenPrepared</a><a name=\"MedicationDispense.whenPrepared\"> </a></td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><a style=\"padding-left: 3px; padding-right: 3px; border: 1px maroon solid; font-weight: bold; color: #301212; background-color: #fdf4f4;; padding-left: 3px; padding-right: 3px; border: 1px maroon solid; font-weight: bold; color: #301212; background-color: #fdf4f4;\" href=\"http://hl7.org/fhir/R4/conformance-rules.html#constraints\" title=\"This element has or is affected by constraints ( erp-eu-abgabeDatumsFormat )\">C</a></td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><span style=\"opacity: 0.5\">0</span><span style=\"opacity: 0.5\">..</span><span style=\"opacity: 0.5\">1</span></td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><a style=\"opacity: 0.5; opacity: 0.5\" href=\"http://hl7.org/fhir/R4/datatypes.html#dateTime\">dateTime</a></td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><span style=\"opacity: 0.5\">When product was packaged and reviewed</span><br class=\"constraint\"/><span title=\"null\" class=\"constraint\">Constraints: </span><span style=\"font-weight:bold\" title=\"Wert muss ein Datum in der Form: YYYY-MM-DD sein.\" class=\"constraint\">erp-eu-abgabeDatumsFormat</span></td></tr>#xD;\n<tr style=\"border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: #F7F7F7\"><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck10.png)\" class=\"hierarchy\"><img src=\"tbl_spacer.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"tbl_vjoin.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"icon_element.gif\" alt=\".\" style=\"background-color: #F7F7F7; background-color: inherit\" title=\"Element\" class=\"hierarchy\"/> <a href=\"StructureDefinition-GEM-ERPEU-PR-MedicationDispense-definitions.html#MedicationDispense.whenHandedOver\">whenHandedOver</a><a name=\"MedicationDispense.whenHandedOver\"> </a></td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><a style=\"padding-left: 3px; padding-right: 3px; border: 1px maroon solid; font-weight: bold; color: #301212; background-color: #fdf4f4;; padding-left: 3px; padding-right: 3px; border: 1px maroon solid; font-weight: bold; color: #301212; background-color: #fdf4f4;\" href=\"http://hl7.org/fhir/R4/conformance-rules.html#constraints\" title=\"This element has or is affected by constraints ( erp-eu-abgabeDatumsFormat )\">C</a></td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><span style=\"opacity: 0.5\">1</span><span style=\"opacity: 0.5\">..</span><span style=\"opacity: 0.5\">1</span></td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><a style=\"opacity: 0.5; opacity: 0.5\" href=\"http://hl7.org/fhir/R4/datatypes.html#dateTime\">dateTime</a></td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><span style=\"opacity: 0.5\">When product was given out</span><br class=\"constraint\"/><span title=\"null\" class=\"constraint\">Constraints: </span><span style=\"font-weight:bold\" title=\"Wert muss ein Datum in der Form: YYYY-MM-DD sein.\" class=\"constraint\">erp-eu-abgabeDatumsFormat</span></td></tr>#xD;\n<tr style=\"border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: white\"><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck01.png)\" class=\"hierarchy\"><img src=\"tbl_spacer.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"tbl_vjoin_end.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"icon_element.gif\" alt=\".\" style=\"background-color: white; background-color: inherit\" title=\"Element\" class=\"hierarchy\"/> <a href=\"StructureDefinition-GEM-ERPEU-PR-MedicationDispense-definitions.html#MedicationDispense.substitution\">substitution</a><a name=\"MedicationDispense.substitution\"> </a></td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"/><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"/><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"/><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"/></tr>#xD;\n<tr style=\"border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: #F7F7F7\"><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck000.png)\" class=\"hierarchy\"><img src=\"tbl_spacer.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"tbl_blank.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"tbl_vjoin_end.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"icon_element.gif\" alt=\".\" style=\"background-color: #F7F7F7; background-color: inherit\" title=\"Element\" class=\"hierarchy\"/> <a href=\"StructureDefinition-GEM-ERPEU-PR-MedicationDispense-definitions.html#MedicationDispense.substitution.wasSubstituted\">wasSubstituted</a><a name=\"MedicationDispense.substitution.wasSubstituted\"> </a></td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><span style=\"padding-left: 3px; padding-right: 3px; color: white; background-color: #D50000\" title=\"This element must be supported\">S</span></td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><span style=\"opacity: 0.5\">1</span><span style=\"opacity: 0.5\">..</span><span style=\"opacity: 0.5\">1</span></td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><a style=\"opacity: 0.5; opacity: 0.5\" href=\"http://hl7.org/fhir/R4/datatypes.html#boolean\">boolean</a></td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\">Indicates whether a substitution was made on the dispensed medication</td></tr>#xD;\n<tr><td colspan=\"5\" class=\"hierarchy\"><br/><a href=\"https://build.fhir.org/ig/FHIR/ig-guidance/readingIgs.html#table-views\" title=\"Legend for this format\"><img src=\"data:image/png;base64, \" alt=\"doco\" style=\"background-color: inherit\"/> Documentation for this format</a></td></tr></table></div>"
      ] ;
      fhir:StructureDefinition.url [ fhir:value "https://gematik.de/fhir/tiflow-xborder/StructureDefinition/GEM-ERPEU-PR-MedicationDispense"] ;
      fhir:StructureDefinition.version [ fhir:value "2.0.0-ballot.2"] ;
      fhir:StructureDefinition.name [ fhir:value "GEM_ERPEU_PR_MedicationDispense"] ;
      fhir:StructureDefinition.title [ fhir:value "Dispensation of the Prescription from the EU"] ;
      fhir:StructureDefinition.status [ fhir:value "draft"] ;
      fhir:StructureDefinition.date [ fhir:value "2026-06-30"^^xsd:date] ;
      fhir:StructureDefinition.publisher [ fhir:value "gematik GmbH"] ;
      fhir:StructureDefinition.contact [
         fhir:index 0 ;
         fhir:ContactDetail.name [ fhir:value "gematik GmbH" ] ;
         fhir:ContactDetail.telecom [
           fhir:index 0 ;
           fhir:ContactPoint.system [ fhir:value "url" ] ;
           fhir:ContactPoint.value [ fhir:value "https://gematik.de" ]
         ], [
           fhir:index 1 ;
           fhir:ContactPoint.system [ fhir:value "email" ] ;
           fhir:ContactPoint.value [ fhir:value "erp-umsetzung@gematik.de" ]
         ]
      ] ;
      fhir:StructureDefinition.description [ fhir:value "Handles information about the redeem of the prescription and the submited medication from the EU."] ;
      fhir:StructureDefinition.jurisdiction [
         fhir:index 0 ;
         fhir:CodeableConcept.coding [
           fhir:index 0 ;
           fhir:Coding.system [ fhir:value "urn:iso:std:iso:3166" ] ;
           fhir:Coding.code [ fhir:value "DE" ] ;
           fhir:Coding.display [ fhir:value "Germany" ]
         ]
      ] ;
      fhir:StructureDefinition.fhirVersion [ fhir:value "4.0.1"] ;
      fhir:StructureDefinition.mapping [
         fhir:index 0 ;
         fhir:StructureDefinition.mapping.identity [ fhir:value "workflow" ] ;
         fhir:StructureDefinition.mapping.uri [ fhir:value "http://hl7.org/fhir/workflow" ] ;
         fhir:StructureDefinition.mapping.name [ fhir:value "Workflow Pattern" ]
      ], [
         fhir:index 1 ;
         fhir:StructureDefinition.mapping.identity [ fhir:value "rim" ] ;
         fhir:StructureDefinition.mapping.uri [ fhir:value "http://hl7.org/v3" ] ;
         fhir:StructureDefinition.mapping.name [ fhir:value "RIM Mapping" ]
      ], [
         fhir:index 2 ;
         fhir:StructureDefinition.mapping.identity [ fhir:value "w5" ] ;
         fhir:StructureDefinition.mapping.uri [ fhir:value "http://hl7.org/fhir/fivews" ] ;
         fhir:StructureDefinition.mapping.name [ fhir:value "FiveWs Pattern Mapping" ]
      ], [
         fhir:index 3 ;
         fhir:StructureDefinition.mapping.identity [ fhir:value "rx-dispense-rmim" ] ;
         fhir:StructureDefinition.mapping.uri [ fhir:value "http://www.hl7.org/v3/PORX_RM020070UV" ] ;
         fhir:StructureDefinition.mapping.name [ fhir:value "V3 Pharmacy Dispense RMIM" ]
      ], [
         fhir:index 4 ;
         fhir:StructureDefinition.mapping.identity [ fhir:value "v2" ] ;
         fhir:StructureDefinition.mapping.uri [ fhir:value "http://hl7.org/v2" ] ;
         fhir:StructureDefinition.mapping.name [ fhir:value "HL7 v2 Mapping" ]
      ] ;
      fhir:StructureDefinition.kind [ fhir:value "resource"] ;
      fhir:StructureDefinition.abstract [ fhir:value "false"^^xsd:boolean] ;
      fhir:StructureDefinition.type [ fhir:value "MedicationDispense"] ;
      fhir:StructureDefinition.baseDefinition [
         fhir:value "https://gematik.de/fhir/ti/StructureDefinition/ti-medication-dispense-dgmp" ;
         fhir:link <https://gematik.de/fhir/ti/StructureDefinition/ti-medication-dispense-dgmp>
      ] ;
      fhir:StructureDefinition.derivation [ fhir:value "constraint"] ;
      fhir:StructureDefinition.snapshot [
         fhir:Element.extension [
           fhir:index 0 ;
           fhir:Extension.url [ fhir:value "http://hl7.org/fhir/tools/StructureDefinition/snapshot-base-version" ] ;
           fhir:Extension.valueString [ fhir:value "1.4.0" ]
         ] ;
         fhir:StructureDefinition.snapshot.element [
           fhir:index 0 ;
           fhir:Element.id [ fhir:value "MedicationDispense" ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense" ] ;
           fhir:ElementDefinition.short [ fhir:value "Dispensing a medication to a named patient" ] ;
           fhir:ElementDefinition.definition [ fhir:value "Indicates that a medication product is to be or has been dispensed for a named person/patient.  This includes a description of the medication product (supply) provided and the instructions for administering the medication.  The medication dispense is the result of a pharmacy system responding to a medication order." ] ;
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
           fhir:ElementDefinition.max [ fhir:value "*" ] ;
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "MedicationDispense" ] ;
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
             fhir:ElementDefinition.base.max [ fhir:value "*" ]
           ] ;
           fhir:ElementDefinition.constraint [
             fhir:index 0 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "dom-2" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "If the resource is contained in another resource, it SHALL NOT contain nested Resources" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "contained.contained.empty()" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "not(parent::f:contained and f:contained)" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/MedicationDispense" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/MedicationDispense>
             ]
           ], [
             fhir:index 1 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "dom-3" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "contained.where((('#'+id in (%resource.descendants().reference | %resource.descendants().as(canonical) | %resource.descendants().as(uri) | %resource.descendants().as(url))) or descendants().where(reference = '#').exists() or descendants().where(as(canonical) = '#').exists() or descendants().where(as(canonical) = '#').exists()).not()).trace('unmatched', id).empty()" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "not(exists(for $id in f:contained/*/f:id/@value return $contained[not(parent::*/descendant::f:reference/@value=concat('#', $contained/*/id/@value) or descendant::f:reference[@value='#'])]))" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/MedicationDispense" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/MedicationDispense>
             ]
           ], [
             fhir:index 2 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "dom-4" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/MedicationDispense" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/MedicationDispense>
             ]
           ], [
             fhir:index 3 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "dom-5" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "If a resource is contained in another resource, it SHALL NOT have a security label" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "contained.meta.security.empty()" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "not(exists(f:contained/*/f:meta/f:security))" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/MedicationDispense" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/MedicationDispense>
             ]
           ], [
             fhir:index 4 ;
             fhir:Element.extension [
               fhir:index 0 ;
               fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice" ] ;
               fhir:Extension.valueBoolean [ fhir:value "true"^^xsd:boolean ]
             ], [
               fhir:index 1 ;
               fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice-explanation" ] ;
               fhir:Extension.valueMarkdown [ fhir:value "When a resource has no narrative, only systems that fully understand the data can display the resource to a human safely. Including a human readable representation in the resource makes for a much more robust eco-system and cheaper handling of resources by intermediary systems. Some ecosystems restrict distribution of resources to only those systems that do fully understand the resources, and as a consequence implementers may believe that the narrative is superfluous. However experience shows that such eco-systems often open up to new participants over time." ]
             ] ;
             fhir:ElementDefinition.constraint.key [ fhir:value "dom-6" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "warning" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "A resource should have narrative for robust management" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "text.`div`.exists()" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "exists(f:text/h:div)" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/MedicationDispense" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/MedicationDispense>
             ]
           ], [
             fhir:index 5 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "mdd-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "whenHandedOver cannot be before whenPrepared" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "whenHandedOver.empty() or whenPrepared.empty() or whenHandedOver >= whenPrepared" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "not(exists(f:whenHandedOver/@value)) or not(exists(f:whenPrepared/@value)) or ( f:whenHandedOver/@value >= f:whenPrepared/@value)" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/MedicationDispense" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/MedicationDispense>
             ]
           ] ;
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.isSummary [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.mapping [
             fhir:index 0 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "Entity. Role, or Act" ]
           ], [
             fhir:index 1 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "workflow" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "Event" ]
           ], [
             fhir:index 2 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "Supply[moodCode=EVN]" ]
           ]
         ], [
           fhir:index 1 ;
           fhir:Element.id [ fhir:value "MedicationDispense.id" ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.id" ] ;
           fhir:ElementDefinition.short [ fhir:value "Logical id of this artifact" ] ;
           fhir:ElementDefinition.definition [ fhir:value "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes." ] ;
           fhir:ElementDefinition.comment [ fhir:value "The only time that a resource does not have an id is when it is being submitted to the server using a create operation." ] ;
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
           fhir:ElementDefinition.max [ fhir:value "1" ] ;
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "Resource.id" ] ;
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
             fhir:ElementDefinition.base.max [ fhir:value "1" ]
           ] ;
           fhir:ElementDefinition.type [
             fhir:index 0 ;
             fhir:Element.extension [
               fhir:index 0 ;
               fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type" ] ;
               fhir:Extension.valueUrl [ fhir:value "id" ]
             ] ;
             fhir:ElementDefinition.type.code [ fhir:value "http://hl7.org/fhirpath/System.String" ]
           ] ;
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.isSummary [ fhir:value "true"^^xsd:boolean ]
         ], [
           fhir:index 2 ;
           fhir:Element.id [ fhir:value "MedicationDispense.meta" ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.meta" ] ;
           fhir:ElementDefinition.short [ fhir:value "Metadata about the resource" ] ;
           fhir:ElementDefinition.definition [ fhir:value "The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource." ] ;
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
           fhir:ElementDefinition.max [ fhir:value "1" ] ;
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "Resource.meta" ] ;
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
             fhir:ElementDefinition.base.max [ fhir:value "1" ]
           ] ;
           fhir:ElementDefinition.type [
             fhir:index 0 ;
             fhir:ElementDefinition.type.code [ fhir:value "Meta" ]
           ] ;
           fhir:ElementDefinition.constraint [
             fhir:index 0 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ] ;
           fhir:ElementDefinition.mustSupport [ fhir:value "true"^^xsd:boolean ] ;
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.isSummary [ fhir:value "true"^^xsd:boolean ]
         ], [
           fhir:index 3 ;
           fhir:Element.id [ fhir:value "MedicationDispense.meta.id" ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.meta.id" ] ;
           fhir:ElementDefinition.representation [
             fhir:value "xmlAttr" ;
             fhir:index 0
           ] ;
           fhir:ElementDefinition.short [ fhir:value "Unique id for inter-element referencing" ] ;
           fhir:ElementDefinition.definition [ fhir:value "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." ] ;
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
           fhir:ElementDefinition.max [ fhir:value "1" ] ;
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "Element.id" ] ;
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
             fhir:ElementDefinition.base.max [ fhir:value "1" ]
           ] ;
           fhir:ElementDefinition.type [
             fhir:index 0 ;
             fhir:Element.extension [
               fhir:index 0 ;
               fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type" ] ;
               fhir:Extension.valueUrl [ fhir:value "string" ]
             ] ;
             fhir:ElementDefinition.type.code [ fhir:value "http://hl7.org/fhirpath/System.String" ]
           ] ;
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.isSummary [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.mapping [
             fhir:index 0 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "n/a" ]
           ]
         ], [
           fhir:index 4 ;
           fhir:Element.id [ fhir:value "MedicationDispense.meta.extension" ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.meta.extension" ] ;
           fhir:ElementDefinition.slicing [
             fhir:ElementDefinition.slicing.discriminator [
               fhir:index 0 ;
               fhir:ElementDefinition.slicing.discriminator.type [ fhir:value "value" ] ;
               fhir:ElementDefinition.slicing.discriminator.path [ fhir:value "url" ]
             ] ;
             fhir:ElementDefinition.slicing.description [ fhir:value "Extensions are always sliced by (at least) url" ] ;
             fhir:ElementDefinition.slicing.rules [ fhir:value "open" ]
           ] ;
           fhir:ElementDefinition.short [ fhir:value "Additional content defined by implementations" ] ;
           fhir:ElementDefinition.definition [ fhir:value "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." ] ;
           fhir:ElementDefinition.comment [ fhir:value "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone." ] ;
           fhir:ElementDefinition.alias [
             fhir:value "extensions" ;
             fhir:index 0
           ], [
             fhir:value "user content" ;
             fhir:index 1
           ] ;
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
           fhir:ElementDefinition.max [ fhir:value "*" ] ;
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "Element.extension" ] ;
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
             fhir:ElementDefinition.base.max [ fhir:value "*" ]
           ] ;
           fhir:ElementDefinition.type [
             fhir:index 0 ;
             fhir:ElementDefinition.type.code [ fhir:value "Extension" ]
           ] ;
           fhir:ElementDefinition.constraint [
             fhir:index 0 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ], [
             fhir:index 1 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ext-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "Must have either extensions or value[x], not both" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "extension.exists() != value.exists()" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Extension" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Extension>
             ]
           ] ;
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.isSummary [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.mapping [
             fhir:index 0 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "n/a" ]
           ]
         ], [
           fhir:index 5 ;
           fhir:Element.id [ fhir:value "MedicationDispense.meta.versionId" ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.meta.versionId" ] ;
           fhir:ElementDefinition.short [ fhir:value "Version specific identifier" ] ;
           fhir:ElementDefinition.definition [ fhir:value "The version specific identifier, as it appears in the version portion of the URL. This value changes when the resource is created, updated, or deleted." ] ;
           fhir:ElementDefinition.comment [ fhir:value "The server assigns this value, and ignores what the client specifies, except in the case that the server is imposing version integrity on updates/deletes." ] ;
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
           fhir:ElementDefinition.max [ fhir:value "1" ] ;
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "Meta.versionId" ] ;
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
             fhir:ElementDefinition.base.max [ fhir:value "1" ]
           ] ;
           fhir:ElementDefinition.type [
             fhir:index 0 ;
             fhir:ElementDefinition.type.code [ fhir:value "id" ]
           ] ;
           fhir:ElementDefinition.constraint [
             fhir:index 0 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ] ;
           fhir:ElementDefinition.mustSupport [ fhir:value "true"^^xsd:boolean ] ;
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.isSummary [ fhir:value "true"^^xsd:boolean ]
         ], [
           fhir:index 6 ;
           fhir:Element.id [ fhir:value "MedicationDispense.meta.lastUpdated" ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.meta.lastUpdated" ] ;
           fhir:ElementDefinition.short [ fhir:value "When the resource version last changed" ] ;
           fhir:ElementDefinition.definition [ fhir:value "When the resource last changed - e.g. when the version changed." ] ;
           fhir:ElementDefinition.comment [ fhir:value "This value is always populated except when the resource is first being created. The server / resource manager sets this value; what a client provides is irrelevant. This is equivalent to the HTTP Last-Modified and SHOULD have the same value on a [read](http://hl7.org/fhir/R4/http.html#read) interaction." ] ;
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
           fhir:ElementDefinition.max [ fhir:value "1" ] ;
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "Meta.lastUpdated" ] ;
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
             fhir:ElementDefinition.base.max [ fhir:value "1" ]
           ] ;
           fhir:ElementDefinition.type [
             fhir:index 0 ;
             fhir:ElementDefinition.type.code [ fhir:value "instant" ]
           ] ;
           fhir:ElementDefinition.constraint [
             fhir:index 0 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ] ;
           fhir:ElementDefinition.mustSupport [ fhir:value "true"^^xsd:boolean ] ;
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.isSummary [ fhir:value "true"^^xsd:boolean ]
         ], [
           fhir:index 7 ;
           fhir:Element.id [ fhir:value "MedicationDispense.meta.source" ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.meta.source" ] ;
           fhir:ElementDefinition.short [ fhir:value "Identifies where the resource comes from" ] ;
           fhir:ElementDefinition.definition [ fhir:value "A uri that identifies the source system of the resource. This provides a minimal amount of [Provenance](http://hl7.org/fhir/R4/provenance.html#) information that can be used to track or differentiate the source of information in the resource. The source may identify another FHIR server, document, message, database, etc." ] ;
           fhir:ElementDefinition.comment [ fhir:value "In the provenance resource, this corresponds to Provenance.entity.what[x]. The exact use of the source (and the implied Provenance.entity.role) is left to implementer discretion. Only one nominated source is allowed; for additional provenance details, a full Provenance resource should be used. \n\nThis element can be used to indicate where the current master source of a resource that has a canonical URL if the resource is no longer hosted at the canonical URL." ] ;
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
           fhir:ElementDefinition.max [ fhir:value "1" ] ;
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "Meta.source" ] ;
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
             fhir:ElementDefinition.base.max [ fhir:value "1" ]
           ] ;
           fhir:ElementDefinition.type [
             fhir:index 0 ;
             fhir:ElementDefinition.type.code [ fhir:value "uri" ]
           ] ;
           fhir:ElementDefinition.constraint [
             fhir:index 0 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ] ;
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.isSummary [ fhir:value "true"^^xsd:boolean ]
         ], [
           fhir:index 8 ;
           fhir:Element.id [ fhir:value "MedicationDispense.meta.profile" ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.meta.profile" ] ;
           fhir:ElementDefinition.short [ fhir:value "Profiles this resource claims to conform to" ] ;
           fhir:ElementDefinition.definition [ fhir:value "A list of profiles (references to [StructureDefinition](http://hl7.org/fhir/R4/structuredefinition.html#) resources) that this resource claims to conform to. The URL is a reference to [StructureDefinition.url](http://hl7.org/fhir/R4/structuredefinition-definitions.html#StructureDefinition.url)." ] ;
           fhir:ElementDefinition.comment [ fhir:value "It is up to the server and/or other infrastructure of policy to determine whether/how these claims are verified and/or updated over time.  The list of profile URLs is a set." ] ;
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
           fhir:ElementDefinition.max [ fhir:value "*" ] ;
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "Meta.profile" ] ;
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
             fhir:ElementDefinition.base.max [ fhir:value "*" ]
           ] ;
           fhir:ElementDefinition.type [
             fhir:index 0 ;
             fhir:ElementDefinition.type.code [ fhir:value "canonical" ] ;
             fhir:ElementDefinition.type.targetProfile [
               fhir:value "http://hl7.org/fhir/StructureDefinition/StructureDefinition" ;
               fhir:index 0 ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/StructureDefinition>
             ]
           ] ;
           fhir:ElementDefinition.constraint [
             fhir:index 0 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ] ;
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.isSummary [ fhir:value "true"^^xsd:boolean ]
         ], [
           fhir:index 9 ;
           fhir:Element.id [ fhir:value "MedicationDispense.meta.security" ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.meta.security" ] ;
           fhir:ElementDefinition.short [ fhir:value "Security Labels applied to this resource" ] ;
           fhir:ElementDefinition.definition [ fhir:value "Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure." ] ;
           fhir:ElementDefinition.comment [ fhir:value "The security labels can be updated without changing the stated version of the resource. The list of security labels is a set. Uniqueness is based the system/code, and version and display are ignored." ] ;
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
           fhir:ElementDefinition.max [ fhir:value "*" ] ;
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "Meta.security" ] ;
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
             fhir:ElementDefinition.base.max [ fhir:value "*" ]
           ] ;
           fhir:ElementDefinition.type [
             fhir:index 0 ;
             fhir:ElementDefinition.type.code [ fhir:value "Coding" ]
           ] ;
           fhir:ElementDefinition.condition [
             fhir:value "ele-1" ;
             fhir:index 0
           ] ;
           fhir:ElementDefinition.constraint [
             fhir:index 0 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ] ;
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.isSummary [ fhir:value "true"^^xsd:boolean ] ;
           fhir:ElementDefinition.binding [
             fhir:Element.extension [
               fhir:index 0 ;
               fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName" ] ;
               fhir:Extension.valueString [ fhir:value "SecurityLabels" ]
             ] ;
             fhir:ElementDefinition.binding.strength [ fhir:value "extensible" ] ;
             fhir:ElementDefinition.binding.description [ fhir:value "Security Labels from the Healthcare Privacy and Security Classification System." ] ;
             fhir:ElementDefinition.binding.valueSet [
               fhir:value "http://hl7.org/fhir/ValueSet/security-labels" ;
               fhir:link <http://hl7.org/fhir/ValueSet/security-labels>
             ]
           ] ;
           fhir:ElementDefinition.mapping [
             fhir:index 0 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "n/a" ]
           ], [
             fhir:index 1 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "v2" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" ]
           ], [
             fhir:index 2 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "CV" ]
           ], [
             fhir:index 3 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "orim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "fhir:Coding rdfs:subClassOf dt:CDCoding" ]
           ]
         ], [
           fhir:index 10 ;
           fhir:Element.id [ fhir:value "MedicationDispense.meta.tag" ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.meta.tag" ] ;
           fhir:ElementDefinition.short [ fhir:value "Tags applied to this resource" ] ;
           fhir:ElementDefinition.definition [ fhir:value "Tags applied to this resource. Tags are intended to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource." ] ;
           fhir:ElementDefinition.comment [ fhir:value "The tags can be updated without changing the stated version of the resource. The list of tags is a set. Uniqueness is based the system/code, and version and display are ignored." ] ;
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
           fhir:ElementDefinition.max [ fhir:value "*" ] ;
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "Meta.tag" ] ;
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
             fhir:ElementDefinition.base.max [ fhir:value "*" ]
           ] ;
           fhir:ElementDefinition.type [
             fhir:index 0 ;
             fhir:ElementDefinition.type.code [ fhir:value "Coding" ]
           ] ;
           fhir:ElementDefinition.condition [
             fhir:value "ele-1" ;
             fhir:index 0
           ] ;
           fhir:ElementDefinition.constraint [
             fhir:index 0 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ] ;
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.isSummary [ fhir:value "true"^^xsd:boolean ] ;
           fhir:ElementDefinition.binding [
             fhir:Element.extension [
               fhir:index 0 ;
               fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName" ] ;
               fhir:Extension.valueString [ fhir:value "Tags" ]
             ] ;
             fhir:ElementDefinition.binding.strength [ fhir:value "example" ] ;
             fhir:ElementDefinition.binding.description [ fhir:value "Codes that represent various types of tags, commonly workflow-related; e.g. \"Needs review by Dr. Jones\"." ] ;
             fhir:ElementDefinition.binding.valueSet [
               fhir:value "http://hl7.org/fhir/ValueSet/common-tags" ;
               fhir:link <http://hl7.org/fhir/ValueSet/common-tags>
             ]
           ] ;
           fhir:ElementDefinition.mapping [
             fhir:index 0 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "n/a" ]
           ], [
             fhir:index 1 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "v2" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" ]
           ], [
             fhir:index 2 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "CV" ]
           ], [
             fhir:index 3 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "orim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "fhir:Coding rdfs:subClassOf dt:CDCoding" ]
           ]
         ], [
           fhir:index 11 ;
           fhir:Element.id [ fhir:value "MedicationDispense.implicitRules" ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.implicitRules" ] ;
           fhir:ElementDefinition.short [ fhir:value "A set of rules under which this content was created" ] ;
           fhir:ElementDefinition.definition [ fhir:value "A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc." ] ;
           fhir:ElementDefinition.comment [ fhir:value "Asserting this rule set restricts the content to be only understood by a limited set of trading partners. This inherently limits the usefulness of the data in the long term. However, the existing health eco-system is highly fractured, and not yet ready to define, collect, and exchange data in a generally computable sense. Wherever possible, implementers and/or specification writers should avoid using this element. Often, when used, the URL is a reference to an implementation guide that defines these special rules as part of it's narrative along with other profiles, value sets, etc." ] ;
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
           fhir:ElementDefinition.max [ fhir:value "1" ] ;
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "Resource.implicitRules" ] ;
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
             fhir:ElementDefinition.base.max [ fhir:value "1" ]
           ] ;
           fhir:ElementDefinition.type [
             fhir:index 0 ;
             fhir:ElementDefinition.type.code [ fhir:value "uri" ]
           ] ;
           fhir:ElementDefinition.constraint [
             fhir:index 0 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ] ;
           fhir:ElementDefinition.isModifier [ fhir:value "true"^^xsd:boolean ] ;
           fhir:ElementDefinition.isModifierReason [ fhir:value "This element is labeled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation" ] ;
           fhir:ElementDefinition.isSummary [ fhir:value "true"^^xsd:boolean ]
         ], [
           fhir:index 12 ;
           fhir:Element.id [ fhir:value "MedicationDispense.language" ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.language" ] ;
           fhir:ElementDefinition.short [ fhir:value "Language of the resource content" ] ;
           fhir:ElementDefinition.definition [ fhir:value "The base language in which the resource is written." ] ;
           fhir:ElementDefinition.comment [ fhir:value "Language is provided to support indexing and accessibility (typically, services such as text to speech use the language tag). The html language tag in the narrative applies  to the narrative. The language tag on the resource may be used to specify the language of other presentations generated from the data in the resource. Not all the content has to be in the base language. The Resource.language should not be assumed to apply to the narrative automatically. If a language is specified, it should it also be specified on the div element in the html (see rules in HTML5 for information about the relationship between xml:lang and the html lang attribute)." ] ;
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
           fhir:ElementDefinition.max [ fhir:value "1" ] ;
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "Resource.language" ] ;
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
             fhir:ElementDefinition.base.max [ fhir:value "1" ]
           ] ;
           fhir:ElementDefinition.type [
             fhir:index 0 ;
             fhir:ElementDefinition.type.code [ fhir:value "code" ]
           ] ;
           fhir:ElementDefinition.constraint [
             fhir:index 0 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ] ;
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.isSummary [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.binding [
             fhir:Element.extension [
               fhir:index 0 ;
               fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet" ] ;
               fhir:Extension.valueCanonical [
                 fhir:value "http://hl7.org/fhir/ValueSet/all-languages" ;
                 fhir:link <http://hl7.org/fhir/ValueSet/all-languages>
               ]
             ], [
               fhir:index 1 ;
               fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName" ] ;
               fhir:Extension.valueString [ fhir:value "Language" ]
             ] ;
             fhir:ElementDefinition.binding.strength [ fhir:value "preferred" ] ;
             fhir:ElementDefinition.binding.description [ fhir:value "A human language." ] ;
             fhir:ElementDefinition.binding.valueSet [
               fhir:value "http://hl7.org/fhir/ValueSet/languages" ;
               fhir:link <http://hl7.org/fhir/ValueSet/languages>
             ]
           ]
         ], [
           fhir:index 13 ;
           fhir:Element.id [ fhir:value "MedicationDispense.text" ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.text" ] ;
           fhir:ElementDefinition.short [ fhir:value "Text summary of the resource, for human interpretation" ] ;
           fhir:ElementDefinition.definition [ fhir:value "A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it \"clinically safe\" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety." ] ;
           fhir:ElementDefinition.comment [ fhir:value "Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative. In some cases, a resource may only have text with little or no additional discrete data (as long as all minOccurs=1 elements are satisfied).  This may be necessary for data from legacy systems where information is captured as a \"text blob\" or where text is additionally entered raw or narrated and encoded information is added later." ] ;
           fhir:ElementDefinition.alias [
             fhir:value "narrative" ;
             fhir:index 0
           ], [
             fhir:value "html" ;
             fhir:index 1
           ], [
             fhir:value "xhtml" ;
             fhir:index 2
           ], [
             fhir:value "display" ;
             fhir:index 3
           ] ;
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
           fhir:ElementDefinition.max [ fhir:value "1" ] ;
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "DomainResource.text" ] ;
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
             fhir:ElementDefinition.base.max [ fhir:value "1" ]
           ] ;
           fhir:ElementDefinition.type [
             fhir:index 0 ;
             fhir:ElementDefinition.type.code [ fhir:value "Narrative" ]
           ] ;
           fhir:ElementDefinition.constraint [
             fhir:index 0 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ] ;
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.isSummary [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.mapping [
             fhir:index 0 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "Act.text?" ]
           ]
         ], [
           fhir:index 14 ;
           fhir:Element.id [ fhir:value "MedicationDispense.contained" ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.contained" ] ;
           fhir:ElementDefinition.short [ fhir:value "Contained, inline Resources" ] ;
           fhir:ElementDefinition.definition [ fhir:value "These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope." ] ;
           fhir:ElementDefinition.comment [ fhir:value "This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again. Contained resources may have profiles and tags In their meta elements, but SHALL NOT have security labels." ] ;
           fhir:ElementDefinition.alias [
             fhir:value "inline resources" ;
             fhir:index 0
           ], [
             fhir:value "anonymous resources" ;
             fhir:index 1
           ], [
             fhir:value "contained resources" ;
             fhir:index 2
           ] ;
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
           fhir:ElementDefinition.max [ fhir:value "*" ] ;
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "DomainResource.contained" ] ;
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
             fhir:ElementDefinition.base.max [ fhir:value "*" ]
           ] ;
           fhir:ElementDefinition.type [
             fhir:index 0 ;
             fhir:ElementDefinition.type.code [ fhir:value "Resource" ]
           ] ;
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.isSummary [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.mapping [
             fhir:index 0 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "N/A" ]
           ]
         ], [
           fhir:index 15 ;
           fhir:Element.id [ fhir:value "MedicationDispense.extension" ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.extension" ] ;
           fhir:ElementDefinition.slicing [
             fhir:ElementDefinition.slicing.discriminator [
               fhir:index 0 ;
               fhir:ElementDefinition.slicing.discriminator.type [ fhir:value "value" ] ;
               fhir:ElementDefinition.slicing.discriminator.path [ fhir:value "url" ]
             ] ;
             fhir:ElementDefinition.slicing.description [ fhir:value "Extensions are always sliced by (at least) url" ] ;
             fhir:ElementDefinition.slicing.rules [ fhir:value "open" ]
           ] ;
           fhir:ElementDefinition.short [ fhir:value "Additional content defined by implementations" ] ;
           fhir:ElementDefinition.definition [ fhir:value "May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." ] ;
           fhir:ElementDefinition.comment [ fhir:value "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone." ] ;
           fhir:ElementDefinition.alias [
             fhir:value "extensions" ;
             fhir:index 0
           ], [
             fhir:value "user content" ;
             fhir:index 1
           ] ;
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
           fhir:ElementDefinition.max [ fhir:value "*" ] ;
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "DomainResource.extension" ] ;
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
             fhir:ElementDefinition.base.max [ fhir:value "*" ]
           ] ;
           fhir:ElementDefinition.type [
             fhir:index 0 ;
             fhir:ElementDefinition.type.code [ fhir:value "Extension" ]
           ] ;
           fhir:ElementDefinition.constraint [
             fhir:index 0 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ], [
             fhir:index 1 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ext-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "Must have either extensions or value[x], not both" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "extension.exists() != value.exists()" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Extension" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Extension>
             ]
           ] ;
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.isSummary [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.mapping [
             fhir:index 0 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "N/A" ]
           ]
         ], [
           fhir:index 16 ;
           fhir:Element.id [ fhir:value "MedicationDispense.extension:rxPrescriptionProcessIdentifier" ] ;
           fhir:Element.extension [
             fhir:index 0 ;
             fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status" ] ;
             fhir:Extension.valueCode [ fhir:value "normative" ]
           ], [
             fhir:index 1 ;
             fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version" ] ;
             fhir:Extension.valueCode [ fhir:value "4.0.0" ]
           ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.extension" ] ;
           fhir:ElementDefinition.sliceName [ fhir:value "rxPrescriptionProcessIdentifier" ] ;
           fhir:ElementDefinition.short [ fhir:value "Optional Extensions Element" ] ;
           fhir:ElementDefinition.definition [ fhir:value "This extension is used to track medication prescription transactions between the E-Rezept-Fachdienst and the ePA. The RxPrescriptionProcessIdentifier is generated by the ePA Medication Service and consists of the PrescriptionId and the authoredOn date of the operation parameters request. It ensures consistent referencing and management of medication-related resources across different systems." ] ;
           fhir:ElementDefinition.comment [ fhir:value "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone." ] ;
           fhir:ElementDefinition.alias [
             fhir:value "extensions" ;
             fhir:index 0
           ], [
             fhir:value "user content" ;
             fhir:index 1
           ] ;
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
           fhir:ElementDefinition.max [ fhir:value "1" ] ;
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "DomainResource.extension" ] ;
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
             fhir:ElementDefinition.base.max [ fhir:value "*" ]
           ] ;
           fhir:ElementDefinition.type [
             fhir:index 0 ;
             fhir:ElementDefinition.type.code [ fhir:value "Extension" ] ;
             fhir:ElementDefinition.type.profile [
               fhir:value "https://gematik.de/fhir/epa-medication/StructureDefinition/rx-prescription-process-identifier-extension" ;
               fhir:index 0 ;
               fhir:link <https://gematik.de/fhir/epa-medication/StructureDefinition/rx-prescription-process-identifier-extension>
             ]
           ] ;
           fhir:ElementDefinition.condition [
             fhir:value "ele-1" ;
             fhir:index 0
           ] ;
           fhir:ElementDefinition.constraint [
             fhir:index 0 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ], [
             fhir:index 1 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ext-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "Must have either extensions or value[x], not both" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "extension.exists() != value.exists()" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Extension" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Extension>
             ]
           ] ;
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.isSummary [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.mapping [
             fhir:index 0 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "N/A" ]
           ], [
             fhir:index 1 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "n/a" ]
           ]
         ], [
           fhir:index 17 ;
           fhir:Element.id [ fhir:value "MedicationDispense.extension:renderedDosageInstruction" ] ;
           fhir:Element.extension [
             fhir:index 0 ;
             fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status" ] ;
             fhir:Extension.valueCode [ fhir:value "normative" ]
           ], [
             fhir:index 1 ;
             fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version" ] ;
             fhir:Extension.valueCode [ fhir:value "4.0.0" ]
           ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.extension" ] ;
           fhir:ElementDefinition.sliceName [ fhir:value "renderedDosageInstruction" ] ;
           fhir:ElementDefinition.short [ fhir:value "Vollständige Darstellung der Dosierungsanweisungen (generiert aus den Dosage-Elementen)." ] ;
           fhir:ElementDefinition.definition [ fhir:value "Ein menschenlesbarer, vollständiger Text der Dosierungsanweisungen. Der Text wird aus den strukturierten Dosage-Elementen generiert und dient der patientensicheren Darstellung der Dosierung. Er soll die maschinenlesbaren Angaben konsistent wiedergeben und in einer für Patient:innen verständlichen Form bereitstellen." ] ;
           fhir:ElementDefinition.comment [ fhir:value "Element `MedicationDispense.renderedDosageInstruction` has a context of MedicationDispense based on following the parent source element upwards and mapping to `MedicationDispense`.\nElement `MedicationDispense.renderedDosageInstruction` has no mapping targets in FHIR R4. Typically, this is because the element has been added (is a new element).\nThe content of the renderedDosageInstructions must not be different than the dose represented in the dosageInstruction content." ] ;
           fhir:ElementDefinition.alias [
             fhir:value "extensions" ;
             fhir:index 0
           ], [
             fhir:value "user content" ;
             fhir:index 1
           ] ;
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
           fhir:ElementDefinition.max [ fhir:value "1" ] ;
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "DomainResource.extension" ] ;
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
             fhir:ElementDefinition.base.max [ fhir:value "*" ]
           ] ;
           fhir:ElementDefinition.type [
             fhir:index 0 ;
             fhir:ElementDefinition.type.code [ fhir:value "Extension" ] ;
             fhir:ElementDefinition.type.profile [
               fhir:value "http://hl7.org/fhir/5.0/StructureDefinition/extension-MedicationDispense.renderedDosageInstruction" ;
               fhir:index 0 ;
               fhir:link <http://hl7.org/fhir/5.0/StructureDefinition/extension-MedicationDispense.renderedDosageInstruction>
             ]
           ] ;
           fhir:ElementDefinition.condition [
             fhir:value "ele-1" ;
             fhir:index 0
           ] ;
           fhir:ElementDefinition.constraint [
             fhir:index 0 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ], [
             fhir:index 1 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ext-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "Must have either extensions or value[x], not both" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "extension.exists() != value.exists()" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Extension" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Extension>
             ]
           ] ;
           fhir:ElementDefinition.mustSupport [ fhir:value "true"^^xsd:boolean ] ;
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.isSummary [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.mapping [
             fhir:index 0 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "N/A" ]
           ], [
             fhir:index 1 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "n/a" ]
           ]
         ], [
           fhir:index 18 ;
           fhir:Element.id [ fhir:value "MedicationDispense.extension:renderedDosageInstruction.id" ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.extension.id" ] ;
           fhir:ElementDefinition.representation [
             fhir:value "xmlAttr" ;
             fhir:index 0
           ] ;
           fhir:ElementDefinition.short [ fhir:value "Unique id for inter-element referencing" ] ;
           fhir:ElementDefinition.definition [ fhir:value "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." ] ;
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
           fhir:ElementDefinition.max [ fhir:value "1" ] ;
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "Element.id" ] ;
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
             fhir:ElementDefinition.base.max [ fhir:value "1" ]
           ] ;
           fhir:ElementDefinition.type [
             fhir:index 0 ;
             fhir:Element.extension [
               fhir:index 0 ;
               fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type" ] ;
               fhir:Extension.valueUrl [ fhir:value "string" ]
             ] ;
             fhir:ElementDefinition.type.code [ fhir:value "http://hl7.org/fhirpath/System.String" ]
           ] ;
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.isSummary [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.mapping [
             fhir:index 0 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "n/a" ]
           ]
         ], [
           fhir:index 19 ;
           fhir:Element.id [ fhir:value "MedicationDispense.extension:renderedDosageInstruction.extension" ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.extension.extension" ] ;
           fhir:ElementDefinition.slicing [
             fhir:ElementDefinition.slicing.discriminator [
               fhir:index 0 ;
               fhir:ElementDefinition.slicing.discriminator.type [ fhir:value "value" ] ;
               fhir:ElementDefinition.slicing.discriminator.path [ fhir:value "url" ]
             ] ;
             fhir:ElementDefinition.slicing.description [ fhir:value "Extensions are always sliced by (at least) url" ] ;
             fhir:ElementDefinition.slicing.rules [ fhir:value "open" ]
           ] ;
           fhir:ElementDefinition.short [ fhir:value "Additional content defined by implementations" ] ;
           fhir:ElementDefinition.definition [ fhir:value "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." ] ;
           fhir:ElementDefinition.comment [ fhir:value "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone." ] ;
           fhir:ElementDefinition.alias [
             fhir:value "extensions" ;
             fhir:index 0
           ], [
             fhir:value "user content" ;
             fhir:index 1
           ] ;
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
           fhir:ElementDefinition.max [ fhir:value "0" ] ;
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "Element.extension" ] ;
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
             fhir:ElementDefinition.base.max [ fhir:value "*" ]
           ] ;
           fhir:ElementDefinition.type [
             fhir:index 0 ;
             fhir:ElementDefinition.type.code [ fhir:value "Extension" ]
           ] ;
           fhir:ElementDefinition.constraint [
             fhir:index 0 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ], [
             fhir:index 1 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ext-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "Must have either extensions or value[x], not both" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "extension.exists() != value.exists()" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Extension" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Extension>
             ]
           ] ;
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.isSummary [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.mapping [
             fhir:index 0 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "n/a" ]
           ]
         ], [
           fhir:index 20 ;
           fhir:Element.id [ fhir:value "MedicationDispense.extension:renderedDosageInstruction.url" ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.extension.url" ] ;
           fhir:ElementDefinition.representation [
             fhir:value "xmlAttr" ;
             fhir:index 0
           ] ;
           fhir:ElementDefinition.short [ fhir:value "identifies the meaning of the extension" ] ;
           fhir:ElementDefinition.definition [ fhir:value "Source of the definition for the extension code - a logical name or a URL." ] ;
           fhir:ElementDefinition.comment [ fhir:value "The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension." ] ;
           fhir:ElementDefinition.min [ fhir:value "1"^^xsd:nonNegativeInteger ] ;
           fhir:ElementDefinition.max [ fhir:value "1" ] ;
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "Extension.url" ] ;
             fhir:ElementDefinition.base.min [ fhir:value "1"^^xsd:nonNegativeInteger ] ;
             fhir:ElementDefinition.base.max [ fhir:value "1" ]
           ] ;
           fhir:ElementDefinition.type [
             fhir:index 0 ;
             fhir:Element.extension [
               fhir:index 0 ;
               fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type" ] ;
               fhir:Extension.valueUrl [ fhir:value "uri" ]
             ] ;
             fhir:ElementDefinition.type.code [ fhir:value "http://hl7.org/fhirpath/System.String" ]
           ] ;
           fhir:ElementDefinition.fixedUri [ fhir:value "http://hl7.org/fhir/5.0/StructureDefinition/extension-MedicationDispense.renderedDosageInstruction" ] ;
           fhir:ElementDefinition.mapping [
             fhir:index 0 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "N/A" ]
           ]
         ], [
           fhir:index 21 ;
           fhir:Element.id [ fhir:value "MedicationDispense.extension:renderedDosageInstruction.value[x]" ] ;
           fhir:Element.extension [
             fhir:index 0 ;
             fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status" ] ;
             fhir:Extension.valueCode [ fhir:value "normative" ]
           ], [
             fhir:index 1 ;
             fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version" ] ;
             fhir:Extension.valueCode [ fhir:value "4.0.0" ]
           ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.extension.value[x]" ] ;
           fhir:ElementDefinition.short [ fhir:value "Full representation of the dosage instructions" ] ;
           fhir:ElementDefinition.definition [ fhir:value "The full representation of the dose of the medication included in all dosage instructions.  To be used when multiple dosage instructions are included to represent complex dosing such as increasing or tapering doses." ] ;
           fhir:ElementDefinition.comment [ fhir:value "The content of the renderedDosageInstructions must not be different than the dose represented in the dosageInstruction content." ] ;
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
           fhir:ElementDefinition.max [ fhir:value "1" ] ;
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "Extension.value[x]" ] ;
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
             fhir:ElementDefinition.base.max [ fhir:value "1" ]
           ] ;
           fhir:ElementDefinition.type [
             fhir:index 0 ;
             fhir:ElementDefinition.type.code [ fhir:value "markdown" ]
           ] ;
           fhir:ElementDefinition.condition [
             fhir:value "ele-1" ;
             fhir:index 0
           ] ;
           fhir:ElementDefinition.constraint [
             fhir:index 0 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ] ;
           fhir:ElementDefinition.mustSupport [ fhir:value "true"^^xsd:boolean ] ;
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.mapping [
             fhir:index 0 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "n/a" ]
           ], [
             fhir:index 1 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "N/A" ]
           ]
         ], [
           fhir:index 22 ;
           fhir:Element.id [ fhir:value "MedicationDispense.extension:generatedDosageInstructionsMeta" ] ;
           fhir:Element.extension [
             fhir:index 0 ;
             fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status" ] ;
             fhir:Extension.valueCode [ fhir:value "normative" ]
           ], [
             fhir:index 1 ;
             fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version" ] ;
             fhir:Extension.valueCode [ fhir:value "4.0.0" ]
           ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.extension" ] ;
           fhir:ElementDefinition.sliceName [ fhir:value "generatedDosageInstructionsMeta" ] ;
           fhir:ElementDefinition.short [ fhir:value "Metadaten zu den generierten Dosierungsanweisungen" ] ;
           fhir:ElementDefinition.definition [ fhir:value "Diese Extension enthält zusätzliche Metadaten zu den automatisch generierten Dosierungsanweisungen, wie z.B. Informationen zur Generierung oder zum Ursprung der Daten." ] ;
           fhir:ElementDefinition.comment [ fhir:value "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone." ] ;
           fhir:ElementDefinition.alias [
             fhir:value "extensions" ;
             fhir:index 0
           ], [
             fhir:value "user content" ;
             fhir:index 1
           ] ;
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
           fhir:ElementDefinition.max [ fhir:value "1" ] ;
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "DomainResource.extension" ] ;
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
             fhir:ElementDefinition.base.max [ fhir:value "*" ]
           ] ;
           fhir:ElementDefinition.type [
             fhir:index 0 ;
             fhir:ElementDefinition.type.code [ fhir:value "Extension" ] ;
             fhir:ElementDefinition.type.profile [
               fhir:value "http://ig.fhir.de/igs/medication/StructureDefinition/GeneratedDosageInstructionsMeta" ;
               fhir:index 0 ;
               fhir:link <http://ig.fhir.de/igs/medication/StructureDefinition/GeneratedDosageInstructionsMeta>
             ]
           ] ;
           fhir:ElementDefinition.condition [
             fhir:value "ele-1" ;
             fhir:index 0
           ] ;
           fhir:ElementDefinition.constraint [
             fhir:index 0 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ], [
             fhir:index 1 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ext-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "Must have either extensions or value[x], not both" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "extension.exists() != value.exists()" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Extension" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Extension>
             ]
           ] ;
           fhir:ElementDefinition.mustSupport [ fhir:value "true"^^xsd:boolean ] ;
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.isSummary [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.mapping [
             fhir:index 0 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "N/A" ]
           ], [
             fhir:index 1 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "n/a" ]
           ]
         ], [
           fhir:index 23 ;
           fhir:Element.id [ fhir:value "MedicationDispense.modifierExtension" ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.modifierExtension" ] ;
           fhir:ElementDefinition.slicing [
             fhir:ElementDefinition.slicing.discriminator [
               fhir:index 0 ;
               fhir:ElementDefinition.slicing.discriminator.type [ fhir:value "value" ] ;
               fhir:ElementDefinition.slicing.discriminator.path [ fhir:value "url" ]
             ] ;
             fhir:ElementDefinition.slicing.description [ fhir:value "Extensions are always sliced by (at least) url" ] ;
             fhir:ElementDefinition.slicing.rules [ fhir:value "open" ]
           ] ;
           fhir:ElementDefinition.short [ fhir:value "Extensions that cannot be ignored" ] ;
           fhir:ElementDefinition.definition [ fhir:value "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)." ] ;
           fhir:ElementDefinition.comment [ fhir:value "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone." ] ;
           fhir:ElementDefinition.requirements [ fhir:value "Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored.  This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](http://hl7.org/fhir/R4/extensibility.html#modifierExtension)." ] ;
           fhir:ElementDefinition.alias [
             fhir:value "extensions" ;
             fhir:index 0
           ], [
             fhir:value "user content" ;
             fhir:index 1
           ] ;
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
           fhir:ElementDefinition.max [ fhir:value "*" ] ;
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "DomainResource.modifierExtension" ] ;
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
             fhir:ElementDefinition.base.max [ fhir:value "*" ]
           ] ;
           fhir:ElementDefinition.type [
             fhir:index 0 ;
             fhir:ElementDefinition.type.code [ fhir:value "Extension" ]
           ] ;
           fhir:ElementDefinition.constraint [
             fhir:index 0 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ], [
             fhir:index 1 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ext-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "Must have either extensions or value[x], not both" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "extension.exists() != value.exists()" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Extension" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Extension>
             ]
           ] ;
           fhir:ElementDefinition.isModifier [ fhir:value "true"^^xsd:boolean ] ;
           fhir:ElementDefinition.isModifierReason [ fhir:value "Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them" ] ;
           fhir:ElementDefinition.isSummary [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.mapping [
             fhir:index 0 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "N/A" ]
           ]
         ], [
           fhir:index 24 ;
           fhir:Element.id [ fhir:value "MedicationDispense.identifier" ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.identifier" ] ;
           fhir:ElementDefinition.slicing [
             fhir:ElementDefinition.slicing.discriminator [
               fhir:index 0 ;
               fhir:ElementDefinition.slicing.discriminator.type [ fhir:value "pattern" ] ;
               fhir:ElementDefinition.slicing.discriminator.path [ fhir:value "$this" ]
             ] ;
             fhir:ElementDefinition.slicing.ordered [ fhir:value "false"^^xsd:boolean ] ;
             fhir:ElementDefinition.slicing.rules [ fhir:value "open" ]
           ] ;
           fhir:ElementDefinition.short [ fhir:value "ePrescription identifier" ] ;
           fhir:ElementDefinition.definition [ fhir:value "Identifiers associated with this Medication Dispense that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate. They are business identifiers assigned to this resource by the performer or other systems and remain constant as the resource is updated and propagates from server to server." ] ;
           fhir:ElementDefinition.comment [ fhir:value "This is a business identifier, not a resource identifier." ] ;
           fhir:ElementDefinition.min [ fhir:value "1"^^xsd:nonNegativeInteger ] ;
           fhir:ElementDefinition.max [ fhir:value "*" ] ;
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "MedicationDispense.identifier" ] ;
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
             fhir:ElementDefinition.base.max [ fhir:value "*" ]
           ] ;
           fhir:ElementDefinition.type [
             fhir:index 0 ;
             fhir:ElementDefinition.type.code [ fhir:value "Identifier" ]
           ] ;
           fhir:ElementDefinition.condition [
             fhir:value "ele-1" ;
             fhir:index 0
           ] ;
           fhir:ElementDefinition.constraint [
             fhir:index 0 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ] ;
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.mapping [
             fhir:index 0 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "n/a" ]
           ], [
             fhir:index 1 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "v2" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "CX / EI (occasionally, more often EI maps to a resource id or a URL)" ]
           ], [
             fhir:index 2 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "II - The Identifier class is a little looser than the v3 type II because it allows URIs as well as registered OIDs or GUIDs.  Also maps to Role[classCode=IDENT]" ]
           ], [
             fhir:index 3 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "servd" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "Identifier" ]
           ], [
             fhir:index 4 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "workflow" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "Event.identifier" ]
           ], [
             fhir:index 5 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "w5" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "FiveWs.identifier" ]
           ], [
             fhir:index 6 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value ".id" ]
           ], [
             fhir:index 7 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rx-dispense-rmim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "CombinedMedicationDispense.id" ]
           ]
         ], [
           fhir:index 25 ;
           fhir:Element.id [ fhir:value "MedicationDispense.identifier:RxOriginatorProcessIdentifier" ] ;
           fhir:Element.extension [
             fhir:index 0 ;
             fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status" ] ;
             fhir:Extension.valueCode [ fhir:value "normative" ]
           ], [
             fhir:index 1 ;
             fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version" ] ;
             fhir:Extension.valueCode [ fhir:value "4.0.0" ]
           ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.identifier" ] ;
           fhir:ElementDefinition.sliceName [ fhir:value "RxOriginatorProcessIdentifier" ] ;
           fhir:ElementDefinition.short [ fhir:value "An identifier intended for computation" ] ;
           fhir:ElementDefinition.definition [ fhir:value "An identifier - identifies some entity uniquely and unambiguously. Typically this is used for business identifiers." ] ;
           fhir:ElementDefinition.comment [ fhir:value "This is a business identifier, not a resource identifier." ] ;
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
           fhir:ElementDefinition.max [ fhir:value "1" ] ;
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "MedicationDispense.identifier" ] ;
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
             fhir:ElementDefinition.base.max [ fhir:value "*" ]
           ] ;
           fhir:ElementDefinition.type [
             fhir:index 0 ;
             fhir:ElementDefinition.type.code [ fhir:value "Identifier" ] ;
             fhir:ElementDefinition.type.profile [
               fhir:value "https://gematik.de/fhir/epa-medication/StructureDefinition/rx-originator-process-identifier" ;
               fhir:index 0 ;
               fhir:link <https://gematik.de/fhir/epa-medication/StructureDefinition/rx-originator-process-identifier>
             ]
           ] ;
           fhir:ElementDefinition.patternIdentifier [
             fhir:Identifier.system [ fhir:value "https://gematik.de/fhir/epa-medication/sid/rx-originator-process-identifier" ]
           ] ;
           fhir:ElementDefinition.condition [
             fhir:value "ele-1" ;
             fhir:index 0
           ] ;
           fhir:ElementDefinition.constraint [
             fhir:index 0 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ] ;
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.mapping [
             fhir:index 0 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "n/a" ]
           ], [
             fhir:index 1 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "v2" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "CX / EI (occasionally, more often EI maps to a resource id or a URL)" ]
           ], [
             fhir:index 2 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "II - The Identifier class is a little looser than the v3 type II because it allows URIs as well as registered OIDs or GUIDs.  Also maps to Role[classCode=IDENT]" ]
           ], [
             fhir:index 3 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "servd" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "Identifier" ]
           ], [
             fhir:index 4 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "workflow" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "Event.identifier" ]
           ], [
             fhir:index 5 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "w5" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "FiveWs.identifier" ]
           ], [
             fhir:index 6 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value ".id" ]
           ], [
             fhir:index 7 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rx-dispense-rmim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "CombinedMedicationDispense.id" ]
           ]
         ], [
           fhir:index 26 ;
           fhir:Element.id [ fhir:value "MedicationDispense.identifier:prescriptionID" ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.identifier" ] ;
           fhir:ElementDefinition.sliceName [ fhir:value "prescriptionID" ] ;
           fhir:ElementDefinition.short [ fhir:value "External identifier" ] ;
           fhir:ElementDefinition.definition [ fhir:value "Identifiers associated with this Medication Dispense that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate. They are business identifiers assigned to this resource by the performer or other systems and remain constant as the resource is updated and propagates from server to server." ] ;
           fhir:ElementDefinition.comment [ fhir:value "This is a business identifier, not a resource identifier." ] ;
           fhir:ElementDefinition.min [ fhir:value "1"^^xsd:nonNegativeInteger ] ;
           fhir:ElementDefinition.max [ fhir:value "1" ] ;
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "MedicationDispense.identifier" ] ;
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
             fhir:ElementDefinition.base.max [ fhir:value "*" ]
           ] ;
           fhir:ElementDefinition.type [
             fhir:index 0 ;
             fhir:ElementDefinition.type.code [ fhir:value "Identifier" ] ;
             fhir:ElementDefinition.type.profile [
               fhir:value "https://gematik.de/fhir/ti/StructureDefinition/e-prescription-id" ;
               fhir:index 0 ;
               fhir:link <https://gematik.de/fhir/ti/StructureDefinition/e-prescription-id>
             ]
           ] ;
           fhir:ElementDefinition.patternIdentifier [
             fhir:Identifier.system [ fhir:value "https://gematik.de/fhir/erp/NamingSystem/GEM_ERP_NS_PrescriptionId" ]
           ] ;
           fhir:ElementDefinition.condition [
             fhir:value "ele-1" ;
             fhir:index 0
           ] ;
           fhir:ElementDefinition.constraint [
             fhir:index 0 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ] ;
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.mapping [
             fhir:index 0 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "n/a" ]
           ], [
             fhir:index 1 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "v2" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "CX / EI (occasionally, more often EI maps to a resource id or a URL)" ]
           ], [
             fhir:index 2 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "II - The Identifier class is a little looser than the v3 type II because it allows URIs as well as registered OIDs or GUIDs.  Also maps to Role[classCode=IDENT]" ]
           ], [
             fhir:index 3 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "servd" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "Identifier" ]
           ], [
             fhir:index 4 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "workflow" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "Event.identifier" ]
           ], [
             fhir:index 5 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "w5" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "FiveWs.identifier" ]
           ], [
             fhir:index 6 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value ".id" ]
           ], [
             fhir:index 7 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rx-dispense-rmim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "CombinedMedicationDispense.id" ]
           ]
         ], [
           fhir:index 27 ;
           fhir:Element.id [ fhir:value "MedicationDispense.partOf" ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.partOf" ] ;
           fhir:ElementDefinition.short [ fhir:value "Event that dispense is part of" ] ;
           fhir:ElementDefinition.definition [ fhir:value "The procedure that trigger the dispense." ] ;
           fhir:ElementDefinition.comment [ fhir:value "References SHALL be a reference to an actual FHIR resource, and SHALL be resolveable (allowing for access control, temporary unavailability, etc.). Resolution can be either by retrieval from the URL, or, where applicable by resource type, by treating an absolute reference as a canonical URL and looking it up in a local registry/repository." ] ;
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
           fhir:ElementDefinition.max [ fhir:value "*" ] ;
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "MedicationDispense.partOf" ] ;
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
             fhir:ElementDefinition.base.max [ fhir:value "*" ]
           ] ;
           fhir:ElementDefinition.type [
             fhir:index 0 ;
             fhir:ElementDefinition.type.code [ fhir:value "Reference" ] ;
             fhir:ElementDefinition.type.targetProfile [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Procedure" ;
               fhir:index 0 ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Procedure>
             ]
           ] ;
           fhir:ElementDefinition.condition [
             fhir:value "ele-1" ;
             fhir:index 0
           ] ;
           fhir:ElementDefinition.constraint [
             fhir:index 0 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ], [
             fhir:index 1 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ref-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "SHALL have a contained resource if a local reference is provided" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Reference" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Reference>
             ]
           ] ;
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.mapping [
             fhir:index 0 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "n/a" ]
           ], [
             fhir:index 1 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "The target of a resource reference is a RIM entry point (Act, Role, or Entity)" ]
           ], [
             fhir:index 2 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "workflow" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "Event.partOf" ]
           ], [
             fhir:index 3 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value ".outboundRelationship[typeCode=COMP]/target[classCode=PROC,moodCode=EVN]" ]
           ]
         ], [
           fhir:index 28 ;
           fhir:Element.id [ fhir:value "MedicationDispense.status" ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.status" ] ;
           fhir:ElementDefinition.short [ fhir:value "completed" ] ;
           fhir:ElementDefinition.definition [ fhir:value "A code specifying the state of the set of dispense events." ] ;
           fhir:ElementDefinition.comment [ fhir:value "This element is labeled as a modifier because the status contains codes that mark the resource as not currently valid." ] ;
           fhir:ElementDefinition.min [ fhir:value "1"^^xsd:nonNegativeInteger ] ;
           fhir:ElementDefinition.max [ fhir:value "1" ] ;
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "MedicationDispense.status" ] ;
             fhir:ElementDefinition.base.min [ fhir:value "1"^^xsd:nonNegativeInteger ] ;
             fhir:ElementDefinition.base.max [ fhir:value "1" ]
           ] ;
           fhir:ElementDefinition.type [
             fhir:index 0 ;
             fhir:ElementDefinition.type.code [ fhir:value "code" ]
           ] ;
           fhir:ElementDefinition.fixedCode [ fhir:value "completed" ] ;
           fhir:ElementDefinition.constraint [
             fhir:index 0 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ] ;
           fhir:ElementDefinition.mustSupport [ fhir:value "true"^^xsd:boolean ] ;
           fhir:ElementDefinition.isModifier [ fhir:value "true"^^xsd:boolean ] ;
           fhir:ElementDefinition.isModifierReason [ fhir:value "This element is labelled as a modifier because it is a status element that contains status entered-in-error which means that the resource should not be treated as valid" ] ;
           fhir:ElementDefinition.isSummary [ fhir:value "true"^^xsd:boolean ] ;
           fhir:ElementDefinition.binding [
             fhir:Element.extension [
               fhir:index 0 ;
               fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName" ] ;
               fhir:Extension.valueString [ fhir:value "MedicationDispenseStatus" ]
             ] ;
             fhir:ElementDefinition.binding.strength [ fhir:value "required" ] ;
             fhir:ElementDefinition.binding.description [ fhir:value "A coded concept specifying the state of the dispense event." ] ;
             fhir:ElementDefinition.binding.valueSet [
               fhir:value "https://gematik.de/fhir/terminology/ValueSet/ti-medication-dispense-status-vs" ;
               fhir:link <https://gematik.de/fhir/terminology/ValueSet/ti-medication-dispense-status-vs>
             ]
           ] ;
           fhir:ElementDefinition.mapping [
             fhir:index 0 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "workflow" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "Event.status" ]
           ], [
             fhir:index 1 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "w5" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "FiveWs.status" ]
           ], [
             fhir:index 2 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value ".statusCode" ]
           ], [
             fhir:index 3 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rx-dispense-rmim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "CombinedMedicationDispense.SupplyEvent.statusCode" ]
           ]
         ], [
           fhir:index 29 ;
           fhir:Element.id [ fhir:value "MedicationDispense.statusReason[x]" ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.statusReason[x]" ] ;
           fhir:ElementDefinition.short [ fhir:value "Why a dispense was not performed" ] ;
           fhir:ElementDefinition.definition [ fhir:value "Indicates the reason why a dispense was not performed." ] ;
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
           fhir:ElementDefinition.max [ fhir:value "1" ] ;
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "MedicationDispense.statusReason[x]" ] ;
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
             fhir:ElementDefinition.base.max [ fhir:value "1" ]
           ] ;
           fhir:ElementDefinition.type [
             fhir:index 0 ;
             fhir:ElementDefinition.type.code [ fhir:value "CodeableConcept" ]
           ], [
             fhir:index 1 ;
             fhir:ElementDefinition.type.code [ fhir:value "Reference" ] ;
             fhir:ElementDefinition.type.targetProfile [
               fhir:value "http://hl7.org/fhir/StructureDefinition/DetectedIssue" ;
               fhir:index 0 ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/DetectedIssue>
             ]
           ] ;
           fhir:ElementDefinition.condition [
             fhir:value "ele-1" ;
             fhir:index 0
           ] ;
           fhir:ElementDefinition.constraint [
             fhir:index 0 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ] ;
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.binding [
             fhir:Element.extension [
               fhir:index 0 ;
               fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName" ] ;
               fhir:Extension.valueString [ fhir:value "MedicationDispenseStatusReason" ]
             ] ;
             fhir:ElementDefinition.binding.strength [ fhir:value "example" ] ;
             fhir:ElementDefinition.binding.description [ fhir:value "A code describing why a dispense was not performed." ] ;
             fhir:ElementDefinition.binding.valueSet [
               fhir:value "http://hl7.org/fhir/ValueSet/medicationdispense-status-reason" ;
               fhir:link <http://hl7.org/fhir/ValueSet/medicationdispense-status-reason>
             ]
           ] ;
           fhir:ElementDefinition.mapping [
             fhir:index 0 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "n/a" ]
           ], [
             fhir:index 1 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "workflow" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "Event.statusReason" ]
           ], [
             fhir:index 2 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value ".outboundRelationship[typeCode=RSON]/target[classCode=OBS,moodCode=EVN, code=\"not done reason\"].value" ]
           ]
         ], [
           fhir:index 30 ;
           fhir:Element.id [ fhir:value "MedicationDispense.category" ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.category" ] ;
           fhir:ElementDefinition.short [ fhir:value "Fehlender oder nicht vorhandener Wert weist auf eine Abgabe mit Verschreibung hin." ] ;
           fhir:ElementDefinition.definition [ fhir:value "Indicates the type of medication dispense (for example, where the medication is expected to be consumed or administered (i.e. inpatient or outpatient))." ] ;
           fhir:ElementDefinition.comment [ fhir:value "The category can be used to include where the medication is expected to be consumed or other types of dispenses.  Invariants can be used to bind to different value sets when profiling to bind." ] ;
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
           fhir:ElementDefinition.max [ fhir:value "1" ] ;
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "MedicationDispense.category" ] ;
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
             fhir:ElementDefinition.base.max [ fhir:value "1" ]
           ] ;
           fhir:ElementDefinition.type [
             fhir:index 0 ;
             fhir:ElementDefinition.type.code [ fhir:value "CodeableConcept" ]
           ] ;
           fhir:ElementDefinition.condition [
             fhir:value "ele-1" ;
             fhir:index 0
           ] ;
           fhir:ElementDefinition.constraint [
             fhir:index 0 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ] ;
           fhir:ElementDefinition.mustSupport [ fhir:value "true"^^xsd:boolean ] ;
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.binding [
             fhir:Element.extension [
               fhir:index 0 ;
               fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName" ] ;
               fhir:Extension.valueString [ fhir:value "MedicationDispenseCategory" ]
             ] ;
             fhir:ElementDefinition.binding.strength [ fhir:value "required" ] ;
             fhir:ElementDefinition.binding.description [ fhir:value "Definiert den Kontext einer Abgabe: mit oder ohne ärztliche Verschreibung." ] ;
             fhir:ElementDefinition.binding.valueSet [
               fhir:value "https://gematik.de/fhir/terminology/ValueSet/ti-medication-dispense-category-vs" ;
               fhir:link <https://gematik.de/fhir/terminology/ValueSet/ti-medication-dispense-category-vs>
             ]
           ] ;
           fhir:ElementDefinition.mapping [
             fhir:index 0 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "n/a" ]
           ], [
             fhir:index 1 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "v2" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "CE/CNE/CWE" ]
           ], [
             fhir:index 2 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "CD" ]
           ], [
             fhir:index 3 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "orim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "fhir:CodeableConcept rdfs:subClassOf dt:CD" ]
           ], [
             fhir:index 4 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value ".inboundRelationship[typeCode=COMP].source[classCode=OBS, moodCode=EVN, code=\"type of medication dispense\"].value" ]
           ]
         ], [
           fhir:index 31 ;
           fhir:Element.id [ fhir:value "MedicationDispense.medication[x]" ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.medication[x]" ] ;
           fhir:ElementDefinition.short [ fhir:value "What medication was supplied" ] ;
           fhir:ElementDefinition.definition [ fhir:value "The MedicationDispense references a medication which was dispensed" ] ;
           fhir:ElementDefinition.comment [ fhir:value "If only a code is specified, then it needs to be a code for a specific product. If more information is required, then the use of the medication resource is recommended.  For example, if you require form or lot number, then you must reference the Medication resource." ] ;
           fhir:ElementDefinition.min [ fhir:value "1"^^xsd:nonNegativeInteger ] ;
           fhir:ElementDefinition.max [ fhir:value "1" ] ;
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "MedicationDispense.medication[x]" ] ;
             fhir:ElementDefinition.base.min [ fhir:value "1"^^xsd:nonNegativeInteger ] ;
             fhir:ElementDefinition.base.max [ fhir:value "1" ]
           ] ;
           fhir:ElementDefinition.type [
             fhir:index 0 ;
             fhir:ElementDefinition.type.code [ fhir:value "Reference" ] ;
             fhir:ElementDefinition.type.targetProfile [
               fhir:value "https://gematik.de/fhir/tiflow-xborder/StructureDefinition/GEM-ERPEU-PR-Medication" ;
               fhir:index 0 ;
               fhir:link <https://gematik.de/fhir/tiflow-xborder/StructureDefinition/GEM-ERPEU-PR-Medication>
             ]
           ] ;
           fhir:ElementDefinition.condition [
             fhir:value "ele-1" ;
             fhir:index 0
           ] ;
           fhir:ElementDefinition.constraint [
             fhir:index 0 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ] ;
           fhir:ElementDefinition.mustSupport [ fhir:value "true"^^xsd:boolean ] ;
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.isSummary [ fhir:value "true"^^xsd:boolean ] ;
           fhir:ElementDefinition.mapping [
             fhir:index 0 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "n/a" ]
           ], [
             fhir:index 1 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "workflow" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "Event.code" ]
           ], [
             fhir:index 2 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "w5" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "FiveWs.what[x]" ]
           ], [
             fhir:index 3 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "v2" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "RXD-2-Dispense/Give Code" ]
           ], [
             fhir:index 4 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value ".participation[typeCode=PRD].role" ]
           ], [
             fhir:index 5 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rx-dispense-rmim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "CombinedMedicationRequest.component1.AdministrationRequest.consumable" ]
           ]
         ], [
           fhir:index 32 ;
           fhir:Element.id [ fhir:value "MedicationDispense.subject" ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.subject" ] ;
           fhir:ElementDefinition.short [ fhir:value "Who the dispense is for" ] ;
           fhir:ElementDefinition.definition [ fhir:value "A link to a resource representing the person or the group to whom the medication will be given." ] ;
           fhir:ElementDefinition.comment [ fhir:value "SubstanceAdministration->subject->Patient." ] ;
           fhir:ElementDefinition.min [ fhir:value "1"^^xsd:nonNegativeInteger ] ;
           fhir:ElementDefinition.max [ fhir:value "1" ] ;
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "MedicationDispense.subject" ] ;
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
             fhir:ElementDefinition.base.max [ fhir:value "1" ]
           ] ;
           fhir:ElementDefinition.type [
             fhir:index 0 ;
             fhir:ElementDefinition.type.code [ fhir:value "Reference" ] ;
             fhir:ElementDefinition.type.targetProfile [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Patient" ;
               fhir:index 0 ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Patient>
             ]
           ] ;
           fhir:ElementDefinition.condition [
             fhir:value "ele-1" ;
             fhir:index 0
           ] ;
           fhir:ElementDefinition.constraint [
             fhir:index 0 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ], [
             fhir:index 1 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ref-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "SHALL have a contained resource if a local reference is provided" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Reference" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Reference>
             ]
           ] ;
           fhir:ElementDefinition.mustSupport [ fhir:value "true"^^xsd:boolean ] ;
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.isSummary [ fhir:value "true"^^xsd:boolean ] ;
           fhir:ElementDefinition.mapping [
             fhir:index 0 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "n/a" ]
           ], [
             fhir:index 1 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "The target of a resource reference is a RIM entry point (Act, Role, or Entity)" ]
           ], [
             fhir:index 2 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "workflow" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "Event.subject" ]
           ], [
             fhir:index 3 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "w5" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "FiveWs.subject[x]" ]
           ], [
             fhir:index 4 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "v2" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "PID-3-Patient ID List" ]
           ], [
             fhir:index 5 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value ".participation[typeCode=SBJ].role[classCode=PAT]" ]
           ], [
             fhir:index 6 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "w5" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "FiveWs.subject" ]
           ]
         ], [
           fhir:index 33 ;
           fhir:Element.id [ fhir:value "MedicationDispense.subject.id" ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.subject.id" ] ;
           fhir:ElementDefinition.representation [
             fhir:value "xmlAttr" ;
             fhir:index 0
           ] ;
           fhir:ElementDefinition.short [ fhir:value "Unique id for inter-element referencing" ] ;
           fhir:ElementDefinition.definition [ fhir:value "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." ] ;
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
           fhir:ElementDefinition.max [ fhir:value "1" ] ;
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "Element.id" ] ;
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
             fhir:ElementDefinition.base.max [ fhir:value "1" ]
           ] ;
           fhir:ElementDefinition.type [
             fhir:index 0 ;
             fhir:Element.extension [
               fhir:index 0 ;
               fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type" ] ;
               fhir:Extension.valueUrl [ fhir:value "string" ]
             ] ;
             fhir:ElementDefinition.type.code [ fhir:value "http://hl7.org/fhirpath/System.String" ]
           ] ;
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.isSummary [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.mapping [
             fhir:index 0 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "n/a" ]
           ]
         ], [
           fhir:index 34 ;
           fhir:Element.id [ fhir:value "MedicationDispense.subject.extension" ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.subject.extension" ] ;
           fhir:ElementDefinition.slicing [
             fhir:ElementDefinition.slicing.discriminator [
               fhir:index 0 ;
               fhir:ElementDefinition.slicing.discriminator.type [ fhir:value "value" ] ;
               fhir:ElementDefinition.slicing.discriminator.path [ fhir:value "url" ]
             ] ;
             fhir:ElementDefinition.slicing.description [ fhir:value "Extensions are always sliced by (at least) url" ] ;
             fhir:ElementDefinition.slicing.rules [ fhir:value "open" ]
           ] ;
           fhir:ElementDefinition.short [ fhir:value "Additional content defined by implementations" ] ;
           fhir:ElementDefinition.definition [ fhir:value "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." ] ;
           fhir:ElementDefinition.comment [ fhir:value "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone." ] ;
           fhir:ElementDefinition.alias [
             fhir:value "extensions" ;
             fhir:index 0
           ], [
             fhir:value "user content" ;
             fhir:index 1
           ] ;
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
           fhir:ElementDefinition.max [ fhir:value "*" ] ;
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "Element.extension" ] ;
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
             fhir:ElementDefinition.base.max [ fhir:value "*" ]
           ] ;
           fhir:ElementDefinition.type [
             fhir:index 0 ;
             fhir:ElementDefinition.type.code [ fhir:value "Extension" ]
           ] ;
           fhir:ElementDefinition.constraint [
             fhir:index 0 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ], [
             fhir:index 1 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ext-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "Must have either extensions or value[x], not both" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "extension.exists() != value.exists()" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Extension" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Extension>
             ]
           ] ;
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.isSummary [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.mapping [
             fhir:index 0 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "n/a" ]
           ]
         ], [
           fhir:index 35 ;
           fhir:Element.id [ fhir:value "MedicationDispense.subject.reference" ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.subject.reference" ] ;
           fhir:ElementDefinition.short [ fhir:value "Literal reference, Relative, internal or absolute URL" ] ;
           fhir:ElementDefinition.definition [ fhir:value "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources." ] ;
           fhir:ElementDefinition.comment [ fhir:value "Using absolute URLs provides a stable scalable approach suitable for a cloud/web context, while using relative/logical references provides a flexible approach suitable for use when trading across closed eco-system boundaries.   Absolute URLs do not need to point to a FHIR RESTful server, though this is the preferred approach. If the URL conforms to the structure \"/[type]/[id]\" then it should be assumed that the reference is to a FHIR RESTful server." ] ;
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
           fhir:ElementDefinition.max [ fhir:value "1" ] ;
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "Reference.reference" ] ;
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
             fhir:ElementDefinition.base.max [ fhir:value "1" ]
           ] ;
           fhir:ElementDefinition.type [
             fhir:index 0 ;
             fhir:ElementDefinition.type.code [ fhir:value "string" ]
           ] ;
           fhir:ElementDefinition.condition [
             fhir:value "ref-1" ;
             fhir:index 0
           ] ;
           fhir:ElementDefinition.constraint [
             fhir:index 0 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ] ;
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.isSummary [ fhir:value "true"^^xsd:boolean ] ;
           fhir:ElementDefinition.mapping [
             fhir:index 0 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "N/A" ]
           ]
         ], [
           fhir:index 36 ;
           fhir:Element.id [ fhir:value "MedicationDispense.subject.type" ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.subject.type" ] ;
           fhir:ElementDefinition.short [ fhir:value "Type the reference refers to (e.g. \"Patient\")" ] ;
           fhir:ElementDefinition.definition [ fhir:value "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources)." ] ;
           fhir:ElementDefinition.comment [ fhir:value "This element is used to indicate the type of  the target of the reference. This may be used which ever of the other elements are populated (or not). In some cases, the type of the target may be determined by inspection of the reference (e.g. a RESTful URL) or by resolving the target of the reference; if both the type and a reference is provided, the reference SHALL resolve to a resource of the same type as that specified." ] ;
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
           fhir:ElementDefinition.max [ fhir:value "1" ] ;
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "Reference.type" ] ;
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
             fhir:ElementDefinition.base.max [ fhir:value "1" ]
           ] ;
           fhir:ElementDefinition.type [
             fhir:index 0 ;
             fhir:ElementDefinition.type.code [ fhir:value "uri" ]
           ] ;
           fhir:ElementDefinition.constraint [
             fhir:index 0 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ] ;
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.isSummary [ fhir:value "true"^^xsd:boolean ] ;
           fhir:ElementDefinition.binding [
             fhir:Element.extension [
               fhir:index 0 ;
               fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName" ] ;
               fhir:Extension.valueString [ fhir:value "FHIRResourceTypeExt" ]
             ] ;
             fhir:ElementDefinition.binding.strength [ fhir:value "extensible" ] ;
             fhir:ElementDefinition.binding.description [ fhir:value "Aa resource (or, for logical models, the URI of the logical model)." ] ;
             fhir:ElementDefinition.binding.valueSet [
               fhir:value "http://hl7.org/fhir/ValueSet/resource-types" ;
               fhir:link <http://hl7.org/fhir/ValueSet/resource-types>
             ]
           ] ;
           fhir:ElementDefinition.mapping [
             fhir:index 0 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "N/A" ]
           ]
         ], [
           fhir:index 37 ;
           fhir:Element.id [ fhir:value "MedicationDispense.subject.identifier" ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.subject.identifier" ] ;
           fhir:ElementDefinition.short [ fhir:value "An identifier intended for computation" ] ;
           fhir:ElementDefinition.definition [ fhir:value "An identifier - identifies some entity uniquely and unambiguously. Typically this is used for business identifiers." ] ;
           fhir:ElementDefinition.comment [ fhir:value "When an identifier is provided in place of a reference, any system processing the reference will only be able to resolve the identifier to a reference if it understands the business context in which the identifier is used. Sometimes this is global (e.g. a national identifier) but often it is not. For this reason, none of the useful mechanisms described for working with references (e.g. chaining, includes) are possible, nor should servers be expected to be able resolve the reference. Servers may accept an identifier based reference untouched, resolve it, and/or reject it - see CapabilityStatement.rest.resource.referencePolicy. \n\nWhen both an identifier and a literal reference are provided, the literal reference is preferred. Applications processing the resource are allowed - but not required - to check that the identifier matches the literal reference\n\nApplications converting a logical reference to a literal reference may choose to leave the logical reference present, or remove it.\n\nReference is intended to point to a structure that can potentially be expressed as a FHIR resource, though there is no need for it to exist as an actual FHIR resource instance - except in as much as an application wishes to actual find the target of the reference. The content referred to be the identifier must meet the logical constraints implied by any limitations on what resource types are permitted for the reference.  For example, it would not be legitimate to send the identifier for a drug prescription if the type were Reference(Observation|DiagnosticReport).  One of the use-cases for Reference.identifier is the situation where no FHIR representation exists (where the type is Reference (Any)." ] ;
           fhir:ElementDefinition.min [ fhir:value "1"^^xsd:nonNegativeInteger ] ;
           fhir:ElementDefinition.max [ fhir:value "1" ] ;
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "Reference.identifier" ] ;
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
             fhir:ElementDefinition.base.max [ fhir:value "1" ]
           ] ;
           fhir:ElementDefinition.type [
             fhir:index 0 ;
             fhir:ElementDefinition.type.code [ fhir:value "Identifier" ] ;
             fhir:ElementDefinition.type.profile [
               fhir:value "http://fhir.de/StructureDefinition/identifier-kvid-10" ;
               fhir:index 0 ;
               fhir:link <http://fhir.de/StructureDefinition/identifier-kvid-10>
             ]
           ] ;
           fhir:ElementDefinition.condition [
             fhir:value "ele-1" ;
             fhir:index 0
           ] ;
           fhir:ElementDefinition.constraint [
             fhir:index 0 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ] ;
           fhir:ElementDefinition.mustSupport [ fhir:value "true"^^xsd:boolean ] ;
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.isSummary [ fhir:value "true"^^xsd:boolean ] ;
           fhir:ElementDefinition.mapping [
             fhir:index 0 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "n/a" ]
           ], [
             fhir:index 1 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "v2" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "CX / EI (occasionally, more often EI maps to a resource id or a URL)" ]
           ], [
             fhir:index 2 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "II - The Identifier class is a little looser than the v3 type II because it allows URIs as well as registered OIDs or GUIDs.  Also maps to Role[classCode=IDENT]" ]
           ], [
             fhir:index 3 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "servd" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "Identifier" ]
           ], [
             fhir:index 4 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value ".identifier" ]
           ]
         ], [
           fhir:index 38 ;
           fhir:Element.id [ fhir:value "MedicationDispense.subject.display" ] ;
           fhir:Element.extension [
             fhir:index 0 ;
             fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable" ] ;
             fhir:Extension.valueBoolean [ fhir:value "true"^^xsd:boolean ]
           ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.subject.display" ] ;
           fhir:ElementDefinition.short [ fhir:value "Text alternative for the resource" ] ;
           fhir:ElementDefinition.definition [ fhir:value "Plain text narrative that identifies the resource in addition to the resource reference." ] ;
           fhir:ElementDefinition.comment [ fhir:value "This is generally not the same as the Resource.text of the referenced resource.  The purpose is to identify what's being referenced, not to fully describe it." ] ;
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
           fhir:ElementDefinition.max [ fhir:value "1" ] ;
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "Reference.display" ] ;
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
             fhir:ElementDefinition.base.max [ fhir:value "1" ]
           ] ;
           fhir:ElementDefinition.type [
             fhir:index 0 ;
             fhir:ElementDefinition.type.code [ fhir:value "string" ]
           ] ;
           fhir:ElementDefinition.constraint [
             fhir:index 0 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ] ;
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.isSummary [ fhir:value "true"^^xsd:boolean ] ;
           fhir:ElementDefinition.mapping [
             fhir:index 0 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "N/A" ]
           ]
         ], [
           fhir:index 39 ;
           fhir:Element.id [ fhir:value "MedicationDispense.context" ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.context" ] ;
           fhir:ElementDefinition.short [ fhir:value "Encounter / Episode associated with event" ] ;
           fhir:ElementDefinition.definition [ fhir:value "The encounter or episode of care that establishes the context for this event." ] ;
           fhir:ElementDefinition.comment [ fhir:value "References SHALL be a reference to an actual FHIR resource, and SHALL be resolveable (allowing for access control, temporary unavailability, etc.). Resolution can be either by retrieval from the URL, or, where applicable by resource type, by treating an absolute reference as a canonical URL and looking it up in a local registry/repository." ] ;
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
           fhir:ElementDefinition.max [ fhir:value "1" ] ;
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "MedicationDispense.context" ] ;
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
             fhir:ElementDefinition.base.max [ fhir:value "1" ]
           ] ;
           fhir:ElementDefinition.type [
             fhir:index 0 ;
             fhir:ElementDefinition.type.code [ fhir:value "Reference" ] ;
             fhir:ElementDefinition.type.targetProfile [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Encounter" ;
               fhir:index 0 ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Encounter>
             ], [
               fhir:value "http://hl7.org/fhir/StructureDefinition/EpisodeOfCare" ;
               fhir:index 1 ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/EpisodeOfCare>
             ]
           ] ;
           fhir:ElementDefinition.condition [
             fhir:value "ele-1" ;
             fhir:index 0
           ] ;
           fhir:ElementDefinition.constraint [
             fhir:index 0 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ], [
             fhir:index 1 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ref-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "SHALL have a contained resource if a local reference is provided" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Reference" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Reference>
             ]
           ] ;
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.mapping [
             fhir:index 0 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "n/a" ]
           ], [
             fhir:index 1 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "The target of a resource reference is a RIM entry point (Act, Role, or Entity)" ]
           ], [
             fhir:index 2 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "workflow" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "Event.context" ]
           ], [
             fhir:index 3 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value ".inboundRelationship[typeCode=COMP].source[classCode=ENC, moodCode=EVN, code=\"type of encounter or episode\"]" ]
           ]
         ], [
           fhir:index 40 ;
           fhir:Element.id [ fhir:value "MedicationDispense.supportingInformation" ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.supportingInformation" ] ;
           fhir:ElementDefinition.short [ fhir:value "Information that supports the dispensing of the medication" ] ;
           fhir:ElementDefinition.definition [ fhir:value "Additional information that supports the medication being dispensed." ] ;
           fhir:ElementDefinition.comment [ fhir:value "References SHALL be a reference to an actual FHIR resource, and SHALL be resolveable (allowing for access control, temporary unavailability, etc.). Resolution can be either by retrieval from the URL, or, where applicable by resource type, by treating an absolute reference as a canonical URL and looking it up in a local registry/repository." ] ;
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
           fhir:ElementDefinition.max [ fhir:value "*" ] ;
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "MedicationDispense.supportingInformation" ] ;
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
             fhir:ElementDefinition.base.max [ fhir:value "*" ]
           ] ;
           fhir:ElementDefinition.type [
             fhir:index 0 ;
             fhir:ElementDefinition.type.code [ fhir:value "Reference" ] ;
             fhir:ElementDefinition.type.targetProfile [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Resource" ;
               fhir:index 0 ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Resource>
             ]
           ] ;
           fhir:ElementDefinition.condition [
             fhir:value "ele-1" ;
             fhir:index 0
           ] ;
           fhir:ElementDefinition.constraint [
             fhir:index 0 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ], [
             fhir:index 1 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ref-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "SHALL have a contained resource if a local reference is provided" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Reference" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Reference>
             ]
           ] ;
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.mapping [
             fhir:index 0 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "n/a" ]
           ], [
             fhir:index 1 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "The target of a resource reference is a RIM entry point (Act, Role, or Entity)" ]
           ], [
             fhir:index 2 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "w5" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "FiveWs.context" ]
           ], [
             fhir:index 3 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value ".outboundRelationship[typeCode=PERT].target[A_SupportingClinicalStatement CMET minimal with many different choices of classCodes(ORG, ENC, PROC, SPLY, SBADM, OBS) and each of the act class codes draws from one or more of the following moodCodes (EVN, DEF, INT PRMS, RQO, PRP, APT, ARQ, GOL)]" ]
           ]
         ], [
           fhir:index 41 ;
           fhir:Element.id [ fhir:value "MedicationDispense.performer" ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.performer" ] ;
           fhir:ElementDefinition.short [ fhir:value "Who performed event" ] ;
           fhir:ElementDefinition.definition [ fhir:value "References a pracitioner role in order to state practitioner and organization information" ] ;
           fhir:ElementDefinition.min [ fhir:value "1"^^xsd:nonNegativeInteger ] ;
           fhir:ElementDefinition.max [ fhir:value "1" ] ;
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "MedicationDispense.performer" ] ;
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
             fhir:ElementDefinition.base.max [ fhir:value "*" ]
           ] ;
           fhir:ElementDefinition.type [
             fhir:index 0 ;
             fhir:ElementDefinition.type.code [ fhir:value "BackboneElement" ]
           ] ;
           fhir:ElementDefinition.condition [
             fhir:value "ele-1" ;
             fhir:index 0
           ] ;
           fhir:ElementDefinition.constraint [
             fhir:index 0 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ] ;
           fhir:ElementDefinition.mustSupport [ fhir:value "true"^^xsd:boolean ] ;
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.mapping [
             fhir:index 0 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "n/a" ]
           ], [
             fhir:index 1 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "workflow" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "Event.performer" ]
           ], [
             fhir:index 2 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value ".participation[typeCode=PRF]" ]
           ]
         ], [
           fhir:index 42 ;
           fhir:Element.id [ fhir:value "MedicationDispense.performer.id" ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.performer.id" ] ;
           fhir:ElementDefinition.representation [
             fhir:value "xmlAttr" ;
             fhir:index 0
           ] ;
           fhir:ElementDefinition.short [ fhir:value "Unique id for inter-element referencing" ] ;
           fhir:ElementDefinition.definition [ fhir:value "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." ] ;
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
           fhir:ElementDefinition.max [ fhir:value "1" ] ;
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "Element.id" ] ;
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
             fhir:ElementDefinition.base.max [ fhir:value "1" ]
           ] ;
           fhir:ElementDefinition.type [
             fhir:index 0 ;
             fhir:Element.extension [
               fhir:index 0 ;
               fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type" ] ;
               fhir:Extension.valueUrl [ fhir:value "string" ]
             ] ;
             fhir:ElementDefinition.type.code [ fhir:value "http://hl7.org/fhirpath/System.String" ]
           ] ;
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.isSummary [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.mapping [
             fhir:index 0 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "n/a" ]
           ]
         ], [
           fhir:index 43 ;
           fhir:Element.id [ fhir:value "MedicationDispense.performer.extension" ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.performer.extension" ] ;
           fhir:ElementDefinition.slicing [
             fhir:ElementDefinition.slicing.discriminator [
               fhir:index 0 ;
               fhir:ElementDefinition.slicing.discriminator.type [ fhir:value "value" ] ;
               fhir:ElementDefinition.slicing.discriminator.path [ fhir:value "url" ]
             ] ;
             fhir:ElementDefinition.slicing.description [ fhir:value "Extensions are always sliced by (at least) url" ] ;
             fhir:ElementDefinition.slicing.rules [ fhir:value "open" ]
           ] ;
           fhir:ElementDefinition.short [ fhir:value "Additional content defined by implementations" ] ;
           fhir:ElementDefinition.definition [ fhir:value "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." ] ;
           fhir:ElementDefinition.comment [ fhir:value "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone." ] ;
           fhir:ElementDefinition.alias [
             fhir:value "extensions" ;
             fhir:index 0
           ], [
             fhir:value "user content" ;
             fhir:index 1
           ] ;
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
           fhir:ElementDefinition.max [ fhir:value "*" ] ;
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "Element.extension" ] ;
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
             fhir:ElementDefinition.base.max [ fhir:value "*" ]
           ] ;
           fhir:ElementDefinition.type [
             fhir:index 0 ;
             fhir:ElementDefinition.type.code [ fhir:value "Extension" ]
           ] ;
           fhir:ElementDefinition.constraint [
             fhir:index 0 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ], [
             fhir:index 1 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ext-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "Must have either extensions or value[x], not both" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "extension.exists() != value.exists()" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Extension" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Extension>
             ]
           ] ;
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.isSummary [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.mapping [
             fhir:index 0 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "n/a" ]
           ]
         ], [
           fhir:index 44 ;
           fhir:Element.id [ fhir:value "MedicationDispense.performer.modifierExtension" ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.performer.modifierExtension" ] ;
           fhir:ElementDefinition.short [ fhir:value "Extensions that cannot be ignored even if unrecognized" ] ;
           fhir:ElementDefinition.definition [ fhir:value "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)." ] ;
           fhir:ElementDefinition.comment [ fhir:value "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone." ] ;
           fhir:ElementDefinition.requirements [ fhir:value "Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored.  This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](http://hl7.org/fhir/R4/extensibility.html#modifierExtension)." ] ;
           fhir:ElementDefinition.alias [
             fhir:value "extensions" ;
             fhir:index 0
           ], [
             fhir:value "user content" ;
             fhir:index 1
           ], [
             fhir:value "modifiers" ;
             fhir:index 2
           ] ;
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
           fhir:ElementDefinition.max [ fhir:value "*" ] ;
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "BackboneElement.modifierExtension" ] ;
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
             fhir:ElementDefinition.base.max [ fhir:value "*" ]
           ] ;
           fhir:ElementDefinition.type [
             fhir:index 0 ;
             fhir:ElementDefinition.type.code [ fhir:value "Extension" ]
           ] ;
           fhir:ElementDefinition.constraint [
             fhir:index 0 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ], [
             fhir:index 1 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ext-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "Must have either extensions or value[x], not both" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "extension.exists() != value.exists()" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Extension" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Extension>
             ]
           ] ;
           fhir:ElementDefinition.isModifier [ fhir:value "true"^^xsd:boolean ] ;
           fhir:ElementDefinition.isModifierReason [ fhir:value "Modifier extensions are expected to modify the meaning or interpretation of the element that contains them" ] ;
           fhir:ElementDefinition.isSummary [ fhir:value "true"^^xsd:boolean ] ;
           fhir:ElementDefinition.mapping [
             fhir:index 0 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "N/A" ]
           ]
         ], [
           fhir:index 45 ;
           fhir:Element.id [ fhir:value "MedicationDispense.performer.function" ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.performer.function" ] ;
           fhir:ElementDefinition.short [ fhir:value "Who performed the dispense and what they did" ] ;
           fhir:ElementDefinition.definition [ fhir:value "Distinguishes the type of performer in the dispense.  For example, date enterer, packager, final checker." ] ;
           fhir:ElementDefinition.comment [ fhir:value "Not all terminology uses fit this general pattern. In some cases, models should not use CodeableConcept and use Coding directly and provide their own structure for managing text, codings, translations and the relationship between elements and pre- and post-coordination." ] ;
           fhir:ElementDefinition.requirements [ fhir:value "Allows disambiguation of the types of involvement of different performers." ] ;
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
           fhir:ElementDefinition.max [ fhir:value "1" ] ;
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "MedicationDispense.performer.function" ] ;
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
             fhir:ElementDefinition.base.max [ fhir:value "1" ]
           ] ;
           fhir:ElementDefinition.type [
             fhir:index 0 ;
             fhir:ElementDefinition.type.code [ fhir:value "CodeableConcept" ]
           ] ;
           fhir:ElementDefinition.condition [
             fhir:value "ele-1" ;
             fhir:index 0
           ] ;
           fhir:ElementDefinition.constraint [
             fhir:index 0 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ] ;
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.binding [
             fhir:Element.extension [
               fhir:index 0 ;
               fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName" ] ;
               fhir:Extension.valueString [ fhir:value "MedicationDispensePerformerFunction" ]
             ] ;
             fhir:ElementDefinition.binding.strength [ fhir:value "example" ] ;
             fhir:ElementDefinition.binding.description [ fhir:value "A code describing the role an individual played in dispensing a medication." ] ;
             fhir:ElementDefinition.binding.valueSet [
               fhir:value "http://hl7.org/fhir/ValueSet/medicationdispense-performer-function" ;
               fhir:link <http://hl7.org/fhir/ValueSet/medicationdispense-performer-function>
             ]
           ] ;
           fhir:ElementDefinition.mapping [
             fhir:index 0 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "n/a" ]
           ], [
             fhir:index 1 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "v2" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "CE/CNE/CWE" ]
           ], [
             fhir:index 2 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "CD" ]
           ], [
             fhir:index 3 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "orim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "fhir:CodeableConcept rdfs:subClassOf dt:CD" ]
           ], [
             fhir:index 4 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "participation[typeCode=PRF].functionCode" ]
           ]
         ], [
           fhir:index 46 ;
           fhir:Element.id [ fhir:value "MedicationDispense.performer.actor" ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.performer.actor" ] ;
           fhir:ElementDefinition.short [ fhir:value "Individual who was performing" ] ;
           fhir:ElementDefinition.definition [ fhir:value "The device, practitioner, etc. who performed the action.  It should be assumed that the actor is the dispenser of the medication." ] ;
           fhir:ElementDefinition.comment [ fhir:value "References SHALL be a reference to an actual FHIR resource, and SHALL be resolveable (allowing for access control, temporary unavailability, etc.). Resolution can be either by retrieval from the URL, or, where applicable by resource type, by treating an absolute reference as a canonical URL and looking it up in a local registry/repository." ] ;
           fhir:ElementDefinition.min [ fhir:value "1"^^xsd:nonNegativeInteger ] ;
           fhir:ElementDefinition.max [ fhir:value "1" ] ;
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "MedicationDispense.performer.actor" ] ;
             fhir:ElementDefinition.base.min [ fhir:value "1"^^xsd:nonNegativeInteger ] ;
             fhir:ElementDefinition.base.max [ fhir:value "1" ]
           ] ;
           fhir:ElementDefinition.type [
             fhir:index 0 ;
             fhir:ElementDefinition.type.code [ fhir:value "Reference" ] ;
             fhir:ElementDefinition.type.targetProfile [
               fhir:value "https://gematik.de/fhir/tiflow-xborder/StructureDefinition/GEM-ERPEU-PR-PractitionerRole" ;
               fhir:index 0 ;
               fhir:link <https://gematik.de/fhir/tiflow-xborder/StructureDefinition/GEM-ERPEU-PR-PractitionerRole>
             ]
           ] ;
           fhir:ElementDefinition.condition [
             fhir:value "ele-1" ;
             fhir:index 0
           ] ;
           fhir:ElementDefinition.constraint [
             fhir:index 0 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ], [
             fhir:index 1 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ref-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "SHALL have a contained resource if a local reference is provided" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Reference" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Reference>
             ]
           ] ;
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.mapping [
             fhir:index 0 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "n/a" ]
           ], [
             fhir:index 1 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "The target of a resource reference is a RIM entry point (Act, Role, or Entity)" ]
           ], [
             fhir:index 2 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "workflow" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "Event.performer.actor" ]
           ], [
             fhir:index 3 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value ".role" ]
           ]
         ], [
           fhir:index 47 ;
           fhir:Element.id [ fhir:value "MedicationDispense.location" ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.location" ] ;
           fhir:ElementDefinition.short [ fhir:value "Where the dispense occurred" ] ;
           fhir:ElementDefinition.definition [ fhir:value "The principal physical location where the dispense was performed." ] ;
           fhir:ElementDefinition.comment [ fhir:value "References SHALL be a reference to an actual FHIR resource, and SHALL be resolveable (allowing for access control, temporary unavailability, etc.). Resolution can be either by retrieval from the URL, or, where applicable by resource type, by treating an absolute reference as a canonical URL and looking it up in a local registry/repository." ] ;
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
           fhir:ElementDefinition.max [ fhir:value "1" ] ;
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "MedicationDispense.location" ] ;
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
             fhir:ElementDefinition.base.max [ fhir:value "1" ]
           ] ;
           fhir:ElementDefinition.type [
             fhir:index 0 ;
             fhir:ElementDefinition.type.code [ fhir:value "Reference" ] ;
             fhir:ElementDefinition.type.targetProfile [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Location" ;
               fhir:index 0 ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Location>
             ]
           ] ;
           fhir:ElementDefinition.condition [
             fhir:value "ele-1" ;
             fhir:index 0
           ] ;
           fhir:ElementDefinition.constraint [
             fhir:index 0 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ], [
             fhir:index 1 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ref-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "SHALL have a contained resource if a local reference is provided" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Reference" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Reference>
             ]
           ] ;
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.mapping [
             fhir:index 0 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "n/a" ]
           ], [
             fhir:index 1 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "The target of a resource reference is a RIM entry point (Act, Role, or Entity)" ]
           ], [
             fhir:index 2 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value ".participation[typeCode=LOC].role" ]
           ]
         ], [
           fhir:index 48 ;
           fhir:Element.id [ fhir:value "MedicationDispense.authorizingPrescription" ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.authorizingPrescription" ] ;
           fhir:ElementDefinition.short [ fhir:value "Medication order that authorizes the dispense" ] ;
           fhir:ElementDefinition.definition [ fhir:value "Indicates the medication order that is being dispensed against." ] ;
           fhir:ElementDefinition.comment [ fhir:value "Maps to basedOn in Event logical model." ] ;
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
           fhir:ElementDefinition.max [ fhir:value "*" ] ;
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "MedicationDispense.authorizingPrescription" ] ;
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
             fhir:ElementDefinition.base.max [ fhir:value "*" ]
           ] ;
           fhir:ElementDefinition.type [
             fhir:index 0 ;
             fhir:ElementDefinition.type.code [ fhir:value "Reference" ] ;
             fhir:ElementDefinition.type.targetProfile [
               fhir:value "http://hl7.org/fhir/StructureDefinition/MedicationRequest" ;
               fhir:index 0 ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/MedicationRequest>
             ]
           ] ;
           fhir:ElementDefinition.condition [
             fhir:value "ele-1" ;
             fhir:index 0
           ] ;
           fhir:ElementDefinition.constraint [
             fhir:index 0 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ], [
             fhir:index 1 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ref-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "SHALL have a contained resource if a local reference is provided" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Reference" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Reference>
             ]
           ] ;
           fhir:ElementDefinition.mustSupport [ fhir:value "true"^^xsd:boolean ] ;
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.mapping [
             fhir:index 0 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "n/a" ]
           ], [
             fhir:index 1 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "The target of a resource reference is a RIM entry point (Act, Role, or Entity)" ]
           ], [
             fhir:index 2 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "workflow" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "Event.basedOn" ]
           ], [
             fhir:index 3 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "v2" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "ORC-2 Placer Order Number" ]
           ], [
             fhir:index 4 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value ".outboundRelationship[typeCode=FLFS].target[moodCode=RQO]" ]
           ], [
             fhir:index 5 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rx-dispense-rmim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "CombinedMedicationDispense.inFulfillmentOf" ]
           ]
         ], [
           fhir:index 49 ;
           fhir:Element.id [ fhir:value "MedicationDispense.authorizingPrescription.id" ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.authorizingPrescription.id" ] ;
           fhir:ElementDefinition.representation [
             fhir:value "xmlAttr" ;
             fhir:index 0
           ] ;
           fhir:ElementDefinition.short [ fhir:value "Unique id for inter-element referencing" ] ;
           fhir:ElementDefinition.definition [ fhir:value "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." ] ;
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
           fhir:ElementDefinition.max [ fhir:value "1" ] ;
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "Element.id" ] ;
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
             fhir:ElementDefinition.base.max [ fhir:value "1" ]
           ] ;
           fhir:ElementDefinition.type [
             fhir:index 0 ;
             fhir:Element.extension [
               fhir:index 0 ;
               fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type" ] ;
               fhir:Extension.valueUrl [ fhir:value "string" ]
             ] ;
             fhir:ElementDefinition.type.code [ fhir:value "http://hl7.org/fhirpath/System.String" ]
           ] ;
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.isSummary [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.mapping [
             fhir:index 0 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "n/a" ]
           ]
         ], [
           fhir:index 50 ;
           fhir:Element.id [ fhir:value "MedicationDispense.authorizingPrescription.extension" ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.authorizingPrescription.extension" ] ;
           fhir:ElementDefinition.slicing [
             fhir:ElementDefinition.slicing.discriminator [
               fhir:index 0 ;
               fhir:ElementDefinition.slicing.discriminator.type [ fhir:value "value" ] ;
               fhir:ElementDefinition.slicing.discriminator.path [ fhir:value "url" ]
             ] ;
             fhir:ElementDefinition.slicing.description [ fhir:value "Extensions are always sliced by (at least) url" ] ;
             fhir:ElementDefinition.slicing.rules [ fhir:value "open" ]
           ] ;
           fhir:ElementDefinition.short [ fhir:value "Additional content defined by implementations" ] ;
           fhir:ElementDefinition.definition [ fhir:value "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." ] ;
           fhir:ElementDefinition.comment [ fhir:value "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone." ] ;
           fhir:ElementDefinition.alias [
             fhir:value "extensions" ;
             fhir:index 0
           ], [
             fhir:value "user content" ;
             fhir:index 1
           ] ;
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
           fhir:ElementDefinition.max [ fhir:value "*" ] ;
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "Element.extension" ] ;
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
             fhir:ElementDefinition.base.max [ fhir:value "*" ]
           ] ;
           fhir:ElementDefinition.type [
             fhir:index 0 ;
             fhir:ElementDefinition.type.code [ fhir:value "Extension" ]
           ] ;
           fhir:ElementDefinition.constraint [
             fhir:index 0 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ], [
             fhir:index 1 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ext-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "Must have either extensions or value[x], not both" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "extension.exists() != value.exists()" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Extension" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Extension>
             ]
           ] ;
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.isSummary [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.mapping [
             fhir:index 0 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "n/a" ]
           ]
         ], [
           fhir:index 51 ;
           fhir:Element.id [ fhir:value "MedicationDispense.authorizingPrescription.reference" ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.authorizingPrescription.reference" ] ;
           fhir:ElementDefinition.short [ fhir:value "Literal reference, Relative, internal or absolute URL" ] ;
           fhir:ElementDefinition.definition [ fhir:value "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources." ] ;
           fhir:ElementDefinition.comment [ fhir:value "Using absolute URLs provides a stable scalable approach suitable for a cloud/web context, while using relative/logical references provides a flexible approach suitable for use when trading across closed eco-system boundaries.   Absolute URLs do not need to point to a FHIR RESTful server, though this is the preferred approach. If the URL conforms to the structure \"/[type]/[id]\" then it should be assumed that the reference is to a FHIR RESTful server." ] ;
           fhir:ElementDefinition.min [ fhir:value "1"^^xsd:nonNegativeInteger ] ;
           fhir:ElementDefinition.max [ fhir:value "1" ] ;
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "Reference.reference" ] ;
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
             fhir:ElementDefinition.base.max [ fhir:value "1" ]
           ] ;
           fhir:ElementDefinition.type [
             fhir:index 0 ;
             fhir:ElementDefinition.type.code [ fhir:value "string" ]
           ] ;
           fhir:ElementDefinition.condition [
             fhir:value "ref-1" ;
             fhir:index 0
           ] ;
           fhir:ElementDefinition.constraint [
             fhir:index 0 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ] ;
           fhir:ElementDefinition.mustSupport [ fhir:value "true"^^xsd:boolean ] ;
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.isSummary [ fhir:value "true"^^xsd:boolean ] ;
           fhir:ElementDefinition.mapping [
             fhir:index 0 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "N/A" ]
           ]
         ], [
           fhir:index 52 ;
           fhir:Element.id [ fhir:value "MedicationDispense.authorizingPrescription.type" ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.authorizingPrescription.type" ] ;
           fhir:ElementDefinition.short [ fhir:value "Type the reference refers to (e.g. \"Patient\")" ] ;
           fhir:ElementDefinition.definition [ fhir:value "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources)." ] ;
           fhir:ElementDefinition.comment [ fhir:value "This element is used to indicate the type of  the target of the reference. This may be used which ever of the other elements are populated (or not). In some cases, the type of the target may be determined by inspection of the reference (e.g. a RESTful URL) or by resolving the target of the reference; if both the type and a reference is provided, the reference SHALL resolve to a resource of the same type as that specified." ] ;
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
           fhir:ElementDefinition.max [ fhir:value "1" ] ;
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "Reference.type" ] ;
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
             fhir:ElementDefinition.base.max [ fhir:value "1" ]
           ] ;
           fhir:ElementDefinition.type [
             fhir:index 0 ;
             fhir:ElementDefinition.type.code [ fhir:value "uri" ]
           ] ;
           fhir:ElementDefinition.constraint [
             fhir:index 0 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ] ;
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.isSummary [ fhir:value "true"^^xsd:boolean ] ;
           fhir:ElementDefinition.binding [
             fhir:Element.extension [
               fhir:index 0 ;
               fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName" ] ;
               fhir:Extension.valueString [ fhir:value "FHIRResourceTypeExt" ]
             ] ;
             fhir:ElementDefinition.binding.strength [ fhir:value "extensible" ] ;
             fhir:ElementDefinition.binding.description [ fhir:value "Aa resource (or, for logical models, the URI of the logical model)." ] ;
             fhir:ElementDefinition.binding.valueSet [
               fhir:value "http://hl7.org/fhir/ValueSet/resource-types" ;
               fhir:link <http://hl7.org/fhir/ValueSet/resource-types>
             ]
           ] ;
           fhir:ElementDefinition.mapping [
             fhir:index 0 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "N/A" ]
           ]
         ], [
           fhir:index 53 ;
           fhir:Element.id [ fhir:value "MedicationDispense.authorizingPrescription.identifier" ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.authorizingPrescription.identifier" ] ;
           fhir:ElementDefinition.short [ fhir:value "Logical reference, when literal reference is not known" ] ;
           fhir:ElementDefinition.definition [ fhir:value "An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference." ] ;
           fhir:ElementDefinition.comment [ fhir:value "When an identifier is provided in place of a reference, any system processing the reference will only be able to resolve the identifier to a reference if it understands the business context in which the identifier is used. Sometimes this is global (e.g. a national identifier) but often it is not. For this reason, none of the useful mechanisms described for working with references (e.g. chaining, includes) are possible, nor should servers be expected to be able resolve the reference. Servers may accept an identifier based reference untouched, resolve it, and/or reject it - see CapabilityStatement.rest.resource.referencePolicy. \n\nWhen both an identifier and a literal reference are provided, the literal reference is preferred. Applications processing the resource are allowed - but not required - to check that the identifier matches the literal reference\n\nApplications converting a logical reference to a literal reference may choose to leave the logical reference present, or remove it.\n\nReference is intended to point to a structure that can potentially be expressed as a FHIR resource, though there is no need for it to exist as an actual FHIR resource instance - except in as much as an application wishes to actual find the target of the reference. The content referred to be the identifier must meet the logical constraints implied by any limitations on what resource types are permitted for the reference.  For example, it would not be legitimate to send the identifier for a drug prescription if the type were Reference(Observation|DiagnosticReport).  One of the use-cases for Reference.identifier is the situation where no FHIR representation exists (where the type is Reference (Any)." ] ;
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
           fhir:ElementDefinition.max [ fhir:value "1" ] ;
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "Reference.identifier" ] ;
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
             fhir:ElementDefinition.base.max [ fhir:value "1" ]
           ] ;
           fhir:ElementDefinition.type [
             fhir:index 0 ;
             fhir:ElementDefinition.type.code [ fhir:value "Identifier" ]
           ] ;
           fhir:ElementDefinition.condition [
             fhir:value "ele-1" ;
             fhir:index 0
           ] ;
           fhir:ElementDefinition.constraint [
             fhir:index 0 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ] ;
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.isSummary [ fhir:value "true"^^xsd:boolean ] ;
           fhir:ElementDefinition.mapping [
             fhir:index 0 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "n/a" ]
           ], [
             fhir:index 1 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "v2" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "CX / EI (occasionally, more often EI maps to a resource id or a URL)" ]
           ], [
             fhir:index 2 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "II - The Identifier class is a little looser than the v3 type II because it allows URIs as well as registered OIDs or GUIDs.  Also maps to Role[classCode=IDENT]" ]
           ], [
             fhir:index 3 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "servd" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "Identifier" ]
           ], [
             fhir:index 4 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value ".identifier" ]
           ]
         ], [
           fhir:index 54 ;
           fhir:Element.id [ fhir:value "MedicationDispense.authorizingPrescription.display" ] ;
           fhir:Element.extension [
             fhir:index 0 ;
             fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable" ] ;
             fhir:Extension.valueBoolean [ fhir:value "true"^^xsd:boolean ]
           ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.authorizingPrescription.display" ] ;
           fhir:ElementDefinition.short [ fhir:value "Text alternative for the resource" ] ;
           fhir:ElementDefinition.definition [ fhir:value "Plain text narrative that identifies the resource in addition to the resource reference." ] ;
           fhir:ElementDefinition.comment [ fhir:value "This is generally not the same as the Resource.text of the referenced resource.  The purpose is to identify what's being referenced, not to fully describe it." ] ;
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
           fhir:ElementDefinition.max [ fhir:value "1" ] ;
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "Reference.display" ] ;
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
             fhir:ElementDefinition.base.max [ fhir:value "1" ]
           ] ;
           fhir:ElementDefinition.type [
             fhir:index 0 ;
             fhir:ElementDefinition.type.code [ fhir:value "string" ]
           ] ;
           fhir:ElementDefinition.constraint [
             fhir:index 0 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ] ;
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.isSummary [ fhir:value "true"^^xsd:boolean ] ;
           fhir:ElementDefinition.mapping [
             fhir:index 0 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "N/A" ]
           ]
         ], [
           fhir:index 55 ;
           fhir:Element.id [ fhir:value "MedicationDispense.type" ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.type" ] ;
           fhir:ElementDefinition.short [ fhir:value "Trial fill, partial fill, emergency fill, etc." ] ;
           fhir:ElementDefinition.definition [ fhir:value "Indicates the type of dispensing event that is performed. For example, Trial Fill, Completion of Trial, Partial Fill, Emergency Fill, Samples, etc." ] ;
           fhir:ElementDefinition.comment [ fhir:value "Not all terminology uses fit this general pattern. In some cases, models should not use CodeableConcept and use Coding directly and provide their own structure for managing text, codings, translations and the relationship between elements and pre- and post-coordination." ] ;
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
           fhir:ElementDefinition.max [ fhir:value "1" ] ;
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "MedicationDispense.type" ] ;
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
             fhir:ElementDefinition.base.max [ fhir:value "1" ]
           ] ;
           fhir:ElementDefinition.type [
             fhir:index 0 ;
             fhir:ElementDefinition.type.code [ fhir:value "CodeableConcept" ]
           ] ;
           fhir:ElementDefinition.condition [
             fhir:value "ele-1" ;
             fhir:index 0
           ] ;
           fhir:ElementDefinition.constraint [
             fhir:index 0 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ] ;
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.binding [
             fhir:Element.extension [
               fhir:index 0 ;
               fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName" ] ;
               fhir:Extension.valueString [ fhir:value "MedicationDispenseType" ]
             ] ;
             fhir:ElementDefinition.binding.strength [ fhir:value "example" ] ;
             fhir:ElementDefinition.binding.description [ fhir:value "Indicates the type of dispensing event that is performed. For example, Trial Fill, Completion of Trial, Partial Fill, Emergency Fill, Samples, etc." ] ;
             fhir:ElementDefinition.binding.valueSet [
               fhir:value "http://terminology.hl7.org/ValueSet/v3-ActPharmacySupplyType" ;
               fhir:link <http://terminology.hl7.org/ValueSet/v3-ActPharmacySupplyType>
             ]
           ] ;
           fhir:ElementDefinition.mapping [
             fhir:index 0 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "n/a" ]
           ], [
             fhir:index 1 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "v2" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "CE/CNE/CWE" ]
           ], [
             fhir:index 2 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "CD" ]
           ], [
             fhir:index 3 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "orim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "fhir:CodeableConcept rdfs:subClassOf dt:CD" ]
           ], [
             fhir:index 4 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "v2" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "RXD-33-Dispense Type" ]
           ], [
             fhir:index 5 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value ".code" ]
           ], [
             fhir:index 6 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rx-dispense-rmim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "CombinedMedicationDispense.SupplyEvent.code" ]
           ]
         ], [
           fhir:index 56 ;
           fhir:Element.id [ fhir:value "MedicationDispense.quantity" ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.quantity" ] ;
           fhir:ElementDefinition.short [ fhir:value "Number of dispensed packages/ units" ] ;
           fhir:ElementDefinition.definition [ fhir:value "The amount of medication that has been dispensed. Includes unit of measure." ] ;
           fhir:ElementDefinition.comment [ fhir:value "The context of use may frequently define what kind of quantity this is and therefore what kind of units can be used. The context of use may also restrict the values for the comparator." ] ;
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
           fhir:ElementDefinition.max [ fhir:value "1" ] ;
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "MedicationDispense.quantity" ] ;
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
             fhir:ElementDefinition.base.max [ fhir:value "1" ]
           ] ;
           fhir:ElementDefinition.type [
             fhir:index 0 ;
             fhir:ElementDefinition.type.code [ fhir:value "Quantity" ] ;
             fhir:ElementDefinition.type.profile [
               fhir:value "http://hl7.org/fhir/StructureDefinition/SimpleQuantity" ;
               fhir:index 0 ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/SimpleQuantity>
             ]
           ] ;
           fhir:ElementDefinition.condition [
             fhir:value "ele-1" ;
             fhir:index 0
           ] ;
           fhir:ElementDefinition.constraint [
             fhir:index 0 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ], [
             fhir:index 1 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "qty-3" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "If a code for the unit is present, the system SHALL also be present" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "code.empty() or system.exists()" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "not(exists(f:code)) or exists(f:system)" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Quantity" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Quantity>
             ]
           ], [
             fhir:index 2 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "sqty-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "The comparator is not used on a SimpleQuantity" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "comparator.empty()" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "not(exists(f:comparator))" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/SimpleQuantity" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/SimpleQuantity>
             ]
           ], [
             fhir:index 3 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "erp-eu-positiveAnzahlPackungen" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "Der Wert der Packungen muss positiv sein (größer gleich 0)." ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "value>=0" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "https://gematik.de/fhir/tiflow-xborder/StructureDefinition/GEM-ERPEU-PR-MedicationDispense" ;
               fhir:link <https://gematik.de/fhir/tiflow-xborder/StructureDefinition/GEM-ERPEU-PR-MedicationDispense>
             ]
           ] ;
           fhir:ElementDefinition.mustSupport [ fhir:value "true"^^xsd:boolean ] ;
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.mapping [
             fhir:index 0 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "n/a" ]
           ], [
             fhir:index 1 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "v2" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "SN (see also Range) or CQ" ]
           ], [
             fhir:index 2 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "PQ, IVL<PQ>, MO, CO, depending on the values" ]
           ], [
             fhir:index 3 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "v2" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "RXD-4-Actual Dispense Amount / RXD-5.1-Actual Dispense Units.code / RXD-5.3-Actual Dispense Units.name of coding system" ]
           ], [
             fhir:index 4 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value ".quantity" ]
           ], [
             fhir:index 5 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rx-dispense-rmim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "CombinedMedicationDispense.SupplyEvent.quantity" ]
           ]
         ], [
           fhir:index 57 ;
           fhir:Element.id [ fhir:value "MedicationDispense.quantity.id" ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.quantity.id" ] ;
           fhir:ElementDefinition.representation [
             fhir:value "xmlAttr" ;
             fhir:index 0
           ] ;
           fhir:ElementDefinition.short [ fhir:value "Unique id for inter-element referencing" ] ;
           fhir:ElementDefinition.definition [ fhir:value "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." ] ;
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
           fhir:ElementDefinition.max [ fhir:value "1" ] ;
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "Element.id" ] ;
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
             fhir:ElementDefinition.base.max [ fhir:value "1" ]
           ] ;
           fhir:ElementDefinition.type [
             fhir:index 0 ;
             fhir:Element.extension [
               fhir:index 0 ;
               fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type" ] ;
               fhir:Extension.valueUrl [ fhir:value "string" ]
             ] ;
             fhir:ElementDefinition.type.code [ fhir:value "http://hl7.org/fhirpath/System.String" ]
           ] ;
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.isSummary [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.mapping [
             fhir:index 0 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "n/a" ]
           ]
         ], [
           fhir:index 58 ;
           fhir:Element.id [ fhir:value "MedicationDispense.quantity.extension" ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.quantity.extension" ] ;
           fhir:ElementDefinition.slicing [
             fhir:ElementDefinition.slicing.discriminator [
               fhir:index 0 ;
               fhir:ElementDefinition.slicing.discriminator.type [ fhir:value "value" ] ;
               fhir:ElementDefinition.slicing.discriminator.path [ fhir:value "url" ]
             ] ;
             fhir:ElementDefinition.slicing.description [ fhir:value "Extensions are always sliced by (at least) url" ] ;
             fhir:ElementDefinition.slicing.rules [ fhir:value "open" ]
           ] ;
           fhir:ElementDefinition.short [ fhir:value "Additional content defined by implementations" ] ;
           fhir:ElementDefinition.definition [ fhir:value "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." ] ;
           fhir:ElementDefinition.comment [ fhir:value "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone." ] ;
           fhir:ElementDefinition.alias [
             fhir:value "extensions" ;
             fhir:index 0
           ], [
             fhir:value "user content" ;
             fhir:index 1
           ] ;
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
           fhir:ElementDefinition.max [ fhir:value "*" ] ;
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "Element.extension" ] ;
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
             fhir:ElementDefinition.base.max [ fhir:value "*" ]
           ] ;
           fhir:ElementDefinition.type [
             fhir:index 0 ;
             fhir:ElementDefinition.type.code [ fhir:value "Extension" ]
           ] ;
           fhir:ElementDefinition.constraint [
             fhir:index 0 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ], [
             fhir:index 1 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ext-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "Must have either extensions or value[x], not both" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "extension.exists() != value.exists()" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Extension" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Extension>
             ]
           ] ;
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.isSummary [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.mapping [
             fhir:index 0 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "n/a" ]
           ]
         ], [
           fhir:index 59 ;
           fhir:Element.id [ fhir:value "MedicationDispense.quantity.value" ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.quantity.value" ] ;
           fhir:ElementDefinition.short [ fhir:value "Numerical value (with implicit precision)" ] ;
           fhir:ElementDefinition.definition [ fhir:value "The value of the measured amount. The value includes an implicit precision in the presentation of the value." ] ;
           fhir:ElementDefinition.comment [ fhir:value "The implicit precision in the value should always be honored. Monetary values have their own rules for handling precision (refer to standard accounting text books)." ] ;
           fhir:ElementDefinition.requirements [ fhir:value "Precision is handled implicitly in almost all cases of measurement." ] ;
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
           fhir:ElementDefinition.max [ fhir:value "1" ] ;
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "Quantity.value" ] ;
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
             fhir:ElementDefinition.base.max [ fhir:value "1" ]
           ] ;
           fhir:ElementDefinition.type [
             fhir:index 0 ;
             fhir:ElementDefinition.type.code [ fhir:value "decimal" ]
           ] ;
           fhir:ElementDefinition.constraint [
             fhir:index 0 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ] ;
           fhir:ElementDefinition.mustSupport [ fhir:value "true"^^xsd:boolean ] ;
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.isSummary [ fhir:value "true"^^xsd:boolean ] ;
           fhir:ElementDefinition.mapping [
             fhir:index 0 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "v2" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "SN.2  / CQ - N/A" ]
           ], [
             fhir:index 1 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "PQ.value, CO.value, MO.value, IVL.high or IVL.low depending on the value" ]
           ]
         ], [
           fhir:index 60 ;
           fhir:Element.id [ fhir:value "MedicationDispense.quantity.comparator" ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.quantity.comparator" ] ;
           fhir:ElementDefinition.short [ fhir:value "< | <= | >= | > - how to understand the value" ] ;
           fhir:ElementDefinition.definition [ fhir:value "Not allowed to be used in this context" ] ;
           fhir:ElementDefinition.requirements [ fhir:value "Need a framework for handling measures where the value is <5ug/L or >400mg/L due to the limitations of measuring methodology." ] ;
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
           fhir:ElementDefinition.max [ fhir:value "0" ] ;
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "Quantity.comparator" ] ;
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
             fhir:ElementDefinition.base.max [ fhir:value "1" ]
           ] ;
           fhir:ElementDefinition.type [
             fhir:index 0 ;
             fhir:ElementDefinition.type.code [ fhir:value "code" ]
           ] ;
           fhir:ElementDefinition.meaningWhenMissing [ fhir:value "If there is no comparator, then there is no modification of the value" ] ;
           fhir:ElementDefinition.constraint [
             fhir:index 0 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ] ;
           fhir:ElementDefinition.isModifier [ fhir:value "true"^^xsd:boolean ] ;
           fhir:ElementDefinition.isModifierReason [ fhir:value "This is labeled as \"Is Modifier\" because the comparator modifies the interpretation of the value significantly. If there is no comparator, then there is no modification of the value" ] ;
           fhir:ElementDefinition.isSummary [ fhir:value "true"^^xsd:boolean ] ;
           fhir:ElementDefinition.binding [
             fhir:Element.extension [
               fhir:index 0 ;
               fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName" ] ;
               fhir:Extension.valueString [ fhir:value "QuantityComparator" ]
             ] ;
             fhir:ElementDefinition.binding.strength [ fhir:value "required" ] ;
             fhir:ElementDefinition.binding.description [ fhir:value "How the Quantity should be understood and represented." ] ;
             fhir:ElementDefinition.binding.valueSet [
               fhir:value "http://hl7.org/fhir/ValueSet/quantity-comparator|4.0.1" ;
               fhir:link <http://hl7.org/fhir/ValueSet/quantity-comparator|4.0.1>
             ]
           ] ;
           fhir:ElementDefinition.mapping [
             fhir:index 0 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "v2" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "SN.1  / CQ.1" ]
           ], [
             fhir:index 1 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "IVL properties" ]
           ]
         ], [
           fhir:index 61 ;
           fhir:Element.id [ fhir:value "MedicationDispense.quantity.unit" ] ;
           fhir:Element.extension [
             fhir:index 0 ;
             fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable" ] ;
             fhir:Extension.valueBoolean [ fhir:value "true"^^xsd:boolean ]
           ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.quantity.unit" ] ;
           fhir:ElementDefinition.short [ fhir:value "Unit representation" ] ;
           fhir:ElementDefinition.definition [ fhir:value "A human-readable form of the unit." ] ;
           fhir:ElementDefinition.requirements [ fhir:value "There are many representations for units of measure and in many contexts, particular representations are fixed and required. I.e. mcg for micrograms." ] ;
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
           fhir:ElementDefinition.max [ fhir:value "1" ] ;
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "Quantity.unit" ] ;
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
             fhir:ElementDefinition.base.max [ fhir:value "1" ]
           ] ;
           fhir:ElementDefinition.type [
             fhir:index 0 ;
             fhir:ElementDefinition.type.code [ fhir:value "string" ]
           ] ;
           fhir:ElementDefinition.constraint [
             fhir:index 0 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ] ;
           fhir:ElementDefinition.mustSupport [ fhir:value "true"^^xsd:boolean ] ;
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.isSummary [ fhir:value "true"^^xsd:boolean ] ;
           fhir:ElementDefinition.mapping [
             fhir:index 0 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "v2" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "(see OBX.6 etc.) / CQ.2" ]
           ], [
             fhir:index 1 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "PQ.unit" ]
           ]
         ], [
           fhir:index 62 ;
           fhir:Element.id [ fhir:value "MedicationDispense.quantity.system" ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.quantity.system" ] ;
           fhir:ElementDefinition.short [ fhir:value "System that defines coded unit form" ] ;
           fhir:ElementDefinition.definition [ fhir:value "The identification of the system that provides the coded form of the unit." ] ;
           fhir:ElementDefinition.requirements [ fhir:value "Need to know the system that defines the coded form of the unit." ] ;
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
           fhir:ElementDefinition.max [ fhir:value "1" ] ;
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "Quantity.system" ] ;
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
             fhir:ElementDefinition.base.max [ fhir:value "1" ]
           ] ;
           fhir:ElementDefinition.type [
             fhir:index 0 ;
             fhir:ElementDefinition.type.code [ fhir:value "uri" ]
           ] ;
           fhir:ElementDefinition.condition [
             fhir:value "qty-3" ;
             fhir:index 0
           ] ;
           fhir:ElementDefinition.constraint [
             fhir:index 0 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ] ;
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.isSummary [ fhir:value "true"^^xsd:boolean ] ;
           fhir:ElementDefinition.mapping [
             fhir:index 0 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "v2" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "(see OBX.6 etc.) / CQ.2" ]
           ], [
             fhir:index 1 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "CO.codeSystem, PQ.translation.codeSystem" ]
           ]
         ], [
           fhir:index 63 ;
           fhir:Element.id [ fhir:value "MedicationDispense.quantity.code" ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.quantity.code" ] ;
           fhir:ElementDefinition.short [ fhir:value "Coded form of the unit" ] ;
           fhir:ElementDefinition.definition [ fhir:value "A computer processable form of the unit in some unit representation system." ] ;
           fhir:ElementDefinition.comment [ fhir:value "The preferred system is UCUM, but SNOMED CT can also be used (for customary units) or ISO 4217 for currency.  The context of use may additionally require a code from a particular system." ] ;
           fhir:ElementDefinition.requirements [ fhir:value "Need a computable form of the unit that is fixed across all forms. UCUM provides this for quantities, but SNOMED CT provides many units of interest." ] ;
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
           fhir:ElementDefinition.max [ fhir:value "1" ] ;
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "Quantity.code" ] ;
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
             fhir:ElementDefinition.base.max [ fhir:value "1" ]
           ] ;
           fhir:ElementDefinition.type [
             fhir:index 0 ;
             fhir:ElementDefinition.type.code [ fhir:value "code" ]
           ] ;
           fhir:ElementDefinition.constraint [
             fhir:index 0 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ] ;
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.isSummary [ fhir:value "true"^^xsd:boolean ] ;
           fhir:ElementDefinition.mapping [
             fhir:index 0 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "v2" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "(see OBX.6 etc.) / CQ.2" ]
           ], [
             fhir:index 1 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "PQ.code, MO.currency, PQ.translation.code" ]
           ]
         ], [
           fhir:index 64 ;
           fhir:Element.id [ fhir:value "MedicationDispense.daysSupply" ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.daysSupply" ] ;
           fhir:ElementDefinition.short [ fhir:value "Amount of medication expressed as a timing amount" ] ;
           fhir:ElementDefinition.definition [ fhir:value "The amount of medication expressed as a timing amount." ] ;
           fhir:ElementDefinition.comment [ fhir:value "The context of use may frequently define what kind of quantity this is and therefore what kind of units can be used. The context of use may also restrict the values for the comparator." ] ;
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
           fhir:ElementDefinition.max [ fhir:value "1" ] ;
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "MedicationDispense.daysSupply" ] ;
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
             fhir:ElementDefinition.base.max [ fhir:value "1" ]
           ] ;
           fhir:ElementDefinition.type [
             fhir:index 0 ;
             fhir:ElementDefinition.type.code [ fhir:value "Quantity" ] ;
             fhir:ElementDefinition.type.profile [
               fhir:value "http://hl7.org/fhir/StructureDefinition/SimpleQuantity" ;
               fhir:index 0 ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/SimpleQuantity>
             ]
           ] ;
           fhir:ElementDefinition.condition [
             fhir:value "ele-1" ;
             fhir:index 0
           ] ;
           fhir:ElementDefinition.constraint [
             fhir:index 0 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ], [
             fhir:index 1 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "qty-3" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "If a code for the unit is present, the system SHALL also be present" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "code.empty() or system.exists()" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "not(exists(f:code)) or exists(f:system)" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Quantity" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Quantity>
             ]
           ], [
             fhir:index 2 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "sqty-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "The comparator is not used on a SimpleQuantity" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "comparator.empty()" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "not(exists(f:comparator))" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/SimpleQuantity" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/SimpleQuantity>
             ]
           ] ;
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.mapping [
             fhir:index 0 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "n/a" ]
           ], [
             fhir:index 1 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "v2" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "SN (see also Range) or CQ" ]
           ], [
             fhir:index 2 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "PQ, IVL<PQ>, MO, CO, depending on the values" ]
           ], [
             fhir:index 3 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "v2" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "TQ1.6 Timing/Quantity Segment Service Duration.\rPrior to v2.5, ORC.7.3 Common Order Segment / Quantity/Timing / Duration component.  This is a formatted string, first character for the time unit (e.g., D=days), followed by the value.  For example, “D14” represents “14 days supply”\rFrom v2.5 on, TQ1.6 Timing/Quantity Segment / Service Duration.  This is a CQ data type (<Quantity (NM)> ^ <Units (CWE)>), thus for days supply, assuming the unit of measure is “days”, the numeric value is TQ1.6.1 (…|14^\rFor backwards compatibility, ORC.7 was permitted through v2.6.  Both forms (field and segment) may be present in v2.5, v2.5.1, and v2.6" ]
           ], [
             fhir:index 4 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "effectiveUseTime" ]
           ]
         ], [
           fhir:index 65 ;
           fhir:Element.id [ fhir:value "MedicationDispense.whenPrepared" ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.whenPrepared" ] ;
           fhir:ElementDefinition.short [ fhir:value "When product was packaged and reviewed" ] ;
           fhir:ElementDefinition.definition [ fhir:value "The time when the dispensed product was packaged and reviewed." ] ;
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
           fhir:ElementDefinition.max [ fhir:value "1" ] ;
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "MedicationDispense.whenPrepared" ] ;
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
             fhir:ElementDefinition.base.max [ fhir:value "1" ]
           ] ;
           fhir:ElementDefinition.type [
             fhir:index 0 ;
             fhir:ElementDefinition.type.code [ fhir:value "dateTime" ]
           ] ;
           fhir:ElementDefinition.constraint [
             fhir:index 0 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ], [
             fhir:index 1 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "erp-eu-abgabeDatumsFormat" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "Wert muss ein Datum in der Form: YYYY-MM-DD sein." ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "toString().length()=10" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "https://gematik.de/fhir/tiflow-xborder/StructureDefinition/GEM-ERPEU-PR-MedicationDispense" ;
               fhir:link <https://gematik.de/fhir/tiflow-xborder/StructureDefinition/GEM-ERPEU-PR-MedicationDispense>
             ]
           ] ;
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.isSummary [ fhir:value "true"^^xsd:boolean ] ;
           fhir:ElementDefinition.mapping [
             fhir:index 0 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "v2" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "RXD-3-Date/Time Dispensed" ]
           ], [
             fhir:index 1 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value ".effectiveTime[xmi:type=IVL_TS].low" ]
           ], [
             fhir:index 2 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rx-dispense-rmim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "CombinedMedicationDispense.SupplyEvent.effectiveTime" ]
           ]
         ], [
           fhir:index 66 ;
           fhir:Element.id [ fhir:value "MedicationDispense.whenHandedOver" ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.whenHandedOver" ] ;
           fhir:ElementDefinition.short [ fhir:value "When product was given out" ] ;
           fhir:ElementDefinition.definition [ fhir:value "The time the dispensed product was provided to the patient or their representative." ] ;
           fhir:ElementDefinition.min [ fhir:value "1"^^xsd:nonNegativeInteger ] ;
           fhir:ElementDefinition.max [ fhir:value "1" ] ;
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "MedicationDispense.whenHandedOver" ] ;
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
             fhir:ElementDefinition.base.max [ fhir:value "1" ]
           ] ;
           fhir:ElementDefinition.type [
             fhir:index 0 ;
             fhir:ElementDefinition.type.code [ fhir:value "dateTime" ]
           ] ;
           fhir:ElementDefinition.constraint [
             fhir:index 0 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ], [
             fhir:index 1 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "erp-eu-abgabeDatumsFormat" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "Wert muss ein Datum in der Form: YYYY-MM-DD sein." ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "toString().length()=10" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "https://gematik.de/fhir/tiflow-xborder/StructureDefinition/GEM-ERPEU-PR-MedicationDispense" ;
               fhir:link <https://gematik.de/fhir/tiflow-xborder/StructureDefinition/GEM-ERPEU-PR-MedicationDispense>
             ]
           ] ;
           fhir:ElementDefinition.mustSupport [ fhir:value "true"^^xsd:boolean ] ;
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.isSummary [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.mapping [
             fhir:index 0 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "workflow" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "Event.occurrence[x]" ]
           ], [
             fhir:index 1 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "v2" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "RXD-3-Date/Time Dispensed" ]
           ], [
             fhir:index 2 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value ".effectiveTime[xmi:type=IVL_TS].high" ]
           ], [
             fhir:index 3 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rx-dispense-rmim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "CombinedMedicationDispense.SupplyEvent.effectiveTime" ]
           ]
         ], [
           fhir:index 67 ;
           fhir:Element.id [ fhir:value "MedicationDispense.destination" ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.destination" ] ;
           fhir:ElementDefinition.short [ fhir:value "Where the medication was sent" ] ;
           fhir:ElementDefinition.definition [ fhir:value "Identification of the facility/location where the medication was shipped to, as part of the dispense event." ] ;
           fhir:ElementDefinition.comment [ fhir:value "References SHALL be a reference to an actual FHIR resource, and SHALL be resolveable (allowing for access control, temporary unavailability, etc.). Resolution can be either by retrieval from the URL, or, where applicable by resource type, by treating an absolute reference as a canonical URL and looking it up in a local registry/repository." ] ;
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
           fhir:ElementDefinition.max [ fhir:value "1" ] ;
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "MedicationDispense.destination" ] ;
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
             fhir:ElementDefinition.base.max [ fhir:value "1" ]
           ] ;
           fhir:ElementDefinition.type [
             fhir:index 0 ;
             fhir:ElementDefinition.type.code [ fhir:value "Reference" ] ;
             fhir:ElementDefinition.type.targetProfile [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Location" ;
               fhir:index 0 ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Location>
             ]
           ] ;
           fhir:ElementDefinition.condition [
             fhir:value "ele-1" ;
             fhir:index 0
           ] ;
           fhir:ElementDefinition.constraint [
             fhir:index 0 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ], [
             fhir:index 1 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ref-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "SHALL have a contained resource if a local reference is provided" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Reference" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Reference>
             ]
           ] ;
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.mapping [
             fhir:index 0 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "n/a" ]
           ], [
             fhir:index 1 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "The target of a resource reference is a RIM entry point (Act, Role, or Entity)" ]
           ], [
             fhir:index 2 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "v2" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "RXD-13 Dispense-to Location; RXD-30 Dispense to Pharmacy; RXD-31 Dispense to Pharmacy Address" ]
           ], [
             fhir:index 3 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value ".participation[typeCode=DST].role" ]
           ], [
             fhir:index 4 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rx-dispense-rmim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "CombinedMedicationDispense.SupplyEvent.destination" ]
           ]
         ], [
           fhir:index 68 ;
           fhir:Element.id [ fhir:value "MedicationDispense.receiver" ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.receiver" ] ;
           fhir:ElementDefinition.short [ fhir:value "Who collected the medication" ] ;
           fhir:ElementDefinition.definition [ fhir:value "Identifies the person who picked up the medication.  This will usually be a patient or their caregiver, but some cases exist where it can be a healthcare professional." ] ;
           fhir:ElementDefinition.comment [ fhir:value "References SHALL be a reference to an actual FHIR resource, and SHALL be resolveable (allowing for access control, temporary unavailability, etc.). Resolution can be either by retrieval from the URL, or, where applicable by resource type, by treating an absolute reference as a canonical URL and looking it up in a local registry/repository." ] ;
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
           fhir:ElementDefinition.max [ fhir:value "*" ] ;
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "MedicationDispense.receiver" ] ;
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
             fhir:ElementDefinition.base.max [ fhir:value "*" ]
           ] ;
           fhir:ElementDefinition.type [
             fhir:index 0 ;
             fhir:ElementDefinition.type.code [ fhir:value "Reference" ] ;
             fhir:ElementDefinition.type.targetProfile [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Patient" ;
               fhir:index 0 ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Patient>
             ], [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Practitioner" ;
               fhir:index 1 ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Practitioner>
             ]
           ] ;
           fhir:ElementDefinition.condition [
             fhir:value "ele-1" ;
             fhir:index 0
           ] ;
           fhir:ElementDefinition.constraint [
             fhir:index 0 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ], [
             fhir:index 1 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ref-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "SHALL have a contained resource if a local reference is provided" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Reference" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Reference>
             ]
           ] ;
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.mapping [
             fhir:index 0 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "n/a" ]
           ], [
             fhir:index 1 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "The target of a resource reference is a RIM entry point (Act, Role, or Entity)" ]
           ], [
             fhir:index 2 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value ".participation[typeCode=RCV].role" ]
           ], [
             fhir:index 3 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rx-dispense-rmim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "CombinedMedicationDispense.SupplyEvent.receiver" ]
           ]
         ], [
           fhir:index 69 ;
           fhir:Element.id [ fhir:value "MedicationDispense.note" ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.note" ] ;
           fhir:ElementDefinition.short [ fhir:value "Information about the dispense" ] ;
           fhir:ElementDefinition.definition [ fhir:value "Extra information about the dispense that could not be conveyed in the other attributes." ] ;
           fhir:ElementDefinition.comment [ fhir:value "For systems that do not have structured annotations, they can simply communicate a single annotation with no author or time.  This element may need to be included in narrative because of the potential for modifying information.  *Annotations SHOULD NOT* be used to communicate \"modifying\" information that could be computable. (This is a SHOULD because enforcing user behavior is nearly impossible)." ] ;
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
           fhir:ElementDefinition.max [ fhir:value "*" ] ;
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "MedicationDispense.note" ] ;
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
             fhir:ElementDefinition.base.max [ fhir:value "*" ]
           ] ;
           fhir:ElementDefinition.type [
             fhir:index 0 ;
             fhir:ElementDefinition.type.code [ fhir:value "Annotation" ]
           ] ;
           fhir:ElementDefinition.condition [
             fhir:value "ele-1" ;
             fhir:index 0
           ] ;
           fhir:ElementDefinition.constraint [
             fhir:index 0 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ] ;
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.mapping [
             fhir:index 0 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "n/a" ]
           ], [
             fhir:index 1 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "v2" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "N/A" ]
           ], [
             fhir:index 2 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "Act" ]
           ], [
             fhir:index 3 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "workflow" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "Event.note" ]
           ], [
             fhir:index 4 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "v2" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "RXD-9 Dispense Notes" ]
           ], [
             fhir:index 5 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value ".inboundRelationship[typeCode=SUBJ]/source[classCode=ACT,moodCode=EVN]" ]
           ]
         ], [
           fhir:index 70 ;
           fhir:Element.id [ fhir:value "MedicationDispense.dosageInstruction" ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.dosageInstruction" ] ;
           fhir:ElementDefinition.short [ fhir:value "Hier werden Informationen zur Dosierung angegeben." ] ;
           fhir:ElementDefinition.definition [ fhir:value "Hier werden Informationen zur Dosierung angegeben." ] ;
           fhir:ElementDefinition.comment [ fhir:value "When the dose or rate is intended to change over the entire administration period (e.g. Tapering dose prescriptions), multiple instances of dosage instructions will need to be supplied to convey the different doses/rates.\rThe pharmacist reviews the medication order prior to dispense and updates the dosageInstruction based on the actual product being dispensed." ] ;
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
           fhir:ElementDefinition.max [ fhir:value "*" ] ;
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "MedicationDispense.dosageInstruction" ] ;
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
             fhir:ElementDefinition.base.max [ fhir:value "*" ]
           ] ;
           fhir:ElementDefinition.type [
             fhir:index 0 ;
             fhir:ElementDefinition.type.code [ fhir:value "Dosage" ] ;
             fhir:ElementDefinition.type.profile [
               fhir:value "http://ig.fhir.de/igs/medication/StructureDefinition/DosageDE" ;
               fhir:index 0 ;
               fhir:link <http://ig.fhir.de/igs/medication/StructureDefinition/DosageDE>
             ]
           ] ;
           fhir:ElementDefinition.condition [
             fhir:value "ele-1" ;
             fhir:index 0
           ] ;
           fhir:ElementDefinition.constraint [
             fhir:index 0 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ], [
             fhir:index 1 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "DosageStructuredOrFreeTextWarning" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "warning" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "Die Dosierungsangabe darf entweder nur als Freitext oder nur als vollständige strukturierte Information erfolgen — eine Mischung ist nicht erlaubt." ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "(%resource.ofType(MedicationRequest).dosageInstruction | \n %resource.ofType(MedicationDispense).dosageInstruction | \n %resource.ofType(MedicationStatement).dosage).all(\n  (text.exists() and timing.empty() and doseAndRate.empty()) or\n  (text.empty() and (timing.exists() or doseAndRate.exists()))\n)" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://ig.fhir.de/igs/medication/StructureDefinition/DosageDE" ;
               fhir:link <http://ig.fhir.de/igs/medication/StructureDefinition/DosageDE>
             ]
           ], [
             fhir:index 2 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "DosageStructuredRequiresBoth" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "Wenn eine strukturierte Dosierungsangabe erfolgt, müssen sowohl timing als auch doseAndRate angegeben werden." ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "(%resource.ofType(MedicationRequest).dosageInstruction | \n %resource.ofType(MedicationDispense).dosageInstruction | \n %resource.ofType(MedicationStatement).dosage).all(\n  (timing.exists() implies doseAndRate.exists()) and\n  (doseAndRate.exists() implies timing.exists())\n)" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://ig.fhir.de/igs/medication/StructureDefinition/DosageDE" ;
               fhir:link <http://ig.fhir.de/igs/medication/StructureDefinition/DosageDE>
             ]
           ], [
             fhir:index 3 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "DosageDoseUnitSameCode" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "Die Dosiereinheit muss über alle Dosierungen gleich sein." ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "(%resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage).all(\ndoseAndRate.exists() implies\n  (\n    (%resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage).doseAndRate.dose.ofType(Quantity).code | \n    (%resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage).doseAndRate.dose.ofType(Range).low.code | \n    (%resource.ofType(MedicationRequest).dosageInstruction | %resource.ofType(MedicationDispense).dosageInstruction | %resource.ofType(MedicationStatement).dosage).doseAndRate.dose.ofType(Range).high.code\n  ).distinct().count() = 1\n)" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://ig.fhir.de/igs/medication/StructureDefinition/DosageDE" ;
               fhir:link <http://ig.fhir.de/igs/medication/StructureDefinition/DosageDE>
             ]
           ], [
             fhir:index 4 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "DosageWarnungViererschemaInText" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "warning" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "Hinweis: In Dosage.text wurde ein Viererschema (z. B. 1-1-1-1) erkannt. Bitte prüfen, ob dies strukturiert abgebildet werden kann." ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "text.exists() implies text.matches('.*\\\\d+\\\\s*[-–]\\\\s*\\\\d+\\\\s*[-–]\\\\s*\\\\d+\\\\s*[-–]\\\\d+.*').not()" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://ig.fhir.de/igs/medication/StructureDefinition/DosageDE" ;
               fhir:link <http://ig.fhir.de/igs/medication/StructureDefinition/DosageDE>
             ]
           ], [
             fhir:index 5 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "FreeTextSingleDosageOnlyWarning" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "warning" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "Wenn eine Dosierung als reiner Freitext angegeben ist, soll nur genau ein Dosage-Element existieren." ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "(\n  (%resource.ofType(MedicationRequest).dosageInstruction |\n   %resource.ofType(MedicationDispense).dosageInstruction |\n   %resource.ofType(MedicationStatement).dosage\n  ).exists(text.exists() and timing.empty() and doseAndRate.empty())\n)\nimplies\n(\n  (%resource.ofType(MedicationRequest).dosageInstruction |\n   %resource.ofType(MedicationDispense).dosageInstruction |\n   %resource.ofType(MedicationStatement).dosage\n  ).count() = 1\n)" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://ig.fhir.de/igs/medication/StructureDefinition/DosageDE" ;
               fhir:link <http://ig.fhir.de/igs/medication/StructureDefinition/DosageDE>
             ]
           ] ;
           fhir:ElementDefinition.mustSupport [ fhir:value "true"^^xsd:boolean ] ;
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.mapping [
             fhir:index 0 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "n/a" ]
           ], [
             fhir:index 1 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value ".outboundRelationship[typeCode=COMP].target[classCode=SBADM, moodCode=INT]" ]
           ]
         ], [
           fhir:index 71 ;
           fhir:Element.id [ fhir:value "MedicationDispense.substitution" ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.substitution" ] ;
           fhir:ElementDefinition.short [ fhir:value "Whether a substitution was performed on the dispense" ] ;
           fhir:ElementDefinition.definition [ fhir:value "Indicates whether or not substitution was made as part of the dispense.  In some cases, substitution will be expected but does not happen, in other cases substitution is not expected but does happen.  This block explains what substitution did or did not happen and why.  If nothing is specified, substitution was not done." ] ;
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
           fhir:ElementDefinition.max [ fhir:value "1" ] ;
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "MedicationDispense.substitution" ] ;
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
             fhir:ElementDefinition.base.max [ fhir:value "1" ]
           ] ;
           fhir:ElementDefinition.type [
             fhir:index 0 ;
             fhir:ElementDefinition.type.code [ fhir:value "BackboneElement" ]
           ] ;
           fhir:ElementDefinition.condition [
             fhir:value "ele-1" ;
             fhir:index 0
           ] ;
           fhir:ElementDefinition.constraint [
             fhir:index 0 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ] ;
           fhir:ElementDefinition.mustSupport [ fhir:value "true"^^xsd:boolean ] ;
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.mapping [
             fhir:index 0 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "n/a" ]
           ], [
             fhir:index 1 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value ".outboundRelationship[typeCode=COMP].target[classCode=SUBST, moodCode=EVN]" ]
           ], [
             fhir:index 2 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rx-dispense-rmim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "CombinedMedicationDispense.substitutionMade" ]
           ]
         ], [
           fhir:index 72 ;
           fhir:Element.id [ fhir:value "MedicationDispense.substitution.id" ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.substitution.id" ] ;
           fhir:ElementDefinition.representation [
             fhir:value "xmlAttr" ;
             fhir:index 0
           ] ;
           fhir:ElementDefinition.short [ fhir:value "Unique id for inter-element referencing" ] ;
           fhir:ElementDefinition.definition [ fhir:value "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." ] ;
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
           fhir:ElementDefinition.max [ fhir:value "1" ] ;
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "Element.id" ] ;
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
             fhir:ElementDefinition.base.max [ fhir:value "1" ]
           ] ;
           fhir:ElementDefinition.type [
             fhir:index 0 ;
             fhir:Element.extension [
               fhir:index 0 ;
               fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type" ] ;
               fhir:Extension.valueUrl [ fhir:value "string" ]
             ] ;
             fhir:ElementDefinition.type.code [ fhir:value "http://hl7.org/fhirpath/System.String" ]
           ] ;
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.isSummary [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.mapping [
             fhir:index 0 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "n/a" ]
           ]
         ], [
           fhir:index 73 ;
           fhir:Element.id [ fhir:value "MedicationDispense.substitution.extension" ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.substitution.extension" ] ;
           fhir:ElementDefinition.slicing [
             fhir:ElementDefinition.slicing.discriminator [
               fhir:index 0 ;
               fhir:ElementDefinition.slicing.discriminator.type [ fhir:value "value" ] ;
               fhir:ElementDefinition.slicing.discriminator.path [ fhir:value "url" ]
             ] ;
             fhir:ElementDefinition.slicing.description [ fhir:value "Extensions are always sliced by (at least) url" ] ;
             fhir:ElementDefinition.slicing.rules [ fhir:value "open" ]
           ] ;
           fhir:ElementDefinition.short [ fhir:value "Additional content defined by implementations" ] ;
           fhir:ElementDefinition.definition [ fhir:value "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." ] ;
           fhir:ElementDefinition.comment [ fhir:value "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone." ] ;
           fhir:ElementDefinition.alias [
             fhir:value "extensions" ;
             fhir:index 0
           ], [
             fhir:value "user content" ;
             fhir:index 1
           ] ;
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
           fhir:ElementDefinition.max [ fhir:value "*" ] ;
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "Element.extension" ] ;
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
             fhir:ElementDefinition.base.max [ fhir:value "*" ]
           ] ;
           fhir:ElementDefinition.type [
             fhir:index 0 ;
             fhir:ElementDefinition.type.code [ fhir:value "Extension" ]
           ] ;
           fhir:ElementDefinition.constraint [
             fhir:index 0 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ], [
             fhir:index 1 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ext-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "Must have either extensions or value[x], not both" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "extension.exists() != value.exists()" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Extension" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Extension>
             ]
           ] ;
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.isSummary [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.mapping [
             fhir:index 0 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "n/a" ]
           ]
         ], [
           fhir:index 74 ;
           fhir:Element.id [ fhir:value "MedicationDispense.substitution.modifierExtension" ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.substitution.modifierExtension" ] ;
           fhir:ElementDefinition.short [ fhir:value "Extensions that cannot be ignored even if unrecognized" ] ;
           fhir:ElementDefinition.definition [ fhir:value "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)." ] ;
           fhir:ElementDefinition.comment [ fhir:value "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone." ] ;
           fhir:ElementDefinition.requirements [ fhir:value "Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored.  This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](http://hl7.org/fhir/R4/extensibility.html#modifierExtension)." ] ;
           fhir:ElementDefinition.alias [
             fhir:value "extensions" ;
             fhir:index 0
           ], [
             fhir:value "user content" ;
             fhir:index 1
           ], [
             fhir:value "modifiers" ;
             fhir:index 2
           ] ;
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
           fhir:ElementDefinition.max [ fhir:value "*" ] ;
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "BackboneElement.modifierExtension" ] ;
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
             fhir:ElementDefinition.base.max [ fhir:value "*" ]
           ] ;
           fhir:ElementDefinition.type [
             fhir:index 0 ;
             fhir:ElementDefinition.type.code [ fhir:value "Extension" ]
           ] ;
           fhir:ElementDefinition.constraint [
             fhir:index 0 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ], [
             fhir:index 1 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ext-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "Must have either extensions or value[x], not both" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "extension.exists() != value.exists()" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Extension" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Extension>
             ]
           ] ;
           fhir:ElementDefinition.isModifier [ fhir:value "true"^^xsd:boolean ] ;
           fhir:ElementDefinition.isModifierReason [ fhir:value "Modifier extensions are expected to modify the meaning or interpretation of the element that contains them" ] ;
           fhir:ElementDefinition.isSummary [ fhir:value "true"^^xsd:boolean ] ;
           fhir:ElementDefinition.mapping [
             fhir:index 0 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "N/A" ]
           ]
         ], [
           fhir:index 75 ;
           fhir:Element.id [ fhir:value "MedicationDispense.substitution.wasSubstituted" ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.substitution.wasSubstituted" ] ;
           fhir:ElementDefinition.short [ fhir:value "Indicates whether a substitution was made on the dispensed medication" ] ;
           fhir:ElementDefinition.definition [ fhir:value "True if the dispenser dispensed a different drug or product from what was prescribed." ] ;
           fhir:ElementDefinition.min [ fhir:value "1"^^xsd:nonNegativeInteger ] ;
           fhir:ElementDefinition.max [ fhir:value "1" ] ;
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "MedicationDispense.substitution.wasSubstituted" ] ;
             fhir:ElementDefinition.base.min [ fhir:value "1"^^xsd:nonNegativeInteger ] ;
             fhir:ElementDefinition.base.max [ fhir:value "1" ]
           ] ;
           fhir:ElementDefinition.type [
             fhir:index 0 ;
             fhir:ElementDefinition.type.code [ fhir:value "boolean" ]
           ] ;
           fhir:ElementDefinition.constraint [
             fhir:index 0 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ] ;
           fhir:ElementDefinition.mustSupport [ fhir:value "true"^^xsd:boolean ] ;
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.isSummary [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.mapping [
             fhir:index 0 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value ".actionNegationInd" ]
           ]
         ], [
           fhir:index 76 ;
           fhir:Element.id [ fhir:value "MedicationDispense.substitution.type" ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.substitution.type" ] ;
           fhir:ElementDefinition.short [ fhir:value "Code signifying whether a different drug was dispensed from what was prescribed" ] ;
           fhir:ElementDefinition.definition [ fhir:value "A code signifying whether a different drug was dispensed from what was prescribed." ] ;
           fhir:ElementDefinition.comment [ fhir:value "Not all terminology uses fit this general pattern. In some cases, models should not use CodeableConcept and use Coding directly and provide their own structure for managing text, codings, translations and the relationship between elements and pre- and post-coordination." ] ;
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
           fhir:ElementDefinition.max [ fhir:value "1" ] ;
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "MedicationDispense.substitution.type" ] ;
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
             fhir:ElementDefinition.base.max [ fhir:value "1" ]
           ] ;
           fhir:ElementDefinition.type [
             fhir:index 0 ;
             fhir:ElementDefinition.type.code [ fhir:value "CodeableConcept" ]
           ] ;
           fhir:ElementDefinition.condition [
             fhir:value "ele-1" ;
             fhir:index 0
           ] ;
           fhir:ElementDefinition.constraint [
             fhir:index 0 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ] ;
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.binding [
             fhir:Element.extension [
               fhir:index 0 ;
               fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName" ] ;
               fhir:Extension.valueString [ fhir:value "MedicationIntendedSubstitutionType" ]
             ] ;
             fhir:ElementDefinition.binding.strength [ fhir:value "example" ] ;
             fhir:ElementDefinition.binding.description [ fhir:value "A coded concept describing whether a different medicinal product may be dispensed other than the product as specified exactly in the prescription." ] ;
             fhir:ElementDefinition.binding.valueSet [
               fhir:value "http://terminology.hl7.org/ValueSet/v3-ActSubstanceAdminSubstitutionCode" ;
               fhir:link <http://terminology.hl7.org/ValueSet/v3-ActSubstanceAdminSubstitutionCode>
             ]
           ] ;
           fhir:ElementDefinition.mapping [
             fhir:index 0 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "n/a" ]
           ], [
             fhir:index 1 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "v2" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "CE/CNE/CWE" ]
           ], [
             fhir:index 2 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "CD" ]
           ], [
             fhir:index 3 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "orim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "fhir:CodeableConcept rdfs:subClassOf dt:CD" ]
           ], [
             fhir:index 4 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "v2" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "RXO-9-Allow Substitutions / RXE-9-Substitution Status" ]
           ], [
             fhir:index 5 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value ".code" ]
           ], [
             fhir:index 6 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rx-dispense-rmim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "CombinedMedicationDispense.substitutionMade.code" ]
           ]
         ], [
           fhir:index 77 ;
           fhir:Element.id [ fhir:value "MedicationDispense.substitution.reason" ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.substitution.reason" ] ;
           fhir:ElementDefinition.short [ fhir:value "Why was substitution made" ] ;
           fhir:ElementDefinition.definition [ fhir:value "Indicates the reason for the substitution (or lack of substitution) from what was prescribed." ] ;
           fhir:ElementDefinition.comment [ fhir:value "Not all terminology uses fit this general pattern. In some cases, models should not use CodeableConcept and use Coding directly and provide their own structure for managing text, codings, translations and the relationship between elements and pre- and post-coordination." ] ;
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
           fhir:ElementDefinition.max [ fhir:value "*" ] ;
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "MedicationDispense.substitution.reason" ] ;
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
             fhir:ElementDefinition.base.max [ fhir:value "*" ]
           ] ;
           fhir:ElementDefinition.type [
             fhir:index 0 ;
             fhir:ElementDefinition.type.code [ fhir:value "CodeableConcept" ]
           ] ;
           fhir:ElementDefinition.condition [
             fhir:value "ele-1" ;
             fhir:index 0
           ] ;
           fhir:ElementDefinition.constraint [
             fhir:index 0 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ] ;
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.binding [
             fhir:Element.extension [
               fhir:index 0 ;
               fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName" ] ;
               fhir:Extension.valueString [ fhir:value "MedicationIntendedSubstitutionReason" ]
             ] ;
             fhir:ElementDefinition.binding.strength [ fhir:value "example" ] ;
             fhir:ElementDefinition.binding.description [ fhir:value "A coded concept describing the reason that a different medication should (or should not) be substituted from what was prescribed." ] ;
             fhir:ElementDefinition.binding.valueSet [
               fhir:value "http://terminology.hl7.org/ValueSet/v3-SubstanceAdminSubstitutionReason" ;
               fhir:link <http://terminology.hl7.org/ValueSet/v3-SubstanceAdminSubstitutionReason>
             ]
           ] ;
           fhir:ElementDefinition.mapping [
             fhir:index 0 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "n/a" ]
           ], [
             fhir:index 1 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "v2" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "CE/CNE/CWE" ]
           ], [
             fhir:index 2 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "CD" ]
           ], [
             fhir:index 3 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "orim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "fhir:CodeableConcept rdfs:subClassOf dt:CD" ]
           ], [
             fhir:index 4 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value ".reasonCode" ]
           ], [
             fhir:index 5 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rx-dispense-rmim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "CombinedMedicationDispense.substitutionMade.reasonCode" ]
           ]
         ], [
           fhir:index 78 ;
           fhir:Element.id [ fhir:value "MedicationDispense.substitution.responsibleParty" ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.substitution.responsibleParty" ] ;
           fhir:ElementDefinition.short [ fhir:value "Who is responsible for the substitution" ] ;
           fhir:ElementDefinition.definition [ fhir:value "The person or organization that has primary responsibility for the substitution." ] ;
           fhir:ElementDefinition.comment [ fhir:value "References SHALL be a reference to an actual FHIR resource, and SHALL be resolveable (allowing for access control, temporary unavailability, etc.). Resolution can be either by retrieval from the URL, or, where applicable by resource type, by treating an absolute reference as a canonical URL and looking it up in a local registry/repository." ] ;
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
           fhir:ElementDefinition.max [ fhir:value "*" ] ;
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "MedicationDispense.substitution.responsibleParty" ] ;
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
             fhir:ElementDefinition.base.max [ fhir:value "*" ]
           ] ;
           fhir:ElementDefinition.type [
             fhir:index 0 ;
             fhir:ElementDefinition.type.code [ fhir:value "Reference" ] ;
             fhir:ElementDefinition.type.targetProfile [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Practitioner" ;
               fhir:index 0 ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Practitioner>
             ], [
               fhir:value "http://hl7.org/fhir/StructureDefinition/PractitionerRole" ;
               fhir:index 1 ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/PractitionerRole>
             ]
           ] ;
           fhir:ElementDefinition.condition [
             fhir:value "ele-1" ;
             fhir:index 0
           ] ;
           fhir:ElementDefinition.constraint [
             fhir:index 0 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ], [
             fhir:index 1 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ref-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "SHALL have a contained resource if a local reference is provided" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Reference" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Reference>
             ]
           ] ;
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.mapping [
             fhir:index 0 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "n/a" ]
           ], [
             fhir:index 1 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "The target of a resource reference is a RIM entry point (Act, Role, or Entity)" ]
           ], [
             fhir:index 2 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value ".participation[typeCode=PFM].role[classCode=ASSIGN]" ]
           ], [
             fhir:index 3 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rx-dispense-rmim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "CombinedMedicationDispense.substitutionMade.ResponsibleParty" ]
           ]
         ], [
           fhir:index 79 ;
           fhir:Element.id [ fhir:value "MedicationDispense.detectedIssue" ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.detectedIssue" ] ;
           fhir:ElementDefinition.short [ fhir:value "Clinical issue with action" ] ;
           fhir:ElementDefinition.definition [ fhir:value "Indicates an actual or potential clinical issue with or between one or more active or proposed clinical actions for a patient; e.g. drug-drug interaction, duplicate therapy, dosage alert etc." ] ;
           fhir:ElementDefinition.comment [ fhir:value "This element can include a detected issue that has been identified either by a decision support system or by a clinician and may include information on the steps that were taken to address the issue." ] ;
           fhir:ElementDefinition.alias [
             fhir:value "Contraindication" ;
             fhir:index 0
           ], [
             fhir:value "Drug Utilization Review (DUR)" ;
             fhir:index 1
           ], [
             fhir:value "Alert" ;
             fhir:index 2
           ] ;
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
           fhir:ElementDefinition.max [ fhir:value "*" ] ;
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "MedicationDispense.detectedIssue" ] ;
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
             fhir:ElementDefinition.base.max [ fhir:value "*" ]
           ] ;
           fhir:ElementDefinition.type [
             fhir:index 0 ;
             fhir:ElementDefinition.type.code [ fhir:value "Reference" ] ;
             fhir:ElementDefinition.type.targetProfile [
               fhir:value "http://hl7.org/fhir/StructureDefinition/DetectedIssue" ;
               fhir:index 0 ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/DetectedIssue>
             ]
           ] ;
           fhir:ElementDefinition.condition [
             fhir:value "ele-1" ;
             fhir:index 0
           ] ;
           fhir:ElementDefinition.constraint [
             fhir:index 0 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ], [
             fhir:index 1 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ref-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "SHALL have a contained resource if a local reference is provided" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Reference" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Reference>
             ]
           ] ;
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.mapping [
             fhir:index 0 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "n/a" ]
           ], [
             fhir:index 1 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "The target of a resource reference is a RIM entry point (Act, Role, or Entity)" ]
           ], [
             fhir:index 2 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value ".inboundRelationship[typeCode=SUBJ]/source[classCode=ALRT,moodCode=EVN].value" ]
           ]
         ], [
           fhir:index 80 ;
           fhir:Element.id [ fhir:value "MedicationDispense.eventHistory" ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.eventHistory" ] ;
           fhir:ElementDefinition.short [ fhir:value "A list of relevant lifecycle events" ] ;
           fhir:ElementDefinition.definition [ fhir:value "A summary of the events of interest that have occurred, such as when the dispense was verified." ] ;
           fhir:ElementDefinition.comment [ fhir:value "This might not include provenances for all versions of the request – only those deemed “relevant” or important. This SHALL NOT include the Provenance associated with this current version of the resource. (If that provenance is deemed to be a “relevant” change, it will need to be added as part of a later update. Until then, it can be queried directly as the Provenance that points to this version using _revinclude All Provenances should have some historical version of this Request as their subject.)." ] ;
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
           fhir:ElementDefinition.max [ fhir:value "*" ] ;
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "MedicationDispense.eventHistory" ] ;
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ] ;
             fhir:ElementDefinition.base.max [ fhir:value "*" ]
           ] ;
           fhir:ElementDefinition.type [
             fhir:index 0 ;
             fhir:ElementDefinition.type.code [ fhir:value "Reference" ] ;
             fhir:ElementDefinition.type.targetProfile [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Provenance" ;
               fhir:index 0 ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Provenance>
             ]
           ] ;
           fhir:ElementDefinition.condition [
             fhir:value "ele-1" ;
             fhir:index 0
           ] ;
           fhir:ElementDefinition.constraint [
             fhir:index 0 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ], [
             fhir:index 1 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "ref-1" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "SHALL have a contained resource if a local reference is provided" ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" ] ;
             fhir:ElementDefinition.constraint.xpath [ fhir:value "not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Reference" ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Reference>
             ]
           ] ;
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ] ;
           fhir:ElementDefinition.mapping [
             fhir:index 0 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "n/a" ]
           ], [
             fhir:index 1 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value "The target of a resource reference is a RIM entry point (Act, Role, or Entity)" ]
           ], [
             fhir:index 2 ;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ] ;
             fhir:ElementDefinition.mapping.map [ fhir:value ".inboundRelationship(typeCode=SUBJ].source[classCode=CACT, moodCode=EVN]" ]
           ]
         ]
      ] ;
      fhir:StructureDefinition.differential [
         fhir:StructureDefinition.differential.element [
           fhir:index 0 ;
           fhir:Element.id [ fhir:value "MedicationDispense" ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense" ]
         ], [
           fhir:index 1 ;
           fhir:Element.id [ fhir:value "MedicationDispense.identifier" ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.identifier" ] ;
           fhir:ElementDefinition.short [ fhir:value "ePrescription identifier" ] ;
           fhir:ElementDefinition.min [ fhir:value "1"^^xsd:nonNegativeInteger ]
         ], [
           fhir:index 2 ;
           fhir:Element.id [ fhir:value "MedicationDispense.identifier:prescriptionID" ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.identifier" ] ;
           fhir:ElementDefinition.sliceName [ fhir:value "prescriptionID" ] ;
           fhir:ElementDefinition.min [ fhir:value "1"^^xsd:nonNegativeInteger ] ;
           fhir:ElementDefinition.max [ fhir:value "1" ] ;
           fhir:ElementDefinition.type [
             fhir:index 0 ;
             fhir:ElementDefinition.type.code [ fhir:value "Identifier" ] ;
             fhir:ElementDefinition.type.profile [
               fhir:value "https://gematik.de/fhir/ti/StructureDefinition/e-prescription-id" ;
               fhir:index 0 ;
               fhir:link <https://gematik.de/fhir/ti/StructureDefinition/e-prescription-id>
             ]
           ] ;
           fhir:ElementDefinition.patternIdentifier [
             fhir:Identifier.system [ fhir:value "https://gematik.de/fhir/erp/NamingSystem/GEM_ERP_NS_PrescriptionId" ]
           ]
         ], [
           fhir:index 3 ;
           fhir:Element.id [ fhir:value "MedicationDispense.status" ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.status" ] ;
           fhir:ElementDefinition.short [ fhir:value "completed" ] ;
           fhir:ElementDefinition.fixedCode [ fhir:value "completed" ]
         ], [
           fhir:index 4 ;
           fhir:Element.id [ fhir:value "MedicationDispense.medication[x]" ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.medication[x]" ] ;
           fhir:ElementDefinition.definition [ fhir:value "The MedicationDispense references a medication which was dispensed" ] ;
           fhir:ElementDefinition.type [
             fhir:index 0 ;
             fhir:ElementDefinition.type.code [ fhir:value "Reference" ] ;
             fhir:ElementDefinition.type.targetProfile [
               fhir:value "https://gematik.de/fhir/tiflow-xborder/StructureDefinition/GEM-ERPEU-PR-Medication" ;
               fhir:index 0 ;
               fhir:link <https://gematik.de/fhir/tiflow-xborder/StructureDefinition/GEM-ERPEU-PR-Medication>
             ]
           ]
         ], [
           fhir:index 5 ;
           fhir:Element.id [ fhir:value "MedicationDispense.performer" ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.performer" ] ;
           fhir:ElementDefinition.definition [ fhir:value "References a pracitioner role in order to state practitioner and organization information" ]
         ], [
           fhir:index 6 ;
           fhir:Element.id [ fhir:value "MedicationDispense.performer.actor" ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.performer.actor" ] ;
           fhir:ElementDefinition.type [
             fhir:index 0 ;
             fhir:ElementDefinition.type.code [ fhir:value "Reference" ] ;
             fhir:ElementDefinition.type.targetProfile [
               fhir:value "https://gematik.de/fhir/tiflow-xborder/StructureDefinition/GEM-ERPEU-PR-PractitionerRole" ;
               fhir:index 0 ;
               fhir:link <https://gematik.de/fhir/tiflow-xborder/StructureDefinition/GEM-ERPEU-PR-PractitionerRole>
             ]
           ]
         ], [
           fhir:index 7 ;
           fhir:Element.id [ fhir:value "MedicationDispense.quantity" ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.quantity" ] ;
           fhir:ElementDefinition.short [ fhir:value "Number of dispensed packages/ units" ] ;
           fhir:ElementDefinition.constraint [
             fhir:index 0 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "erp-eu-positiveAnzahlPackungen" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "Der Wert der Packungen muss positiv sein (größer gleich 0)." ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "value>=0" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "https://gematik.de/fhir/tiflow-xborder/StructureDefinition/GEM-ERPEU-PR-MedicationDispense" ;
               fhir:link <https://gematik.de/fhir/tiflow-xborder/StructureDefinition/GEM-ERPEU-PR-MedicationDispense>
             ]
           ] ;
           fhir:ElementDefinition.mustSupport [ fhir:value "true"^^xsd:boolean ]
         ], [
           fhir:index 8 ;
           fhir:Element.id [ fhir:value "MedicationDispense.quantity.value" ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.quantity.value" ] ;
           fhir:ElementDefinition.mustSupport [ fhir:value "true"^^xsd:boolean ]
         ], [
           fhir:index 9 ;
           fhir:Element.id [ fhir:value "MedicationDispense.quantity.unit" ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.quantity.unit" ] ;
           fhir:ElementDefinition.mustSupport [ fhir:value "true"^^xsd:boolean ]
         ], [
           fhir:index 10 ;
           fhir:Element.id [ fhir:value "MedicationDispense.whenPrepared" ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.whenPrepared" ] ;
           fhir:ElementDefinition.constraint [
             fhir:index 0 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "erp-eu-abgabeDatumsFormat" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "Wert muss ein Datum in der Form: YYYY-MM-DD sein." ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "toString().length()=10" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "https://gematik.de/fhir/tiflow-xborder/StructureDefinition/GEM-ERPEU-PR-MedicationDispense" ;
               fhir:link <https://gematik.de/fhir/tiflow-xborder/StructureDefinition/GEM-ERPEU-PR-MedicationDispense>
             ]
           ]
         ], [
           fhir:index 11 ;
           fhir:Element.id [ fhir:value "MedicationDispense.whenHandedOver" ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.whenHandedOver" ] ;
           fhir:ElementDefinition.constraint [
             fhir:index 0 ;
             fhir:ElementDefinition.constraint.key [ fhir:value "erp-eu-abgabeDatumsFormat" ] ;
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ] ;
             fhir:ElementDefinition.constraint.human [ fhir:value "Wert muss ein Datum in der Form: YYYY-MM-DD sein." ] ;
             fhir:ElementDefinition.constraint.expression [ fhir:value "toString().length()=10" ] ;
             fhir:ElementDefinition.constraint.source [
               fhir:value "https://gematik.de/fhir/tiflow-xborder/StructureDefinition/GEM-ERPEU-PR-MedicationDispense" ;
               fhir:link <https://gematik.de/fhir/tiflow-xborder/StructureDefinition/GEM-ERPEU-PR-MedicationDispense>
             ]
           ]
         ], [
           fhir:index 12 ;
           fhir:Element.id [ fhir:value "MedicationDispense.substitution.wasSubstituted" ] ;
           fhir:ElementDefinition.path [ fhir:value "MedicationDispense.substitution.wasSubstituted" ] ;
           fhir:ElementDefinition.short [ fhir:value "Indicates whether a substitution was made on the dispensed medication" ] ;
           fhir:ElementDefinition.mustSupport [ fhir:value "true"^^xsd:boolean ]
         ]
      ] .

    # - ontology header ------------------------------------------------------------

    <http://hl7.org/fhir/StructureDefinition/GEM-ERPEU-PR-MedicationDispense.ttl> a owl:Ontology ;
      owl:imports fhir:fhir.ttl ;
      owl:versionIRI <http://build.fhir.org/StructureDefinition/GEM-ERPEU-PR-MedicationDispense.ttl> .