FHIR CI-Build

This is the Continuous Integration Build of FHIR (will be incorrect/inconsistent at times).
See the Directory of published versions

Example StructureDefinition/Medication (Turtle)

Pharmacy Work GroupMaturity Level: N/AStandards Status: InformativeCompartments: No defined compartments

Raw Turtle (+ also see Turtle/RDF Format Specification)

StructureDefinition for medication

@prefix fhir: <http://hl7.org/fhir/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .

# - resource -------------------------------------------------------------------

[] a fhir:StructureDefinition ;
  fhir:id [ fhir:v "Medication"] ;
  fhir:meta [
     fhir:lastUpdated [ fhir:v "2024-03-27T11:56:58.316+00:00" ]
  ] ;
  fhir:text [
     fhir:status [ fhir:v "generated" ]
  ] ;
  fhir:extension ( [
     fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status" ] ;
     fhir:value [ fhir:v "trial-use" ]
  ] [
     fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg" ] ;
     fhir:value [ fhir:v "phx" ]
  ] [
     fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm" ] ;
     fhir:value [ fhir:v "4" ]
  ] [
     fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/structuredefinition-security-category" ] ;
     fhir:value [ fhir:v "business" ]
  ] ) ;
  fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/Medication"], [ fhir:v "http://hl7.org/fhir/StructureDefinition/Medication"] ;
  fhir:version [ fhir:v "6.0.0-cibuild"], [ fhir:v "6.0.0-cibuild"] ;
  fhir:name [ fhir:v "Medication"], [ fhir:v "Medication"] ;
  fhir:status [ fhir:v "draft"], [ fhir:v "draft"] ;
  fhir:experimental [ fhir:v "false"], [ fhir:v "false"] ;
  fhir:date [ fhir:v "2024-03-27T11:56:58+00:00"], [ fhir:v "2024-03-27T11:56:58+00:00"] ;
  fhir:publisher [ fhir:v "HL7 International / Pharmacy"], [ fhir:v "HL7 International / Pharmacy"] ;
  fhir:contact ( [
     fhir:telecom ( [
       fhir:system [ fhir:v "url" ] ;
       fhir:value [ fhir:v "http://www.hl7.org/Special/committees/fiwg" ]
     ] )
  ] [
     fhir:telecom ( [
       fhir:system [ fhir:v "url" ] ;
       fhir:value [ fhir:v "http://www.hl7.org/Special/committees/medication" ]
     ] )
  ] [
     fhir:telecom ( [
       fhir:system [ fhir:v "url" ] ;
       fhir:value [ fhir:v "http://www.hl7.org/Special/committees/fiwg" ]
     ] )
  ] [
     fhir:telecom ( [
       fhir:system [ fhir:v "url" ] ;
       fhir:value [ fhir:v "http://www.hl7.org/Special/committees/medication" ]
     ] )
  ] ) ;
  fhir:description [ fhir:v "This resource is primarily used for the identification and definition of a medication, including ingredients, for the purposes of prescribing, dispensing, and administering a medication as well as for making statements about medication use."], [ fhir:v "This resource is primarily used for the identification and definition of a medication, including ingredients, for the purposes of prescribing, dispensing, and administering a medication as well as for making statements about medication use."] ;
  fhir:jurisdiction ( [
     fhir:coding ( [
       fhir:system [ fhir:v "http://unstats.un.org/unsd/methods/m49/m49.htm" ] ;
       fhir:code [ fhir:v "001" ] ;
       fhir:display [ fhir:v "World" ]
     ] )
  ] [
     fhir:coding ( [
       fhir:system [ fhir:v "http://unstats.un.org/unsd/methods/m49/m49.htm" ] ;
       fhir:code [ fhir:v "001" ] ;
       fhir:display [ fhir:v "World" ]
     ] )
  ] ) ;
  fhir:fhirVersion [ fhir:v "6.0.0-cibuild"] ;
  fhir:mapping ( [
     fhir:identity [ fhir:v "script10.6" ] ;
     fhir:uri [ fhir:v "http://ncpdp.org/SCRIPT10_6" ] ;
     fhir:name [ fhir:v "Mapping to NCPDP SCRIPT 10.6" ]
  ] [
     fhir:identity [ fhir:v "w5" ] ;
     fhir:uri [ fhir:v "http://hl7.org/fhir/fivews" ] ;
     fhir:name [ fhir:v "FiveWs Pattern Mapping" ]
  ] [
     fhir:identity [ fhir:v "rim" ] ;
     fhir:uri [ fhir:v "http://hl7.org/v3" ] ;
     fhir:name [ fhir:v "RIM Mapping" ]
  ] [
     fhir:identity [ fhir:v "v2" ] ;
     fhir:uri [ fhir:v "http://hl7.org/v2" ] ;
     fhir:name [ fhir:v "HL7 V2 Mapping" ]
  ] ) ;
  fhir:kind [ fhir:v "resource"] ;
  fhir:abstract [ fhir:v "false"] ;
  fhir:type [ fhir:v "Medication"] ;
  fhir:baseDefinition [ fhir:v "http://hl7.org/fhir/StructureDefinition/DomainResource"] ;
  fhir:derivation [ fhir:v "specialization"] ;
  fhir:snapshot [
     fhir:element ( [
       fhir:id [ fhir:v "Medication" ] ;
       fhir:path [ fhir:v "Medication" ] ;
       fhir:short [ fhir:v "Definition of a Medication" ] ;
       fhir:definition [ fhir:v "This resource is primarily used for the identification and definition of a medication, including ingredients, for the purposes of prescribing, dispensing, and administering a medication as well as for making statements about medication use." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "*" ] ;
       fhir:base [
         fhir:path [ fhir:v "Medication" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "*" ]
       ] ;
       fhir:constraint ( [
         fhir:key [ fhir:v "dom-2" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "If the resource is contained in another resource, it SHALL NOT contain nested Resources" ] ;
         fhir:expression [ fhir:v "contained.contained.empty()" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/DomainResource" ]
       ] [
         fhir:key [ fhir:v "dom-3" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir: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" ] ;
         fhir:expression [ fhir: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()" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/DomainResource" ]
       ] [
         fhir:key [ fhir:v "dom-4" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated" ] ;
         fhir:expression [ fhir:v "contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/DomainResource" ]
       ] [
         fhir:key [ fhir:v "dom-5" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "If a resource is contained in another resource, it SHALL NOT have a security label" ] ;
         fhir:expression [ fhir:v "contained.meta.security.empty()" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/DomainResource" ]
       ] [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice" ] ;
           fhir:value [ fhir:v "true" ]
         ] [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice-explanation" ] ;
           fhir:value [ fhir: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." ]
         ] ) ;
         fhir:key [ fhir:v "dom-6" ] ;
         fhir:severity [ fhir:v "warning" ] ;
         fhir:human [ fhir:v "A resource should have narrative for robust management" ] ;
         fhir:expression [ fhir:v "text.`div`.exists()" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/DomainResource" ]
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "false" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "Entity, Role, or Act,ManufacturedProduct[classCode=ADMM]" ]
       ] [
         fhir:identity [ fhir:v "script10.6" ] ;
         fhir:map [ fhir:v "NewRx/MedicationPrescribed\r-or-\rRxFill/MedicationDispensed\r-or-\rRxHistoryResponse/MedicationDispensed\r-or-\rRxHistoryResponse/MedicationPrescribed" ]
       ] [
         fhir:identity [ fhir:v "w5" ] ;
         fhir:map [ fhir:v "clinical.medication" ]
       ] )
     ] [
       fhir:id [ fhir:v "Medication.id" ] ;
       fhir:path [ fhir:v "Medication.id" ] ;
       fhir:short [ fhir:v "Logical id of this artifact" ] ;
       fhir:definition [ fhir:v "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes." ] ;
       fhir:comment [ fhir: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." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "Resource.id" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type" ] ;
           fhir:value [ fhir:v "id" ]
         ] ) ;
         fhir:code [ fhir:v "http://hl7.org/fhirpath/System.String" ]
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "true" ]
     ] [
       fhir:id [ fhir:v "Medication.meta" ] ;
       fhir:path [ fhir:v "Medication.meta" ] ;
       fhir:short [ fhir:v "Metadata about the resource" ] ;
       fhir:definition [ fhir: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." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "Resource.meta" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "Meta" ]
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Element" ]
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "true" ]
     ] [
       fhir:id [ fhir:v "Medication.implicitRules" ] ;
       fhir:path [ fhir:v "Medication.implicitRules" ] ;
       fhir:short [ fhir:v "A set of rules under which this content was created" ] ;
       fhir:definition [ fhir: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." ] ;
       fhir:comment [ fhir: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." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "Resource.implicitRules" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "uri" ]
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Element" ]
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "true" ] ;
       fhir:isModifierReason [ fhir: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" ] ;
       fhir:isSummary [ fhir:v "true" ]
     ] [
       fhir:id [ fhir:v "Medication.language" ] ;
       fhir:path [ fhir:v "Medication.language" ] ;
       fhir:short [ fhir:v "Language of the resource content" ] ;
       fhir:definition [ fhir:v "The base language in which the resource is written." ] ;
       fhir:comment [ fhir: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)." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "Resource.language" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "code" ]
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Element" ]
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "false" ] ;
       fhir:binding [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName" ] ;
           fhir:value [ fhir:v "Language" ]
         ] [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding" ] ;
           fhir:value [ fhir:v "true" ]
         ] ) ;
         fhir:strength [ fhir:v "required" ] ;
         fhir:description [ fhir:v "IETF language tag for a human language" ] ;
         fhir:valueSet [ fhir:v "http://hl7.org/fhir/ValueSet/all-languages|6.0.0-cibuild" ] ;
         fhir:additional ( [
           fhir:purpose [ fhir:v "starter" ] ;
           fhir:valueSet [ fhir:v "http://hl7.org/fhir/ValueSet/languages" ]
         ] )
       ]
     ] [
       fhir:id [ fhir:v "Medication.text" ] ;
       fhir:path [ fhir:v "Medication.text" ] ;
       fhir:short [ fhir:v "Text summary of the resource, for human interpretation" ] ;
       fhir:definition [ fhir: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." ] ;
       fhir:comment [ fhir: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." ] ;
       fhir:alias ( [ fhir:v "narrative" ] [ fhir:v "html" ] [ fhir:v "xhtml" ] [ fhir:v "display" ] ) ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "DomainResource.text" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "Narrative" ]
       ] ) ;
       fhir:condition ( [ fhir:v "dom-6" ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Element" ]
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "false" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "Act.text?" ]
       ] )
     ] [
       fhir:id [ fhir:v "Medication.contained" ] ;
       fhir:path [ fhir:v "Medication.contained" ] ;
       fhir:short [ fhir:v "Contained, inline Resources" ] ;
       fhir:definition [ fhir: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." ] ;
       fhir:comment [ fhir: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." ] ;
       fhir:alias ( [ fhir:v "inline resources" ] [ fhir:v "anonymous resources" ] [ fhir:v "contained resources" ] ) ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "*" ] ;
       fhir:base [
         fhir:path [ fhir:v "DomainResource.contained" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "*" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "Resource" ]
       ] ) ;
       fhir:condition ( [ fhir:v "dom-2" ] [ fhir:v "dom-4" ] [ fhir:v "dom-3" ] [ fhir:v "dom-5" ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "false" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "N/A" ]
       ] )
     ] [
       fhir:id [ fhir:v "Medication.extension" ] ;
       fhir:path [ fhir:v "Medication.extension" ] ;
       fhir:short [ fhir:v "Additional content defined by implementations" ] ;
       fhir:definition [ fhir: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." ] ;
       fhir:comment [ fhir: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." ] ;
       fhir:alias ( [ fhir:v "extensions" ] [ fhir:v "user content" ] ) ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "*" ] ;
       fhir:base [
         fhir:path [ fhir:v "DomainResource.extension" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "*" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "Extension" ]
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Element" ]
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "false" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "N/A" ]
       ] )
     ] [
       fhir:id [ fhir:v "Medication.modifierExtension" ] ;
       fhir:path [ fhir:v "Medication.modifierExtension" ] ;
       fhir:short [ fhir:v "Extensions that cannot be ignored" ] ;
       fhir:definition [ fhir: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.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)." ] ;
       fhir:comment [ fhir: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." ] ;
       fhir:requirements [ fhir: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](extensibility.html#modifierExtension)." ] ;
       fhir:alias ( [ fhir:v "extensions" ] [ fhir:v "user content" ] ) ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "*" ] ;
       fhir:base [
         fhir:path [ fhir:v "DomainResource.modifierExtension" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "*" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "Extension" ]
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Element" ]
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "true" ] ;
       fhir:isModifierReason [ fhir:v "Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them" ] ;
       fhir:isSummary [ fhir:v "true" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "N/A" ]
       ] )
     ] [
       fhir:id [ fhir:v "Medication.identifier" ] ;
       fhir:path [ fhir:v "Medication.identifier" ] ;
       fhir:short [ fhir:v "Business identifier for this medication" ] ;
       fhir:definition [ fhir:v "Business identifier for this medication." ] ;
       fhir:comment [ fhir:v "The serial number could be included as an identifier." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "*" ] ;
       fhir:base [
         fhir:path [ fhir:v "Medication.identifier" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "*" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "Identifier" ]
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Element" ]
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "true" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "w5" ] ;
         fhir:map [ fhir:v "FiveWs.identifier" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v ".id" ]
       ] )
     ] [
       fhir:id [ fhir:v "Medication.code" ] ;
       fhir:path [ fhir:v "Medication.code" ] ;
       fhir:short [ fhir:v "Codes that identify this medication" ] ;
       fhir:definition [ fhir:v "A code (or set of codes) that specify this medication, or a textual description if no code is available. Usage note: This could be a standard medication code such as a code from RxNorm, SNOMED CT, IDMP etc. It could also be a national or local formulary code, optionally with translations to other code systems." ] ;
       fhir:comment [ fhir:v "Depending on the context of use, the code that was actually selected by the user (prescriber, dispenser, etc.) will have the coding.userSelected set to true.  As described in the coding datatype: \"A coding may be marked as a \"userSelected\" if a user selected the particular coded value in a user interface (e.g. the user selects an item in a pick-list). If a user selected coding exists, it is the preferred choice for performing translations etc. Other codes can only be literal translations to alternative code systems, or codes at a lower level of granularity (e.g. a generic code for a vendor-specific primary one)." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "Medication.code" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "CodeableConcept" ]
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Element" ]
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "true" ] ;
       fhir:binding [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName" ] ;
           fhir:value [ fhir:v "MedicationFormalRepresentation" ]
         ] ) ;
         fhir:strength [ fhir:v "example" ] ;
         fhir:description [ fhir:v "A coded concept that defines the type of a medication." ] ;
         fhir:valueSet [ fhir:v "http://hl7.org/fhir/ValueSet/medication-codes" ]
       ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "script10.6" ] ;
         fhir:map [ fhir:v "coding.code = //element(*,MedicationType)/DrugCoded/ProductCode\r\rcoding.system = //element(*,MedicationType)/DrugCoded/ProductCodeQualifier\r\rcoding.display = //element(*,MedicationType)/DrugDescription" ]
       ] [
         fhir:identity [ fhir:v "w5" ] ;
         fhir:map [ fhir:v "FiveWs.class" ]
       ] [
         fhir:identity [ fhir:v "v2" ] ;
         fhir:map [ fhir:v "RXO-1.1 Requested Give Code.code / RXE-2.1 Give Code.code / RXD-2.1 Dispense/Give Code.code / RXG-4.1 Give Code.code /RXA-5.1 Administered Code.code / RXC-2.1 Component Code" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v ".code" ]
       ] )
     ] [
       fhir:id [ fhir:v "Medication.status" ] ;
       fhir:path [ fhir:v "Medication.status" ] ;
       fhir:short [ fhir:v "active | inactive | entered-in-error" ] ;
       fhir:definition [ fhir:v "A code to indicate if the medication is in active use." ] ;
       fhir:comment [ fhir:v "This status is intended to identify if the medication in a local system is in active use within a drug database or inventory.  For example, a pharmacy system may create a new drug file record for a compounded product \"ABC Hospital Special Cream\" with an active status.  At some point in the future, it may be determined that the drug record was created with an error and the status is changed to \"entered in error\".   This status is not intended to specify if a medication is part of a particular formulary.  It is possible that the drug record may be referenced by multiple formularies or catalogues and each of those entries would have a separate status." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "Medication.status" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "code" ]
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Element" ]
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "true" ] ;
       fhir:isModifierReason [ fhir:v "This element changes the interpretation of all descriptive attributes." ] ;
       fhir:isSummary [ fhir:v "true" ] ;
       fhir:binding [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName" ] ;
           fhir:value [ fhir:v "MedicationStatus" ]
         ] ) ;
         fhir:strength [ fhir:v "required" ] ;
         fhir:description [ fhir:v "A coded concept defining if the medication is in active use." ] ;
         fhir:valueSet [ fhir:v "http://hl7.org/fhir/ValueSet/medication-status|6.0.0-cibuild" ]
       ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v ".statusCode" ]
       ] )
     ] [
       fhir:id [ fhir:v "Medication.marketingAuthorizationHolder" ] ;
       fhir:path [ fhir:v "Medication.marketingAuthorizationHolder" ] ;
       fhir:short [ fhir:v "Organization that has authorization to market medication" ] ;
       fhir:definition [ fhir:v "The company or other legal entity that has authorization, from the appropriate drug regulatory authority,  to market a medicine in one or more jurisdictions.  Typically abbreviated MAH.Note:  The MAH may manufacture the product and may also contract the manufacturing of the product to one or more companies (organizations)." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "Medication.marketingAuthorizationHolder" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "Reference" ] ;
         fhir:targetProfile ( [ fhir:v "http://hl7.org/fhir/StructureDefinition/Organization" ] )
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Element" ]
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "true" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v ".player.scopingRole[typeCode=MANU].scoper" ]
       ] )
     ] [
       fhir:id [ fhir:v "Medication.doseForm" ] ;
       fhir:path [ fhir:v "Medication.doseForm" ] ;
       fhir:short [ fhir:v "powder | tablets | capsule +" ] ;
       fhir:definition [ fhir:v "Describes the form of the item.  Powder; tablets; capsule." ] ;
       fhir:comment [ fhir:v "When Medication is referenced from MedicationRequest, this is the ordered form.  When Medication is referenced within MedicationDispense, this is the dispensed form.  When Medication is referenced within MedicationAdministration, this is administered form." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "Medication.doseForm" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "CodeableConcept" ]
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Element" ]
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "false" ] ;
       fhir:binding [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName" ] ;
           fhir:value [ fhir:v "MedicationForm" ]
         ] ) ;
         fhir:strength [ fhir:v "example" ] ;
         fhir:description [ fhir:v "A coded concept defining the form of a medication." ] ;
         fhir:valueSet [ fhir:v "http://hl7.org/fhir/ValueSet/medication-form-codes" ]
       ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "script10.6" ] ;
         fhir:map [ fhir:v "coding.code =  //element(*,DrugCodedType)/FormCode\r\rcoding.system = //element(*,DrugCodedType)/FormSourceCode" ]
       ] [
         fhir:identity [ fhir:v "v2" ] ;
         fhir:map [ fhir:v "RXO-5 Requested Dosage Form / RXE-6 Give Dosage Form / RXD-6 Actual Dosage Form / RXG-8 Give Dosage Form / RXA-8 Administered Dosage Form" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v ".formCode" ]
       ] )
     ] [
       fhir:id [ fhir:v "Medication.totalVolume" ] ;
       fhir:path [ fhir:v "Medication.totalVolume" ] ;
       fhir:short [ fhir:v "When the specified product code does not infer a package size, this is the specific amount of drug in the product" ] ;
       fhir:definition [ fhir:v "When the specified product code does not infer a package size, this is the specific amount of drug in the product.  For example, when specifying a product that has the same strength (For example, Insulin glargine 100 unit per mL solution for injection), this attribute provides additional clarification of the package amount (For example, 3 mL, 10mL, etc.)." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "Medication.totalVolume" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "Quantity" ]
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Element" ]
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "true" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v ".quantity" ]
       ] )
     ] [
       fhir:id [ fhir:v "Medication.ingredient" ] ;
       fhir:path [ fhir:v "Medication.ingredient" ] ;
       fhir:short [ fhir:v "Active or inactive ingredient" ] ;
       fhir:definition [ fhir:v "Identifies a particular constituent of interest in the product." ] ;
       fhir:comment [ fhir:v "The ingredients need not be a complete list.  If an ingredient is not specified, this does not indicate whether an ingredient is present or absent.  If an ingredient is specified it does not mean that all ingredients are specified.  It is possible to specify both inactive and active ingredients." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "*" ] ;
       fhir:base [
         fhir:path [ fhir:v "Medication.ingredient" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "*" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "BackboneElement" ]
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Element" ]
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "false" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v ".scopesRole[typeCode=INGR]" ]
       ] )
     ] [
       fhir:id [ fhir:v "Medication.ingredient.id" ] ;
       fhir:path [ fhir:v "Medication.ingredient.id" ] ;
       fhir:representation ( [ fhir:v "xmlAttr" ] ) ;
       fhir:short [ fhir:v "Unique id for inter-element referencing" ] ;
       fhir:definition [ fhir:v "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "Element.id" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type" ] ;
           fhir:value [ fhir:v "string" ]
         ] ) ;
         fhir:code [ fhir:v "http://hl7.org/fhirpath/System.String" ]
       ] ) ;
       fhir:condition ( [ fhir:v "ele-1" ] ) ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "false" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "n/a" ]
       ] )
     ] [
       fhir:id [ fhir:v "Medication.ingredient.extension" ] ;
       fhir:path [ fhir:v "Medication.ingredient.extension" ] ;
       fhir:short [ fhir:v "Additional content defined by implementations" ] ;
       fhir:definition [ fhir: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." ] ;
       fhir:comment [ fhir: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." ] ;
       fhir:alias ( [ fhir:v "extensions" ] [ fhir:v "user content" ] ) ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "*" ] ;
       fhir:base [
         fhir:path [ fhir:v "Element.extension" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "*" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "Extension" ]
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Element" ]
       ] ) ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "false" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "n/a" ]
       ] )
     ] [
       fhir:id [ fhir:v "Medication.ingredient.modifierExtension" ] ;
       fhir:path [ fhir:v "Medication.ingredient.modifierExtension" ] ;
       fhir:short [ fhir:v "Extensions that cannot be ignored even if unrecognized" ] ;
       fhir:definition [ fhir: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.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)." ] ;
       fhir:comment [ fhir: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." ] ;
       fhir:requirements [ fhir: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](extensibility.html#modifierExtension)." ] ;
       fhir:alias ( [ fhir:v "extensions" ] [ fhir:v "user content" ] [ fhir:v "modifiers" ] ) ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "*" ] ;
       fhir:base [
         fhir:path [ fhir:v "BackboneElement.modifierExtension" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "*" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "Extension" ]
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Element" ]
       ] ) ;
       fhir:isModifier [ fhir:v "true" ] ;
       fhir:isModifierReason [ fhir:v "Modifier extensions are expected to modify the meaning or interpretation of the element that contains them" ] ;
       fhir:isSummary [ fhir:v "true" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "N/A" ]
       ] )
     ] [
       fhir:id [ fhir:v "Medication.ingredient.item" ] ;
       fhir:path [ fhir:v "Medication.ingredient.item" ] ;
       fhir:short [ fhir:v "The ingredient (substance or medication) that the ingredient.strength relates to" ] ;
       fhir:definition [ fhir:v "The ingredient (substance or medication) that the ingredient.strength relates to.  This is represented as a concept from a code system or described in another resource (Substance or Medication)." ] ;
       fhir:requirements [ fhir:v "The ingredient may reference a substance (for example, amoxicillin) or another medication (for example in the case of a compounded product, Glaxal Base)." ] ;
       fhir:min [ fhir:v "1" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "Medication.ingredient.item" ] ;
         fhir:min [ fhir:v "1" ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "CodeableReference" ] ;
         fhir:targetProfile ( [ fhir:v "http://hl7.org/fhir/StructureDefinition/Substance" ] [ fhir:v "http://hl7.org/fhir/StructureDefinition/Medication" ] )
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Element" ]
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "false" ] ;
       fhir:binding [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName" ] ;
           fhir:value [ fhir:v "MedicationFormalRepresentation" ]
         ] ) ;
         fhir:strength [ fhir:v "example" ] ;
         fhir:valueSet [ fhir:v "http://hl7.org/fhir/ValueSet/medication-codes" ]
       ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "script10.6" ] ;
         fhir:map [ fhir:v "coding.code = //element(*,MedicationType)/DrugCoded/ProductCode\r\rcoding.system = //element(*,MedicationType)/DrugCoded/ProductCodeQualifier\r\rcoding.display = //element(*,MedicationType)/DrugDescription" ]
       ] [
         fhir:identity [ fhir:v "v2" ] ;
         fhir:map [ fhir:v "RXC-2 Component Code  if medication: RXO-1 Requested Give Code / RXE-2 Give Code / RXD-2-Dispense Give Code / RXG-4 Give Code / RXA-5 Administered Code" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v ".player" ]
       ] )
     ] [
       fhir:id [ fhir:v "Medication.ingredient.isActive" ] ;
       fhir:path [ fhir:v "Medication.ingredient.isActive" ] ;
       fhir:short [ fhir:v "Active ingredient indicator" ] ;
       fhir:definition [ fhir:v "Indication of whether this ingredient affects the therapeutic action of the drug." ] ;
       fhir:requirements [ fhir:v "True indicates that the ingredient affects the therapeutic action of the drug (i.e. active). \rFalse indicates that the ingredient does not affect the therapeutic action of the drug (i.e. inactive)." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "Medication.ingredient.isActive" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "boolean" ]
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Element" ]
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "false" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "NA" ]
       ] )
     ] [
       fhir:id [ fhir:v "Medication.ingredient.strength[x]" ] ;
       fhir:path [ fhir:v "Medication.ingredient.strength[x]" ] ;
       fhir:short [ fhir:v "Quantity of ingredient present" ] ;
       fhir:definition [ fhir:v "Specifies how many (or how much) of the items there are in this Medication.  For example, 250 mg per tablet.  This is expressed as a ratio where the numerator is 250mg and the denominator is 1 tablet but can also be expressed a quantity when the denominator is assumed to be 1 tablet." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "Medication.ingredient.strength[x]" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "Ratio" ]
       ] [
         fhir:code [ fhir:v "CodeableConcept" ]
       ] [
         fhir:code [ fhir:v "Quantity" ]
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Element" ]
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "false" ] ;
       fhir:binding [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName" ] ;
           fhir:value [ fhir:v "MedicationIngredientStrength" ]
         ] ) ;
         fhir:strength [ fhir:v "preferred" ] ;
         fhir:description [ fhir:v "A coded concpet defining the strength of an ingredient." ] ;
         fhir:valueSet [ fhir:v "http://hl7.org/fhir/ValueSet/medication-ingredientstrength" ]
       ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "script10.6" ] ;
         fhir:map [ fhir:v "//element(*,DrugCodedType)/Strength" ]
       ] [
         fhir:identity [ fhir:v "v2" ] ;
         fhir:map [ fhir:v "RXC-3 Component Amount & RXC-4 Component Units  if medication: RXO-2 Requested Give Amount - Minimum & RXO-4 Requested Give Units / RXO-3 Requested Give Amount - Maximum & RXO-4 Requested Give Units / RXO-11 Requested Dispense Amount & RXO-12 Requested Dispense Units / RXE-3 Give Amount - Minimum & RXE-5 Give Units / RXE-4 Give Amount - Maximum & RXE-5 Give Units / RXE-10 Dispense Amount & RXE-10 Dispense Units" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v ".quantity" ]
       ] )
     ] [
       fhir:id [ fhir:v "Medication.batch" ] ;
       fhir:path [ fhir:v "Medication.batch" ] ;
       fhir:short [ fhir:v "Details about packaged medications" ] ;
       fhir:definition [ fhir:v "Information that only applies to packages (not products)." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "Medication.batch" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "BackboneElement" ]
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Element" ]
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "false" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "script10.6" ] ;
         fhir:map [ fhir:v "no mapping" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v ".player[classCode=CONT]" ]
       ] )
     ] [
       fhir:id [ fhir:v "Medication.batch.id" ] ;
       fhir:path [ fhir:v "Medication.batch.id" ] ;
       fhir:representation ( [ fhir:v "xmlAttr" ] ) ;
       fhir:short [ fhir:v "Unique id for inter-element referencing" ] ;
       fhir:definition [ fhir:v "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "Element.id" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type" ] ;
           fhir:value [ fhir:v "string" ]
         ] ) ;
         fhir:code [ fhir:v "http://hl7.org/fhirpath/System.String" ]
       ] ) ;
       fhir:condition ( [ fhir:v "ele-1" ] ) ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "false" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "n/a" ]
       ] )
     ] [
       fhir:id [ fhir:v "Medication.batch.extension" ] ;
       fhir:path [ fhir:v "Medication.batch.extension" ] ;
       fhir:short [ fhir:v "Additional content defined by implementations" ] ;
       fhir:definition [ fhir: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." ] ;
       fhir:comment [ fhir: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." ] ;
       fhir:alias ( [ fhir:v "extensions" ] [ fhir:v "user content" ] ) ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "*" ] ;
       fhir:base [
         fhir:path [ fhir:v "Element.extension" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "*" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "Extension" ]
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Element" ]
       ] ) ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "false" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "n/a" ]
       ] )
     ] [
       fhir:id [ fhir:v "Medication.batch.modifierExtension" ] ;
       fhir:path [ fhir:v "Medication.batch.modifierExtension" ] ;
       fhir:short [ fhir:v "Extensions that cannot be ignored even if unrecognized" ] ;
       fhir:definition [ fhir: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.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)." ] ;
       fhir:comment [ fhir: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." ] ;
       fhir:requirements [ fhir: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](extensibility.html#modifierExtension)." ] ;
       fhir:alias ( [ fhir:v "extensions" ] [ fhir:v "user content" ] [ fhir:v "modifiers" ] ) ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "*" ] ;
       fhir:base [
         fhir:path [ fhir:v "BackboneElement.modifierExtension" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "*" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "Extension" ]
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Element" ]
       ] ) ;
       fhir:isModifier [ fhir:v "true" ] ;
       fhir:isModifierReason [ fhir:v "Modifier extensions are expected to modify the meaning or interpretation of the element that contains them" ] ;
       fhir:isSummary [ fhir:v "true" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "N/A" ]
       ] )
     ] [
       fhir:id [ fhir:v "Medication.batch.lotNumber" ] ;
       fhir:path [ fhir:v "Medication.batch.lotNumber" ] ;
       fhir:short [ fhir:v "Identifier assigned to batch" ] ;
       fhir:definition [ fhir:v "The assigned lot number of a batch of the specified product." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "Medication.batch.lotNumber" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "string" ]
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Element" ]
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "false" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "script10.6" ] ;
         fhir:map [ fhir:v "no mapping" ]
       ] [
         fhir:identity [ fhir:v "v2" ] ;
         fhir:map [ fhir:v "RXA-15 Substance Lot Number / RXG-19 Substance Lot Number" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v ".id" ]
       ] )
     ] [
       fhir:id [ fhir:v "Medication.batch.expirationDate" ] ;
       fhir:path [ fhir:v "Medication.batch.expirationDate" ] ;
       fhir:short [ fhir:v "When batch will expire" ] ;
       fhir:definition [ fhir:v "When this specific batch of product will expire." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "Medication.batch.expirationDate" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "dateTime" ]
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Element" ]
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "false" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "script10.6" ] ;
         fhir:map [ fhir:v "no mapping" ]
       ] [
         fhir:identity [ fhir:v "v2" ] ;
         fhir:map [ fhir:v "RXA-16 Substance Expiration Date / RXG-20 Substance Expiration Date" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "participation[typeCode=CSM].role[classCode=INST].scopedRole.scoper[classCode=MMAT].expirationTime" ]
       ] )
     ] [
       fhir:id [ fhir:v "Medication.definition" ] ;
       fhir:path [ fhir:v "Medication.definition" ] ;
       fhir:short [ fhir:v "Knowledge about this medication" ] ;
       fhir:definition [ fhir:v "A reference to a knowledge resource that provides more information about this medication." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "Medication.definition" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "Reference" ] ;
         fhir:targetProfile ( [ fhir:v "http://hl7.org/fhir/StructureDefinition/MedicationKnowledge" ] )
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Element" ]
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "false" ]
     ] )
  ] ;
  fhir:differential [
     fhir:element ( [
       fhir:id [ fhir:v "Medication" ] ;
       fhir:path [ fhir:v "Medication" ] ;
       fhir:short [ fhir:v "Definition of a Medication" ] ;
       fhir:definition [ fhir:v "This resource is primarily used for the identification and definition of a medication, including ingredients, for the purposes of prescribing, dispensing, and administering a medication as well as for making statements about medication use." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "*" ] ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "script10.6" ] ;
         fhir:map [ fhir:v "NewRx/MedicationPrescribed\r-or-\rRxFill/MedicationDispensed\r-or-\rRxHistoryResponse/MedicationDispensed\r-or-\rRxHistoryResponse/MedicationPrescribed" ]
       ] [
         fhir:identity [ fhir:v "w5" ] ;
         fhir:map [ fhir:v "clinical.medication" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "ManufacturedProduct[classCode=ADMM]" ]
       ] )
     ] [
       fhir:id [ fhir:v "Medication.identifier" ] ;
       fhir:path [ fhir:v "Medication.identifier" ] ;
       fhir:short [ fhir:v "Business identifier for this medication" ] ;
       fhir:definition [ fhir:v "Business identifier for this medication." ] ;
       fhir:comment [ fhir:v "The serial number could be included as an identifier." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "*" ] ;
       fhir:type ( [
         fhir:code [ fhir:v "Identifier" ]
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "true" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "w5" ] ;
         fhir:map [ fhir:v "FiveWs.identifier" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v ".id" ]
       ] )
     ] [
       fhir:id [ fhir:v "Medication.code" ] ;
       fhir:path [ fhir:v "Medication.code" ] ;
       fhir:short [ fhir:v "Codes that identify this medication" ] ;
       fhir:definition [ fhir:v "A code (or set of codes) that specify this medication, or a textual description if no code is available. Usage note: This could be a standard medication code such as a code from RxNorm, SNOMED CT, IDMP etc. It could also be a national or local formulary code, optionally with translations to other code systems." ] ;
       fhir:comment [ fhir:v "Depending on the context of use, the code that was actually selected by the user (prescriber, dispenser, etc.) will have the coding.userSelected set to true.  As described in the coding datatype: \"A coding may be marked as a \"userSelected\" if a user selected the particular coded value in a user interface (e.g. the user selects an item in a pick-list). If a user selected coding exists, it is the preferred choice for performing translations etc. Other codes can only be literal translations to alternative code systems, or codes at a lower level of granularity (e.g. a generic code for a vendor-specific primary one)." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:type ( [
         fhir:code [ fhir:v "CodeableConcept" ]
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "true" ] ;
       fhir:binding [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName" ] ;
           fhir:value [ fhir:v "MedicationFormalRepresentation" ]
         ] ) ;
         fhir:strength [ fhir:v "example" ] ;
         fhir:description [ fhir:v "A coded concept that defines the type of a medication." ] ;
         fhir:valueSet [ fhir:v "http://hl7.org/fhir/ValueSet/medication-codes" ]
       ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "script10.6" ] ;
         fhir:map [ fhir:v "coding.code = //element(*,MedicationType)/DrugCoded/ProductCode\r\rcoding.system = //element(*,MedicationType)/DrugCoded/ProductCodeQualifier\r\rcoding.display = //element(*,MedicationType)/DrugDescription" ]
       ] [
         fhir:identity [ fhir:v "w5" ] ;
         fhir:map [ fhir:v "FiveWs.class" ]
       ] [
         fhir:identity [ fhir:v "v2" ] ;
         fhir:map [ fhir:v "RXO-1.1 Requested Give Code.code / RXE-2.1 Give Code.code / RXD-2.1 Dispense/Give Code.code / RXG-4.1 Give Code.code /RXA-5.1 Administered Code.code / RXC-2.1 Component Code" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v ".code" ]
       ] )
     ] [
       fhir:id [ fhir:v "Medication.status" ] ;
       fhir:path [ fhir:v "Medication.status" ] ;
       fhir:short [ fhir:v "active | inactive | entered-in-error" ] ;
       fhir:definition [ fhir:v "A code to indicate if the medication is in active use." ] ;
       fhir:comment [ fhir:v "This status is intended to identify if the medication in a local system is in active use within a drug database or inventory.  For example, a pharmacy system may create a new drug file record for a compounded product \"ABC Hospital Special Cream\" with an active status.  At some point in the future, it may be determined that the drug record was created with an error and the status is changed to \"entered in error\".   This status is not intended to specify if a medication is part of a particular formulary.  It is possible that the drug record may be referenced by multiple formularies or catalogues and each of those entries would have a separate status." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:type ( [
         fhir:code [ fhir:v "code" ]
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "true" ] ;
       fhir:isModifierReason [ fhir:v "This element changes the interpretation of all descriptive attributes." ] ;
       fhir:isSummary [ fhir:v "true" ] ;
       fhir:binding [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName" ] ;
           fhir:value [ fhir:v "MedicationStatus" ]
         ] ) ;
         fhir:strength [ fhir:v "required" ] ;
         fhir:description [ fhir:v "A coded concept defining if the medication is in active use." ] ;
         fhir:valueSet [ fhir:v "http://hl7.org/fhir/ValueSet/medication-status|6.0.0-cibuild" ]
       ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v ".statusCode" ]
       ] )
     ] [
       fhir:id [ fhir:v "Medication.marketingAuthorizationHolder" ] ;
       fhir:path [ fhir:v "Medication.marketingAuthorizationHolder" ] ;
       fhir:short [ fhir:v "Organization that has authorization to market medication" ] ;
       fhir:definition [ fhir:v "The company or other legal entity that has authorization, from the appropriate drug regulatory authority,  to market a medicine in one or more jurisdictions.  Typically abbreviated MAH.Note:  The MAH may manufacture the product and may also contract the manufacturing of the product to one or more companies (organizations)." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:type ( [
         fhir:code [ fhir:v "Reference" ] ;
         fhir:targetProfile ( [ fhir:v "http://hl7.org/fhir/StructureDefinition/Organization" ] )
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "true" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v ".player.scopingRole[typeCode=MANU].scoper" ]
       ] )
     ] [
       fhir:id [ fhir:v "Medication.doseForm" ] ;
       fhir:path [ fhir:v "Medication.doseForm" ] ;
       fhir:short [ fhir:v "powder | tablets | capsule +" ] ;
       fhir:definition [ fhir:v "Describes the form of the item.  Powder; tablets; capsule." ] ;
       fhir:comment [ fhir:v "When Medication is referenced from MedicationRequest, this is the ordered form.  When Medication is referenced within MedicationDispense, this is the dispensed form.  When Medication is referenced within MedicationAdministration, this is administered form." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:type ( [
         fhir:code [ fhir:v "CodeableConcept" ]
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "false" ] ;
       fhir:binding [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName" ] ;
           fhir:value [ fhir:v "MedicationForm" ]
         ] ) ;
         fhir:strength [ fhir:v "example" ] ;
         fhir:description [ fhir:v "A coded concept defining the form of a medication." ] ;
         fhir:valueSet [ fhir:v "http://hl7.org/fhir/ValueSet/medication-form-codes" ]
       ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "script10.6" ] ;
         fhir:map [ fhir:v "coding.code =  //element(*,DrugCodedType)/FormCode\r\rcoding.system = //element(*,DrugCodedType)/FormSourceCode" ]
       ] [
         fhir:identity [ fhir:v "v2" ] ;
         fhir:map [ fhir:v "RXO-5 Requested Dosage Form / RXE-6 Give Dosage Form / RXD-6 Actual Dosage Form / RXG-8 Give Dosage Form / RXA-8 Administered Dosage Form" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v ".formCode" ]
       ] )
     ] [
       fhir:id [ fhir:v "Medication.totalVolume" ] ;
       fhir:path [ fhir:v "Medication.totalVolume" ] ;
       fhir:short [ fhir:v "When the specified product code does not infer a package size, this is the specific amount of drug in the product" ] ;
       fhir:definition [ fhir:v "When the specified product code does not infer a package size, this is the specific amount of drug in the product.  For example, when specifying a product that has the same strength (For example, Insulin glargine 100 unit per mL solution for injection), this attribute provides additional clarification of the package amount (For example, 3 mL, 10mL, etc.)." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:type ( [
         fhir:code [ fhir:v "Quantity" ]
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "true" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v ".quantity" ]
       ] )
     ] [
       fhir:id [ fhir:v "Medication.ingredient" ] ;
       fhir:path [ fhir:v "Medication.ingredient" ] ;
       fhir:short [ fhir:v "Active or inactive ingredient" ] ;
       fhir:definition [ fhir:v "Identifies a particular constituent of interest in the product." ] ;
       fhir:comment [ fhir:v "The ingredients need not be a complete list.  If an ingredient is not specified, this does not indicate whether an ingredient is present or absent.  If an ingredient is specified it does not mean that all ingredients are specified.  It is possible to specify both inactive and active ingredients." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "*" ] ;
       fhir:type ( [
         fhir:code [ fhir:v "BackboneElement" ]
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "false" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v ".scopesRole[typeCode=INGR]" ]
       ] )
     ] [
       fhir:id [ fhir:v "Medication.ingredient.item" ] ;
       fhir:path [ fhir:v "Medication.ingredient.item" ] ;
       fhir:short [ fhir:v "The ingredient (substance or medication) that the ingredient.strength relates to" ] ;
       fhir:definition [ fhir:v "The ingredient (substance or medication) that the ingredient.strength relates to.  This is represented as a concept from a code system or described in another resource (Substance or Medication)." ] ;
       fhir:requirements [ fhir:v "The ingredient may reference a substance (for example, amoxicillin) or another medication (for example in the case of a compounded product, Glaxal Base)." ] ;
       fhir:min [ fhir:v "1" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:type ( [
         fhir:code [ fhir:v "CodeableReference" ] ;
         fhir:targetProfile ( [ fhir:v "http://hl7.org/fhir/StructureDefinition/Substance" ] [ fhir:v "http://hl7.org/fhir/StructureDefinition/Medication" ] )
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "false" ] ;
       fhir:binding [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName" ] ;
           fhir:value [ fhir:v "MedicationFormalRepresentation" ]
         ] ) ;
         fhir:strength [ fhir:v "example" ] ;
         fhir:valueSet [ fhir:v "http://hl7.org/fhir/ValueSet/medication-codes" ]
       ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "script10.6" ] ;
         fhir:map [ fhir:v "coding.code = //element(*,MedicationType)/DrugCoded/ProductCode\r\rcoding.system = //element(*,MedicationType)/DrugCoded/ProductCodeQualifier\r\rcoding.display = //element(*,MedicationType)/DrugDescription" ]
       ] [
         fhir:identity [ fhir:v "v2" ] ;
         fhir:map [ fhir:v "RXC-2 Component Code  if medication: RXO-1 Requested Give Code / RXE-2 Give Code / RXD-2-Dispense Give Code / RXG-4 Give Code / RXA-5 Administered Code" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v ".player" ]
       ] )
     ] [
       fhir:id [ fhir:v "Medication.ingredient.isActive" ] ;
       fhir:path [ fhir:v "Medication.ingredient.isActive" ] ;
       fhir:short [ fhir:v "Active ingredient indicator" ] ;
       fhir:definition [ fhir:v "Indication of whether this ingredient affects the therapeutic action of the drug." ] ;
       fhir:requirements [ fhir:v "True indicates that the ingredient affects the therapeutic action of the drug (i.e. active). \rFalse indicates that the ingredient does not affect the therapeutic action of the drug (i.e. inactive)." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:type ( [
         fhir:code [ fhir:v "boolean" ]
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "false" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "NA" ]
       ] )
     ] [
       fhir:id [ fhir:v "Medication.ingredient.strength[x]" ] ;
       fhir:path [ fhir:v "Medication.ingredient.strength[x]" ] ;
       fhir:short [ fhir:v "Quantity of ingredient present" ] ;
       fhir:definition [ fhir:v "Specifies how many (or how much) of the items there are in this Medication.  For example, 250 mg per tablet.  This is expressed as a ratio where the numerator is 250mg and the denominator is 1 tablet but can also be expressed a quantity when the denominator is assumed to be 1 tablet." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:type ( [
         fhir:code [ fhir:v "Ratio" ]
       ] [
         fhir:code [ fhir:v "CodeableConcept" ]
       ] [
         fhir:code [ fhir:v "Quantity" ]
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "false" ] ;
       fhir:binding [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName" ] ;
           fhir:value [ fhir:v "MedicationIngredientStrength" ]
         ] ) ;
         fhir:strength [ fhir:v "preferred" ] ;
         fhir:description [ fhir:v "A coded concpet defining the strength of an ingredient." ] ;
         fhir:valueSet [ fhir:v "http://hl7.org/fhir/ValueSet/medication-ingredientstrength" ]
       ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "script10.6" ] ;
         fhir:map [ fhir:v "//element(*,DrugCodedType)/Strength" ]
       ] [
         fhir:identity [ fhir:v "v2" ] ;
         fhir:map [ fhir:v "RXC-3 Component Amount & RXC-4 Component Units  if medication: RXO-2 Requested Give Amount - Minimum & RXO-4 Requested Give Units / RXO-3 Requested Give Amount - Maximum & RXO-4 Requested Give Units / RXO-11 Requested Dispense Amount & RXO-12 Requested Dispense Units / RXE-3 Give Amount - Minimum & RXE-5 Give Units / RXE-4 Give Amount - Maximum & RXE-5 Give Units / RXE-10 Dispense Amount & RXE-10 Dispense Units" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v ".quantity" ]
       ] )
     ] [
       fhir:id [ fhir:v "Medication.batch" ] ;
       fhir:path [ fhir:v "Medication.batch" ] ;
       fhir:short [ fhir:v "Details about packaged medications" ] ;
       fhir:definition [ fhir:v "Information that only applies to packages (not products)." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:type ( [
         fhir:code [ fhir:v "BackboneElement" ]
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "false" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "script10.6" ] ;
         fhir:map [ fhir:v "no mapping" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v ".player[classCode=CONT]" ]
       ] )
     ] [
       fhir:id [ fhir:v "Medication.batch.lotNumber" ] ;
       fhir:path [ fhir:v "Medication.batch.lotNumber" ] ;
       fhir:short [ fhir:v "Identifier assigned to batch" ] ;
       fhir:definition [ fhir:v "The assigned lot number of a batch of the specified product." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:type ( [
         fhir:code [ fhir:v "string" ]
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "false" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "script10.6" ] ;
         fhir:map [ fhir:v "no mapping" ]
       ] [
         fhir:identity [ fhir:v "v2" ] ;
         fhir:map [ fhir:v "RXA-15 Substance Lot Number / RXG-19 Substance Lot Number" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v ".id" ]
       ] )
     ] [
       fhir:id [ fhir:v "Medication.batch.expirationDate" ] ;
       fhir:path [ fhir:v "Medication.batch.expirationDate" ] ;
       fhir:short [ fhir:v "When batch will expire" ] ;
       fhir:definition [ fhir:v "When this specific batch of product will expire." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:type ( [
         fhir:code [ fhir:v "dateTime" ]
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "false" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "script10.6" ] ;
         fhir:map [ fhir:v "no mapping" ]
       ] [
         fhir:identity [ fhir:v "v2" ] ;
         fhir:map [ fhir:v "RXA-16 Substance Expiration Date / RXG-20 Substance Expiration Date" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "participation[typeCode=CSM].role[classCode=INST].scopedRole.scoper[classCode=MMAT].expirationTime" ]
       ] )
     ] [
       fhir:id [ fhir:v "Medication.definition" ] ;
       fhir:path [ fhir:v "Medication.definition" ] ;
       fhir:short [ fhir:v "Knowledge about this medication" ] ;
       fhir:definition [ fhir:v "A reference to a knowledge resource that provides more information about this medication." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:type ( [
         fhir:code [ fhir:v "Reference" ] ;
         fhir:targetProfile ( [ fhir:v "http://hl7.org/fhir/StructureDefinition/MedicationKnowledge" ] )
       ] ) ;
       fhir:mustSupport [ fhir:v "false" ] ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "false" ]
     ] )
  ] .

# -------------------------------------------------------------------------------------


Usage note: every effort has been made to ensure that the examples are correct and useful, but they are not a normative part of the specification.