{
  "resourceType": "StructureDefinition",
  "url": "https://fhir.nhs.uk/StructureDefinition/NHSDigital-Dosage",
  "name": "NHSDigitalDosage",
  "status": "draft",
  "fhirVersion": "4.0.1",
  "kind": "complex-type",
  "abstract": false,
  "type": "Dosage",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Dosage",
  "derivation": "constraint",
  "snapshot": {
    "element": [
      {
        "id": "Dosage",
        "path": "Dosage",
        "short": "How the medication is/was taken or should be taken",
        "definition": "Indicates how the medication is/was taken or should be taken by the patient.",
        "min": 0,
        "max": "*",
        "base": {
          "path": "Dosage",
          "min": 0,
          "max": "*"
        },
        "condition": [
          "ele-1"
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          },
          {
            "identity": "rim",
            "map": ".outboundRelationship[typeCode=COMP].target[classCode=SBADM, moodCode=INT]"
          }
        ]
      },
      {
        "id": "Dosage.id",
        "path": "Dosage.id",
        "representation": [
          "xmlAttr"
        ],
        "short": "Unique id for inter-element referencing",
        "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Element.id",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
                "valueUrl": "string"
              }
            ],
            "code": "http://hl7.org/fhirpath/System.String"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          }
        ]
      },
      {
        "id": "Dosage.extension",
        "path": "Dosage.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "description": "Extensions are always sliced by (at least) url",
          "rules": "open"
        },
        "short": "Additional content defined by implementations",
        "definition": "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": "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": [
          "extensions",
          "user content"
        ],
        "min": 0,
        "max": "*",
        "base": {
          "path": "Element.extension",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Extension"
          }
        ],
        "condition": [
          "ele-1"
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          },
          {
            "key": "ext-1",
            "severity": "error",
            "human": "Must have either extensions or value[x], not both",
            "expression": "extension.exists() != value.exists()",
            "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
            "source": "http://hl7.org/fhir/StructureDefinition/Extension"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          },
          {
            "identity": "rim",
            "map": "N/A"
          }
        ]
      },
      {
        "id": "Dosage.modifierExtension",
        "path": "Dosage.modifierExtension",
        "short": "Extensions that cannot be ignored even if unrecognized",
        "definition": "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
        "comment": "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": "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": [
          "extensions",
          "user content",
          "modifiers"
        ],
        "min": 0,
        "max": "*",
        "base": {
          "path": "BackboneElement.modifierExtension",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Extension"
          }
        ],
        "condition": [
          "ele-1"
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          },
          {
            "key": "ext-1",
            "severity": "error",
            "human": "Must have either extensions or value[x], not both",
            "expression": "extension.exists() != value.exists()",
            "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
            "source": "http://hl7.org/fhir/StructureDefinition/Extension"
          }
        ],
        "isModifier": true,
        "isModifierReason": "Modifier extensions are expected to modify the meaning or interpretation of the element that contains them",
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          },
          {
            "identity": "rim",
            "map": "N/A"
          }
        ]
      },
      {
        "id": "Dosage.sequence",
        "path": "Dosage.sequence",
        "short": "Multi-sequence dosage instructions.",
        "definition": "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.\r\n\r\nExamples 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.\r\n\r\n#### Sequential Instructions\r\n\r\nWhere the value of sequence is an incremental integer it defines a sequential instruction.\r\n\r\n#### Concurrent Instructions\r\n\r\nWhere the same integer value of sequence is defines it means a concurrent instruction.",
        "comment": "32 bit number; for values larger than this, use decimal",
        "requirements": "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": 0,
        "max": "1",
        "base": {
          "path": "Dosage.sequence",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "integer"
          }
        ],
        "condition": [
          "ele-1"
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "mustSupport": true,
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          },
          {
            "identity": "v2",
            "map": "TQ1-1"
          },
          {
            "identity": "rim",
            "map": ".text"
          }
        ]
      },
      {
        "id": "Dosage.text",
        "path": "Dosage.text",
        "short": "The complete dosage instruction as a human readable string.",
        "definition": "The complete dosage instruction as a human readable string.\r\n\r\n<div class=\"nhsd-a-box nhsd-a-box--bg-light-blue nhsd-!t-margin-bottom-6 nhsd-t-body\">\r\n    <strong>Recommendation</strong>: Use the <a href='DosetoTextTranslation'>translation algorithm</a> 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.\r\n</div>\r\n\r\nFor example;\r\n\r\n```xml\r\n<text value=\"1 tablet - every 6 hours - oral\" />\r\n```\r\n\r\nWhere 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.\r\n\r\nFor 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.\r\n\r\nFor example;\r\n\r\n```xml\r\n<text value=\"{the dosage elements translated as text} - infuse as rapidly as possibly via intraperitoneal port\" />\r\n```\r\n\r\nFor example, the instruction `“immediately following drug {X}”)`, where {X} is the name of a drug, is neither suitable as a `additionalInstruction` nor `patientInstruction`.\r\n\r\nFor example;\r\n\r\n```xml\r\n<text value=\"500 milligrams - once - oral - immediately following drug {X}\" />\r\n```",
        "comment": "Note that FHIR strings SHALL NOT exceed 1MB in size",
        "requirements": "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": 0,
        "max": "1",
        "base": {
          "path": "Dosage.text",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "string"
          }
        ],
        "condition": [
          "ele-1"
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "mustSupport": true,
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          },
          {
            "identity": "v2",
            "map": "RXO-6; RXE-21"
          },
          {
            "identity": "rim",
            "map": ".text"
          }
        ]
      },
      {
        "id": "Dosage.additionalInstruction",
        "path": "Dosage.additionalInstruction",
        "short": "Additional dosage instructions that can be either SNOMED-CT coded terms or free-text instructions.",
        "definition": "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&conceptId1=419492006&edition=uk-edition). These terms are also available from the example [FHIR valueset binding](http://hl7.org/fhir/stu3/valueset-additional-instruction-codes.html).\r\n\r\n<div class=\"nhsd-a-box nhsd-a-box--bg-light-yellow nhsd-!t-margin-bottom-6 nhsd-t-body\">\r\n    <strong>Important:</strong> Where no code exists, <code>additionalInstructions</code> 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.\r\n</div>\r\n\r\n**Coded instruction**\r\n```xml\r\n<additionalInstruction>\r\n    <coding> \r\n        <system value=\"http://snomed.info/sct\"/> \r\n        <code value=\"419529008\"/> \r\n        <display value=\"Dissolved under the tongue \"/> \r\n    </coding>\r\n</additionalInstruction>\r\n```\r\n\r\n**Multiple coded instructions**\r\n\r\n```xml\r\n<additionalInstruction>\r\n    <coding> \r\n        <system value=\"http://snomed.info/sct\"/> \r\n        <code value=\"417995008\"/> \r\n        <display value=\"Dissolve or mix with water before taking\"/> \r\n    </coding>\r\n</additionalInstruction>\r\n<additionalInstruction>\r\n    <coding> \r\n        <system value=\"http://snomed.info/sct\"/> \r\n        <code value=\"417980006\"/> \r\n        <display value=\"Contains aspirin\"/> \r\n    </coding>\r\n</additionalInstruction>\r\n```\r\n\r\n**Free-text instruction (try to avoid using free-text where possible)**\r\n\r\n```xml\r\n<additionalInstruction>\r\n    <text value=\"with dialysis\"/>\r\n</additionalInstruction>\r\n```\r\n\r\n### `additionalInstruction` / `when` overlap\r\n\r\n<div class=\"nhsd-a-box nhsd-a-box--bg-light-blue nhsd-!t-margin-bottom-6 nhsd-t-body\">\r\n    <strong>Note:</strong> The value-sets for <code>Timing.when</code> and <code>Dosage.additionalInstruction</code> do contain some overlapping values.\r\n</div>\r\n\r\nFor example, they can both describe “with or after food”. \r\n\r\nIn such cases, use `Timing.when` instead of a coded `Dosage.additionalInstruction`.\r\n\r\n\r\n### continue / stop instructions\r\n\r\nThere 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. \r\n\r\nThe 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.\r\n\r\nThree SNOMED-CT codes exist that can be used for this purpose.\r\n\r\n- “Then stop” (SNOMED concept identifier = [422327006](https://termbrowser.nhs.uk/?perspective=full&conceptId1=422327006&edition=uk-edition))\r\n- “Then discontinue” (SNOMED concept identifier = [421484000](https://termbrowser.nhs.uk/?perspective=full&conceptId1=421484000&edition=uk-edition))\r\n- “Do not stop taking this medicine except on your doctor’s advice” (SNOMED concept identifier = [419444006](https://termbrowser.nhs.uk/?perspective=full&conceptId1=419444006&edition=uk-edition))\r\n\r\n<div class=\"nhsd-a-box nhsd-a-box--bg-light-blue nhsd-!t-margin-bottom-6 nhsd-t-body\">\r\n    <strong>Note:</strong> It is recognised that such coded terms are akin to timing instructions so may be more logically containing within the various <code>Dosage.timing</code> structures. These do not currently support coded concept terms. Implementation experience will provide evidence to support any future change to the underlying FHIR specification.\r\n</div>\r\n\r\n\r\n### as directed\r\n\r\nThe 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&conceptId1=421769005&edition=uk-edition) or conveyed as text as a patient instruction.\r\n\r\n---",
        "comment": "Information about administration or preparation of the medication (e.g. \"infuse as rapidly as possibly via intraperitoneal port\" or \"immediately following drug x\") should be populated in dosage.text.",
        "requirements": "Additional instruction is intended to be coded, but where no code exists, the element could include text.  For example, \"Swallow with plenty of water\" which might or might not be coded.",
        "min": 0,
        "max": "*",
        "base": {
          "path": "Dosage.additionalInstruction",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "condition": [
          "ele-1"
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "mustSupport": true,
        "isSummary": true,
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "AdditionalInstruction"
            }
          ],
          "strength": "example",
          "description": "A coded concept identifying additional instructions such as \"take with water\" or \"avoid operating heavy machinery\".",
          "valueSet": "http://hl7.org/fhir/ValueSet/additional-instruction-codes"
        },
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          },
          {
            "identity": "v2",
            "map": "CE/CNE/CWE"
          },
          {
            "identity": "rim",
            "map": "CD"
          },
          {
            "identity": "orim",
            "map": "fhir:CodeableConcept rdfs:subClassOf dt:CD"
          },
          {
            "identity": "v2",
            "map": "RXO-7"
          },
          {
            "identity": "rim",
            "map": ".text"
          }
        ]
      },
      {
        "id": "Dosage.patientInstruction",
        "path": "Dosage.patientInstruction",
        "short": "Patient or consumer oriented instructions",
        "definition": "Free-text instructions for the patient. Patient instructions can only be defined as one text string per dosage instruction. \r\n\r\n<div class=\"nhsd-a-box nhsd-a-box--bg-light-blue nhsd-!t-margin-bottom-6 nhsd-t-body\">\r\n    <strong>Note:</strong>\r\nThis field is not intended to provide instructions for a medication dispensing label.\r\n</div>\r\n\r\n```xml\r\n<patientInstruction value=\"Some relevant instructions for the patient\"/>\r\n```",
        "comment": "Note that FHIR strings SHALL NOT exceed 1MB in size",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Dosage.patientInstruction",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "string"
          }
        ],
        "condition": [
          "ele-1"
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "mustSupport": true,
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          },
          {
            "identity": "v2",
            "map": "RXO-7"
          },
          {
            "identity": "rim",
            "map": ".text"
          }
        ]
      },
      {
        "id": "Dosage.timing",
        "path": "Dosage.timing",
        "short": "When medication should be administered",
        "definition": "Adding constraints, bounds or limits to a dosage instruction.",
        "comment": "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": "The timing schedule for giving the medication to the patient. This  data type allows many different expressions. For example: \"Every 8 hours\"; \"Three times a day\"; \"1/2 an hour before breakfast for 10 days from 23-Dec 2011:\"; \"15 Oct 2013, 17 Oct 2013 and 1 Nov 2013\".  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": 0,
        "max": "1",
        "base": {
          "path": "Dosage.timing",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "Timing"
          }
        ],
        "condition": [
          "ele-1"
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "mustSupport": true,
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          },
          {
            "identity": "v2",
            "map": "N/A"
          },
          {
            "identity": "rim",
            "map": "QSET<TS> (GTS)"
          },
          {
            "identity": "rim",
            "map": ".effectiveTime"
          }
        ]
      },
      {
        "id": "Dosage.timing.id",
        "path": "Dosage.timing.id",
        "representation": [
          "xmlAttr"
        ],
        "short": "Unique id for inter-element referencing",
        "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Element.id",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
                "valueUrl": "string"
              }
            ],
            "code": "http://hl7.org/fhirpath/System.String"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          }
        ]
      },
      {
        "id": "Dosage.timing.extension",
        "path": "Dosage.timing.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "description": "Extensions are always sliced by (at least) url",
          "rules": "open"
        },
        "short": "Additional content defined by implementations",
        "definition": "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": "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": [
          "extensions",
          "user content"
        ],
        "min": 0,
        "max": "*",
        "base": {
          "path": "Element.extension",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Extension"
          }
        ],
        "condition": [
          "ele-1"
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          },
          {
            "key": "ext-1",
            "severity": "error",
            "human": "Must have either extensions or value[x], not both",
            "expression": "extension.exists() != value.exists()",
            "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
            "source": "http://hl7.org/fhir/StructureDefinition/Extension"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          },
          {
            "identity": "rim",
            "map": "N/A"
          }
        ]
      },
      {
        "id": "Dosage.timing.modifierExtension",
        "path": "Dosage.timing.modifierExtension",
        "short": "Extensions that cannot be ignored even if unrecognized",
        "definition": "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
        "comment": "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": "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": [
          "extensions",
          "user content",
          "modifiers"
        ],
        "min": 0,
        "max": "*",
        "base": {
          "path": "BackboneElement.modifierExtension",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Extension"
          }
        ],
        "condition": [
          "ele-1"
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          },
          {
            "key": "ext-1",
            "severity": "error",
            "human": "Must have either extensions or value[x], not both",
            "expression": "extension.exists() != value.exists()",
            "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
            "source": "http://hl7.org/fhir/StructureDefinition/Extension"
          }
        ],
        "isModifier": true,
        "isModifierReason": "Modifier extensions are expected to modify the meaning or interpretation of the element that contains them",
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          },
          {
            "identity": "rim",
            "map": "N/A"
          }
        ]
      },
      {
        "id": "Dosage.timing.event",
        "path": "Dosage.timing.event",
        "short": "When the event occurs",
        "definition": "Identifies specific times when the event occurs.",
        "requirements": "In a Medication Administration Record, for instance, you need to take a general specification, and turn it into a precise specification.",
        "min": 0,
        "max": "*",
        "base": {
          "path": "Timing.event",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "dateTime"
          }
        ],
        "condition": [
          "ele-1"
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          },
          {
            "identity": "rim",
            "map": "QLIST<TS>"
          }
        ]
      },
      {
        "id": "Dosage.timing.repeat",
        "path": "Dosage.timing.repeat",
        "short": "When the event is to occur",
        "definition": "A set of rules that describe when the event is scheduled.",
        "requirements": "Many timing schedules are determined by regular repetitions.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Timing.repeat",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "Element"
          }
        ],
        "condition": [
          "ele-1"
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          },
          {
            "key": "tim-9",
            "severity": "error",
            "human": "If there's an offset, there must be a when (and not C, CM, CD, CV)",
            "expression": "offset.empty() or (when.exists() and ((when in ('C' | 'CM' | 'CD' | 'CV')).not()))",
            "xpath": "not(exists(f:offset)) or exists(f:when)",
            "source": "http://hl7.org/fhir/StructureDefinition/Timing"
          },
          {
            "key": "tim-5",
            "severity": "error",
            "human": "period SHALL be a non-negative value",
            "expression": "period.exists() implies period >= 0",
            "xpath": "f:period/@value >= 0 or not(f:period/@value)",
            "source": "http://hl7.org/fhir/StructureDefinition/Timing"
          },
          {
            "key": "tim-6",
            "severity": "error",
            "human": "If there's a periodMax, there must be a period",
            "expression": "periodMax.empty() or period.exists()",
            "xpath": "not(exists(f:periodMax)) or exists(f:period)",
            "source": "http://hl7.org/fhir/StructureDefinition/Timing"
          },
          {
            "key": "tim-7",
            "severity": "error",
            "human": "If there's a durationMax, there must be a duration",
            "expression": "durationMax.empty() or duration.exists()",
            "xpath": "not(exists(f:durationMax)) or exists(f:duration)",
            "source": "http://hl7.org/fhir/StructureDefinition/Timing"
          },
          {
            "key": "tim-8",
            "severity": "error",
            "human": "If there's a countMax, there must be a count",
            "expression": "countMax.empty() or count.exists()",
            "xpath": "not(exists(f:countMax)) or exists(f:count)",
            "source": "http://hl7.org/fhir/StructureDefinition/Timing"
          },
          {
            "key": "tim-1",
            "severity": "error",
            "human": "if there's a duration, there needs to be duration units",
            "expression": "duration.empty() or durationUnit.exists()",
            "xpath": "not(exists(f:duration)) or exists(f:durationUnit)",
            "source": "http://hl7.org/fhir/StructureDefinition/Timing"
          },
          {
            "key": "tim-10",
            "severity": "error",
            "human": "If there's a timeOfDay, there cannot be a when, or vice versa",
            "expression": "timeOfDay.empty() or when.empty()",
            "xpath": "not(exists(f:timeOfDay)) or not(exists(f:when))",
            "source": "http://hl7.org/fhir/StructureDefinition/Timing"
          },
          {
            "key": "tim-2",
            "severity": "error",
            "human": "if there's a period, there needs to be period units",
            "expression": "period.empty() or periodUnit.exists()",
            "xpath": "not(exists(f:period)) or exists(f:periodUnit)",
            "source": "http://hl7.org/fhir/StructureDefinition/Timing"
          },
          {
            "key": "tim-4",
            "severity": "error",
            "human": "duration SHALL be a non-negative value",
            "expression": "duration.exists() implies duration >= 0",
            "xpath": "f:duration/@value >= 0 or not(f:duration/@value)",
            "source": "http://hl7.org/fhir/StructureDefinition/Timing"
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          },
          {
            "identity": "rim",
            "map": "Implies PIVL or EIVL"
          }
        ]
      },
      {
        "id": "Dosage.timing.repeat.id",
        "path": "Dosage.timing.repeat.id",
        "representation": [
          "xmlAttr"
        ],
        "short": "Unique id for inter-element referencing",
        "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Element.id",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
                "valueUrl": "string"
              }
            ],
            "code": "http://hl7.org/fhirpath/System.String"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          }
        ]
      },
      {
        "id": "Dosage.timing.repeat.extension",
        "path": "Dosage.timing.repeat.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "description": "Extensions are always sliced by (at least) url",
          "rules": "open"
        },
        "short": "Additional content defined by implementations",
        "definition": "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": "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": [
          "extensions",
          "user content"
        ],
        "min": 0,
        "max": "*",
        "base": {
          "path": "Element.extension",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Extension"
          }
        ],
        "condition": [
          "ele-1"
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          },
          {
            "key": "ext-1",
            "severity": "error",
            "human": "Must have either extensions or value[x], not both",
            "expression": "extension.exists() != value.exists()",
            "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
            "source": "http://hl7.org/fhir/StructureDefinition/Extension"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          },
          {
            "identity": "rim",
            "map": "N/A"
          }
        ]
      },
      {
        "id": "Dosage.timing.repeat.bounds[x]",
        "path": "Dosage.timing.repeat.bounds[x]",
        "short": "Length/Range of lengths, or (Start and/or end) limits",
        "definition": "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": 0,
        "max": "1",
        "base": {
          "path": "Timing.repeat.bounds[x]",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "Duration"
          },
          {
            "code": "Range",
            "profile": [
              "https://fhir.nhs.uk.uk/StructureDefinition/NHSDigital-Range"
            ]
          },
          {
            "code": "Period"
          }
        ],
        "condition": [
          "ele-1"
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          },
          {
            "identity": "rim",
            "map": "IVL(TS) used in a QSI"
          }
        ]
      },
      {
        "id": "Dosage.timing.repeat.count",
        "path": "Dosage.timing.repeat.count",
        "short": "Number of times to repeat",
        "definition": "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": "If you have both bounds and count, then this should be understood as within the bounds period, until count times happens.",
        "requirements": "Repetitions may be limited by end time or total occurrences.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Timing.repeat.count",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "positiveInt"
          }
        ],
        "condition": [
          "ele-1"
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          },
          {
            "identity": "rim",
            "map": "PIVL.count"
          }
        ]
      },
      {
        "id": "Dosage.timing.repeat.countMax",
        "path": "Dosage.timing.repeat.countMax",
        "short": "Maximum number of times to repeat",
        "definition": "If present, indicates that the count is a range - so to perform the action between [count] and [countMax] times.",
        "comment": "32 bit number; for values larger than this, use decimal",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Timing.repeat.countMax",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "positiveInt"
          }
        ],
        "condition": [
          "ele-1"
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          },
          {
            "identity": "rim",
            "map": "PIVL.count"
          }
        ]
      },
      {
        "id": "Dosage.timing.repeat.duration",
        "path": "Dosage.timing.repeat.duration",
        "short": "How long when it happens",
        "definition": "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": "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": "Some activities are not instantaneous and need to be maintained for a period of time.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Timing.repeat.duration",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "decimal"
          }
        ],
        "condition": [
          "ele-1"
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          },
          {
            "identity": "rim",
            "map": "PIVL.phase"
          }
        ]
      },
      {
        "id": "Dosage.timing.repeat.durationMax",
        "path": "Dosage.timing.repeat.durationMax",
        "short": "How long when it happens (Max)",
        "definition": "If present, indicates that the duration is a range - so to perform the action between [duration] and [durationMax] time length.",
        "comment": "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": "Some activities are not instantaneous and need to be maintained for a period of time.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Timing.repeat.durationMax",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "decimal"
          }
        ],
        "condition": [
          "ele-1"
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          },
          {
            "identity": "rim",
            "map": "PIVL.phase"
          }
        ]
      },
      {
        "id": "Dosage.timing.repeat.durationUnit",
        "path": "Dosage.timing.repeat.durationUnit",
        "short": "s | min | h | d | wk | mo | a - unit of time (UCUM)",
        "definition": "The units of time for the duration, in UCUM units.",
        "comment": "Note that FHIR strings SHALL NOT exceed 1MB in size",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Timing.repeat.durationUnit",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "code"
          }
        ],
        "condition": [
          "ele-1"
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "isSummary": true,
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "UnitsOfTime"
            }
          ],
          "strength": "required",
          "description": "A unit of time (units from UCUM).",
          "valueSet": "http://hl7.org/fhir/ValueSet/units-of-time|4.0.1"
        },
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          },
          {
            "identity": "rim",
            "map": "PIVL.phase.unit"
          }
        ]
      },
      {
        "id": "Dosage.timing.repeat.frequency",
        "path": "Dosage.timing.repeat.frequency",
        "short": "Event occurs frequency times per period",
        "definition": "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": "32 bit number; for values larger than this, use decimal",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Timing.repeat.frequency",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "positiveInt"
          }
        ],
        "meaningWhenMissing": "If no frequency is stated, the assumption is that the event occurs once per period, but systems SHOULD always be specific about this",
        "condition": [
          "ele-1"
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          },
          {
            "identity": "rim",
            "map": "PIVL.phase"
          }
        ]
      },
      {
        "id": "Dosage.timing.repeat.frequencyMax",
        "path": "Dosage.timing.repeat.frequencyMax",
        "short": "Event occurs up to frequencyMax times per period",
        "definition": "If present, indicates that the frequency is a range - so to repeat between [frequency] and [frequencyMax] times within the period or period range.",
        "comment": "32 bit number; for values larger than this, use decimal",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Timing.repeat.frequencyMax",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "positiveInt"
          }
        ],
        "condition": [
          "ele-1"
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          },
          {
            "identity": "rim",
            "map": "PIVL.phase"
          }
        ]
      },
      {
        "id": "Dosage.timing.repeat.period",
        "path": "Dosage.timing.repeat.period",
        "short": "Event occurs frequency times per period",
        "definition": "Indicates the duration of time over which repetitions are to occur; e.g. to express \"3 times per day\", 3 would be the frequency and \"1 day\" would be the period. If periodMax is present, this element indicates the lower bound of the allowed range of the period length.",
        "comment": "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": 0,
        "max": "1",
        "base": {
          "path": "Timing.repeat.period",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "decimal"
          }
        ],
        "condition": [
          "ele-1"
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          },
          {
            "identity": "rim",
            "map": "PIVL.phase"
          }
        ]
      },
      {
        "id": "Dosage.timing.repeat.periodMax",
        "path": "Dosage.timing.repeat.periodMax",
        "short": "Upper limit of period (3-4 hours)",
        "definition": "If present, indicates that the period is a range from [period] to [periodMax], allowing expressing concepts such as \"do this once every 3-5 days.",
        "comment": "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": 0,
        "max": "1",
        "base": {
          "path": "Timing.repeat.periodMax",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "decimal"
          }
        ],
        "condition": [
          "ele-1"
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          },
          {
            "identity": "rim",
            "map": "PIVL.phase"
          }
        ]
      },
      {
        "id": "Dosage.timing.repeat.periodUnit",
        "path": "Dosage.timing.repeat.periodUnit",
        "short": "s | min | h | d | wk | mo | a - unit of time (UCUM)",
        "definition": "The units of time for the period in UCUM units.",
        "comment": "Note that FHIR strings SHALL NOT exceed 1MB in size",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Timing.repeat.periodUnit",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "code"
          }
        ],
        "condition": [
          "ele-1"
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "isSummary": true,
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "UnitsOfTime"
            }
          ],
          "strength": "required",
          "description": "A unit of time (units from UCUM).",
          "valueSet": "http://hl7.org/fhir/ValueSet/units-of-time|4.0.1"
        },
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          },
          {
            "identity": "rim",
            "map": "PIVL.phase.unit"
          }
        ]
      },
      {
        "id": "Dosage.timing.repeat.dayOfWeek",
        "path": "Dosage.timing.repeat.dayOfWeek",
        "short": "mon | tue | wed | thu | fri | sat | sun",
        "definition": "If one or more days of week is provided, then the action happens only on the specified day(s).",
        "comment": "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": 0,
        "max": "*",
        "base": {
          "path": "Timing.repeat.dayOfWeek",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "code"
          }
        ],
        "condition": [
          "ele-1"
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "isSummary": true,
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "DayOfWeek"
            }
          ],
          "strength": "required",
          "valueSet": "http://hl7.org/fhir/ValueSet/days-of-week|4.0.1"
        },
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          }
        ]
      },
      {
        "id": "Dosage.timing.repeat.timeOfDay",
        "path": "Dosage.timing.repeat.timeOfDay",
        "short": "Time of day for action",
        "definition": "Specified time of day for action to take place.",
        "comment": "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": 0,
        "max": "*",
        "base": {
          "path": "Timing.repeat.timeOfDay",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "time"
          }
        ],
        "condition": [
          "ele-1"
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          }
        ]
      },
      {
        "id": "Dosage.timing.repeat.when",
        "path": "Dosage.timing.repeat.when",
        "short": "Code for time period of occurrence",
        "definition": "An approximate time period during the day, potentially linked to an event of daily living that indicates when the action should occur.",
        "comment": "When more than one event is listed, the event is tied to the union of the specified events.",
        "requirements": "Timings are frequently determined by occurrences such as waking, eating and sleep.",
        "min": 0,
        "max": "*",
        "base": {
          "path": "Timing.repeat.when",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "code"
          }
        ],
        "condition": [
          "ele-1"
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "isSummary": true,
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "EventTiming"
            }
          ],
          "strength": "required",
          "description": "Real world event relating to the schedule.",
          "valueSet": "http://hl7.org/fhir/ValueSet/event-timing|4.0.1"
        },
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          },
          {
            "identity": "rim",
            "map": "EIVL.event"
          }
        ]
      },
      {
        "id": "Dosage.timing.repeat.offset",
        "path": "Dosage.timing.repeat.offset",
        "short": "Minutes from event (before or after)",
        "definition": "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": "32 bit number; for values larger than this, use decimal",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Timing.repeat.offset",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "unsignedInt"
          }
        ],
        "condition": [
          "ele-1"
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          },
          {
            "identity": "rim",
            "map": "EIVL.offset"
          }
        ]
      },
      {
        "id": "Dosage.timing.code",
        "path": "Dosage.timing.code",
        "short": "BID | TID | QID | AM | PM | QD | QOD | +",
        "definition": "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": "BID etc. are defined as 'at institutionally specified times'. For example, an institution may choose that BID is \"always at 7am and 6pm\".  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": 0,
        "max": "1",
        "base": {
          "path": "Timing.code",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "condition": [
          "ele-1"
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "isSummary": true,
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "TimingAbbreviation"
            }
          ],
          "strength": "preferred",
          "description": "Code for a known / defined timing pattern.",
          "valueSet": "http://hl7.org/fhir/ValueSet/timing-abbreviation"
        },
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          },
          {
            "identity": "v2",
            "map": "CE/CNE/CWE"
          },
          {
            "identity": "rim",
            "map": "CD"
          },
          {
            "identity": "orim",
            "map": "fhir:CodeableConcept rdfs:subClassOf dt:CD"
          },
          {
            "identity": "rim",
            "map": "QSC.code"
          }
        ]
      },
      {
        "id": "Dosage.asNeeded[x]",
        "path": "Dosage.asNeeded[x]",
        "short": "Take \"as needed\" (for x)",
        "definition": "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. \r\n\r\nIn this case use the `asNeededBoolean` option. The absence of `asNeededBoolean` is equivalent to where `asNeededBoolean` has a value of `false`.\r\n\r\nThe `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&conceptId1=404684003&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": "Can express \"as needed\" without a reason by setting the Boolean = True.  In this case the CodeableConcept is not populated.  Or you can express \"as needed\" 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 \"prn\" or \"as needed\".",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Dosage.asNeeded[x]",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "boolean"
          },
          {
            "code": "CodeableConcept"
          }
        ],
        "condition": [
          "ele-1"
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "mustSupport": true,
        "isSummary": true,
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "MedicationAsNeededReason"
            }
          ],
          "strength": "example",
          "description": "A coded concept identifying the precondition that should be met or evaluated prior to consuming or administering a medication dose.  For example \"pain\", \"30 minutes prior to sexual intercourse\", \"on flare-up\" etc.",
          "valueSet": "http://hl7.org/fhir/ValueSet/medication-as-needed-reason"
        },
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          },
          {
            "identity": "v2",
            "map": "TQ1-9"
          },
          {
            "identity": "rim",
            "map": ".outboundRelationship[typeCode=PRCN].target[classCode=OBS, moodCode=EVN, code=\"as needed\"].value=boolean or codable concept"
          }
        ]
      },
      {
        "id": "Dosage.site",
        "path": "Dosage.site",
        "short": "Body site to administer to",
        "definition": "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&conceptId1=123037004&edition=uk-edition).\r\n\r\n```xml\r\n<!-- Site -->\r\n<site>\r\n    <coding>\r\n        <system value=\"http://snomed.info/sct\"/>\r\n        <code value=\"59380008\"/>\r\n        <display value=\"Anterior abdominal wall structure\"/>\r\n    </coding>\r\n</site>\r\n```",
        "comment": "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": "A coded specification of the anatomic site where the medication first enters the body.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Dosage.site",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "condition": [
          "ele-1"
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "mustSupport": true,
        "isSummary": true,
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "MedicationAdministrationSite"
            }
          ],
          "strength": "example",
          "description": "A coded concept describing the site location the medicine enters into or onto the body.",
          "valueSet": "http://hl7.org/fhir/ValueSet/approach-site-codes"
        },
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          },
          {
            "identity": "v2",
            "map": "CE/CNE/CWE"
          },
          {
            "identity": "rim",
            "map": "CD"
          },
          {
            "identity": "orim",
            "map": "fhir:CodeableConcept rdfs:subClassOf dt:CD"
          },
          {
            "identity": "v2",
            "map": "RXR-2"
          },
          {
            "identity": "rim",
            "map": ".approachSiteCode"
          }
        ]
      },
      {
        "id": "Dosage.route",
        "path": "Dosage.route",
        "short": "How drug should enter body",
        "definition": "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&conceptId1=284009009&edition=uk-edition).\r\n\r\n\r\n```xml\r\n<!-- Route -->\r\n<route>\r\n    <coding>\r\n        <system value=\"http://snomed.info/sct\"/>\r\n        <code value=\"78421000\"/>\r\n        <display value=\"intramuscular route\"/>\r\n    </coding>\r\n</route>\r\n```",
        "comment": "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": "A code specifying the route or physiological path of administration of a therapeutic agent into or onto a patient's body.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Dosage.route",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "condition": [
          "ele-1"
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "mustSupport": true,
        "isSummary": true,
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "RouteOfAdministration"
            }
          ],
          "strength": "example",
          "description": "A coded concept describing the route or physiological path of administration of a therapeutic agent into or onto the body of a subject.",
          "valueSet": "http://hl7.org/fhir/ValueSet/route-codes"
        },
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          },
          {
            "identity": "v2",
            "map": "CE/CNE/CWE"
          },
          {
            "identity": "rim",
            "map": "CD"
          },
          {
            "identity": "orim",
            "map": "fhir:CodeableConcept rdfs:subClassOf dt:CD"
          },
          {
            "identity": "v2",
            "map": "RXR-1"
          },
          {
            "identity": "rim",
            "map": ".routeCode"
          }
        ]
      },
      {
        "id": "Dosage.method",
        "path": "Dosage.method",
        "short": "Technique for administering medication",
        "definition": "The [999000041000001103 ePrescribing method simple reference set (foundation metadata concept)](https://termbrowser.nhs.uk/?perspective=full&conceptId1=999000041000001103&edition=uk-edition) reference set collates the commonly used terms for `method` for use in the United Kingdom.\r\n\r\nWhilst 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&conceptId1=736665006&edition=uk-edition) and [Dosing instruction fragment](https://termbrowser.nhs.uk/?perspective=full&conceptId1=422096002&edition=uk-edition)), it is recommended to use the ePrescribing reference set in the first instance.\r\n\r\n```xml\r\n<!-- Method -->\r\n<method>\r\n    <coding>\r\n        <system value=\"http://snomed.info/sct\"/>\r\n        <code value=\"129326001\"/>\r\n        <display value=\"Injection\"/>\r\n    </coding>\r\n</method>\r\n```\r\n\r\n### Use of synonyms\r\n\r\nIn 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. \r\n\r\nGuidance 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": "Terminologies used often pre-coordinate this term with the route and or form of administration.",
        "requirements": "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": 0,
        "max": "1",
        "base": {
          "path": "Dosage.method",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "condition": [
          "ele-1"
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "mustSupport": true,
        "isSummary": true,
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "MedicationAdministrationMethod"
            }
          ],
          "strength": "example",
          "description": "A coded concept describing the technique by which the medicine is administered.",
          "valueSet": "http://hl7.org/fhir/ValueSet/administration-method-codes"
        },
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          },
          {
            "identity": "v2",
            "map": "CE/CNE/CWE"
          },
          {
            "identity": "rim",
            "map": "CD"
          },
          {
            "identity": "orim",
            "map": "fhir:CodeableConcept rdfs:subClassOf dt:CD"
          },
          {
            "identity": "v2",
            "map": "RXR-4"
          },
          {
            "identity": "rim",
            "map": ".doseQuantity"
          }
        ]
      },
      {
        "id": "Dosage.doseAndRate",
        "path": "Dosage.doseAndRate",
        "short": "Amount of medication administered",
        "definition": "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.\r\n\r\nA 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.\r\n\r\n### Sub-element: `Dosage.doseAndRate.doseQuantity`\r\n\r\nThe amount of medication per dose, as a [simple coded quantity](http://hl7.org/fhir/datatypes.html#SimpleQuantity).\r\n\r\n```xml\r\n<!-- Example A: 1 capsule -->\r\n<doseAndRate>\r\n    <doseQuantity>\r\n        <value value=\"1\"/>\r\n        <unit value=\"capsule\"/>\r\n        <system value=\"http://snomed.info/sct\"/>\r\n        <code value=\"732937005\"/>\r\n    </doseQuantity>\r\n</doseAndRate>\r\n\r\n<!-- Example B: 30 milligrams -->\r\n<doseAndRate>\r\n    <doseQuantity>\r\n        <value value=\"30\"/>\r\n        <unit value=\"milligram\"/>\r\n        <system value=\"http://unitsofmeasure.org\"/>\r\n        <code value=\"mg\"/>\r\n    </doseQuantity>\r\n</doseAndRate>\r\n```\r\n\r\n### Sub-element: `Dosage.doseAndRate.doseRange`\r\n\r\nA dose that may be in a given low / high range.\r\n\r\n```xml\r\n<!-- for a dose between 7.5 to 30 milligram -->\r\n<doseAndRate>\r\n    <doseRange>\r\n        <low>\r\n            <value value=\"7.5\"/>\r\n            <unit value=\"milligram\"/>\r\n            <code value=\"mg\"/>\r\n            <system value=\"http://unitsofmeasure.org\"/>\r\n        </low>\r\n        <high>\r\n            <value value=\"30\"/>\r\n            <unit value=\"milligram\"/>\r\n            <code value=\"mg\"/>\r\n            <system value=\"http://unitsofmeasure.org\"/>\r\n        </high>\r\n    </doseRange>\r\n</doseAndRate>\r\n```\r\n\r\nA rate-based quantity, such as _30 ml per hour_, can be expressed as a `rateRatio` with coded numerator and denominator values.\r\n\r\nWhere 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.\r\n\r\n\r\n### Sub-element: `Dosage.doseAndRate.rateRatio`\r\n\r\nWhere the rate is expressed as coded numerator and denominator values.\r\n\r\n**at a rate of 30ml/hour using rateRatio**\r\n\r\n```xml\r\n<doseAndRate>\r\n <rateRatio>\r\n  <numerator>\r\n   <value value=\"30\"/>\r\n   <unit value=\"millilitre\"/>\r\n   <system value=\"http://unitsofmeasure.org\"/>\r\n   <code value=\"mL\"/>\r\n  </numerator>\r\n  <denominator>\r\n   <value value=\"1\"/>\r\n   <unit value=\"hour\"/>\r\n   <system value=\"http://unitsofmeasure.org\"/>\r\n   <code value=\"h\"/>\r\n  </denominator>\r\n </rateRatio>\r\n</doseAndRate>\r\n```\r\n\r\n### Sub-element: `Dosage.doseAndRate.rateQuantity`\r\nWhere 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.\r\n\r\n**at a rate of 30ml/hour using rateQuantity**\r\n\r\n```xml\r\n<rateQuantity>\r\n <value value=\"30\"/>\r\n <unit value=\"milliliters per hour\"/>\r\n <system value=\"http://unitsofmeasure.org\"/>\r\n <code value=\"mL/h\"/>\r\n</rateQuantity>\r\n```\r\n\r\n**at a rate of 1mcg/kg/hour using rateQuantity**\r\n\r\n```xml\r\n<doseAndRate>\r\n <rateQuantity>\r\n  <value value=\"1\"/>\r\n  <unit value=\"microgram per kilogram per hour\"/>\r\n  <system value=\"http://unitsofmeasure.org\"/>\r\n  <code value=\"ug/kg/h\"/>\r\n </rateQuantity>\r\n</doseAndRate>\r\n```\r\n\r\n### Sub-element: `Dosage.doseAndRate.rateRange`\r\n\r\nWhere the unit of measure applicable to a rate range is defined within UCUM the `rateRange` structure can be used.\r\n\r\n**give at 1-2 litres per minute using rateRange**\r\n```xml\r\n<doseAndRate>\r\n <rateRange>\r\n  <low>\r\n   <value value=\"1\"/>\r\n   <unit value=\"liter per minute\"/>\r\n   <system value=\"http://unitsofmeasure.org\"/>\r\n   <code value=\"L/min\"/>\r\n  </low>\r\n  <high>\r\n   <value value=\"2\"/>\r\n   <unit value=\"liter per minute\"/>\r\n   <system value=\"http://unitsofmeasure.org\"/>\r\n   <code value=\"L/min\"/>\r\n  </high>\r\n </rateRange>\r\n</doseAndRate>\r\n```",
        "min": 0,
        "max": "*",
        "base": {
          "path": "Dosage.doseAndRate",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Element"
          }
        ],
        "condition": [
          "ele-1"
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          },
          {
            "identity": "v2",
            "map": "TQ1-2"
          }
        ]
      },
      {
        "id": "Dosage.doseAndRate.id",
        "path": "Dosage.doseAndRate.id",
        "representation": [
          "xmlAttr"
        ],
        "short": "Unique id for inter-element referencing",
        "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Element.id",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
                "valueUrl": "string"
              }
            ],
            "code": "http://hl7.org/fhirpath/System.String"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          }
        ]
      },
      {
        "id": "Dosage.doseAndRate.extension",
        "path": "Dosage.doseAndRate.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "description": "Extensions are always sliced by (at least) url",
          "rules": "open"
        },
        "short": "Additional content defined by implementations",
        "definition": "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": "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": [
          "extensions",
          "user content"
        ],
        "min": 0,
        "max": "*",
        "base": {
          "path": "Element.extension",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Extension"
          }
        ],
        "condition": [
          "ele-1"
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          },
          {
            "key": "ext-1",
            "severity": "error",
            "human": "Must have either extensions or value[x], not both",
            "expression": "extension.exists() != value.exists()",
            "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
            "source": "http://hl7.org/fhir/StructureDefinition/Extension"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          },
          {
            "identity": "rim",
            "map": "N/A"
          }
        ]
      },
      {
        "id": "Dosage.doseAndRate.type",
        "path": "Dosage.doseAndRate.type",
        "short": "The kind of dose or rate specified",
        "definition": "The kind of dose or rate specified, for example, ordered or calculated.",
        "comment": "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": "If the type is not populated, assume to be \"ordered\".",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Dosage.doseAndRate.type",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "condition": [
          "ele-1"
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "isSummary": true,
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "DoseAndRateType"
            }
          ],
          "strength": "example",
          "description": "The kind of dose or rate specified.",
          "valueSet": "http://hl7.org/fhir/ValueSet/dose-rate-type"
        },
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          },
          {
            "identity": "v2",
            "map": "CE/CNE/CWE"
          },
          {
            "identity": "rim",
            "map": "CD"
          },
          {
            "identity": "orim",
            "map": "fhir:CodeableConcept rdfs:subClassOf dt:CD"
          },
          {
            "identity": "v2",
            "map": "RXO-21; RXE-23"
          }
        ]
      },
      {
        "id": "Dosage.doseAndRate.dose[x]",
        "path": "Dosage.doseAndRate.dose[x]",
        "short": "Amount of medication per dose",
        "definition": "Amount of medication per dose.",
        "comment": "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": "The amount of therapeutic or other substance given at one administration event.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Dosage.doseAndRate.dose[x]",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "Range",
            "profile": [
              "https://fhir.nhs.uk.uk/StructureDefinition/NHSDigital-Range"
            ]
          },
          {
            "code": "Quantity",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/SimpleQuantity"
            ]
          }
        ],
        "condition": [
          "ele-1"
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          },
          {
            "identity": "v2",
            "map": "RXO-2, RXE-3"
          },
          {
            "identity": "rim",
            "map": ".doseQuantity"
          }
        ]
      },
      {
        "id": "Dosage.doseAndRate.rate[x]",
        "path": "Dosage.doseAndRate.rate[x]",
        "short": "Amount of medication per unit of time",
        "definition": "Amount of medication per unit of time.",
        "comment": "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.\r\rIt 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": "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": 0,
        "max": "1",
        "base": {
          "path": "Dosage.doseAndRate.rate[x]",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "Ratio"
          },
          {
            "code": "Range"
          },
          {
            "code": "Quantity",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/SimpleQuantity"
            ]
          }
        ],
        "condition": [
          "ele-1"
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          },
          {
            "identity": "v2",
            "map": "RXE22, RXE23, RXE-24"
          },
          {
            "identity": "rim",
            "map": ".rateQuantity"
          }
        ]
      },
      {
        "id": "Dosage.maxDosePerPeriod",
        "path": "Dosage.maxDosePerPeriod",
        "short": "Upper limit on medication per unit of time",
        "definition": "<div class=\"nhsd-a-box nhsd-a-box--bg-light-blue nhsd-!t-margin-bottom-6 nhsd-t-body\">\r\n    Used to define a maxiumum dose over a given time period.\r\n</div>\r\n\r\nAn 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.\r\n\r\nThe `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.\r\n\r\n<div class=\"nhsd-a-box nhsd-a-box--bg-light-yellow nhsd-!t-margin-bottom-6 nhsd-t-body\">\r\n    A real-world example of where this would be required has not yet been identified.\r\n</div>\r\n\r\n**Maximum dose per period of 12mg/24 hour**\r\n\r\n```xml\r\n<maxDosePerPeriod>\r\n    <numerator>\r\n        <value value=\"12\"/>\r\n        <unit value=\"milligram\"/>\r\n        <system value=\"http://unitsofmeasure.org\"/>\r\n        <code value=\"mg\"/>\r\n    </numerator>\r\n    <denominator>\r\n        <value value=\"24\"/>\r\n        <unit value=\"hour\"/>\r\n        <system value=\"http://unitsofmeasure.org\"/>\r\n        <code value=\"h\"/>\r\n    </denominator>\r\n</maxDosePerPeriod>\r\n```",
        "comment": "This is intended for use as an adjunct to the dosage when there is an upper cap.  For example \"2 tablets every 4 hours to a maximum of 8/day\".",
        "requirements": "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": 0,
        "max": "1",
        "base": {
          "path": "Dosage.maxDosePerPeriod",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "Ratio"
          }
        ],
        "condition": [
          "ele-1"
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          },
          {
            "key": "rat-1",
            "severity": "error",
            "human": "Numerator and denominator SHALL both be present, or both are absent. If both are absent, there SHALL be some extension present",
            "expression": "(numerator.empty() xor denominator.exists()) and (numerator.exists() or extension.exists())",
            "xpath": "(count(f:numerator) = count(f:denominator)) and ((count(f:numerator) > 0) or (count(f:extension) > 0))",
            "source": "http://hl7.org/fhir/StructureDefinition/Ratio"
          }
        ],
        "mustSupport": true,
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          },
          {
            "identity": "v2",
            "map": "N/A"
          },
          {
            "identity": "rim",
            "map": "RTO"
          },
          {
            "identity": "v2",
            "map": "RXO-23, RXE-19"
          },
          {
            "identity": "rim",
            "map": ".maxDoseQuantity"
          }
        ]
      },
      {
        "id": "Dosage.maxDosePerAdministration",
        "path": "Dosage.maxDosePerAdministration",
        "short": "Upper limit on medication per administration",
        "definition": "<div class=\"nhsd-a-box nhsd-a-box--bg-light-blue nhsd-!t-margin-bottom-6 nhsd-t-body\">\r\n    Used to define a maximum dose for a single administration.\r\n</div>\r\n\r\nAn example would be Anagrelide for which a single dose should not exceed 2.5 mg. The `maxDosePerAdministration` is defined as 2.5mg.\r\n\r\nIn many scenarios it is expected that the `dosage.doseRange` would be used instead of `maxDosePerAdministration`.\r\n\r\nThe `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. \r\n\r\n<div class=\"nhsd-a-box nhsd-a-box--bg-light-yellow nhsd-!t-margin-bottom-6 nhsd-t-body\">\r\n    A real-world example of where this would be required has not yet been identified.\r\n</div>\r\n\r\n\r\n**Maximum dose per administration of 2.5mg**\r\n\r\n```xml\r\n<maxDosePerAdministration>\r\n    <value value=\"2.5\"/>\r\n    <unit value=\"milligram\"/>\r\n    <system value=\"http://unitsofmeasure.org\"/>\r\n    <code value=\"mg\"/>\r\n</maxDosePerAdministration>\r\n```",
        "comment": "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": "The maximum total quantity of a therapeutic substance that may be administered to a subject per administration.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Dosage.maxDosePerAdministration",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "Quantity",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/SimpleQuantity"
            ]
          }
        ],
        "condition": [
          "ele-1"
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          },
          {
            "key": "qty-3",
            "severity": "error",
            "human": "If a code for the unit is present, the system SHALL also be present",
            "expression": "code.empty() or system.exists()",
            "xpath": "not(exists(f:code)) or exists(f:system)",
            "source": "http://hl7.org/fhir/StructureDefinition/Quantity"
          },
          {
            "key": "sqty-1",
            "severity": "error",
            "human": "The comparator is not used on a SimpleQuantity",
            "expression": "comparator.empty()",
            "xpath": "not(exists(f:comparator))",
            "source": "http://hl7.org/fhir/StructureDefinition/SimpleQuantity"
          }
        ],
        "isModifier": false,
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          },
          {
            "identity": "v2",
            "map": "SN (see also Range) or CQ"
          },
          {
            "identity": "rim",
            "map": "PQ, IVL<PQ>, MO, CO, depending on the values"
          },
          {
            "identity": "rim",
            "map": "not supported"
          }
        ]
      },
      {
        "id": "Dosage.maxDosePerLifetime",
        "path": "Dosage.maxDosePerLifetime",
        "short": "Upper limit on medication per lifetime of the patient",
        "definition": "<div class=\"callout-box--info\">\r\n    Used to define the maximum cumulative dose over the lifetime of a patient.\r\n</div>\r\n\r\nAn 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.\r\n\r\nThe `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.\r\n\r\n<div class=\"nhsd-a-box nhsd-a-box--bg-light-yellow nhsd-!t-margin-bottom-6 nhsd-t-body\">\r\n    <strong>Note:</strong> If a <code>maxDosePerLifetime</code> 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.\r\n</div>\r\n\r\n\r\n**Maximum dose over lifetime of the patient of 600 mg/m2**\r\n\r\n```xml\r\n<maxDosePerLifetime>\r\n    <value value=\"600\"/>\r\n    <unit value=\"milligram per square metre\"/>\r\n    <system value=\"http://unitsofmeasure.org\"/>\r\n    <code value=\"mg/m2\"/>\r\n</maxDosePerLifetime>\r\n```",
        "comment": "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": "The maximum total quantity of a therapeutic substance that may be administered per lifetime of the subject.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Dosage.maxDosePerLifetime",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "Quantity",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/SimpleQuantity"
            ]
          }
        ],
        "condition": [
          "ele-1"
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          },
          {
            "key": "qty-3",
            "severity": "error",
            "human": "If a code for the unit is present, the system SHALL also be present",
            "expression": "code.empty() or system.exists()",
            "xpath": "not(exists(f:code)) or exists(f:system)",
            "source": "http://hl7.org/fhir/StructureDefinition/Quantity"
          },
          {
            "key": "sqty-1",
            "severity": "error",
            "human": "The comparator is not used on a SimpleQuantity",
            "expression": "comparator.empty()",
            "xpath": "not(exists(f:comparator))",
            "source": "http://hl7.org/fhir/StructureDefinition/SimpleQuantity"
          }
        ],
        "isModifier": false,
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          },
          {
            "identity": "v2",
            "map": "SN (see also Range) or CQ"
          },
          {
            "identity": "rim",
            "map": "PQ, IVL<PQ>, MO, CO, depending on the values"
          },
          {
            "identity": "rim",
            "map": "not supported"
          }
        ]
      }
    ]
  },
  "differential": {
    "element": [
      {
        "id": "Dosage.sequence",
        "path": "Dosage.sequence",
        "short": "Multi-sequence dosage instructions.",
        "definition": "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.\r\n\r\nExamples 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.\r\n\r\n#### Sequential Instructions\r\n\r\nWhere the value of sequence is an incremental integer it defines a sequential instruction.\r\n\r\n#### Concurrent Instructions\r\n\r\nWhere the same integer value of sequence is defines it means a concurrent instruction.",
        "mustSupport": true
      },
      {
        "id": "Dosage.text",
        "path": "Dosage.text",
        "short": "The complete dosage instruction as a human readable string.",
        "definition": "The complete dosage instruction as a human readable string.\r\n\r\n<div class=\"nhsd-a-box nhsd-a-box--bg-light-blue nhsd-!t-margin-bottom-6 nhsd-t-body\">\r\n    <strong>Recommendation</strong>: Use the <a href='DosetoTextTranslation'>translation algorithm</a> 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.\r\n</div>\r\n\r\nFor example;\r\n\r\n```xml\r\n<text value=\"1 tablet - every 6 hours - oral\" />\r\n```\r\n\r\nWhere 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.\r\n\r\nFor 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.\r\n\r\nFor example;\r\n\r\n```xml\r\n<text value=\"{the dosage elements translated as text} - infuse as rapidly as possibly via intraperitoneal port\" />\r\n```\r\n\r\nFor example, the instruction `“immediately following drug {X}”)`, where {X} is the name of a drug, is neither suitable as a `additionalInstruction` nor `patientInstruction`.\r\n\r\nFor example;\r\n\r\n```xml\r\n<text value=\"500 milligrams - once - oral - immediately following drug {X}\" />\r\n```",
        "mustSupport": true
      },
      {
        "id": "Dosage.additionalInstruction",
        "path": "Dosage.additionalInstruction",
        "short": "Additional dosage instructions that can be either SNOMED-CT coded terms or free-text instructions.",
        "definition": "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&conceptId1=419492006&edition=uk-edition). These terms are also available from the example [FHIR valueset binding](http://hl7.org/fhir/stu3/valueset-additional-instruction-codes.html).\r\n\r\n<div class=\"nhsd-a-box nhsd-a-box--bg-light-yellow nhsd-!t-margin-bottom-6 nhsd-t-body\">\r\n    <strong>Important:</strong> Where no code exists, <code>additionalInstructions</code> 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.\r\n</div>\r\n\r\n**Coded instruction**\r\n```xml\r\n<additionalInstruction>\r\n    <coding> \r\n        <system value=\"http://snomed.info/sct\"/> \r\n        <code value=\"419529008\"/> \r\n        <display value=\"Dissolved under the tongue \"/> \r\n    </coding>\r\n</additionalInstruction>\r\n```\r\n\r\n**Multiple coded instructions**\r\n\r\n```xml\r\n<additionalInstruction>\r\n    <coding> \r\n        <system value=\"http://snomed.info/sct\"/> \r\n        <code value=\"417995008\"/> \r\n        <display value=\"Dissolve or mix with water before taking\"/> \r\n    </coding>\r\n</additionalInstruction>\r\n<additionalInstruction>\r\n    <coding> \r\n        <system value=\"http://snomed.info/sct\"/> \r\n        <code value=\"417980006\"/> \r\n        <display value=\"Contains aspirin\"/> \r\n    </coding>\r\n</additionalInstruction>\r\n```\r\n\r\n**Free-text instruction (try to avoid using free-text where possible)**\r\n\r\n```xml\r\n<additionalInstruction>\r\n    <text value=\"with dialysis\"/>\r\n</additionalInstruction>\r\n```\r\n\r\n### `additionalInstruction` / `when` overlap\r\n\r\n<div class=\"nhsd-a-box nhsd-a-box--bg-light-blue nhsd-!t-margin-bottom-6 nhsd-t-body\">\r\n    <strong>Note:</strong> The value-sets for <code>Timing.when</code> and <code>Dosage.additionalInstruction</code> do contain some overlapping values.\r\n</div>\r\n\r\nFor example, they can both describe “with or after food”. \r\n\r\nIn such cases, use `Timing.when` instead of a coded `Dosage.additionalInstruction`.\r\n\r\n\r\n### continue / stop instructions\r\n\r\nThere 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. \r\n\r\nThe 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.\r\n\r\nThree SNOMED-CT codes exist that can be used for this purpose.\r\n\r\n- “Then stop” (SNOMED concept identifier = [422327006](https://termbrowser.nhs.uk/?perspective=full&conceptId1=422327006&edition=uk-edition))\r\n- “Then discontinue” (SNOMED concept identifier = [421484000](https://termbrowser.nhs.uk/?perspective=full&conceptId1=421484000&edition=uk-edition))\r\n- “Do not stop taking this medicine except on your doctor’s advice” (SNOMED concept identifier = [419444006](https://termbrowser.nhs.uk/?perspective=full&conceptId1=419444006&edition=uk-edition))\r\n\r\n<div class=\"nhsd-a-box nhsd-a-box--bg-light-blue nhsd-!t-margin-bottom-6 nhsd-t-body\">\r\n    <strong>Note:</strong> It is recognised that such coded terms are akin to timing instructions so may be more logically containing within the various <code>Dosage.timing</code> structures. These do not currently support coded concept terms. Implementation experience will provide evidence to support any future change to the underlying FHIR specification.\r\n</div>\r\n\r\n\r\n### as directed\r\n\r\nThe 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&conceptId1=421769005&edition=uk-edition) or conveyed as text as a patient instruction.\r\n\r\n---",
        "mustSupport": true
      },
      {
        "id": "Dosage.patientInstruction",
        "path": "Dosage.patientInstruction",
        "definition": "Free-text instructions for the patient. Patient instructions can only be defined as one text string per dosage instruction. \r\n\r\n<div class=\"nhsd-a-box nhsd-a-box--bg-light-blue nhsd-!t-margin-bottom-6 nhsd-t-body\">\r\n    <strong>Note:</strong>\r\nThis field is not intended to provide instructions for a medication dispensing label.\r\n</div>\r\n\r\n```xml\r\n<patientInstruction value=\"Some relevant instructions for the patient\"/>\r\n```",
        "mustSupport": true
      },
      {
        "id": "Dosage.timing",
        "path": "Dosage.timing",
        "definition": "Adding constraints, bounds or limits to a dosage instruction.",
        "mustSupport": true
      },
      {
        "id": "Dosage.timing.repeat.bounds[x]",
        "path": "Dosage.timing.repeat.bounds[x]",
        "type": [
          {
            "code": "Duration"
          },
          {
            "code": "Range",
            "profile": [
              "https://fhir.nhs.uk.uk/StructureDefinition/NHSDigital-Range"
            ]
          },
          {
            "code": "Period"
          }
        ]
      },
      {
        "id": "Dosage.asNeeded[x]",
        "path": "Dosage.asNeeded[x]",
        "definition": "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. \r\n\r\nIn this case use the `asNeededBoolean` option. The absence of `asNeededBoolean` is equivalent to where `asNeededBoolean` has a value of `false`.\r\n\r\nThe `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&conceptId1=404684003&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": true
      },
      {
        "id": "Dosage.site",
        "path": "Dosage.site",
        "definition": "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&conceptId1=123037004&edition=uk-edition).\r\n\r\n```xml\r\n<!-- Site -->\r\n<site>\r\n    <coding>\r\n        <system value=\"http://snomed.info/sct\"/>\r\n        <code value=\"59380008\"/>\r\n        <display value=\"Anterior abdominal wall structure\"/>\r\n    </coding>\r\n</site>\r\n```",
        "mustSupport": true
      },
      {
        "id": "Dosage.route",
        "path": "Dosage.route",
        "definition": "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&conceptId1=284009009&edition=uk-edition).\r\n\r\n\r\n```xml\r\n<!-- Route -->\r\n<route>\r\n    <coding>\r\n        <system value=\"http://snomed.info/sct\"/>\r\n        <code value=\"78421000\"/>\r\n        <display value=\"intramuscular route\"/>\r\n    </coding>\r\n</route>\r\n```",
        "mustSupport": true
      },
      {
        "id": "Dosage.method",
        "path": "Dosage.method",
        "definition": "The [999000041000001103 ePrescribing method simple reference set (foundation metadata concept)](https://termbrowser.nhs.uk/?perspective=full&conceptId1=999000041000001103&edition=uk-edition) reference set collates the commonly used terms for `method` for use in the United Kingdom.\r\n\r\nWhilst 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&conceptId1=736665006&edition=uk-edition) and [Dosing instruction fragment](https://termbrowser.nhs.uk/?perspective=full&conceptId1=422096002&edition=uk-edition)), it is recommended to use the ePrescribing reference set in the first instance.\r\n\r\n```xml\r\n<!-- Method -->\r\n<method>\r\n    <coding>\r\n        <system value=\"http://snomed.info/sct\"/>\r\n        <code value=\"129326001\"/>\r\n        <display value=\"Injection\"/>\r\n    </coding>\r\n</method>\r\n```\r\n\r\n### Use of synonyms\r\n\r\nIn 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. \r\n\r\nGuidance 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": true
      },
      {
        "id": "Dosage.doseAndRate",
        "path": "Dosage.doseAndRate",
        "definition": "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.\r\n\r\nA 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.\r\n\r\n### Sub-element: `Dosage.doseAndRate.doseQuantity`\r\n\r\nThe amount of medication per dose, as a [simple coded quantity](http://hl7.org/fhir/datatypes.html#SimpleQuantity).\r\n\r\n```xml\r\n<!-- Example A: 1 capsule -->\r\n<doseAndRate>\r\n    <doseQuantity>\r\n        <value value=\"1\"/>\r\n        <unit value=\"capsule\"/>\r\n        <system value=\"http://snomed.info/sct\"/>\r\n        <code value=\"732937005\"/>\r\n    </doseQuantity>\r\n</doseAndRate>\r\n\r\n<!-- Example B: 30 milligrams -->\r\n<doseAndRate>\r\n    <doseQuantity>\r\n        <value value=\"30\"/>\r\n        <unit value=\"milligram\"/>\r\n        <system value=\"http://unitsofmeasure.org\"/>\r\n        <code value=\"mg\"/>\r\n    </doseQuantity>\r\n</doseAndRate>\r\n```\r\n\r\n### Sub-element: `Dosage.doseAndRate.doseRange`\r\n\r\nA dose that may be in a given low / high range.\r\n\r\n```xml\r\n<!-- for a dose between 7.5 to 30 milligram -->\r\n<doseAndRate>\r\n    <doseRange>\r\n        <low>\r\n            <value value=\"7.5\"/>\r\n            <unit value=\"milligram\"/>\r\n            <code value=\"mg\"/>\r\n            <system value=\"http://unitsofmeasure.org\"/>\r\n        </low>\r\n        <high>\r\n            <value value=\"30\"/>\r\n            <unit value=\"milligram\"/>\r\n            <code value=\"mg\"/>\r\n            <system value=\"http://unitsofmeasure.org\"/>\r\n        </high>\r\n    </doseRange>\r\n</doseAndRate>\r\n```\r\n\r\nA rate-based quantity, such as _30 ml per hour_, can be expressed as a `rateRatio` with coded numerator and denominator values.\r\n\r\nWhere 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.\r\n\r\n\r\n### Sub-element: `Dosage.doseAndRate.rateRatio`\r\n\r\nWhere the rate is expressed as coded numerator and denominator values.\r\n\r\n**at a rate of 30ml/hour using rateRatio**\r\n\r\n```xml\r\n<doseAndRate>\r\n <rateRatio>\r\n  <numerator>\r\n   <value value=\"30\"/>\r\n   <unit value=\"millilitre\"/>\r\n   <system value=\"http://unitsofmeasure.org\"/>\r\n   <code value=\"mL\"/>\r\n  </numerator>\r\n  <denominator>\r\n   <value value=\"1\"/>\r\n   <unit value=\"hour\"/>\r\n   <system value=\"http://unitsofmeasure.org\"/>\r\n   <code value=\"h\"/>\r\n  </denominator>\r\n </rateRatio>\r\n</doseAndRate>\r\n```\r\n\r\n### Sub-element: `Dosage.doseAndRate.rateQuantity`\r\nWhere 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.\r\n\r\n**at a rate of 30ml/hour using rateQuantity**\r\n\r\n```xml\r\n<rateQuantity>\r\n <value value=\"30\"/>\r\n <unit value=\"milliliters per hour\"/>\r\n <system value=\"http://unitsofmeasure.org\"/>\r\n <code value=\"mL/h\"/>\r\n</rateQuantity>\r\n```\r\n\r\n**at a rate of 1mcg/kg/hour using rateQuantity**\r\n\r\n```xml\r\n<doseAndRate>\r\n <rateQuantity>\r\n  <value value=\"1\"/>\r\n  <unit value=\"microgram per kilogram per hour\"/>\r\n  <system value=\"http://unitsofmeasure.org\"/>\r\n  <code value=\"ug/kg/h\"/>\r\n </rateQuantity>\r\n</doseAndRate>\r\n```\r\n\r\n### Sub-element: `Dosage.doseAndRate.rateRange`\r\n\r\nWhere the unit of measure applicable to a rate range is defined within UCUM the `rateRange` structure can be used.\r\n\r\n**give at 1-2 litres per minute using rateRange**\r\n```xml\r\n<doseAndRate>\r\n <rateRange>\r\n  <low>\r\n   <value value=\"1\"/>\r\n   <unit value=\"liter per minute\"/>\r\n   <system value=\"http://unitsofmeasure.org\"/>\r\n   <code value=\"L/min\"/>\r\n  </low>\r\n  <high>\r\n   <value value=\"2\"/>\r\n   <unit value=\"liter per minute\"/>\r\n   <system value=\"http://unitsofmeasure.org\"/>\r\n   <code value=\"L/min\"/>\r\n  </high>\r\n </rateRange>\r\n</doseAndRate>\r\n```"
      },
      {
        "id": "Dosage.doseAndRate.dose[x]",
        "path": "Dosage.doseAndRate.dose[x]",
        "type": [
          {
            "code": "Range",
            "profile": [
              "https://fhir.nhs.uk.uk/StructureDefinition/NHSDigital-Range"
            ]
          },
          {
            "code": "Quantity"
          }
        ]
      },
      {
        "id": "Dosage.maxDosePerPeriod",
        "path": "Dosage.maxDosePerPeriod",
        "definition": "<div class=\"nhsd-a-box nhsd-a-box--bg-light-blue nhsd-!t-margin-bottom-6 nhsd-t-body\">\r\n    Used to define a maxiumum dose over a given time period.\r\n</div>\r\n\r\nAn 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.\r\n\r\nThe `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.\r\n\r\n<div class=\"nhsd-a-box nhsd-a-box--bg-light-yellow nhsd-!t-margin-bottom-6 nhsd-t-body\">\r\n    A real-world example of where this would be required has not yet been identified.\r\n</div>\r\n\r\n**Maximum dose per period of 12mg/24 hour**\r\n\r\n```xml\r\n<maxDosePerPeriod>\r\n    <numerator>\r\n        <value value=\"12\"/>\r\n        <unit value=\"milligram\"/>\r\n        <system value=\"http://unitsofmeasure.org\"/>\r\n        <code value=\"mg\"/>\r\n    </numerator>\r\n    <denominator>\r\n        <value value=\"24\"/>\r\n        <unit value=\"hour\"/>\r\n        <system value=\"http://unitsofmeasure.org\"/>\r\n        <code value=\"h\"/>\r\n    </denominator>\r\n</maxDosePerPeriod>\r\n```",
        "mustSupport": true
      },
      {
        "id": "Dosage.maxDosePerAdministration",
        "path": "Dosage.maxDosePerAdministration",
        "definition": "<div class=\"nhsd-a-box nhsd-a-box--bg-light-blue nhsd-!t-margin-bottom-6 nhsd-t-body\">\r\n    Used to define a maximum dose for a single administration.\r\n</div>\r\n\r\nAn example would be Anagrelide for which a single dose should not exceed 2.5 mg. The `maxDosePerAdministration` is defined as 2.5mg.\r\n\r\nIn many scenarios it is expected that the `dosage.doseRange` would be used instead of `maxDosePerAdministration`.\r\n\r\nThe `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. \r\n\r\n<div class=\"nhsd-a-box nhsd-a-box--bg-light-yellow nhsd-!t-margin-bottom-6 nhsd-t-body\">\r\n    A real-world example of where this would be required has not yet been identified.\r\n</div>\r\n\r\n\r\n**Maximum dose per administration of 2.5mg**\r\n\r\n```xml\r\n<maxDosePerAdministration>\r\n    <value value=\"2.5\"/>\r\n    <unit value=\"milligram\"/>\r\n    <system value=\"http://unitsofmeasure.org\"/>\r\n    <code value=\"mg\"/>\r\n</maxDosePerAdministration>\r\n```"
      },
      {
        "id": "Dosage.maxDosePerLifetime",
        "path": "Dosage.maxDosePerLifetime",
        "definition": "<div class=\"callout-box--info\">\r\n    Used to define the maximum cumulative dose over the lifetime of a patient.\r\n</div>\r\n\r\nAn 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.\r\n\r\nThe `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.\r\n\r\n<div class=\"nhsd-a-box nhsd-a-box--bg-light-yellow nhsd-!t-margin-bottom-6 nhsd-t-body\">\r\n    <strong>Note:</strong> If a <code>maxDosePerLifetime</code> 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.\r\n</div>\r\n\r\n\r\n**Maximum dose over lifetime of the patient of 600 mg/m2**\r\n\r\n```xml\r\n<maxDosePerLifetime>\r\n    <value value=\"600\"/>\r\n    <unit value=\"milligram per square metre\"/>\r\n    <system value=\"http://unitsofmeasure.org\"/>\r\n    <code value=\"mg/m2\"/>\r\n</maxDosePerLifetime>\r\n```"
      }
    ]
  }
}