medicationRequest-eu-core
type: StructureDefinition
node role: treeRoot
id:
  v: medicationRequest-eu-core
text:
  status:
    v: extensions
  div:
    v: Generated Narrative: StructureDefinition medicationRequest-eu-core Name Flags Card. Type Description & Constraints<img src="[binary]" alt="doco" style="background-color: inherit"/> MedicationRequest 0..* MedicationRequest Ordering of medication for patient or group #xD; identifier 0..* Identifier Prescription/prescribed item ID #xD; groupIdentifier 0..1 Identifier Prescription this is part of. Not needed if a presciption includes only one prescribed item. #xD; status 1..1 code Current state of the order #xD; medication 1..1 CodeableReference(Medication (EU core) [WIP]) Medication to be taken #xD; subject 1..1 Reference(Patient (EU core)) Individual or group for whom the medication has been requested #xD; authoredOn 1..1 dateTime When request was initially authored #xD; requester 1..1 Reference(Practitioner | PractitionerRole | Organization | Patient | RelatedPerson | Device) Who/What requested the Request #xD; reason 0..* CodeableReference(Condition | Observation) Reason or indication for this prescription Binding: ConditionProblemDiagnosisCodes (example): A coded concept indicating why the medication was ordered. Additional Bindings Purpose eHDSI Illness and Disorder candidate #xD; dosageInstruction 0..* Dosage How the medication should be taken. #xD; text 0..1 string Free text dosage instructions #xD; timing 0..1 Timing Administration schedule #xD; repeat #xD; duration 0..1 decimal Duration of the treatment #xD; frequency 0..1 positiveInt Frequency times per period #xD; period 0..1 decimal Duration of time over which repetitions are to occur #xD; periodUnit 0..1 code Unit of the period (e.g. day) #xD; code 0..1 CodeableConcept A code for the timing schedule. #xD; route 0..1 CodeableConcept Route of administration #xD; doseAndRate #xD; Slices for dose[x] 0..1 Range, SimpleQuantity(5.0.0) Amount of medication per dose Slice: Unordered, Open by type:$this #xD; dose[x]:doseQuantity 0..1 SimpleQuantity Amount of medication per dose #xD; dispenseRequest #xD; Slices for …
extension:
  url:
    v: http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm
    l: structuredefinition-fmm
  value: Integer
    v: 1
extension:
  url:
    v: http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status
    l: structuredefinition-standards-status
  value: Code
    v: draft
url:
  v: http://hl7.eu/fhir/base-r5/StructureDefinition/medicationRequest-eu-core
  l: medicationRequest-eu-core
version:
  v: 0.2.0-ci-build
name:
  v: MedicationRequestEuCore
title:
  v: MedicationRequest (EU core) [WIP]
status:
  v: draft
date:
  v: 2025-11-03T21:53:03+00:00
publisher:
  v: HL7 Europe
contact:
  name:
    v: HL7 Europe
  telecom:
    system:
      v: url
    value:
      v: http://hl7.eu
description:
  v: This profile sets minimum expectations for the MedicationRequest resource common to most of the use cases. This profile is adapted from the MPD work.
jurisdiction:
  coding:
    system:
      v: http://unstats.un.org/unsd/methods/m49/m49.htm
      l: m49.htm
    code:
      v: 150
    display:
      v: Europe
copyright:
  v: Copyright HL7 Europe. Licensed under creative commons public domain (CC0 1.0).
fhir version:
  v: 5.0.0
mapping:
  identity:
    v: workflow
  uri:
    v: http://hl7.org/fhir/workflow
    l: workflow
  name:
    v: Workflow Pattern
mapping:
  identity:
    v: script10.6
  uri:
    v: http://ncpdp.org/SCRIPT10_6
    l: SCRIPT10 6
  name:
    v: Mapping to NCPDP SCRIPT 10.6
mapping:
  identity:
    v: w5
  uri:
    v: http://hl7.org/fhir/fivews
    l: fivews
  name:
    v: FiveWs Pattern Mapping
mapping:
  identity:
    v: rim
  uri:
    v: http://hl7.org/v3
    l: v3
  name:
    v: RIM Mapping
mapping:
  identity:
    v: v2
  uri:
    v: http://hl7.org/v2
    l: v2
  name:
    v: HL7 V2 Mapping
kind:
  v: resource
abstract:
  v: false
type:
  v: MedicationRequest
  l: MedicationRequest
base definition:
  v: http://hl7.org/fhir/StructureDefinition/MedicationRequest
  l: MedicationRequest
derivation:
  v: constraint
snapshot:
  extension:
    url:
      v: http://hl7.org/fhir/tools/StructureDefinition/snapshot-base-version
      l: snapshot-base-version
    value: String
      v: 5.0.0
  element:
    id:
      v: MedicationRequest
    path:
      v: MedicationRequest
    short:
      v: Ordering of medication for patient or group
    definition:
      v: An order or request for both supply of the medication and the instructions for administration of the medication to a patient. The resource is called "MedicationRequest" rather than "MedicationPrescription" or "MedicationOrder" to generalize the use across inpatient and outpatient settings, including care plans, etc., and to harmonize with workflow patterns.
    alias:
      v: Prescription
    alias:
      v: Order
    min:
      v: 0
    max:
      v: *
    base:
      path:
        v: MedicationRequest
      min:
        v: 0
      max:
        v: *
    constraint:
      key:
        v: dom-2
      severity:
        v: error
      human:
        v: If the resource is contained in another resource, it SHALL NOT contain nested Resources
      expression:
        v: contained.contained.empty()
      source:
        v: http://hl7.org/fhir/StructureDefinition/DomainResource
        l: DomainResource
    constraint:
      key:
        v: dom-3
      severity:
        v: error
      human:
        v: If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource
      expression:
        v: contained.where((('#'+id in (%resource.descendants().reference | %resource.descendants().ofType(canonical) | %resource.descendants().ofType(uri) | %resource.descendants().ofType(url))) or descendants().where(reference = '#').exists() or descendants().where(ofType(canonical) = '#').exists() or descendants().where(ofType(canonical) = '#').exists()).not()).trace('unmatched', id).empty()
      source:
        v: http://hl7.org/fhir/StructureDefinition/DomainResource
        l: DomainResource
    constraint:
      key:
        v: dom-4
      severity:
        v: error
      human:
        v: If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated
      expression:
        v: contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()
      source:
        v: http://hl7.org/fhir/StructureDefinition/DomainResource
        l: DomainResource
    constraint:
      key:
        v: dom-5
      severity:
        v: error
      human:
        v: If a resource is contained in another resource, it SHALL NOT have a security label
      expression:
        v: contained.meta.security.empty()
      source:
        v: http://hl7.org/fhir/StructureDefinition/DomainResource
        l: DomainResource
    constraint:
      extension:
        value: Boolean
      extension:
        value: Markdown
      key:
        v: dom-6
      severity:
        v: warning
      human:
        v: A resource should have narrative for robust management
      expression:
        v: text.`div`.exists()

Boolean
v: true

Markdown
v: When a resource has no narrative, only systems that fully understand the data can display the resource to a human safely. Including a human readable representation in the resource makes for a much more robust eco-system and cheaper handling of resources by intermediary systems. Some ecosystems restrict distribution of resources to only those systems that do fully understand the resources, and as a consequence implementers may believe that the narrative is superfluous. However experience shows that such eco-systems often open up to new participants over time.

v: false

v: false

v: false

identity:
  v: rim
map:
  v: Entity, Role, or Act,CombinedMedicationRequest

identity:
  v: workflow
map:
  v: Request

identity:
  v: script10.6
map:
  v: Message/Body/NewRx

identity:
  v: w5
map:
  v: clinical.medication

id:
  v: MedicationRequest.id
path:
  v: MedicationRequest.id
short:
  v: Logical id of this artifact
definition:
  v: The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.
comment:
  v: Within the context of the FHIR RESTful interactions, the resource has an id except for cases like the create and conditional update. Otherwise, the use of the resouce id depends on the given use case.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Resource.id
  min:
    v: 0
  max:
    v: 1
type:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type
      l: structuredefinition-fhir-type
    value: Url
      v: id
      l: id
  code:
    v: http://hl7.org/fhirpath/System.String
    l: System.String
must support:
  v: false
is modifier:
  v: false
is summary:
  v: true

id:
  v: MedicationRequest.meta
path:
  v: MedicationRequest.meta
short:
  v: Metadata about the resource
definition:
  v: The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Resource.meta
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Meta
    l: Meta
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
must support:
  v: false
is modifier:
  v: false
is summary:
  v: true

id:
  v: MedicationRequest.implicitRules
path:
  v: MedicationRequest.implicitRules
short:
  v: A set of rules under which this content was created
definition:
  v: A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.
comment:
  v: Asserting this rule set restricts the content to be only understood by a limited set of trading partners. This inherently limits the usefulness of the data in the long term. However, the existing health eco-system is highly fractured, and not yet ready to define, collect, and exchange data in a generally computable sense. Wherever possible, implementers and/or specification writers should avoid using this element. Often, when used, the URL is a reference to an implementation guide that defines these special rules as part of its narrative along with other profiles, value sets, etc.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Resource.implicitRules
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: uri
    l: uri
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
must support:
  v: false
is modifier:
  v: true
is modifier reason:
  v: This element is labeled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies its meaning or interpretation
is summary:
  v: true

id:
  v: MedicationRequest.language
path:
  v: MedicationRequest.language
short:
  v: Language of the resource content
definition:
  v: The base language in which the resource is written.
comment:
  v: Language is provided to support indexing and accessibility (typically, services such as text to speech use the language tag). The html language tag in the narrative applies to the narrative. The language tag on the resource may be used to specify the language of other presentations generated from the data in the resource. Not all the content has to be in the base language. The Resource.language should not be assumed to apply to the narrative automatically. If a language is specified, it should it also be specified on the div element in the html (see rules in HTML5 for information about the relationship between xml:lang and the html lang attribute).
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Resource.language
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: code
    l: code
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
must support:
  v: false
is modifier:
  v: false
is summary:
  v: false
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: Language
  strength:
    v: required
  description:
    v: IETF language tag for a human language
  value set:
    v: http://hl7.org/fhir/ValueSet/all-languages|5.0.0
    l: http://hl7.org/fhir/ValueSet/all-languages
  additional:
    purpose:
      v: starter
    value set:
      v: http://hl7.org/fhir/ValueSet/languages|5.0.0
      l: http://hl7.org/fhir/ValueSet/languages

id:
  v: MedicationRequest.text
path:
  v: MedicationRequest.text
short:
  v: Text summary of the resource, for human interpretation
definition:
  v: A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.
comment:
  v: Contained resources do not have a narrative. Resources that are not contained SHOULD have a narrative. In some cases, a resource may only have text with little or no additional discrete data (as long as all minOccurs=1 elements are satisfied). This may be necessary for data from legacy systems where information is captured as a "text blob" or where text is additionally entered raw or narrated and encoded information is added later.
alias:
  v: narrative
alias:
  v: html
alias:
  v: xhtml
alias:
  v: display
min:
  v: 0
max:
  v: 1
base:
  path:
    v: DomainResource.text
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Narrative
    l: Narrative
condition:
  v: dom-6
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
must support:
  v: false
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: Act.text?

id:
  v: MedicationRequest.contained
path:
  v: MedicationRequest.contained
short:
  v: Contained, inline Resources
definition:
  v: These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.
comment:
  v: This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again. Contained resources may have profiles and tags in their meta elements, but SHALL NOT have security labels.
alias:
  v: inline resources
alias:
  v: anonymous resources
alias:
  v: contained resources
min:
  v: 0
max:
  v: *
base:
  path:
    v: DomainResource.contained
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Resource
    l: Resource
condition:
  v: dom-2
condition:
  v: dom-4
condition:
  v: dom-3
condition:
  v: dom-5
must support:
  v: false
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: MedicationRequest.extension
path:
  v: MedicationRequest.extension
short:
  v: Additional content defined by implementations
definition:
  v: May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, 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:
  v: There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
alias:
  v: extensions
alias:
  v: user content
min:
  v: 0
max:
  v: *
base:
  path:
    v: DomainResource.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    l: Extension
must support:
  v: false
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: MedicationRequest.modifierExtension
path:
  v: MedicationRequest.modifierExtension
short:
  v: Extensions that cannot be ignored
definition:
  v: May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).
comment:
  v: There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
requirements:
  v: Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored. This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](http://hl7.org/fhir/R5/extensibility.html#modifierExtension).
alias:
  v: extensions
alias:
  v: user content
min:
  v: 0
max:
  v: *
base:
  path:
    v: DomainResource.modifierExtension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    l: Extension
must support:
  v: false
is modifier:
  v: true
is modifier reason:
  v: Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: MedicationRequest.identifier
path:
  v: MedicationRequest.identifier
short:
  v: Prescription/prescribed item ID
definition:
  v: Identifiers associated with this medication request that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate. They are business identifiers assigned to this resource by the performer or other systems and remain constant as the resource is updated and propagates from server to server.
comment:
  v: It is the prescription ID if the presciption includes only one prescribed item
min:
  v: 0
max:
  v: *
base:
  path:
    v: MedicationRequest.identifier
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Identifier
    l: Identifier
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
must support:
  v: false
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: workflow
  map:
    v: Request.identifier
mapping:
  identity:
    v: script10.6
  map:
    v: Message/Header/PrescriberOrderNumber
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.identifier
mapping:
  identity:
    v: v2
  map:
    v: ORC-2-Placer Order Number / ORC-3-Filler Order Number
mapping:
  identity:
    v: rim
  map:
    v: .id

id:
  v: MedicationRequest.basedOn
path:
  v: MedicationRequest.basedOn
short:
  v: A plan or request that is fulfilled in whole or in part by this medication request
definition:
  v: A plan or request that is fulfilled in whole or in part by this medication request.
min:
  v: 0
max:
  v: *
base:
  path:
    v: MedicationRequest.basedOn
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Reference
    l: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/CarePlan|5.0.0
    l: http://hl7.org/fhir/StructureDefinition/CarePlan
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/MedicationRequest|5.0.0
    l: http://hl7.org/fhir/StructureDefinition/MedicationRequest
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/ServiceRequest|5.0.0
    l: http://hl7.org/fhir/StructureDefinition/ServiceRequest
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/ImmunizationRecommendation|5.0.0
    l: http://hl7.org/fhir/StructureDefinition/ImmunizationRecommendation
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
must support:
  v: false
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: workflow
  map:
    v: Request.basedOn
mapping:
  identity:
    v: rim
  map:
    v: .outboundRelationship[typeCode=FLFS].target[classCode=SBADM or PROC or PCPR or OBS, moodCode=RQO orPLAN or PRP]

id:
  v: MedicationRequest.priorPrescription
path:
  v: MedicationRequest.priorPrescription
short:
  v: Reference to an order/prescription that is being replaced by this MedicationRequest
definition:
  v: Reference to an order/prescription that is being replaced by this MedicationRequest.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: MedicationRequest.priorPrescription
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Reference
    l: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/MedicationRequest|5.0.0
    l: http://hl7.org/fhir/StructureDefinition/MedicationRequest
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
must support:
  v: false
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: workflow
  map:
    v: Request.replaces
mapping:
  identity:
    v: script10.6
  map:
    v: not mapped
mapping:
  identity:
    v: rim
  map:
    v: .outboundRelationship[typeCode=?RPLC or ?SUCC]/target[classCode=SBADM,moodCode=RQO]

id:
  v: MedicationRequest.groupIdentifier
path:
  v: MedicationRequest.groupIdentifier
short:
  v: Prescription this is part of. Not needed if a presciption includes only one prescribed item.
definition:
  v: A shared identifier common to multiple independent Request instances that were activated/authorized more or less simultaneously by a single author. The presence of the same identifier on each request ties those requests together and may have business ramifications in terms of reporting of results, billing, etc. E.g. a requisition number shared by a set of lab tests ordered together, or a prescription number shared by all meds ordered at one time.
requirements:
  v: Requests are linked either by a "basedOn" relationship (i.e. one request is fulfilling another) or by having a common requisition. Requests that are part of the same requisition are generally treated independently from the perspective of changing their state or maintaining them after initial creation.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: MedicationRequest.groupIdentifier
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Identifier
    l: Identifier
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
must support:
  v: false
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: workflow
  map:
    v: Request.groupIdentifier
mapping:
  identity:
    v: rim
  map:
    v: .outboundRelationship(typeCode=COMP].target[classCode=SBADM, moodCode=INT].id

id:
  v: MedicationRequest.status
path:
  v: MedicationRequest.status
short:
  v: Current state of the order
definition:
  v: A code specifying the current state of the order. Generally, this will be active or completed state.
comment:
  v: This element is labeled as a modifier because the status contains codes that mark the resource as not currently valid. Clinical decision support systems should take the status into account when determining which medications to include in their algorithms.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: MedicationRequest.status
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: code
    l: code
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
must support:
  v: false
is modifier:
  v: true
is modifier reason:
  v: This element is labeled as a modifier because it is a status element that contains status entered-in-error which means that the resource should not be treated as valid
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: MedicationRequestStatus
  strength:
    v: required
  description:
    v: A coded concept specifying the state of the prescribing event. Describes the lifecycle of the prescription.
  value set:
    v: http://hl7.org/fhir/ValueSet/medicationrequest-status|5.0.0
    l: http://hl7.org/fhir/ValueSet/medicationrequest-status
mapping:
  identity:
    v: workflow
  map:
    v: Request.status
mapping:
  identity:
    v: script10.6
  map:
    v: no mapping
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.status
mapping:
  identity:
    v: rim
  map:
    v: .statusCode

id:
  v: MedicationRequest.statusReason
path:
  v: MedicationRequest.statusReason
short:
  v: Reason for current status
definition:
  v: Captures the reason for the current state of the MedicationRequest.
comment:
  v: This is generally only used for "exception" statuses such as "suspended" or "cancelled". The reason why the MedicationRequest was created at all is captured in reasonCode, not here.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: MedicationRequest.statusReason
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: CodeableConcept
    l: CodeableConcept
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
must support:
  v: false
is modifier:
  v: false
is summary:
  v: false
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: MedicationRequestStatusReason
  strength:
    v: example
  description:
    v: Identifies the reasons for a given status.
  value set:
    v: http://hl7.org/fhir/ValueSet/medicationrequest-status-reason|5.0.0
    l: http://hl7.org/fhir/ValueSet/medicationrequest-status-reason
mapping:
  identity:
    v: workflow
  map:
    v: Request.statusReason
mapping:
  identity:
    v: rim
  map:
    v: .inboundRelationship[typeCode=SUBJ].source[classCode=CACT, moodCode=EVN].reasonCOde

id:
  v: MedicationRequest.statusChanged
path:
  v: MedicationRequest.statusChanged
short:
  v: When the status was changed
definition:
  v: The date (and perhaps time) when the status was changed.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: MedicationRequest.statusChanged
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: dateTime
    l: dateTime
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
must support:
  v: false
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: subjectOf Observation[code = statusChange].value = date

id:
  v: MedicationRequest.intent
path:
  v: MedicationRequest.intent
short:
  v: proposal | plan | order | original-order | reflex-order | filler-order | instance-order | option
definition:
  v: Whether the request is a proposal, plan, or an original order.
comment:
  v: It is expected that the type of requester will be restricted for different stages of a MedicationRequest. For example, Proposals can be created by a patient, relatedPerson, Practitioner or Device. Plans can be created by Practitioners, Patients, RelatedPersons and Devices. Original orders can be created by a Practitioner only. An instance-order is an instantiation of a request or order and may be used to populate Medication Administration Record. This element is labeled as a modifier because the intent alters when and how the resource is actually applicable.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: MedicationRequest.intent
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: code
    l: code
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
must support:
  v: false
is modifier:
  v: true
is modifier reason:
  v: This element changes the interpretation of all descriptive attributes. For example "the time the request is recommended to occur" vs. "the time the request is authorized to occur" or "who is recommended to perform the request" vs. "who is authorized to perform the request
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: MedicationRequestIntent
  strength:
    v: required
  description:
    v: The kind of medication order.
  value set:
    v: http://hl7.org/fhir/ValueSet/medicationrequest-intent|5.0.0
    l: http://hl7.org/fhir/ValueSet/medicationrequest-intent
mapping:
  identity:
    v: workflow
  map:
    v: Request.intent
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.class
mapping:
  identity:
    v: rim
  map:
    v: .moodCode (nuances beyond PRP/PLAN/RQO would need to be elsewhere)

id:
  v: MedicationRequest.category
path:
  v: MedicationRequest.category
short:
  v: Grouping or category of medication request
definition:
  v: An arbitrary categorization or grouping of the medication request. It could be used for indicating where meds are intended to be administered, eg. in an inpatient setting or in a patient's home, or a legal category of the medication.
comment:
  v: The category can be used to include where the medication is expected to be consumed or other types of requests. The examplar value set represents where the meds are intended to be administered and is just one example of request categorization.
min:
  v: 0
max:
  v: *
base:
  path:
    v: MedicationRequest.category
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: CodeableConcept
    l: CodeableConcept
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
must support:
  v: false
is modifier:
  v: false
is summary:
  v: false
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: MedicationRequestAdministrationLocation
  strength:
    v: example
  description:
    v: A coded concept identifying where the medication is to be consumed or administered.
  value set:
    v: http://hl7.org/fhir/ValueSet/medicationrequest-admin-location|5.0.0
    l: http://hl7.org/fhir/ValueSet/medicationrequest-admin-location
mapping:
  identity:
    v: script10.6
  map:
    v: Message/Body/NewRx/MedicationPrescribed/Directions or Message/Body/NewRx/MedicationPrescribed/StructuredSIG
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.class
mapping:
  identity:
    v: rim
  map:
    v: .inboundRelationship[typeCode=COMP].source[classCode=OBS, moodCode=EVN, code="type of medication usage"].value

id:
  v: MedicationRequest.priority
path:
  v: MedicationRequest.priority
short:
  v: routine | urgent | asap | stat
definition:
  v: Indicates how quickly the Medication Request should be addressed with respect to other requests.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: MedicationRequest.priority
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: code
    l: code
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
must support:
  v: false
is modifier:
  v: false
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: MedicationRequestPriority
  strength:
    v: required
  description:
    v: Identifies the level of importance to be assigned to actioning the request.
  value set:
    v: http://hl7.org/fhir/ValueSet/request-priority|5.0.0
    l: http://hl7.org/fhir/ValueSet/request-priority
mapping:
  identity:
    v: workflow
  map:
    v: Request.priority
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.grade
mapping:
  identity:
    v: rim
  map:
    v: .priorityCode

id:
  v: MedicationRequest.doNotPerform
path:
  v: MedicationRequest.doNotPerform
short:
  v: True if patient is to stop taking or not to start taking the medication
definition:
  v: If true, indicates that the provider is asking for the patient to either stop taking or to not start taking the specified medication. For example, the patient is taking an existing medication and the provider is changing their medication. They want to create two seperate requests: one to stop using the current medication and another to start the new medication.
comment:
  v: If do not perform is not specified, the request is a positive request e.g. "do perform".
min:
  v: 0
max:
  v: 1
base:
  path:
    v: MedicationRequest.doNotPerform
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: boolean
    l: boolean
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
must support:
  v: false
is modifier:
  v: true
is modifier reason:
  v: This element is labeled as a modifier because this element negates the request to occur (ie, this is a request for the medication not to be ordered or prescribed, etc.)
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: SubstanceAdministration.actionNegationInd

id:
  v: MedicationRequest.medication
path:
  v: MedicationRequest.medication
short:
  v: Medication to be taken
definition:
  v: Identifies the medication being requested. This is a link to a resource that represents the medication which may be the details of the medication or simply an attribute carrying a code that identifies the medication from a known list of medications.
comment:
  v: If only a code is specified, then it needs to be a code for a specific product. If more information is required, then the use of the Medication resource is recommended. For example, if you require form or lot number or if the medication is compounded or extemporaneously prepared, then you must reference the Medication resource.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: MedicationRequest.medication
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: CodeableReference
    l: CodeableReference
  target profile:
    v: http://hl7.eu/fhir/base-r5/StructureDefinition/medication-eu-core
    l: medication-eu-core
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
must support:
  v: false
is modifier:
  v: false
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: MedicationCode
  strength:
    v: example
  description:
    v: A coded concept identifying substance or product that can be ordered.
  value set:
    v: http://hl7.org/fhir/ValueSet/medication-codes|5.0.0
    l: http://hl7.org/fhir/ValueSet/medication-codes
mapping:
  identity:
    v: workflow
  map:
    v: Request.code
mapping:
  identity:
    v: script10.6
  map:
    v: Message/Body/NewRx/MedicationPrescribed Medication.code.coding.code = Message/Body/NewRx/MedicationPrescribed/DrugCoded/ProductCode Medication.code.coding.system = Message/Body/NewRx/MedicationPrescribed/DrugCoded/ProductCodeQualifier Medication.code.coding.display = Message/Body/NewRx/MedicationPrescribed/DrugDescription
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.what[x]
mapping:
  identity:
    v: v2
  map:
    v: RXE-2-Give Code / RXO-1 Requested Give Code / RXC-2 Component Code
mapping:
  identity:
    v: rim
  map:
    v: consumable.administrableMedication

id:
  v: MedicationRequest.subject
path:
  v: MedicationRequest.subject
short:
  v: Individual or group for whom the medication has been requested
definition:
  v: The individual or group for whom the medication has been requested.
comment:
  v: The subject on a medication request is mandatory. For the secondary use case where the actual subject is not provided, there still must be an anonymized subject specified.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: MedicationRequest.subject
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: Reference
    l: Reference
  target profile:
    v: http://hl7.eu/fhir/base-r5/StructureDefinition/patient-eu-core
    l: patient-eu-core
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
must support:
  v: false
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: workflow
  map:
    v: Request.subject
mapping:
  identity:
    v: script10.6
  map:
    v: Message/Body/NewRx/Patient (need detail to link to specific patient … Patient.Identification in SCRIPT)
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.subject[x]
mapping:
  identity:
    v: v2
  map:
    v: PID-3 Patient ID List
mapping:
  identity:
    v: rim
  map:
    v: .participation[typeCode=AUT].role

id:
  v: MedicationRequest.informationSource
path:
  v: MedicationRequest.informationSource
short:
  v: The person or organization who provided the information about this request, if the source is someone other than the requestor
definition:
  v: The person or organization who provided the information about this request, if the source is someone other than the requestor. This is often used when the MedicationRequest is reported by another person.
min:
  v: 0
max:
  v: *
base:
  path:
    v: MedicationRequest.informationSource
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Reference
    l: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Patient|5.0.0
    l: http://hl7.org/fhir/StructureDefinition/Patient
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Practitioner|5.0.0
    l: http://hl7.org/fhir/StructureDefinition/Practitioner
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/PractitionerRole|5.0.0
    l: http://hl7.org/fhir/StructureDefinition/PractitionerRole
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/RelatedPerson|5.0.0
    l: http://hl7.org/fhir/StructureDefinition/RelatedPerson
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Organization|5.0.0
    l: http://hl7.org/fhir/StructureDefinition/Organization
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
must support:
  v: false
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: .participation[typeCode=INF].role[classCode=PAT, or codes for Practitioner or Related Person or Practitioner Role or Organization

id:
  v: MedicationRequest.encounter
path:
  v: MedicationRequest.encounter
short:
  v: Encounter created as part of encounter/admission/stay
definition:
  v: The Encounter during which this [x] was created or to which the creation of this record is tightly associated.
comment:
  v: This will typically be the encounter the event occurred within, but some activities may be initiated prior to or after the official completion of an encounter but still be tied to the context of the encounter." If there is a need to link to episodes of care they will be handled with an extension.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: MedicationRequest.encounter
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Reference
    l: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Encounter|5.0.0
    l: http://hl7.org/fhir/StructureDefinition/Encounter
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
must support:
  v: false
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: workflow
  map:
    v: Request.encounter
mapping:
  identity:
    v: script10.6
  map:
    v: no mapping
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.context
mapping:
  identity:
    v: v2
  map:
    v: PV1-19 Visit Number
mapping:
  identity:
    v: rim
  map:
    v: .inboundRelationship[typeCode=COMP].source[classCode=ENC, moodCode=EVN, code="type of encounter or episode"]

id:
  v: MedicationRequest.supportingInformation
path:
  v: MedicationRequest.supportingInformation
short:
  v: Information to support fulfilling of the medication
definition:
  v: Information to support fulfilling (i.e. dispensing or administering) of the medication, for example, patient height and weight, a MedicationStatement for the patient).
comment:
  v: This attribute can be used to reference a MedicationStatement about the patients' medication use.
min:
  v: 0
max:
  v: *
base:
  path:
    v: MedicationRequest.supportingInformation
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Reference
    l: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Resource|5.0.0
    l: http://hl7.org/fhir/StructureDefinition/Resource
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
must support:
  v: false
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: workflow
  map:
    v: Request.supportingInfo
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.context
mapping:
  identity:
    v: rim
  map:
    v: .outboundRelationship[typeCode=PERT].target[A_SupportingClinicalStatement CMET minimal with many different choices of classCodes(ORG, ENC, PROC, SPLY, SBADM, OBS) and each of the act class codes draws from one or more of the following moodCodes (EVN, DEF, INT PRMS, RQO, PRP, APT, ARQ, GOL)]

id:
  v: MedicationRequest.authoredOn
path:
  v: MedicationRequest.authoredOn
short:
  v: When request was initially authored
definition:
  v: The date (and perhaps time) when the prescription was initially written or authored on.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: MedicationRequest.authoredOn
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: dateTime
    l: dateTime
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
must support:
  v: false
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: workflow
  map:
    v: Request.authoredOn
mapping:
  identity:
    v: script10.6
  map:
    v: Message/Body/NewRx/MedicationPrescribed/WrittenDate
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.recorded
mapping:
  identity:
    v: v2
  map:
    v: RXE-32 Original Order Date/Time / ORC-9-Date Time of Transaction
mapping:
  identity:
    v: rim
  map:
    v: author.time

id:
  v: MedicationRequest.requester
path:
  v: MedicationRequest.requester
short:
  v: Who/What requested the Request
definition:
  v: The individual, organization, or device that initiated the request and has responsibility for its activation.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: MedicationRequest.requester
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Reference
    l: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Practitioner|5.0.0
    l: http://hl7.org/fhir/StructureDefinition/Practitioner
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/PractitionerRole|5.0.0
    l: http://hl7.org/fhir/StructureDefinition/PractitionerRole
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Organization|5.0.0
    l: http://hl7.org/fhir/StructureDefinition/Organization
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Patient|5.0.0
    l: http://hl7.org/fhir/StructureDefinition/Patient
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/RelatedPerson|5.0.0
    l: http://hl7.org/fhir/StructureDefinition/RelatedPerson
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Device|5.0.0
    l: http://hl7.org/fhir/StructureDefinition/Device
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
must support:
  v: false
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: workflow
  map:
    v: Request.requester
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.author
mapping:
  identity:
    v: rim
  map:
    v: .participation[typeCode=AUT].role

id:
  v: MedicationRequest.reported
path:
  v: MedicationRequest.reported
short:
  v: Reported rather than primary record
definition:
  v: Indicates if this record was captured as a secondary 'reported' record rather than as an original primary source-of-truth record. It may also indicate the source of the report.
comment:
  v: If not populated, then assume that this is the original record and not reported
min:
  v: 0
max:
  v: 1
base:
  path:
    v: MedicationRequest.reported
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: boolean
    l: boolean
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
must support:
  v: false
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: .participation[typeCode=INF].role

id:
  v: MedicationRequest.performerType
path:
  v: MedicationRequest.performerType
short:
  v: Desired kind of performer of the medication administration
definition:
  v: Indicates the type of performer of the administration of the medication.
comment:
  v: If specified without indicating a performer, this indicates that the performer must be of the specified type. If specified with a performer then it indicates the requirements of the performer if the designated performer is not available.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: MedicationRequest.performerType
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: CodeableConcept
    l: CodeableConcept
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
must support:
  v: false
is modifier:
  v: false
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: MedicationRequestPerformerType
  strength:
    v: extensible
  description:
    v: Identifies the type of individual that is desired to administer the medication.
  value set:
    v: http://hl7.org/fhir/ValueSet/medication-intended-performer-role|5.0.0
    l: http://hl7.org/fhir/ValueSet/medication-intended-performer-role
mapping:
  identity:
    v: workflow
  map:
    v: Request.performerType
mapping:
  identity:
    v: rim
  map:
    v: .participation[typeCode=PRF].role[scoper.determinerCode=KIND].code

id:
  v: MedicationRequest.performer
path:
  v: MedicationRequest.performer
short:
  v: Intended performer of administration
definition:
  v: The specified desired performer of the medication treatment (e.g. the performer of the medication administration). For devices, this is the device that is intended to perform the administration of the medication. An IV Pump would be an example of a device that is performing the administration. Both the IV Pump and the practitioner that set the rate or bolus on the pump can be listed as performers.
min:
  v: 0
max:
  v: *
base:
  path:
    v: MedicationRequest.performer
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Reference
    l: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Practitioner|5.0.0
    l: http://hl7.org/fhir/StructureDefinition/Practitioner
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/PractitionerRole|5.0.0
    l: http://hl7.org/fhir/StructureDefinition/PractitionerRole
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Organization|5.0.0
    l: http://hl7.org/fhir/StructureDefinition/Organization
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Patient|5.0.0
    l: http://hl7.org/fhir/StructureDefinition/Patient
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/DeviceDefinition|5.0.0
    l: http://hl7.org/fhir/StructureDefinition/DeviceDefinition
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/RelatedPerson|5.0.0
    l: http://hl7.org/fhir/StructureDefinition/RelatedPerson
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/CareTeam|5.0.0
    l: http://hl7.org/fhir/StructureDefinition/CareTeam
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/HealthcareService|5.0.0
    l: http://hl7.org/fhir/StructureDefinition/HealthcareService
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
must support:
  v: false
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: workflow
  map:
    v: Request.performer
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.actor
mapping:
  identity:
    v: rim
  map:
    v: .participation[typeCode=PRF].role[scoper.determinerCode=INSTANCE]

id:
  v: MedicationRequest.device
path:
  v: MedicationRequest.device
short:
  v: Intended type of device for the administration
definition:
  v: The intended type of device that is to be used for the administration of the medication (for example, PCA Pump).
min:
  v: 0
max:
  v: *
base:
  path:
    v: MedicationRequest.device
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: CodeableReference
    l: CodeableReference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/DeviceDefinition|5.0.0
    l: http://hl7.org/fhir/StructureDefinition/DeviceDefinition
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
must support:
  v: false
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: .participation[typeCode=PRF].role[scoper.determinerCode=INSTANCE]

id:
  v: MedicationRequest.recorder
path:
  v: MedicationRequest.recorder
short:
  v: Person who entered the request
definition:
  v: The person who entered the order on behalf of another individual for example in the case of a verbal or a telephone order.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: MedicationRequest.recorder
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Reference
    l: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Practitioner|5.0.0
    l: http://hl7.org/fhir/StructureDefinition/Practitioner
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/PractitionerRole|5.0.0
    l: http://hl7.org/fhir/StructureDefinition/PractitionerRole
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
must support:
  v: false
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.who
mapping:
  identity:
    v: rim
  map:
    v: .participation[typeCode=TRANS].role[classCode=ASSIGNED].code (HealthcareProviderType)

id:
  v: MedicationRequest.reason
path:
  v: MedicationRequest.reason
short:
  v: Reason or indication for this prescription
definition:
  v: The reason or the indication for ordering or not ordering the medication.
comment:
  v: This could be a diagnosis code. If a full condition record exists or additional detail is needed, use reasonReference.
min:
  v: 0
max:
  v: *
base:
  path:
    v: MedicationRequest.reason
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: CodeableReference
    l: CodeableReference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Condition|5.0.0
    l: http://hl7.org/fhir/StructureDefinition/Condition
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Observation|5.0.0
    l: http://hl7.org/fhir/StructureDefinition/Observation
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
must support:
  v: false
is modifier:
  v: false
is summary:
  v: false
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: MedicationRequestReason
  strength:
    v: example
  description:
    v: A coded concept indicating why the medication was ordered.
  value set:
    v: http://hl7.org/fhir/ValueSet/condition-code
    l: condition-code
  additional:
    purpose:
      v: candidate
    value set:
      v: http://terminology.ehdsi.eu/ValueSet/eHDSIIllnessandDisorder
      l: eHDSIIllnessandDisorder
    documentation:
      v: MyHealth@EU crossborder value set for diagnoses. Based on WHO ICD 10.
mapping:
  identity:
    v: workflow
  map:
    v: Request.reason
mapping:
  identity:
    v: script10.6
  map:
    v: Message/Body/NewRx/MedicationPrescribed/Diagnosis/Primary/Value
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.why[x]
mapping:
  identity:
    v: v2
  map:
    v: ORC-16 Order Control Code Reason /RXE-27 Give Indication/RXO-20-Indication / RXD-21 Indication / RXG-22 Indication / RXA-19 Indication
mapping:
  identity:
    v: rim
  map:
    v: reason.observation.reasonCode | reason.observation[code=ASSERTION].value

id:
  v: MedicationRequest.courseOfTherapyType
path:
  v: MedicationRequest.courseOfTherapyType
short:
  v: Overall pattern of medication administration
definition:
  v: The description of the overall pattern of the administration of the medication to the patient.
comment:
  v: This attribute should not be confused with the protocol of the medication.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: MedicationRequest.courseOfTherapyType
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: CodeableConcept
    l: CodeableConcept
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
must support:
  v: false
is modifier:
  v: false
is summary:
  v: false
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: MedicationRequestCourseOfTherapy
  strength:
    v: extensible
  description:
    v: Identifies the overall pattern of medication administratio.
  value set:
    v: http://hl7.org/fhir/ValueSet/medicationrequest-course-of-therapy|5.0.0
    l: http://hl7.org/fhir/ValueSet/medicationrequest-course-of-therapy
mapping:
  identity:
    v: rim
  map:
    v: Act.code where classCode = LIST and moodCode = EVN

id:
  v: MedicationRequest.insurance
path:
  v: MedicationRequest.insurance
short:
  v: Associated insurance coverage
definition:
  v: Insurance plans, coverage extensions, pre-authorizations and/or pre-determinations that may be required for delivering the requested service.
min:
  v: 0
max:
  v: *
base:
  path:
    v: MedicationRequest.insurance
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Reference
    l: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Coverage|5.0.0
    l: http://hl7.org/fhir/StructureDefinition/Coverage
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/ClaimResponse|5.0.0
    l: http://hl7.org/fhir/StructureDefinition/ClaimResponse
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
must support:
  v: false
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: workflow
  map:
    v: Request.insurance
mapping:
  identity:
    v: rim
  map:
    v: .outboundRelationship[typeCode=COVBY].target

id:
  v: MedicationRequest.note
path:
  v: MedicationRequest.note
short:
  v: Information about the prescription
definition:
  v: Extra information about the prescription that could not be conveyed by the other attributes.
min:
  v: 0
max:
  v: *
base:
  path:
    v: MedicationRequest.note
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Annotation
    l: Annotation
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
must support:
  v: false
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: workflow
  map:
    v: Request.note
mapping:
  identity:
    v: script10.6
  map:
    v: Message/Body/NewRx/MedicationPrescribed/Note
mapping:
  identity:
    v: rim
  map:
    v: .inboundRelationship[typeCode=SUBJ]/source[classCode=OBS,moodCode=EVN,code="annotation"].value

id:
  v: MedicationRequest.renderedDosageInstruction
path:
  v: MedicationRequest.renderedDosageInstruction
short:
  v: Full representation of the dosage instructions
definition:
  v: The full representation of the dose of the medication included in all dosage instructions. To be used when multiple dosage instructions are included to represent complex dosing such as increasing or tapering doses.
requirements:
  v: The content of the renderedDosageInstructions must not be different than the dose represented in the dosageInstruction content.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: MedicationRequest.renderedDosageInstruction
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: markdown
    l: markdown
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
must support:
  v: false
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: SubstanceAdministration.text

id:
  v: MedicationRequest.effectiveDosePeriod
path:
  v: MedicationRequest.effectiveDosePeriod
short:
  v: Period over which the medication is to be taken
definition:
  v: The period over which the medication is to be taken. Where there are multiple dosageInstruction lines (for example, tapering doses), this is the earliest date and the latest end date of the dosageInstructions.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: MedicationRequest.effectiveDosePeriod
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Period
    l: Period
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
must support:
  v: false
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: substanceAdministration.effectiveTime

id:
  v: MedicationRequest.dosageInstruction
path:
  v: MedicationRequest.dosageInstruction
short:
  v: How the medication should be taken.
definition:
  v: Specific instructions for how the medication is to be used by the patient.
comment:
  v: There are examples where a medication request may include the option of an oral dose or an Intravenous or Intramuscular dose. For example, "Ondansetron 8mg orally or IV twice a day as needed for nausea" or "Compazine® (prochlorperazine) 5-10mg PO or 25mg PR bid prn nausea or vomiting". In these cases, two medication requests would be created that could be grouped together. The decision on which dose and route of administration to use is based on the patient's condition at the time the dose is needed. In general, each prescribed drug will be a separate Medication Request. When drug orders are grouped together at the time of order entry, but each of the drugs can be manipulated independently e.g. changing the status of one order to "completed" or "cancelled", changing another order status to "on-hold", the method to "group" all of the medication requests together is to use MedicationRequest.groupIdentifier element. All of the orders grouped together in this manner will have the same groupIdentifier, and separately, each order in the group may have a unique identifier. There are cases that require grouping of Medication orders together when it is necessary to specify optionality e.g. order two drugs at one time, but stating either of these drugs may be used to treat the patient. The use of a RequestOrchestration should be used as a parent for the Medication orders that require this type of grouping. An example when it may be necessary to group medication orders together is when you specify timing relationships e.g. order drug "xyz" with dose 123, then taper the same drug to a different dose after some interval of time precedence: e.g. give drug "abc" followed by drug "def" e.g. give drug 30 minutes before some procedure was performed more generically this supports - hierarchical groups of actions, where each specific action references the action to be performed (in terms of a Request resource), and each group describes additional behavior, relationships, and applicable…
min:
  v: 0
max:
  v: *
base:
  path:
    v: MedicationRequest.dosageInstruction
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Dosage
    l: Dosage
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
must support:
  v: false
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: see dosageInstruction mapping

id:
  v: MedicationRequest.dosageInstruction.id
path:
  v: MedicationRequest.dosageInstruction.id
representation:
  v: xmlAttr
short:
  v: Unique id for inter-element referencing
definition:
  v: Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Element.id
  min:
    v: 0
  max:
    v: 1
type:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type
      l: structuredefinition-fhir-type
    value: Url
      v: id
      l: id
  code:
    v: http://hl7.org/fhirpath/System.String
    l: System.String
condition:
  v: ele-1
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: MedicationRequest.dosageInstruction.extension
path:
  v: MedicationRequest.dosageInstruction.extension
slicing:
  discriminator:
    type:
      v: value
    path:
      v: url
  description:
    v: Extensions are always sliced by (at least) url
  rules:
    v: open
short:
  v: Additional content defined by implementations
definition:
  v: May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, 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:
  v: There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
alias:
  v: extensions
alias:
  v: user content
min:
  v: 0
max:
  v: *
base:
  path:
    v: Element.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    l: Extension
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: MedicationRequest.dosageInstruction.modifierExtension
path:
  v: MedicationRequest.dosageInstruction.modifierExtension
short:
  v: Extensions that cannot be ignored even if unrecognized
definition:
  v: 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 managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).
comment:
  v: There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
requirements:
  v: Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored. This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](http://hl7.org/fhir/R5/extensibility.html#modifierExtension).
alias:
  v: extensions
alias:
  v: user content
alias:
  v: modifiers
min:
  v: 0
max:
  v: *
base:
  path:
    v: BackboneType.modifierExtension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    l: Extension
is modifier:
  v: true
is modifier reason:
  v: Modifier extensions are expected to modify the meaning or interpretation of the element that contains them
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: MedicationRequest.dosageInstruction.sequence
path:
  v: MedicationRequest.dosageInstruction.sequence
short:
  v: The order of the dosage instructions
definition:
  v: Indicates the order in which the dosage instructions should be applied or interpreted.
requirements:
  v: 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:
  v: 0
max:
  v: 1
base:
  path:
    v: Dosage.sequence
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: integer
    l: integer
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: v2
  map:
    v: TQ1-1
mapping:
  identity:
    v: rim
  map:
    v: .text

id:
  v: MedicationRequest.dosageInstruction.text
path:
  v: MedicationRequest.dosageInstruction.text
short:
  v: Free text dosage instructions
definition:
  v: Free text dosage instructions e.g. SIG.
requirements:
  v: 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:
  v: 0
max:
  v: 1
base:
  path:
    v: Dosage.text
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: v2
  map:
    v: RXO-6; RXE-21
mapping:
  identity:
    v: rim
  map:
    v: .text

id:
  v: MedicationRequest.dosageInstruction.additionalInstruction
path:
  v: MedicationRequest.dosageInstruction.additionalInstruction
short:
  v: Supplemental instruction or warnings to the patient - e.g. "with meals", "may cause drowsiness"
definition:
  v: Supplemental instructions to the patient on how to take the medication (e.g. "with meals" or"take half to one hour before food") or warnings for the patient about the medication (e.g. "may cause drowsiness" or "avoid exposure of skin to direct sunlight or sunlamps").
comment:
  v: Information about administration or preparation of the medication (e.g. "infuse as rapidly as possibly via intraperitoneal port" or take "immediately following drug x") should be populated in dosage.text.
requirements:
  v: 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:
  v: 0
max:
  v: *
base:
  path:
    v: Dosage.additionalInstruction
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: CodeableConcept
    l: CodeableConcept
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: AdditionalInstruction
  strength:
    v: example
  description:
    v: A coded concept identifying additional instructions such as "take with water" or "avoid operating heavy machinery".
  value set:
    v: http://hl7.org/fhir/ValueSet/additional-instruction-codes|5.0.0
    l: http://hl7.org/fhir/ValueSet/additional-instruction-codes
mapping:
  identity:
    v: v2
  map:
    v: RXO-7
mapping:
  identity:
    v: rim
  map:
    v: .text

id:
  v: MedicationRequest.dosageInstruction.patientInstruction
path:
  v: MedicationRequest.dosageInstruction.patientInstruction
short:
  v: Patient or consumer oriented instructions
definition:
  v: Instructions in terms that are understood by the patient or consumer.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Dosage.patientInstruction
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: v2
  map:
    v: RXO-7
mapping:
  identity:
    v: rim
  map:
    v: .text

id:
  v: MedicationRequest.dosageInstruction.timing
path:
  v: MedicationRequest.dosageInstruction.timing
short:
  v: Administration schedule
definition:
  v: When medication should be administered.
comment:
  v: 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:
  v: 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:
  v: 0
max:
  v: 1
base:
  path:
    v: Dosage.timing
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Timing
    l: Timing
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: .effectiveTime

id:
  v: MedicationRequest.dosageInstruction.timing.id
path:
  v: MedicationRequest.dosageInstruction.timing.id
representation:
  v: xmlAttr
short:
  v: Unique id for inter-element referencing
definition:
  v: Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Element.id
  min:
    v: 0
  max:
    v: 1
type:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type
      l: structuredefinition-fhir-type
    value: Url
      v: id
      l: id
  code:
    v: http://hl7.org/fhirpath/System.String
    l: System.String
condition:
  v: ele-1
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: MedicationRequest.dosageInstruction.timing.extension
path:
  v: MedicationRequest.dosageInstruction.timing.extension
slicing:
  discriminator:
    type:
      v: value
    path:
      v: url
  description:
    v: Extensions are always sliced by (at least) url
  rules:
    v: open
short:
  v: Additional content defined by implementations
definition:
  v: May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, 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:
  v: There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
alias:
  v: extensions
alias:
  v: user content
min:
  v: 0
max:
  v: *
base:
  path:
    v: Element.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    l: Extension
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: MedicationRequest.dosageInstruction.timing.modifierExtension
path:
  v: MedicationRequest.dosageInstruction.timing.modifierExtension
short:
  v: Extensions that cannot be ignored even if unrecognized
definition:
  v: 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 managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).
comment:
  v: There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
requirements:
  v: Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored. This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](http://hl7.org/fhir/R5/extensibility.html#modifierExtension).
alias:
  v: extensions
alias:
  v: user content
alias:
  v: modifiers
min:
  v: 0
max:
  v: *
base:
  path:
    v: BackboneType.modifierExtension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    l: Extension
is modifier:
  v: true
is modifier reason:
  v: Modifier extensions are expected to modify the meaning or interpretation of the element that contains them
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: MedicationRequest.dosageInstruction.timing.event
path:
  v: MedicationRequest.dosageInstruction.timing.event
short:
  v: When the event occurs
definition:
  v: Identifies specific times when the event occurs.
requirements:
  v: In a Medication Administration Record, for instance, you need to take a general specification, and turn it into a precise specification.
min:
  v: 0
max:
  v: *
base:
  path:
    v: Timing.event
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: dateTime
    l: dateTime
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: QLIST<TS>

id:
  v: MedicationRequest.dosageInstruction.timing.repeat
path:
  v: MedicationRequest.dosageInstruction.timing.repeat
short:
  v: When the event is to occur
definition:
  v: A set of rules that describe when the event is scheduled.
requirements:
  v: Many timing schedules are determined by regular repetitions.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Timing.repeat
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Element
    l: Element
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
constraint:
  key:
    v: tim-1
  severity:
    v: error
  human:
    v: if there's a duration, there needs to be duration units
  expression:
    v: duration.empty() or durationUnit.exists()
  source:
    v: http://hl7.org/fhir/StructureDefinition/Timing
    l: Timing
constraint:
  key:
    v: tim-2
  severity:
    v: error
  human:
    v: if there's a period, there needs to be period units
  expression:
    v: period.empty() or periodUnit.exists()
  source:
    v: http://hl7.org/fhir/StructureDefinition/Timing
    l: Timing
constraint:
  key:
    v: tim-4
  severity:
    v: error
  human:
    v: duration SHALL be a non-negative value
  expression:
    v: duration.exists() implies duration >= 0
  source:
    v: http://hl7.org/fhir/StructureDefinition/Timing
    l: Timing
constraint:
  key:
    v: tim-5
  severity:
    v: error
  human:
    v: period SHALL be a non-negative value
  expression:
    v: period.exists() implies period >= 0
  source:
    v: http://hl7.org/fhir/StructureDefinition/Timing
    l: Timing
constraint:
  key:
    v: tim-6
  severity:
    v: error
  human:
    v: If there's a periodMax, there must be a period
  expression:
    v: periodMax.empty() or period.exists()
  source:
    v: http://hl7.org/fhir/StructureDefinition/Timing
    l: Timing
constraint:
  key:
    v: tim-7
  severity:
    v: error
  human:
    v: If there's a durationMax, there must be a duration
  expression:
    v: durationMax.empty() or duration.exists()
  source:
    v: http://hl7.org/fhir/StructureDefinition/Timing
    l: Timing
constraint:
  key:
    v: tim-8
  severity:
    v: error
  human:
    v: If there's a countMax, there must be a count
  expression:
    v: countMax.empty() or count.exists()
  source:
    v: http://hl7.org/fhir/StructureDefinition/Timing
    l: Timing
constraint:
  key:
    v: tim-9
  severity:
    v: error
  human:
    v: If there's an offset, there must be a when (and not C, CM, CD, CV)
  expression:
    v: offset.empty() or (when.exists() and when.select($this in ('C' | 'CM' | 'CD' | 'CV')).allFalse())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Timing
    l: Timing
constraint:
  key:
    v: tim-10
  severity:
    v: error
  human:
    v: If there's a timeOfDay, there cannot be a when, or vice versa
  expression:
    v: timeOfDay.empty() or when.empty()
  source:
    v: http://hl7.org/fhir/StructureDefinition/Timing
    l: Timing
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: Implies PIVL or EIVL

id:
  v: MedicationRequest.dosageInstruction.timing.repeat.id
path:
  v: MedicationRequest.dosageInstruction.timing.repeat.id
representation:
  v: xmlAttr
short:
  v: Unique id for inter-element referencing
definition:
  v: Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Element.id
  min:
    v: 0
  max:
    v: 1
type:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type
      l: structuredefinition-fhir-type
    value: Url
      v: string
      l: string
  code:
    v: http://hl7.org/fhirpath/System.String
    l: System.String
condition:
  v: ele-1
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: MedicationRequest.dosageInstruction.timing.repeat.extension
path:
  v: MedicationRequest.dosageInstruction.timing.repeat.extension
slicing:
  discriminator:
    type:
      v: value
    path:
      v: url
  description:
    v: Extensions are always sliced by (at least) url
  rules:
    v: open
short:
  v: Additional content defined by implementations
definition:
  v: May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, 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:
  v: There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
alias:
  v: extensions
alias:
  v: user content
min:
  v: 0
max:
  v: *
base:
  path:
    v: Element.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    l: Extension
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: MedicationRequest.dosageInstruction.timing.repeat.bounds[x]
path:
  v: MedicationRequest.dosageInstruction.timing.repeat.bounds[x]
short:
  v: Length/Range of lengths, or (Start and/or end) limits
definition:
  v: 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:
  v: 0
max:
  v: 1
base:
  path:
    v: Timing.repeat.bounds[x]
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Duration
    l: Duration
type:
  code:
    v: Range
    l: Range
type:
  code:
    v: Period
    l: Period
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: IVL(TS) used in a QSI

id:
  v: MedicationRequest.dosageInstruction.timing.repeat.count
path:
  v: MedicationRequest.dosageInstruction.timing.repeat.count
short:
  v: Number of times to repeat
definition:
  v: 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:
  v: If you have both bounds and count, then this should be understood as within the bounds period, until count times happens.
requirements:
  v: Repetitions may be limited by end time or total occurrences.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Timing.repeat.count
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: positiveInt
    l: positiveInt
condition:
  v: tim-8
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: PIVL.count

id:
  v: MedicationRequest.dosageInstruction.timing.repeat.countMax
path:
  v: MedicationRequest.dosageInstruction.timing.repeat.countMax
short:
  v: Maximum number of times to repeat
definition:
  v: If present, indicates that the count is a range - so to perform the action between [count] and [countMax] times.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Timing.repeat.countMax
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: positiveInt
    l: positiveInt
condition:
  v: tim-8
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: PIVL.count

id:
  v: MedicationRequest.dosageInstruction.timing.repeat.duration
path:
  v: MedicationRequest.dosageInstruction.timing.repeat.duration
short:
  v: Duration of the treatment
definition:
  v: 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:
  v: 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:
  v: Some activities are not instantaneous and need to be maintained for a period of time.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Timing.repeat.duration
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: decimal
    l: decimal
condition:
  v: tim-7
condition:
  v: tim-1
condition:
  v: tim-4
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: PIVL.phase

id:
  v: MedicationRequest.dosageInstruction.timing.repeat.durationMax
path:
  v: MedicationRequest.dosageInstruction.timing.repeat.durationMax
short:
  v: How long when it happens (Max)
definition:
  v: If present, indicates that the duration is a range - so to perform the action between [duration] and [durationMax] time length.
comment:
  v: 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:
  v: Some activities are not instantaneous and need to be maintained for a period of time.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Timing.repeat.durationMax
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: decimal
    l: decimal
condition:
  v: tim-7
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: PIVL.phase

id:
  v: MedicationRequest.dosageInstruction.timing.repeat.durationUnit
path:
  v: MedicationRequest.dosageInstruction.timing.repeat.durationUnit
short:
  v: s | min | h | d | wk | mo | a - unit of time (UCUM)
definition:
  v: The units of time for the duration, in UCUM units Normal practice is to use the 'mo' code as a calendar month when calculating the next occurrence.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Timing.repeat.durationUnit
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: code
    l: code
condition:
  v: tim-1
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: UnitsOfTime
  strength:
    v: required
  description:
    v: A unit of time (units from UCUM).
  value set:
    v: http://hl7.org/fhir/ValueSet/units-of-time|5.0.0
    l: http://hl7.org/fhir/ValueSet/units-of-time
mapping:
  identity:
    v: rim
  map:
    v: PIVL.phase.unit

id:
  v: MedicationRequest.dosageInstruction.timing.repeat.frequency
path:
  v: MedicationRequest.dosageInstruction.timing.repeat.frequency
short:
  v: Frequency times per period
definition:
  v: 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.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Timing.repeat.frequency
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: positiveInt
    l: positiveInt
meaning when missing:
  v: If no frequency is stated, the assumption is that the event occurs once per period, but systems SHOULD always be specific about this
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: PIVL.phase

id:
  v: MedicationRequest.dosageInstruction.timing.repeat.frequencyMax
path:
  v: MedicationRequest.dosageInstruction.timing.repeat.frequencyMax
short:
  v: Event occurs up to frequencyMax times per period
definition:
  v: If present, indicates that the frequency is a range - so to repeat between [frequency] and [frequencyMax] times within the period or period range.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Timing.repeat.frequencyMax
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: positiveInt
    l: positiveInt
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: PIVL.phase

id:
  v: MedicationRequest.dosageInstruction.timing.repeat.period
path:
  v: MedicationRequest.dosageInstruction.timing.repeat.period
short:
  v: Duration of time over which repetitions are to occur
definition:
  v: 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.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Timing.repeat.period
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: decimal
    l: decimal
condition:
  v: tim-6
condition:
  v: tim-5
condition:
  v: tim-2
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: PIVL.phase

id:
  v: MedicationRequest.dosageInstruction.timing.repeat.periodMax
path:
  v: MedicationRequest.dosageInstruction.timing.repeat.periodMax
short:
  v: Upper limit of period (3-4 hours)
definition:
  v: 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.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Timing.repeat.periodMax
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: decimal
    l: decimal
condition:
  v: tim-6
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: PIVL.phase

id:
  v: MedicationRequest.dosageInstruction.timing.repeat.periodUnit
path:
  v: MedicationRequest.dosageInstruction.timing.repeat.periodUnit
short:
  v: Unit of the period (e.g. day)
definition:
  v: The units of time for the period in UCUM units Normal practice is to use the 'mo' code as a calendar month when calculating the next occurrence.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Timing.repeat.periodUnit
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: code
    l: code
condition:
  v: tim-2
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: UnitsOfTime
  strength:
    v: required
  description:
    v: A unit of time (units from UCUM).
  value set:
    v: http://hl7.org/fhir/ValueSet/units-of-time|5.0.0
    l: http://hl7.org/fhir/ValueSet/units-of-time
mapping:
  identity:
    v: rim
  map:
    v: PIVL.phase.unit

id:
  v: MedicationRequest.dosageInstruction.timing.repeat.dayOfWeek
path:
  v: MedicationRequest.dosageInstruction.timing.repeat.dayOfWeek
short:
  v: mon | tue | wed | thu | fri | sat | sun
definition:
  v: If one or more days of week is provided, then the action happens only on the specified day(s).
comment:
  v: If no days are specified, the action is assumed to happen every day as otherwise specified.
min:
  v: 0
max:
  v: *
base:
  path:
    v: Timing.repeat.dayOfWeek
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: code
    l: code
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: DayOfWeek
  strength:
    v: required
  value set:
    v: http://hl7.org/fhir/ValueSet/days-of-week|5.0.0
    l: http://hl7.org/fhir/ValueSet/days-of-week
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: MedicationRequest.dosageInstruction.timing.repeat.timeOfDay
path:
  v: MedicationRequest.dosageInstruction.timing.repeat.timeOfDay
short:
  v: Time of day for action
definition:
  v: Specified time of day for action to take place.
comment:
  v: When time of day is specified, it is inferred that the action happens every day (as filtered by dayofWeek) on the specified times. If there's a timeOfDay, there cannot be a when, or vice versa.
min:
  v: 0
max:
  v: *
base:
  path:
    v: Timing.repeat.timeOfDay
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: time
    l: time
condition:
  v: tim-10
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: MedicationRequest.dosageInstruction.timing.repeat.when
path:
  v: MedicationRequest.dosageInstruction.timing.repeat.when
short:
  v: Code for time period of occurrence
definition:
  v: An approximate time period during the day, potentially linked to an event of daily living that indicates when the action should occur.
comment:
  v: When more than one event is listed, the event is tied to the union of the specified events.
requirements:
  v: Timings are frequently determined by occurrences such as waking, eating and sleep.
min:
  v: 0
max:
  v: *
base:
  path:
    v: Timing.repeat.when
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: code
    l: code
condition:
  v: tim-9
condition:
  v: tim-10
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: EventTiming
  strength:
    v: required
  description:
    v: Real-world event relating to the schedule.
  value set:
    v: http://hl7.org/fhir/ValueSet/event-timing|5.0.0
    l: http://hl7.org/fhir/ValueSet/event-timing
mapping:
  identity:
    v: rim
  map:
    v: EIVL.event

id:
  v: MedicationRequest.dosageInstruction.timing.repeat.offset
path:
  v: MedicationRequest.dosageInstruction.timing.repeat.offset
short:
  v: Minutes from event (before or after)
definition:
  v: 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.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Timing.repeat.offset
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: unsignedInt
    l: unsignedInt
condition:
  v: tim-9
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: EIVL.offset

id:
  v: MedicationRequest.dosageInstruction.timing.code
path:
  v: MedicationRequest.dosageInstruction.timing.code
short:
  v: A code for the timing schedule.
definition:
  v: 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:
  v: 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:
  v: 0
max:
  v: 1
base:
  path:
    v: Timing.code
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: CodeableConcept
    l: CodeableConcept
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: TimingAbbreviation
  strength:
    v: preferred
  description:
    v: Code for a known / defined timing pattern.
  value set:
    v: http://hl7.org/fhir/ValueSet/timing-abbreviation|5.0.0
    l: http://hl7.org/fhir/ValueSet/timing-abbreviation
mapping:
  identity:
    v: rim
  map:
    v: QSC.code

id:
  v: MedicationRequest.dosageInstruction.asNeeded
path:
  v: MedicationRequest.dosageInstruction.asNeeded
short:
  v: Take "as needed"
definition:
  v: Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option).
comment:
  v: Can express "as needed" without a reason by setting the Boolean = True. In this case the CodeableConcept is not populated.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Dosage.asNeeded
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: boolean
    l: boolean
condition:
  v: dos-1
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: v2
  map:
    v: TQ1-9
mapping:
  identity:
    v: rim
  map:
    v: .outboundRelationship[typeCode=PRCN].target[classCode=OBS, moodCode=EVN, code="as needed"].value=boolean or codable concept

id:
  v: MedicationRequest.dosageInstruction.asNeededFor
path:
  v: MedicationRequest.dosageInstruction.asNeededFor
short:
  v: Take "as needed" (for x)
definition:
  v: Indicates whether the Medication is only taken based on a precondition for taking the Medication (CodeableConcept).
comment:
  v: Can express "as needed" with a reason by including the CodeableConcept. In this case the Boolean is assumed to be False, then the dose is given according to the schedule and is not "prn" or "as needed".
min:
  v: 0
max:
  v: *
base:
  path:
    v: Dosage.asNeededFor
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: CodeableConcept
    l: CodeableConcept
condition:
  v: dos-1
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: MedicationAsNeededReason
  strength:
    v: example
  description:
    v: 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.
  value set:
    v: http://hl7.org/fhir/ValueSet/medication-as-needed-reason|5.0.0
    l: http://hl7.org/fhir/ValueSet/medication-as-needed-reason
mapping:
  identity:
    v: v2
  map:
    v: TQ1-9
mapping:
  identity:
    v: rim
  map:
    v: .outboundRelationship[typeCode=PRCN].target[classCode=OBS, moodCode=EVN, code="as needed"].value=boolean or codable concept

id:
  v: MedicationRequest.dosageInstruction.site
path:
  v: MedicationRequest.dosageInstruction.site
short:
  v: Body site to administer to
definition:
  v: Body site to administer to.
comment:
  v: If the use case requires attributes from the BodySite resource (e.g. to identify and track separately) then use the standard extension [http://hl7.org/fhir/StructureDefinition/bodySite](http://hl7.org/fhir/extensions/StructureDefinition-bodySite.html). May be a summary code, or a reference to a very precise definition of the location, or both.
requirements:
  v: A coded specification of the anatomic site where the medication first enters the body.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Dosage.site
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: CodeableConcept
    l: CodeableConcept
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: MedicationAdministrationSite
  strength:
    v: example
  description:
    v: A coded concept describing the site location the medicine enters into or onto the body.
  value set:
    v: http://hl7.org/fhir/ValueSet/approach-site-codes|5.0.0
    l: http://hl7.org/fhir/ValueSet/approach-site-codes
mapping:
  identity:
    v: v2
  map:
    v: RXR-2
mapping:
  identity:
    v: rim
  map:
    v: .approachSiteCode

id:
  v: MedicationRequest.dosageInstruction.route
path:
  v: MedicationRequest.dosageInstruction.route
short:
  v: Route of administration
definition:
  v: How drug should enter body.
requirements:
  v: A code specifying the route or physiological path of administration of a therapeutic agent into or onto a patient's body.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Dosage.route
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: CodeableConcept
    l: CodeableConcept
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: RouteOfAdministration
  strength:
    v: example
  description:
    v: A coded concept describing the route or physiological path of administration of a therapeutic agent into or onto the body of a subject.
  value set:
    v: http://hl7.org/fhir/ValueSet/route-codes|5.0.0
    l: http://hl7.org/fhir/ValueSet/route-codes
mapping:
  identity:
    v: v2
  map:
    v: RXR-1
mapping:
  identity:
    v: rim
  map:
    v: .routeCode

id:
  v: MedicationRequest.dosageInstruction.method
path:
  v: MedicationRequest.dosageInstruction.method
short:
  v: Technique for administering medication
definition:
  v: Technique for administering medication.
comment:
  v: Terminologies used often pre-coordinate this term with the route and or form of administration.
requirements:
  v: 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:
  v: 0
max:
  v: 1
base:
  path:
    v: Dosage.method
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: CodeableConcept
    l: CodeableConcept
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: MedicationAdministrationMethod
  strength:
    v: example
  description:
    v: A coded concept describing the technique by which the medicine is administered.
  value set:
    v: http://hl7.org/fhir/ValueSet/administration-method-codes|5.0.0
    l: http://hl7.org/fhir/ValueSet/administration-method-codes
mapping:
  identity:
    v: v2
  map:
    v: RXR-4
mapping:
  identity:
    v: rim
  map:
    v: SubstanceAdministration.methodCode

id:
  v: MedicationRequest.dosageInstruction.doseAndRate
path:
  v: MedicationRequest.dosageInstruction.doseAndRate
short:
  v: Amount of medication administered, to be administered or typical amount to be administered
definition:
  v: Depending on the resource,this is the amount of medication administered, to be administered or typical amount to be administered.
min:
  v: 0
max:
  v: *
base:
  path:
    v: Dosage.doseAndRate
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Element
    l: Element
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: v2
  map:
    v: TQ1-2
mapping:
  identity:
    v: rim
  map:
    v: SubstanceAdministration.doseQuantity; SubstanceAdministration.RateQuantity

id:
  v: MedicationRequest.dosageInstruction.doseAndRate.id
path:
  v: MedicationRequest.dosageInstruction.doseAndRate.id
representation:
  v: xmlAttr
short:
  v: Unique id for inter-element referencing
definition:
  v: Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Element.id
  min:
    v: 0
  max:
    v: 1
type:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type
      l: structuredefinition-fhir-type
    value: Url
      v: string
      l: string
  code:
    v: http://hl7.org/fhirpath/System.String
    l: System.String
condition:
  v: ele-1
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: MedicationRequest.dosageInstruction.doseAndRate.extension
path:
  v: MedicationRequest.dosageInstruction.doseAndRate.extension
slicing:
  discriminator:
    type:
      v: value
    path:
      v: url
  description:
    v: Extensions are always sliced by (at least) url
  rules:
    v: open
short:
  v: Additional content defined by implementations
definition:
  v: May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, 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:
  v: There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
alias:
  v: extensions
alias:
  v: user content
min:
  v: 0
max:
  v: *
base:
  path:
    v: Element.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    l: Extension
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: MedicationRequest.dosageInstruction.doseAndRate.type
path:
  v: MedicationRequest.dosageInstruction.doseAndRate.type
short:
  v: The kind of dose or rate specified
definition:
  v: The kind of dose or rate specified, for example, ordered or calculated.
requirements:
  v: If the type is not populated, assume to be "ordered".
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Dosage.doseAndRate.type
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: CodeableConcept
    l: CodeableConcept
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: DoseAndRateType
  strength:
    v: example
  description:
    v: The kind of dose or rate specified.
  value set:
    v: http://terminology.hl7.org/ValueSet/dose-rate-type
    l: dose-rate-type
mapping:
  identity:
    v: v2
  map:
    v: RXO-21; RXE-23

id:
  v: MedicationRequest.dosageInstruction.doseAndRate.dose[x]
path:
  v: MedicationRequest.dosageInstruction.doseAndRate.dose[x]
slicing:
  discriminator:
    type:
      v: type
    path:
      v: $this
  ordered:
    v: false
  rules:
    v: open
short:
  v: Amount of medication per dose
definition:
  v: Amount of medication per dose.
comment:
  v: 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:
  v: The amount of therapeutic or other substance given at one administration event.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Dosage.doseAndRate.dose[x]
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Range
    l: Range
type:
  code:
    v: Quantity
    l: Quantity
  profile:
    v: http://hl7.org/fhir/StructureDefinition/SimpleQuantity|5.0.0
    l: http://hl7.org/fhir/StructureDefinition/SimpleQuantity
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: v2
  map:
    v: RXO-2, RXE-3
mapping:
  identity:
    v: rim
  map:
    v: .doseQuantity

id:
  v: MedicationRequest.dosageInstruction.doseAndRate.dose[x]:doseQuantity
path:
  v: MedicationRequest.dosageInstruction.doseAndRate.dose[x]
slice name:
  v: doseQuantity
short:
  v: Amount of medication per dose
definition:
  v: Amount of medication per dose.
comment:
  v: 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:
  v: The amount of therapeutic or other substance given at one administration event.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Dosage.doseAndRate.dose[x]
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Quantity
    l: Quantity
  profile:
    v: http://hl7.org/fhir/StructureDefinition/SimpleQuantity
    l: SimpleQuantity
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: v2
  map:
    v: RXO-2, RXE-3
mapping:
  identity:
    v: rim
  map:
    v: .doseQuantity

id:
  v: MedicationRequest.dosageInstruction.doseAndRate.rate[x]
path:
  v: MedicationRequest.dosageInstruction.doseAndRate.rate[x]
short:
  v: Amount of medication per unit of time
definition:
  v: Amount of medication per unit of time.
comment:
  v: 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. It is possible to specify a rate over time (for example, 100 ml/hour) using either the rateRatio and rateQuantity. The rateQuantity approach requires systems to have the capability to parse UCUM grammar 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:
  v: 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:
  v: 0
max:
  v: 1
base:
  path:
    v: Dosage.doseAndRate.rate[x]
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Ratio
    l: Ratio
type:
  code:
    v: Range
    l: Range
type:
  code:
    v: Quantity
    l: Quantity
  profile:
    v: http://hl7.org/fhir/StructureDefinition/SimpleQuantity|5.0.0
    l: http://hl7.org/fhir/StructureDefinition/SimpleQuantity
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: v2
  map:
    v: RXE22, RXE23, RXE-24
mapping:
  identity:
    v: rim
  map:
    v: .rateQuantity

id:
  v: MedicationRequest.dosageInstruction.maxDosePerPeriod
path:
  v: MedicationRequest.dosageInstruction.maxDosePerPeriod
short:
  v: Upper limit on medication per unit of time
definition:
  v: Upper limit on medication per unit of time.
comment:
  v: 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:
  v: 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:
  v: 0
max:
  v: *
base:
  path:
    v: Dosage.maxDosePerPeriod
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Ratio
    l: Ratio
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: v2
  map:
    v: RXO-23, RXE-19
mapping:
  identity:
    v: rim
  map:
    v: .maxDoseQuantity

id:
  v: MedicationRequest.dosageInstruction.maxDosePerAdministration
path:
  v: MedicationRequest.dosageInstruction.maxDosePerAdministration
short:
  v: Upper limit on medication per administration
definition:
  v: Upper limit on medication per administration.
comment:
  v: 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:
  v: The maximum total quantity of a therapeutic substance that may be administered to a subject per administration.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Dosage.maxDosePerAdministration
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Quantity
    l: Quantity
  profile:
    v: http://hl7.org/fhir/StructureDefinition/SimpleQuantity|5.0.0
    l: http://hl7.org/fhir/StructureDefinition/SimpleQuantity
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: not supported

id:
  v: MedicationRequest.dosageInstruction.maxDosePerLifetime
path:
  v: MedicationRequest.dosageInstruction.maxDosePerLifetime
short:
  v: Upper limit on medication per lifetime of the patient
definition:
  v: Upper limit on medication per lifetime of the patient.
requirements:
  v: The maximum total quantity of a therapeutic substance that may be administered per lifetime of the subject.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Dosage.maxDosePerLifetime
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Quantity
    l: Quantity
  profile:
    v: http://hl7.org/fhir/StructureDefinition/SimpleQuantity|5.0.0
    l: http://hl7.org/fhir/StructureDefinition/SimpleQuantity
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: not supported

id:
  v: MedicationRequest.dispenseRequest
path:
  v: MedicationRequest.dispenseRequest
short:
  v: Medication supply authorization
definition:
  v: Indicates the specific details for the dispense or medication supply part of a medication request (also known as a Medication Prescription or Medication Order). Note that this information is not always sent with the order. There may be in some settings (e.g. hospitals) institutional or system support for completing the dispense details in the pharmacy department.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: MedicationRequest.dispenseRequest
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: BackboneElement
    l: BackboneElement
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
must support:
  v: false
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: script10.6
  map:
    v: Message/Body/NewRx/MedicationPrescribed/ExpirationDate
mapping:
  identity:
    v: rim
  map:
    v: component.supplyEvent

id:
  v: MedicationRequest.dispenseRequest.id
path:
  v: MedicationRequest.dispenseRequest.id
representation:
  v: xmlAttr
short:
  v: Unique id for inter-element referencing
definition:
  v: Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Element.id
  min:
    v: 0
  max:
    v: 1
type:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type
      l: structuredefinition-fhir-type
    value: Url
      v: string
      l: string
  code:
    v: http://hl7.org/fhirpath/System.String
    l: System.String
condition:
  v: ele-1
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: MedicationRequest.dispenseRequest.extension
path:
  v: MedicationRequest.dispenseRequest.extension
slicing:
  discriminator:
    type:
      v: value
    path:
      v: url
  ordered:
    v: false
  rules:
    v: open
short:
  v: Extension
definition:
  v: An Extension
min:
  v: 0
max:
  v: *
base:
  path:
    v: Element.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    l: Extension
is modifier:
  v: false
is summary:
  v: false

id:
  v: MedicationRequest.dispenseRequest.extension:prescribedQuantity
path:
  v: MedicationRequest.dispenseRequest.extension
slice name:
  v: prescribedQuantity
short:
  v: Overall amount of product prescribed, independent from the number of repeats.
definition:
  v: When Medication resource implies a pack size, prescribedQuantity should convey number of packages. When the Medication does not imply an amount, overall amount could be in tablets or millilitres.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Element.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
  profile:
    v: https://profiles.ihe.net/PHARM/MPD/StructureDefinition/ihe-ext-medicationrequest-prescribedQuantity
    l: ihe-ext-medicationrequest-prescribedQuantity
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    l: Extension
is modifier:
  v: false
is summary:
  v: false

id:
  v: MedicationRequest.dispenseRequest.modifierExtension
path:
  v: MedicationRequest.dispenseRequest.modifierExtension
short:
  v: Extensions that cannot be ignored even if unrecognized
definition:
  v: 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 managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).
comment:
  v: There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
requirements:
  v: Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored. This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](http://hl7.org/fhir/R5/extensibility.html#modifierExtension).
alias:
  v: extensions
alias:
  v: user content
alias:
  v: modifiers
min:
  v: 0
max:
  v: *
base:
  path:
    v: BackboneElement.modifierExtension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    l: Extension
is modifier:
  v: true
is modifier reason:
  v: Modifier extensions are expected to modify the meaning or interpretation of the element that contains them
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: MedicationRequest.dispenseRequest.initialFill
path:
  v: MedicationRequest.dispenseRequest.initialFill
short:
  v: First fill details
definition:
  v: Indicates the quantity or duration for the first dispense of the medication.
comment:
  v: If populating this element, either the quantity or the duration must be included.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: MedicationRequest.dispenseRequest.initialFill
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: BackboneElement
    l: BackboneElement
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
must support:
  v: false
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: SubstanceAdministration -> ActRelationship[sequenceNumber = '1'] -> Supply

id:
  v: MedicationRequest.dispenseRequest.initialFill.id
path:
  v: MedicationRequest.dispenseRequest.initialFill.id
representation:
  v: xmlAttr
short:
  v: Unique id for inter-element referencing
definition:
  v: Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Element.id
  min:
    v: 0
  max:
    v: 1
type:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type
      l: structuredefinition-fhir-type
    value: Url
      v: string
      l: string
  code:
    v: http://hl7.org/fhirpath/System.String
    l: System.String
condition:
  v: ele-1
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: MedicationRequest.dispenseRequest.initialFill.extension
path:
  v: MedicationRequest.dispenseRequest.initialFill.extension
short:
  v: Additional content defined by implementations
definition:
  v: May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, 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:
  v: There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
alias:
  v: extensions
alias:
  v: user content
min:
  v: 0
max:
  v: *
base:
  path:
    v: Element.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    l: Extension
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: MedicationRequest.dispenseRequest.initialFill.modifierExtension
path:
  v: MedicationRequest.dispenseRequest.initialFill.modifierExtension
short:
  v: Extensions that cannot be ignored even if unrecognized
definition:
  v: 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 managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).
comment:
  v: There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
requirements:
  v: Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored. This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](http://hl7.org/fhir/R5/extensibility.html#modifierExtension).
alias:
  v: extensions
alias:
  v: user content
alias:
  v: modifiers
min:
  v: 0
max:
  v: *
base:
  path:
    v: BackboneElement.modifierExtension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    l: Extension
is modifier:
  v: true
is modifier reason:
  v: Modifier extensions are expected to modify the meaning or interpretation of the element that contains them
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: MedicationRequest.dispenseRequest.initialFill.quantity
path:
  v: MedicationRequest.dispenseRequest.initialFill.quantity
short:
  v: First fill quantity
definition:
  v: The amount or quantity to provide as part of the first dispense.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: MedicationRequest.dispenseRequest.initialFill.quantity
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Quantity
    l: Quantity
  profile:
    v: http://hl7.org/fhir/StructureDefinition/SimpleQuantity|5.0.0
    l: http://hl7.org/fhir/StructureDefinition/SimpleQuantity
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
must support:
  v: false
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: Supply.quantity[moodCode=RQO]

id:
  v: MedicationRequest.dispenseRequest.initialFill.duration
path:
  v: MedicationRequest.dispenseRequest.initialFill.duration
short:
  v: First fill duration
definition:
  v: The length of time that the first dispense is expected to last.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: MedicationRequest.dispenseRequest.initialFill.duration
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Duration
    l: Duration
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
must support:
  v: false
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: Supply.effectivetime[moodCode=RQO]

id:
  v: MedicationRequest.dispenseRequest.dispenseInterval
path:
  v: MedicationRequest.dispenseRequest.dispenseInterval
short:
  v: Minimum period of time between dispenses
definition:
  v: The minimum period of time that must occur between dispenses of the medication.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: MedicationRequest.dispenseRequest.dispenseInterval
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Duration
    l: Duration
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
must support:
  v: false
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: Supply.effectivetime[moodCode=RQO]

id:
  v: MedicationRequest.dispenseRequest.validityPeriod
path:
  v: MedicationRequest.dispenseRequest.validityPeriod
short:
  v: Time period supply is authorized for
definition:
  v: This indicates the validity period of a prescription (stale dating the Prescription).
comment:
  v: It reflects the prescribers' perspective for the validity of the prescription. Dispenses must not be made against the prescription outside of this period. The lower-bound of the Dispensing Window signifies the earliest date that the prescription can be filled for the first time. If an upper-bound is not specified then the Prescription is open-ended or will default to a stale-date based on regulations.
requirements:
  v: Indicates when the Prescription becomes valid, and when it ceases to be a dispensable Prescription.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: MedicationRequest.dispenseRequest.validityPeriod
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Period
    l: Period
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
must support:
  v: false
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: script10.6
  map:
    v: Message/Body/NewRx/MedicationPrescribed/Refills
mapping:
  identity:
    v: rim
  map:
    v: effectiveTime

id:
  v: MedicationRequest.dispenseRequest.numberOfRepeatsAllowed
path:
  v: MedicationRequest.dispenseRequest.numberOfRepeatsAllowed
short:
  v: Number of refills authorized
definition:
  v: An integer indicating the number of times, in addition to the original dispense, (aka refills or repeats) that the patient can receive the prescribed medication. Usage Notes: This integer does not include the original order dispense. This means that if an order indicates dispense 30 tablets plus "3 repeats", then the order can be dispensed a total of 4 times and the patient can receive a total of 120 tablets. A prescriber may explicitly say that zero refills are permitted after the initial dispense.
comment:
  v: If displaying "number of authorized fills", add 1 to this number.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: MedicationRequest.dispenseRequest.numberOfRepeatsAllowed
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: unsignedInt
    l: unsignedInt
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
must support:
  v: false
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: script10.6
  map:
    v: Message/Body/NewRx/MedicationPrescribed/Quantity
mapping:
  identity:
    v: v2
  map:
    v: RXE-12 Number of Refills
mapping:
  identity:
    v: rim
  map:
    v: repeatNumber

id:
  v: MedicationRequest.dispenseRequest.quantity
path:
  v: MedicationRequest.dispenseRequest.quantity
short:
  v: Amount of medication to supply per dispense
definition:
  v: The amount that is to be dispensed for one fill.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: MedicationRequest.dispenseRequest.quantity
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Quantity
    l: Quantity
  profile:
    v: http://hl7.org/fhir/StructureDefinition/SimpleQuantity|5.0.0
    l: http://hl7.org/fhir/StructureDefinition/SimpleQuantity
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
must support:
  v: false
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: script10.6
  map:
    v: Message/Body/NewRx/MedicationPrescribed/DaysSupply
mapping:
  identity:
    v: v2
  map:
    v: RXD-4 Actual Dispense Amount / RXD-5.1 Actual Dispense Units.code / RXD-5.3 Actual Dispense Units.name of coding system
mapping:
  identity:
    v: rim
  map:
    v: quantity

id:
  v: MedicationRequest.dispenseRequest.expectedSupplyDuration
path:
  v: MedicationRequest.dispenseRequest.expectedSupplyDuration
short:
  v: Number of days supply per dispense
definition:
  v: Identifies the period time over which the supplied product is expected to be used, or the length of time the dispense is expected to last.
comment:
  v: In some situations, this attribute may be used instead of quantity to identify the amount supplied by how long it is expected to last, rather than the physical quantity issued, e.g. 90 days supply of medication (based on an ordered dosage). When possible, it is always better to specify quantity, as this tends to be more precise. expectedSupplyDuration will always be an estimate that can be influenced by external factors.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: MedicationRequest.dispenseRequest.expectedSupplyDuration
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Duration
    l: Duration
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
must support:
  v: false
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: script10.6
  map:
    v: Message/Body/NewRx/MedicationPrescribed/Substitutions
mapping:
  identity:
    v: rim
  map:
    v: expectedUseTime

id:
  v: MedicationRequest.dispenseRequest.dispenser
path:
  v: MedicationRequest.dispenseRequest.dispenser
short:
  v: Intended performer of dispense
definition:
  v: Indicates the intended performing Organization that will dispense the medication as specified by the prescriber.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: MedicationRequest.dispenseRequest.dispenser
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Reference
    l: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Organization|5.0.0
    l: http://hl7.org/fhir/StructureDefinition/Organization
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
must support:
  v: false
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.who
mapping:
  identity:
    v: rim
  map:
    v: .outboundRelationship[typeCode=COMP].target[classCode=SPLY, moodCode=RQO] .participation[typeCode=PRF].role[scoper.determinerCode=INSTANCE]

id:
  v: MedicationRequest.dispenseRequest.dispenserInstruction
path:
  v: MedicationRequest.dispenseRequest.dispenserInstruction
short:
  v: Additional information for the dispenser
definition:
  v: Provides additional information to the dispenser, for example, counselling to be provided to the patient.
min:
  v: 0
max:
  v: *
base:
  path:
    v: MedicationRequest.dispenseRequest.dispenserInstruction
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Annotation
    l: Annotation
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
must support:
  v: false
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: Supply.text

id:
  v: MedicationRequest.dispenseRequest.doseAdministrationAid
path:
  v: MedicationRequest.dispenseRequest.doseAdministrationAid
short:
  v: Type of adherence packaging to use for the dispense
definition:
  v: Provides information about the type of adherence packaging to be supplied for the medication dispense.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: MedicationRequest.dispenseRequest.doseAdministrationAid
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: CodeableConcept
    l: CodeableConcept
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
must support:
  v: false
is modifier:
  v: false
is summary:
  v: false
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: MedicationRequestDoseAdministrationAid
  strength:
    v: example
  value set:
    v: http://hl7.org/fhir/ValueSet/medication-dose-aid|5.0.0
    l: http://hl7.org/fhir/ValueSet/medication-dose-aid
mapping:
  identity:
    v: rim
  map:
    v: Supply.administerableMedication.product.asContent.container.code

id:
  v: MedicationRequest.substitution
path:
  v: MedicationRequest.substitution
short:
  v: Any restrictions on medication substitution
definition:
  v: Indicates whether or not substitution can or should be part of the dispense. In some cases, substitution must happen, in other cases substitution must not happen. This block explains the prescriber's intent. If nothing is specified substitution may be done.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: MedicationRequest.substitution
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: BackboneElement
    l: BackboneElement
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
must support:
  v: false
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: script10.6
  map:
    v: specific values within Message/Body/NewRx/MedicationPrescribed/Substitutions
mapping:
  identity:
    v: rim
  map:
    v: subjectOf.substitutionPersmission

id:
  v: MedicationRequest.substitution.id
path:
  v: MedicationRequest.substitution.id
representation:
  v: xmlAttr
short:
  v: Unique id for inter-element referencing
definition:
  v: Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Element.id
  min:
    v: 0
  max:
    v: 1
type:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type
      l: structuredefinition-fhir-type
    value: Url
      v: string
      l: string
  code:
    v: http://hl7.org/fhirpath/System.String
    l: System.String
condition:
  v: ele-1
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: MedicationRequest.substitution.extension
path:
  v: MedicationRequest.substitution.extension
short:
  v: Additional content defined by implementations
definition:
  v: May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, 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:
  v: There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
alias:
  v: extensions
alias:
  v: user content
min:
  v: 0
max:
  v: *
base:
  path:
    v: Element.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    l: Extension
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: MedicationRequest.substitution.modifierExtension
path:
  v: MedicationRequest.substitution.modifierExtension
short:
  v: Extensions that cannot be ignored even if unrecognized
definition:
  v: 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 managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).
comment:
  v: There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
requirements:
  v: Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored. This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](http://hl7.org/fhir/R5/extensibility.html#modifierExtension).
alias:
  v: extensions
alias:
  v: user content
alias:
  v: modifiers
min:
  v: 0
max:
  v: *
base:
  path:
    v: BackboneElement.modifierExtension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    l: Extension
is modifier:
  v: true
is modifier reason:
  v: Modifier extensions are expected to modify the meaning or interpretation of the element that contains them
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: MedicationRequest.substitution.allowed[x]
path:
  v: MedicationRequest.substitution.allowed[x]
short:
  v: Whether substitution is allowed or not
definition:
  v: True if the prescriber allows a different drug to be dispensed from what was prescribed.
comment:
  v: This element is labeled as a modifier because whether substitution is allow or not, it cannot be ignored.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: MedicationRequest.substitution.allowed[x]
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: boolean
    l: boolean
type:
  code:
    v: CodeableConcept
    l: CodeableConcept
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
must support:
  v: false
is modifier:
  v: false
is summary:
  v: false
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: MedicationRequestSubstitution
  strength:
    v: preferred
  description:
    v: Identifies the type of substitution allowed.
  value set:
    v: http://terminology.hl7.org/ValueSet/v3-ActSubstanceAdminSubstitutionCode
    l: v3-ActSubstanceAdminSubstitutionCode
mapping:
  identity:
    v: script10.6
  map:
    v: specific values within Message/Body/NewRx/MedicationPrescribed/Substitutions
mapping:
  identity:
    v: v2
  map:
    v: RXO-9 Allow Substitutions / RXE-9 Substitution Status
mapping:
  identity:
    v: rim
  map:
    v: code

id:
  v: MedicationRequest.substitution.reason
path:
  v: MedicationRequest.substitution.reason
short:
  v: Why should (not) substitution be made
definition:
  v: Indicates the reason for the substitution, or why substitution must or must not be performed.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: MedicationRequest.substitution.reason
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: CodeableConcept
    l: CodeableConcept
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
must support:
  v: false
is modifier:
  v: false
is summary:
  v: false
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: MedicationIntendedSubstitutionReason
  strength:
    v: example
  description:
    v: SubstanceAdminSubstitutionReason
  value set:
    v: http://terminology.hl7.org/ValueSet/v3-SubstanceAdminSubstitutionReason
    l: v3-SubstanceAdminSubstitutionReason
mapping:
  identity:
    v: script10.6
  map:
    v: not mapped
mapping:
  identity:
    v: v2
  map:
    v: RXE-9 Substition status
mapping:
  identity:
    v: rim
  map:
    v: reasonCode

id:
  v: MedicationRequest.eventHistory
path:
  v: MedicationRequest.eventHistory
short:
  v: A list of events of interest in the lifecycle
definition:
  v: Links to Provenance records for past versions of this resource or fulfilling request or event resources that identify key state transitions or updates that are likely to be relevant to a user looking at the current version of the resource.
comment:
  v: This might not include provenances for all versions of the request – only those deemed "relevant" or important. This SHALL NOT include the provenance associated with this current version of the resource. (If that provenance is deemed to be a "relevant" change, it will need to be added as part of a later update. Until then, it can be queried directly as the provenance that points to this version using _revinclude All Provenances should have some historical version of this Request as their subject.).
min:
  v: 0
max:
  v: *
base:
  path:
    v: MedicationRequest.eventHistory
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Reference
    l: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Provenance|5.0.0
    l: http://hl7.org/fhir/StructureDefinition/Provenance
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
must support:
  v: false
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: workflow
  map:
    v: Request.relevantHistory
mapping:
  identity:
    v: rim
  map:
    v: .inboundRelationship(typeCode=SUBJ].source[classCode=CACT, moodCode=EVN]

element:
  id:
    v: MedicationRequest
  path:
    v: MedicationRequest
element:
  id:
    v: MedicationRequest.identifier
  path:
    v: MedicationRequest.identifier
  short:
    v: Prescription/prescribed item ID
  comment:
    v: It is the prescription ID if the presciption includes only one prescribed item
element:
  id:
    v: MedicationRequest.groupIdentifier
  path:
    v: MedicationRequest.groupIdentifier
  short:
    v: Prescription this is part of. Not needed if a presciption includes only one prescribed item.
element:
  id:
    v: MedicationRequest.status
  path:
    v: MedicationRequest.status
  short:
    v: Current state of the order
element:
  id:
    v: MedicationRequest.medication
  path:
    v: MedicationRequest.medication
  type:
    code:
      v: CodeableReference
      l: CodeableReference
    target profile:
      v: http://hl7.eu/fhir/base-r5/StructureDefinition/medication-eu-core
      l: medication-eu-core
element:
  id:
    v: MedicationRequest.subject
  path:
    v: MedicationRequest.subject
  type:
    code:
      v: Reference
      l: Reference
    target profile:
      v: http://hl7.eu/fhir/base-r5/StructureDefinition/patient-eu-core
      l: patient-eu-core
element:
  id:
    v: MedicationRequest.authoredOn
  path:
    v: MedicationRequest.authoredOn
  min:
    v: 1
element:
  id:
    v: MedicationRequest.requester
  path:
    v: MedicationRequest.requester
  min:
    v: 1
element:
  id:
    v: MedicationRequest.reason
  path:
    v: MedicationRequest.reason
  short:
    v: Reason or indication for this prescription
  binding:
    extension:
      url:
        v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
        l: elementdefinition-bindingName
      value: String
        v: MedicationRequestReason
    strength:
      v: example
    description:
      v: A coded concept indicating why the medication was ordered.
    value set:
      v: http://hl7.org/fhir/ValueSet/condition-code
      l: condition-code
    additional:
      purpose:
        v: candidate
      value set:
        v: http://terminology.ehdsi.eu/ValueSet/eHDSIIllnessandDisorder
        l: eHDSIIllnessandDisorder
      documentation:
        v: MyHealth@EU crossborder value set for diagnoses. Based on WHO ICD 10.
element:
  id:
    v: MedicationRequest.dosageInstruction
  path:
    v: MedicationRequest.dosageInstruction
  short:
    v: How the medication should be taken.
element:
  id:
    v: MedicationRequest.dosageInstruction.text
  path:
    v: MedicationRequest.dosageInstruction.text
  short:
    v: Free text dosage instructions
element:
  id:
    v: MedicationRequest.dosageInstruction.timing
  path:
    v: MedicationRequest.dosageInstruction.timing
  short:
    v: Administration schedule
element:
  id:
    v: MedicationRequest.dosageInstruction.timing.repeat.duration
  path:
    v: MedicationRequest.dosageInstruction.timing.repeat.duration
  short:
    v: Duration of the treatment
element:
  id:
    v: MedicationRequest.dosageInstruction.timing.repeat.frequency
  path:
    v: MedicationRequest.dosageInstruction.timing.repeat.frequency
  short:
    v: Frequency times per period
element:
  id:
    v: MedicationRequest.dosageInstruction.timing.repeat.period
  path:
    v: MedicationRequest.dosageInstruction.timing.repeat.period
  short:
    v: Duration of time over which repetitions are to occur
element:
  id:
    v: MedicationRequest.dosageInstruction.timing.repeat.periodUnit
  path:
    v: MedicationRequest.dosageInstruction.timing.repeat.periodUnit
  short:
    v: Unit of the period (e.g. day)
element:
  id:
    v: MedicationRequest.dosageInstruction.timing.code
  path:
    v: MedicationRequest.dosageInstruction.timing.code
  short:
    v: A code for the timing schedule.
element:
  id:
    v: MedicationRequest.dosageInstruction.route
  path:
    v: MedicationRequest.dosageInstruction.route
  short:
    v: Route of administration
element:
  id:
    v: MedicationRequest.dosageInstruction.doseAndRate.dose[x]
  path:
    v: MedicationRequest.dosageInstruction.doseAndRate.dose[x]
  slicing:
    discriminator:
      type:
        v: type
      path:
        v: $this
    ordered:
      v: false
    rules:
      v: open
element:
  id:
    v: MedicationRequest.dosageInstruction.doseAndRate.dose[x]:doseQuantity
  path:
    v: MedicationRequest.dosageInstruction.doseAndRate.dose[x]
  slice name:
    v: doseQuantity
  min:
    v: 0
  max:
    v: 1
  type:
    code:
      v: Quantity
      l: Quantity
    profile:
      v: http://hl7.org/fhir/StructureDefinition/SimpleQuantity
      l: SimpleQuantity
element:
  id:
    v: MedicationRequest.dispenseRequest.extension
  path:
    v: MedicationRequest.dispenseRequest.extension
  slicing:
    discriminator:
      type:
        v: value
      path:
        v: url

v: false

v: open

id:
  v: MedicationRequest.dispenseRequest.extension:prescribedQuantity
path:
  v: MedicationRequest.dispenseRequest.extension
slice name:
  v: prescribedQuantity
short:
  v: Overall amount of product prescribed, independent from the number of repeats.
definition:
  v: When Medication resource implies a pack size, prescribedQuantity should convey number of packages. When the Medication does not imply an amount, overall amount could be in tablets or millilitres.
min:
  v: 0
max:
  v: 1
type:
  code:
    v: Extension
    l: Extension
  profile:
    v: https://profiles.ihe.net/PHARM/MPD/StructureDefinition/ihe-ext-medicationrequest-prescribedQuantity
    l: ihe-ext-medicationrequest-prescribedQuantity