<StructureDefinition xmlns="http://hl7.org/fhir">
  <url value="https://fhir.nhs.uk/StructureDefinition/NHSDigital-Dosage" />
  <name value="NHSDigitalDosage" />
  <status value="draft" />
  <fhirVersion value="4.0.1" />
  <kind value="complex-type" />
  <abstract value="false" />
  <type value="Dosage" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Dosage" />
  <derivation value="constraint" />
  <snapshot>
    <element id="Dosage">
      <path value="Dosage" />
      <short value="How the medication is/was taken or should be taken" />
      <definition value="Indicates how the medication is/was taken or should be taken by the patient." />
      <min value="0" />
      <max value="*" />
      <base>
        <path value="Dosage" />
        <min value="0" />
        <max value="*" />
      </base>
      <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>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value=".outboundRelationship[typeCode=COMP].target[classCode=SBADM, moodCode=INT]" />
      </mapping>
    </element>
    <element id="Dosage.id">
      <path value="Dosage.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>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
    </element>
    <element id="Dosage.extension">
      <path value="Dosage.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>
      <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>
      <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(.), 'value')])" />
        <source value="http://hl7.org/fhir/StructureDefinition/Extension" />
      </constraint>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="N/A" />
      </mapping>
    </element>
    <element id="Dosage.modifierExtension">
      <path value="Dosage.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.&#xA;&#xA;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](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>
      <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>
      <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(.), 'value')])" />
        <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>
      <mapping>
        <identity value="rim" />
        <map value="N/A" />
      </mapping>
    </element>
    <element id="Dosage.sequence">
      <path value="Dosage.sequence" />
      <short value="Multi-sequence dosage instructions." />
      <definition value="A multi-sequence would be required where a dosage instruction changes over a given time schedule, where a dosage instruction includes optional follow-up doses or where a concurrent dosage instruction is required for the same medication at a different dose.&#xD;&#xA;&#xD;&#xA;Examples below include Prednisolone to treat Bell’s palsy where a dose starts at 60 mg per day for a period of time then reduces by 10 mg per day. This would be described as a sequential dosage instruction. A concurrent dosage example is provided to describe a different dose in the morning to that at midday.&#xD;&#xA;&#xD;&#xA;#### Sequential Instructions&#xD;&#xA;&#xD;&#xA;Where the value of sequence is an incremental integer it defines a sequential instruction.&#xD;&#xA;&#xD;&#xA;#### Concurrent Instructions&#xD;&#xA;&#xD;&#xA;Where the same integer value of sequence is defines it means a concurrent instruction." />
      <comment value="32 bit number; for values larger than this, use decimal" />
      <requirements value="If the sequence number of multiple Dosages is the same, then it is implied that the instructions are to be treated as concurrent.  If the sequence number is different, then the Dosages are intended to be sequential." />
      <min value="0" />
      <max value="1" />
      <base>
        <path value="Dosage.sequence" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <code value="integer" />
      </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" />
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="v2" />
        <map value="TQ1-1" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value=".text" />
      </mapping>
    </element>
    <element id="Dosage.text">
      <path value="Dosage.text" />
      <short value="The complete dosage instruction as a human readable string." />
      <definition value="The complete dosage instruction as a human readable string.&#xD;&#xA;&#xD;&#xA;&lt;div class=&quot;nhsd-a-box nhsd-a-box--bg-light-blue nhsd-!t-margin-bottom-6 nhsd-t-body&quot;&gt;&#xD;&#xA;    &lt;strong&gt;Recommendation&lt;/strong&gt;: Use the &lt;a href='DosetoTextTranslation'&gt;translation algorithm&lt;/a&gt; published within this guide to create a string from the coded Dosage elements. It is planned for this translation algorithm to be available as an API.&#xD;&#xA;&lt;/div&gt;&#xD;&#xA;&#xD;&#xA;For example;&#xD;&#xA;&#xD;&#xA;```xml&#xD;&#xA;&lt;text value=&quot;1 tablet - every 6 hours - oral&quot; /&gt;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Where additional dosage instructions need to be conveyed that cannot be described using any other element of the Dosage structure, then append these to the end of the translated dosage text.&#xD;&#xA;&#xD;&#xA;For example, the instruction to `“infuse as rapidly as possibly via intraperitoneal port”` is not a coded term so cannot be shared as a `additionalInstruction`. It would neither be appropriate as a `patientInstruction` string.&#xD;&#xA;&#xD;&#xA;For example;&#xD;&#xA;&#xD;&#xA;```xml&#xD;&#xA;&lt;text value=&quot;{the dosage elements translated as text} - infuse as rapidly as possibly via intraperitoneal port&quot; /&gt;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;For example, the instruction `“immediately following drug {X}”)`, where {X} is the name of a drug, is neither suitable as a `additionalInstruction` nor `patientInstruction`.&#xD;&#xA;&#xD;&#xA;For example;&#xD;&#xA;&#xD;&#xA;```xml&#xD;&#xA;&lt;text value=&quot;500 milligrams - once - oral - immediately following drug {X}&quot; /&gt;&#xD;&#xA;```" />
      <comment value="Note that FHIR strings SHALL NOT exceed 1MB in size" />
      <requirements value="Free text dosage instructions can be used for cases where the instructions are too complex to code.  The content of this attribute does not include the name or description of the medication. When coded instructions are present, the free text instructions may still be present for display to humans taking or administering the medication. It is expected that the text instructions will always be populated.  If the dosage.timing attribute is also populated, then the dosage.text should reflect the same information as the timing.  Additional information about administration or preparation of the medication should be included as text." />
      <min value="0" />
      <max value="1" />
      <base>
        <path value="Dosage.text" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <code value="string" />
      </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" />
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="v2" />
        <map value="RXO-6; RXE-21" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value=".text" />
      </mapping>
    </element>
    <element id="Dosage.additionalInstruction">
      <path value="Dosage.additionalInstruction" />
      <short value="Additional dosage instructions that can be either SNOMED-CT coded terms or free-text instructions." />
      <definition value="Where suitable SNOMED-CT coded terms exist, use them instead of free-text instructions. See the SNOMED-CT hierarchy descendants of [419492006 Additional dosage instructions (qualifier value)](https://termbrowser.nhs.uk/?perspective=full&amp;conceptId1=419492006&amp;edition=uk-edition). These terms are also available from the example [FHIR valueset binding](http://hl7.org/fhir/stu3/valueset-additional-instruction-codes.html).&#xD;&#xA;&#xD;&#xA;&lt;div class=&quot;nhsd-a-box nhsd-a-box--bg-light-yellow nhsd-!t-margin-bottom-6 nhsd-t-body&quot;&gt;&#xD;&#xA;    &lt;strong&gt;Important:&lt;/strong&gt; Where no code exists, &lt;code&gt;additionalInstructions&lt;/code&gt; can be conveyed as free-text; however, if free-text is used rather than a SNOMED-CT coded term, the `MedicationRequest` cannot be computable, and requires human intervention in the case of conditional or contradictory instructions.&#xD;&#xA;&lt;/div&gt;&#xD;&#xA;&#xD;&#xA;**Coded instruction**&#xD;&#xA;```xml&#xD;&#xA;&lt;additionalInstruction&gt;&#xD;&#xA;    &lt;coding&gt; &#xD;&#xA;        &lt;system value=&quot;http://snomed.info/sct&quot;/&gt; &#xD;&#xA;        &lt;code value=&quot;419529008&quot;/&gt; &#xD;&#xA;        &lt;display value=&quot;Dissolved under the tongue &quot;/&gt; &#xD;&#xA;    &lt;/coding&gt;&#xD;&#xA;&lt;/additionalInstruction&gt;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**Multiple coded instructions**&#xD;&#xA;&#xD;&#xA;```xml&#xD;&#xA;&lt;additionalInstruction&gt;&#xD;&#xA;    &lt;coding&gt; &#xD;&#xA;        &lt;system value=&quot;http://snomed.info/sct&quot;/&gt; &#xD;&#xA;        &lt;code value=&quot;417995008&quot;/&gt; &#xD;&#xA;        &lt;display value=&quot;Dissolve or mix with water before taking&quot;/&gt; &#xD;&#xA;    &lt;/coding&gt;&#xD;&#xA;&lt;/additionalInstruction&gt;&#xD;&#xA;&lt;additionalInstruction&gt;&#xD;&#xA;    &lt;coding&gt; &#xD;&#xA;        &lt;system value=&quot;http://snomed.info/sct&quot;/&gt; &#xD;&#xA;        &lt;code value=&quot;417980006&quot;/&gt; &#xD;&#xA;        &lt;display value=&quot;Contains aspirin&quot;/&gt; &#xD;&#xA;    &lt;/coding&gt;&#xD;&#xA;&lt;/additionalInstruction&gt;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**Free-text instruction (try to avoid using free-text where possible)**&#xD;&#xA;&#xD;&#xA;```xml&#xD;&#xA;&lt;additionalInstruction&gt;&#xD;&#xA;    &lt;text value=&quot;with dialysis&quot;/&gt;&#xD;&#xA;&lt;/additionalInstruction&gt;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;### `additionalInstruction` / `when` overlap&#xD;&#xA;&#xD;&#xA;&lt;div class=&quot;nhsd-a-box nhsd-a-box--bg-light-blue nhsd-!t-margin-bottom-6 nhsd-t-body&quot;&gt;&#xD;&#xA;    &lt;strong&gt;Note:&lt;/strong&gt; The value-sets for &lt;code&gt;Timing.when&lt;/code&gt; and &lt;code&gt;Dosage.additionalInstruction&lt;/code&gt; do contain some overlapping values.&#xD;&#xA;&lt;/div&gt;&#xD;&#xA;&#xD;&#xA;For example, they can both describe “with or after food”. &#xD;&#xA;&#xD;&#xA;In such cases, use `Timing.when` instead of a coded `Dosage.additionalInstruction`.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;### continue / stop instructions&#xD;&#xA;&#xD;&#xA;There may be the need for a clinician to give explicit instructions to either stop or continue taking medication. This could be applicable for discharge medication where one medicine may be for short term pain relief and should be stopped after the prescribed quantity has been taken, while another medicine must be continued until further notice. &#xD;&#xA;&#xD;&#xA;The patient’s GP would be informed of this as part of the discharge letter but having these instructions explicitly coded provides a more robust solution.&#xD;&#xA;&#xD;&#xA;Three SNOMED-CT codes exist that can be used for this purpose.&#xD;&#xA;&#xD;&#xA;- “Then stop” (SNOMED concept identifier = [422327006](https://termbrowser.nhs.uk/?perspective=full&amp;conceptId1=422327006&amp;edition=uk-edition))&#xD;&#xA;- “Then discontinue” (SNOMED concept identifier = [421484000](https://termbrowser.nhs.uk/?perspective=full&amp;conceptId1=421484000&amp;edition=uk-edition))&#xD;&#xA;- “Do not stop taking this medicine except on your doctor’s advice” (SNOMED concept identifier = [419444006](https://termbrowser.nhs.uk/?perspective=full&amp;conceptId1=419444006&amp;edition=uk-edition))&#xD;&#xA;&#xD;&#xA;&lt;div class=&quot;nhsd-a-box nhsd-a-box--bg-light-blue nhsd-!t-margin-bottom-6 nhsd-t-body&quot;&gt;&#xD;&#xA;    &lt;strong&gt;Note:&lt;/strong&gt; It is recognised that such coded terms are akin to timing instructions so may be more logically containing within the various &lt;code&gt;Dosage.timing&lt;/code&gt; structures. These do not currently support coded concept terms. Implementation experience will provide evidence to support any future change to the underlying FHIR specification.&#xD;&#xA;&lt;/div&gt;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;### as directed&#xD;&#xA;&#xD;&#xA;The use of a dosage instruction akin to “as directed” should be avoided wherever possible; however, if required then this can be SNOMED coded using [421769005 Follow directions (qualifier value)](https://termbrowser.nhs.uk/?perspective=full&amp;conceptId1=421769005&amp;edition=uk-edition) or conveyed as text as a patient instruction.&#xD;&#xA;&#xD;&#xA;---" />
      <comment value="Information about administration or preparation of the medication (e.g. &quot;infuse as rapidly as possibly via intraperitoneal port&quot; or &quot;immediately following drug x&quot;) should be populated in dosage.text." />
      <requirements value="Additional instruction is intended to be coded, but where no code exists, the element could include text.  For example, &quot;Swallow with plenty of water&quot; which might or might not be coded." />
      <min value="0" />
      <max value="*" />
      <base>
        <path value="Dosage.additionalInstruction" />
        <min value="0" />
        <max value="*" />
      </base>
      <type>
        <code value="CodeableConcept" />
      </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" />
      <isSummary value="true" />
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="AdditionalInstruction" />
        </extension>
        <strength value="example" />
        <description value="A coded concept identifying additional instructions such as &quot;take with water&quot; or &quot;avoid operating heavy machinery&quot;." />
        <valueSet value="http://hl7.org/fhir/ValueSet/additional-instruction-codes" />
      </binding>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="v2" />
        <map value="CE/CNE/CWE" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="CD" />
      </mapping>
      <mapping>
        <identity value="orim" />
        <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" />
      </mapping>
      <mapping>
        <identity value="v2" />
        <map value="RXO-7" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value=".text" />
      </mapping>
    </element>
    <element id="Dosage.patientInstruction">
      <path value="Dosage.patientInstruction" />
      <short value="Patient or consumer oriented instructions" />
      <definition value="Free-text instructions for the patient. Patient instructions can only be defined as one text string per dosage instruction. &#xD;&#xA;&#xD;&#xA;&lt;div class=&quot;nhsd-a-box nhsd-a-box--bg-light-blue nhsd-!t-margin-bottom-6 nhsd-t-body&quot;&gt;&#xD;&#xA;    &lt;strong&gt;Note:&lt;/strong&gt;&#xD;&#xA;This field is not intended to provide instructions for a medication dispensing label.&#xD;&#xA;&lt;/div&gt;&#xD;&#xA;&#xD;&#xA;```xml&#xD;&#xA;&lt;patientInstruction value=&quot;Some relevant instructions for the patient&quot;/&gt;&#xD;&#xA;```" />
      <comment value="Note that FHIR strings SHALL NOT exceed 1MB in size" />
      <min value="0" />
      <max value="1" />
      <base>
        <path value="Dosage.patientInstruction" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <code value="string" />
      </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" />
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="v2" />
        <map value="RXO-7" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value=".text" />
      </mapping>
    </element>
    <element id="Dosage.timing">
      <path value="Dosage.timing" />
      <short value="When medication should be administered" />
      <definition value="Adding constraints, bounds or limits to a dosage instruction." />
      <comment value="This attribute might not always be populated while the Dosage.text is expected to be populated.  If both are populated, then the Dosage.text should reflect the content of the Dosage.timing." />
      <requirements value="The timing schedule for giving the medication to the patient. This  data type allows many different expressions. For example: &quot;Every 8 hours&quot;; &quot;Three times a day&quot;; &quot;1/2 an hour before breakfast for 10 days from 23-Dec 2011:&quot;; &quot;15 Oct 2013, 17 Oct 2013 and 1 Nov 2013&quot;.  Sometimes, a rate can imply duration when expressed as total volume / duration (e.g.  500mL/2 hours implies a duration of 2 hours).  However, when rate doesn't imply duration (e.g. 250mL/hour), then the timing.repeat.duration is needed to convey the infuse over time period." />
      <min value="0" />
      <max value="1" />
      <base>
        <path value="Dosage.timing" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <code value="Timing" />
      </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" />
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="v2" />
        <map value="N/A" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="QSET&lt;TS&gt; (GTS)" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value=".effectiveTime" />
      </mapping>
    </element>
    <element id="Dosage.timing.id">
      <path value="Dosage.timing.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>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
    </element>
    <element id="Dosage.timing.extension">
      <path value="Dosage.timing.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>
      <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>
      <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(.), 'value')])" />
        <source value="http://hl7.org/fhir/StructureDefinition/Extension" />
      </constraint>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="N/A" />
      </mapping>
    </element>
    <element id="Dosage.timing.modifierExtension">
      <path value="Dosage.timing.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.&#xA;&#xA;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](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>
      <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>
      <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(.), 'value')])" />
        <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>
      <mapping>
        <identity value="rim" />
        <map value="N/A" />
      </mapping>
    </element>
    <element id="Dosage.timing.event">
      <path value="Dosage.timing.event" />
      <short value="When the event occurs" />
      <definition value="Identifies specific times when the event occurs." />
      <requirements value="In a Medication Administration Record, for instance, you need to take a general specification, and turn it into a precise specification." />
      <min value="0" />
      <max value="*" />
      <base>
        <path value="Timing.event" />
        <min value="0" />
        <max value="*" />
      </base>
      <type>
        <code value="dateTime" />
      </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>
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="QLIST&lt;TS&gt;" />
      </mapping>
    </element>
    <element id="Dosage.timing.repeat">
      <path value="Dosage.timing.repeat" />
      <short value="When the event is to occur" />
      <definition value="A set of rules that describe when the event is scheduled." />
      <requirements value="Many timing schedules are determined by regular repetitions." />
      <min value="0" />
      <max value="1" />
      <base>
        <path value="Timing.repeat" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <code value="Element" />
      </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>
      <constraint>
        <key value="tim-9" />
        <severity value="error" />
        <human value="If there's an offset, there must be a when (and not C, CM, CD, CV)" />
        <expression value="offset.empty() or (when.exists() and ((when in ('C' | 'CM' | 'CD' | 'CV')).not()))" />
        <xpath value="not(exists(f:offset)) or exists(f:when)" />
        <source value="http://hl7.org/fhir/StructureDefinition/Timing" />
      </constraint>
      <constraint>
        <key value="tim-5" />
        <severity value="error" />
        <human value="period SHALL be a non-negative value" />
        <expression value="period.exists() implies period &gt;= 0" />
        <xpath value="f:period/@value &gt;= 0 or not(f:period/@value)" />
        <source value="http://hl7.org/fhir/StructureDefinition/Timing" />
      </constraint>
      <constraint>
        <key value="tim-6" />
        <severity value="error" />
        <human value="If there's a periodMax, there must be a period" />
        <expression value="periodMax.empty() or period.exists()" />
        <xpath value="not(exists(f:periodMax)) or exists(f:period)" />
        <source value="http://hl7.org/fhir/StructureDefinition/Timing" />
      </constraint>
      <constraint>
        <key value="tim-7" />
        <severity value="error" />
        <human value="If there's a durationMax, there must be a duration" />
        <expression value="durationMax.empty() or duration.exists()" />
        <xpath value="not(exists(f:durationMax)) or exists(f:duration)" />
        <source value="http://hl7.org/fhir/StructureDefinition/Timing" />
      </constraint>
      <constraint>
        <key value="tim-8" />
        <severity value="error" />
        <human value="If there's a countMax, there must be a count" />
        <expression value="countMax.empty() or count.exists()" />
        <xpath value="not(exists(f:countMax)) or exists(f:count)" />
        <source value="http://hl7.org/fhir/StructureDefinition/Timing" />
      </constraint>
      <constraint>
        <key value="tim-1" />
        <severity value="error" />
        <human value="if there's a duration, there needs to be duration units" />
        <expression value="duration.empty() or durationUnit.exists()" />
        <xpath value="not(exists(f:duration)) or exists(f:durationUnit)" />
        <source value="http://hl7.org/fhir/StructureDefinition/Timing" />
      </constraint>
      <constraint>
        <key value="tim-10" />
        <severity value="error" />
        <human value="If there's a timeOfDay, there cannot be a when, or vice versa" />
        <expression value="timeOfDay.empty() or when.empty()" />
        <xpath value="not(exists(f:timeOfDay)) or not(exists(f:when))" />
        <source value="http://hl7.org/fhir/StructureDefinition/Timing" />
      </constraint>
      <constraint>
        <key value="tim-2" />
        <severity value="error" />
        <human value="if there's a period, there needs to be period units" />
        <expression value="period.empty() or periodUnit.exists()" />
        <xpath value="not(exists(f:period)) or exists(f:periodUnit)" />
        <source value="http://hl7.org/fhir/StructureDefinition/Timing" />
      </constraint>
      <constraint>
        <key value="tim-4" />
        <severity value="error" />
        <human value="duration SHALL be a non-negative value" />
        <expression value="duration.exists() implies duration &gt;= 0" />
        <xpath value="f:duration/@value &gt;= 0 or not(f:duration/@value)" />
        <source value="http://hl7.org/fhir/StructureDefinition/Timing" />
      </constraint>
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="Implies PIVL or EIVL" />
      </mapping>
    </element>
    <element id="Dosage.timing.repeat.id">
      <path value="Dosage.timing.repeat.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>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
    </element>
    <element id="Dosage.timing.repeat.extension">
      <path value="Dosage.timing.repeat.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>
      <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>
      <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(.), 'value')])" />
        <source value="http://hl7.org/fhir/StructureDefinition/Extension" />
      </constraint>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="N/A" />
      </mapping>
    </element>
    <element id="Dosage.timing.repeat.bounds[x]">
      <path value="Dosage.timing.repeat.bounds[x]" />
      <short value="Length/Range of lengths, or (Start and/or end) limits" />
      <definition value="Either a duration for the length of the timing schedule, a range of possible length, or outer bounds for start and/or end limits of the timing schedule." />
      <min value="0" />
      <max value="1" />
      <base>
        <path value="Timing.repeat.bounds[x]" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <code value="Duration" />
      </type>
      <type>
        <code value="Range" />
        <profile value="https://fhir.nhs.uk.uk/StructureDefinition/NHSDigital-Range" />
      </type>
      <type>
        <code value="Period" />
      </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>
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="IVL(TS) used in a QSI" />
      </mapping>
    </element>
    <element id="Dosage.timing.repeat.count">
      <path value="Dosage.timing.repeat.count" />
      <short value="Number of times to repeat" />
      <definition value="A total count of the desired number of repetitions across the duration of the entire timing specification. If countMax is present, this element indicates the lower bound of the allowed range of count values." />
      <comment value="If you have both bounds and count, then this should be understood as within the bounds period, until count times happens." />
      <requirements value="Repetitions may be limited by end time or total occurrences." />
      <min value="0" />
      <max value="1" />
      <base>
        <path value="Timing.repeat.count" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <code value="positiveInt" />
      </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>
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="PIVL.count" />
      </mapping>
    </element>
    <element id="Dosage.timing.repeat.countMax">
      <path value="Dosage.timing.repeat.countMax" />
      <short value="Maximum number of times to repeat" />
      <definition value="If present, indicates that the count is a range - so to perform the action between [count] and [countMax] times." />
      <comment value="32 bit number; for values larger than this, use decimal" />
      <min value="0" />
      <max value="1" />
      <base>
        <path value="Timing.repeat.countMax" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <code value="positiveInt" />
      </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>
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="PIVL.count" />
      </mapping>
    </element>
    <element id="Dosage.timing.repeat.duration">
      <path value="Dosage.timing.repeat.duration" />
      <short value="How long when it happens" />
      <definition value="How long this thing happens for when it happens. If durationMax is present, this element indicates the lower bound of the allowed range of the duration." />
      <comment value="For some events the duration is part of the definition of the event (e.g. IV infusions, where the duration is implicit in the specified quantity and rate). For others, it's part of the timing specification (e.g. exercise)." />
      <requirements value="Some activities are not instantaneous and need to be maintained for a period of time." />
      <min value="0" />
      <max value="1" />
      <base>
        <path value="Timing.repeat.duration" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <code value="decimal" />
      </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>
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="PIVL.phase" />
      </mapping>
    </element>
    <element id="Dosage.timing.repeat.durationMax">
      <path value="Dosage.timing.repeat.durationMax" />
      <short value="How long when it happens (Max)" />
      <definition value="If present, indicates that the duration is a range - so to perform the action between [duration] and [durationMax] time length." />
      <comment value="For some events the duration is part of the definition of the event (e.g. IV infusions, where the duration is implicit in the specified quantity and rate). For others, it's part of the timing specification (e.g. exercise)." />
      <requirements value="Some activities are not instantaneous and need to be maintained for a period of time." />
      <min value="0" />
      <max value="1" />
      <base>
        <path value="Timing.repeat.durationMax" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <code value="decimal" />
      </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>
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="PIVL.phase" />
      </mapping>
    </element>
    <element id="Dosage.timing.repeat.durationUnit">
      <path value="Dosage.timing.repeat.durationUnit" />
      <short value="s | min | h | d | wk | mo | a - unit of time (UCUM)" />
      <definition value="The units of time for the duration, in UCUM units." />
      <comment value="Note that FHIR strings SHALL NOT exceed 1MB in size" />
      <min value="0" />
      <max value="1" />
      <base>
        <path value="Timing.repeat.durationUnit" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <code value="code" />
      </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>
      <isSummary value="true" />
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="UnitsOfTime" />
        </extension>
        <strength value="required" />
        <description value="A unit of time (units from UCUM)." />
        <valueSet value="http://hl7.org/fhir/ValueSet/units-of-time|4.0.1" />
      </binding>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="PIVL.phase.unit" />
      </mapping>
    </element>
    <element id="Dosage.timing.repeat.frequency">
      <path value="Dosage.timing.repeat.frequency" />
      <short value="Event occurs frequency times per period" />
      <definition value="The number of times to repeat the action within the specified period. If frequencyMax is present, this element indicates the lower bound of the allowed range of the frequency." />
      <comment value="32 bit number; for values larger than this, use decimal" />
      <min value="0" />
      <max value="1" />
      <base>
        <path value="Timing.repeat.frequency" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <code value="positiveInt" />
      </type>
      <meaningWhenMissing value="If no frequency is stated, the assumption is that the event occurs once per period, but systems SHOULD always be specific about this" />
      <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>
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="PIVL.phase" />
      </mapping>
    </element>
    <element id="Dosage.timing.repeat.frequencyMax">
      <path value="Dosage.timing.repeat.frequencyMax" />
      <short value="Event occurs up to frequencyMax times per period" />
      <definition value="If present, indicates that the frequency is a range - so to repeat between [frequency] and [frequencyMax] times within the period or period range." />
      <comment value="32 bit number; for values larger than this, use decimal" />
      <min value="0" />
      <max value="1" />
      <base>
        <path value="Timing.repeat.frequencyMax" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <code value="positiveInt" />
      </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>
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="PIVL.phase" />
      </mapping>
    </element>
    <element id="Dosage.timing.repeat.period">
      <path value="Dosage.timing.repeat.period" />
      <short value="Event occurs frequency times per period" />
      <definition value="Indicates the duration of time over which repetitions are to occur; e.g. to express &quot;3 times per day&quot;, 3 would be the frequency and &quot;1 day&quot; would be the period. If periodMax is present, this element indicates the lower bound of the allowed range of the period length." />
      <comment value="Do not use an IEEE type floating point type, instead use something that works like a true decimal, with inbuilt precision (e.g. Java BigInteger)" />
      <min value="0" />
      <max value="1" />
      <base>
        <path value="Timing.repeat.period" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <code value="decimal" />
      </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>
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="PIVL.phase" />
      </mapping>
    </element>
    <element id="Dosage.timing.repeat.periodMax">
      <path value="Dosage.timing.repeat.periodMax" />
      <short value="Upper limit of period (3-4 hours)" />
      <definition value="If present, indicates that the period is a range from [period] to [periodMax], allowing expressing concepts such as &quot;do this once every 3-5 days." />
      <comment value="Do not use an IEEE type floating point type, instead use something that works like a true decimal, with inbuilt precision (e.g. Java BigInteger)" />
      <min value="0" />
      <max value="1" />
      <base>
        <path value="Timing.repeat.periodMax" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <code value="decimal" />
      </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>
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="PIVL.phase" />
      </mapping>
    </element>
    <element id="Dosage.timing.repeat.periodUnit">
      <path value="Dosage.timing.repeat.periodUnit" />
      <short value="s | min | h | d | wk | mo | a - unit of time (UCUM)" />
      <definition value="The units of time for the period in UCUM units." />
      <comment value="Note that FHIR strings SHALL NOT exceed 1MB in size" />
      <min value="0" />
      <max value="1" />
      <base>
        <path value="Timing.repeat.periodUnit" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <code value="code" />
      </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>
      <isSummary value="true" />
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="UnitsOfTime" />
        </extension>
        <strength value="required" />
        <description value="A unit of time (units from UCUM)." />
        <valueSet value="http://hl7.org/fhir/ValueSet/units-of-time|4.0.1" />
      </binding>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="PIVL.phase.unit" />
      </mapping>
    </element>
    <element id="Dosage.timing.repeat.dayOfWeek">
      <path value="Dosage.timing.repeat.dayOfWeek" />
      <short value="mon | tue | wed | thu | fri | sat | sun" />
      <definition value="If one or more days of week is provided, then the action happens only on the specified day(s)." />
      <comment value="If no days are specified, the action is assumed to happen every day as otherwise specified. The elements frequency and period cannot be used as well as dayOfWeek." />
      <min value="0" />
      <max value="*" />
      <base>
        <path value="Timing.repeat.dayOfWeek" />
        <min value="0" />
        <max value="*" />
      </base>
      <type>
        <code value="code" />
      </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>
      <isSummary value="true" />
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="DayOfWeek" />
        </extension>
        <strength value="required" />
        <valueSet value="http://hl7.org/fhir/ValueSet/days-of-week|4.0.1" />
      </binding>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
    </element>
    <element id="Dosage.timing.repeat.timeOfDay">
      <path value="Dosage.timing.repeat.timeOfDay" />
      <short value="Time of day for action" />
      <definition value="Specified time of day for action to take place." />
      <comment value="When time of day is specified, it is inferred that the action happens every day (as filtered by dayofWeek) on the specified times. The elements when, frequency and period cannot be used as well as timeOfDay." />
      <min value="0" />
      <max value="*" />
      <base>
        <path value="Timing.repeat.timeOfDay" />
        <min value="0" />
        <max value="*" />
      </base>
      <type>
        <code value="time" />
      </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>
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
    </element>
    <element id="Dosage.timing.repeat.when">
      <path value="Dosage.timing.repeat.when" />
      <short value="Code for time period of occurrence" />
      <definition value="An approximate time period during the day, potentially linked to an event of daily living that indicates when the action should occur." />
      <comment value="When more than one event is listed, the event is tied to the union of the specified events." />
      <requirements value="Timings are frequently determined by occurrences such as waking, eating and sleep." />
      <min value="0" />
      <max value="*" />
      <base>
        <path value="Timing.repeat.when" />
        <min value="0" />
        <max value="*" />
      </base>
      <type>
        <code value="code" />
      </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>
      <isSummary value="true" />
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="EventTiming" />
        </extension>
        <strength value="required" />
        <description value="Real world event relating to the schedule." />
        <valueSet value="http://hl7.org/fhir/ValueSet/event-timing|4.0.1" />
      </binding>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="EIVL.event" />
      </mapping>
    </element>
    <element id="Dosage.timing.repeat.offset">
      <path value="Dosage.timing.repeat.offset" />
      <short value="Minutes from event (before or after)" />
      <definition value="The number of minutes from the event. If the event code does not indicate whether the minutes is before or after the event, then the offset is assumed to be after the event." />
      <comment value="32 bit number; for values larger than this, use decimal" />
      <min value="0" />
      <max value="1" />
      <base>
        <path value="Timing.repeat.offset" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <code value="unsignedInt" />
      </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>
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="EIVL.offset" />
      </mapping>
    </element>
    <element id="Dosage.timing.code">
      <path value="Dosage.timing.code" />
      <short value="BID | TID | QID | AM | PM | QD | QOD | +" />
      <definition value="A code for the timing schedule (or just text in code.text). Some codes such as BID are ubiquitous, but many institutions define their own additional codes. If a code is provided, the code is understood to be a complete statement of whatever is specified in the structured timing data, and either the code or the data may be used to interpret the Timing, with the exception that .repeat.bounds still applies over the code (and is not contained in the code)." />
      <comment value="BID etc. are defined as 'at institutionally specified times'. For example, an institution may choose that BID is &quot;always at 7am and 6pm&quot;.  If it is inappropriate for this choice to be made, the code BID should not be used. Instead, a distinct organization-specific code should be used in place of the HL7-defined BID code and/or a structured representation should be used (in this case, specifying the two event times)." />
      <min value="0" />
      <max value="1" />
      <base>
        <path value="Timing.code" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <code value="CodeableConcept" />
      </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>
      <isSummary value="true" />
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="TimingAbbreviation" />
        </extension>
        <strength value="preferred" />
        <description value="Code for a known / defined timing pattern." />
        <valueSet value="http://hl7.org/fhir/ValueSet/timing-abbreviation" />
      </binding>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="v2" />
        <map value="CE/CNE/CWE" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="CD" />
      </mapping>
      <mapping>
        <identity value="orim" />
        <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="QSC.code" />
      </mapping>
    </element>
    <element id="Dosage.asNeeded[x]">
      <path value="Dosage.asNeeded[x]" />
      <short value="Take &quot;as needed&quot; (for x)" />
      <definition value="The `asNeeded` structure can be used to define a simple “as required” (or “pro re nata” expressed as “PRN” for those who still prefer to use Latin abbreviations) instructions. &#xD;&#xA;&#xD;&#xA;In this case use the `asNeededBoolean` option. The absence of `asNeededBoolean` is equivalent to where `asNeededBoolean` has a value of `false`.&#xD;&#xA;&#xD;&#xA;The `asNeededCodeableConcept` option is used to bound the dosage instruction to a coded term. Any number of coded terms can be used from the SNOMED-CT hierarchy as a descendant of [404684003 Clinical Finding (finding)](https://termbrowser.nhs.uk/?perspective=full&amp;conceptId1=404684003&amp;edition=uk-edition). An extensive medication-as-needed-reason value-set is defined within FHIR which is a subset of the SNOMED-CT clinical findings hierarchy." />
      <comment value="Can express &quot;as needed&quot; without a reason by setting the Boolean = True.  In this case the CodeableConcept is not populated.  Or you can express &quot;as needed&quot; with a reason by including the CodeableConcept.  In this case the Boolean is assumed to be True.  If you set the Boolean to False, then the dose is given according to the schedule and is not &quot;prn&quot; or &quot;as needed&quot;." />
      <min value="0" />
      <max value="1" />
      <base>
        <path value="Dosage.asNeeded[x]" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <code value="boolean" />
      </type>
      <type>
        <code value="CodeableConcept" />
      </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" />
      <isSummary value="true" />
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="MedicationAsNeededReason" />
        </extension>
        <strength value="example" />
        <description value="A coded concept identifying the precondition that should be met or evaluated prior to consuming or administering a medication dose.  For example &quot;pain&quot;, &quot;30 minutes prior to sexual intercourse&quot;, &quot;on flare-up&quot; etc." />
        <valueSet value="http://hl7.org/fhir/ValueSet/medication-as-needed-reason" />
      </binding>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="v2" />
        <map value="TQ1-9" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value=".outboundRelationship[typeCode=PRCN].target[classCode=OBS, moodCode=EVN, code=&quot;as needed&quot;].value=boolean or codable concept" />
      </mapping>
    </element>
    <element id="Dosage.site">
      <path value="Dosage.site" />
      <short value="Body site to administer to" />
      <definition value="Any `site` can be used from the SNOMED-CT hierarchy as a descendant of the concept [123037004 Body structure (body structure)](https://termbrowser.nhs.uk/?perspective=full&amp;conceptId1=123037004&amp;edition=uk-edition).&#xD;&#xA;&#xD;&#xA;```xml&#xD;&#xA;&lt;!-- Site --&gt;&#xD;&#xA;&lt;site&gt;&#xD;&#xA;    &lt;coding&gt;&#xD;&#xA;        &lt;system value=&quot;http://snomed.info/sct&quot;/&gt;&#xD;&#xA;        &lt;code value=&quot;59380008&quot;/&gt;&#xD;&#xA;        &lt;display value=&quot;Anterior abdominal wall structure&quot;/&gt;&#xD;&#xA;    &lt;/coding&gt;&#xD;&#xA;&lt;/site&gt;&#xD;&#xA;```" />
      <comment value="If the use case requires attributes from the BodySite resource (e.g. to identify and track separately) then use the standard extension [bodySite](extension-bodysite.html).  May be a summary code, or a reference to a very precise definition of the location, or both." />
      <requirements value="A coded specification of the anatomic site where the medication first enters the body." />
      <min value="0" />
      <max value="1" />
      <base>
        <path value="Dosage.site" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <code value="CodeableConcept" />
      </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" />
      <isSummary value="true" />
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="MedicationAdministrationSite" />
        </extension>
        <strength value="example" />
        <description value="A coded concept describing the site location the medicine enters into or onto the body." />
        <valueSet value="http://hl7.org/fhir/ValueSet/approach-site-codes" />
      </binding>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="v2" />
        <map value="CE/CNE/CWE" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="CD" />
      </mapping>
      <mapping>
        <identity value="orim" />
        <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" />
      </mapping>
      <mapping>
        <identity value="v2" />
        <map value="RXR-2" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value=".approachSiteCode" />
      </mapping>
    </element>
    <element id="Dosage.route">
      <path value="Dosage.route" />
      <short value="How drug should enter body" />
      <definition value="Any `route` can be used from the SNOMED-CT hierarchy as a descendant of the concept [284009009 Route of administration value (qualifier value)](https://termbrowser.nhs.uk/?perspective=full&amp;conceptId1=284009009&amp;edition=uk-edition).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```xml&#xD;&#xA;&lt;!-- Route --&gt;&#xD;&#xA;&lt;route&gt;&#xD;&#xA;    &lt;coding&gt;&#xD;&#xA;        &lt;system value=&quot;http://snomed.info/sct&quot;/&gt;&#xD;&#xA;        &lt;code value=&quot;78421000&quot;/&gt;&#xD;&#xA;        &lt;display value=&quot;intramuscular route&quot;/&gt;&#xD;&#xA;    &lt;/coding&gt;&#xD;&#xA;&lt;/route&gt;&#xD;&#xA;```" />
      <comment value="Not all terminology uses fit this general pattern. In some cases, models should not use CodeableConcept and use Coding directly and provide their own structure for managing text, codings, translations and the relationship between elements and pre- and post-coordination." />
      <requirements value="A code specifying the route or physiological path of administration of a therapeutic agent into or onto a patient's body." />
      <min value="0" />
      <max value="1" />
      <base>
        <path value="Dosage.route" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <code value="CodeableConcept" />
      </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" />
      <isSummary value="true" />
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="RouteOfAdministration" />
        </extension>
        <strength value="example" />
        <description value="A coded concept describing the route or physiological path of administration of a therapeutic agent into or onto the body of a subject." />
        <valueSet value="http://hl7.org/fhir/ValueSet/route-codes" />
      </binding>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="v2" />
        <map value="CE/CNE/CWE" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="CD" />
      </mapping>
      <mapping>
        <identity value="orim" />
        <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" />
      </mapping>
      <mapping>
        <identity value="v2" />
        <map value="RXR-1" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value=".routeCode" />
      </mapping>
    </element>
    <element id="Dosage.method">
      <path value="Dosage.method" />
      <short value="Technique for administering medication" />
      <definition value="The [999000041000001103 ePrescribing method simple reference set (foundation metadata concept)](https://termbrowser.nhs.uk/?perspective=full&amp;conceptId1=999000041000001103&amp;edition=uk-edition) reference set collates the commonly used terms for `method` for use in the United Kingdom.&#xD;&#xA;&#xD;&#xA;Whilst a [FHIR value-set for method](http://hl7.org/fhir/valueset-administration-method-codes.html) does exist, together with two separate hierarchies within SNOMED-CT ([Dose form administration method](https://termbrowser.nhs.uk/?perspective=full&amp;conceptId1=736665006&amp;edition=uk-edition) and [Dosing instruction fragment](https://termbrowser.nhs.uk/?perspective=full&amp;conceptId1=422096002&amp;edition=uk-edition)), it is recommended to use the ePrescribing reference set in the first instance.&#xD;&#xA;&#xD;&#xA;```xml&#xD;&#xA;&lt;!-- Method --&gt;&#xD;&#xA;&lt;method&gt;&#xD;&#xA;    &lt;coding&gt;&#xD;&#xA;        &lt;system value=&quot;http://snomed.info/sct&quot;/&gt;&#xD;&#xA;        &lt;code value=&quot;129326001&quot;/&gt;&#xD;&#xA;        &lt;display value=&quot;Injection&quot;/&gt;&#xD;&#xA;    &lt;/coding&gt;&#xD;&#xA;&lt;/method&gt;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;### Use of synonyms&#xD;&#xA;&#xD;&#xA;In most instances it is anticipated that the UK Preferred term should be the term applied to SNOMED CT concepts However for some cases, for example the anatomically correct SNOMED-CT term may not be easily understood by the patient or clinician, the use of a synonym may be preferred. &#xD;&#xA;&#xD;&#xA;Guidance for using terms that are not preferred terms is available within the published document [Guidance on the use of CodeableConcept.](https://developer.nhs.uk/apis/gpconnect-1-2-0/pages/accessrecord_structured/guidance-on-the-population-of-codeableconcept.pdf)" />
      <comment value="Terminologies used often pre-coordinate this term with the route and or form of administration." />
      <requirements value="A coded value indicating the method by which the medication is introduced into or onto the body. Most commonly used for injections.  For examples, Slow Push; Deep IV." />
      <min value="0" />
      <max value="1" />
      <base>
        <path value="Dosage.method" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <code value="CodeableConcept" />
      </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" />
      <isSummary value="true" />
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="MedicationAdministrationMethod" />
        </extension>
        <strength value="example" />
        <description value="A coded concept describing the technique by which the medicine is administered." />
        <valueSet value="http://hl7.org/fhir/ValueSet/administration-method-codes" />
      </binding>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="v2" />
        <map value="CE/CNE/CWE" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="CD" />
      </mapping>
      <mapping>
        <identity value="orim" />
        <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" />
      </mapping>
      <mapping>
        <identity value="v2" />
        <map value="RXR-4" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value=".doseQuantity" />
      </mapping>
    </element>
    <element id="Dosage.doseAndRate">
      <path value="Dosage.doseAndRate" />
      <short value="Amount of medication administered" />
      <definition value="Dose and Rate elements within the Dosage structure have been combined within the R4 standard, but their underlying use and purpose is the same as per R4.&#xD;&#xA;&#xD;&#xA;A dose or rate of medication can be described via one of the following methods. In both instances when considering Units of Measure note that UCUM is preferred.&#xD;&#xA;&#xD;&#xA;### Sub-element: `Dosage.doseAndRate.doseQuantity`&#xD;&#xA;&#xD;&#xA;The amount of medication per dose, as a [simple coded quantity](http://hl7.org/fhir/datatypes.html#SimpleQuantity).&#xD;&#xA;&#xD;&#xA;```xml&#xD;&#xA;&lt;!-- Example A: 1 capsule --&gt;&#xD;&#xA;&lt;doseAndRate&gt;&#xD;&#xA;    &lt;doseQuantity&gt;&#xD;&#xA;        &lt;value value=&quot;1&quot;/&gt;&#xD;&#xA;        &lt;unit value=&quot;capsule&quot;/&gt;&#xD;&#xA;        &lt;system value=&quot;http://snomed.info/sct&quot;/&gt;&#xD;&#xA;        &lt;code value=&quot;732937005&quot;/&gt;&#xD;&#xA;    &lt;/doseQuantity&gt;&#xD;&#xA;&lt;/doseAndRate&gt;&#xD;&#xA;&#xD;&#xA;&lt;!-- Example B: 30 milligrams --&gt;&#xD;&#xA;&lt;doseAndRate&gt;&#xD;&#xA;    &lt;doseQuantity&gt;&#xD;&#xA;        &lt;value value=&quot;30&quot;/&gt;&#xD;&#xA;        &lt;unit value=&quot;milligram&quot;/&gt;&#xD;&#xA;        &lt;system value=&quot;http://unitsofmeasure.org&quot;/&gt;&#xD;&#xA;        &lt;code value=&quot;mg&quot;/&gt;&#xD;&#xA;    &lt;/doseQuantity&gt;&#xD;&#xA;&lt;/doseAndRate&gt;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;### Sub-element: `Dosage.doseAndRate.doseRange`&#xD;&#xA;&#xD;&#xA;A dose that may be in a given low / high range.&#xD;&#xA;&#xD;&#xA;```xml&#xD;&#xA;&lt;!-- for a dose between 7.5 to 30 milligram --&gt;&#xD;&#xA;&lt;doseAndRate&gt;&#xD;&#xA;    &lt;doseRange&gt;&#xD;&#xA;        &lt;low&gt;&#xD;&#xA;            &lt;value value=&quot;7.5&quot;/&gt;&#xD;&#xA;            &lt;unit value=&quot;milligram&quot;/&gt;&#xD;&#xA;            &lt;code value=&quot;mg&quot;/&gt;&#xD;&#xA;            &lt;system value=&quot;http://unitsofmeasure.org&quot;/&gt;&#xD;&#xA;        &lt;/low&gt;&#xD;&#xA;        &lt;high&gt;&#xD;&#xA;            &lt;value value=&quot;30&quot;/&gt;&#xD;&#xA;            &lt;unit value=&quot;milligram&quot;/&gt;&#xD;&#xA;            &lt;code value=&quot;mg&quot;/&gt;&#xD;&#xA;            &lt;system value=&quot;http://unitsofmeasure.org&quot;/&gt;&#xD;&#xA;        &lt;/high&gt;&#xD;&#xA;    &lt;/doseRange&gt;&#xD;&#xA;&lt;/doseAndRate&gt;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;A rate-based quantity, such as _30 ml per hour_, can be expressed as a `rateRatio` with coded numerator and denominator values.&#xD;&#xA;&#xD;&#xA;Where the unit of measure for the ratio is defined within UCUM (see [Common UCUM Units](https://www.hl7.org/fhir/valueset-UCUM-common.xml)), for example, “milliliter per hour”, it can also be expressed using the simpler `rateQuantity` structure.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;### Sub-element: `Dosage.doseAndRate.rateRatio`&#xD;&#xA;&#xD;&#xA;Where the rate is expressed as coded numerator and denominator values.&#xD;&#xA;&#xD;&#xA;**at a rate of 30ml/hour using rateRatio**&#xD;&#xA;&#xD;&#xA;```xml&#xD;&#xA;&lt;doseAndRate&gt;&#xD;&#xA; &lt;rateRatio&gt;&#xD;&#xA;  &lt;numerator&gt;&#xD;&#xA;   &lt;value value=&quot;30&quot;/&gt;&#xD;&#xA;   &lt;unit value=&quot;millilitre&quot;/&gt;&#xD;&#xA;   &lt;system value=&quot;http://unitsofmeasure.org&quot;/&gt;&#xD;&#xA;   &lt;code value=&quot;mL&quot;/&gt;&#xD;&#xA;  &lt;/numerator&gt;&#xD;&#xA;  &lt;denominator&gt;&#xD;&#xA;   &lt;value value=&quot;1&quot;/&gt;&#xD;&#xA;   &lt;unit value=&quot;hour&quot;/&gt;&#xD;&#xA;   &lt;system value=&quot;http://unitsofmeasure.org&quot;/&gt;&#xD;&#xA;   &lt;code value=&quot;h&quot;/&gt;&#xD;&#xA;  &lt;/denominator&gt;&#xD;&#xA; &lt;/rateRatio&gt;&#xD;&#xA;&lt;/doseAndRate&gt;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;### Sub-element: `Dosage.doseAndRate.rateQuantity`&#xD;&#xA;Where the unit of measure applicable to a rate is defined within UCUM which is mathematically equivalent to defining the rate using the more complex `rateRatio` structure.&#xD;&#xA;&#xD;&#xA;**at a rate of 30ml/hour using rateQuantity**&#xD;&#xA;&#xD;&#xA;```xml&#xD;&#xA;&lt;rateQuantity&gt;&#xD;&#xA; &lt;value value=&quot;30&quot;/&gt;&#xD;&#xA; &lt;unit value=&quot;milliliters per hour&quot;/&gt;&#xD;&#xA; &lt;system value=&quot;http://unitsofmeasure.org&quot;/&gt;&#xD;&#xA; &lt;code value=&quot;mL/h&quot;/&gt;&#xD;&#xA;&lt;/rateQuantity&gt;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**at a rate of 1mcg/kg/hour using rateQuantity**&#xD;&#xA;&#xD;&#xA;```xml&#xD;&#xA;&lt;doseAndRate&gt;&#xD;&#xA; &lt;rateQuantity&gt;&#xD;&#xA;  &lt;value value=&quot;1&quot;/&gt;&#xD;&#xA;  &lt;unit value=&quot;microgram per kilogram per hour&quot;/&gt;&#xD;&#xA;  &lt;system value=&quot;http://unitsofmeasure.org&quot;/&gt;&#xD;&#xA;  &lt;code value=&quot;ug/kg/h&quot;/&gt;&#xD;&#xA; &lt;/rateQuantity&gt;&#xD;&#xA;&lt;/doseAndRate&gt;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;### Sub-element: `Dosage.doseAndRate.rateRange`&#xD;&#xA;&#xD;&#xA;Where the unit of measure applicable to a rate range is defined within UCUM the `rateRange` structure can be used.&#xD;&#xA;&#xD;&#xA;**give at 1-2 litres per minute using rateRange**&#xD;&#xA;```xml&#xD;&#xA;&lt;doseAndRate&gt;&#xD;&#xA; &lt;rateRange&gt;&#xD;&#xA;  &lt;low&gt;&#xD;&#xA;   &lt;value value=&quot;1&quot;/&gt;&#xD;&#xA;   &lt;unit value=&quot;liter per minute&quot;/&gt;&#xD;&#xA;   &lt;system value=&quot;http://unitsofmeasure.org&quot;/&gt;&#xD;&#xA;   &lt;code value=&quot;L/min&quot;/&gt;&#xD;&#xA;  &lt;/low&gt;&#xD;&#xA;  &lt;high&gt;&#xD;&#xA;   &lt;value value=&quot;2&quot;/&gt;&#xD;&#xA;   &lt;unit value=&quot;liter per minute&quot;/&gt;&#xD;&#xA;   &lt;system value=&quot;http://unitsofmeasure.org&quot;/&gt;&#xD;&#xA;   &lt;code value=&quot;L/min&quot;/&gt;&#xD;&#xA;  &lt;/high&gt;&#xD;&#xA; &lt;/rateRange&gt;&#xD;&#xA;&lt;/doseAndRate&gt;&#xD;&#xA;```" />
      <min value="0" />
      <max value="*" />
      <base>
        <path value="Dosage.doseAndRate" />
        <min value="0" />
        <max value="*" />
      </base>
      <type>
        <code value="Element" />
      </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>
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="v2" />
        <map value="TQ1-2" />
      </mapping>
    </element>
    <element id="Dosage.doseAndRate.id">
      <path value="Dosage.doseAndRate.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>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
    </element>
    <element id="Dosage.doseAndRate.extension">
      <path value="Dosage.doseAndRate.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>
      <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>
      <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(.), 'value')])" />
        <source value="http://hl7.org/fhir/StructureDefinition/Extension" />
      </constraint>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="N/A" />
      </mapping>
    </element>
    <element id="Dosage.doseAndRate.type">
      <path value="Dosage.doseAndRate.type" />
      <short value="The kind of dose or rate specified" />
      <definition value="The kind of dose or rate specified, for example, ordered or calculated." />
      <comment value="Not all terminology uses fit this general pattern. In some cases, models should not use CodeableConcept and use Coding directly and provide their own structure for managing text, codings, translations and the relationship between elements and pre- and post-coordination." />
      <requirements value="If the type is not populated, assume to be &quot;ordered&quot;." />
      <min value="0" />
      <max value="1" />
      <base>
        <path value="Dosage.doseAndRate.type" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <code value="CodeableConcept" />
      </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>
      <isSummary value="true" />
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="DoseAndRateType" />
        </extension>
        <strength value="example" />
        <description value="The kind of dose or rate specified." />
        <valueSet value="http://hl7.org/fhir/ValueSet/dose-rate-type" />
      </binding>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="v2" />
        <map value="CE/CNE/CWE" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="CD" />
      </mapping>
      <mapping>
        <identity value="orim" />
        <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" />
      </mapping>
      <mapping>
        <identity value="v2" />
        <map value="RXO-21; RXE-23" />
      </mapping>
    </element>
    <element id="Dosage.doseAndRate.dose[x]">
      <path value="Dosage.doseAndRate.dose[x]" />
      <short value="Amount of medication per dose" />
      <definition value="Amount of medication per dose." />
      <comment value="Note that this specifies the quantity of the specified medication, not the quantity for each active ingredient(s). Each ingredient amount can be communicated in the Medication resource. For example, if one wants to communicate that a tablet was 375 mg, where the dose was one tablet, you can use the Medication resource to document that the tablet was comprised of 375 mg of drug XYZ. Alternatively if the dose was 375 mg, then you may only need to use the Medication resource to indicate this was a tablet. If the example were an IV such as dopamine and you wanted to communicate that 400mg of dopamine was mixed in 500 ml of some IV solution, then this would all be communicated in the Medication resource. If the administration is not intended to be instantaneous (rate is present or timing has a duration), this can be specified to convey the total amount to be administered over the period of time as indicated by the schedule e.g. 500 ml in dose, with timing used to convey that this should be done over 4 hours." />
      <requirements value="The amount of therapeutic or other substance given at one administration event." />
      <min value="0" />
      <max value="1" />
      <base>
        <path value="Dosage.doseAndRate.dose[x]" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <code value="Range" />
        <profile value="https://fhir.nhs.uk.uk/StructureDefinition/NHSDigital-Range" />
      </type>
      <type>
        <code value="Quantity" />
        <profile value="http://hl7.org/fhir/StructureDefinition/SimpleQuantity" />
      </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>
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="v2" />
        <map value="RXO-2, RXE-3" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value=".doseQuantity" />
      </mapping>
    </element>
    <element id="Dosage.doseAndRate.rate[x]">
      <path value="Dosage.doseAndRate.rate[x]" />
      <short value="Amount of medication per unit of time" />
      <definition value="Amount of medication per unit of time." />
      <comment value="It is possible to supply both a rate and a doseQuantity to provide full details about how the medication is to be administered and supplied. If the rate is intended to change over time, depending on local rules/regulations, each change should be captured as a new version of the MedicationRequest with an updated rate, or captured with a new MedicationRequest with the new rate.&#xD;&#xD;It is possible to specify a rate over time (for example, 100 ml/hour) using either the rateRatio and rateQuantity.  The rateQuantity approach requires systems to have the capability to parse UCUM grammer where ml/hour is included rather than a specific ratio where the time is specified as the denominator.  Where a rate such as 500ml over 2 hours is specified, the use of rateRatio may be more semantically correct than specifying using a rateQuantity of 250 mg/hour." />
      <requirements value="Identifies the speed with which the medication was or will be introduced into the patient. Typically the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr.  May also be expressed as a rate per unit of time e.g. 500 ml per 2 hours.   Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.  Sometimes, a rate can imply duration when expressed as total volume / duration (e.g.  500mL/2 hours implies a duration of 2 hours).  However, when rate doesn't imply duration (e.g. 250mL/hour), then the timing.repeat.duration is needed to convey the infuse over time period." />
      <min value="0" />
      <max value="1" />
      <base>
        <path value="Dosage.doseAndRate.rate[x]" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <code value="Ratio" />
      </type>
      <type>
        <code value="Range" />
      </type>
      <type>
        <code value="Quantity" />
        <profile value="http://hl7.org/fhir/StructureDefinition/SimpleQuantity" />
      </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>
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="v2" />
        <map value="RXE22, RXE23, RXE-24" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value=".rateQuantity" />
      </mapping>
    </element>
    <element id="Dosage.maxDosePerPeriod">
      <path value="Dosage.maxDosePerPeriod" />
      <short value="Upper limit on medication per unit of time" />
      <definition value="&lt;div class=&quot;nhsd-a-box nhsd-a-box--bg-light-blue nhsd-!t-margin-bottom-6 nhsd-t-body&quot;&gt;&#xD;&#xA;    Used to define a maxiumum dose over a given time period.&#xD;&#xA;&lt;/div&gt;&#xD;&#xA;&#xD;&#xA;An example would be a Sumatriptan 6mg injection which can be repeated after an hour but not again over a 24 hour period. The `maxDosePerPeriod` is defined as 12mg/24hours.&#xD;&#xA;&#xD;&#xA;The `maxDosePerPeriod` is defined for each dosage instruction. For a multi-sequence instruction it would therefore be possible to define different maximum dosing periods within different sequences of the complete instruction.&#xD;&#xA;&#xD;&#xA;&lt;div class=&quot;nhsd-a-box nhsd-a-box--bg-light-yellow nhsd-!t-margin-bottom-6 nhsd-t-body&quot;&gt;&#xD;&#xA;    A real-world example of where this would be required has not yet been identified.&#xD;&#xA;&lt;/div&gt;&#xD;&#xA;&#xD;&#xA;**Maximum dose per period of 12mg/24 hour**&#xD;&#xA;&#xD;&#xA;```xml&#xD;&#xA;&lt;maxDosePerPeriod&gt;&#xD;&#xA;    &lt;numerator&gt;&#xD;&#xA;        &lt;value value=&quot;12&quot;/&gt;&#xD;&#xA;        &lt;unit value=&quot;milligram&quot;/&gt;&#xD;&#xA;        &lt;system value=&quot;http://unitsofmeasure.org&quot;/&gt;&#xD;&#xA;        &lt;code value=&quot;mg&quot;/&gt;&#xD;&#xA;    &lt;/numerator&gt;&#xD;&#xA;    &lt;denominator&gt;&#xD;&#xA;        &lt;value value=&quot;24&quot;/&gt;&#xD;&#xA;        &lt;unit value=&quot;hour&quot;/&gt;&#xD;&#xA;        &lt;system value=&quot;http://unitsofmeasure.org&quot;/&gt;&#xD;&#xA;        &lt;code value=&quot;h&quot;/&gt;&#xD;&#xA;    &lt;/denominator&gt;&#xD;&#xA;&lt;/maxDosePerPeriod&gt;&#xD;&#xA;```" />
      <comment value="This is intended for use as an adjunct to the dosage when there is an upper cap.  For example &quot;2 tablets every 4 hours to a maximum of 8/day&quot;." />
      <requirements value="The maximum total quantity of a therapeutic substance that may be administered to a subject over the period of time.  For example, 1000mg in 24 hours." />
      <min value="0" />
      <max value="1" />
      <base>
        <path value="Dosage.maxDosePerPeriod" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <code value="Ratio" />
      </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>
      <constraint>
        <key value="rat-1" />
        <severity value="error" />
        <human value="Numerator and denominator SHALL both be present, or both are absent. If both are absent, there SHALL be some extension present" />
        <expression value="(numerator.empty() xor denominator.exists()) and (numerator.exists() or extension.exists())" />
        <xpath value="(count(f:numerator) = count(f:denominator)) and ((count(f:numerator) &gt; 0) or (count(f:extension) &gt; 0))" />
        <source value="http://hl7.org/fhir/StructureDefinition/Ratio" />
      </constraint>
      <mustSupport value="true" />
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="v2" />
        <map value="N/A" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="RTO" />
      </mapping>
      <mapping>
        <identity value="v2" />
        <map value="RXO-23, RXE-19" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value=".maxDoseQuantity" />
      </mapping>
    </element>
    <element id="Dosage.maxDosePerAdministration">
      <path value="Dosage.maxDosePerAdministration" />
      <short value="Upper limit on medication per administration" />
      <definition value="&lt;div class=&quot;nhsd-a-box nhsd-a-box--bg-light-blue nhsd-!t-margin-bottom-6 nhsd-t-body&quot;&gt;&#xD;&#xA;    Used to define a maximum dose for a single administration.&#xD;&#xA;&lt;/div&gt;&#xD;&#xA;&#xD;&#xA;An example would be Anagrelide for which a single dose should not exceed 2.5 mg. The `maxDosePerAdministration` is defined as 2.5mg.&#xD;&#xA;&#xD;&#xA;In many scenarios it is expected that the `dosage.doseRange` would be used instead of `maxDosePerAdministration`.&#xD;&#xA;&#xD;&#xA;The `maxDosePerAdministration` is defined for each dosage instruction. For a multi-sequence instruction it would therefore be possible to define different maximum dose administrations within different sequences of the complete instruction. &#xD;&#xA;&#xD;&#xA;&lt;div class=&quot;nhsd-a-box nhsd-a-box--bg-light-yellow nhsd-!t-margin-bottom-6 nhsd-t-body&quot;&gt;&#xD;&#xA;    A real-world example of where this would be required has not yet been identified.&#xD;&#xA;&lt;/div&gt;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Maximum dose per administration of 2.5mg**&#xD;&#xA;&#xD;&#xA;```xml&#xD;&#xA;&lt;maxDosePerAdministration&gt;&#xD;&#xA;    &lt;value value=&quot;2.5&quot;/&gt;&#xD;&#xA;    &lt;unit value=&quot;milligram&quot;/&gt;&#xD;&#xA;    &lt;system value=&quot;http://unitsofmeasure.org&quot;/&gt;&#xD;&#xA;    &lt;code value=&quot;mg&quot;/&gt;&#xD;&#xA;&lt;/maxDosePerAdministration&gt;&#xD;&#xA;```" />
      <comment value="This is intended for use as an adjunct to the dosage when there is an upper cap.  For example, a body surface area related dose with a maximum amount, such as 1.5 mg/m2 (maximum 2 mg) IV over 5 – 10 minutes would have doseQuantity of 1.5 mg/m2 and maxDosePerAdministration of 2 mg." />
      <requirements value="The maximum total quantity of a therapeutic substance that may be administered to a subject per administration." />
      <min value="0" />
      <max value="1" />
      <base>
        <path value="Dosage.maxDosePerAdministration" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <code value="Quantity" />
        <profile value="http://hl7.org/fhir/StructureDefinition/SimpleQuantity" />
      </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>
      <constraint>
        <key value="qty-3" />
        <severity value="error" />
        <human value="If a code for the unit is present, the system SHALL also be present" />
        <expression value="code.empty() or system.exists()" />
        <xpath value="not(exists(f:code)) or exists(f:system)" />
        <source value="http://hl7.org/fhir/StructureDefinition/Quantity" />
      </constraint>
      <constraint>
        <key value="sqty-1" />
        <severity value="error" />
        <human value="The comparator is not used on a SimpleQuantity" />
        <expression value="comparator.empty()" />
        <xpath value="not(exists(f:comparator))" />
        <source value="http://hl7.org/fhir/StructureDefinition/SimpleQuantity" />
      </constraint>
      <isModifier value="false" />
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="v2" />
        <map value="SN (see also Range) or CQ" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="PQ, IVL&lt;PQ&gt;, MO, CO, depending on the values" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="not supported" />
      </mapping>
    </element>
    <element id="Dosage.maxDosePerLifetime">
      <path value="Dosage.maxDosePerLifetime" />
      <short value="Upper limit on medication per lifetime of the patient" />
      <definition value="&lt;div class=&quot;callout-box--info&quot;&gt;&#xD;&#xA;    Used to define the maximum cumulative dose over the lifetime of a patient.&#xD;&#xA;&lt;/div&gt;&#xD;&#xA;&#xD;&#xA;An example would be Daunorubicin which may have a maximum cumulative dose of 600mg/m2 (based on the size of the patient). The `maxDosePerLifetime` is defined as 600 mg/m2.&#xD;&#xA;&#xD;&#xA;The `maxDosePerLifetime` can be defined for each dosage instruction; which, for a multi-sequence instruction is illogical, as any `maxDosePerLifetime` is equally applicable to all dosage sequence that relate to the single medication coded concept.&#xD;&#xA;&#xD;&#xA;&lt;div class=&quot;nhsd-a-box nhsd-a-box--bg-light-yellow nhsd-!t-margin-bottom-6 nhsd-t-body&quot;&gt;&#xD;&#xA;    &lt;strong&gt;Note:&lt;/strong&gt; If a &lt;code&gt;maxDosePerLifetime&lt;/code&gt; statement is required with a multi-sequence instruction, it is recommended to define it within the last / final sequence to ensure that the information is presented at the end of a the complete instruction, rather than th middle which could be overlooked.&#xD;&#xA;&lt;/div&gt;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Maximum dose over lifetime of the patient of 600 mg/m2**&#xD;&#xA;&#xD;&#xA;```xml&#xD;&#xA;&lt;maxDosePerLifetime&gt;&#xD;&#xA;    &lt;value value=&quot;600&quot;/&gt;&#xD;&#xA;    &lt;unit value=&quot;milligram per square metre&quot;/&gt;&#xD;&#xA;    &lt;system value=&quot;http://unitsofmeasure.org&quot;/&gt;&#xD;&#xA;    &lt;code value=&quot;mg/m2&quot;/&gt;&#xD;&#xA;&lt;/maxDosePerLifetime&gt;&#xD;&#xA;```" />
      <comment value="The context of use may frequently define what kind of quantity this is and therefore what kind of units can be used. The context of use may also restrict the values for the comparator." />
      <requirements value="The maximum total quantity of a therapeutic substance that may be administered per lifetime of the subject." />
      <min value="0" />
      <max value="1" />
      <base>
        <path value="Dosage.maxDosePerLifetime" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <code value="Quantity" />
        <profile value="http://hl7.org/fhir/StructureDefinition/SimpleQuantity" />
      </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>
      <constraint>
        <key value="qty-3" />
        <severity value="error" />
        <human value="If a code for the unit is present, the system SHALL also be present" />
        <expression value="code.empty() or system.exists()" />
        <xpath value="not(exists(f:code)) or exists(f:system)" />
        <source value="http://hl7.org/fhir/StructureDefinition/Quantity" />
      </constraint>
      <constraint>
        <key value="sqty-1" />
        <severity value="error" />
        <human value="The comparator is not used on a SimpleQuantity" />
        <expression value="comparator.empty()" />
        <xpath value="not(exists(f:comparator))" />
        <source value="http://hl7.org/fhir/StructureDefinition/SimpleQuantity" />
      </constraint>
      <isModifier value="false" />
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="v2" />
        <map value="SN (see also Range) or CQ" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="PQ, IVL&lt;PQ&gt;, MO, CO, depending on the values" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="not supported" />
      </mapping>
    </element>
  </snapshot>
  <differential>
    <element id="Dosage.sequence">
      <path value="Dosage.sequence" />
      <short value="Multi-sequence dosage instructions." />
      <definition value="A multi-sequence would be required where a dosage instruction changes over a given time schedule, where a dosage instruction includes optional follow-up doses or where a concurrent dosage instruction is required for the same medication at a different dose.&#xD;&#xA;&#xD;&#xA;Examples below include Prednisolone to treat Bell’s palsy where a dose starts at 60 mg per day for a period of time then reduces by 10 mg per day. This would be described as a sequential dosage instruction. A concurrent dosage example is provided to describe a different dose in the morning to that at midday.&#xD;&#xA;&#xD;&#xA;#### Sequential Instructions&#xD;&#xA;&#xD;&#xA;Where the value of sequence is an incremental integer it defines a sequential instruction.&#xD;&#xA;&#xD;&#xA;#### Concurrent Instructions&#xD;&#xA;&#xD;&#xA;Where the same integer value of sequence is defines it means a concurrent instruction." />
      <mustSupport value="true" />
    </element>
    <element id="Dosage.text">
      <path value="Dosage.text" />
      <short value="The complete dosage instruction as a human readable string." />
      <definition value="The complete dosage instruction as a human readable string.&#xD;&#xA;&#xD;&#xA;&lt;div class=&quot;nhsd-a-box nhsd-a-box--bg-light-blue nhsd-!t-margin-bottom-6 nhsd-t-body&quot;&gt;&#xD;&#xA;    &lt;strong&gt;Recommendation&lt;/strong&gt;: Use the &lt;a href='DosetoTextTranslation'&gt;translation algorithm&lt;/a&gt; published within this guide to create a string from the coded Dosage elements. It is planned for this translation algorithm to be available as an API.&#xD;&#xA;&lt;/div&gt;&#xD;&#xA;&#xD;&#xA;For example;&#xD;&#xA;&#xD;&#xA;```xml&#xD;&#xA;&lt;text value=&quot;1 tablet - every 6 hours - oral&quot; /&gt;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Where additional dosage instructions need to be conveyed that cannot be described using any other element of the Dosage structure, then append these to the end of the translated dosage text.&#xD;&#xA;&#xD;&#xA;For example, the instruction to `“infuse as rapidly as possibly via intraperitoneal port”` is not a coded term so cannot be shared as a `additionalInstruction`. It would neither be appropriate as a `patientInstruction` string.&#xD;&#xA;&#xD;&#xA;For example;&#xD;&#xA;&#xD;&#xA;```xml&#xD;&#xA;&lt;text value=&quot;{the dosage elements translated as text} - infuse as rapidly as possibly via intraperitoneal port&quot; /&gt;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;For example, the instruction `“immediately following drug {X}”)`, where {X} is the name of a drug, is neither suitable as a `additionalInstruction` nor `patientInstruction`.&#xD;&#xA;&#xD;&#xA;For example;&#xD;&#xA;&#xD;&#xA;```xml&#xD;&#xA;&lt;text value=&quot;500 milligrams - once - oral - immediately following drug {X}&quot; /&gt;&#xD;&#xA;```" />
      <mustSupport value="true" />
    </element>
    <element id="Dosage.additionalInstruction">
      <path value="Dosage.additionalInstruction" />
      <short value="Additional dosage instructions that can be either SNOMED-CT coded terms or free-text instructions." />
      <definition value="Where suitable SNOMED-CT coded terms exist, use them instead of free-text instructions. See the SNOMED-CT hierarchy descendants of [419492006 Additional dosage instructions (qualifier value)](https://termbrowser.nhs.uk/?perspective=full&amp;conceptId1=419492006&amp;edition=uk-edition). These terms are also available from the example [FHIR valueset binding](http://hl7.org/fhir/stu3/valueset-additional-instruction-codes.html).&#xD;&#xA;&#xD;&#xA;&lt;div class=&quot;nhsd-a-box nhsd-a-box--bg-light-yellow nhsd-!t-margin-bottom-6 nhsd-t-body&quot;&gt;&#xD;&#xA;    &lt;strong&gt;Important:&lt;/strong&gt; Where no code exists, &lt;code&gt;additionalInstructions&lt;/code&gt; can be conveyed as free-text; however, if free-text is used rather than a SNOMED-CT coded term, the `MedicationRequest` cannot be computable, and requires human intervention in the case of conditional or contradictory instructions.&#xD;&#xA;&lt;/div&gt;&#xD;&#xA;&#xD;&#xA;**Coded instruction**&#xD;&#xA;```xml&#xD;&#xA;&lt;additionalInstruction&gt;&#xD;&#xA;    &lt;coding&gt; &#xD;&#xA;        &lt;system value=&quot;http://snomed.info/sct&quot;/&gt; &#xD;&#xA;        &lt;code value=&quot;419529008&quot;/&gt; &#xD;&#xA;        &lt;display value=&quot;Dissolved under the tongue &quot;/&gt; &#xD;&#xA;    &lt;/coding&gt;&#xD;&#xA;&lt;/additionalInstruction&gt;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**Multiple coded instructions**&#xD;&#xA;&#xD;&#xA;```xml&#xD;&#xA;&lt;additionalInstruction&gt;&#xD;&#xA;    &lt;coding&gt; &#xD;&#xA;        &lt;system value=&quot;http://snomed.info/sct&quot;/&gt; &#xD;&#xA;        &lt;code value=&quot;417995008&quot;/&gt; &#xD;&#xA;        &lt;display value=&quot;Dissolve or mix with water before taking&quot;/&gt; &#xD;&#xA;    &lt;/coding&gt;&#xD;&#xA;&lt;/additionalInstruction&gt;&#xD;&#xA;&lt;additionalInstruction&gt;&#xD;&#xA;    &lt;coding&gt; &#xD;&#xA;        &lt;system value=&quot;http://snomed.info/sct&quot;/&gt; &#xD;&#xA;        &lt;code value=&quot;417980006&quot;/&gt; &#xD;&#xA;        &lt;display value=&quot;Contains aspirin&quot;/&gt; &#xD;&#xA;    &lt;/coding&gt;&#xD;&#xA;&lt;/additionalInstruction&gt;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**Free-text instruction (try to avoid using free-text where possible)**&#xD;&#xA;&#xD;&#xA;```xml&#xD;&#xA;&lt;additionalInstruction&gt;&#xD;&#xA;    &lt;text value=&quot;with dialysis&quot;/&gt;&#xD;&#xA;&lt;/additionalInstruction&gt;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;### `additionalInstruction` / `when` overlap&#xD;&#xA;&#xD;&#xA;&lt;div class=&quot;nhsd-a-box nhsd-a-box--bg-light-blue nhsd-!t-margin-bottom-6 nhsd-t-body&quot;&gt;&#xD;&#xA;    &lt;strong&gt;Note:&lt;/strong&gt; The value-sets for &lt;code&gt;Timing.when&lt;/code&gt; and &lt;code&gt;Dosage.additionalInstruction&lt;/code&gt; do contain some overlapping values.&#xD;&#xA;&lt;/div&gt;&#xD;&#xA;&#xD;&#xA;For example, they can both describe “with or after food”. &#xD;&#xA;&#xD;&#xA;In such cases, use `Timing.when` instead of a coded `Dosage.additionalInstruction`.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;### continue / stop instructions&#xD;&#xA;&#xD;&#xA;There may be the need for a clinician to give explicit instructions to either stop or continue taking medication. This could be applicable for discharge medication where one medicine may be for short term pain relief and should be stopped after the prescribed quantity has been taken, while another medicine must be continued until further notice. &#xD;&#xA;&#xD;&#xA;The patient’s GP would be informed of this as part of the discharge letter but having these instructions explicitly coded provides a more robust solution.&#xD;&#xA;&#xD;&#xA;Three SNOMED-CT codes exist that can be used for this purpose.&#xD;&#xA;&#xD;&#xA;- “Then stop” (SNOMED concept identifier = [422327006](https://termbrowser.nhs.uk/?perspective=full&amp;conceptId1=422327006&amp;edition=uk-edition))&#xD;&#xA;- “Then discontinue” (SNOMED concept identifier = [421484000](https://termbrowser.nhs.uk/?perspective=full&amp;conceptId1=421484000&amp;edition=uk-edition))&#xD;&#xA;- “Do not stop taking this medicine except on your doctor’s advice” (SNOMED concept identifier = [419444006](https://termbrowser.nhs.uk/?perspective=full&amp;conceptId1=419444006&amp;edition=uk-edition))&#xD;&#xA;&#xD;&#xA;&lt;div class=&quot;nhsd-a-box nhsd-a-box--bg-light-blue nhsd-!t-margin-bottom-6 nhsd-t-body&quot;&gt;&#xD;&#xA;    &lt;strong&gt;Note:&lt;/strong&gt; It is recognised that such coded terms are akin to timing instructions so may be more logically containing within the various &lt;code&gt;Dosage.timing&lt;/code&gt; structures. These do not currently support coded concept terms. Implementation experience will provide evidence to support any future change to the underlying FHIR specification.&#xD;&#xA;&lt;/div&gt;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;### as directed&#xD;&#xA;&#xD;&#xA;The use of a dosage instruction akin to “as directed” should be avoided wherever possible; however, if required then this can be SNOMED coded using [421769005 Follow directions (qualifier value)](https://termbrowser.nhs.uk/?perspective=full&amp;conceptId1=421769005&amp;edition=uk-edition) or conveyed as text as a patient instruction.&#xD;&#xA;&#xD;&#xA;---" />
      <mustSupport value="true" />
    </element>
    <element id="Dosage.patientInstruction">
      <path value="Dosage.patientInstruction" />
      <definition value="Free-text instructions for the patient. Patient instructions can only be defined as one text string per dosage instruction. &#xD;&#xA;&#xD;&#xA;&lt;div class=&quot;nhsd-a-box nhsd-a-box--bg-light-blue nhsd-!t-margin-bottom-6 nhsd-t-body&quot;&gt;&#xD;&#xA;    &lt;strong&gt;Note:&lt;/strong&gt;&#xD;&#xA;This field is not intended to provide instructions for a medication dispensing label.&#xD;&#xA;&lt;/div&gt;&#xD;&#xA;&#xD;&#xA;```xml&#xD;&#xA;&lt;patientInstruction value=&quot;Some relevant instructions for the patient&quot;/&gt;&#xD;&#xA;```" />
      <mustSupport value="true" />
    </element>
    <element id="Dosage.timing">
      <path value="Dosage.timing" />
      <definition value="Adding constraints, bounds or limits to a dosage instruction." />
      <mustSupport value="true" />
    </element>
    <element id="Dosage.timing.repeat.bounds[x]">
      <path value="Dosage.timing.repeat.bounds[x]" />
      <type>
        <code value="Duration" />
      </type>
      <type>
        <code value="Range" />
        <profile value="https://fhir.nhs.uk.uk/StructureDefinition/NHSDigital-Range" />
      </type>
      <type>
        <code value="Period" />
      </type>
    </element>
    <element id="Dosage.asNeeded[x]">
      <path value="Dosage.asNeeded[x]" />
      <definition value="The `asNeeded` structure can be used to define a simple “as required” (or “pro re nata” expressed as “PRN” for those who still prefer to use Latin abbreviations) instructions. &#xD;&#xA;&#xD;&#xA;In this case use the `asNeededBoolean` option. The absence of `asNeededBoolean` is equivalent to where `asNeededBoolean` has a value of `false`.&#xD;&#xA;&#xD;&#xA;The `asNeededCodeableConcept` option is used to bound the dosage instruction to a coded term. Any number of coded terms can be used from the SNOMED-CT hierarchy as a descendant of [404684003 Clinical Finding (finding)](https://termbrowser.nhs.uk/?perspective=full&amp;conceptId1=404684003&amp;edition=uk-edition). An extensive medication-as-needed-reason value-set is defined within FHIR which is a subset of the SNOMED-CT clinical findings hierarchy." />
      <mustSupport value="true" />
    </element>
    <element id="Dosage.site">
      <path value="Dosage.site" />
      <definition value="Any `site` can be used from the SNOMED-CT hierarchy as a descendant of the concept [123037004 Body structure (body structure)](https://termbrowser.nhs.uk/?perspective=full&amp;conceptId1=123037004&amp;edition=uk-edition).&#xD;&#xA;&#xD;&#xA;```xml&#xD;&#xA;&lt;!-- Site --&gt;&#xD;&#xA;&lt;site&gt;&#xD;&#xA;    &lt;coding&gt;&#xD;&#xA;        &lt;system value=&quot;http://snomed.info/sct&quot;/&gt;&#xD;&#xA;        &lt;code value=&quot;59380008&quot;/&gt;&#xD;&#xA;        &lt;display value=&quot;Anterior abdominal wall structure&quot;/&gt;&#xD;&#xA;    &lt;/coding&gt;&#xD;&#xA;&lt;/site&gt;&#xD;&#xA;```" />
      <mustSupport value="true" />
    </element>
    <element id="Dosage.route">
      <path value="Dosage.route" />
      <definition value="Any `route` can be used from the SNOMED-CT hierarchy as a descendant of the concept [284009009 Route of administration value (qualifier value)](https://termbrowser.nhs.uk/?perspective=full&amp;conceptId1=284009009&amp;edition=uk-edition).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```xml&#xD;&#xA;&lt;!-- Route --&gt;&#xD;&#xA;&lt;route&gt;&#xD;&#xA;    &lt;coding&gt;&#xD;&#xA;        &lt;system value=&quot;http://snomed.info/sct&quot;/&gt;&#xD;&#xA;        &lt;code value=&quot;78421000&quot;/&gt;&#xD;&#xA;        &lt;display value=&quot;intramuscular route&quot;/&gt;&#xD;&#xA;    &lt;/coding&gt;&#xD;&#xA;&lt;/route&gt;&#xD;&#xA;```" />
      <mustSupport value="true" />
    </element>
    <element id="Dosage.method">
      <path value="Dosage.method" />
      <definition value="The [999000041000001103 ePrescribing method simple reference set (foundation metadata concept)](https://termbrowser.nhs.uk/?perspective=full&amp;conceptId1=999000041000001103&amp;edition=uk-edition) reference set collates the commonly used terms for `method` for use in the United Kingdom.&#xD;&#xA;&#xD;&#xA;Whilst a [FHIR value-set for method](http://hl7.org/fhir/valueset-administration-method-codes.html) does exist, together with two separate hierarchies within SNOMED-CT ([Dose form administration method](https://termbrowser.nhs.uk/?perspective=full&amp;conceptId1=736665006&amp;edition=uk-edition) and [Dosing instruction fragment](https://termbrowser.nhs.uk/?perspective=full&amp;conceptId1=422096002&amp;edition=uk-edition)), it is recommended to use the ePrescribing reference set in the first instance.&#xD;&#xA;&#xD;&#xA;```xml&#xD;&#xA;&lt;!-- Method --&gt;&#xD;&#xA;&lt;method&gt;&#xD;&#xA;    &lt;coding&gt;&#xD;&#xA;        &lt;system value=&quot;http://snomed.info/sct&quot;/&gt;&#xD;&#xA;        &lt;code value=&quot;129326001&quot;/&gt;&#xD;&#xA;        &lt;display value=&quot;Injection&quot;/&gt;&#xD;&#xA;    &lt;/coding&gt;&#xD;&#xA;&lt;/method&gt;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;### Use of synonyms&#xD;&#xA;&#xD;&#xA;In most instances it is anticipated that the UK Preferred term should be the term applied to SNOMED CT concepts However for some cases, for example the anatomically correct SNOMED-CT term may not be easily understood by the patient or clinician, the use of a synonym may be preferred. &#xD;&#xA;&#xD;&#xA;Guidance for using terms that are not preferred terms is available within the published document [Guidance on the use of CodeableConcept.](https://developer.nhs.uk/apis/gpconnect-1-2-0/pages/accessrecord_structured/guidance-on-the-population-of-codeableconcept.pdf)" />
      <mustSupport value="true" />
    </element>
    <element id="Dosage.doseAndRate">
      <path value="Dosage.doseAndRate" />
      <definition value="Dose and Rate elements within the Dosage structure have been combined within the R4 standard, but their underlying use and purpose is the same as per R4.&#xD;&#xA;&#xD;&#xA;A dose or rate of medication can be described via one of the following methods. In both instances when considering Units of Measure note that UCUM is preferred.&#xD;&#xA;&#xD;&#xA;### Sub-element: `Dosage.doseAndRate.doseQuantity`&#xD;&#xA;&#xD;&#xA;The amount of medication per dose, as a [simple coded quantity](http://hl7.org/fhir/datatypes.html#SimpleQuantity).&#xD;&#xA;&#xD;&#xA;```xml&#xD;&#xA;&lt;!-- Example A: 1 capsule --&gt;&#xD;&#xA;&lt;doseAndRate&gt;&#xD;&#xA;    &lt;doseQuantity&gt;&#xD;&#xA;        &lt;value value=&quot;1&quot;/&gt;&#xD;&#xA;        &lt;unit value=&quot;capsule&quot;/&gt;&#xD;&#xA;        &lt;system value=&quot;http://snomed.info/sct&quot;/&gt;&#xD;&#xA;        &lt;code value=&quot;732937005&quot;/&gt;&#xD;&#xA;    &lt;/doseQuantity&gt;&#xD;&#xA;&lt;/doseAndRate&gt;&#xD;&#xA;&#xD;&#xA;&lt;!-- Example B: 30 milligrams --&gt;&#xD;&#xA;&lt;doseAndRate&gt;&#xD;&#xA;    &lt;doseQuantity&gt;&#xD;&#xA;        &lt;value value=&quot;30&quot;/&gt;&#xD;&#xA;        &lt;unit value=&quot;milligram&quot;/&gt;&#xD;&#xA;        &lt;system value=&quot;http://unitsofmeasure.org&quot;/&gt;&#xD;&#xA;        &lt;code value=&quot;mg&quot;/&gt;&#xD;&#xA;    &lt;/doseQuantity&gt;&#xD;&#xA;&lt;/doseAndRate&gt;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;### Sub-element: `Dosage.doseAndRate.doseRange`&#xD;&#xA;&#xD;&#xA;A dose that may be in a given low / high range.&#xD;&#xA;&#xD;&#xA;```xml&#xD;&#xA;&lt;!-- for a dose between 7.5 to 30 milligram --&gt;&#xD;&#xA;&lt;doseAndRate&gt;&#xD;&#xA;    &lt;doseRange&gt;&#xD;&#xA;        &lt;low&gt;&#xD;&#xA;            &lt;value value=&quot;7.5&quot;/&gt;&#xD;&#xA;            &lt;unit value=&quot;milligram&quot;/&gt;&#xD;&#xA;            &lt;code value=&quot;mg&quot;/&gt;&#xD;&#xA;            &lt;system value=&quot;http://unitsofmeasure.org&quot;/&gt;&#xD;&#xA;        &lt;/low&gt;&#xD;&#xA;        &lt;high&gt;&#xD;&#xA;            &lt;value value=&quot;30&quot;/&gt;&#xD;&#xA;            &lt;unit value=&quot;milligram&quot;/&gt;&#xD;&#xA;            &lt;code value=&quot;mg&quot;/&gt;&#xD;&#xA;            &lt;system value=&quot;http://unitsofmeasure.org&quot;/&gt;&#xD;&#xA;        &lt;/high&gt;&#xD;&#xA;    &lt;/doseRange&gt;&#xD;&#xA;&lt;/doseAndRate&gt;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;A rate-based quantity, such as _30 ml per hour_, can be expressed as a `rateRatio` with coded numerator and denominator values.&#xD;&#xA;&#xD;&#xA;Where the unit of measure for the ratio is defined within UCUM (see [Common UCUM Units](https://www.hl7.org/fhir/valueset-UCUM-common.xml)), for example, “milliliter per hour”, it can also be expressed using the simpler `rateQuantity` structure.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;### Sub-element: `Dosage.doseAndRate.rateRatio`&#xD;&#xA;&#xD;&#xA;Where the rate is expressed as coded numerator and denominator values.&#xD;&#xA;&#xD;&#xA;**at a rate of 30ml/hour using rateRatio**&#xD;&#xA;&#xD;&#xA;```xml&#xD;&#xA;&lt;doseAndRate&gt;&#xD;&#xA; &lt;rateRatio&gt;&#xD;&#xA;  &lt;numerator&gt;&#xD;&#xA;   &lt;value value=&quot;30&quot;/&gt;&#xD;&#xA;   &lt;unit value=&quot;millilitre&quot;/&gt;&#xD;&#xA;   &lt;system value=&quot;http://unitsofmeasure.org&quot;/&gt;&#xD;&#xA;   &lt;code value=&quot;mL&quot;/&gt;&#xD;&#xA;  &lt;/numerator&gt;&#xD;&#xA;  &lt;denominator&gt;&#xD;&#xA;   &lt;value value=&quot;1&quot;/&gt;&#xD;&#xA;   &lt;unit value=&quot;hour&quot;/&gt;&#xD;&#xA;   &lt;system value=&quot;http://unitsofmeasure.org&quot;/&gt;&#xD;&#xA;   &lt;code value=&quot;h&quot;/&gt;&#xD;&#xA;  &lt;/denominator&gt;&#xD;&#xA; &lt;/rateRatio&gt;&#xD;&#xA;&lt;/doseAndRate&gt;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;### Sub-element: `Dosage.doseAndRate.rateQuantity`&#xD;&#xA;Where the unit of measure applicable to a rate is defined within UCUM which is mathematically equivalent to defining the rate using the more complex `rateRatio` structure.&#xD;&#xA;&#xD;&#xA;**at a rate of 30ml/hour using rateQuantity**&#xD;&#xA;&#xD;&#xA;```xml&#xD;&#xA;&lt;rateQuantity&gt;&#xD;&#xA; &lt;value value=&quot;30&quot;/&gt;&#xD;&#xA; &lt;unit value=&quot;milliliters per hour&quot;/&gt;&#xD;&#xA; &lt;system value=&quot;http://unitsofmeasure.org&quot;/&gt;&#xD;&#xA; &lt;code value=&quot;mL/h&quot;/&gt;&#xD;&#xA;&lt;/rateQuantity&gt;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**at a rate of 1mcg/kg/hour using rateQuantity**&#xD;&#xA;&#xD;&#xA;```xml&#xD;&#xA;&lt;doseAndRate&gt;&#xD;&#xA; &lt;rateQuantity&gt;&#xD;&#xA;  &lt;value value=&quot;1&quot;/&gt;&#xD;&#xA;  &lt;unit value=&quot;microgram per kilogram per hour&quot;/&gt;&#xD;&#xA;  &lt;system value=&quot;http://unitsofmeasure.org&quot;/&gt;&#xD;&#xA;  &lt;code value=&quot;ug/kg/h&quot;/&gt;&#xD;&#xA; &lt;/rateQuantity&gt;&#xD;&#xA;&lt;/doseAndRate&gt;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;### Sub-element: `Dosage.doseAndRate.rateRange`&#xD;&#xA;&#xD;&#xA;Where the unit of measure applicable to a rate range is defined within UCUM the `rateRange` structure can be used.&#xD;&#xA;&#xD;&#xA;**give at 1-2 litres per minute using rateRange**&#xD;&#xA;```xml&#xD;&#xA;&lt;doseAndRate&gt;&#xD;&#xA; &lt;rateRange&gt;&#xD;&#xA;  &lt;low&gt;&#xD;&#xA;   &lt;value value=&quot;1&quot;/&gt;&#xD;&#xA;   &lt;unit value=&quot;liter per minute&quot;/&gt;&#xD;&#xA;   &lt;system value=&quot;http://unitsofmeasure.org&quot;/&gt;&#xD;&#xA;   &lt;code value=&quot;L/min&quot;/&gt;&#xD;&#xA;  &lt;/low&gt;&#xD;&#xA;  &lt;high&gt;&#xD;&#xA;   &lt;value value=&quot;2&quot;/&gt;&#xD;&#xA;   &lt;unit value=&quot;liter per minute&quot;/&gt;&#xD;&#xA;   &lt;system value=&quot;http://unitsofmeasure.org&quot;/&gt;&#xD;&#xA;   &lt;code value=&quot;L/min&quot;/&gt;&#xD;&#xA;  &lt;/high&gt;&#xD;&#xA; &lt;/rateRange&gt;&#xD;&#xA;&lt;/doseAndRate&gt;&#xD;&#xA;```" />
    </element>
    <element id="Dosage.doseAndRate.dose[x]">
      <path value="Dosage.doseAndRate.dose[x]" />
      <type>
        <code value="Range" />
        <profile value="https://fhir.nhs.uk.uk/StructureDefinition/NHSDigital-Range" />
      </type>
      <type>
        <code value="Quantity" />
      </type>
    </element>
    <element id="Dosage.maxDosePerPeriod">
      <path value="Dosage.maxDosePerPeriod" />
      <definition value="&lt;div class=&quot;nhsd-a-box nhsd-a-box--bg-light-blue nhsd-!t-margin-bottom-6 nhsd-t-body&quot;&gt;&#xD;&#xA;    Used to define a maxiumum dose over a given time period.&#xD;&#xA;&lt;/div&gt;&#xD;&#xA;&#xD;&#xA;An example would be a Sumatriptan 6mg injection which can be repeated after an hour but not again over a 24 hour period. The `maxDosePerPeriod` is defined as 12mg/24hours.&#xD;&#xA;&#xD;&#xA;The `maxDosePerPeriod` is defined for each dosage instruction. For a multi-sequence instruction it would therefore be possible to define different maximum dosing periods within different sequences of the complete instruction.&#xD;&#xA;&#xD;&#xA;&lt;div class=&quot;nhsd-a-box nhsd-a-box--bg-light-yellow nhsd-!t-margin-bottom-6 nhsd-t-body&quot;&gt;&#xD;&#xA;    A real-world example of where this would be required has not yet been identified.&#xD;&#xA;&lt;/div&gt;&#xD;&#xA;&#xD;&#xA;**Maximum dose per period of 12mg/24 hour**&#xD;&#xA;&#xD;&#xA;```xml&#xD;&#xA;&lt;maxDosePerPeriod&gt;&#xD;&#xA;    &lt;numerator&gt;&#xD;&#xA;        &lt;value value=&quot;12&quot;/&gt;&#xD;&#xA;        &lt;unit value=&quot;milligram&quot;/&gt;&#xD;&#xA;        &lt;system value=&quot;http://unitsofmeasure.org&quot;/&gt;&#xD;&#xA;        &lt;code value=&quot;mg&quot;/&gt;&#xD;&#xA;    &lt;/numerator&gt;&#xD;&#xA;    &lt;denominator&gt;&#xD;&#xA;        &lt;value value=&quot;24&quot;/&gt;&#xD;&#xA;        &lt;unit value=&quot;hour&quot;/&gt;&#xD;&#xA;        &lt;system value=&quot;http://unitsofmeasure.org&quot;/&gt;&#xD;&#xA;        &lt;code value=&quot;h&quot;/&gt;&#xD;&#xA;    &lt;/denominator&gt;&#xD;&#xA;&lt;/maxDosePerPeriod&gt;&#xD;&#xA;```" />
      <mustSupport value="true" />
    </element>
    <element id="Dosage.maxDosePerAdministration">
      <path value="Dosage.maxDosePerAdministration" />
      <definition value="&lt;div class=&quot;nhsd-a-box nhsd-a-box--bg-light-blue nhsd-!t-margin-bottom-6 nhsd-t-body&quot;&gt;&#xD;&#xA;    Used to define a maximum dose for a single administration.&#xD;&#xA;&lt;/div&gt;&#xD;&#xA;&#xD;&#xA;An example would be Anagrelide for which a single dose should not exceed 2.5 mg. The `maxDosePerAdministration` is defined as 2.5mg.&#xD;&#xA;&#xD;&#xA;In many scenarios it is expected that the `dosage.doseRange` would be used instead of `maxDosePerAdministration`.&#xD;&#xA;&#xD;&#xA;The `maxDosePerAdministration` is defined for each dosage instruction. For a multi-sequence instruction it would therefore be possible to define different maximum dose administrations within different sequences of the complete instruction. &#xD;&#xA;&#xD;&#xA;&lt;div class=&quot;nhsd-a-box nhsd-a-box--bg-light-yellow nhsd-!t-margin-bottom-6 nhsd-t-body&quot;&gt;&#xD;&#xA;    A real-world example of where this would be required has not yet been identified.&#xD;&#xA;&lt;/div&gt;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Maximum dose per administration of 2.5mg**&#xD;&#xA;&#xD;&#xA;```xml&#xD;&#xA;&lt;maxDosePerAdministration&gt;&#xD;&#xA;    &lt;value value=&quot;2.5&quot;/&gt;&#xD;&#xA;    &lt;unit value=&quot;milligram&quot;/&gt;&#xD;&#xA;    &lt;system value=&quot;http://unitsofmeasure.org&quot;/&gt;&#xD;&#xA;    &lt;code value=&quot;mg&quot;/&gt;&#xD;&#xA;&lt;/maxDosePerAdministration&gt;&#xD;&#xA;```" />
    </element>
    <element id="Dosage.maxDosePerLifetime">
      <path value="Dosage.maxDosePerLifetime" />
      <definition value="&lt;div class=&quot;callout-box--info&quot;&gt;&#xD;&#xA;    Used to define the maximum cumulative dose over the lifetime of a patient.&#xD;&#xA;&lt;/div&gt;&#xD;&#xA;&#xD;&#xA;An example would be Daunorubicin which may have a maximum cumulative dose of 600mg/m2 (based on the size of the patient). The `maxDosePerLifetime` is defined as 600 mg/m2.&#xD;&#xA;&#xD;&#xA;The `maxDosePerLifetime` can be defined for each dosage instruction; which, for a multi-sequence instruction is illogical, as any `maxDosePerLifetime` is equally applicable to all dosage sequence that relate to the single medication coded concept.&#xD;&#xA;&#xD;&#xA;&lt;div class=&quot;nhsd-a-box nhsd-a-box--bg-light-yellow nhsd-!t-margin-bottom-6 nhsd-t-body&quot;&gt;&#xD;&#xA;    &lt;strong&gt;Note:&lt;/strong&gt; If a &lt;code&gt;maxDosePerLifetime&lt;/code&gt; statement is required with a multi-sequence instruction, it is recommended to define it within the last / final sequence to ensure that the information is presented at the end of a the complete instruction, rather than th middle which could be overlooked.&#xD;&#xA;&lt;/div&gt;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Maximum dose over lifetime of the patient of 600 mg/m2**&#xD;&#xA;&#xD;&#xA;```xml&#xD;&#xA;&lt;maxDosePerLifetime&gt;&#xD;&#xA;    &lt;value value=&quot;600&quot;/&gt;&#xD;&#xA;    &lt;unit value=&quot;milligram per square metre&quot;/&gt;&#xD;&#xA;    &lt;system value=&quot;http://unitsofmeasure.org&quot;/&gt;&#xD;&#xA;    &lt;code value=&quot;mg/m2&quot;/&gt;&#xD;&#xA;&lt;/maxDosePerLifetime&gt;&#xD;&#xA;```" />
    </element>
  </differential>
</StructureDefinition>