MediRecords FHIR Implementation Guide
1.3.0 - release


Resource Profile: MRMedication - XML Profile

XML representation of the mr-medication resource profile.

Raw xml | Download



<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="mr-medication"/>
  <text>
    <status value="extensions"/>
    <div xmlns="http://www.w3.org/1999/xhtml"><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 : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" 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 : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" 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 : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><a href="https://build.fhir.org/ig/FHIR/ig-guidance/readingIgs.html#table-views" title="Minimum and Maximum # of times the the element can appear in the instance">Card.</a></th><th style="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 : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" 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 : 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-mr-medication-definitions.html#Medication">Medication</a><a name="Medication"> </a></td><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"/><td style="vertical-align: top; text-align : 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 : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><a href="http://hl7.org.au/fhir/4.0.0/StructureDefinition-au-medication.html">AUBaseMedication</a></td><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="opacity: 0.5">A medication in an Australian healthcare context</span></td></tr>
<tr style="border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: #F7F7F7"><td style="vertical-align: top; text-align : 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_datatype.gif" alt="." style="background-color: #F7F7F7; background-color: inherit" title="Data Type" class="hierarchy"/> <a href="StructureDefinition-mr-medication-definitions.html#Medication.meta">meta</a><a name="Medication.meta"> </a></td><td style="vertical-align: top; text-align : 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 : 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 : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><a href="StructureDefinition-mr-meta-information.html" title="Meta">MRMeta</a></td><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="opacity: 0.5">Metadata about a resource</span></td></tr>
<tr style="border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: white"><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck14.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_item.png" alt="." style="background-color: white; background-color: inherit" title="Slice Item" class="hierarchy"/> <a href="StructureDefinition-mr-medication-definitions.html#Medication.extension:brandName" title="Extension URL = http://hl7.org.au/fhir/StructureDefinition/medication-brand-name">brandName</a><a name="Medication.extension"> </a></td><td style="vertical-align: top; text-align : 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 : 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 : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><a href="http://hl7.org/fhir/R4/datatypes.html#string">string</a></td><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="opacity: 0.5">Medication brand name</span><br/><span style="font-weight:bold">URL: </span><a href="http://hl7.org.au/fhir/4.0.0/StructureDefinition-medication-brand-name.html">http://hl7.org.au/fhir/StructureDefinition/medication-brand-name</a></td></tr>
<tr style="border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: #F7F7F7"><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck14.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_item.png" alt="." style="background-color: #F7F7F7; background-color: inherit" title="Slice Item" class="hierarchy"/> <a href="StructureDefinition-mr-medication-definitions.html#Medication.extension:genericName" title="Extension URL = http://hl7.org.au/fhir/StructureDefinition/medication-generic-name">genericName</a><a name="Medication.extension"> </a></td><td style="vertical-align: top; text-align : 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 : 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 : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><a href="http://hl7.org/fhir/R4/datatypes.html#string">string</a></td><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="opacity: 0.5">Medication generic drug name</span><br/><span style="font-weight:bold">URL: </span><a href="http://hl7.org.au/fhir/4.0.0/StructureDefinition-medication-generic-name.html">http://hl7.org.au/fhir/StructureDefinition/medication-generic-name</a></td></tr>
<tr style="border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: white"><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck14.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_item.png" alt="." style="background-color: white; background-color: inherit" title="Slice Item" class="hierarchy"/> <a href="StructureDefinition-mr-medication-definitions.html#Medication.extension:medication-strength" title="Extension URL = http://hl7.org.au/fhir/StructureDefinition/medication-strength">medication-strength</a><a name="Medication.extension"> </a></td><td style="vertical-align: top; text-align : 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 : 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 : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><a href="http://hl7.org/fhir/R4/datatypes.html#string">string</a></td><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="opacity: 0.5">Medication strength</span><br/><span style="font-weight:bold">URL: </span><a href="http://hl7.org.au/fhir/4.0.0/StructureDefinition-medication-strength.html">http://hl7.org.au/fhir/StructureDefinition/medication-strength</a></td></tr>
<tr style="border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: #F7F7F7"><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck14.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_item.png" alt="." style="background-color: #F7F7F7; background-color: inherit" title="Slice Item" class="hierarchy"/> <a href="StructureDefinition-mr-medication-definitions.html#Medication.extension:medication-pack-size" title="Extension URL = https://fhir.medirecords.com/StructureDefinition/mr-medication-pack-size">medication-pack-size</a><a name="Medication.extension"> </a></td><td style="vertical-align: top; text-align : 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 : 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 : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><a href="http://hl7.org/fhir/R4/datatypes.html#string">string</a></td><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="opacity: 0.5">MediRecords Medication Pack Size</span><br/><span style="font-weight:bold">URL: </span><a href="http://hl7.org/fhir/R4/StructureDefinition-mr-medication-pack-size.html">https://fhir.medirecords.com/StructureDefinition/mr-medication-pack-size</a></td></tr>
<tr style="border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: white"><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck14.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_item.png" alt="." style="background-color: white; background-color: inherit" title="Slice Item" class="hierarchy"/> <a href="StructureDefinition-mr-medication-definitions.html#Medication.extension:is-extemporaneous" title="Extension URL = https://fhir.medirecords.com/StructureDefinition/mr-medication-extemporaneous">is-extemporaneous</a><a name="Medication.extension"> </a></td><td style="vertical-align: top; text-align : 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 : 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 : 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 : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="opacity: 0.5">Extemporaneous compounded medicines indicator extension</span><br/><span style="font-weight:bold">URL: </span><a href="http://hl7.org/fhir/R4/StructureDefinition-mr-medication-extemporaneous.html">https://fhir.medirecords.com/StructureDefinition/mr-medication-extemporaneous</a></td></tr>
<tr style="border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: #F7F7F7"><td style="vertical-align: top; text-align : 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-mr-medication-definitions.html#Medication.code">code</a><a name="Medication.code"> </a></td><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"/><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"/><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"/><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"/></tr>
<tr style="border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: white"><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck114.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_slice_item.png" alt="." style="background-color: white; background-color: inherit" title="Slice Item" class="hierarchy"/> <a href="StructureDefinition-mr-medication-definitions.html#Medication.code.coding:pbs" title="Slice pbs">coding:pbs</a><a name="Medication.code.coding"> </a></td><td style="vertical-align: top; text-align : 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 : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="opacity: 0.5">0</span>..1</td><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><a style="opacity: 0.5" href="http://hl7.org/fhir/R4/datatypes.html#Coding">Coding</a></td><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="opacity: 0.5">PBS Item Code</span></td></tr>
<tr style="border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: #F7F7F7"><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck114.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_slice_item.png" alt="." style="background-color: #F7F7F7; background-color: inherit" title="Slice Item" class="hierarchy"/> <a href="StructureDefinition-mr-medication-definitions.html#Medication.code.coding:amt" title="Slice amt">coding:amt</a><a name="Medication.code.coding"> </a></td><td style="vertical-align: top; text-align : 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 : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="opacity: 0.5">0</span>..1</td><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><a style="opacity: 0.5" href="http://hl7.org/fhir/R4/datatypes.html#Coding">Coding</a></td><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="opacity: 0.5">AMT Medicines</span></td></tr>
<tr style="border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: white"><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck115.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_slice_item.png" alt="." style="background-color: white; background-color: inherit" title="Slice Item" class="hierarchy"/> <a href="StructureDefinition-mr-medication-definitions.html#Medication.code.coding:atc" title="Slice atc">coding:atc</a><a name="Medication.code.coding"> </a></td><td style="vertical-align: top; text-align : 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 : 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 : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><a style="opacity: 0.5" href="http://hl7.org/fhir/R4/datatypes.html#Coding">Coding</a></td><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="opacity: 0.5">Code defined by a terminology system</span></td></tr>
<tr style="border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: #F7F7F7"><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck1140.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.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-mr-medication-definitions.html#Medication.code.coding:atc.system">system</a><a name="Medication.code.coding.system"> </a></td><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"/><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; 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 : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><a style="opacity: 0.5" href="http://hl7.org/fhir/R4/datatypes.html#uri">uri</a></td><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="opacity: 0.5">Identity of the terminology system</span><br/><span style="font-weight:bold">Fixed Value: </span><span style="color: darkgreen">http://www.whocc.no/atc</span></td></tr>
<tr style="border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: white"><td style="vertical-align: top; text-align : 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_element.gif" alt="." style="background-color: white; background-color: inherit" title="Element" class="hierarchy"/> <a href="StructureDefinition-mr-medication-definitions.html#Medication.code.text">text</a><a name="Medication.code.text"> </a></td><td style="vertical-align: top; text-align : 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 : 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 : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><a style="opacity: 0.5" href="http://hl7.org/fhir/R4/datatypes.html#string">string</a></td><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="opacity: 0.5">Medication primary text</span></td></tr>
<tr style="border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: #F7F7F7"><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck01.png)" class="hierarchy"><img src="tbl_spacer.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="tbl_vjoin_end.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="icon_element.gif" alt="." style="background-color: #F7F7F7; background-color: inherit" title="Element" class="hierarchy"/> <a href="StructureDefinition-mr-medication-definitions.html#Medication.form">form</a><a name="Medication.form"> </a></td><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"/><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"/><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"/><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"/></tr>
<tr style="border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: white"><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck000.png)" class="hierarchy"><img src="tbl_spacer.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="tbl_blank.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="tbl_vjoin_end.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="icon_element.gif" alt="." style="background-color: white; background-color: inherit" title="Element" class="hierarchy"/> <a href="StructureDefinition-mr-medication-definitions.html#Medication.form.text">text</a><a name="Medication.form.text"> </a></td><td style="vertical-align: top; text-align : 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 : 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 : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><a style="opacity: 0.5" href="http://hl7.org/fhir/R4/datatypes.html#string">string</a></td><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="opacity: 0.5">Plain text representation of the concept</span></td></tr>
<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>
  </text>
  <url
       value="https://fhir.medirecords.com/StructureDefinition/mr-medication"/>
  <version value="1.3.0"/>
  <name value="MRMedication"/>
  <title value="MediRecords Medication"/>
  <status value="active"/>
  <date value="2023-12-21T01:01:27+00:00"/>
  <description
               value="MediRecords Medication profile to record details about a single Medication, Ingredient, or Substance"/>
  <fhirVersion value="4.0.1"/>
  <mapping>
    <identity value="script10.6"/>
    <uri value="http://ncpdp.org/SCRIPT10_6"/>
    <name value="Mapping to NCPDP SCRIPT 10.6"/>
  </mapping>
  <mapping>
    <identity value="rim"/>
    <uri value="http://hl7.org/v3"/>
    <name value="RIM Mapping"/>
  </mapping>
  <mapping>
    <identity value="w5"/>
    <uri value="http://hl7.org/fhir/fivews"/>
    <name value="FiveWs Pattern Mapping"/>
  </mapping>
  <mapping>
    <identity value="v2"/>
    <uri value="http://hl7.org/v2"/>
    <name value="HL7 v2 Mapping"/>
  </mapping>
  <kind value="resource"/>
  <abstract value="false"/>
  <type value="Medication"/>
  <baseDefinition
                  value="http://hl7.org.au/fhir/StructureDefinition/au-medication"/>
  <derivation value="constraint"/>
  <snapshot>
    <element id="Medication">
      <path value="Medication"/>
      <short value="A medication in an Australian healthcare context"/>
      <definition
                  value="This resource is primarily used for the identification and definition of a medication for the purposes of prescribing, dispensing, and administering a medication as well as for making statements about medication use."/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Medication"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <constraint>
        <key value="dom-2"/>
        <severity value="error"/>
        <human
               value="If the resource is contained in another resource, it SHALL NOT contain nested Resources"/>
        <expression value="contained.contained.empty()"/>
        <xpath value="not(parent::f:contained and f:contained)"/>
        <source
                value="http://hl7.org/fhir/StructureDefinition/DomainResource"/>
      </constraint>
      <constraint>
        <key value="dom-3"/>
        <severity value="error"/>
        <human
               value="If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource"/>
        <expression
                    value="contained.where((('#'+id in (%resource.descendants().reference | %resource.descendants().as(canonical) | %resource.descendants().as(uri) | %resource.descendants().as(url))) or descendants().where(reference = '#').exists() or descendants().where(as(canonical) = '#').exists() or descendants().where(as(canonical) = '#').exists()).not()).trace('unmatched', id).empty()"/>
        <xpath
               value="not(exists(for $id in f:contained/*/f:id/@value return $contained[not(parent::*/descendant::f:reference/@value=concat('#', $contained/*/id/@value) or descendant::f:reference[@value='#'])]))"/>
        <source
                value="http://hl7.org/fhir/StructureDefinition/DomainResource"/>
      </constraint>
      <constraint>
        <key value="dom-4"/>
        <severity value="error"/>
        <human
               value="If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated"/>
        <expression
                    value="contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()"/>
        <xpath
               value="not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))"/>
        <source
                value="http://hl7.org/fhir/StructureDefinition/DomainResource"/>
      </constraint>
      <constraint>
        <key value="dom-5"/>
        <severity value="error"/>
        <human
               value="If a resource is contained in another resource, it SHALL NOT have a security label"/>
        <expression value="contained.meta.security.empty()"/>
        <xpath value="not(exists(f:contained/*/f:meta/f:security))"/>
        <source
                value="http://hl7.org/fhir/StructureDefinition/DomainResource"/>
      </constraint>
      <constraint>
        <extension
                   url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice">
          <valueBoolean value="true"/>
        </extension>
        <extension
                   url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice-explanation">
          <valueMarkdown
                         value="When a resource has no narrative, only systems that fully understand the data can display the resource to a human safely. Including a human readable representation in the resource makes for a much more robust eco-system and cheaper handling of resources by intermediary systems. Some ecosystems restrict distribution of resources to only those systems that do fully understand the resources, and as a consequence implementers may believe that the narrative is superfluous. However experience shows that such eco-systems often open up to new participants over time."/>
        </extension>
        <key value="dom-6"/>
        <severity value="warning"/>
        <human
               value="A resource should have narrative for robust management"/>
        <expression value="text.`div`.exists()"/>
        <xpath value="exists(f:text/h:div)"/>
        <source
                value="http://hl7.org/fhir/StructureDefinition/DomainResource"/>
      </constraint>
      <isModifier value="false"/>
      <isSummary value="false"/>
      <mapping>
        <identity value="rim"/>
        <map value="Entity. Role, or Act"/>
      </mapping>
      <mapping>
        <identity value="script10.6"/>
        <map
             value="NewRx/MedicationPrescribed
-or-
RxFill/MedicationDispensed
-or-
RxHistoryResponse/MedicationDispensed
-or-
RxHistoryResponse/MedicationPrescribed"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value="ManufacturedProduct[classCode=ADMM]"/>
      </mapping>
    </element>
    <element id="Medication.id">
      <path value="Medication.id"/>
      <short value="Logical id of this artifact"/>
      <definition
                  value="The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."/>
      <comment
               value="The only time that a resource does not have an id is when it is being submitted to the server using a create operation."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Resource.id"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <extension
                   url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type">
          <valueUrl value="id"/>
        </extension>
        <code value="http://hl7.org/fhirpath/System.String"/>
      </type>
      <isModifier value="false"/>
      <isSummary value="true"/>
    </element>
    <element id="Medication.meta">
      <path value="Medication.meta"/>
      <short value="Metadata about a resource"/>
      <definition
                  value="The metadata about a resource. This is content in the resource that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Resource.meta"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="Meta"/>
        <profile
                 value="https://fhir.medirecords.com/StructureDefinition/mr-meta-information"/>
      </type>
      <condition value="ele-1"/>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <mustSupport value="true"/>
      <isModifier value="false"/>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value="N/A"/>
      </mapping>
    </element>
    <element id="Medication.implicitRules">
      <path value="Medication.implicitRules"/>
      <short value="A set of rules under which this content was created"/>
      <definition
                  value="A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc."/>
      <comment
               value="Asserting this rule set restricts the content to be only understood by a limited set of trading partners. This inherently limits the usefulness of the data in the long term. However, the existing health eco-system is highly fractured, and not yet ready to define, collect, and exchange data in a generally computable sense. Wherever possible, implementers and/or specification writers should avoid using this element. Often, when used, the URL is a reference to an implementation guide that defines these special rules as part of it's narrative along with other profiles, value sets, etc."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Resource.implicitRules"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="uri"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <isModifier value="true"/>
      <isModifierReason
                        value="This element is labeled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation"/>
      <isSummary value="true"/>
    </element>
    <element id="Medication.language">
      <path value="Medication.language"/>
      <short value="Language of the resource content"/>
      <definition
                  value="The base language in which the resource is written."/>
      <comment
               value="Language is provided to support indexing and accessibility (typically, services such as text to speech use the language tag). The html language tag in the narrative applies  to the narrative. The language tag on the resource may be used to specify the language of other presentations generated from the data in the resource. Not all the content has to be in the base language. The Resource.language should not be assumed to apply to the narrative automatically. If a language is specified, it should it also be specified on the div element in the html (see rules in HTML5 for information about the relationship between xml:lang and the html lang attribute)."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Resource.language"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="code"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <isModifier value="false"/>
      <isSummary value="false"/>
      <binding>
        <extension
                   url="http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet">
          <valueCanonical value="http://hl7.org/fhir/ValueSet/all-languages"/>
        </extension>
        <extension
                   url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="Language"/>
        </extension>
        <extension
                   url="http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding">
          <valueBoolean value="true"/>
        </extension>
        <strength value="preferred"/>
        <description value="A human language."/>
        <valueSet value="http://hl7.org/fhir/ValueSet/languages"/>
      </binding>
    </element>
    <element id="Medication.text">
      <path value="Medication.text"/>
      <short value="Text summary of the resource, for human interpretation"/>
      <definition
                  value="A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it &quot;clinically safe&quot; for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety."/>
      <comment
               value="Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative. In some cases, a resource may only have text with little or no additional discrete data (as long as all minOccurs=1 elements are satisfied).  This may be necessary for data from legacy systems where information is captured as a &quot;text blob&quot; or where text is additionally entered raw or narrated and encoded information is added later."/>
      <alias value="narrative"/>
      <alias value="html"/>
      <alias value="xhtml"/>
      <alias value="display"/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="DomainResource.text"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="Narrative"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <isModifier value="false"/>
      <isSummary value="false"/>
      <mapping>
        <identity value="rim"/>
        <map value="Act.text?"/>
      </mapping>
    </element>
    <element id="Medication.contained">
      <path value="Medication.contained"/>
      <short value="Contained, inline Resources"/>
      <definition
                  value="These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope."/>
      <comment
               value="This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again. Contained resources may have profiles and tags In their meta elements, but SHALL NOT have security labels."/>
      <alias value="inline resources"/>
      <alias value="anonymous resources"/>
      <alias value="contained resources"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="DomainResource.contained"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Resource"/>
      </type>
      <isModifier value="false"/>
      <isSummary value="false"/>
      <mapping>
        <identity value="rim"/>
        <map value="N/A"/>
      </mapping>
    </element>
    <element id="Medication.extension">
      <path value="Medication.extension"/>
      <slicing>
        <discriminator>
          <type value="value"/>
          <path value="url"/>
        </discriminator>
        <rules value="open"/>
      </slicing>
      <short value="Extension"/>
      <definition value="An Extension"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="DomainResource.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <constraint>
        <key value="ext-1"/>
        <severity value="error"/>
        <human value="Must have either extensions or value[x], not both"/>
        <expression value="extension.exists() != value.exists()"/>
        <xpath
               value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), &quot;value&quot;)])"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Extension"/>
      </constraint>
      <isModifier value="false"/>
      <isSummary value="false"/>
    </element>
    <element id="Medication.extension:brandName">
      <path value="Medication.extension"/>
      <sliceName value="brandName"/>
      <short value="Medication brand name"/>
      <definition
                  value="The brand medication text name for an associated medication, this may be supplied if a coded brand name is not available."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="DomainResource.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
        <profile
                 value="http://hl7.org.au/fhir/StructureDefinition/medication-brand-name"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <constraint>
        <key value="ext-1"/>
        <severity value="error"/>
        <human value="Must have either extensions or value[x], not both"/>
        <expression value="extension.exists() != value.exists()"/>
        <xpath
               value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), &quot;value&quot;)])"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Extension"/>
      </constraint>
      <mustSupport value="true"/>
      <isModifier value="false"/>
      <isSummary value="false"/>
    </element>
    <element id="Medication.extension:genericName">
      <path value="Medication.extension"/>
      <sliceName value="genericName"/>
      <short value="Medication generic drug name"/>
      <definition
                  value="The generic medication text name for an associated medication. This may not be the same as the subject medication (prescribed, dispensed or stated) but may be used to provide an additional or equivalent drug name that is a generic medication concept."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="DomainResource.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
        <profile
                 value="http://hl7.org.au/fhir/StructureDefinition/medication-generic-name"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <constraint>
        <key value="ext-1"/>
        <severity value="error"/>
        <human value="Must have either extensions or value[x], not both"/>
        <expression value="extension.exists() != value.exists()"/>
        <xpath
               value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), &quot;value&quot;)])"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Extension"/>
      </constraint>
      <mustSupport value="true"/>
      <isModifier value="false"/>
      <isSummary value="false"/>
    </element>
    <element id="Medication.extension:medication-strength">
      <path value="Medication.extension"/>
      <sliceName value="medication-strength"/>
      <short value="Medication strength"/>
      <definition value="Strength of a medication."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="DomainResource.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
        <profile
                 value="http://hl7.org.au/fhir/StructureDefinition/medication-strength"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <constraint>
        <key value="ext-1"/>
        <severity value="error"/>
        <human value="Must have either extensions or value[x], not both"/>
        <expression value="extension.exists() != value.exists()"/>
        <xpath
               value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), &quot;value&quot;)])"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Extension"/>
      </constraint>
      <mustSupport value="true"/>
      <isModifier value="false"/>
      <isSummary value="false"/>
    </element>
    <element id="Medication.extension:medication-pack-size">
      <path value="Medication.extension"/>
      <sliceName value="medication-pack-size"/>
      <short value="MediRecords Medication Pack Size"/>
      <definition value="MediRecords extension for Medication Pack Size"/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="DomainResource.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
        <profile
                 value="https://fhir.medirecords.com/StructureDefinition/mr-medication-pack-size"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <constraint>
        <key value="ext-1"/>
        <severity value="error"/>
        <human value="Must have either extensions or value[x], not both"/>
        <expression value="extension.exists() != value.exists()"/>
        <xpath
               value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), &quot;value&quot;)])"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Extension"/>
      </constraint>
      <mustSupport value="true"/>
      <isModifier value="false"/>
      <isSummary value="false"/>
    </element>
    <element id="Medication.extension:is-extemporaneous">
      <path value="Medication.extension"/>
      <sliceName value="is-extemporaneous"/>
      <short value="Extemporaneous compounded medicines indicator extension"/>
      <definition
                  value="Extension to record extemporaneous compounded medicines"/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="DomainResource.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
        <profile
                 value="https://fhir.medirecords.com/StructureDefinition/mr-medication-extemporaneous"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <constraint>
        <key value="ext-1"/>
        <severity value="error"/>
        <human value="Must have either extensions or value[x], not both"/>
        <expression value="extension.exists() != value.exists()"/>
        <xpath
               value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), &quot;value&quot;)])"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Extension"/>
      </constraint>
      <mustSupport value="true"/>
      <isModifier value="false"/>
      <isSummary value="false"/>
    </element>
    <element id="Medication.modifierExtension">
      <path value="Medication.modifierExtension"/>
      <short value="Extensions that cannot be ignored"/>
      <definition
                  value="May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.

Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."/>
      <comment
               value="There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone."/>
      <requirements
                    value="Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored.  This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](http://hl7.org/fhir/R4/extensibility.html#modifierExtension)."/>
      <alias value="extensions"/>
      <alias value="user content"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="DomainResource.modifierExtension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <constraint>
        <key value="ext-1"/>
        <severity value="error"/>
        <human value="Must have either extensions or value[x], not both"/>
        <expression value="extension.exists() != value.exists()"/>
        <xpath
               value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), &quot;value&quot;)])"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Extension"/>
      </constraint>
      <isModifier value="true"/>
      <isModifierReason
                        value="Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them"/>
      <isSummary value="false"/>
      <mapping>
        <identity value="rim"/>
        <map value="N/A"/>
      </mapping>
    </element>
    <element id="Medication.identifier">
      <path value="Medication.identifier"/>
      <short value="Business identifier for this medication"/>
      <definition value="Business identifier for this medication."/>
      <comment value="The serial number could be included as an identifier."/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Medication.identifier"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Identifier"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <isModifier value="false"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="w5"/>
        <map value="FiveWs.identifier"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value=".id"/>
      </mapping>
    </element>
    <element id="Medication.code">
      <path value="Medication.code"/>
      <short value="Coding for the medicine"/>
      <definition
                  value="A code (or set of codes) that specify this medication, or a textual description if no code is available. Usage note: This could be a standard medication code such as a code from RxNorm, SNOMED CT, IDMP etc. It could also be a national or local formulary code, optionally with translations to other code systems."/>
      <comment
               value="Australian coding slices are typical medicine/product concept codes.

A code (or set of codes) that specify this medication, or a textual description if no code is available. Usage note: This could be a standard medication code such as a code from RxNorm, SNOMED CT, IDMP etc. It could also be a national or local formulary code, optionally with translations to other code systems."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Medication.code"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="CodeableConcept"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <isModifier value="false"/>
      <isSummary value="true"/>
      <binding>
        <extension
                   url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="MedicationFormalRepresentation"/>
        </extension>
        <strength value="example"/>
        <description
                     value="A coded concept that defines the type of a medication."/>
        <valueSet value="http://hl7.org/fhir/ValueSet/medication-codes"/>
      </binding>
      <mapping>
        <identity value="script10.6"/>
        <map
             value="coding.code = //element(*,MedicationType)/DrugCoded/ProductCode

coding.system = //element(*,MedicationType)/DrugCoded/ProductCodeQualifier

coding.display = //element(*,MedicationType)/DrugDescription"/>
      </mapping>
      <mapping>
        <identity value="w5"/>
        <map value="FiveWs.class"/>
      </mapping>
      <mapping>
        <identity value="v2"/>
        <map
             value="RXO-1.1-Requested Give Code.code / RXE-2.1-Give Code.code / RXD-2.1-Dispense/Give Code.code / RXG-4.1-Give Code.code /RXA-5.1-Administered Code.code / RXC-2.1 Component Code"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value=".code"/>
      </mapping>
    </element>
    <element id="Medication.code.id">
      <path value="Medication.code.id"/>
      <representation value="xmlAttr"/>
      <short value="Unique id for inter-element referencing"/>
      <definition
                  value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Element.id"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <extension
                   url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type">
          <valueUrl value="string"/>
        </extension>
        <code value="http://hl7.org/fhirpath/System.String"/>
      </type>
      <isModifier value="false"/>
      <isSummary value="false"/>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="Medication.code.extension">
      <path value="Medication.code.extension"/>
      <slicing>
        <discriminator>
          <type value="value"/>
          <path value="url"/>
        </discriminator>
        <description value="Extensions are always sliced by (at least) url"/>
        <rules value="open"/>
      </slicing>
      <short value="Additional content defined by implementations"/>
      <definition
                  value="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."/>
      <comment
               value="There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone."/>
      <alias value="extensions"/>
      <alias value="user content"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Element.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <constraint>
        <key value="ext-1"/>
        <severity value="error"/>
        <human value="Must have either extensions or value[x], not both"/>
        <expression value="extension.exists() != value.exists()"/>
        <xpath
               value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), &quot;value&quot;)])"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Extension"/>
      </constraint>
      <isModifier value="false"/>
      <isSummary value="false"/>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="Medication.code.coding">
      <path value="Medication.code.coding"/>
      <slicing>
        <discriminator>
          <type value="value"/>
          <path value="system"/>
        </discriminator>
        <rules value="open"/>
      </slicing>
      <short value="Code defined by a terminology system"/>
      <definition
                  value="A reference to a code defined by a terminology system."/>
      <comment
               value="Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information.  Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true."/>
      <requirements
                    value="Allows for alternative encodings within a code system, and translations to other code systems."/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="CodeableConcept.coding"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Coding"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <isModifier value="false"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="v2"/>
        <map value="C*E.1-8, C*E.10-22"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value="union(., ./translation)"/>
      </mapping>
      <mapping>
        <identity value="orim"/>
        <map
             value="fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding"/>
      </mapping>
    </element>
    <element id="Medication.code.coding:pbs">
      <path value="Medication.code.coding"/>
      <sliceName value="pbs"/>
      <short value="PBS Item Code"/>
      <definition
                  value="A reference to a code defined by a terminology system."/>
      <comment
               value="PBS code from http://pbs.gov.au/code/item. Use of PBS as a code to refer to a type of medication, this excludes implication of context based on the PBS code. Where context is to be implied or stated PBS code needs to be associated with recording a prescription (MedicationRequest) or dispense record (MedicationDispense)."/>
      <requirements
                    value="Allows for alternative encodings within a code system, and translations to other code systems."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="CodeableConcept.coding"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Coding"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <mustSupport value="true"/>
      <isModifier value="false"/>
      <isSummary value="true"/>
      <binding>
        <strength value="preferred"/>
        <valueSet value="http://terminology.hl7.org.au/ValueSet/pbs-item"/>
      </binding>
      <mapping>
        <identity value="v2"/>
        <map value="C*E.1-8, C*E.10-22"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value="union(., ./translation)"/>
      </mapping>
      <mapping>
        <identity value="orim"/>
        <map
             value="fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding"/>
      </mapping>
    </element>
    <element id="Medication.code.coding:pbs.id">
      <path value="Medication.code.coding.id"/>
      <representation value="xmlAttr"/>
      <short value="Unique id for inter-element referencing"/>
      <definition
                  value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Element.id"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <extension
                   url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type">
          <valueUrl value="string"/>
        </extension>
        <code value="http://hl7.org/fhirpath/System.String"/>
      </type>
      <isModifier value="false"/>
      <isSummary value="false"/>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="Medication.code.coding:pbs.extension">
      <path value="Medication.code.coding.extension"/>
      <slicing>
        <discriminator>
          <type value="value"/>
          <path value="url"/>
        </discriminator>
        <description value="Extensions are always sliced by (at least) url"/>
        <rules value="open"/>
      </slicing>
      <short value="Additional content defined by implementations"/>
      <definition
                  value="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."/>
      <comment
               value="There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone."/>
      <alias value="extensions"/>
      <alias value="user content"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Element.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <constraint>
        <key value="ext-1"/>
        <severity value="error"/>
        <human value="Must have either extensions or value[x], not both"/>
        <expression value="extension.exists() != value.exists()"/>
        <xpath
               value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), &quot;value&quot;)])"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Extension"/>
      </constraint>
      <isModifier value="false"/>
      <isSummary value="false"/>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="Medication.code.coding:pbs.system">
      <path value="Medication.code.coding.system"/>
      <short value="Identity of the terminology system"/>
      <definition
                  value="The identification of the code system that defines the meaning of the symbol in the code."/>
      <comment
               value="The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...).  OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should reference to some definition that establishes the system clearly and unambiguously."/>
      <requirements
                    value="Need to be unambiguous about the source of the definition of the symbol."/>
      <min value="1"/>
      <max value="1"/>
      <base>
        <path value="Coding.system"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="uri"/>
      </type>
      <fixedUri value="http://pbs.gov.au/code/item"/>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <isModifier value="false"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="v2"/>
        <map value="C*E.3"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value="./codeSystem"/>
      </mapping>
      <mapping>
        <identity value="orim"/>
        <map
             value="fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem"/>
      </mapping>
    </element>
    <element id="Medication.code.coding:pbs.version">
      <path value="Medication.code.coding.version"/>
      <short value="Version of the system - if relevant"/>
      <definition
                  value="The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."/>
      <comment
               value="Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Coding.version"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="string"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <isModifier value="false"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="v2"/>
        <map value="C*E.7"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value="./codeSystemVersion"/>
      </mapping>
      <mapping>
        <identity value="orim"/>
        <map
             value="fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion"/>
      </mapping>
    </element>
    <element id="Medication.code.coding:pbs.code">
      <path value="Medication.code.coding.code"/>
      <short value="Symbol in syntax defined by the system"/>
      <definition
                  value="A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination)."/>
      <requirements
                    value="Need to refer to a particular code in the system."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Coding.code"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="code"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <isModifier value="false"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="v2"/>
        <map value="C*E.1"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value="./code"/>
      </mapping>
      <mapping>
        <identity value="orim"/>
        <map value="fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code"/>
      </mapping>
    </element>
    <element id="Medication.code.coding:pbs.display">
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
        <valueBoolean value="true"/>
      </extension>
      <path value="Medication.code.coding.display"/>
      <short value="Representation defined by the system"/>
      <definition
                  value="A representation of the meaning of the code in the system, following the rules of the system."/>
      <requirements
                    value="Need to be able to carry a human-readable meaning of the code for readers that do not know  the system."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Coding.display"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="string"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <isModifier value="false"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="v2"/>
        <map value="C*E.2 - but note this is not well followed"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value="CV.displayName"/>
      </mapping>
      <mapping>
        <identity value="orim"/>
        <map
             value="fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName"/>
      </mapping>
    </element>
    <element id="Medication.code.coding:pbs.userSelected">
      <path value="Medication.code.coding.userSelected"/>
      <short value="If this coding was chosen directly by the user"/>
      <definition
                  value="Indicates that this coding was chosen by a user directly - e.g. off a pick list of available items (codes or displays)."/>
      <comment
               value="Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely."/>
      <requirements
                    value="This has been identified as a clinical safety criterium - that this exact system/code pair was chosen explicitly, rather than inferred by the system based on some rules or language processing."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Coding.userSelected"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="boolean"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <isModifier value="false"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="v2"/>
        <map value="Sometimes implied by being first"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value="CD.codingRationale"/>
      </mapping>
      <mapping>
        <identity value="orim"/>
        <map
             value="fhir:Coding.userSelected fhir:mapsTo dt:CDCoding.codingRationale. fhir:Coding.userSelected fhir:hasMap fhir:Coding.userSelected.map. fhir:Coding.userSelected.map a fhir:Map;   fhir:target dt:CDCoding.codingRationale. fhir:Coding.userSelected\#true a [     fhir:source &quot;true&quot;;     fhir:target dt:CDCoding.codingRationale\#O   ]"/>
      </mapping>
    </element>
    <element id="Medication.code.coding:gtin">
      <path value="Medication.code.coding"/>
      <sliceName value="gtin"/>
      <short value="Medication Package Global Trade Item Number (GTIN)"/>
      <definition
                  value="A reference to a code defined by a terminology system."/>
      <comment value="GTIN value from http://www.gs1.org/gtin."/>
      <requirements
                    value="Allows for alternative encodings within a code system, and translations to other code systems."/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="CodeableConcept.coding"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Coding"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <isModifier value="false"/>
      <isSummary value="true"/>
      <binding>
        <strength value="preferred"/>
        <valueSet value="http://terminology.hl7.org/ValueSet/v3-GTIN"/>
      </binding>
      <mapping>
        <identity value="v2"/>
        <map value="C*E.1-8, C*E.10-22"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value="union(., ./translation)"/>
      </mapping>
      <mapping>
        <identity value="orim"/>
        <map
             value="fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding"/>
      </mapping>
    </element>
    <element id="Medication.code.coding:gtin.id">
      <path value="Medication.code.coding.id"/>
      <representation value="xmlAttr"/>
      <short value="Unique id for inter-element referencing"/>
      <definition
                  value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Element.id"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <extension
                   url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type">
          <valueUrl value="string"/>
        </extension>
        <code value="http://hl7.org/fhirpath/System.String"/>
      </type>
      <isModifier value="false"/>
      <isSummary value="false"/>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="Medication.code.coding:gtin.extension">
      <path value="Medication.code.coding.extension"/>
      <slicing>
        <discriminator>
          <type value="value"/>
          <path value="url"/>
        </discriminator>
        <description value="Extensions are always sliced by (at least) url"/>
        <rules value="open"/>
      </slicing>
      <short value="Additional content defined by implementations"/>
      <definition
                  value="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."/>
      <comment
               value="There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone."/>
      <alias value="extensions"/>
      <alias value="user content"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Element.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <constraint>
        <key value="ext-1"/>
        <severity value="error"/>
        <human value="Must have either extensions or value[x], not both"/>
        <expression value="extension.exists() != value.exists()"/>
        <xpath
               value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), &quot;value&quot;)])"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Extension"/>
      </constraint>
      <isModifier value="false"/>
      <isSummary value="false"/>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="Medication.code.coding:gtin.system">
      <path value="Medication.code.coding.system"/>
      <short value="Identity of the terminology system"/>
      <definition
                  value="The identification of the code system that defines the meaning of the symbol in the code."/>
      <comment
               value="The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...).  OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should reference to some definition that establishes the system clearly and unambiguously."/>
      <requirements
                    value="Need to be unambiguous about the source of the definition of the symbol."/>
      <min value="1"/>
      <max value="1"/>
      <base>
        <path value="Coding.system"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="uri"/>
      </type>
      <fixedUri value="http://www.gs1.org/gtin"/>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <isModifier value="false"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="v2"/>
        <map value="C*E.3"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value="./codeSystem"/>
      </mapping>
      <mapping>
        <identity value="orim"/>
        <map
             value="fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem"/>
      </mapping>
    </element>
    <element id="Medication.code.coding:gtin.version">
      <path value="Medication.code.coding.version"/>
      <short value="Version of the system - if relevant"/>
      <definition
                  value="The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."/>
      <comment
               value="Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Coding.version"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="string"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <isModifier value="false"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="v2"/>
        <map value="C*E.7"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value="./codeSystemVersion"/>
      </mapping>
      <mapping>
        <identity value="orim"/>
        <map
             value="fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion"/>
      </mapping>
    </element>
    <element id="Medication.code.coding:gtin.code">
      <path value="Medication.code.coding.code"/>
      <short value="Symbol in syntax defined by the system"/>
      <definition
                  value="A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination)."/>
      <requirements
                    value="Need to refer to a particular code in the system."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Coding.code"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="code"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <isModifier value="false"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="v2"/>
        <map value="C*E.1"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value="./code"/>
      </mapping>
      <mapping>
        <identity value="orim"/>
        <map value="fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code"/>
      </mapping>
    </element>
    <element id="Medication.code.coding:gtin.display">
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
        <valueBoolean value="true"/>
      </extension>
      <path value="Medication.code.coding.display"/>
      <short value="Representation defined by the system"/>
      <definition
                  value="A representation of the meaning of the code in the system, following the rules of the system."/>
      <requirements
                    value="Need to be able to carry a human-readable meaning of the code for readers that do not know  the system."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Coding.display"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="string"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <isModifier value="false"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="v2"/>
        <map value="C*E.2 - but note this is not well followed"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value="CV.displayName"/>
      </mapping>
      <mapping>
        <identity value="orim"/>
        <map
             value="fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName"/>
      </mapping>
    </element>
    <element id="Medication.code.coding:gtin.userSelected">
      <path value="Medication.code.coding.userSelected"/>
      <short value="If this coding was chosen directly by the user"/>
      <definition
                  value="Indicates that this coding was chosen by a user directly - e.g. off a pick list of available items (codes or displays)."/>
      <comment
               value="Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely."/>
      <requirements
                    value="This has been identified as a clinical safety criterium - that this exact system/code pair was chosen explicitly, rather than inferred by the system based on some rules or language processing."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Coding.userSelected"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="boolean"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <isModifier value="false"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="v2"/>
        <map value="Sometimes implied by being first"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value="CD.codingRationale"/>
      </mapping>
      <mapping>
        <identity value="orim"/>
        <map
             value="fhir:Coding.userSelected fhir:mapsTo dt:CDCoding.codingRationale. fhir:Coding.userSelected fhir:hasMap fhir:Coding.userSelected.map. fhir:Coding.userSelected.map a fhir:Map;   fhir:target dt:CDCoding.codingRationale. fhir:Coding.userSelected\#true a [     fhir:source &quot;true&quot;;     fhir:target dt:CDCoding.codingRationale\#O   ]"/>
      </mapping>
    </element>
    <element id="Medication.code.coding:amt">
      <path value="Medication.code.coding"/>
      <sliceName value="amt"/>
      <short value="AMT Medicines"/>
      <definition
                  value="A reference to a code defined by a terminology system."/>
      <comment
               value="Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information.  Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true."/>
      <requirements
                    value="Allows for alternative encodings within a code system, and translations to other code systems."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="CodeableConcept.coding"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Coding"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <mustSupport value="true"/>
      <isModifier value="false"/>
      <isSummary value="true"/>
      <binding>
        <strength value="preferred"/>
        <valueSet
                  value="https://healthterminologies.gov.au/fhir/ValueSet/australian-medication-1"/>
      </binding>
      <mapping>
        <identity value="v2"/>
        <map value="C*E.1-8, C*E.10-22"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value="union(., ./translation)"/>
      </mapping>
      <mapping>
        <identity value="orim"/>
        <map
             value="fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding"/>
      </mapping>
    </element>
    <element id="Medication.code.coding:amt.id">
      <path value="Medication.code.coding.id"/>
      <representation value="xmlAttr"/>
      <short value="Unique id for inter-element referencing"/>
      <definition
                  value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Element.id"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <extension
                   url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type">
          <valueUrl value="string"/>
        </extension>
        <code value="http://hl7.org/fhirpath/System.String"/>
      </type>
      <isModifier value="false"/>
      <isSummary value="false"/>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="Medication.code.coding:amt.extension">
      <path value="Medication.code.coding.extension"/>
      <slicing>
        <discriminator>
          <type value="value"/>
          <path value="url"/>
        </discriminator>
        <description value="Extensions are always sliced by (at least) url"/>
        <rules value="open"/>
      </slicing>
      <short value="Extension"/>
      <definition value="An Extension"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Element.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <constraint>
        <key value="ext-1"/>
        <severity value="error"/>
        <human value="Must have either extensions or value[x], not both"/>
        <expression value="extension.exists() != value.exists()"/>
        <xpath
               value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), &quot;value&quot;)])"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Extension"/>
      </constraint>
      <isModifier value="false"/>
      <isSummary value="false"/>
    </element>
    <element id="Medication.code.coding:amt.extension:medicationClass">
      <path value="Medication.code.coding.extension"/>
      <sliceName value="medicationClass"/>
      <short value="Medication type"/>
      <definition
                  value="The type of information covered by the medication coding, e.g. branded product with no strength or form."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Element.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
        <profile
                 value="http://hl7.org.au/fhir/StructureDefinition/medication-type"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <constraint>
        <key value="ext-1"/>
        <severity value="error"/>
        <human value="Must have either extensions or value[x], not both"/>
        <expression value="extension.exists() != value.exists()"/>
        <xpath
               value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), &quot;value&quot;)])"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Extension"/>
      </constraint>
      <isModifier value="false"/>
      <isSummary value="false"/>
    </element>
    <element id="Medication.code.coding:amt.system">
      <path value="Medication.code.coding.system"/>
      <short value="Identity of the terminology system"/>
      <definition
                  value="The identification of the code system that defines the meaning of the symbol in the code."/>
      <comment
               value="The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...).  OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should reference to some definition that establishes the system clearly and unambiguously."/>
      <requirements
                    value="Need to be unambiguous about the source of the definition of the symbol."/>
      <min value="1"/>
      <max value="1"/>
      <base>
        <path value="Coding.system"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="uri"/>
      </type>
      <fixedUri value="http://snomed.info/sct"/>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <isModifier value="false"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="v2"/>
        <map value="C*E.3"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value="./codeSystem"/>
      </mapping>
      <mapping>
        <identity value="orim"/>
        <map
             value="fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem"/>
      </mapping>
    </element>
    <element id="Medication.code.coding:amt.version">
      <path value="Medication.code.coding.version"/>
      <short value="Version of the system - if relevant"/>
      <definition
                  value="The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."/>
      <comment
               value="Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Coding.version"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="string"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <isModifier value="false"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="v2"/>
        <map value="C*E.7"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value="./codeSystemVersion"/>
      </mapping>
      <mapping>
        <identity value="orim"/>
        <map
             value="fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion"/>
      </mapping>
    </element>
    <element id="Medication.code.coding:amt.code">
      <path value="Medication.code.coding.code"/>
      <short value="Symbol in syntax defined by the system"/>
      <definition
                  value="A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination)."/>
      <requirements
                    value="Need to refer to a particular code in the system."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Coding.code"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="code"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <isModifier value="false"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="v2"/>
        <map value="C*E.1"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value="./code"/>
      </mapping>
      <mapping>
        <identity value="orim"/>
        <map value="fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code"/>
      </mapping>
    </element>
    <element id="Medication.code.coding:amt.display">
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
        <valueBoolean value="true"/>
      </extension>
      <path value="Medication.code.coding.display"/>
      <short value="Representation defined by the system"/>
      <definition
                  value="A representation of the meaning of the code in the system, following the rules of the system."/>
      <requirements
                    value="Need to be able to carry a human-readable meaning of the code for readers that do not know  the system."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Coding.display"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="string"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <isModifier value="false"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="v2"/>
        <map value="C*E.2 - but note this is not well followed"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value="CV.displayName"/>
      </mapping>
      <mapping>
        <identity value="orim"/>
        <map
             value="fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName"/>
      </mapping>
    </element>
    <element id="Medication.code.coding:amt.userSelected">
      <path value="Medication.code.coding.userSelected"/>
      <short value="If this coding was chosen directly by the user"/>
      <definition
                  value="Indicates that this coding was chosen by a user directly - e.g. off a pick list of available items (codes or displays)."/>
      <comment
               value="Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely."/>
      <requirements
                    value="This has been identified as a clinical safety criterium - that this exact system/code pair was chosen explicitly, rather than inferred by the system based on some rules or language processing."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Coding.userSelected"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="boolean"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <isModifier value="false"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="v2"/>
        <map value="Sometimes implied by being first"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value="CD.codingRationale"/>
      </mapping>
      <mapping>
        <identity value="orim"/>
        <map
             value="fhir:Coding.userSelected fhir:mapsTo dt:CDCoding.codingRationale. fhir:Coding.userSelected fhir:hasMap fhir:Coding.userSelected.map. fhir:Coding.userSelected.map a fhir:Map;   fhir:target dt:CDCoding.codingRationale. fhir:Coding.userSelected\#true a [     fhir:source &quot;true&quot;;     fhir:target dt:CDCoding.codingRationale\#O   ]"/>
      </mapping>
    </element>
    <element id="Medication.code.coding:mimsPackage">
      <path value="Medication.code.coding"/>
      <sliceName value="mimsPackage"/>
      <short value="MIMS Package"/>
      <definition
                  value="A reference to a code defined by a terminology system."/>
      <comment
               value="Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information.  Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true."/>
      <requirements
                    value="Allows for alternative encodings within a code system, and translations to other code systems."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="CodeableConcept.coding"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Coding"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <isModifier value="false"/>
      <isSummary value="true"/>
      <binding>
        <strength value="preferred"/>
        <valueSet value="http://terminology.hl7.org.au/ValueSet/mims"/>
      </binding>
      <mapping>
        <identity value="v2"/>
        <map value="C*E.1-8, C*E.10-22"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value="union(., ./translation)"/>
      </mapping>
      <mapping>
        <identity value="orim"/>
        <map
             value="fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding"/>
      </mapping>
    </element>
    <element id="Medication.code.coding:mimsPackage.id">
      <path value="Medication.code.coding.id"/>
      <representation value="xmlAttr"/>
      <short value="Unique id for inter-element referencing"/>
      <definition
                  value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Element.id"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <extension
                   url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type">
          <valueUrl value="string"/>
        </extension>
        <code value="http://hl7.org/fhirpath/System.String"/>
      </type>
      <isModifier value="false"/>
      <isSummary value="false"/>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="Medication.code.coding:mimsPackage.extension">
      <path value="Medication.code.coding.extension"/>
      <slicing>
        <discriminator>
          <type value="value"/>
          <path value="url"/>
        </discriminator>
        <description value="Extensions are always sliced by (at least) url"/>
        <rules value="open"/>
      </slicing>
      <short value="Additional content defined by implementations"/>
      <definition
                  value="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."/>
      <comment
               value="There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone."/>
      <alias value="extensions"/>
      <alias value="user content"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Element.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <constraint>
        <key value="ext-1"/>
        <severity value="error"/>
        <human value="Must have either extensions or value[x], not both"/>
        <expression value="extension.exists() != value.exists()"/>
        <xpath
               value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), &quot;value&quot;)])"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Extension"/>
      </constraint>
      <isModifier value="false"/>
      <isSummary value="false"/>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="Medication.code.coding:mimsPackage.system">
      <path value="Medication.code.coding.system"/>
      <short value="Identity of the terminology system"/>
      <definition
                  value="The identification of the code system that defines the meaning of the symbol in the code."/>
      <comment
               value="The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...).  OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should reference to some definition that establishes the system clearly and unambiguously."/>
      <requirements
                    value="Need to be unambiguous about the source of the definition of the symbol."/>
      <min value="1"/>
      <max value="1"/>
      <base>
        <path value="Coding.system"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="uri"/>
      </type>
      <fixedUri value="http://www.mims.com.au/codes"/>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <isModifier value="false"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="v2"/>
        <map value="C*E.3"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value="./codeSystem"/>
      </mapping>
      <mapping>
        <identity value="orim"/>
        <map
             value="fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem"/>
      </mapping>
    </element>
    <element id="Medication.code.coding:mimsPackage.version">
      <path value="Medication.code.coding.version"/>
      <short value="Version of the system - if relevant"/>
      <definition
                  value="The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."/>
      <comment
               value="Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Coding.version"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="string"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <isModifier value="false"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="v2"/>
        <map value="C*E.7"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value="./codeSystemVersion"/>
      </mapping>
      <mapping>
        <identity value="orim"/>
        <map
             value="fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion"/>
      </mapping>
    </element>
    <element id="Medication.code.coding:mimsPackage.code">
      <path value="Medication.code.coding.code"/>
      <short value="Symbol in syntax defined by the system"/>
      <definition
                  value="A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination)."/>
      <requirements
                    value="Need to refer to a particular code in the system."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Coding.code"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="code"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <isModifier value="false"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="v2"/>
        <map value="C*E.1"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value="./code"/>
      </mapping>
      <mapping>
        <identity value="orim"/>
        <map value="fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code"/>
      </mapping>
    </element>
    <element id="Medication.code.coding:mimsPackage.display">
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
        <valueBoolean value="true"/>
      </extension>
      <path value="Medication.code.coding.display"/>
      <short value="Representation defined by the system"/>
      <definition
                  value="A representation of the meaning of the code in the system, following the rules of the system."/>
      <requirements
                    value="Need to be able to carry a human-readable meaning of the code for readers that do not know  the system."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Coding.display"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="string"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <isModifier value="false"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="v2"/>
        <map value="C*E.2 - but note this is not well followed"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value="CV.displayName"/>
      </mapping>
      <mapping>
        <identity value="orim"/>
        <map
             value="fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName"/>
      </mapping>
    </element>
    <element id="Medication.code.coding:mimsPackage.userSelected">
      <path value="Medication.code.coding.userSelected"/>
      <short value="If this coding was chosen directly by the user"/>
      <definition
                  value="Indicates that this coding was chosen by a user directly - e.g. off a pick list of available items (codes or displays)."/>
      <comment
               value="Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely."/>
      <requirements
                    value="This has been identified as a clinical safety criterium - that this exact system/code pair was chosen explicitly, rather than inferred by the system based on some rules or language processing."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Coding.userSelected"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="boolean"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <isModifier value="false"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="v2"/>
        <map value="Sometimes implied by being first"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value="CD.codingRationale"/>
      </mapping>
      <mapping>
        <identity value="orim"/>
        <map
             value="fhir:Coding.userSelected fhir:mapsTo dt:CDCoding.codingRationale. fhir:Coding.userSelected fhir:hasMap fhir:Coding.userSelected.map. fhir:Coding.userSelected.map a fhir:Map;   fhir:target dt:CDCoding.codingRationale. fhir:Coding.userSelected\#true a [     fhir:source &quot;true&quot;;     fhir:target dt:CDCoding.codingRationale\#O   ]"/>
      </mapping>
    </element>
    <element id="Medication.code.coding:atc">
      <path value="Medication.code.coding"/>
      <sliceName value="atc"/>
      <short value="Code defined by a terminology system"/>
      <definition
                  value="A reference to a code defined by a terminology system."/>
      <comment
               value="Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information.  Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true."/>
      <requirements
                    value="Allows for alternative encodings within a code system, and translations to other code systems."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="CodeableConcept.coding"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Coding"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <mustSupport value="true"/>
      <isModifier value="false"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="v2"/>
        <map value="C*E.1-8, C*E.10-22"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value="union(., ./translation)"/>
      </mapping>
      <mapping>
        <identity value="orim"/>
        <map
             value="fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding"/>
      </mapping>
    </element>
    <element id="Medication.code.coding:atc.id">
      <path value="Medication.code.coding.id"/>
      <representation value="xmlAttr"/>
      <short value="Unique id for inter-element referencing"/>
      <definition
                  value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Element.id"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <extension
                   url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type">
          <valueUrl value="string"/>
        </extension>
        <code value="http://hl7.org/fhirpath/System.String"/>
      </type>
      <isModifier value="false"/>
      <isSummary value="false"/>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="Medication.code.coding:atc.extension">
      <path value="Medication.code.coding.extension"/>
      <slicing>
        <discriminator>
          <type value="value"/>
          <path value="url"/>
        </discriminator>
        <description value="Extensions are always sliced by (at least) url"/>
        <rules value="open"/>
      </slicing>
      <short value="Additional content defined by implementations"/>
      <definition
                  value="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."/>
      <comment
               value="There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone."/>
      <alias value="extensions"/>
      <alias value="user content"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Element.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <constraint>
        <key value="ext-1"/>
        <severity value="error"/>
        <human value="Must have either extensions or value[x], not both"/>
        <expression value="extension.exists() != value.exists()"/>
        <xpath
               value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), &quot;value&quot;)])"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Extension"/>
      </constraint>
      <isModifier value="false"/>
      <isSummary value="false"/>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="Medication.code.coding:atc.system">
      <path value="Medication.code.coding.system"/>
      <short value="Identity of the terminology system"/>
      <definition
                  value="The identification of the code system that defines the meaning of the symbol in the code."/>
      <comment
               value="The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...).  OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should reference to some definition that establishes the system clearly and unambiguously."/>
      <requirements
                    value="Need to be unambiguous about the source of the definition of the symbol."/>
      <min value="1"/>
      <max value="1"/>
      <base>
        <path value="Coding.system"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="uri"/>
      </type>
      <fixedUri value="http://www.whocc.no/atc"/>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <isModifier value="false"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="v2"/>
        <map value="C*E.3"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value="./codeSystem"/>
      </mapping>
      <mapping>
        <identity value="orim"/>
        <map
             value="fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem"/>
      </mapping>
    </element>
    <element id="Medication.code.coding:atc.version">
      <path value="Medication.code.coding.version"/>
      <short value="Version of the system - if relevant"/>
      <definition
                  value="The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."/>
      <comment
               value="Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Coding.version"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="string"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <isModifier value="false"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="v2"/>
        <map value="C*E.7"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value="./codeSystemVersion"/>
      </mapping>
      <mapping>
        <identity value="orim"/>
        <map
             value="fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion"/>
      </mapping>
    </element>
    <element id="Medication.code.coding:atc.code">
      <path value="Medication.code.coding.code"/>
      <short value="Symbol in syntax defined by the system"/>
      <definition
                  value="A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination)."/>
      <requirements
                    value="Need to refer to a particular code in the system."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Coding.code"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="code"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <isModifier value="false"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="v2"/>
        <map value="C*E.1"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value="./code"/>
      </mapping>
      <mapping>
        <identity value="orim"/>
        <map value="fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code"/>
      </mapping>
    </element>
    <element id="Medication.code.coding:atc.display">
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
        <valueBoolean value="true"/>
      </extension>
      <path value="Medication.code.coding.display"/>
      <short value="Representation defined by the system"/>
      <definition
                  value="A representation of the meaning of the code in the system, following the rules of the system."/>
      <requirements
                    value="Need to be able to carry a human-readable meaning of the code for readers that do not know  the system."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Coding.display"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="string"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <isModifier value="false"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="v2"/>
        <map value="C*E.2 - but note this is not well followed"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value="CV.displayName"/>
      </mapping>
      <mapping>
        <identity value="orim"/>
        <map
             value="fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName"/>
      </mapping>
    </element>
    <element id="Medication.code.coding:atc.userSelected">
      <path value="Medication.code.coding.userSelected"/>
      <short value="If this coding was chosen directly by the user"/>
      <definition
                  value="Indicates that this coding was chosen by a user directly - e.g. off a pick list of available items (codes or displays)."/>
      <comment
               value="Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely."/>
      <requirements
                    value="This has been identified as a clinical safety criterium - that this exact system/code pair was chosen explicitly, rather than inferred by the system based on some rules or language processing."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Coding.userSelected"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="boolean"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <isModifier value="false"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="v2"/>
        <map value="Sometimes implied by being first"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value="CD.codingRationale"/>
      </mapping>
      <mapping>
        <identity value="orim"/>
        <map
             value="fhir:Coding.userSelected fhir:mapsTo dt:CDCoding.codingRationale. fhir:Coding.userSelected fhir:hasMap fhir:Coding.userSelected.map. fhir:Coding.userSelected.map a fhir:Map;   fhir:target dt:CDCoding.codingRationale. fhir:Coding.userSelected\#true a [     fhir:source &quot;true&quot;;     fhir:target dt:CDCoding.codingRationale\#O   ]"/>
      </mapping>
    </element>
    <element id="Medication.code.text">
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
        <valueBoolean value="true"/>
      </extension>
      <path value="Medication.code.text"/>
      <short value="Medication primary text"/>
      <definition
                  value="A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.

This may be a brand or generic name as suitable for the intent of the entry."/>
      <comment
               value="Very often the text is the same as a displayName of one of the codings."/>
      <requirements
                    value="The codes from the terminologies do not always capture the correct meaning with all the nuances of the human using them, or sometimes there is no appropriate code at all. In these cases, the text is used to capture the full meaning of the source."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="CodeableConcept.text"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="string"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <mustSupport value="true"/>
      <isModifier value="false"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="v2"/>
        <map value="C*E.9. But note many systems use C*E.2 for this"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map
             value="./originalText[mediaType/code=&quot;text/plain&quot;]/data"/>
      </mapping>
      <mapping>
        <identity value="orim"/>
        <map
             value="fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText"/>
      </mapping>
    </element>
    <element id="Medication.status">
      <path value="Medication.status"/>
      <short value="active | inactive | entered-in-error"/>
      <definition
                  value="A code to indicate if the medication is in active use."/>
      <comment
               value="This status is intended to identify if the medication in a local system is in active use within a drug database or inventory.  For example, a pharmacy system may create a new drug file record for a compounded product &quot;ABC Hospital Special Cream&quot; with an active status.  At some point in the future, it may be determined that the drug record was created with an error and the status is changed to &quot;entered in error&quot;.   This status is not intended to specify if a medication is part of a particular formulary.  It is possible that the drug record may be referenced by multiple formularies or catalogues and each of those entries would have a separate status."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Medication.status"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="code"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <isModifier value="true"/>
      <isModifierReason
                        value="This element changes the interpretation of all descriptive attributes."/>
      <isSummary value="true"/>
      <binding>
        <extension
                   url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="MedicationStatus"/>
        </extension>
        <strength value="required"/>
        <description
                     value="A coded concept defining if the medication is in active use."/>
        <valueSet
                  value="http://hl7.org/fhir/ValueSet/medication-status|4.0.1"/>
      </binding>
      <mapping>
        <identity value="rim"/>
        <map value=".statusCode"/>
      </mapping>
    </element>
    <element id="Medication.manufacturer">
      <path value="Medication.manufacturer"/>
      <short value="Physical product manufacturer organisation"/>
      <definition
                  value="Describes the details of the manufacturer of the medication product. This is not intended to represent the distributor of a medication product it is the manufacturer of the actual physical medicine product."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Medication.manufacturer"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="Reference"/>
        <targetProfile
                       value="http://hl7.org/fhir/StructureDefinition/Organization"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <isModifier value="false"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="script10.6"/>
        <map value="no mapping"/>
      </mapping>
      <mapping>
        <identity value="w5"/>
        <map value="FiveWs.actor"/>
      </mapping>
      <mapping>
        <identity value="v2"/>
        <map
             value="RXD-20-Substance Manufacturer Name / RXG-21-Substance Manufacturer Name / RXA-17-Substance Manufacturer Name"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value=".player.scopingRole[typeCode=MANU].scoper"/>
      </mapping>
    </element>
    <element id="Medication.form">
      <path value="Medication.form"/>
      <short value="powder | tablets | capsule +"/>
      <definition
                  value="Describes the form of the item.  Powder; tablets; capsule."/>
      <comment
               value="When Medication is referenced from MedicationRequest, this is the ordered form.  When Medication is referenced within MedicationDispense, this is the dispensed form.  When Medication is referenced within MedicationAdministration, this is administered form."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Medication.form"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="CodeableConcept"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <isModifier value="false"/>
      <isSummary value="false"/>
      <binding>
        <strength value="preferred"/>
        <valueSet
                  value="https://healthterminologies.gov.au/fhir/ValueSet/medication-form-1"/>
      </binding>
      <mapping>
        <identity value="script10.6"/>
        <map
             value="coding.code =  //element(*,DrugCodedType)/FormCode

coding.system = //element(*,DrugCodedType)/FormSourceCode"/>
      </mapping>
      <mapping>
        <identity value="v2"/>
        <map
             value="RXO-5-Requested Dosage Form / RXE-6-Give Dosage Form / RXD-6-Actual Dosage Form / RXG-8-Give Dosage Form / RXA-8-Administered Dosage Form"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value=".formCode"/>
      </mapping>
    </element>
    <element id="Medication.form.id">
      <path value="Medication.form.id"/>
      <representation value="xmlAttr"/>
      <short value="Unique id for inter-element referencing"/>
      <definition
                  value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Element.id"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <extension
                   url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type">
          <valueUrl value="string"/>
        </extension>
        <code value="http://hl7.org/fhirpath/System.String"/>
      </type>
      <isModifier value="false"/>
      <isSummary value="false"/>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="Medication.form.extension">
      <path value="Medication.form.extension"/>
      <slicing>
        <discriminator>
          <type value="value"/>
          <path value="url"/>
        </discriminator>
        <description value="Extensions are always sliced by (at least) url"/>
        <rules value="open"/>
      </slicing>
      <short value="Additional content defined by implementations"/>
      <definition
                  value="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."/>
      <comment
               value="There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone."/>
      <alias value="extensions"/>
      <alias value="user content"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Element.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <constraint>
        <key value="ext-1"/>
        <severity value="error"/>
        <human value="Must have either extensions or value[x], not both"/>
        <expression value="extension.exists() != value.exists()"/>
        <xpath
               value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), &quot;value&quot;)])"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Extension"/>
      </constraint>
      <isModifier value="false"/>
      <isSummary value="false"/>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="Medication.form.coding">
      <path value="Medication.form.coding"/>
      <short value="Code defined by a terminology system"/>
      <definition
                  value="A reference to a code defined by a terminology system."/>
      <comment
               value="Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information.  Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true."/>
      <requirements
                    value="Allows for alternative encodings within a code system, and translations to other code systems."/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="CodeableConcept.coding"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Coding"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <isModifier value="false"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="v2"/>
        <map value="C*E.1-8, C*E.10-22"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value="union(., ./translation)"/>
      </mapping>
      <mapping>
        <identity value="orim"/>
        <map
             value="fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding"/>
      </mapping>
    </element>
    <element id="Medication.form.text">
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
        <valueBoolean value="true"/>
      </extension>
      <path value="Medication.form.text"/>
      <short value="Plain text representation of the concept"/>
      <definition
                  value="A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."/>
      <comment
               value="Very often the text is the same as a displayName of one of the codings."/>
      <requirements
                    value="The codes from the terminologies do not always capture the correct meaning with all the nuances of the human using them, or sometimes there is no appropriate code at all. In these cases, the text is used to capture the full meaning of the source."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="CodeableConcept.text"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="string"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <mustSupport value="true"/>
      <isModifier value="false"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="v2"/>
        <map value="C*E.9. But note many systems use C*E.2 for this"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map
             value="./originalText[mediaType/code=&quot;text/plain&quot;]/data"/>
      </mapping>
      <mapping>
        <identity value="orim"/>
        <map
             value="fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText"/>
      </mapping>
    </element>
    <element id="Medication.amount">
      <path value="Medication.amount"/>
      <short value="Amount of drug in package"/>
      <definition
                  value="Specific amount of the drug in the packaged product.  For example, when specifying a product that has the same strength (For example, Insulin glargine 100 unit per mL solution for injection), this attribute provides additional clarification of the package amount (For example, 3 mL, 10mL, etc.)."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Medication.amount"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="Ratio"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <isModifier value="false"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="rim"/>
        <map value=".quantity"/>
      </mapping>
    </element>
    <element id="Medication.ingredient">
      <path value="Medication.ingredient"/>
      <short value="Active or inactive ingredient"/>
      <definition
                  value="Identifies a particular constituent of interest in the product. Can be coded with AMT."/>
      <comment
               value="The ingredients need not be a complete list.  If an ingredient is not specified, this does not indicate whether an ingredient is present or absent.  If an ingredient is specified it does not mean that all ingredients are specified.  It is possible to specify both inactive and active ingredients."/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Medication.ingredient"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="BackboneElement"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <isModifier value="false"/>
      <isSummary value="false"/>
      <mapping>
        <identity value="rim"/>
        <map value=".scopesRole[typeCode=INGR]"/>
      </mapping>
    </element>
    <element id="Medication.ingredient.id">
      <path value="Medication.ingredient.id"/>
      <representation value="xmlAttr"/>
      <short value="Unique id for inter-element referencing"/>
      <definition
                  value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Element.id"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <extension
                   url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type">
          <valueUrl value="string"/>
        </extension>
        <code value="http://hl7.org/fhirpath/System.String"/>
      </type>
      <isModifier value="false"/>
      <isSummary value="false"/>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="Medication.ingredient.extension">
      <path value="Medication.ingredient.extension"/>
      <short value="Additional content defined by implementations"/>
      <definition
                  value="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."/>
      <comment
               value="There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone."/>
      <alias value="extensions"/>
      <alias value="user content"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Element.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <constraint>
        <key value="ext-1"/>
        <severity value="error"/>
        <human value="Must have either extensions or value[x], not both"/>
        <expression value="extension.exists() != value.exists()"/>
        <xpath
               value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), &quot;value&quot;)])"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Extension"/>
      </constraint>
      <isModifier value="false"/>
      <isSummary value="false"/>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="Medication.ingredient.modifierExtension">
      <path value="Medication.ingredient.modifierExtension"/>
      <short value="Extensions that cannot be ignored even if unrecognized"/>
      <definition
                  value="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.

Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."/>
      <comment
               value="There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone."/>
      <requirements
                    value="Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored.  This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](http://hl7.org/fhir/R4/extensibility.html#modifierExtension)."/>
      <alias value="extensions"/>
      <alias value="user content"/>
      <alias value="modifiers"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="BackboneElement.modifierExtension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <constraint>
        <key value="ext-1"/>
        <severity value="error"/>
        <human value="Must have either extensions or value[x], not both"/>
        <expression value="extension.exists() != value.exists()"/>
        <xpath
               value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), &quot;value&quot;)])"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Extension"/>
      </constraint>
      <isModifier value="true"/>
      <isModifierReason
                        value="Modifier extensions are expected to modify the meaning or interpretation of the element that contains them"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="rim"/>
        <map value="N/A"/>
      </mapping>
    </element>
    <element id="Medication.ingredient.item[x]">
      <path value="Medication.ingredient.item[x]"/>
      <short value="The actual ingredient or content"/>
      <definition
                  value="The actual ingredient - either a substance (simple ingredient) or another medication of a medication."/>
      <requirements
                    value="The ingredient may reference a substance (for example, amoxicillin) or another medication (for example in the case of a compounded product, Glaxal Base)."/>
      <min value="1"/>
      <max value="1"/>
      <base>
        <path value="Medication.ingredient.item[x]"/>
        <min value="1"/>
        <max value="1"/>
      </base>
      <type>
        <code value="CodeableConcept"/>
      </type>
      <type>
        <code value="Reference"/>
        <targetProfile
                       value="http://hl7.org/fhir/StructureDefinition/Substance"/>
        <targetProfile
                       value="http://hl7.org/fhir/StructureDefinition/Medication"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <isModifier value="false"/>
      <isSummary value="false"/>
      <binding>
        <strength value="preferred"/>
        <valueSet
                  value="http://terminology.hl7.org.au/ValueSet/amt-mp-codes"/>
      </binding>
      <mapping>
        <identity value="script10.6"/>
        <map
             value="coding.code = //element(*,MedicationType)/DrugCoded/ProductCode

coding.system = //element(*,MedicationType)/DrugCoded/ProductCodeQualifier

coding.display = //element(*,MedicationType)/DrugDescription"/>
      </mapping>
      <mapping>
        <identity value="v2"/>
        <map
             value="RXC-2-Component Code  if medication: RXO-1-Requested Give Code / RXE-2-Give Code / RXD-2-Dispense/Give Code / RXG-4-Give Code / RXA-5-Administered Code"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value=".player"/>
      </mapping>
    </element>
    <element id="Medication.ingredient.isActive">
      <path value="Medication.ingredient.isActive"/>
      <short value="Active ingredient indicator"/>
      <definition
                  value="Indication of whether this ingredient affects the therapeutic action of the drug."/>
      <requirements
                    value="True indicates that the ingredient affects the therapeutic action of the drug (i.e. active). 
False indicates that the ingredient does not affect the therapeutic action of the drug (i.e. inactive)."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Medication.ingredient.isActive"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="boolean"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <isModifier value="false"/>
      <isSummary value="false"/>
      <mapping>
        <identity value="rim"/>
        <map value="NA"/>
      </mapping>
    </element>
    <element id="Medication.ingredient.strength">
      <path value="Medication.ingredient.strength"/>
      <short value="Quantity/strength of ingredient present"/>
      <definition
                  value="Specifies how many (or how much) of the items there are in this Medication.  For example, 250 mg per tablet.  This is expressed as a ratio where the numerator is 250mg and the denominator is 1 tablet."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Medication.ingredient.strength"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="Ratio"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <isModifier value="false"/>
      <isSummary value="false"/>
      <mapping>
        <identity value="script10.6"/>
        <map value="//element(*,DrugCodedType)/Strength"/>
      </mapping>
      <mapping>
        <identity value="v2"/>
        <map
             value="RXC-3-Component Amount &amp; RXC-4-Component Units  if medication: RXO-2-Requested Give Amount - Minimum &amp; RXO-4-Requested Give Units / RXO-3-Requested Give Amount - Maximum &amp; RXO-4-Requested Give Units / RXO-11-Requested Dispense Amount &amp; RXO-12-Requested Dispense Units / RXE-3-Give Amount - Minimum &amp; RXE-5-Give Units / RXE-4-Give Amount - Maximum &amp; RXE-5-Give Units / RXE-10-Dispense Amount &amp; RXE-10-Dispense Units"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value=".quantity"/>
      </mapping>
    </element>
    <element id="Medication.batch">
      <path value="Medication.batch"/>
      <short value="Details about packaged medications"/>
      <definition
                  value="Information that only applies to packages (not products)."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Medication.batch"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="BackboneElement"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <isModifier value="false"/>
      <isSummary value="false"/>
      <mapping>
        <identity value="script10.6"/>
        <map value="no mapping"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value=".player[classCode=CONT]"/>
      </mapping>
    </element>
    <element id="Medication.batch.id">
      <path value="Medication.batch.id"/>
      <representation value="xmlAttr"/>
      <short value="Unique id for inter-element referencing"/>
      <definition
                  value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Element.id"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <extension
                   url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type">
          <valueUrl value="string"/>
        </extension>
        <code value="http://hl7.org/fhirpath/System.String"/>
      </type>
      <isModifier value="false"/>
      <isSummary value="false"/>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="Medication.batch.extension">
      <path value="Medication.batch.extension"/>
      <short value="Additional content defined by implementations"/>
      <definition
                  value="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."/>
      <comment
               value="There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone."/>
      <alias value="extensions"/>
      <alias value="user content"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Element.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <constraint>
        <key value="ext-1"/>
        <severity value="error"/>
        <human value="Must have either extensions or value[x], not both"/>
        <expression value="extension.exists() != value.exists()"/>
        <xpath
               value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), &quot;value&quot;)])"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Extension"/>
      </constraint>
      <isModifier value="false"/>
      <isSummary value="false"/>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="Medication.batch.modifierExtension">
      <path value="Medication.batch.modifierExtension"/>
      <short value="Extensions that cannot be ignored even if unrecognized"/>
      <definition
                  value="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.

Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."/>
      <comment
               value="There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone."/>
      <requirements
                    value="Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored.  This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](http://hl7.org/fhir/R4/extensibility.html#modifierExtension)."/>
      <alias value="extensions"/>
      <alias value="user content"/>
      <alias value="modifiers"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="BackboneElement.modifierExtension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <constraint>
        <key value="ext-1"/>
        <severity value="error"/>
        <human value="Must have either extensions or value[x], not both"/>
        <expression value="extension.exists() != value.exists()"/>
        <xpath
               value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), &quot;value&quot;)])"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Extension"/>
      </constraint>
      <isModifier value="true"/>
      <isModifierReason
                        value="Modifier extensions are expected to modify the meaning or interpretation of the element that contains them"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="rim"/>
        <map value="N/A"/>
      </mapping>
    </element>
    <element id="Medication.batch.lotNumber">
      <path value="Medication.batch.lotNumber"/>
      <short value="Identifier assigned to batch"/>
      <definition
                  value="The assigned lot number of a batch of the specified product."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Medication.batch.lotNumber"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="string"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <isModifier value="false"/>
      <isSummary value="false"/>
      <mapping>
        <identity value="script10.6"/>
        <map value="no mapping"/>
      </mapping>
      <mapping>
        <identity value="v2"/>
        <map
             value="RXA-15 Substance Lot Number / RXG-19 Substance Lot Number"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value=".id"/>
      </mapping>
    </element>
    <element id="Medication.batch.expirationDate">
      <path value="Medication.batch.expirationDate"/>
      <short value="When batch will expire"/>
      <definition value="When this specific batch of product will expire."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Medication.batch.expirationDate"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="dateTime"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <isModifier value="false"/>
      <isSummary value="false"/>
      <mapping>
        <identity value="script10.6"/>
        <map value="no mapping"/>
      </mapping>
      <mapping>
        <identity value="v2"/>
        <map
             value="RXA-16 Substance Expiration Date / RXG-20 Substance Expiration Date"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map
             value="participation[typeCode=CSM].role[classCode=INST].scopedRole.scoper[classCode=MMAT].expirationTime"/>
      </mapping>
    </element>
  </snapshot>
  <differential>
    <element id="Medication">
      <path value="Medication"/>
    </element>
    <element id="Medication.meta">
      <path value="Medication.meta"/>
      <type>
        <code value="Meta"/>
        <profile
                 value="https://fhir.medirecords.com/StructureDefinition/mr-meta-information"/>
      </type>
      <mustSupport value="true"/>
    </element>
    <element id="Medication.extension:brandName">
      <path value="Medication.extension"/>
      <sliceName value="brandName"/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="Extension"/>
        <profile
                 value="http://hl7.org.au/fhir/StructureDefinition/medication-brand-name"/>
      </type>
      <mustSupport value="true"/>
    </element>
    <element id="Medication.extension:genericName">
      <path value="Medication.extension"/>
      <sliceName value="genericName"/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="Extension"/>
        <profile
                 value="http://hl7.org.au/fhir/StructureDefinition/medication-generic-name"/>
      </type>
      <mustSupport value="true"/>
    </element>
    <element id="Medication.extension:medication-strength">
      <path value="Medication.extension"/>
      <sliceName value="medication-strength"/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="Extension"/>
        <profile
                 value="http://hl7.org.au/fhir/StructureDefinition/medication-strength"/>
      </type>
      <mustSupport value="true"/>
    </element>
    <element id="Medication.extension:medication-pack-size">
      <path value="Medication.extension"/>
      <sliceName value="medication-pack-size"/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="Extension"/>
        <profile
                 value="https://fhir.medirecords.com/StructureDefinition/mr-medication-pack-size"/>
      </type>
      <mustSupport value="true"/>
    </element>
    <element id="Medication.extension:is-extemporaneous">
      <path value="Medication.extension"/>
      <sliceName value="is-extemporaneous"/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="Extension"/>
        <profile
                 value="https://fhir.medirecords.com/StructureDefinition/mr-medication-extemporaneous"/>
      </type>
      <mustSupport value="true"/>
    </element>
    <element id="Medication.code.coding:pbs">
      <path value="Medication.code.coding"/>
      <sliceName value="pbs"/>
      <max value="1"/>
      <mustSupport value="true"/>
    </element>
    <element id="Medication.code.coding:amt">
      <path value="Medication.code.coding"/>
      <sliceName value="amt"/>
      <max value="1"/>
      <mustSupport value="true"/>
    </element>
    <element id="Medication.code.coding:atc">
      <path value="Medication.code.coding"/>
      <sliceName value="atc"/>
      <min value="0"/>
      <max value="1"/>
      <mustSupport value="true"/>
    </element>
    <element id="Medication.code.coding:atc.system">
      <path value="Medication.code.coding.system"/>
      <min value="1"/>
      <fixedUri value="http://www.whocc.no/atc"/>
    </element>
    <element id="Medication.code.text">
      <path value="Medication.code.text"/>
      <mustSupport value="true"/>
    </element>
    <element id="Medication.form.text">
      <path value="Medication.form.text"/>
      <mustSupport value="true"/>
    </element>
  </differential>
</StructureDefinition>