ch-core-medicationadministration
type: StructureDefinition
node role: treeRoot
id:
  v: ch-core-medicationadministration
text:
  status:
    v: extensions
  div: Generated Narrative: StructureDefinition ch-core-medicationadministration Name Flags Card. Type Description & Constraints<img src="[binary]" alt="doco" style="background-color: inherit"/> MedicationAdministration 0..* MedicationAdministration CH Core MedicationAdministration medication[x] 1..1 What was administered medicationCodeableConcept CodeableConcept medicationReference Reference(CH Core Medication) subject 1..1 Reference(CH Core Patient | Group) Who received medication performer actor 1..1 Reference(CH Core Practitioner | CH Core PractitionerRole | CH Core Patient | CH Core RelatedPerson | Device) Who performed the medication administration dosage route 0..1 CodeableConcept Path of substance into body Binding: EDQM - RouteOfAdministration (preferred) method 0..1 CodeableConcept How drug was administered Binding: EDQM - Administration Method (preferred) dose 0..1 CHCoreQuantityWithEmedUnits Amount of medication per dose rate[x] 0..1 Dose quantity per unit of time rateRatio Ratio(CHCoreRatioWithEmedUnits) rateQuantity Quantity(CHCoreQuantityWithEmedUnits) <img src="[binary]" alt="doco" style="background-color: inherit"/> Documentation for this format
url:
  v: http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-medicationadministration
version:
  v: 6.0.0-ballot
name:
  v: CHCoreMedicationAdministration
title:
  v: CH Core MedicationAdministration
status:
  v: active
date:
  v: 2025-05-22T06:00:59+00:00
publisher:
  v: HL7 Switzerland
contact:
  name:
    v: HL7 Switzerland
  telecom:
    system:
      v: url
    value:
      v: https://www.hl7.ch/
contact:
  name:
    v: HL7 Switzerland
  telecom:
    system:
      v: url
    value:
      v: https://www.hl7.ch/
    use:
      v: work
description:
  v: Base definition of the MedicationAdministration resource for use in Swiss specific use cases.
jurisdiction:
  coding:
    system:
      v: urn:iso:std:iso:3166
    code:
      v: CH
copyright:
  v: CC0-1.0
fhir version:
  v: 4.0.1
mapping:
  identity:
    v: workflow
  uri:
    v: http://hl7.org/fhir/workflow
  name:
    v: Workflow Pattern
mapping:
  identity:
    v: rim
  uri:
    v: http://hl7.org/v3
  name:
    v: RIM Mapping
mapping:
  identity:
    v: w5
  uri:
    v: http://hl7.org/fhir/fivews
  name:
    v: FiveWs Pattern Mapping
mapping:
  identity:
    v: v2
  uri:
    v: http://hl7.org/v2
  name:
    v: HL7 v2 Mapping
mapping:
  identity:
    v: w3c.prov
  uri:
    v: http://www.w3.org/ns/prov
  name:
    v: W3C PROV
kind:
  v: resource
abstract:
  v: false
type:
  v: MedicationAdministration
base definition:
  v: http://hl7.org/fhir/StructureDefinition/MedicationAdministration
  link: http://hl7.org/fhir/StructureDefinition/MedicationAdministration
derivation:
  v: constraint
snapshot:
  extension:
    url:
      v: http://hl7.org/fhir/tools/StructureDefinition/snapshot-base-version
    value: string
      v: 4.0.1
  element:
    id:
      v: MedicationAdministration
    path:
      v: MedicationAdministration
    short:
      v: CH Core MedicationAdministration
    definition:
      v: Describes the event of a patient consuming or otherwise being administered a medication. This may be as simple as swallowing a tablet or it may be a long running infusion. Related resources tie this event to the authorizing prescription, and the specific encounter between patient and health care practitioner.
    min:
      v: 0
    max:
      v: *
    base:
      path:
        v: MedicationAdministration
      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()
      xpath:
        v: not(parent::f:contained and f:contained)
      source:
        v: http://hl7.org/fhir/StructureDefinition/DomainResource
        link: http://hl7.org/fhir/StructureDefinition/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().as(canonical) | %resource.descendants().as(uri) | %resource.descendants().as(url))) or descendants().where(reference = '#').exists() or descendants().where(as(canonical) = '#').exists() or descendants().where(as(canonical) = '#').exists()).not()).trace('unmatched', id).empty()
      xpath:
        v: not(exists(for $id in f:contained/*/f:id/@value return $contained[not(parent::*/descendant::f:reference/@value=concat('#', $contained/*/id/@value) or descendant::f:reference[@value='#'])]))
      source:
        v: http://hl7.org/fhir/StructureDefinition/DomainResource
        link: http://hl7.org/fhir/StructureDefinition/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()
      xpath:
        v: not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))
      source:
        v: http://hl7.org/fhir/StructureDefinition/DomainResource
        link: http://hl7.org/fhir/StructureDefinition/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()
      xpath:
        v: not(exists(f:contained/*/f:meta/f:security))
      source:
        v: http://hl7.org/fhir/StructureDefinition/DomainResource
        link: http://hl7.org/fhir/StructureDefinition/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()
      xpath:
        v: exists(f:text/h:div)
      source:
        v: http://hl7.org/fhir/StructureDefinition/DomainResource
        link: http://hl7.org/fhir/StructureDefinition/DomainResource
    is modifier:
      v: false
    is summary:
      v: false

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.

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

identity:
  v: workflow
map:
  v: Event

identity:
  v: rim
map:
  v: SubstanceAdministration

id:
  v: MedicationAdministration.id
path:
  v: MedicationAdministration.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: The only time that a resource does not have an id is when it is being submitted to the server using a create operation.
min:
  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
    value: url
      v: id
  code:
    v: http://hl7.org/fhirpath/System.String
is modifier:
  v: false
is summary:
  v: true

id:
  v: MedicationAdministration.meta
path:
  v: MedicationAdministration.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
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())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: true

id:
  v: MedicationAdministration.implicitRules
path:
  v: MedicationAdministration.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 it's 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
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())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
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 it's meaning or interpretation
is summary:
  v: true

id:
  v: MedicationAdministration.language
path:
  v: MedicationAdministration.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
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())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: false
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet
    value: canonical
      v: http://hl7.org/fhir/ValueSet/all-languages
      link: http://hl7.org/fhir/ValueSet/all-languages
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value: string
      v: Language
  strength:
    v: preferred
  description:
    v: A human language.
  value set:
    v: http://hl7.org/fhir/ValueSet/languages
    link: http://hl7.org/fhir/ValueSet/languages

id:
  v: MedicationAdministration.text
path:
  v: MedicationAdministration.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 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
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())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: Act.text?

id:
  v: MedicationAdministration.contained
path:
  v: MedicationAdministration.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, and nor can they have their own independent transaction scope.
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
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: MedicationAdministration.extension
path:
  v: MedicationAdministration.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 manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.
comment:
  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
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())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/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()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    link: http://hl7.org/fhir/StructureDefinition/Extension
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: MedicationAdministration.modifierExtension
path:
  v: MedicationAdministration.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 manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).
comment:
  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/R4/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
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())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/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()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    link: http://hl7.org/fhir/StructureDefinition/Extension
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: false
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: MedicationAdministration.identifier
path:
  v: MedicationAdministration.identifier
short:
  v: External identifier
definition:
  v: Identifiers associated with this Medication Administration 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: This is a business identifier, not a resource identifier.
min:
  v: 0
max:
  v: *
base:
  path:
    v: MedicationAdministration.identifier
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: 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())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: workflow
  map:
    v: Event.identifier
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.identifier
mapping:
  identity:
    v: rim
  map:
    v: .id

id:
  v: MedicationAdministration.instantiates
path:
  v: MedicationAdministration.instantiates
short:
  v: Instantiates protocol or definition
definition:
  v: A protocol, guideline, orderset, or other definition that was adhered to in whole or in part by this event.
min:
  v: 0
max:
  v: *
base:
  path:
    v: MedicationAdministration.instantiates
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: 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())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: workflow
  map:
    v: Event.instantiates
mapping:
  identity:
    v: rim
  map:
    v: .outboundRelationship[typeCode=DEFN].target[classCode=unspecified]

id:
  v: MedicationAdministration.partOf
path:
  v: MedicationAdministration.partOf
short:
  v: Part of referenced event
definition:
  v: A larger event of which this particular event is a component or step.
min:
  v: 0
max:
  v: *
base:
  path:
    v: MedicationAdministration.partOf
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/MedicationAdministration
    link: http://hl7.org/fhir/StructureDefinition/MedicationAdministration
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Procedure
    link: http://hl7.org/fhir/StructureDefinition/Procedure
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())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: workflow
  map:
    v: Event.partOf
mapping:
  identity:
    v: rim
  map:
    v: .outboundRelationship[typeCode=COMP]/target[classCode=SBADM or PROC,moodCode=EVN]

id:
  v: MedicationAdministration.status
path:
  v: MedicationAdministration.status
short:
  v: in-progress | not-done | on-hold | completed | entered-in-error | stopped | unknown
definition:
  v: Will generally be set to show that the administration has been completed. For some long running administrations such as infusions, it is possible for an administration to be started but not completed or it may be paused while some other process is under way.
comment:
  v: This element is labeled as a modifier because the status contains codes that mark the resource as not currently valid.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: MedicationAdministration.status
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: 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())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: true
is modifier reason:
  v: This element is labelled as a modifier because it is a status element that contains status entered-in-error which means that the resource should not be treated as valid
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value: string
      v: MedicationAdministrationStatus
  strength:
    v: required
  description:
    v: A set of codes indicating the current status of a MedicationAdministration.
  value set:
    v: http://hl7.org/fhir/ValueSet/medication-admin-status|4.0.1
    link: 4.0
    link: .1
mapping:
  identity:
    v: workflow
  map:
    v: Event.status
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.status
mapping:
  identity:
    v: v2
  map:
    v: RXA-20-Completion Status
mapping:
  identity:
    v: rim
  map:
    v: .statusCode

id:
  v: MedicationAdministration.statusReason
path:
  v: MedicationAdministration.statusReason
short:
  v: Reason administration not performed
definition:
  v: A code indicating why the administration was not performed.
min:
  v: 0
max:
  v: *
base:
  path:
    v: MedicationAdministration.statusReason
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: 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())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: false
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value: string
      v: MedicationAdministrationNegationReason
  strength:
    v: example
  description:
    v: A set of codes indicating the reason why the MedicationAdministration is negated.
  value set:
    v: http://hl7.org/fhir/ValueSet/reason-medication-not-given-codes
    link: http://hl7.org/fhir/ValueSet/reason-medication-not-given-codes
mapping:
  identity:
    v: workflow
  map:
    v: Event.statusReason
mapping:
  identity:
    v: v2
  map:
    v: RXA-9-Administration Notes / RXA-18 Substance/Treatment Refusal Reason
mapping:
  identity:
    v: rim
  map:
    v: .outboundRelationship[typeCode=RSON]/target[classCode=OBS,moodCode=EVN, code="reason not given"].value

id:
  v: MedicationAdministration.category
path:
  v: MedicationAdministration.category
short:
  v: Type of medication usage
definition:
  v: Indicates where the medication is expected to be consumed or administered.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: MedicationAdministration.category
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: 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())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: false
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value: string
      v: MedicationAdministrationCategory
  strength:
    v: preferred
  description:
    v: A coded concept describing where the medication administered is expected to occur.
  value set:
    v: http://hl7.org/fhir/ValueSet/medication-admin-category
    link: http://hl7.org/fhir/ValueSet/medication-admin-category
mapping:
  identity:
    v: rim
  map:
    v: .inboundRelationship[typeCode=COMP].source[classCode=OBS, moodCode=EVN, code="type of medication usage"].value

id:
  v: MedicationAdministration.medication[x]
path:
  v: MedicationAdministration.medication[x]
short:
  v: What was administered
definition:
  v: Identifies the medication that was administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.
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, then you must reference the Medication resource.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: MedicationAdministration.medication[x]
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: CodeableConcept
type:
  code:
    v: Reference
  target profile:
    v: http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-medication
    link: http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-medication
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())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value: string
      v: MedicationCode
  strength:
    v: example
  description:
    v: Codes identifying substance or product that can be administered.
  value set:
    v: http://hl7.org/fhir/ValueSet/medication-codes
    link: http://hl7.org/fhir/ValueSet/medication-codes
mapping:
  identity:
    v: workflow
  map:
    v: Event.code
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.what[x]
mapping:
  identity:
    v: v2
  map:
    v: RXA-5-Administered Code
mapping:
  identity:
    v: rim
  map:
    v: .participation[typeCode=CSM].role[classCode=ADMM]

id:
  v: MedicationAdministration.subject
path:
  v: MedicationAdministration.subject
short:
  v: Who received medication
definition:
  v: The person or animal or group receiving the medication.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: MedicationAdministration.subject
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: Reference
  target profile:
    v: http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-patient
    link: http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-patient
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Group
    link: http://hl7.org/fhir/StructureDefinition/Group
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())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: workflow
  map:
    v: Event.subject
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=SBJ].role[classCode=PAT]
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.subject

id:
  v: MedicationAdministration.context
path:
  v: MedicationAdministration.context
short:
  v: Encounter or Episode of Care administered as part of
definition:
  v: The visit, admission, or other contact between patient and health care provider during which the medication administration was performed.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: MedicationAdministration.context
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Encounter
    link: http://hl7.org/fhir/StructureDefinition/Encounter
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/EpisodeOfCare
    link: http://hl7.org/fhir/StructureDefinition/EpisodeOfCare
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())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: workflow
  map:
    v: Event.context
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: MedicationAdministration.supportingInformation
path:
  v: MedicationAdministration.supportingInformation
short:
  v: Additional information to support administration
definition:
  v: Additional information (for example, patient height and weight) that supports the administration of the medication.
min:
  v: 0
max:
  v: *
base:
  path:
    v: MedicationAdministration.supportingInformation
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Resource
    link: 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())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: false
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: MedicationAdministration.effective[x]
path:
  v: MedicationAdministration.effective[x]
short:
  v: Start and end time of administration
definition:
  v: A specific date/time or interval of time during which the administration took place (or did not take place, when the 'notGiven' attribute is true). For many administrations, such as swallowing a tablet the use of dateTime is more appropriate.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: MedicationAdministration.effective[x]
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: dateTime
type:
  code:
    v: 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())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: workflow
  map:
    v: Event.occurrence[x]
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.done[x]
mapping:
  identity:
    v: v2
  map:
    v: RXA-3-Date/Time Start of Administration / RXA-4-Date/Time End of Administration
mapping:
  identity:
    v: rim
  map:
    v: .effectiveTime

id:
  v: MedicationAdministration.performer
path:
  v: MedicationAdministration.performer
short:
  v: Who performed the medication administration and what they did
definition:
  v: Indicates who or what performed the medication administration and how they were involved.
min:
  v: 0
max:
  v: *
base:
  path:
    v: MedicationAdministration.performer
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: 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())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: workflow
  map:
    v: Event.performer
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.actor
mapping:
  identity:
    v: v2
  map:
    v: RXA-10-Administering Provider / PRT-5-Participation Person: PRT-4-Participation='AP' (RXA-10 is deprecated)
mapping:
  identity:
    v: rim
  map:
    v: .participation[typeCode=PRF]

id:
  v: MedicationAdministration.performer.id
path:
  v: MedicationAdministration.performer.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
    value: url
      v: string
  code:
    v: http://hl7.org/fhirpath/System.String
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: MedicationAdministration.performer.extension
path:
  v: MedicationAdministration.performer.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 manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.
comment:
  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
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())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/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()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    link: http://hl7.org/fhir/StructureDefinition/Extension
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: MedicationAdministration.performer.modifierExtension
path:
  v: MedicationAdministration.performer.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 manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).
comment:
  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/R4/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
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())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/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()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    link: http://hl7.org/fhir/StructureDefinition/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: MedicationAdministration.performer.function
path:
  v: MedicationAdministration.performer.function
short:
  v: Type of performance
definition:
  v: Distinguishes the type of involvement of the performer in the medication administration.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: MedicationAdministration.performer.function
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: 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())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: false
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value: string
      v: MedicationAdministrationPerformerFunction
  strength:
    v: example
  description:
    v: A code describing the role an individual played in administering the medication.
  value set:
    v: http://hl7.org/fhir/ValueSet/med-admin-perform-function
    link: http://hl7.org/fhir/ValueSet/med-admin-perform-function
mapping:
  identity:
    v: workflow
  map:
    v: Event.performer.function
mapping:
  identity:
    v: rim
  map:
    v: participation[typeCode=PRF].functionCode

id:
  v: MedicationAdministration.performer.actor
path:
  v: MedicationAdministration.performer.actor
short:
  v: Who performed the medication administration
definition:
  v: Indicates who or what performed the medication administration.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: MedicationAdministration.performer.actor
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: Reference
  target profile:
    v: http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-practitioner
    link: http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-practitioner
  target profile:
    v: http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-practitionerrole
    link: http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-practitionerrole
  target profile:
    v: http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-patient
    link: http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-patient
  target profile:
    v: http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-relatedperson
    link: http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-relatedperson
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Device
    link: 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())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: workflow
  map:
    v: Event.performer.actor
mapping:
  identity:
    v: rim
  map:
    v: .role

id:
  v: MedicationAdministration.reasonCode
path:
  v: MedicationAdministration.reasonCode
short:
  v: Reason administration performed
definition:
  v: A code indicating why the medication was given.
min:
  v: 0
max:
  v: *
base:
  path:
    v: MedicationAdministration.reasonCode
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: 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())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: false
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value: string
      v: MedicationAdministrationReason
  strength:
    v: example
  description:
    v: A set of codes indicating the reason why the MedicationAdministration was made.
  value set:
    v: http://hl7.org/fhir/ValueSet/reason-medication-given-codes
    link: http://hl7.org/fhir/ValueSet/reason-medication-given-codes
mapping:
  identity:
    v: workflow
  map:
    v: Event.reasonCode
mapping:
  identity:
    v: v2
  map:
    v: RXE-27 Give Indication
mapping:
  identity:
    v: rim
  map:
    v: .reasonCode

id:
  v: MedicationAdministration.reasonReference
path:
  v: MedicationAdministration.reasonReference
short:
  v: Condition or observation that supports why the medication was administered
definition:
  v: Condition or observation that supports why the medication was administered.
comment:
  v: This is a reference to a condition that is the reason for the medication request. If only a code exists, use reasonCode.
min:
  v: 0
max:
  v: *
base:
  path:
    v: MedicationAdministration.reasonReference
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Condition
    link: http://hl7.org/fhir/StructureDefinition/Condition
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Observation
    link: http://hl7.org/fhir/StructureDefinition/Observation
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/DiagnosticReport
    link: http://hl7.org/fhir/StructureDefinition/DiagnosticReport
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())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: workflow
  map:
    v: Event.reasonReference
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.why[x]
mapping:
  identity:
    v: rim
  map:
    v: .outboundRelationship[typeCode=RSON]/target[classCode=OBS,moodCode=EVN, code="reason for use ASSERTION"].value
mapping:
  identity:
    v: w3c.prov
  map:
    v: no mapping

id:
  v: MedicationAdministration.request
path:
  v: MedicationAdministration.request
short:
  v: Request administration performed against
definition:
  v: The original request, instruction or authority to perform the administration.
comment:
  v: This is a reference to the MedicationRequest where the intent is either order or instance-order. It should not reference MedicationRequests where the intent is any other value.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: MedicationAdministration.request
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/MedicationRequest
    link: 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())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: workflow
  map:
    v: Event.basedOn
mapping:
  identity:
    v: v2
  map:
    v: ORC-2-Placer Order Number / ORC-3-Filler Order Number
mapping:
  identity:
    v: rim
  map:
    v: InFullfillmentOf->SubstanceAdministration

id:
  v: MedicationAdministration.device
path:
  v: MedicationAdministration.device
short:
  v: Device used to administer
definition:
  v: The device used in administering the medication to the patient. For example, a particular infusion pump.
min:
  v: 0
max:
  v: *
base:
  path:
    v: MedicationAdministration.device
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Device
    link: 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())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: v2
  map:
    v: PRT-10 Participation Device / RXR-3 Administrative Device
mapping:
  identity:
    v: rim
  map:
    v: device->Access OR device->AssignedDevice

id:
  v: MedicationAdministration.note
path:
  v: MedicationAdministration.note
short:
  v: Information about the administration
definition:
  v: Extra information about the medication administration that is not conveyed by the other attributes.
min:
  v: 0
max:
  v: *
base:
  path:
    v: MedicationAdministration.note
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: 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())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: workflow
  map:
    v: Event.note
mapping:
  identity:
    v: rim
  map:
    v: .inboundRelationship[typeCode=SUBJ]/source[classCode=OBS,moodCode=EVN,code="annotation"].value

id:
  v: MedicationAdministration.dosage
path:
  v: MedicationAdministration.dosage
short:
  v: Details of how medication was taken
definition:
  v: Describes the medication dosage information details e.g. dose, rate, site, route, etc.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: MedicationAdministration.dosage
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: 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())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
constraint:
  key:
    v: mad-1
  severity:
    v: error
  human:
    v: SHALL have at least one of dosage.dose or dosage.rate[x]
  expression:
    v: dose.exists() or rate.exists()
  xpath:
    v: exists(f:dose) or exists(f:*[starts-with(local-name(.), 'rate')])
  source:
    v: http://hl7.org/fhir/StructureDefinition/MedicationAdministration
    link: http://hl7.org/fhir/StructureDefinition/MedicationAdministration
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: component->SubstanceAdministrationEvent

id:
  v: MedicationAdministration.dosage.id
path:
  v: MedicationAdministration.dosage.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
    value: url
      v: string
  code:
    v: http://hl7.org/fhirpath/System.String
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: MedicationAdministration.dosage.extension
path:
  v: MedicationAdministration.dosage.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 manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.
comment:
  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
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())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/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()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    link: http://hl7.org/fhir/StructureDefinition/Extension
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: MedicationAdministration.dosage.modifierExtension
path:
  v: MedicationAdministration.dosage.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 manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).
comment:
  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/R4/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
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())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/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()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    link: http://hl7.org/fhir/StructureDefinition/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: MedicationAdministration.dosage.text
path:
  v: MedicationAdministration.dosage.text
short:
  v: Free text dosage instructions e.g. SIG
definition:
  v: Free text dosage can be used for cases where the dosage administered is too complex to code. When coded dosage is present, the free text dosage may still be present for display to humans. The dosage instructions should reflect the dosage of the medication that was administered.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: MedicationAdministration.dosage.text
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: 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())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: .text

id:
  v: MedicationAdministration.dosage.site
path:
  v: MedicationAdministration.dosage.site
short:
  v: Body site administered to
definition:
  v: A coded specification of the anatomic site where the medication first entered the body. For example, "left arm".
comment:
  v: If the use case requires attributes from the BodySite resource (e.g. to identify and track separately) then use the standard extension [bodySite](http://hl7.org/fhir/R4/extension-bodysite.html). May be a summary code, or a reference to a very precise definition of the location, or both.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: MedicationAdministration.dosage.site
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: 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())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: false
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/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
    link: http://hl7.org/fhir/ValueSet/approach-site-codes
mapping:
  identity:
    v: v2
  map:
    v: RXR-2 Administration Site / RXR-6 Administration Site Modifier
mapping:
  identity:
    v: rim
  map:
    v: .approachSiteCode

id:
  v: MedicationAdministration.dosage.route
path:
  v: MedicationAdministration.dosage.route
short:
  v: Path of substance into body
definition:
  v: A code specifying the route or physiological path of administration of a therapeutic agent into or onto the patient. For example, topical, intravenous, etc.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: MedicationAdministration.dosage.route
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: 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())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: false
binding:
  strength:
    v: preferred
  value set:
    v: http://fhir.ch/ig/ch-term/ValueSet/edqm-routeofadministration
    link: http://fhir.ch/ig/ch-term/ValueSet/edqm-routeofadministration
mapping:
  identity:
    v: v2
  map:
    v: RXR-1-Route
mapping:
  identity:
    v: rim
  map:
    v: .routeCode

id:
  v: MedicationAdministration.dosage.method
path:
  v: MedicationAdministration.dosage.method
short:
  v: How drug was administered
definition:
  v: A coded value indicating the method by which the medication is intended to be or was introduced into or on the body. This attribute will most often NOT be populated. It is most commonly used for injections. For example, Slow Push, Deep IV.
comment:
  v: One of the reasons this attribute is not used often, is that the method is often pre-coordinated with the route and/or form of administration. This means the codes used in route or form may pre-coordinate the method in the route code or the form code. The implementation decision about what coding system to use for route or form code will determine how frequently the method code will be populated e.g. if route or form code pre-coordinate method code, then this attribute will not be populated often; if there is no pre-coordination then method code may be used frequently.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: MedicationAdministration.dosage.method
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: 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())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: false
binding:
  strength:
    v: preferred
  value set:
    v: http://fhir.ch/ig/ch-term/ValueSet/edqm-administrationmethod
    link: http://fhir.ch/ig/ch-term/ValueSet/edqm-administrationmethod
mapping:
  identity:
    v: v2
  map:
    v: RXR-4-Administration Method
mapping:
  identity:
    v: rim
  map:
    v: .methodCode

id:
  v: MedicationAdministration.dosage.dose
path:
  v: MedicationAdministration.dosage.dose
short:
  v: Amount of medication per dose
definition:
  v: The amount of the medication given at one administration event. Use this value when the administration is essentially an instantaneous event such as a swallowing a tablet or giving an injection.
comment:
  v: If the administration is not instantaneous (rate is present), this can be specified to convey the total amount administered over period of time of a single administration.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: MedicationAdministration.dosage.dose
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Quantity
  profile:
    v: http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-quantity-with-emed-units
    link: http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-quantity-with-emed-units
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())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: v2
  map:
    v: RXA-6 Administered Amount / RXA-7 Administered Units
mapping:
  identity:
    v: rim
  map:
    v: .doseQuantity

id:
  v: MedicationAdministration.dosage.rate[x]
path:
  v: MedicationAdministration.dosage.rate[x]
short:
  v: Dose quantity per unit of time
definition:
  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.
comment:
  v: If the rate changes over time, and you want to capture this in MedicationAdministration, then each change should be captured as a distinct MedicationAdministration, with a specific MedicationAdministration.dosage.rate, and the date time when the rate change occurred. Typically, the MedicationAdministration.dosage.rate element is not used to convey an average rate.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: MedicationAdministration.dosage.rate[x]
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Ratio
  profile:
    v: http://fhir.ch/ig/ch-core/StructureDefinition/ch-emed-ratio-with-emed-units
    link: http://fhir.ch/ig/ch-core/StructureDefinition/ch-emed-ratio-with-emed-units
type:
  code:
    v: Quantity
  profile:
    v: http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-quantity-with-emed-units
    link: http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-quantity-with-emed-units
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())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: v2
  map:
    v: RXA-12-Administered Per (Time Unit)
mapping:
  identity:
    v: rim
  map:
    v: .rateQuantity

id:
  v: MedicationAdministration.eventHistory
path:
  v: MedicationAdministration.eventHistory
short:
  v: A list of events of interest in the lifecycle
definition:
  v: A summary of the events of interest that have occurred, such as when the administration was verified.
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: MedicationAdministration.eventHistory
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Provenance
    link: 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())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: .inboundRelationship(typeCode=SUBJ].source[classCode=CACT, moodCode=EVN]

element:
  id:
    v: MedicationAdministration
  path:
    v: MedicationAdministration
  short:
    v: CH Core MedicationAdministration
element:
  id:
    v: MedicationAdministration.medication[x]
  path:
    v: MedicationAdministration.medication[x]
  type:
    code:
      v: CodeableConcept
  type:
    code:
      v: Reference
    target profile:
      v: http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-medication
      link: http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-medication
element:
  id:
    v: MedicationAdministration.subject
  path:
    v: MedicationAdministration.subject
  type:
    code:
      v: Reference
    target profile:
      v: http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-patient
      link: http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-patient
    target profile:
      v: http://hl7.org/fhir/StructureDefinition/Group
      link: http://hl7.org/fhir/StructureDefinition/Group
element:
  id:
    v: MedicationAdministration.performer.actor
  path:
    v: MedicationAdministration.performer.actor
  type:
    code:
      v: Reference
    target profile:
      v: http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-practitioner
      link: http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-practitioner
    target profile:
      v: http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-practitionerrole
      link: http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-practitionerrole
    target profile:
      v: http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-patient
      link: http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-patient
    target profile:
      v: http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-relatedperson
      link: http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-relatedperson
    target profile:
      v: http://hl7.org/fhir/StructureDefinition/Device
      link: http://hl7.org/fhir/StructureDefinition/Device
element:
  id:
    v: MedicationAdministration.dosage.route
  path:
    v: MedicationAdministration.dosage.route
  binding:
    strength:
      v: preferred
    value set:
      v: http://fhir.ch/ig/ch-term/ValueSet/edqm-routeofadministration
      link: http://fhir.ch/ig/ch-term/ValueSet/edqm-routeofadministration
element:
  id:
    v: MedicationAdministration.dosage.method
  path:
    v: MedicationAdministration.dosage.method
  binding:
    strength:
      v: preferred
    value set:
      v: http://fhir.ch/ig/ch-term/ValueSet/edqm-administrationmethod
      link: http://fhir.ch/ig/ch-term/ValueSet/edqm-administrationmethod
element:
  id:
    v: MedicationAdministration.dosage.dose
  path:
    v: MedicationAdministration.dosage.dose
  type:
    code:
      v: Quantity
    profile:
      v: http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-quantity-with-emed-units
      link: http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-quantity-with-emed-units
element:
  id:
    v: MedicationAdministration.dosage.rate[x]
  path:
    v: MedicationAdministration.dosage.rate[x]
  type:
    code:
      v: Ratio
    profile:
      v: http://fhir.ch/ig/ch-core/StructureDefinition/ch-emed-ratio-with-emed-units
      link: http://fhir.ch/ig/ch-core/StructureDefinition/ch-emed-ratio-with-emed-units
  type:
    code:
      v: Quantity
    profile:
      v: http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-quantity-with-emed-units
      link: http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-quantity-with-emed-units