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

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

<https://gematik.de/fhir/epa-medication/StructureDefinition/epa-medication-statement> a fhir:StructureDefinition ;
  fhir:nodeRole fhir:treeRoot ;
  fhir:id [ fhir:v "epa-medication-statement"] ; # 
  fhir:text [
     fhir:status [ fhir:v "extensions" ] ;
     fhir:div "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p class=\"res-header-id\"><b>Generated Narrative: StructureDefinition epa-medication-statement</b></p><a name=\"epa-medication-statement\"> </a><a name=\"hcepa-medication-statement\"> </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,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3goXBCwdPqAP0wAAAldJREFUOMuNk0tIlFEYhp9z/vE2jHkhxXA0zJCMitrUQlq4lnSltEqCFhFG2MJFhIvIFpkEWaTQqjaWZRkp0g26URZkTpbaaOJkDqk10szoODP//7XIMUe0elcfnPd9zsfLOYplGrpRwZaqTtw3K7PtGem7Q6FoidbGgqHVy/HRb669R+56zx7eRV1L31JGxYbBtjKK93cxeqfyQHbehkZbUkK20goELEuIzEd+dHS+qz/Y8PTSif0FnGkbiwcAjHaU1+QWOptFiyCLp/LnKptpqIuXHx6rbR26kJcBX3yLgBfnd7CxwJmflpP2wUg0HIAoUUpZBmKzELGWcN8nAr6Gpu7tLU/CkwAaoKTWRSQyt89Q8w6J+oVQkKnBoblH7V0PPvUOvDYXfopE/SJmALsxnVm6LbkotrUtNowMeIrVrBcBpaMmdS0j9df7abpSuy7HWehwJdt1lhVwi/J58U5beXGAF6c3UXLycw1wdFklArBn87xdh0ZsZtArghBdAA3+OEDVubG4UEzP6x1FOWneHh2VDAHBAt80IbdXDcesNoCvs3E5AFyNSU5nbrDPZpcUEQQTFZiEVx+51fxMhhyJEAgvlriadIJZZksRuwBYMOPBbO3hePVVqgEJhFeUuFLhIPkRP6BQLIBrmMenujm/3g4zc398awIe90Zb5A1vREALqneMcYgP/xVQWlG+Ncu5vgwwlaUNx+3799rfe96u9K0JSDXcOzOTJg4B6IgmXfsygc7/Bvg9g9E58/cDVmGIBOP/zT8Bz1zqWqpbXIsd0O9hajXfL6u4BaOS6SeWAAAAAElFTkSuQmCC\" 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-epa-medication-statement-definitions.html#MedicationStatement\">MedicationStatement</a><a name=\"MedicationStatement\"> </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 ( epa-med-statement-status )\">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\">*</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/medicationstatement.html\">MedicationStatement</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\">Record of medication being taken by a patient</span><br class=\"constraint\"/><span title=\"null\" class=\"constraint\">Constraints: </span><span style=\"font-weight:bold\" title=\"Ein MedicationStatement im Kontext 'Nachtrag' darf nicht den Status 'intended' haben\" class=\"constraint\">epa-med-statement-status</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-epa-medication-statement-definitions.html#MedicationStatement.meta\">meta</a><a name=\"MedicationStatement.meta\"> </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: red\" 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#Meta\">Meta</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\">Metadata about the resource</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-epa-medication-statement-definitions.html#MedicationStatement.meta.versionId\">versionId</a><a name=\"MedicationStatement.meta.versionId\"> </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: red\" 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#id\">id</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\">Version specific identifier</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-epa-medication-statement-definitions.html#MedicationStatement.meta.lastUpdated\">lastUpdated</a><a name=\"MedicationStatement.meta.lastUpdated\"> </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: red\" 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#instant\">instant</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 the resource version last changed</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_extension_simple.png\" alt=\".\" style=\"background-color: white; background-color: inherit\" title=\"Simple Extension\" class=\"hierarchy\"/> <a href=\"StructureDefinition-epa-medication-statement-definitions.html#MedicationStatement.extension\">extension</a><a name=\"MedicationStatement.extension\"> </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..<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 style=\"opacity: 0.5; opacity: 0.5\" href=\"http://hl7.org/fhir/R4/extensibility.html#Extension\">Extension</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\">Extension</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_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: #F7F7F7; background-color: inherit\" title=\"Slice Definition\" class=\"hierarchy\"/> Slices for extension<a name=\"MedicationStatement.extension.2\"> </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\"/><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\">Content/Rules for all slices</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_bck135.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_slicer.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"icon_slice_item.png\" alt=\".\" style=\"background-color: white; background-color: inherit\" title=\"Slice Item\" class=\"hierarchy\"/> <a href=\"StructureDefinition-epa-medication-statement-definitions.html#MedicationStatement.extension:context\" title=\"Extension URL = https://gematik.de/fhir/epa-medication/StructureDefinition/context-extension\">extension:context</a><a name=\"MedicationStatement.extension.3\"> </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: red\" 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\">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\">(Complex)</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\">Extension</span><br/><span style=\"font-weight:bold\">URL: </span><a href=\"StructureDefinition-context-extension.html\">https://gematik.de/fhir/epa-medication/StructureDefinition/context-extension</a></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_bck1340.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_vline_slicer.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_element.gif\" alt=\".\" style=\"background-color: #F7F7F7; background-color: inherit\" title=\"Element\" class=\"hierarchy\"/> <a href=\"StructureDefinition-epa-medication-statement-definitions.html#MedicationStatement.extension:context.value[x]\">value[x]</a><a name=\"MedicationStatement.extension.value_x_\"> </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\"><span style=\"opacity: 0.5\">Context of the resource</span><br class=\"binding\"/><span style=\"font-weight:bold\" title=\"null\" class=\"binding\">Binding: </span><a href=\"ValueSet-epa-medicationstatement-context-code.html\" title=\"https://gematik.de/fhir/epa-medication/ValueSet/epa-medicationstatement-context-code\" class=\"binding\">ePA MedicationStatement Context Codes</a><span title=\"null\" class=\"binding\"> (</span><a href=\"http://hl7.org/fhir/R4/terminologies.html#required\" title=\"To be conformant, the concept in this element SHALL be from the specified value set.\" class=\"binding\">required</a><span title=\"null\" class=\"binding\">)</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_bck134.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_slicer.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"icon_slice_item.png\" alt=\".\" style=\"background-color: white; background-color: inherit\" title=\"Slice Item\" class=\"hierarchy\"/> <a href=\"StructureDefinition-epa-medication-statement-definitions.html#MedicationStatement.extension:rxPrescriptionProcessIdentifier\" title=\"Extension URL = https://gematik.de/fhir/epa-medication/StructureDefinition/rx-prescription-process-identifier-extension\">extension:rxPrescriptionProcessIdentifier</a><a name=\"MedicationStatement.extension.4\"> </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\">0..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=\"StructureDefinition-rx-prescription-process-identifier.html\" title=\"Identifier\">RxPrescriptionProcessIdentifier</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\">Extension</span><br/><span style=\"font-weight:bold\">URL: </span><a href=\"StructureDefinition-rx-prescription-process-identifier-extension.html\">https://gematik.de/fhir/epa-medication/StructureDefinition/rx-prescription-process-identifier-extension</a></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_bck124.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-epa-medication-statement-definitions.html#MedicationStatement.extension:processingEvent\" title=\"Extension URL = https://gematik.de/fhir/epa-medication/StructureDefinition/epa-medicationstatement-processing-event-extension\">extension:processingEvent</a><a name=\"MedicationStatement.extension.5\"> </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: red\" 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\">0..*</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\">(Complex)</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\">Ein Ereignis, welches während eines Prozessschritts auftritt.<br/><span style=\"font-weight:bold\">URL: </span><a href=\"StructureDefinition-epa-medicationstatement-processing-event-extension.html\">https://gematik.de/fhir/epa-medication/StructureDefinition/epa-medicationstatement-processing-event-extension</a><br/></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_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: white; background-color: inherit\" title=\"Element\" class=\"hierarchy\"/> <a href=\"StructureDefinition-epa-medication-statement-definitions.html#MedicationStatement.basedOn\">basedOn</a><a name=\"MedicationStatement.basedOn\"> </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_bck103.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_slice.png\" alt=\".\" style=\"background-color: #F7F7F7; background-color: inherit\" title=\"Slice Definition\" class=\"hierarchy\"/> Slices for extension<a name=\"MedicationStatement.basedOn.extension\"> </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\"/><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\">Content/Rules for all slices</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_bck1024.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_slicer.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"icon_slice_item.png\" alt=\".\" style=\"background-color: white; background-color: inherit\" title=\"Slice Item\" class=\"hierarchy\"/> <a href=\"StructureDefinition-epa-medication-statement-definitions.html#MedicationStatement.basedOn.extension:isEMP\" title=\"Extension URL = https://gematik.de/fhir/epa-medication/StructureDefinition/is-emp-extension\">extension:isEMP</a><a name=\"MedicationStatement.basedOn.extension.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\">0..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#boolean\">boolean</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\">Extension</span><br/><span style=\"font-weight:bold\">URL: </span><a href=\"StructureDefinition-is-emp-extension.html\">https://gematik.de/fhir/epa-medication/StructureDefinition/is-emp-extension</a></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-epa-medication-statement-definitions.html#MedicationStatement.status\">status</a><a name=\"MedicationStatement.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\"><span style=\"padding-left: 3px; padding-right: 3px; color: white; background-color: red\" 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#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\">unknown | entered-in-error | intended<br class=\"binding\"/><span style=\"font-weight:bold\" title=\"null\" class=\"binding\">Binding: </span><a href=\"ValueSet-epa-medication-statement-status-vs.html\" title=\"https://gematik.de/fhir/epa-medication/ValueSet/epa-medication-statement-status-vs\" class=\"binding\">ePA MedicationStatement Status Value Set</a><span title=\"null\" class=\"binding\"> (</span><a href=\"http://hl7.org/fhir/R4/terminologies.html#required\" title=\"To be conformant, the concept in this element SHALL be from the specified value set.\" class=\"binding\">required</a><span title=\"null\" class=\"binding\">)</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-epa-medication-statement-definitions.html#MedicationStatement.medication[x]\">medication[x]</a><a name=\"MedicationStatement.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\"><span style=\"padding-left: 3px; padding-right: 3px; color: white; background-color: red\" 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\">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-epa-medication.html\">EPA 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\">Arzneimittel, welches diese Medikationsinformation bzw. dieses MedicationStatement näher beschreibt</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_reference.png\" alt=\".\" style=\"background-color: #F7F7F7; background-color: inherit\" title=\"Reference to another Resource\" class=\"hierarchy\"/> <a href=\"StructureDefinition-epa-medication-statement-definitions.html#MedicationStatement.subject\">subject</a><a name=\"MedicationStatement.subject\"> </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: red\" 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 href=\"http://hl7.org/fhir/R4/references.html\">Reference</a>(<a href=\"http://hl7.org/fhir/R4/patient.html\">Patient</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 is/was taking  the medication</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_datatype.gif\" alt=\".\" style=\"background-color: white; background-color: inherit\" title=\"Data Type\" class=\"hierarchy\"/> <a href=\"StructureDefinition-epa-medication-statement-definitions.html#MedicationStatement.subject.identifier\">identifier</a><a name=\"MedicationStatement.subject.identifier\"> </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: red\" 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\">1..<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=\"https://simplifier.net/resolve?scope=de.basisprofil.r4@1.5.4&amp;canonical=http://fhir.de/StructureDefinition/identifier-kvid-10\" title=\"Identifier\">IdentifierKvid10(1.5.4)</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\">Logical reference, when literal reference is not known</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_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: #F7F7F7; background-color: inherit\" title=\"Slice Definition\" class=\"hierarchy\"/> <a style=\"font-style: italic; font-style: italic\" href=\"StructureDefinition-epa-medication-statement-definitions.html#MedicationStatement.effective[x]\" title=\"Das Element effective[x] gibt den Zeitraum an, in dem die Angaben zur Medikation gültig sind. Je nach Situation kann hierfür ein einzelner Zeitpunkt (effectiveDateTime) oder ein Zeitraum (effectivePeriod mit Start und ggf. Enddatum) angegeben werden\">Slices for effective[x]</a><a name=\"MedicationStatement.effective_x_\"> </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: red; font-style: italic\" 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=\"font-style: italic\"/><span style=\"opacity: 0.5; font-style: italic\">0</span><span style=\"opacity: 0.5; font-style: italic\">..</span><span style=\"opacity: 0.5; font-style: italic\">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; font-style: italic; opacity: 0.5; font-style: italic\" href=\"http://hl7.org/fhir/R4/datatypes.html#dateTime\">dateTime</a><span style=\"opacity: 0.5; font-style: italic\">, </span><a style=\"opacity: 0.5; font-style: italic; opacity: 0.5; font-style: italic\" href=\"http://hl7.org/fhir/R4/datatypes.html#Period\">Period</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=\"font-style: italic\">effective[x] gibt den Zeitpunkt oder Zeitraum der Gültigkeit der Medikation an</span><br style=\"font-style: italic\"/><span style=\"font-weight:bold; font-style: italic\">Slice: </span><span style=\"font-style: italic\">Unordered, Open by type:$this</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_bck134.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_slicer.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"icon_slice_item.png\" alt=\".\" style=\"background-color: white; background-color: inherit\" title=\"Slice Item\" class=\"hierarchy\"/> <a href=\"StructureDefinition-epa-medication-statement-definitions.html#MedicationStatement.effective[x]:effectiveDateTime\" title=\"Slice effectiveDateTime\">effective[x]:effectiveDateTime</a><a name=\"MedicationStatement.effective_x_.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\"><span style=\"padding-left: 3px; padding-right: 3px; color: white; background-color: red\" 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 ( epa-datetime )\">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\">0..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#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\">The date/time or interval when the medication is/was/will be taken</span><br class=\"constraint\"/><span title=\"null\" class=\"constraint\">Constraints: </span><span style=\"font-weight:bold\" title=\"dateTime muss mindestens aus Tag, Monat und Jahr bestehen\" class=\"constraint\">epa-datetime</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_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-epa-medication-statement-definitions.html#MedicationStatement.effective[x]:effectivePeriod\" title=\"Slice effectivePeriod\">effective[x]:effectivePeriod</a><a name=\"MedicationStatement.effective_x_.3\"> </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: red\" 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\">0..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=\"http://hl7.org/fhir/R4/datatypes.html#Period\">Period</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\">The date/time or interval when the medication is/was/will be taken</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_bck1250.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_slice.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-epa-medication-statement-definitions.html#MedicationStatement.effective[x]:effectivePeriod.start\">start</a><a name=\"MedicationStatement.effective_x_.start\"> </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: red\" 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 ( epa-datetime )\">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\">Starting time with inclusive boundary</span><br class=\"constraint\"/><span title=\"null\" class=\"constraint\">Constraints: </span><span style=\"font-weight:bold\" title=\"dateTime muss mindestens aus Tag, Monat und Jahr bestehen\" class=\"constraint\">epa-datetime</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_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_element.gif\" alt=\".\" style=\"background-color: #F7F7F7; background-color: inherit\" title=\"Element\" class=\"hierarchy\"/> <a href=\"StructureDefinition-epa-medication-statement-definitions.html#MedicationStatement.effective[x]:effectivePeriod.end\">end</a><a name=\"MedicationStatement.effective_x_.end\"> </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: red\" 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 ( epa-datetime )\">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#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\">End time with inclusive boundary, if not ongoing</span><br class=\"constraint\"/><span title=\"null\" class=\"constraint\">Constraints: </span><span style=\"font-weight:bold\" title=\"dateTime muss mindestens aus Tag, Monat und Jahr bestehen\" class=\"constraint\">epa-datetime</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-epa-medication-statement-definitions.html#MedicationStatement.dateAsserted\">dateAsserted</a><a name=\"MedicationStatement.dateAsserted\"> </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: red\" 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 ( epa-datetime )\">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 the statement was asserted?</span><br class=\"constraint\"/><span title=\"null\" class=\"constraint\">Constraints: </span><span style=\"font-weight:bold\" title=\"dateTime muss mindestens aus Tag, Monat und Jahr bestehen\" class=\"constraint\">epa-datetime</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_reference.png\" alt=\".\" style=\"background-color: #F7F7F7; background-color: inherit\" title=\"Reference to another Resource\" class=\"hierarchy\"/> <a href=\"StructureDefinition-epa-medication-statement-definitions.html#MedicationStatement.derivedFrom\">derivedFrom</a><a name=\"MedicationStatement.derivedFrom\"> </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: red\" 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\">*</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 href=\"http://hl7.org/fhir/R4/references.html\">Reference</a>(<a href=\"StructureDefinition-epa-medication-request.html\">EPA MedicationRequest</a> | <a href=\"StructureDefinition-epa-medication-dispense.html\">EPA MedicationDispense</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\">Information des Verschreibungs- und Dispensierprozesses</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_bck00.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_datatype.gif\" alt=\".\" style=\"background-color: white; background-color: inherit\" title=\"Data Type\" class=\"hierarchy\"/> <a href=\"StructureDefinition-epa-medication-statement-definitions.html#MedicationStatement.dosage\" title=\"Hier werden strukturierte Informationen zur Dosierung/Gebrauchsanweisung zur Arzneimitteleinnahme gemäß Vorgabe von HL7 Deutschland e.V. angegeben.\">dosage</a><a name=\"MedicationStatement.dosage\"> </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: red\" 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\">*</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://ig.fhir.de/igs/medication/1.0.0-ballot/StructureDefinition-DosageDgMP.html\" title=\"Dosage\">DosageDgMP</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\">Strukturierte Dosierung/Gebrauchsanweisung</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,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3goXBCwdPqAP0wAAAldJREFUOMuNk0tIlFEYhp9z/vE2jHkhxXA0zJCMitrUQlq4lnSltEqCFhFG2MJFhIvIFpkEWaTQqjaWZRkp0g26URZkTpbaaOJkDqk10szoODP//7XIMUe0elcfnPd9zsfLOYplGrpRwZaqTtw3K7PtGem7Q6FoidbGgqHVy/HRb669R+56zx7eRV1L31JGxYbBtjKK93cxeqfyQHbehkZbUkK20goELEuIzEd+dHS+qz/Y8PTSif0FnGkbiwcAjHaU1+QWOptFiyCLp/LnKptpqIuXHx6rbR26kJcBX3yLgBfnd7CxwJmflpP2wUg0HIAoUUpZBmKzELGWcN8nAr6Gpu7tLU/CkwAaoKTWRSQyt89Q8w6J+oVQkKnBoblH7V0PPvUOvDYXfopE/SJmALsxnVm6LbkotrUtNowMeIrVrBcBpaMmdS0j9df7abpSuy7HWehwJdt1lhVwi/J58U5beXGAF6c3UXLycw1wdFklArBn87xdh0ZsZtArghBdAA3+OEDVubG4UEzP6x1FOWneHh2VDAHBAt80IbdXDcesNoCvs3E5AFyNSU5nbrDPZpcUEQQTFZiEVx+51fxMhhyJEAgvlriadIJZZksRuwBYMOPBbO3hePVVqgEJhFeUuFLhIPkRP6BQLIBrmMenujm/3g4zc398awIe90Zb5A1vREALqneMcYgP/xVQWlG+Ncu5vgwwlaUNx+3799rfe96u9K0JSDXcOzOTJg4B6IgmXfsygc7/Bvg9g9E58/cDVmGIBOP/zT8Bz1zqWqpbXIsd0O9hajXfL6u4BaOS6SeWAAAAAElFTkSuQmCC\" alt=\"doco\" style=\"background-color: inherit\"/> Documentation for this format</a></td></tr></table></div>"^^rdf:XMLLiteral
  ] ; # 
  fhir:url [ fhir:v "https://gematik.de/fhir/epa-medication/StructureDefinition/epa-medication-statement"^^xsd:anyURI] ; # 
  fhir:version [ fhir:v "1.2.0-ballot.2"] ; # 
  fhir:name [ fhir:v "EPAMedicationStatement"] ; # 
  fhir:title [ fhir:v "EPA MedicationStatement"] ; # 
  fhir:status [ fhir:v "draft"] ; # 
  fhir:experimental [ fhir:v false] ; # 
  fhir:date [ fhir:v "2025-09-02"^^xsd:date] ; # 
  fhir:publisher [ fhir:v "gematik GmbH"] ; # 
  fhir:contact ( [
     fhir:name [ fhir:v "gematik GmbH" ] ;
     fhir:telecom ( [
       fhir:system [ fhir:v "url" ] ;
       fhir:value [ fhir:v "https://www.gematik.de" ]
     ] [
       fhir:system [ fhir:v "email" ] ;
       fhir:value [ fhir:v "patientteam [ at ] gematik.de" ]
     ] )
  ] ) ; # 
  fhir:description [ fhir:v "Hält die Medikationsinformationen eines Eintrags in der elektronischen Medikationsliste (eML) vor und stellt das zentrale Element dar. Es wird zu Verschreibungs- und Dispensierinformationen als auch Nachträgen in der eML genutzt."] ; # 
  fhir:jurisdiction ( [
     fhir:coding ( [
       fhir:system [ fhir:v "urn:iso:std:iso:3166"^^xsd:anyURI ] ;
       fhir:code [ fhir:v "DE" ]
     ] )
  ] ) ; # 
  fhir:fhirVersion [ fhir:v "4.0.1"] ; # 
  fhir:mapping ( [
     fhir:identity [ fhir:v "workflow" ] ;
     fhir:uri [ fhir:v "http://hl7.org/fhir/workflow"^^xsd:anyURI ] ;
     fhir:name [ fhir:v "Workflow Pattern" ]
  ] [
     fhir:identity [ fhir:v "rim" ] ;
     fhir:uri [ fhir:v "http://hl7.org/v3"^^xsd:anyURI ] ;
     fhir:name [ fhir:v "RIM Mapping" ]
  ] [
     fhir:identity [ fhir:v "w5" ] ;
     fhir:uri [ fhir:v "http://hl7.org/fhir/fivews"^^xsd:anyURI ] ;
     fhir:name [ fhir:v "FiveWs Pattern Mapping" ]
  ] [
     fhir:identity [ fhir:v "v2" ] ;
     fhir:uri [ fhir:v "http://hl7.org/v2"^^xsd:anyURI ] ;
     fhir:name [ fhir:v "HL7 v2 Mapping" ]
  ] ) ; # 
  fhir:kind [ fhir:v "resource"] ; # 
  fhir:abstract [ fhir:v false] ; # 
  fhir:type [ fhir:v "MedicationStatement"^^xsd:anyURI] ; # 
  fhir:baseDefinition [
     fhir:v "http://hl7.org/fhir/StructureDefinition/MedicationStatement"^^xsd:anyURI ;
     fhir:link <http://hl7.org/fhir/StructureDefinition/MedicationStatement>
  ] ; # 
  fhir:derivation [ fhir:v "constraint"] ; # 
  fhir:snapshot [
     fhir:extension ( [
       fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/snapshot-base-version"^^xsd:anyURI ] ;
       fhir:value [
         a fhir:string ;
         fhir:v "4.0.1"
       ]
     ] ) ;
     fhir:element ( [
       fhir:id [ fhir:v "MedicationStatement" ] ;
       fhir:path [ fhir:v "MedicationStatement" ] ;
       fhir:short [ fhir:v "Record of medication being taken by a patient" ] ;
       fhir:definition [ fhir:v "A record of a medication that is being consumed by a patient.   A MedicationStatement may indicate that the patient may be taking the medication now or has taken the medication in the past or will be taking the medication in the future.  The source of this information can be the patient, significant other (such as a family member or spouse), or a clinician.  A common scenario where this information is captured is during the history taking process during a patient visit or stay.   The medication information may come from sources such as the patient's memory, from a prescription bottle,  or from a list of medications the patient, clinician or other party maintains. \n\nThe primary difference between a medication statement and a medication administration is that the medication administration has complete administration information and is based on actual administration information from the person who administered the medication.  A medication statement is often, if not always, less specific.  There is no required date/time when the medication was administered, in fact we only know that a source has reported the patient is taking this medication, where details such as time, quantity, or rate or even medication product may be incomplete or missing or less precise.  As stated earlier, the medication statement information may come from the patient's memory, from a prescription bottle or from a list of medications the patient, clinician or other party maintains.  Medication administration is more formal and is not missing detailed information." ] ;
       fhir:comment [ fhir:v "When interpreting a medicationStatement, the value of the status and NotTaken needed to be considered:\rMedicationStatement.status + MedicationStatement.wasNotTaken\rStatus=Active + NotTaken=T = Not currently taking\rStatus=Completed + NotTaken=T = Not taken in the past\rStatus=Intended + NotTaken=T = No intention of taking\rStatus=Active + NotTaken=F = Taking, but not as prescribed\rStatus=Active + NotTaken=F = Taking\rStatus=Intended +NotTaken= F = Will be taking (not started)\rStatus=Completed + NotTaken=F = Taken in past\rStatus=In Error + NotTaken=N/A = In Error." ] ;
       fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
       fhir:max [ fhir:v "*" ] ;
       fhir:base [
         fhir:path [ fhir:v "MedicationStatement" ] ;
         fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
         fhir:max [ fhir:v "*" ]
       ] ;
       fhir:constraint ( [
         fhir:key [ fhir:v "dom-2" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "If the resource is contained in another resource, it SHALL NOT contain nested Resources" ] ;
         fhir:expression [ fhir:v "contained.contained.empty()" ] ;
         fhir:xpath [ fhir:v "not(parent::f:contained and f:contained)" ] ;
         fhir:source [
           fhir:v "http://hl7.org/fhir/StructureDefinition/MedicationStatement"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/MedicationStatement>
         ]
       ] [
         fhir:key [ fhir:v "dom-3" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "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:expression [ fhir:v "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:xpath [ fhir:v "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:source [
           fhir:v "http://hl7.org/fhir/StructureDefinition/MedicationStatement"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/MedicationStatement>
         ]
       ] [
         fhir:key [ fhir:v "dom-4" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated" ] ;
         fhir:expression [ fhir:v "contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()" ] ;
         fhir:xpath [ fhir:v "not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))" ] ;
         fhir:source [
           fhir:v "http://hl7.org/fhir/StructureDefinition/MedicationStatement"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/MedicationStatement>
         ]
       ] [
         fhir:key [ fhir:v "dom-5" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "If a resource is contained in another resource, it SHALL NOT have a security label" ] ;
         fhir:expression [ fhir:v "contained.meta.security.empty()" ] ;
         fhir:xpath [ fhir:v "not(exists(f:contained/*/f:meta/f:security))" ] ;
         fhir:source [
           fhir:v "http://hl7.org/fhir/StructureDefinition/MedicationStatement"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/MedicationStatement>
         ]
       ] [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice"^^xsd:anyURI ] ;
           fhir:value [
             a fhir:boolean ;
             fhir:v true
           ]
         ] [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice-explanation"^^xsd:anyURI ] ;
           fhir:value [
             a fhir:markdown ;
             fhir:v "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:key [ fhir:v "dom-6" ] ;
         fhir:severity [ fhir:v "warning" ] ;
         fhir:human [ fhir:v "A resource should have narrative for robust management" ] ;
         fhir:expression [ fhir:v "text.`div`.exists()" ] ;
         fhir:xpath [ fhir:v "exists(f:text/h:div)" ] ;
         fhir:source [
           fhir:v "http://hl7.org/fhir/StructureDefinition/MedicationStatement"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/MedicationStatement>
         ]
       ] [
         fhir:key [ fhir:v "epa-med-statement-status" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "Ein MedicationStatement im Kontext 'Nachtrag' darf nicht den Status 'intended' haben" ] ;
         fhir:expression [ fhir:v "extension('https://gematik.de/fhir/epa-medication/StructureDefinition/context-extension').exists(value != 'MANUAL') or status != 'intended'" ] ;
         fhir:source [
           fhir:v "https://gematik.de/fhir/epa-medication/StructureDefinition/epa-medication-statement"^^xsd:anyURI ;
           fhir:link <https://gematik.de/fhir/epa-medication/StructureDefinition/epa-medication-statement>
         ]
       ] ) ;
       fhir:isModifier [ fhir:v false ] ;
       fhir:isSummary [ fhir:v false ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "Entity. Role, or Act" ]
       ] [
         fhir:identity [ fhir:v "workflow" ] ;
         fhir:map [ fhir:v "Event" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "SubstanceAdministration" ]
       ] )
     ] [
       fhir:id [ fhir:v "MedicationStatement.id" ] ;
       fhir:path [ fhir:v "MedicationStatement.id" ] ;
       fhir:short [ fhir:v "Logical id of this artifact" ] ;
       fhir:definition [ fhir:v "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes." ] ;
       fhir:comment [ fhir:v "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:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "Resource.id" ] ;
         fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"^^xsd:anyURI ] ;
           fhir:value [
             a fhir:url ;
             fhir:v "id"^^xsd:anyURI
           ]
         ] ) ;
         fhir:code [ fhir:v "http://hl7.org/fhirpath/System.String"^^xsd:anyURI ]
       ] ) ;
       fhir:isModifier [ fhir:v false ] ;
       fhir:isSummary [ fhir:v true ]
     ] [
       fhir:id [ fhir:v "MedicationStatement.meta" ] ;
       fhir:path [ fhir:v "MedicationStatement.meta" ] ;
       fhir:short [ fhir:v "Metadata about the resource" ] ;
       fhir:definition [ fhir:v "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:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "Resource.meta" ] ;
         fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "Meta"^^xsd:anyURI ]
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:xpath [ fhir:v "@value|f:*|h:div" ] ;
         fhir:source [
           fhir:v "http://hl7.org/fhir/StructureDefinition/Element"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
         ]
       ] ) ;
       fhir:mustSupport [ fhir:v true ] ;
       fhir:isModifier [ fhir:v false ] ;
       fhir:isSummary [ fhir:v true ]
     ] [
       fhir:id [ fhir:v "MedicationStatement.meta.id" ] ;
       fhir:path [ fhir:v "MedicationStatement.meta.id" ] ;
       fhir:representation ( [ fhir:v "xmlAttr" ] ) ;
       fhir:short [ fhir:v "Unique id for inter-element referencing" ] ;
       fhir:definition [ fhir:v "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." ] ;
       fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "Element.id" ] ;
         fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"^^xsd:anyURI ] ;
           fhir:value [
             a fhir:url ;
             fhir:v "string"^^xsd:anyURI
           ]
         ] ) ;
         fhir:code [ fhir:v "http://hl7.org/fhirpath/System.String"^^xsd:anyURI ]
       ] ) ;
       fhir:isModifier [ fhir:v false ] ;
       fhir:isSummary [ fhir:v false ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "n/a" ]
       ] )
     ] [
       fhir:id [ fhir:v "MedicationStatement.meta.extension" ] ;
       fhir:path [ fhir:v "MedicationStatement.meta.extension" ] ;
       fhir:slicing [
         fhir:discriminator ( [
           fhir:type [ fhir:v "value" ] ;
           fhir:path [ fhir:v "url" ]
         ] ) ;
         fhir:description [ fhir:v "Extensions are always sliced by (at least) url" ] ;
         fhir:rules [ fhir:v "open" ]
       ] ;
       fhir:short [ fhir:v "Additional content defined by implementations" ] ;
       fhir:definition [ fhir:v "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:comment [ fhir:v "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:alias ( [ fhir:v "extensions" ] [ fhir:v "user content" ] ) ;
       fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
       fhir:max [ fhir:v "*" ] ;
       fhir:base [
         fhir:path [ fhir:v "Element.extension" ] ;
         fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
         fhir:max [ fhir:v "*" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "Extension"^^xsd:anyURI ]
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:xpath [ fhir:v "@value|f:*|h:div" ] ;
         fhir:source [
           fhir:v "http://hl7.org/fhir/StructureDefinition/Element"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
         ]
       ] [
         fhir:key [ fhir:v "ext-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "Must have either extensions or value[x], not both" ] ;
         fhir:expression [ fhir:v "extension.exists() != value.exists()" ] ;
         fhir:xpath [ fhir:v "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])" ] ;
         fhir:source [
           fhir:v "http://hl7.org/fhir/StructureDefinition/Extension"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/Extension>
         ]
       ] ) ;
       fhir:isModifier [ fhir:v false ] ;
       fhir:isSummary [ fhir:v false ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "n/a" ]
       ] )
     ] [
       fhir:id [ fhir:v "MedicationStatement.meta.versionId" ] ;
       fhir:path [ fhir:v "MedicationStatement.meta.versionId" ] ;
       fhir:short [ fhir:v "Version specific identifier" ] ;
       fhir:definition [ fhir:v "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:comment [ fhir:v "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:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "Meta.versionId" ] ;
         fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "id"^^xsd:anyURI ]
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:xpath [ fhir:v "@value|f:*|h:div" ] ;
         fhir:source [
           fhir:v "http://hl7.org/fhir/StructureDefinition/Element"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
         ]
       ] ) ;
       fhir:mustSupport [ fhir:v true ] ;
       fhir:isModifier [ fhir:v false ] ;
       fhir:isSummary [ fhir:v true ]
     ] [
       fhir:id [ fhir:v "MedicationStatement.meta.lastUpdated" ] ;
       fhir:path [ fhir:v "MedicationStatement.meta.lastUpdated" ] ;
       fhir:short [ fhir:v "When the resource version last changed" ] ;
       fhir:definition [ fhir:v "When the resource last changed - e.g. when the version changed." ] ;
       fhir:comment [ fhir:v "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:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "Meta.lastUpdated" ] ;
         fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "instant"^^xsd:anyURI ]
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:xpath [ fhir:v "@value|f:*|h:div" ] ;
         fhir:source [
           fhir:v "http://hl7.org/fhir/StructureDefinition/Element"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
         ]
       ] ) ;
       fhir:mustSupport [ fhir:v true ] ;
       fhir:isModifier [ fhir:v false ] ;
       fhir:isSummary [ fhir:v true ]
     ] [
       fhir:id [ fhir:v "MedicationStatement.meta.source" ] ;
       fhir:path [ fhir:v "MedicationStatement.meta.source" ] ;
       fhir:short [ fhir:v "Identifies where the resource comes from" ] ;
       fhir:definition [ fhir:v "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:comment [ fhir:v "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:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "Meta.source" ] ;
         fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "uri"^^xsd:anyURI ]
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:xpath [ fhir:v "@value|f:*|h:div" ] ;
         fhir:source [
           fhir:v "http://hl7.org/fhir/StructureDefinition/Element"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
         ]
       ] ) ;
       fhir:isModifier [ fhir:v false ] ;
       fhir:isSummary [ fhir:v true ]
     ] [
       fhir:id [ fhir:v "MedicationStatement.meta.profile" ] ;
       fhir:path [ fhir:v "MedicationStatement.meta.profile" ] ;
       fhir:short [ fhir:v "Profiles this resource claims to conform to" ] ;
       fhir:definition [ fhir:v "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:comment [ fhir:v "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:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
       fhir:max [ fhir:v "*" ] ;
       fhir:base [
         fhir:path [ fhir:v "Meta.profile" ] ;
         fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
         fhir:max [ fhir:v "*" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "canonical"^^xsd:anyURI ] ;
         fhir:targetProfile ( [
           fhir:v "http://hl7.org/fhir/StructureDefinition/StructureDefinition"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/StructureDefinition>
         ] )
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:xpath [ fhir:v "@value|f:*|h:div" ] ;
         fhir:source [
           fhir:v "http://hl7.org/fhir/StructureDefinition/Element"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
         ]
       ] ) ;
       fhir:isModifier [ fhir:v false ] ;
       fhir:isSummary [ fhir:v true ]
     ] [
       fhir:id [ fhir:v "MedicationStatement.meta.security" ] ;
       fhir:path [ fhir:v "MedicationStatement.meta.security" ] ;
       fhir:short [ fhir:v "Security Labels applied to this resource" ] ;
       fhir:definition [ fhir:v "Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure." ] ;
       fhir:comment [ fhir:v "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:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
       fhir:max [ fhir:v "*" ] ;
       fhir:base [
         fhir:path [ fhir:v "Meta.security" ] ;
         fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
         fhir:max [ fhir:v "*" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "Coding"^^xsd:anyURI ]
       ] ) ;
       fhir:condition ( [ fhir:v "ele-1" ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:xpath [ fhir:v "@value|f:*|h:div" ] ;
         fhir:source [
           fhir:v "http://hl7.org/fhir/StructureDefinition/Element"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
         ]
       ] ) ;
       fhir:isModifier [ fhir:v false ] ;
       fhir:isSummary [ fhir:v true ] ;
       fhir:binding [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"^^xsd:anyURI ] ;
           fhir:value [
             a fhir:string ;
             fhir:v "SecurityLabels"
           ]
         ] ) ;
         fhir:strength [ fhir:v "extensible" ] ;
         fhir:description [ fhir:v "Security Labels from the Healthcare Privacy and Security Classification System." ] ;
         fhir:valueSet [
           fhir:v "http://hl7.org/fhir/ValueSet/security-labels"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/ValueSet/security-labels>
         ]
       ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "n/a" ]
       ] [
         fhir:identity [ fhir:v "v2" ] ;
         fhir:map [ fhir:v "CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "CV" ]
       ] [
         fhir:identity [ fhir:v "orim" ] ;
         fhir:map [ fhir:v "fhir:Coding rdfs:subClassOf dt:CDCoding" ]
       ] )
     ] [
       fhir:id [ fhir:v "MedicationStatement.meta.tag" ] ;
       fhir:path [ fhir:v "MedicationStatement.meta.tag" ] ;
       fhir:short [ fhir:v "Tags applied to this resource" ] ;
       fhir:definition [ fhir:v "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:comment [ fhir:v "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:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
       fhir:max [ fhir:v "*" ] ;
       fhir:base [
         fhir:path [ fhir:v "Meta.tag" ] ;
         fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
         fhir:max [ fhir:v "*" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "Coding"^^xsd:anyURI ]
       ] ) ;
       fhir:condition ( [ fhir:v "ele-1" ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:xpath [ fhir:v "@value|f:*|h:div" ] ;
         fhir:source [
           fhir:v "http://hl7.org/fhir/StructureDefinition/Element"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
         ]
       ] ) ;
       fhir:isModifier [ fhir:v false ] ;
       fhir:isSummary [ fhir:v true ] ;
       fhir:binding [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"^^xsd:anyURI ] ;
           fhir:value [
             a fhir:string ;
             fhir:v "Tags"
           ]
         ] ) ;
         fhir:strength [ fhir:v "example" ] ;
         fhir:description [ fhir:v "Codes that represent various types of tags, commonly workflow-related; e.g. \"Needs review by Dr. Jones\"." ] ;
         fhir:valueSet [
           fhir:v "http://hl7.org/fhir/ValueSet/common-tags"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/ValueSet/common-tags>
         ]
       ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "n/a" ]
       ] [
         fhir:identity [ fhir:v "v2" ] ;
         fhir:map [ fhir:v "CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "CV" ]
       ] [
         fhir:identity [ fhir:v "orim" ] ;
         fhir:map [ fhir:v "fhir:Coding rdfs:subClassOf dt:CDCoding" ]
       ] )
     ] [
       fhir:id [ fhir:v "MedicationStatement.implicitRules" ] ;
       fhir:path [ fhir:v "MedicationStatement.implicitRules" ] ;
       fhir:short [ fhir:v "A set of rules under which this content was created" ] ;
       fhir:definition [ fhir:v "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:comment [ fhir:v "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:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "Resource.implicitRules" ] ;
         fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "uri"^^xsd:anyURI ]
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:xpath [ fhir:v "@value|f:*|h:div" ] ;
         fhir:source [
           fhir:v "http://hl7.org/fhir/StructureDefinition/Element"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
         ]
       ] ) ;
       fhir:isModifier [ fhir:v true ] ;
       fhir:isModifierReason [ fhir:v "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:isSummary [ fhir:v true ]
     ] [
       fhir:id [ fhir:v "MedicationStatement.language" ] ;
       fhir:path [ fhir:v "MedicationStatement.language" ] ;
       fhir:short [ fhir:v "Language of the resource content" ] ;
       fhir:definition [ fhir:v "The base language in which the resource is written." ] ;
       fhir:comment [ fhir:v "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:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "Resource.language" ] ;
         fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "code"^^xsd:anyURI ]
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:xpath [ fhir:v "@value|f:*|h:div" ] ;
         fhir:source [
           fhir:v "http://hl7.org/fhir/StructureDefinition/Element"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
         ]
       ] ) ;
       fhir:isModifier [ fhir:v false ] ;
       fhir:isSummary [ fhir:v false ] ;
       fhir:binding [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet"^^xsd:anyURI ] ;
           fhir:value [
             a fhir:canonical ;
             fhir:v "http://hl7.org/fhir/ValueSet/all-languages"^^xsd:anyURI ;
             fhir:link <http://hl7.org/fhir/ValueSet/all-languages>
           ]
         ] [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"^^xsd:anyURI ] ;
           fhir:value [
             a fhir:string ;
             fhir:v "Language"
           ]
         ] ) ;
         fhir:strength [ fhir:v "preferred" ] ;
         fhir:description [ fhir:v "A human language." ] ;
         fhir:valueSet [
           fhir:v "http://hl7.org/fhir/ValueSet/languages"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/ValueSet/languages>
         ]
       ]
     ] [
       fhir:id [ fhir:v "MedicationStatement.text" ] ;
       fhir:path [ fhir:v "MedicationStatement.text" ] ;
       fhir:short [ fhir:v "Text summary of the resource, for human interpretation" ] ;
       fhir:definition [ fhir:v "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:comment [ fhir:v "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:alias ( [ fhir:v "narrative" ] [ fhir:v "html" ] [ fhir:v "xhtml" ] [ fhir:v "display" ] ) ;
       fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "DomainResource.text" ] ;
         fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "Narrative"^^xsd:anyURI ]
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:xpath [ fhir:v "@value|f:*|h:div" ] ;
         fhir:source [
           fhir:v "http://hl7.org/fhir/StructureDefinition/Element"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
         ]
       ] ) ;
       fhir:isModifier [ fhir:v false ] ;
       fhir:isSummary [ fhir:v false ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "Act.text?" ]
       ] )
     ] [
       fhir:id [ fhir:v "MedicationStatement.contained" ] ;
       fhir:path [ fhir:v "MedicationStatement.contained" ] ;
       fhir:short [ fhir:v "Contained, inline Resources" ] ;
       fhir:definition [ fhir:v "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:comment [ fhir:v "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:alias ( [ fhir:v "inline resources" ] [ fhir:v "anonymous resources" ] [ fhir:v "contained resources" ] ) ;
       fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
       fhir:max [ fhir:v "*" ] ;
       fhir:base [
         fhir:path [ fhir:v "DomainResource.contained" ] ;
         fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
         fhir:max [ fhir:v "*" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "Resource"^^xsd:anyURI ]
       ] ) ;
       fhir:isModifier [ fhir:v false ] ;
       fhir:isSummary [ fhir:v false ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "N/A" ]
       ] )
     ] [
       fhir:id [ fhir:v "MedicationStatement.extension" ] ;
       fhir:path [ fhir:v "MedicationStatement.extension" ] ;
       fhir:slicing [
         fhir:discriminator ( [
           fhir:type [ fhir:v "value" ] ;
           fhir:path [ fhir:v "url" ]
         ] ) ;
         fhir:description [ fhir:v "Extensions are always sliced by (at least) url" ] ;
         fhir:rules [ fhir:v "open" ]
       ] ;
       fhir:short [ fhir:v "Extension" ] ;
       fhir:definition [ fhir:v "An Extension" ] ;
       fhir:min [ fhir:v "1"^^xsd:nonNegativeInteger ] ;
       fhir:max [ fhir:v "*" ] ;
       fhir:base [
         fhir:path [ fhir:v "DomainResource.extension" ] ;
         fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
         fhir:max [ fhir:v "*" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "Extension"^^xsd:anyURI ]
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:xpath [ fhir:v "@value|f:*|h:div" ] ;
         fhir:source [
           fhir:v "http://hl7.org/fhir/StructureDefinition/Element"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
         ]
       ] [
         fhir:key [ fhir:v "ext-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "Must have either extensions or value[x], not both" ] ;
         fhir:expression [ fhir:v "extension.exists() != value.exists()" ] ;
         fhir:xpath [ fhir:v "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])" ] ;
         fhir:source [
           fhir:v "http://hl7.org/fhir/StructureDefinition/Extension"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/Extension>
         ]
       ] ) ;
       fhir:isModifier [ fhir:v false ] ;
       fhir:isSummary [ fhir:v false ]
     ] [
       fhir:id [ fhir:v "MedicationStatement.extension:context" ] ;
       fhir:path [ fhir:v "MedicationStatement.extension" ] ;
       fhir:sliceName [ fhir:v "context" ] ;
       fhir:short [ fhir:v "Extension" ] ;
       fhir:definition [ fhir:v "Extension for indicating the context." ] ;
       fhir:min [ fhir:v "1"^^xsd:nonNegativeInteger ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "DomainResource.extension" ] ;
         fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
         fhir:max [ fhir:v "*" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "Extension"^^xsd:anyURI ] ;
         fhir:profile ( [
           fhir:v "https://gematik.de/fhir/epa-medication/StructureDefinition/context-extension"^^xsd:anyURI ;
           fhir:link <https://gematik.de/fhir/epa-medication/StructureDefinition/context-extension>
         ] )
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:xpath [ fhir:v "@value|f:*|h:div" ] ;
         fhir:source [
           fhir:v "http://hl7.org/fhir/StructureDefinition/Element"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
         ]
       ] [
         fhir:key [ fhir:v "ext-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "Must have either extensions or value[x], not both" ] ;
         fhir:expression [ fhir:v "extension.exists() != value.exists()" ] ;
         fhir:xpath [ fhir:v "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])" ] ;
         fhir:source [
           fhir:v "http://hl7.org/fhir/StructureDefinition/Extension"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/Extension>
         ]
       ] ) ;
       fhir:mustSupport [ fhir:v true ] ;
       fhir:isModifier [ fhir:v false ] ;
       fhir:isSummary [ fhir:v false ]
     ] [
       fhir:id [ fhir:v "MedicationStatement.extension:context.id" ] ;
       fhir:path [ fhir:v "MedicationStatement.extension.id" ] ;
       fhir:representation ( [ fhir:v "xmlAttr" ] ) ;
       fhir:short [ fhir:v "Unique id for inter-element referencing" ] ;
       fhir:definition [ fhir:v "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." ] ;
       fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "Element.id" ] ;
         fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"^^xsd:anyURI ] ;
           fhir:value [
             a fhir:url ;
             fhir:v "string"^^xsd:anyURI
           ]
         ] ) ;
         fhir:code [ fhir:v "http://hl7.org/fhirpath/System.String"^^xsd:anyURI ]
       ] ) ;
       fhir:isModifier [ fhir:v false ] ;
       fhir:isSummary [ fhir:v false ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "n/a" ]
       ] )
     ] [
       fhir:id [ fhir:v "MedicationStatement.extension:context.extension" ] ;
       fhir:path [ fhir:v "MedicationStatement.extension.extension" ] ;
       fhir:slicing [
         fhir:discriminator ( [
           fhir:type [ fhir:v "value" ] ;
           fhir:path [ fhir:v "url" ]
         ] ) ;
         fhir:description [ fhir:v "Extensions are always sliced by (at least) url" ] ;
         fhir:rules [ fhir:v "open" ]
       ] ;
       fhir:short [ fhir:v "Extension" ] ;
       fhir:definition [ fhir:v "An Extension" ] ;
       fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
       fhir:max [ fhir:v "0" ] ;
       fhir:base [
         fhir:path [ fhir:v "Element.extension" ] ;
         fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
         fhir:max [ fhir:v "*" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "Extension"^^xsd:anyURI ]
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:xpath [ fhir:v "@value|f:*|h:div" ] ;
         fhir:source [
           fhir:v "http://hl7.org/fhir/StructureDefinition/Element"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
         ]
       ] [
         fhir:key [ fhir:v "ext-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "Must have either extensions or value[x], not both" ] ;
         fhir:expression [ fhir:v "extension.exists() != value.exists()" ] ;
         fhir:xpath [ fhir:v "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])" ] ;
         fhir:source [
           fhir:v "http://hl7.org/fhir/StructureDefinition/Extension"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/Extension>
         ]
       ] ) ;
       fhir:isModifier [ fhir:v false ] ;
       fhir:isSummary [ fhir:v false ]
     ] [
       fhir:id [ fhir:v "MedicationStatement.extension:context.url" ] ;
       fhir:path [ fhir:v "MedicationStatement.extension.url" ] ;
       fhir:representation ( [ fhir:v "xmlAttr" ] ) ;
       fhir:short [ fhir:v "identifies the meaning of the extension" ] ;
       fhir:definition [ fhir:v "Source of the definition for the extension code - a logical name or a URL." ] ;
       fhir:comment [ fhir:v "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:min [ fhir:v "1"^^xsd:nonNegativeInteger ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "Extension.url" ] ;
         fhir:min [ fhir:v "1"^^xsd:nonNegativeInteger ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"^^xsd:anyURI ] ;
           fhir:value [
             a fhir:url ;
             fhir:v "uri"^^xsd:anyURI
           ]
         ] ) ;
         fhir:code [ fhir:v "http://hl7.org/fhirpath/System.String"^^xsd:anyURI ]
       ] ) ;
       fhir:fixed [
         a fhir:uri ;
         fhir:v "https://gematik.de/fhir/epa-medication/StructureDefinition/context-extension"^^xsd:anyURI
       ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "N/A" ]
       ] )
     ] [
       fhir:id [ fhir:v "MedicationStatement.extension:context.value[x]" ] ;
       fhir:path [ fhir:v "MedicationStatement.extension.value[x]" ] ;
       fhir:short [ fhir:v "Context of the resource" ] ;
       fhir:definition [ fhir:v "Value of extension - must be one of a constrained set of the data types (see [Extensibility](http://hl7.org/fhir/R4/extensibility.html) for a list)." ] ;
       fhir:min [ fhir:v "1"^^xsd:nonNegativeInteger ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "Extension.value[x]" ] ;
         fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "code"^^xsd:anyURI ]
       ] ) ;
       fhir:condition ( [ fhir:v "ele-1" ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:xpath [ fhir:v "@value|f:*|h:div" ] ;
         fhir:source [
           fhir:v "http://hl7.org/fhir/StructureDefinition/Element"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
         ]
       ] ) ;
       fhir:isModifier [ fhir:v false ] ;
       fhir:binding [
         fhir:strength [ fhir:v "required" ] ;
         fhir:valueSet [
           fhir:v "https://gematik.de/fhir/epa-medication/ValueSet/epa-medicationstatement-context-code"^^xsd:anyURI ;
           fhir:link <https://gematik.de/fhir/epa-medication/ValueSet/epa-medicationstatement-context-code>
         ]
       ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "n/a" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "N/A" ]
       ] )
     ] [
       fhir:id [ fhir:v "MedicationStatement.extension:rxPrescriptionProcessIdentifier" ] ;
       fhir:path [ fhir:v "MedicationStatement.extension" ] ;
       fhir:sliceName [ fhir:v "rxPrescriptionProcessIdentifier" ] ;
       fhir:short [ fhir:v "Extension" ] ;
       fhir:definition [ fhir:v "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:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "DomainResource.extension" ] ;
         fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
         fhir:max [ fhir:v "*" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "Extension"^^xsd:anyURI ] ;
         fhir:profile ( [
           fhir:v "https://gematik.de/fhir/epa-medication/StructureDefinition/rx-prescription-process-identifier-extension"^^xsd:anyURI ;
           fhir:link <https://gematik.de/fhir/epa-medication/StructureDefinition/rx-prescription-process-identifier-extension>
         ] )
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:xpath [ fhir:v "@value|f:*|h:div" ] ;
         fhir:source [
           fhir:v "http://hl7.org/fhir/StructureDefinition/Element"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
         ]
       ] [
         fhir:key [ fhir:v "ext-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "Must have either extensions or value[x], not both" ] ;
         fhir:expression [ fhir:v "extension.exists() != value.exists()" ] ;
         fhir:xpath [ fhir:v "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])" ] ;
         fhir:source [
           fhir:v "http://hl7.org/fhir/StructureDefinition/Extension"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/Extension>
         ]
       ] ) ;
       fhir:isModifier [ fhir:v false ] ;
       fhir:isSummary [ fhir:v false ]
     ] [
       fhir:id [ fhir:v "MedicationStatement.extension:processingEvent" ] ;
       fhir:path [ fhir:v "MedicationStatement.extension" ] ;
       fhir:sliceName [ fhir:v "processingEvent" ] ;
       fhir:short [ fhir:v "Ein Ereignis, welches während eines Prozessschritts auftritt." ] ;
       fhir:definition [ fhir:v "Bildet ein Ereignis ab, das wärend der Verarbeitung auftritt." ] ;
       fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
       fhir:max [ fhir:v "*" ] ;
       fhir:base [
         fhir:path [ fhir:v "DomainResource.extension" ] ;
         fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
         fhir:max [ fhir:v "*" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "Extension"^^xsd:anyURI ] ;
         fhir:profile ( [
           fhir:v "https://gematik.de/fhir/epa-medication/StructureDefinition/epa-medicationstatement-processing-event-extension"^^xsd:anyURI ;
           fhir:link <https://gematik.de/fhir/epa-medication/StructureDefinition/epa-medicationstatement-processing-event-extension>
         ] )
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:xpath [ fhir:v "@value|f:*|h:div" ] ;
         fhir:source [
           fhir:v "http://hl7.org/fhir/StructureDefinition/Element"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
         ]
       ] [
         fhir:key [ fhir:v "ext-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "Must have either extensions or value[x], not both" ] ;
         fhir:expression [ fhir:v "extension.exists() != value.exists()" ] ;
         fhir:xpath [ fhir:v "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])" ] ;
         fhir:source [
           fhir:v "http://hl7.org/fhir/StructureDefinition/Extension"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/Extension>
         ]
       ] ) ;
       fhir:mustSupport [ fhir:v true ] ;
       fhir:isModifier [ fhir:v false ] ;
       fhir:isSummary [ fhir:v false ]
     ] [
       fhir:id [ fhir:v "MedicationStatement.modifierExtension" ] ;
       fhir:path [ fhir:v "MedicationStatement.modifierExtension" ] ;
       fhir:slicing [
         fhir:discriminator ( [
           fhir:type [ fhir:v "value" ] ;
           fhir:path [ fhir:v "url" ]
         ] ) ;
         fhir:description [ fhir:v "Extensions are always sliced by (at least) url" ] ;
         fhir:rules [ fhir:v "open" ]
       ] ;
       fhir:short [ fhir:v "Extensions that cannot be ignored" ] ;
       fhir:definition [ fhir:v "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:comment [ fhir:v "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:requirements [ fhir:v "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:alias ( [ fhir:v "extensions" ] [ fhir:v "user content" ] ) ;
       fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
       fhir:max [ fhir:v "*" ] ;
       fhir:base [
         fhir:path [ fhir:v "DomainResource.modifierExtension" ] ;
         fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
         fhir:max [ fhir:v "*" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "Extension"^^xsd:anyURI ]
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:xpath [ fhir:v "@value|f:*|h:div" ] ;
         fhir:source [
           fhir:v "http://hl7.org/fhir/StructureDefinition/Element"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
         ]
       ] [
         fhir:key [ fhir:v "ext-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "Must have either extensions or value[x], not both" ] ;
         fhir:expression [ fhir:v "extension.exists() != value.exists()" ] ;
         fhir:xpath [ fhir:v "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])" ] ;
         fhir:source [
           fhir:v "http://hl7.org/fhir/StructureDefinition/Extension"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/Extension>
         ]
       ] ) ;
       fhir:isModifier [ fhir:v true ] ;
       fhir:isModifierReason [ fhir:v "Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them" ] ;
       fhir:isSummary [ fhir:v false ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "N/A" ]
       ] )
     ] [
       fhir:id [ fhir:v "MedicationStatement.identifier" ] ;
       fhir:path [ fhir:v "MedicationStatement.identifier" ] ;
       fhir:short [ fhir:v "External identifier" ] ;
       fhir:definition [ fhir:v "Identifiers associated with this Medication Statement 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:comment [ fhir:v "This is a business identifier, not a resource identifier." ] ;
       fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
       fhir:max [ fhir:v "*" ] ;
       fhir:base [
         fhir:path [ fhir:v "MedicationStatement.identifier" ] ;
         fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
         fhir:max [ fhir:v "*" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "Identifier"^^xsd:anyURI ]
       ] ) ;
       fhir:condition ( [ fhir:v "ele-1" ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:xpath [ fhir:v "@value|f:*|h:div" ] ;
         fhir:source [
           fhir:v "http://hl7.org/fhir/StructureDefinition/Element"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
         ]
       ] ) ;
       fhir:isModifier [ fhir:v false ] ;
       fhir:isSummary [ fhir:v true ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "n/a" ]
       ] [
         fhir:identity [ fhir:v "v2" ] ;
         fhir:map [ fhir:v "CX / EI (occasionally, more often EI maps to a resource id or a URL)" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "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:identity [ fhir:v "servd" ] ;
         fhir:map [ fhir:v "Identifier" ]
       ] [
         fhir:identity [ fhir:v "workflow" ] ;
         fhir:map [ fhir:v "Event.identifier" ]
       ] [
         fhir:identity [ fhir:v "w5" ] ;
         fhir:map [ fhir:v "FiveWs.identifier" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v ".id" ]
       ] )
     ] [
       fhir:id [ fhir:v "MedicationStatement.basedOn" ] ;
       fhir:path [ fhir:v "MedicationStatement.basedOn" ] ;
       fhir:short [ fhir:v "Fulfils plan, proposal or order" ] ;
       fhir:definition [ fhir:v "A plan, proposal or order that is fulfilled in whole or in part by this event." ] ;
       fhir:comment [ fhir:v "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:requirements [ fhir:v "Allows tracing of authorization for the event and tracking whether proposals/recommendations were acted upon." ] ;
       fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
       fhir:max [ fhir:v "*" ] ;
       fhir:base [
         fhir:path [ fhir:v "MedicationStatement.basedOn" ] ;
         fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
         fhir:max [ fhir:v "*" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "Reference"^^xsd:anyURI ] ;
         fhir:targetProfile ( [
           fhir:v "http://hl7.org/fhir/StructureDefinition/MedicationRequest"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/MedicationRequest>
         ] [
           fhir:v "http://hl7.org/fhir/StructureDefinition/CarePlan"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/CarePlan>
         ] [
           fhir:v "http://hl7.org/fhir/StructureDefinition/ServiceRequest"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/ServiceRequest>
         ] )
       ] ) ;
       fhir:condition ( [ fhir:v "ele-1" ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:xpath [ fhir:v "@value|f:*|h:div" ] ;
         fhir:source [
           fhir:v "http://hl7.org/fhir/StructureDefinition/Element"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
         ]
       ] [
         fhir:key [ fhir:v "ref-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "SHALL have a contained resource if a local reference is provided" ] ;
         fhir:expression [ fhir:v "reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" ] ;
         fhir:xpath [ fhir:v "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:source [
           fhir:v "http://hl7.org/fhir/StructureDefinition/Reference"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/Reference>
         ]
       ] ) ;
       fhir:isModifier [ fhir:v false ] ;
       fhir:isSummary [ fhir:v true ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "n/a" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "The target of a resource reference is a RIM entry point (Act, Role, or Entity)" ]
       ] [
         fhir:identity [ fhir:v "workflow" ] ;
         fhir:map [ fhir:v "Event.basedOn" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v ".outboundRelationship[typeCode=FLFS].target[classCode=SBADM or PROC or PCPR or OBS, moodCode=RQO orPLAN or PRP]" ]
       ] )
     ] [
       fhir:id [ fhir:v "MedicationStatement.basedOn.id" ] ;
       fhir:path [ fhir:v "MedicationStatement.basedOn.id" ] ;
       fhir:representation ( [ fhir:v "xmlAttr" ] ) ;
       fhir:short [ fhir:v "Unique id for inter-element referencing" ] ;
       fhir:definition [ fhir:v "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." ] ;
       fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "Element.id" ] ;
         fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"^^xsd:anyURI ] ;
           fhir:value [
             a fhir:url ;
             fhir:v "string"^^xsd:anyURI
           ]
         ] ) ;
         fhir:code [ fhir:v "http://hl7.org/fhirpath/System.String"^^xsd:anyURI ]
       ] ) ;
       fhir:isModifier [ fhir:v false ] ;
       fhir:isSummary [ fhir:v false ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "n/a" ]
       ] )
     ] [
       fhir:id [ fhir:v "MedicationStatement.basedOn.extension" ] ;
       fhir:path [ fhir:v "MedicationStatement.basedOn.extension" ] ;
       fhir:slicing [
         fhir:discriminator ( [
           fhir:type [ fhir:v "value" ] ;
           fhir:path [ fhir:v "url" ]
         ] ) ;
         fhir:description [ fhir:v "Extensions are always sliced by (at least) url" ] ;
         fhir:rules [ fhir:v "open" ]
       ] ;
       fhir:short [ fhir:v "Additional content defined by implementations" ] ;
       fhir:definition [ fhir:v "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:comment [ fhir:v "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:alias ( [ fhir:v "extensions" ] [ fhir:v "user content" ] ) ;
       fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
       fhir:max [ fhir:v "*" ] ;
       fhir:base [
         fhir:path [ fhir:v "Element.extension" ] ;
         fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
         fhir:max [ fhir:v "*" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "Extension"^^xsd:anyURI ]
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:xpath [ fhir:v "@value|f:*|h:div" ] ;
         fhir:source [
           fhir:v "http://hl7.org/fhir/StructureDefinition/Element"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
         ]
       ] [
         fhir:key [ fhir:v "ext-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "Must have either extensions or value[x], not both" ] ;
         fhir:expression [ fhir:v "extension.exists() != value.exists()" ] ;
         fhir:xpath [ fhir:v "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])" ] ;
         fhir:source [
           fhir:v "http://hl7.org/fhir/StructureDefinition/Extension"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/Extension>
         ]
       ] ) ;
       fhir:isModifier [ fhir:v false ] ;
       fhir:isSummary [ fhir:v false ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "n/a" ]
       ] )
     ] [
       fhir:id [ fhir:v "MedicationStatement.basedOn.extension:isEMP" ] ;
       fhir:path [ fhir:v "MedicationStatement.basedOn.extension" ] ;
       fhir:sliceName [ fhir:v "isEMP" ] ;
       fhir:short [ fhir:v "Extension" ] ;
       fhir:definition [ fhir:v "Definiert ob etwas einen Bezug zum eMP hat" ] ;
       fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "Element.extension" ] ;
         fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
         fhir:max [ fhir:v "*" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "Extension"^^xsd:anyURI ] ;
         fhir:profile ( [
           fhir:v "https://gematik.de/fhir/epa-medication/StructureDefinition/is-emp-extension"^^xsd:anyURI ;
           fhir:link <https://gematik.de/fhir/epa-medication/StructureDefinition/is-emp-extension>
         ] )
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:xpath [ fhir:v "@value|f:*|h:div" ] ;
         fhir:source [
           fhir:v "http://hl7.org/fhir/StructureDefinition/Element"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
         ]
       ] [
         fhir:key [ fhir:v "ext-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "Must have either extensions or value[x], not both" ] ;
         fhir:expression [ fhir:v "extension.exists() != value.exists()" ] ;
         fhir:xpath [ fhir:v "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])" ] ;
         fhir:source [
           fhir:v "http://hl7.org/fhir/StructureDefinition/Extension"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/Extension>
         ]
       ] ) ;
       fhir:isModifier [ fhir:v false ] ;
       fhir:isSummary [ fhir:v false ]
     ] [
       fhir:id [ fhir:v "MedicationStatement.basedOn.reference" ] ;
       fhir:path [ fhir:v "MedicationStatement.basedOn.reference" ] ;
       fhir:short [ fhir:v "Literal reference, Relative, internal or absolute URL" ] ;
       fhir:definition [ fhir:v "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:comment [ fhir:v "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:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "Reference.reference" ] ;
         fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "string"^^xsd:anyURI ]
       ] ) ;
       fhir:condition ( [ fhir:v "ref-1" ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:xpath [ fhir:v "@value|f:*|h:div" ] ;
         fhir:source [
           fhir:v "http://hl7.org/fhir/StructureDefinition/Element"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
         ]
       ] ) ;
       fhir:isModifier [ fhir:v false ] ;
       fhir:isSummary [ fhir:v true ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "N/A" ]
       ] )
     ] [
       fhir:id [ fhir:v "MedicationStatement.basedOn.type" ] ;
       fhir:path [ fhir:v "MedicationStatement.basedOn.type" ] ;
       fhir:short [ fhir:v "Type the reference refers to (e.g. \"Patient\")" ] ;
       fhir:definition [ fhir:v "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:comment [ fhir:v "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:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "Reference.type" ] ;
         fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "uri"^^xsd:anyURI ]
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:xpath [ fhir:v "@value|f:*|h:div" ] ;
         fhir:source [
           fhir:v "http://hl7.org/fhir/StructureDefinition/Element"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
         ]
       ] ) ;
       fhir:isModifier [ fhir:v false ] ;
       fhir:isSummary [ fhir:v true ] ;
       fhir:binding [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"^^xsd:anyURI ] ;
           fhir:value [
             a fhir:string ;
             fhir:v "FHIRResourceTypeExt"
           ]
         ] ) ;
         fhir:strength [ fhir:v "extensible" ] ;
         fhir:description [ fhir:v "Aa resource (or, for logical models, the URI of the logical model)." ] ;
         fhir:valueSet [
           fhir:v "http://hl7.org/fhir/ValueSet/resource-types"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/ValueSet/resource-types>
         ]
       ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "N/A" ]
       ] )
     ] [
       fhir:id [ fhir:v "MedicationStatement.basedOn.identifier" ] ;
       fhir:path [ fhir:v "MedicationStatement.basedOn.identifier" ] ;
       fhir:short [ fhir:v "Logical reference, when literal reference is not known" ] ;
       fhir:definition [ fhir:v "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:comment [ fhir:v "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:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "Reference.identifier" ] ;
         fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "Identifier"^^xsd:anyURI ]
       ] ) ;
       fhir:condition ( [ fhir:v "ele-1" ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:xpath [ fhir:v "@value|f:*|h:div" ] ;
         fhir:source [
           fhir:v "http://hl7.org/fhir/StructureDefinition/Element"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
         ]
       ] ) ;
       fhir:isModifier [ fhir:v false ] ;
       fhir:isSummary [ fhir:v true ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "n/a" ]
       ] [
         fhir:identity [ fhir:v "v2" ] ;
         fhir:map [ fhir:v "CX / EI (occasionally, more often EI maps to a resource id or a URL)" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "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:identity [ fhir:v "servd" ] ;
         fhir:map [ fhir:v "Identifier" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v ".identifier" ]
       ] )
     ] [
       fhir:id [ fhir:v "MedicationStatement.basedOn.display" ] ;
       fhir:extension ( [
         fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable"^^xsd:anyURI ] ;
         fhir:value [
           a fhir:boolean ;
           fhir:v true
         ]
       ] ) ;
       fhir:path [ fhir:v "MedicationStatement.basedOn.display" ] ;
       fhir:short [ fhir:v "Text alternative for the resource" ] ;
       fhir:definition [ fhir:v "Plain text narrative that identifies the resource in addition to the resource reference." ] ;
       fhir:comment [ fhir:v "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:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "Reference.display" ] ;
         fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "string"^^xsd:anyURI ]
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:xpath [ fhir:v "@value|f:*|h:div" ] ;
         fhir:source [
           fhir:v "http://hl7.org/fhir/StructureDefinition/Element"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
         ]
       ] ) ;
       fhir:isModifier [ fhir:v false ] ;
       fhir:isSummary [ fhir:v true ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "N/A" ]
       ] )
     ] [
       fhir:id [ fhir:v "MedicationStatement.partOf" ] ;
       fhir:path [ fhir:v "MedicationStatement.partOf" ] ;
       fhir:short [ fhir:v "Part of referenced event" ] ;
       fhir:definition [ fhir:v "A larger event of which this particular event is a component or step." ] ;
       fhir:comment [ fhir:v "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:requirements [ fhir:v "This should not be used when indicating which resource a MedicationStatement has been derived from.  If that is the use case, then MedicationStatement.derivedFrom should be used." ] ;
       fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
       fhir:max [ fhir:v "*" ] ;
       fhir:base [
         fhir:path [ fhir:v "MedicationStatement.partOf" ] ;
         fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
         fhir:max [ fhir:v "*" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "Reference"^^xsd:anyURI ] ;
         fhir:targetProfile ( [
           fhir:v "http://hl7.org/fhir/StructureDefinition/MedicationAdministration"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/MedicationAdministration>
         ] [
           fhir:v "http://hl7.org/fhir/StructureDefinition/MedicationDispense"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/MedicationDispense>
         ] [
           fhir:v "http://hl7.org/fhir/StructureDefinition/MedicationStatement"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/MedicationStatement>
         ] [
           fhir:v "http://hl7.org/fhir/StructureDefinition/Procedure"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/Procedure>
         ] [
           fhir:v "http://hl7.org/fhir/StructureDefinition/Observation"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/Observation>
         ] )
       ] ) ;
       fhir:condition ( [ fhir:v "ele-1" ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:xpath [ fhir:v "@value|f:*|h:div" ] ;
         fhir:source [
           fhir:v "http://hl7.org/fhir/StructureDefinition/Element"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
         ]
       ] [
         fhir:key [ fhir:v "ref-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "SHALL have a contained resource if a local reference is provided" ] ;
         fhir:expression [ fhir:v "reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" ] ;
         fhir:xpath [ fhir:v "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:source [
           fhir:v "http://hl7.org/fhir/StructureDefinition/Reference"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/Reference>
         ]
       ] ) ;
       fhir:isModifier [ fhir:v false ] ;
       fhir:isSummary [ fhir:v true ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "n/a" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "The target of a resource reference is a RIM entry point (Act, Role, or Entity)" ]
       ] [
         fhir:identity [ fhir:v "workflow" ] ;
         fhir:map [ fhir:v "Event.partOf" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v ".outboundRelationship[typeCode=COMP]/target[classCode=SPLY or SBADM or PROC or OBS,moodCode=EVN]" ]
       ] )
     ] [
       fhir:id [ fhir:v "MedicationStatement.status" ] ;
       fhir:path [ fhir:v "MedicationStatement.status" ] ;
       fhir:short [ fhir:v "unknown | entered-in-error | intended" ] ;
       fhir:definition [ fhir:v "A code representing the patient or other source's judgment about the state of the medication used that this statement is about.  Generally, this will be active or completed." ] ;
       fhir:comment [ fhir:v "MedicationStatement is a statement at a point in time.  The status is only representative at the point when it was asserted.  The value set for MedicationStatement.status contains codes that assert the status of the use of the medication by the patient (for example, stopped or on hold) as well as codes that assert the status of the medication statement itself (for example, entered in error).\r\rThis element is labeled as a modifier because the status contains codes that mark the resource as not currently valid." ] ;
       fhir:min [ fhir:v "1"^^xsd:nonNegativeInteger ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "MedicationStatement.status" ] ;
         fhir:min [ fhir:v "1"^^xsd:nonNegativeInteger ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "code"^^xsd:anyURI ]
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:xpath [ fhir:v "@value|f:*|h:div" ] ;
         fhir:source [
           fhir:v "http://hl7.org/fhir/StructureDefinition/Element"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
         ]
       ] ) ;
       fhir:mustSupport [ fhir:v true ] ;
       fhir:isModifier [ fhir:v true ] ;
       fhir:isModifierReason [ fhir:v "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:isSummary [ fhir:v true ] ;
       fhir:binding [
         fhir:strength [ fhir:v "required" ] ;
         fhir:valueSet [
           fhir:v "https://gematik.de/fhir/epa-medication/ValueSet/epa-medication-statement-status-vs"^^xsd:anyURI ;
           fhir:link <https://gematik.de/fhir/epa-medication/ValueSet/epa-medication-statement-status-vs>
         ]
       ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "workflow" ] ;
         fhir:map [ fhir:v "Event.status" ]
       ] [
         fhir:identity [ fhir:v "w5" ] ;
         fhir:map [ fhir:v "FiveWs.status" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v ".statusCode" ]
       ] )
     ] [
       fhir:id [ fhir:v "MedicationStatement.statusReason" ] ;
       fhir:path [ fhir:v "MedicationStatement.statusReason" ] ;
       fhir:short [ fhir:v "Reason for current status" ] ;
       fhir:definition [ fhir:v "Captures the reason for the current state of the MedicationStatement." ] ;
       fhir:comment [ fhir:v "This is generally only used for \"exception\" statuses such as \"not-taken\", \"on-hold\", \"cancelled\" or \"entered-in-error\". The reason for performing the event at all is captured in reasonCode, not here." ] ;
       fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
       fhir:max [ fhir:v "*" ] ;
       fhir:base [
         fhir:path [ fhir:v "MedicationStatement.statusReason" ] ;
         fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
         fhir:max [ fhir:v "*" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "CodeableConcept"^^xsd:anyURI ]
       ] ) ;
       fhir:condition ( [ fhir:v "ele-1" ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:xpath [ fhir:v "@value|f:*|h:div" ] ;
         fhir:source [
           fhir:v "http://hl7.org/fhir/StructureDefinition/Element"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
         ]
       ] ) ;
       fhir:isModifier [ fhir:v false ] ;
       fhir:binding [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"^^xsd:anyURI ] ;
           fhir:value [
             a fhir:string ;
             fhir:v "MedicationStatementStatusReason"
           ]
         ] ) ;
         fhir:strength [ fhir:v "example" ] ;
         fhir:description [ fhir:v "A coded concept indicating the reason for the status of the statement." ] ;
         fhir:valueSet [
           fhir:v "http://hl7.org/fhir/ValueSet/reason-medication-status-codes"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/ValueSet/reason-medication-status-codes>
         ]
       ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "n/a" ]
       ] [
         fhir:identity [ fhir:v "v2" ] ;
         fhir:map [ fhir:v "CE/CNE/CWE" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "CD" ]
       ] [
         fhir:identity [ fhir:v "orim" ] ;
         fhir:map [ fhir:v "fhir:CodeableConcept rdfs:subClassOf dt:CD" ]
       ] [
         fhir:identity [ fhir:v "workflow" ] ;
         fhir:map [ fhir:v "Event.statusReason" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v ".inboundRelationship[typeCode=SUBJ].source[classCode=CACT, moodCode=EVN].reasonCOde" ]
       ] )
     ] [
       fhir:id [ fhir:v "MedicationStatement.category" ] ;
       fhir:path [ fhir:v "MedicationStatement.category" ] ;
       fhir:short [ fhir:v "Type of medication usage" ] ;
       fhir:definition [ fhir:v "Indicates where the medication is expected to be consumed or administered." ] ;
       fhir:comment [ fhir:v "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:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "MedicationStatement.category" ] ;
         fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "CodeableConcept"^^xsd:anyURI ]
       ] ) ;
       fhir:condition ( [ fhir:v "ele-1" ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:xpath [ fhir:v "@value|f:*|h:div" ] ;
         fhir:source [
           fhir:v "http://hl7.org/fhir/StructureDefinition/Element"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
         ]
       ] ) ;
       fhir:isModifier [ fhir:v false ] ;
       fhir:isSummary [ fhir:v true ] ;
       fhir:binding [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"^^xsd:anyURI ] ;
           fhir:value [
             a fhir:string ;
             fhir:v "MedicationStatementCategory"
           ]
         ] ) ;
         fhir:strength [ fhir:v "preferred" ] ;
         fhir:description [ fhir:v "A coded concept identifying where the medication included in the MedicationStatement is expected to be consumed or administered." ] ;
         fhir:valueSet [
           fhir:v "http://hl7.org/fhir/ValueSet/medication-statement-category"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/ValueSet/medication-statement-category>
         ]
       ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "n/a" ]
       ] [
         fhir:identity [ fhir:v "v2" ] ;
         fhir:map [ fhir:v "CE/CNE/CWE" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "CD" ]
       ] [
         fhir:identity [ fhir:v "orim" ] ;
         fhir:map [ fhir:v "fhir:CodeableConcept rdfs:subClassOf dt:CD" ]
       ] [
         fhir:identity [ fhir:v "w5" ] ;
         fhir:map [ fhir:v "FiveWs.class" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v ".inboundRelationship[typeCode=COMP].source[classCode=OBS, moodCode=EVN, code=\"type of medication usage\"].value" ]
       ] )
     ] [
       fhir:id [ fhir:v "MedicationStatement.medication[x]" ] ;
       fhir:path [ fhir:v "MedicationStatement.medication[x]" ] ;
       fhir:short [ fhir:v "Arzneimittel, welches diese Medikationsinformation bzw. dieses MedicationStatement näher beschreibt" ] ;
       fhir:definition [ fhir:v "Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications." ] ;
       fhir:comment [ fhir:v "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:min [ fhir:v "1"^^xsd:nonNegativeInteger ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "MedicationStatement.medication[x]" ] ;
         fhir:min [ fhir:v "1"^^xsd:nonNegativeInteger ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "Reference"^^xsd:anyURI ] ;
         fhir:targetProfile ( [
           fhir:v "https://gematik.de/fhir/epa-medication/StructureDefinition/epa-medication"^^xsd:anyURI ;
           fhir:link <https://gematik.de/fhir/epa-medication/StructureDefinition/epa-medication>
         ] )
       ] ) ;
       fhir:condition ( [ fhir:v "ele-1" ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:xpath [ fhir:v "@value|f:*|h:div" ] ;
         fhir:source [
           fhir:v "http://hl7.org/fhir/StructureDefinition/Element"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
         ]
       ] ) ;
       fhir:mustSupport [ fhir:v true ] ;
       fhir:isModifier [ fhir:v false ] ;
       fhir:isSummary [ fhir:v true ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "n/a" ]
       ] [
         fhir:identity [ fhir:v "workflow" ] ;
         fhir:map [ fhir:v "Event.code" ]
       ] [
         fhir:identity [ fhir:v "w5" ] ;
         fhir:map [ fhir:v "FiveWs.what[x]" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v ".participation[typeCode=CSM].role[classCode=ADMM or MANU]" ]
       ] )
     ] [
       fhir:id [ fhir:v "MedicationStatement.subject" ] ;
       fhir:path [ fhir:v "MedicationStatement.subject" ] ;
       fhir:short [ fhir:v "Who is/was taking  the medication" ] ;
       fhir:definition [ fhir:v "The person, animal or group who is/was taking the medication." ] ;
       fhir:comment [ fhir:v "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:min [ fhir:v "1"^^xsd:nonNegativeInteger ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "MedicationStatement.subject" ] ;
         fhir:min [ fhir:v "1"^^xsd:nonNegativeInteger ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "Reference"^^xsd:anyURI ] ;
         fhir:targetProfile ( [
           fhir:v "http://hl7.org/fhir/StructureDefinition/Patient"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/Patient>
         ] )
       ] ) ;
       fhir:condition ( [ fhir:v "ele-1" ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:xpath [ fhir:v "@value|f:*|h:div" ] ;
         fhir:source [
           fhir:v "http://hl7.org/fhir/StructureDefinition/Element"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
         ]
       ] [
         fhir:key [ fhir:v "ref-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "SHALL have a contained resource if a local reference is provided" ] ;
         fhir:expression [ fhir:v "reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" ] ;
         fhir:xpath [ fhir:v "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:source [
           fhir:v "http://hl7.org/fhir/StructureDefinition/Reference"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/Reference>
         ]
       ] ) ;
       fhir:mustSupport [ fhir:v true ] ;
       fhir:isModifier [ fhir:v false ] ;
       fhir:isSummary [ fhir:v true ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "n/a" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "The target of a resource reference is a RIM entry point (Act, Role, or Entity)" ]
       ] [
         fhir:identity [ fhir:v "workflow" ] ;
         fhir:map [ fhir:v "Event.subject" ]
       ] [
         fhir:identity [ fhir:v "w5" ] ;
         fhir:map [ fhir:v "FiveWs.subject[x]" ]
       ] [
         fhir:identity [ fhir:v "v2" ] ;
         fhir:map [ fhir:v "PID-3-Patient ID List" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v ".participation[typeCode=SBJ].role[classCode=PAT]" ]
       ] [
         fhir:identity [ fhir:v "w5" ] ;
         fhir:map [ fhir:v "FiveWs.subject" ]
       ] )
     ] [
       fhir:id [ fhir:v "MedicationStatement.subject.id" ] ;
       fhir:path [ fhir:v "MedicationStatement.subject.id" ] ;
       fhir:representation ( [ fhir:v "xmlAttr" ] ) ;
       fhir:short [ fhir:v "Unique id for inter-element referencing" ] ;
       fhir:definition [ fhir:v "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." ] ;
       fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "Element.id" ] ;
         fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"^^xsd:anyURI ] ;
           fhir:value [
             a fhir:url ;
             fhir:v "string"^^xsd:anyURI
           ]
         ] ) ;
         fhir:code [ fhir:v "http://hl7.org/fhirpath/System.String"^^xsd:anyURI ]
       ] ) ;
       fhir:isModifier [ fhir:v false ] ;
       fhir:isSummary [ fhir:v false ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "n/a" ]
       ] )
     ] [
       fhir:id [ fhir:v "MedicationStatement.subject.extension" ] ;
       fhir:path [ fhir:v "MedicationStatement.subject.extension" ] ;
       fhir:slicing [
         fhir:discriminator ( [
           fhir:type [ fhir:v "value" ] ;
           fhir:path [ fhir:v "url" ]
         ] ) ;
         fhir:description [ fhir:v "Extensions are always sliced by (at least) url" ] ;
         fhir:rules [ fhir:v "open" ]
       ] ;
       fhir:short [ fhir:v "Additional content defined by implementations" ] ;
       fhir:definition [ fhir:v "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:comment [ fhir:v "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:alias ( [ fhir:v "extensions" ] [ fhir:v "user content" ] ) ;
       fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
       fhir:max [ fhir:v "*" ] ;
       fhir:base [
         fhir:path [ fhir:v "Element.extension" ] ;
         fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
         fhir:max [ fhir:v "*" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "Extension"^^xsd:anyURI ]
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:xpath [ fhir:v "@value|f:*|h:div" ] ;
         fhir:source [
           fhir:v "http://hl7.org/fhir/StructureDefinition/Element"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
         ]
       ] [
         fhir:key [ fhir:v "ext-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "Must have either extensions or value[x], not both" ] ;
         fhir:expression [ fhir:v "extension.exists() != value.exists()" ] ;
         fhir:xpath [ fhir:v "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])" ] ;
         fhir:source [
           fhir:v "http://hl7.org/fhir/StructureDefinition/Extension"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/Extension>
         ]
       ] ) ;
       fhir:isModifier [ fhir:v false ] ;
       fhir:isSummary [ fhir:v false ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "n/a" ]
       ] )
     ] [
       fhir:id [ fhir:v "MedicationStatement.subject.reference" ] ;
       fhir:path [ fhir:v "MedicationStatement.subject.reference" ] ;
       fhir:short [ fhir:v "Literal reference, Relative, internal or absolute URL" ] ;
       fhir:definition [ fhir:v "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:comment [ fhir:v "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:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "Reference.reference" ] ;
         fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "string"^^xsd:anyURI ]
       ] ) ;
       fhir:condition ( [ fhir:v "ref-1" ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:xpath [ fhir:v "@value|f:*|h:div" ] ;
         fhir:source [
           fhir:v "http://hl7.org/fhir/StructureDefinition/Element"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
         ]
       ] ) ;
       fhir:isModifier [ fhir:v false ] ;
       fhir:isSummary [ fhir:v true ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "N/A" ]
       ] )
     ] [
       fhir:id [ fhir:v "MedicationStatement.subject.type" ] ;
       fhir:path [ fhir:v "MedicationStatement.subject.type" ] ;
       fhir:short [ fhir:v "Type the reference refers to (e.g. \"Patient\")" ] ;
       fhir:definition [ fhir:v "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:comment [ fhir:v "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:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "Reference.type" ] ;
         fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "uri"^^xsd:anyURI ]
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:xpath [ fhir:v "@value|f:*|h:div" ] ;
         fhir:source [
           fhir:v "http://hl7.org/fhir/StructureDefinition/Element"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
         ]
       ] ) ;
       fhir:isModifier [ fhir:v false ] ;
       fhir:isSummary [ fhir:v true ] ;
       fhir:binding [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"^^xsd:anyURI ] ;
           fhir:value [
             a fhir:string ;
             fhir:v "FHIRResourceTypeExt"
           ]
         ] ) ;
         fhir:strength [ fhir:v "extensible" ] ;
         fhir:description [ fhir:v "Aa resource (or, for logical models, the URI of the logical model)." ] ;
         fhir:valueSet [
           fhir:v "http://hl7.org/fhir/ValueSet/resource-types"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/ValueSet/resource-types>
         ]
       ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "N/A" ]
       ] )
     ] [
       fhir:id [ fhir:v "MedicationStatement.subject.identifier" ] ;
       fhir:path [ fhir:v "MedicationStatement.subject.identifier" ] ;
       fhir:short [ fhir:v "Logical reference, when literal reference is not known" ] ;
       fhir:definition [ fhir:v "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:comment [ fhir:v "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:min [ fhir:v "1"^^xsd:nonNegativeInteger ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "Reference.identifier" ] ;
         fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "Identifier"^^xsd:anyURI ] ;
         fhir:profile ( [
           fhir:v "http://fhir.de/StructureDefinition/identifier-kvid-10"^^xsd:anyURI ;
           fhir:link <http://fhir.de/StructureDefinition/identifier-kvid-10>
         ] )
       ] ) ;
       fhir:condition ( [ fhir:v "ele-1" ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:xpath [ fhir:v "@value|f:*|h:div" ] ;
         fhir:source [
           fhir:v "http://hl7.org/fhir/StructureDefinition/Element"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
         ]
       ] ) ;
       fhir:mustSupport [ fhir:v true ] ;
       fhir:isModifier [ fhir:v false ] ;
       fhir:isSummary [ fhir:v true ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "n/a" ]
       ] [
         fhir:identity [ fhir:v "v2" ] ;
         fhir:map [ fhir:v "CX / EI (occasionally, more often EI maps to a resource id or a URL)" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "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:identity [ fhir:v "servd" ] ;
         fhir:map [ fhir:v "Identifier" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v ".identifier" ]
       ] )
     ] [
       fhir:id [ fhir:v "MedicationStatement.subject.display" ] ;
       fhir:extension ( [
         fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable"^^xsd:anyURI ] ;
         fhir:value [
           a fhir:boolean ;
           fhir:v true
         ]
       ] ) ;
       fhir:path [ fhir:v "MedicationStatement.subject.display" ] ;
       fhir:short [ fhir:v "Text alternative for the resource" ] ;
       fhir:definition [ fhir:v "Plain text narrative that identifies the resource in addition to the resource reference." ] ;
       fhir:comment [ fhir:v "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:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "Reference.display" ] ;
         fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "string"^^xsd:anyURI ]
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:xpath [ fhir:v "@value|f:*|h:div" ] ;
         fhir:source [
           fhir:v "http://hl7.org/fhir/StructureDefinition/Element"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
         ]
       ] ) ;
       fhir:isModifier [ fhir:v false ] ;
       fhir:isSummary [ fhir:v true ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "N/A" ]
       ] )
     ] [
       fhir:id [ fhir:v "MedicationStatement.context" ] ;
       fhir:path [ fhir:v "MedicationStatement.context" ] ;
       fhir:short [ fhir:v "Encounter / Episode associated with MedicationStatement" ] ;
       fhir:definition [ fhir:v "The encounter or episode of care that establishes the context for this MedicationStatement." ] ;
       fhir:comment [ fhir:v "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:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "MedicationStatement.context" ] ;
         fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "Reference"^^xsd:anyURI ] ;
         fhir:targetProfile ( [
           fhir:v "http://hl7.org/fhir/StructureDefinition/Encounter"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/Encounter>
         ] [
           fhir:v "http://hl7.org/fhir/StructureDefinition/EpisodeOfCare"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/EpisodeOfCare>
         ] )
       ] ) ;
       fhir:condition ( [ fhir:v "ele-1" ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:xpath [ fhir:v "@value|f:*|h:div" ] ;
         fhir:source [
           fhir:v "http://hl7.org/fhir/StructureDefinition/Element"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
         ]
       ] [
         fhir:key [ fhir:v "ref-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "SHALL have a contained resource if a local reference is provided" ] ;
         fhir:expression [ fhir:v "reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" ] ;
         fhir:xpath [ fhir:v "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:source [
           fhir:v "http://hl7.org/fhir/StructureDefinition/Reference"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/Reference>
         ]
       ] ) ;
       fhir:isModifier [ fhir:v false ] ;
       fhir:isSummary [ fhir:v true ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "n/a" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "The target of a resource reference is a RIM entry point (Act, Role, or Entity)" ]
       ] [
         fhir:identity [ fhir:v "workflow" ] ;
         fhir:map [ fhir:v "Event.context" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v ".inboundRelationship[typeCode=COMP].source[classCode=ENC, moodCode=EVN, code=\"type of encounter or episode\"]" ]
       ] )
     ] [
       fhir:id [ fhir:v "MedicationStatement.effective[x]" ] ;
       fhir:path [ fhir:v "MedicationStatement.effective[x]" ] ;
       fhir:slicing [
         fhir:discriminator ( [
           fhir:type [ fhir:v "type" ] ;
           fhir:path [ fhir:v "$this" ]
         ] ) ;
         fhir:ordered [ fhir:v false ] ;
         fhir:rules [ fhir:v "closed" ]
       ] ;
       fhir:short [ fhir:v "effective[x] gibt den Zeitpunkt oder Zeitraum der Gültigkeit der Medikation an" ] ;
       fhir:definition [ fhir:v "Das Element effective[x] gibt den Zeitraum an, in dem die Angaben zur Medikation gültig sind. Je nach Situation kann hierfür ein einzelner Zeitpunkt (effectiveDateTime) oder ein Zeitraum (effectivePeriod mit Start und ggf. Enddatum) angegeben werden" ] ;
       fhir:comment [ fhir:v "This attribute reflects the period over which the patient consumed the medication and is expected to be populated on the majority of Medication Statements. If the medication is still being taken at the time the statement is recorded, the \"end\" date will be omitted.  The date/time attribute supports a variety of dates - year, year/month and exact date.  If something more than this is required, this should be conveyed as text." ] ;
       fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "MedicationStatement.effective[x]" ] ;
         fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "dateTime"^^xsd:anyURI ]
       ] [
         fhir:code [ fhir:v "Period"^^xsd:anyURI ]
       ] ) ;
       fhir:condition ( [ fhir:v "ele-1" ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:xpath [ fhir:v "@value|f:*|h:div" ] ;
         fhir:source [
           fhir:v "http://hl7.org/fhir/StructureDefinition/Element"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
         ]
       ] ) ;
       fhir:mustSupport [ fhir:v true ] ;
       fhir:isModifier [ fhir:v false ] ;
       fhir:isSummary [ fhir:v true ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "n/a" ]
       ] [
         fhir:identity [ fhir:v "workflow" ] ;
         fhir:map [ fhir:v "Event.occurrence[x]" ]
       ] [
         fhir:identity [ fhir:v "w5" ] ;
         fhir:map [ fhir:v "FiveWs.done[x]" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v ".effectiveTime" ]
       ] )
     ] [
       fhir:id [ fhir:v "MedicationStatement.effective[x]:effectiveDateTime" ] ;
       fhir:path [ fhir:v "MedicationStatement.effective[x]" ] ;
       fhir:sliceName [ fhir:v "effectiveDateTime" ] ;
       fhir:short [ fhir:v "The date/time or interval when the medication is/was/will be taken" ] ;
       fhir:definition [ fhir:v "The interval of time during which it is being asserted that the patient is/was/will be taking the medication (or was not taking, when the MedicationStatement.taken element is No)." ] ;
       fhir:comment [ fhir:v "This attribute reflects the period over which the patient consumed the medication and is expected to be populated on the majority of Medication Statements. If the medication is still being taken at the time the statement is recorded, the \"end\" date will be omitted.  The date/time attribute supports a variety of dates - year, year/month and exact date.  If something more than this is required, this should be conveyed as text." ] ;
       fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "MedicationStatement.effective[x]" ] ;
         fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "dateTime"^^xsd:anyURI ]
       ] ) ;
       fhir:condition ( [ fhir:v "ele-1" ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:xpath [ fhir:v "@value|f:*|h:div" ] ;
         fhir:source [
           fhir:v "http://hl7.org/fhir/StructureDefinition/Element"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
         ]
       ] [
         fhir:key [ fhir:v "epa-datetime" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "dateTime muss mindestens aus Tag, Monat und Jahr bestehen" ] ;
         fhir:expression [ fhir:v "toString().matches('^([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\\\.[0-9]+)?(Z|(\\\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?$')" ] ;
         fhir:source [
           fhir:v "https://gematik.de/fhir/epa-medication/StructureDefinition/epa-medication-statement"^^xsd:anyURI ;
           fhir:link <https://gematik.de/fhir/epa-medication/StructureDefinition/epa-medication-statement>
         ]
       ] ) ;
       fhir:mustSupport [ fhir:v true ] ;
       fhir:isModifier [ fhir:v false ] ;
       fhir:isSummary [ fhir:v true ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "n/a" ]
       ] [
         fhir:identity [ fhir:v "workflow" ] ;
         fhir:map [ fhir:v "Event.occurrence[x]" ]
       ] [
         fhir:identity [ fhir:v "w5" ] ;
         fhir:map [ fhir:v "FiveWs.done[x]" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v ".effectiveTime" ]
       ] )
     ] [
       fhir:id [ fhir:v "MedicationStatement.effective[x]:effectivePeriod" ] ;
       fhir:path [ fhir:v "MedicationStatement.effective[x]" ] ;
       fhir:sliceName [ fhir:v "effectivePeriod" ] ;
       fhir:short [ fhir:v "The date/time or interval when the medication is/was/will be taken" ] ;
       fhir:definition [ fhir:v "The interval of time during which it is being asserted that the patient is/was/will be taking the medication (or was not taking, when the MedicationStatement.taken element is No)." ] ;
       fhir:comment [ fhir:v "This attribute reflects the period over which the patient consumed the medication and is expected to be populated on the majority of Medication Statements. If the medication is still being taken at the time the statement is recorded, the \"end\" date will be omitted.  The date/time attribute supports a variety of dates - year, year/month and exact date.  If something more than this is required, this should be conveyed as text." ] ;
       fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "MedicationStatement.effective[x]" ] ;
         fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "Period"^^xsd:anyURI ]
       ] ) ;
       fhir:condition ( [ fhir:v "ele-1" ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:xpath [ fhir:v "@value|f:*|h:div" ] ;
         fhir:source [
           fhir:v "http://hl7.org/fhir/StructureDefinition/Element"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
         ]
       ] ) ;
       fhir:mustSupport [ fhir:v true ] ;
       fhir:isModifier [ fhir:v false ] ;
       fhir:isSummary [ fhir:v true ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "n/a" ]
       ] [
         fhir:identity [ fhir:v "workflow" ] ;
         fhir:map [ fhir:v "Event.occurrence[x]" ]
       ] [
         fhir:identity [ fhir:v "w5" ] ;
         fhir:map [ fhir:v "FiveWs.done[x]" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v ".effectiveTime" ]
       ] )
     ] [
       fhir:id [ fhir:v "MedicationStatement.effective[x]:effectivePeriod.id" ] ;
       fhir:path [ fhir:v "MedicationStatement.effective[x].id" ] ;
       fhir:representation ( [ fhir:v "xmlAttr" ] ) ;
       fhir:short [ fhir:v "Unique id for inter-element referencing" ] ;
       fhir:definition [ fhir:v "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." ] ;
       fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "Element.id" ] ;
         fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"^^xsd:anyURI ] ;
           fhir:value [
             a fhir:url ;
             fhir:v "string"^^xsd:anyURI
           ]
         ] ) ;
         fhir:code [ fhir:v "http://hl7.org/fhirpath/System.String"^^xsd:anyURI ]
       ] ) ;
       fhir:isModifier [ fhir:v false ] ;
       fhir:isSummary [ fhir:v false ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "n/a" ]
       ] )
     ] [
       fhir:id [ fhir:v "MedicationStatement.effective[x]:effectivePeriod.extension" ] ;
       fhir:path [ fhir:v "MedicationStatement.effective[x].extension" ] ;
       fhir:slicing [
         fhir:discriminator ( [
           fhir:type [ fhir:v "value" ] ;
           fhir:path [ fhir:v "url" ]
         ] ) ;
         fhir:description [ fhir:v "Extensions are always sliced by (at least) url" ] ;
         fhir:rules [ fhir:v "open" ]
       ] ;
       fhir:short [ fhir:v "Additional content defined by implementations" ] ;
       fhir:definition [ fhir:v "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:comment [ fhir:v "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:alias ( [ fhir:v "extensions" ] [ fhir:v "user content" ] ) ;
       fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
       fhir:max [ fhir:v "*" ] ;
       fhir:base [
         fhir:path [ fhir:v "Element.extension" ] ;
         fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
         fhir:max [ fhir:v "*" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "Extension"^^xsd:anyURI ]
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:xpath [ fhir:v "@value|f:*|h:div" ] ;
         fhir:source [
           fhir:v "http://hl7.org/fhir/StructureDefinition/Element"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
         ]
       ] [
         fhir:key [ fhir:v "ext-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "Must have either extensions or value[x], not both" ] ;
         fhir:expression [ fhir:v "extension.exists() != value.exists()" ] ;
         fhir:xpath [ fhir:v "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])" ] ;
         fhir:source [
           fhir:v "http://hl7.org/fhir/StructureDefinition/Extension"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/Extension>
         ]
       ] ) ;
       fhir:isModifier [ fhir:v false ] ;
       fhir:isSummary [ fhir:v false ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "n/a" ]
       ] )
     ] [
       fhir:id [ fhir:v "MedicationStatement.effective[x]:effectivePeriod.start" ] ;
       fhir:path [ fhir:v "MedicationStatement.effective[x].start" ] ;
       fhir:short [ fhir:v "Starting time with inclusive boundary" ] ;
       fhir:definition [ fhir:v "The start of the period. The boundary is inclusive." ] ;
       fhir:comment [ fhir:v "If the low element is missing, the meaning is that the low boundary is not known." ] ;
       fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "Period.start" ] ;
         fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "dateTime"^^xsd:anyURI ]
       ] ) ;
       fhir:condition ( [ fhir:v "per-1" ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:xpath [ fhir:v "@value|f:*|h:div" ] ;
         fhir:source [
           fhir:v "http://hl7.org/fhir/StructureDefinition/Element"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
         ]
       ] [
         fhir:key [ fhir:v "epa-datetime" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "dateTime muss mindestens aus Tag, Monat und Jahr bestehen" ] ;
         fhir:expression [ fhir:v "toString().matches('^([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\\\.[0-9]+)?(Z|(\\\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?$')" ] ;
         fhir:source [
           fhir:v "https://gematik.de/fhir/epa-medication/StructureDefinition/epa-medication-statement"^^xsd:anyURI ;
           fhir:link <https://gematik.de/fhir/epa-medication/StructureDefinition/epa-medication-statement>
         ]
       ] ) ;
       fhir:mustSupport [ fhir:v true ] ;
       fhir:isModifier [ fhir:v false ] ;
       fhir:isSummary [ fhir:v true ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "v2" ] ;
         fhir:map [ fhir:v "DR.1" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "./low" ]
       ] )
     ] [
       fhir:id [ fhir:v "MedicationStatement.effective[x]:effectivePeriod.end" ] ;
       fhir:path [ fhir:v "MedicationStatement.effective[x].end" ] ;
       fhir:short [ fhir:v "End time with inclusive boundary, if not ongoing" ] ;
       fhir:definition [ fhir:v "The end of the period. If the end of the period is missing, it means no end was known or planned at the time the instance was created. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time." ] ;
       fhir:comment [ fhir:v "The high value includes any matching date/time. i.e. 2012-02-03T10:00:00 is in a period that has an end value of 2012-02-03." ] ;
       fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "Period.end" ] ;
         fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "dateTime"^^xsd:anyURI ]
       ] ) ;
       fhir:meaningWhenMissing [ fhir:v "If the end of the period is missing, it means that the period is ongoing" ] ;
       fhir:condition ( [ fhir:v "per-1" ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:xpath [ fhir:v "@value|f:*|h:div" ] ;
         fhir:source [
           fhir:v "http://hl7.org/fhir/StructureDefinition/Element"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
         ]
       ] [
         fhir:key [ fhir:v "epa-datetime" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "dateTime muss mindestens aus Tag, Monat und Jahr bestehen" ] ;
         fhir:expression [ fhir:v "toString().matches('^([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\\\.[0-9]+)?(Z|(\\\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?$')" ] ;
         fhir:source [
           fhir:v "https://gematik.de/fhir/epa-medication/StructureDefinition/epa-medication-statement"^^xsd:anyURI ;
           fhir:link <https://gematik.de/fhir/epa-medication/StructureDefinition/epa-medication-statement>
         ]
       ] ) ;
       fhir:mustSupport [ fhir:v true ] ;
       fhir:isModifier [ fhir:v false ] ;
       fhir:isSummary [ fhir:v true ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "v2" ] ;
         fhir:map [ fhir:v "DR.2" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "./high" ]
       ] )
     ] [
       fhir:id [ fhir:v "MedicationStatement.dateAsserted" ] ;
       fhir:path [ fhir:v "MedicationStatement.dateAsserted" ] ;
       fhir:short [ fhir:v "When the statement was asserted?" ] ;
       fhir:definition [ fhir:v "The date when the medication statement was asserted by the information source." ] ;
       fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "MedicationStatement.dateAsserted" ] ;
         fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "dateTime"^^xsd:anyURI ]
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:xpath [ fhir:v "@value|f:*|h:div" ] ;
         fhir:source [
           fhir:v "http://hl7.org/fhir/StructureDefinition/Element"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
         ]
       ] [
         fhir:key [ fhir:v "epa-datetime" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "dateTime muss mindestens aus Tag, Monat und Jahr bestehen" ] ;
         fhir:expression [ fhir:v "toString().matches('^([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\\\.[0-9]+)?(Z|(\\\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?$')" ] ;
         fhir:source [
           fhir:v "https://gematik.de/fhir/epa-medication/StructureDefinition/epa-medication-statement"^^xsd:anyURI ;
           fhir:link <https://gematik.de/fhir/epa-medication/StructureDefinition/epa-medication-statement>
         ]
       ] ) ;
       fhir:mustSupport [ fhir:v true ] ;
       fhir:isModifier [ fhir:v false ] ;
       fhir:isSummary [ fhir:v true ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "w5" ] ;
         fhir:map [ fhir:v "FiveWs.recorded" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v ".participation[typeCode=AUT].time" ]
       ] )
     ] [
       fhir:id [ fhir:v "MedicationStatement.informationSource" ] ;
       fhir:path [ fhir:v "MedicationStatement.informationSource" ] ;
       fhir:short [ fhir:v "Person or organization that provided the information about the taking of this medication" ] ;
       fhir:definition [ fhir:v "The person or organization that provided the information about the taking of this medication. Note: Use derivedFrom when a MedicationStatement is derived from other resources, e.g. Claim or MedicationRequest." ] ;
       fhir:comment [ fhir:v "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:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "MedicationStatement.informationSource" ] ;
         fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "Reference"^^xsd:anyURI ] ;
         fhir:targetProfile ( [
           fhir:v "http://hl7.org/fhir/StructureDefinition/Patient"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/Patient>
         ] [
           fhir:v "http://hl7.org/fhir/StructureDefinition/Practitioner"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/Practitioner>
         ] [
           fhir:v "http://hl7.org/fhir/StructureDefinition/PractitionerRole"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/PractitionerRole>
         ] [
           fhir:v "http://hl7.org/fhir/StructureDefinition/RelatedPerson"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/RelatedPerson>
         ] [
           fhir:v "http://hl7.org/fhir/StructureDefinition/Organization"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/Organization>
         ] )
       ] ) ;
       fhir:condition ( [ fhir:v "ele-1" ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:xpath [ fhir:v "@value|f:*|h:div" ] ;
         fhir:source [
           fhir:v "http://hl7.org/fhir/StructureDefinition/Element"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
         ]
       ] [
         fhir:key [ fhir:v "ref-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "SHALL have a contained resource if a local reference is provided" ] ;
         fhir:expression [ fhir:v "reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" ] ;
         fhir:xpath [ fhir:v "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:source [
           fhir:v "http://hl7.org/fhir/StructureDefinition/Reference"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/Reference>
         ]
       ] ) ;
       fhir:isModifier [ fhir:v false ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "n/a" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "The target of a resource reference is a RIM entry point (Act, Role, or Entity)" ]
       ] [
         fhir:identity [ fhir:v "w5" ] ;
         fhir:map [ fhir:v "FiveWs.source" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v ".participation[typeCode=INF].role[classCode=PAT, or codes for Practioner or Related Person (if PAT is the informer, then syntax for self-reported =true)" ]
       ] )
     ] [
       fhir:id [ fhir:v "MedicationStatement.derivedFrom" ] ;
       fhir:path [ fhir:v "MedicationStatement.derivedFrom" ] ;
       fhir:short [ fhir:v "Information des Verschreibungs- und Dispensierprozesses" ] ;
       fhir:definition [ fhir:v "Allows linking the MedicationStatement to the underlying MedicationRequest, or to other information that supports or is used to derive the MedicationStatement." ] ;
       fhir:comment [ fhir:v "Likely references would be to MedicationRequest, MedicationDispense, Claim, Observation or QuestionnaireAnswers.  The most common use cases for deriving a MedicationStatement comes from creating a MedicationStatement from a MedicationRequest or from a lab observation or a claim.  it should be noted that the amount of information that is available varies from the type resource that you derive the MedicationStatement from." ] ;
       fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
       fhir:max [ fhir:v "*" ] ;
       fhir:base [
         fhir:path [ fhir:v "MedicationStatement.derivedFrom" ] ;
         fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
         fhir:max [ fhir:v "*" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "Reference"^^xsd:anyURI ] ;
         fhir:targetProfile ( [
           fhir:v "https://gematik.de/fhir/epa-medication/StructureDefinition/epa-medication-request"^^xsd:anyURI ;
           fhir:link <https://gematik.de/fhir/epa-medication/StructureDefinition/epa-medication-request>
         ] [
           fhir:v "https://gematik.de/fhir/epa-medication/StructureDefinition/epa-medication-dispense"^^xsd:anyURI ;
           fhir:link <https://gematik.de/fhir/epa-medication/StructureDefinition/epa-medication-dispense>
         ] )
       ] ) ;
       fhir:condition ( [ fhir:v "ele-1" ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:xpath [ fhir:v "@value|f:*|h:div" ] ;
         fhir:source [
           fhir:v "http://hl7.org/fhir/StructureDefinition/Element"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
         ]
       ] [
         fhir:key [ fhir:v "ref-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "SHALL have a contained resource if a local reference is provided" ] ;
         fhir:expression [ fhir:v "reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" ] ;
         fhir:xpath [ fhir:v "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:source [
           fhir:v "http://hl7.org/fhir/StructureDefinition/Reference"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/Reference>
         ]
       ] ) ;
       fhir:mustSupport [ fhir:v true ] ;
       fhir:isModifier [ fhir:v false ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "n/a" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "The target of a resource reference is a RIM entry point (Act, Role, or Entity)" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v ".outboundRelationship[typeCode=SPRT]/target[classCode=ACT,moodCode=EVN]" ]
       ] )
     ] [
       fhir:id [ fhir:v "MedicationStatement.reasonCode" ] ;
       fhir:path [ fhir:v "MedicationStatement.reasonCode" ] ;
       fhir:short [ fhir:v "Reason for why the medication is being/was taken" ] ;
       fhir:definition [ fhir:v "A reason for why the medication is being/was taken." ] ;
       fhir:comment [ fhir:v "This could be a diagnosis code. If a full condition record exists or additional detail is needed, use reasonForUseReference." ] ;
       fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
       fhir:max [ fhir:v "*" ] ;
       fhir:base [
         fhir:path [ fhir:v "MedicationStatement.reasonCode" ] ;
         fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
         fhir:max [ fhir:v "*" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "CodeableConcept"^^xsd:anyURI ]
       ] ) ;
       fhir:condition ( [ fhir:v "ele-1" ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:xpath [ fhir:v "@value|f:*|h:div" ] ;
         fhir:source [
           fhir:v "http://hl7.org/fhir/StructureDefinition/Element"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
         ]
       ] ) ;
       fhir:isModifier [ fhir:v false ] ;
       fhir:binding [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"^^xsd:anyURI ] ;
           fhir:value [
             a fhir:string ;
             fhir:v "MedicationReason"
           ]
         ] ) ;
         fhir:strength [ fhir:v "example" ] ;
         fhir:description [ fhir:v "A coded concept identifying why the medication is being taken." ] ;
         fhir:valueSet [
           fhir:v "http://hl7.org/fhir/ValueSet/condition-code"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/ValueSet/condition-code>
         ]
       ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "n/a" ]
       ] [
         fhir:identity [ fhir:v "v2" ] ;
         fhir:map [ fhir:v "CE/CNE/CWE" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "CD" ]
       ] [
         fhir:identity [ fhir:v "orim" ] ;
         fhir:map [ fhir:v "fhir:CodeableConcept rdfs:subClassOf dt:CD" ]
       ] [
         fhir:identity [ fhir:v "workflow" ] ;
         fhir:map [ fhir:v "Event.reasonCode" ]
       ] [
         fhir:identity [ fhir:v "w5" ] ;
         fhir:map [ fhir:v "FiveWs.why[x]" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v ".reasonCode" ]
       ] )
     ] [
       fhir:id [ fhir:v "MedicationStatement.reasonReference" ] ;
       fhir:path [ fhir:v "MedicationStatement.reasonReference" ] ;
       fhir:short [ fhir:v "Condition or observation that supports why the medication is being/was taken" ] ;
       fhir:definition [ fhir:v "Condition or observation that supports why the medication is being/was taken." ] ;
       fhir:comment [ fhir:v "This is a reference to a condition that is the reason why the medication is being/was taken.  If only a code exists, use reasonForUseCode." ] ;
       fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
       fhir:max [ fhir:v "*" ] ;
       fhir:base [
         fhir:path [ fhir:v "MedicationStatement.reasonReference" ] ;
         fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
         fhir:max [ fhir:v "*" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "Reference"^^xsd:anyURI ] ;
         fhir:targetProfile ( [
           fhir:v "http://hl7.org/fhir/StructureDefinition/Condition"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/Condition>
         ] [
           fhir:v "http://hl7.org/fhir/StructureDefinition/Observation"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/Observation>
         ] [
           fhir:v "http://hl7.org/fhir/StructureDefinition/DiagnosticReport"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/DiagnosticReport>
         ] )
       ] ) ;
       fhir:condition ( [ fhir:v "ele-1" ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:xpath [ fhir:v "@value|f:*|h:div" ] ;
         fhir:source [
           fhir:v "http://hl7.org/fhir/StructureDefinition/Element"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
         ]
       ] [
         fhir:key [ fhir:v "ref-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "SHALL have a contained resource if a local reference is provided" ] ;
         fhir:expression [ fhir:v "reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" ] ;
         fhir:xpath [ fhir:v "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:source [
           fhir:v "http://hl7.org/fhir/StructureDefinition/Reference"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/Reference>
         ]
       ] ) ;
       fhir:isModifier [ fhir:v false ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "n/a" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "The target of a resource reference is a RIM entry point (Act, Role, or Entity)" ]
       ] [
         fhir:identity [ fhir:v "workflow" ] ;
         fhir:map [ fhir:v "Event.reasonReference" ]
       ] [
         fhir:identity [ fhir:v "w5" ] ;
         fhir:map [ fhir:v "FiveWs.why[x]" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v ".outboundRelationship[typeCode=RSON]/target[classCode=OBS,moodCode=EVN, code=\"reason for use\"].value" ]
       ] )
     ] [
       fhir:id [ fhir:v "MedicationStatement.note" ] ;
       fhir:path [ fhir:v "MedicationStatement.note" ] ;
       fhir:short [ fhir:v "Further information about the statement" ] ;
       fhir:definition [ fhir:v "Provides extra information about the medication statement that is not conveyed by the other attributes." ] ;
       fhir:comment [ fhir:v "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:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
       fhir:max [ fhir:v "*" ] ;
       fhir:base [
         fhir:path [ fhir:v "MedicationStatement.note" ] ;
         fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
         fhir:max [ fhir:v "*" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "Annotation"^^xsd:anyURI ]
       ] ) ;
       fhir:condition ( [ fhir:v "ele-1" ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:xpath [ fhir:v "@value|f:*|h:div" ] ;
         fhir:source [
           fhir:v "http://hl7.org/fhir/StructureDefinition/Element"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
         ]
       ] ) ;
       fhir:isModifier [ fhir:v false ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "n/a" ]
       ] [
         fhir:identity [ fhir:v "v2" ] ;
         fhir:map [ fhir:v "N/A" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "Act" ]
       ] [
         fhir:identity [ fhir:v "workflow" ] ;
         fhir:map [ fhir:v "Event.note" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v ".inboundRelationship[typeCode=SUBJ]/source[classCode=OBS,moodCode=EVN,code=\"annotation\"].value" ]
       ] )
     ] [
       fhir:id [ fhir:v "MedicationStatement.dosage" ] ;
       fhir:path [ fhir:v "MedicationStatement.dosage" ] ;
       fhir:short [ fhir:v "Strukturierte Dosierung/Gebrauchsanweisung" ] ;
       fhir:definition [ fhir:v "Hier werden strukturierte Informationen zur Dosierung/Gebrauchsanweisung zur Arzneimitteleinnahme gemäß Vorgabe von HL7 Deutschland e.V. angegeben." ] ;
       fhir:comment [ fhir:v "The dates included in the dosage on a Medication Statement reflect the dates for a given dose.  For example, \"from November 1, 2016 to November 3, 2016, take one tablet daily and from November 4, 2016 to November 7, 2016, take two tablets daily.\"  It is expected that this specificity may only be populated where the patient brings in their labeled container or where the Medication Statement is derived from a MedicationRequest." ] ;
       fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
       fhir:max [ fhir:v "*" ] ;
       fhir:base [
         fhir:path [ fhir:v "MedicationStatement.dosage" ] ;
         fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
         fhir:max [ fhir:v "*" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "Dosage"^^xsd:anyURI ] ;
         fhir:profile ( [
           fhir:v "http://ig.fhir.de/igs/medication/StructureDefinition/DosageDgMP"^^xsd:anyURI ;
           fhir:link <http://ig.fhir.de/igs/medication/StructureDefinition/DosageDgMP>
         ] )
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:xpath [ fhir:v "@value|f:*|h:div" ] ;
         fhir:source [
           fhir:v "http://hl7.org/fhir/StructureDefinition/Element"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
         ]
       ] ) ;
       fhir:mustSupport [ fhir:v true ] ;
       fhir:isModifier [ fhir:v false ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "n/a" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v ".outboundRelationship[typeCode=COMP].target[classCode=SBADM, moodCode=INT]" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "refer dosageInstruction mapping" ]
       ] )
     ] )
  ] ; # 
  fhir:differential [
     fhir:element ( [
       fhir:id [ fhir:v "MedicationStatement" ] ;
       fhir:path [ fhir:v "MedicationStatement" ] ;
       fhir:constraint ( [
         fhir:key [ fhir:v "epa-med-statement-status" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "Ein MedicationStatement im Kontext 'Nachtrag' darf nicht den Status 'intended' haben" ] ;
         fhir:expression [ fhir:v "extension('https://gematik.de/fhir/epa-medication/StructureDefinition/context-extension').exists(value != 'MANUAL') or status != 'intended'" ] ;
         fhir:source [
           fhir:v "https://gematik.de/fhir/epa-medication/StructureDefinition/epa-medication-statement"^^xsd:anyURI ;
           fhir:link <https://gematik.de/fhir/epa-medication/StructureDefinition/epa-medication-statement>
         ]
       ] )
     ] [
       fhir:id [ fhir:v "MedicationStatement.meta" ] ;
       fhir:path [ fhir:v "MedicationStatement.meta" ] ;
       fhir:mustSupport [ fhir:v true ]
     ] [
       fhir:id [ fhir:v "MedicationStatement.meta.versionId" ] ;
       fhir:path [ fhir:v "MedicationStatement.meta.versionId" ] ;
       fhir:mustSupport [ fhir:v true ]
     ] [
       fhir:id [ fhir:v "MedicationStatement.meta.lastUpdated" ] ;
       fhir:path [ fhir:v "MedicationStatement.meta.lastUpdated" ] ;
       fhir:mustSupport [ fhir:v true ]
     ] [
       fhir:id [ fhir:v "MedicationStatement.extension" ] ;
       fhir:path [ fhir:v "MedicationStatement.extension" ] ;
       fhir:min [ fhir:v "1"^^xsd:nonNegativeInteger ]
     ] [
       fhir:id [ fhir:v "MedicationStatement.extension:context" ] ;
       fhir:path [ fhir:v "MedicationStatement.extension" ] ;
       fhir:sliceName [ fhir:v "context" ] ;
       fhir:min [ fhir:v "1"^^xsd:nonNegativeInteger ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:type ( [
         fhir:code [ fhir:v "Extension"^^xsd:anyURI ] ;
         fhir:profile ( [
           fhir:v "https://gematik.de/fhir/epa-medication/StructureDefinition/context-extension"^^xsd:anyURI ;
           fhir:link <https://gematik.de/fhir/epa-medication/StructureDefinition/context-extension>
         ] )
       ] ) ;
       fhir:mustSupport [ fhir:v true ]
     ] [
       fhir:id [ fhir:v "MedicationStatement.extension:context.value[x]" ] ;
       fhir:path [ fhir:v "MedicationStatement.extension.value[x]" ] ;
       fhir:binding [
         fhir:strength [ fhir:v "required" ] ;
         fhir:valueSet [
           fhir:v "https://gematik.de/fhir/epa-medication/ValueSet/epa-medicationstatement-context-code"^^xsd:anyURI ;
           fhir:link <https://gematik.de/fhir/epa-medication/ValueSet/epa-medicationstatement-context-code>
         ]
       ]
     ] [
       fhir:id [ fhir:v "MedicationStatement.extension:rxPrescriptionProcessIdentifier" ] ;
       fhir:path [ fhir:v "MedicationStatement.extension" ] ;
       fhir:sliceName [ fhir:v "rxPrescriptionProcessIdentifier" ] ;
       fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:type ( [
         fhir:code [ fhir:v "Extension"^^xsd:anyURI ] ;
         fhir:profile ( [
           fhir:v "https://gematik.de/fhir/epa-medication/StructureDefinition/rx-prescription-process-identifier-extension"^^xsd:anyURI ;
           fhir:link <https://gematik.de/fhir/epa-medication/StructureDefinition/rx-prescription-process-identifier-extension>
         ] )
       ] )
     ] [
       fhir:id [ fhir:v "MedicationStatement.extension:processingEvent" ] ;
       fhir:path [ fhir:v "MedicationStatement.extension" ] ;
       fhir:sliceName [ fhir:v "processingEvent" ] ;
       fhir:short [ fhir:v "Ein Ereignis, welches während eines Prozessschritts auftritt." ] ;
       fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
       fhir:max [ fhir:v "*" ] ;
       fhir:type ( [
         fhir:code [ fhir:v "Extension"^^xsd:anyURI ] ;
         fhir:profile ( [
           fhir:v "https://gematik.de/fhir/epa-medication/StructureDefinition/epa-medicationstatement-processing-event-extension"^^xsd:anyURI ;
           fhir:link <https://gematik.de/fhir/epa-medication/StructureDefinition/epa-medicationstatement-processing-event-extension>
         ] )
       ] ) ;
       fhir:mustSupport [ fhir:v true ]
     ] [
       fhir:id [ fhir:v "MedicationStatement.basedOn.extension:isEMP" ] ;
       fhir:path [ fhir:v "MedicationStatement.basedOn.extension" ] ;
       fhir:sliceName [ fhir:v "isEMP" ] ;
       fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:type ( [
         fhir:code [ fhir:v "Extension"^^xsd:anyURI ] ;
         fhir:profile ( [
           fhir:v "https://gematik.de/fhir/epa-medication/StructureDefinition/is-emp-extension"^^xsd:anyURI ;
           fhir:link <https://gematik.de/fhir/epa-medication/StructureDefinition/is-emp-extension>
         ] )
       ] )
     ] [
       fhir:id [ fhir:v "MedicationStatement.status" ] ;
       fhir:path [ fhir:v "MedicationStatement.status" ] ;
       fhir:short [ fhir:v "unknown | entered-in-error | intended" ] ;
       fhir:mustSupport [ fhir:v true ] ;
       fhir:binding [
         fhir:strength [ fhir:v "required" ] ;
         fhir:valueSet [
           fhir:v "https://gematik.de/fhir/epa-medication/ValueSet/epa-medication-statement-status-vs"^^xsd:anyURI ;
           fhir:link <https://gematik.de/fhir/epa-medication/ValueSet/epa-medication-statement-status-vs>
         ]
       ]
     ] [
       fhir:id [ fhir:v "MedicationStatement.medication[x]" ] ;
       fhir:path [ fhir:v "MedicationStatement.medication[x]" ] ;
       fhir:short [ fhir:v "Arzneimittel, welches diese Medikationsinformation bzw. dieses MedicationStatement näher beschreibt" ] ;
       fhir:type ( [
         fhir:code [ fhir:v "Reference"^^xsd:anyURI ] ;
         fhir:targetProfile ( [
           fhir:v "https://gematik.de/fhir/epa-medication/StructureDefinition/epa-medication"^^xsd:anyURI ;
           fhir:link <https://gematik.de/fhir/epa-medication/StructureDefinition/epa-medication>
         ] )
       ] ) ;
       fhir:mustSupport [ fhir:v true ]
     ] [
       fhir:id [ fhir:v "MedicationStatement.subject" ] ;
       fhir:path [ fhir:v "MedicationStatement.subject" ] ;
       fhir:type ( [
         fhir:code [ fhir:v "Reference"^^xsd:anyURI ] ;
         fhir:targetProfile ( [
           fhir:v "http://hl7.org/fhir/StructureDefinition/Patient"^^xsd:anyURI ;
           fhir:link <http://hl7.org/fhir/StructureDefinition/Patient>
         ] )
       ] ) ;
       fhir:mustSupport [ fhir:v true ]
     ] [
       fhir:id [ fhir:v "MedicationStatement.subject.identifier" ] ;
       fhir:path [ fhir:v "MedicationStatement.subject.identifier" ] ;
       fhir:min [ fhir:v "1"^^xsd:nonNegativeInteger ] ;
       fhir:type ( [
         fhir:code [ fhir:v "Identifier"^^xsd:anyURI ] ;
         fhir:profile ( [
           fhir:v "http://fhir.de/StructureDefinition/identifier-kvid-10"^^xsd:anyURI ;
           fhir:link <http://fhir.de/StructureDefinition/identifier-kvid-10>
         ] )
       ] ) ;
       fhir:mustSupport [ fhir:v true ]
     ] [
       fhir:id [ fhir:v "MedicationStatement.effective[x]" ] ;
       fhir:path [ fhir:v "MedicationStatement.effective[x]" ] ;
       fhir:slicing [
         fhir:discriminator ( [
           fhir:type [ fhir:v "type" ] ;
           fhir:path [ fhir:v "$this" ]
         ] ) ;
         fhir:ordered [ fhir:v false ] ;
         fhir:rules [ fhir:v "open" ]
       ] ;
       fhir:short [ fhir:v "effective[x] gibt den Zeitpunkt oder Zeitraum der Gültigkeit der Medikation an" ] ;
       fhir:definition [ fhir:v "Das Element effective[x] gibt den Zeitraum an, in dem die Angaben zur Medikation gültig sind. Je nach Situation kann hierfür ein einzelner Zeitpunkt (effectiveDateTime) oder ein Zeitraum (effectivePeriod mit Start und ggf. Enddatum) angegeben werden" ] ;
       fhir:mustSupport [ fhir:v true ]
     ] [
       fhir:id [ fhir:v "MedicationStatement.effective[x]:effectiveDateTime" ] ;
       fhir:path [ fhir:v "MedicationStatement.effective[x]" ] ;
       fhir:sliceName [ fhir:v "effectiveDateTime" ] ;
       fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:type ( [
         fhir:code [ fhir:v "dateTime"^^xsd:anyURI ]
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "epa-datetime" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "dateTime muss mindestens aus Tag, Monat und Jahr bestehen" ] ;
         fhir:expression [ fhir:v "toString().matches('^([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\\\.[0-9]+)?(Z|(\\\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?$')" ] ;
         fhir:source [
           fhir:v "https://gematik.de/fhir/epa-medication/StructureDefinition/epa-medication-statement"^^xsd:anyURI ;
           fhir:link <https://gematik.de/fhir/epa-medication/StructureDefinition/epa-medication-statement>
         ]
       ] ) ;
       fhir:mustSupport [ fhir:v true ]
     ] [
       fhir:id [ fhir:v "MedicationStatement.effective[x]:effectivePeriod" ] ;
       fhir:path [ fhir:v "MedicationStatement.effective[x]" ] ;
       fhir:sliceName [ fhir:v "effectivePeriod" ] ;
       fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:type ( [
         fhir:code [ fhir:v "Period"^^xsd:anyURI ]
       ] ) ;
       fhir:mustSupport [ fhir:v true ]
     ] [
       fhir:id [ fhir:v "MedicationStatement.effective[x]:effectivePeriod.start" ] ;
       fhir:path [ fhir:v "MedicationStatement.effective[x].start" ] ;
       fhir:constraint ( [
         fhir:key [ fhir:v "epa-datetime" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "dateTime muss mindestens aus Tag, Monat und Jahr bestehen" ] ;
         fhir:expression [ fhir:v "toString().matches('^([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\\\.[0-9]+)?(Z|(\\\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?$')" ] ;
         fhir:source [
           fhir:v "https://gematik.de/fhir/epa-medication/StructureDefinition/epa-medication-statement"^^xsd:anyURI ;
           fhir:link <https://gematik.de/fhir/epa-medication/StructureDefinition/epa-medication-statement>
         ]
       ] ) ;
       fhir:mustSupport [ fhir:v true ]
     ] [
       fhir:id [ fhir:v "MedicationStatement.effective[x]:effectivePeriod.end" ] ;
       fhir:path [ fhir:v "MedicationStatement.effective[x].end" ] ;
       fhir:constraint ( [
         fhir:key [ fhir:v "epa-datetime" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "dateTime muss mindestens aus Tag, Monat und Jahr bestehen" ] ;
         fhir:expression [ fhir:v "toString().matches('^([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\\\.[0-9]+)?(Z|(\\\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?$')" ] ;
         fhir:source [
           fhir:v "https://gematik.de/fhir/epa-medication/StructureDefinition/epa-medication-statement"^^xsd:anyURI ;
           fhir:link <https://gematik.de/fhir/epa-medication/StructureDefinition/epa-medication-statement>
         ]
       ] ) ;
       fhir:mustSupport [ fhir:v true ]
     ] [
       fhir:id [ fhir:v "MedicationStatement.dateAsserted" ] ;
       fhir:path [ fhir:v "MedicationStatement.dateAsserted" ] ;
       fhir:constraint ( [
         fhir:key [ fhir:v "epa-datetime" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "dateTime muss mindestens aus Tag, Monat und Jahr bestehen" ] ;
         fhir:expression [ fhir:v "toString().matches('^([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\\\.[0-9]+)?(Z|(\\\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?$')" ] ;
         fhir:source [
           fhir:v "https://gematik.de/fhir/epa-medication/StructureDefinition/epa-medication-statement"^^xsd:anyURI ;
           fhir:link <https://gematik.de/fhir/epa-medication/StructureDefinition/epa-medication-statement>
         ]
       ] ) ;
       fhir:mustSupport [ fhir:v true ]
     ] [
       fhir:id [ fhir:v "MedicationStatement.derivedFrom" ] ;
       fhir:path [ fhir:v "MedicationStatement.derivedFrom" ] ;
       fhir:short [ fhir:v "Information des Verschreibungs- und Dispensierprozesses" ] ;
       fhir:type ( [
         fhir:code [ fhir:v "Reference"^^xsd:anyURI ] ;
         fhir:targetProfile ( [
           fhir:v "https://gematik.de/fhir/epa-medication/StructureDefinition/epa-medication-request"^^xsd:anyURI ;
           fhir:link <https://gematik.de/fhir/epa-medication/StructureDefinition/epa-medication-request>
         ] [
           fhir:v "https://gematik.de/fhir/epa-medication/StructureDefinition/epa-medication-dispense"^^xsd:anyURI ;
           fhir:link <https://gematik.de/fhir/epa-medication/StructureDefinition/epa-medication-dispense>
         ] )
       ] ) ;
       fhir:mustSupport [ fhir:v true ]
     ] [
       fhir:id [ fhir:v "MedicationStatement.dosage" ] ;
       fhir:path [ fhir:v "MedicationStatement.dosage" ] ;
       fhir:short [ fhir:v "Strukturierte Dosierung/Gebrauchsanweisung" ] ;
       fhir:definition [ fhir:v "Hier werden strukturierte Informationen zur Dosierung/Gebrauchsanweisung zur Arzneimitteleinnahme gemäß Vorgabe von HL7 Deutschland e.V. angegeben." ] ;
       fhir:type ( [
         fhir:code [ fhir:v "Dosage"^^xsd:anyURI ] ;
         fhir:profile ( [
           fhir:v "http://ig.fhir.de/igs/medication/StructureDefinition/DosageDgMP"^^xsd:anyURI ;
           fhir:link <http://ig.fhir.de/igs/medication/StructureDefinition/DosageDgMP>
         ] )
       ] ) ;
       fhir:mustSupport [ fhir:v true ]
     ] )
  ] . # 

# -------------------------------------------------------------------------------------

