HL7 FHIR Profile: Skin and Wound Assessment, Release 1 (For Comment)

MedicationProfile


<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="cimi-entity-Medication"/>
  <text>
    <status value="generated"/>
    <div xmlns="http://www.w3.org/1999/xhtml">
  <p><b>SW Medication Profile</b></p>
  <p>A type of prescription drug or over-the-counter drug that is used to prevent, treat, or relieve symptoms of a disease or abnormal condition, but excluding vaccines.</p>
  <p><b>SW Mapping Summary</b></p>
  <p><pre>cimi.entity.Medication maps to http://hl7.org/fhir/us/core/StructureDefinition/us-core-medication:
  Type maps to code
  DoseForm maps to form
  MedicationIngredient.CodeableConcept maps to ingredient.item[x]
  MedicationIngredient.Substance maps to ingredient.item[x]
  MedicationIngredient.Medication maps to ingredient.item[x]
  MedicationIngredient.IngredientAmount maps to ingredient.amount
  MedicationIngredient.IsActiveIngredient maps to ingredient.isActive
  Brand maps to isBrand
  OverTheCounter maps to isOverTheCounter
  Manufacturer maps to manufacturer
  constrain package.batch to 0..1
  LotNumber maps to package.batch.lotNumber
  ExpirationDate maps to package.batch.expirationDate
  Package maps to package.container
</pre></p>
</div>
  </text>
  <url
       value="http://hl7.org/fhir/us/sw/StructureDefinition/cimi-entity-Medication"/>
  <identifier>
    <system value="http://hl7.org/fhir/us/sw"/>
    <value value="cimi.entity.Medication"/>
  </identifier>
  <version value="1.0.0"/>
  <name value="MedicationProfile"/>
  <title value="SW Medication Profile"/>
  <status value="draft"/>
  <date value="2018-08-17T00:00:00-04:00"/>
  <publisher
             value="HL7 Patient Care and Clinical Information Modeling Initiative Work Groups"/>
  <contact>
    <telecom>
      <system value="url"/>
      <value value="http://standardhealthrecord.org"/>
    </telecom>
  </contact>
  <description
               value="A type of prescription drug or over-the-counter drug that is used to prevent, treat, or relieve symptoms of a disease or abnormal condition, but excluding vaccines."/>
  <jurisdiction>
    <coding>
      <system value="urn:iso:std:iso:3166"/>
      <code value="US"/>
      <display value="United States of America"/>
    </coding>
  </jurisdiction>
  <fhirVersion value="3.0.1"/>
  <mapping>
    <identity value="argonaut-dq-dstu2"/>
    <uri value="http://unknown.org/Argonaut%20DQ%20DSTU2"/>
    <name value="Argonaut DQ DSTU2"/>
  </mapping>
  <mapping>
    <identity value="script10.6"/>
    <uri value="http://ncpdp.org/SCRIPT10_6"/>
    <name value="Mapping to NCPDP SCRIPT 10.6"/>
  </mapping>
  <mapping>
    <identity value="rim"/>
    <uri value="http://hl7.org/v3"/>
    <name value="RIM Mapping"/>
  </mapping>
  <mapping>
    <identity value="w5"/>
    <uri value="http://hl7.org/fhir/w5"/>
    <name value="W5 Mapping"/>
  </mapping>
  <mapping>
    <identity value="v2"/>
    <uri value="http://hl7.org/v2"/>
    <name value="HL7 v2 Mapping"/>
  </mapping>
  <kind value="resource"/>
  <abstract value="false"/>
  <type value="Medication"/>
  <baseDefinition
                  value="http://hl7.org/fhir/us/core/StructureDefinition/us-core-medication"/>
  <derivation value="constraint"/>
  <snapshot>
    <element id="Medication:cimi-entity-Medication">
      <path value="Medication"/>
      <short value="SW Medication Profile"/>
      <definition
                  value="A type of prescription drug or over-the-counter drug that is used to prevent, treat, or relieve symptoms of a disease or abnormal condition, but excluding vaccines."/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Medication"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <constraint>
        <key value="dom-2"/>
        <severity value="error"/>
        <human
               value="If the resource is contained in another resource, it SHALL NOT contain nested Resources"/>
        <expression value="contained.contained.empty()"/>
        <xpath value="not(parent::f:contained and f:contained)"/>
        <source value="DomainResource"/>
      </constraint>
      <constraint>
        <key value="dom-1"/>
        <severity value="error"/>
        <human
               value="If the resource is contained in another resource, it SHALL NOT contain any narrative"/>
        <expression value="contained.text.empty()"/>
        <xpath value="not(parent::f:contained and f:text)"/>
        <source value="DomainResource"/>
      </constraint>
      <constraint>
        <key value="dom-4"/>
        <severity value="error"/>
        <human
               value="If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated"/>
        <expression
                    value="contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()"/>
        <xpath
               value="not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))"/>
        <source value="DomainResource"/>
      </constraint>
      <constraint>
        <key value="dom-3"/>
        <severity value="error"/>
        <human
               value="If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource"/>
        <expression
                    value="contained.where((&#39;#&#39;+id in %resource.descendants().reference).not()).empty()"/>
        <xpath
               value="not(exists(for $id in f:contained/*/@id return $id[not(ancestor::f:contained/parent::*/descendant::f:reference/@value=concat(&#39;#&#39;, $id))]))"/>
        <source value="DomainResource"/>
      </constraint>
      <mustSupport value="false"/>
      <mapping>
        <identity value="rim"/>
        <map value="Entity. Role, or Act"/>
      </mapping>
      <mapping>
        <identity value="script10.6"/>
        <map
             value="NewRx/MedicationPrescribed
-or-
RxFill/MedicationDispensed
-or-
RxHistoryResponse/MedicationDispensed
-or-
RxHistoryResponse/MedicationPrescribed"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value="ManufacturedProduct[classCode=ADMM]"/>
      </mapping>
      <mapping>
        <identity value="w5"/>
        <map value="clinical.medication"/>
      </mapping>
      <mapping>
        <identity value="argonaut-dq-dstu2"/>
        <map value="Medication"/>
      </mapping>
    </element>
    <element id="Medication:cimi-entity-Medication.id">
      <path value="Medication.id"/>
      <short value="Logical id of this artifact"/>
      <definition
                  value="The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."/>
      <comment
               value="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 value="0"/>
      <max value="1"/>
      <base>
        <path value="Resource.id"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="id"/>
      </type>
      <isSummary value="true"/>
    </element>
    <element id="Medication:cimi-entity-Medication.meta">
      <path value="Medication.meta"/>
      <short value="Metadata about the resource"/>
      <definition
                  value="The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content may not always be associated with version changes to the resource."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Resource.meta"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="Meta"/>
      </type>
      <isSummary value="true"/>
    </element>
    <element id="Medication:cimi-entity-Medication.implicitRules">
      <path value="Medication.implicitRules"/>
      <short value="A set of rules under which this content was created"/>
      <definition
                  value="A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content."/>
      <comment
               value="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. 

This element is labelled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it&#39;s meaning or interpretation."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Resource.implicitRules"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="uri"/>
      </type>
      <isModifier value="true"/>
      <isSummary value="true"/>
    </element>
    <element id="Medication:cimi-entity-Medication.language">
      <path value="Medication.language"/>
      <short value="Language of the resource content"/>
      <definition value="The base language in which the resource is written."/>
      <comment
               value="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 value="0"/>
      <max value="1"/>
      <base>
        <path value="Resource.language"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="code"/>
      </type>
      <binding>
        <extension
                   url="http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet">
          <valueReference>
            <reference value="http://hl7.org/fhir/ValueSet/all-languages"/>
          </valueReference>
        </extension>
        <extension
                   url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="Language"/>
        </extension>
        <extension
                   url="http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding">
          <valueBoolean value="true"/>
        </extension>
        <strength value="extensible"/>
        <description value="A human language."/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/languages"/>
        </valueSetReference>
      </binding>
    </element>
    <element id="Medication:cimi-entity-Medication.text">
      <path value="Medication.text"/>
      <short value="Text summary of the resource, for human interpretation"/>
      <definition
                  value="A human-readable narrative that contains a summary of the resource, and may 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 &quot;clinically safe&quot; 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
               value="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 &quot;text blob&quot; or where text is additionally entered raw or narrated and encoded in formation is added later."/>
      <alias value="narrative"/>
      <alias value="html"/>
      <alias value="xhtml"/>
      <alias value="display"/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="DomainResource.text"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="Narrative"/>
      </type>
      <condition value="dom-1"/>
      <mapping>
        <identity value="rim"/>
        <map value="Act.text?"/>
      </mapping>
    </element>
    <element id="Medication:cimi-entity-Medication.contained">
      <path value="Medication.contained"/>
      <short value="Contained, inline Resources"/>
      <definition
                  value="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
               value="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."/>
      <alias value="inline resources"/>
      <alias value="anonymous resources"/>
      <alias value="contained resources"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="DomainResource.contained"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Resource"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="N/A"/>
      </mapping>
    </element>
    <element id="Medication:cimi-entity-Medication.extension">
      <path value="Medication.extension"/>
      <short value="Additional Content defined by implementations"/>
      <definition
                  value="May be used to represent additional information that is not part of the basic definition of the resource. In order 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."/>
      <comment
               value="There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone."/>
      <alias value="extensions"/>
      <alias value="user content"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="DomainResource.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="N/A"/>
      </mapping>
    </element>
    <element id="Medication:cimi-entity-Medication.modifierExtension">
      <path value="Medication.modifierExtension"/>
      <short value="Extensions that cannot be ignored"/>
      <definition
                  value="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. Usually modifier elements provide negation or qualification. In order 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."/>
      <comment
               value="There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone."/>
      <alias value="extensions"/>
      <alias value="user content"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="DomainResource.modifierExtension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <isModifier value="true"/>
      <mapping>
        <identity value="rim"/>
        <map value="N/A"/>
      </mapping>
    </element>
    <element id="Medication:cimi-entity-Medication.code">
      <path value="Medication.code"/>
      <short value="Codes that identify this medication"/>
      <definition
                  value="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."/>
      <comment
               value="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: &quot;A coding may be marked as a &quot;userSelected&quot; 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."/>
      <min value="1"/>
      <max value="1"/>
      <base>
        <path value="Medication.code"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="CodeableConcept"/>
      </type>
      <mustSupport value="true"/>
      <isSummary value="true"/>
      <binding>
        <strength value="extensible"/>
        <description value="Prescribable medications"/>
        <valueSetReference>
          <reference
                     value="http://hl7.org/fhir/us/core/ValueSet/us-core-medication-codes"/>
        </valueSetReference>
      </binding>
      <mapping>
        <identity value="script10.6"/>
        <map
             value="coding.code = //element(*,MedicationType)/DrugCoded/ProductCode

coding.system = //element(*,MedicationType)/DrugCoded/ProductCodeQualifier

coding.display = //element(*,MedicationType)/DrugDescription"/>
      </mapping>
      <mapping>
        <identity value="v2"/>
        <map
             value="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"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value=".code"/>
      </mapping>
      <mapping>
        <identity value="w5"/>
        <map value="class"/>
      </mapping>
      <mapping>
        <identity value="argonaut-dq-dstu2"/>
        <map value="Medication.code"/>
      </mapping>
    </element>
    <element id="Medication:cimi-entity-Medication.status">
      <path value="Medication.status"/>
      <short value="active | inactive | entered-in-error"/>
      <definition value="A code to indicate if the medication is in active use."/>
      <comment
               value="This status is not intended to specify if a medication is part of a formulary."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Medication.status"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="code"/>
      </type>
      <isSummary value="true"/>
      <binding>
        <extension
                   url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="MedicationStatus"/>
        </extension>
        <strength value="required"/>
        <description
                     value="A coded concept defining if the medication is in active use"/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/medication-status"/>
        </valueSetReference>
      </binding>
      <mapping>
        <identity value="rim"/>
        <map value=".statusCode"/>
      </mapping>
    </element>
    <element id="Medication:cimi-entity-Medication.isBrand">
      <path value="Medication.isBrand"/>
      <short value="True if a brand"/>
      <definition
                  value="Set to true if the item is attributable to a specific manufacturer."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Medication.isBrand"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="boolean"/>
      </type>
      <isSummary value="true"/>
      <mapping>
        <identity value="script10.6"/>
        <map value="no mapping"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value="true if .player.scopingRole[typeCode=MANU] exists"/>
      </mapping>
      <mapping>
        <identity value="w5"/>
        <map value="class"/>
      </mapping>
    </element>
    <element id="Medication:cimi-entity-Medication.isOverTheCounter">
      <path value="Medication.isOverTheCounter"/>
      <short value="True if medication does not require a prescription"/>
      <definition
                  value="Set to true if the medication can be obtained without an order from a prescriber."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Medication.isOverTheCounter"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="boolean"/>
      </type>
      <isSummary value="true"/>
      <mapping>
        <identity value="rim"/>
        <map value="NA"/>
      </mapping>
      <mapping>
        <identity value="w5"/>
        <map value="class"/>
      </mapping>
    </element>
    <element id="Medication:cimi-entity-Medication.manufacturer">
      <path value="Medication.manufacturer"/>
      <short value="Manufacturer of the item"/>
      <definition
                  value="Describes the details of the manufacturer of the medication product.  This is not intended to represent the distributor of a medication product."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Medication.manufacturer"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="Reference"/>
        <targetProfile
                       value="http://hl7.org/fhir/us/sw/StructureDefinition/cimi-entity-Organization"/>
      </type>
      <isSummary value="true"/>
      <mapping>
        <identity value="script10.6"/>
        <map value="no mapping"/>
      </mapping>
      <mapping>
        <identity value="v2"/>
        <map
             value="RXD-20-Substance Manufacturer Name / RXG-21-Substance Manufacturer Name / RXA-17-Substance Manufacturer Name"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value=".player.scopingRole[typeCode=MANU].scoper"/>
      </mapping>
      <mapping>
        <identity value="w5"/>
        <map value="who.actor"/>
      </mapping>
    </element>
    <element id="Medication:cimi-entity-Medication.form">
      <path value="Medication.form"/>
      <short value="powder | tablets | capsule +"/>
      <definition
                  value="Describes the form of the item.  Powder; tablets; capsule."/>
      <comment
               value="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."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Medication.form"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="CodeableConcept"/>
      </type>
      <binding>
        <extension
                   url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="MedicationForm"/>
        </extension>
        <strength value="required"/>
        <description value="A coded concept defining the form of a medication"/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/medication-form-codes"/>
        </valueSetReference>
      </binding>
      <mapping>
        <identity value="script10.6"/>
        <map
             value="coding.code =  //element(*,DrugCodedType)/FormCode

coding.system = //element(*,DrugCodedType)/FormSourceCode"/>
      </mapping>
      <mapping>
        <identity value="v2"/>
        <map
             value="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"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value=".formCode"/>
      </mapping>
    </element>
    <element id="Medication:cimi-entity-Medication.ingredient">
      <path value="Medication.ingredient"/>
      <short value="Active or inactive ingredient"/>
      <definition
                  value="Identifies a particular constituent of interest in the product."/>
      <comment
               value="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."/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Medication.ingredient"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="BackboneElement"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression value="hasValue() | (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="Element"/>
      </constraint>
      <mapping>
        <identity value="rim"/>
        <map value=".scopesRole[typeCode=INGR]"/>
      </mapping>
    </element>
    <element id="Medication:cimi-entity-Medication.ingredient.id">
      <path value="Medication.ingredient.id"/>
      <representation value="xmlAttr"/>
      <short value="xml:id (or equivalent in JSON)"/>
      <definition
                  value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Element.id"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="string"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="Medication:cimi-entity-Medication.ingredient.extension">
      <path value="Medication.ingredient.extension"/>
      <short value="Additional Content defined by implementations"/>
      <definition
                  value="May be used to represent additional information that is not part of the basic definition of the element. In order 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."/>
      <comment
               value="There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone."/>
      <alias value="extensions"/>
      <alias value="user content"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Element.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="Medication:cimi-entity-Medication.ingredient.modifierExtension">
      <path value="Medication.ingredient.modifierExtension"/>
      <short value="Extensions that cannot be ignored"/>
      <definition
                  value="May be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order 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."/>
      <comment
               value="There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone."/>
      <alias value="extensions"/>
      <alias value="user content"/>
      <alias value="modifiers"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="BackboneElement.modifierExtension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <isModifier value="true"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="rim"/>
        <map value="N/A"/>
      </mapping>
    </element>
    <element id="Medication:cimi-entity-Medication.ingredient.item[x]">
      <path value="Medication.ingredient.item[x]"/>
      <short value="The product contained"/>
      <definition
                  value="The actual ingredient - either a substance (simple ingredient) or another medication."/>
      <min value="1"/>
      <max value="1"/>
      <base>
        <path value="Medication.ingredient.item[x]"/>
        <min value="1"/>
        <max value="1"/>
      </base>
      <type>
        <code value="CodeableConcept"/>
      </type>
      <type>
        <code value="Reference"/>
        <targetProfile
                       value="http://hl7.org/fhir/us/sw/StructureDefinition/cimi-entity-Substance"/>
      </type>
      <type>
        <code value="Reference"/>
        <targetProfile
                       value="http://hl7.org/fhir/us/sw/StructureDefinition/cimi-entity-Medication"/>
      </type>
      <mapping>
        <identity value="script10.6"/>
        <map
             value="coding.code = //element(*,MedicationType)/DrugCoded/ProductCode

coding.system = //element(*,MedicationType)/DrugCoded/ProductCodeQualifier

coding.display = //element(*,MedicationType)/DrugDescription"/>
      </mapping>
      <mapping>
        <identity value="v2"/>
        <map
             value="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"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value=".player"/>
      </mapping>
    </element>
    <element id="Medication:cimi-entity-Medication.ingredient.isActive">
      <path value="Medication.ingredient.isActive"/>
      <short value="Active ingredient indicator"/>
      <definition
                  value="Indication of whether this ingredient affects the therapeutic action of the drug."/>
      <requirements
                    value="True indicates that the ingredient affects the therapeutic action of the drug (i.e. active). 
False indicates that the ingredient does not affect the therapeutic action of the drug (i.e. inactive)."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Medication.ingredient.isActive"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="boolean"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="NA"/>
      </mapping>
    </element>
    <element id="Medication:cimi-entity-Medication.ingredient.amount">
      <path value="Medication.ingredient.amount"/>
      <short value="Quantity of ingredient present"/>
      <definition
                  value="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."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Medication.ingredient.amount"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="Ratio"/>
      </type>
      <mapping>
        <identity value="script10.6"/>
        <map value="//element(*,DrugCodedType)/Strength"/>
      </mapping>
      <mapping>
        <identity value="v2"/>
        <map
             value="RXC-3-Component Amount &amp; RXC-4-Component Units  if medication: RXO-2-Requested Give Amount - Minimum &amp; RXO-4-Requested Give Units / RXO-3-Requested Give Amount - Maximum &amp; RXO-4-Requested Give Units / RXO-11-Requested Dispense Amount &amp; RXO-12-Requested Dispense Units / RXE-3-Give Amount - Minimum &amp; RXE-5-Give Units / RXE-4-Give Amount - Maximum &amp; RXE-5-Give Units / RXE-10-Dispense Amount &amp; RXE-10-Dispense Units"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value=".quantity"/>
      </mapping>
    </element>
    <element id="Medication:cimi-entity-Medication.package">
      <path value="Medication.package"/>
      <short value="Details about packaged medications"/>
      <definition
                  value="Information that only applies to packages (not products)."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Medication.package"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="BackboneElement"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression value="hasValue() | (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="Element"/>
      </constraint>
      <mapping>
        <identity value="script10.6"/>
        <map value="no mapping"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value=".player[classCode=CONT]"/>
      </mapping>
    </element>
    <element id="Medication:cimi-entity-Medication.package.id">
      <path value="Medication.package.id"/>
      <representation value="xmlAttr"/>
      <short value="xml:id (or equivalent in JSON)"/>
      <definition
                  value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Element.id"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="string"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="Medication:cimi-entity-Medication.package.extension">
      <path value="Medication.package.extension"/>
      <short value="Additional Content defined by implementations"/>
      <definition
                  value="May be used to represent additional information that is not part of the basic definition of the element. In order 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."/>
      <comment
               value="There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone."/>
      <alias value="extensions"/>
      <alias value="user content"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Element.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="Medication:cimi-entity-Medication.package.modifierExtension">
      <path value="Medication.package.modifierExtension"/>
      <short value="Extensions that cannot be ignored"/>
      <definition
                  value="May be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order 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."/>
      <comment
               value="There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone."/>
      <alias value="extensions"/>
      <alias value="user content"/>
      <alias value="modifiers"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="BackboneElement.modifierExtension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <isModifier value="true"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="rim"/>
        <map value="N/A"/>
      </mapping>
    </element>
    <element id="Medication:cimi-entity-Medication.package.container">
      <path value="Medication.package.container"/>
      <short value="E.g. box, vial, blister-pack"/>
      <definition value="The kind of container that this package comes as."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Medication.package.container"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="CodeableConcept"/>
      </type>
      <binding>
        <extension
                   url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="MedicationContainer"/>
        </extension>
        <strength value="example"/>
        <description
                     value="A coded concept defining the kind of container a medication package is packaged in"/>
        <valueSetReference>
          <reference
                     value="http://hl7.org/fhir/ValueSet/medication-package-form"/>
        </valueSetReference>
      </binding>
      <mapping>
        <identity value="script10.6"/>
        <map value="no mapping"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value=".code"/>
      </mapping>
    </element>
    <element id="Medication:cimi-entity-Medication.package.content">
      <path value="Medication.package.content"/>
      <short value="What is  in the package"/>
      <definition
                  value="A set of components that go to make up the described item."/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Medication.package.content"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="BackboneElement"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression value="hasValue() | (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="Element"/>
      </constraint>
      <mapping>
        <identity value="script10.6"/>
        <map value="no mapping"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value=".scopesRole[typeCode=CONT]"/>
      </mapping>
    </element>
    <element id="Medication:cimi-entity-Medication.package.content.id">
      <path value="Medication.package.content.id"/>
      <representation value="xmlAttr"/>
      <short value="xml:id (or equivalent in JSON)"/>
      <definition
                  value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Element.id"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="string"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="Medication:cimi-entity-Medication.package.content.extension">
      <path value="Medication.package.content.extension"/>
      <short value="Additional Content defined by implementations"/>
      <definition
                  value="May be used to represent additional information that is not part of the basic definition of the element. In order 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."/>
      <comment
               value="There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone."/>
      <alias value="extensions"/>
      <alias value="user content"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Element.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element
             id="Medication:cimi-entity-Medication.package.content.modifierExtension">
      <path value="Medication.package.content.modifierExtension"/>
      <short value="Extensions that cannot be ignored"/>
      <definition
                  value="May be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order 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."/>
      <comment
               value="There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone."/>
      <alias value="extensions"/>
      <alias value="user content"/>
      <alias value="modifiers"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="BackboneElement.modifierExtension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <isModifier value="true"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="rim"/>
        <map value="N/A"/>
      </mapping>
    </element>
    <element id="Medication:cimi-entity-Medication.package.content.item[x]">
      <path value="Medication.package.content.item[x]"/>
      <short value="The item in the package"/>
      <definition value="Identifies one of the items in the package."/>
      <min value="1"/>
      <max value="1"/>
      <base>
        <path value="Medication.package.content.item[x]"/>
        <min value="1"/>
        <max value="1"/>
      </base>
      <type>
        <code value="CodeableConcept"/>
      </type>
      <type>
        <code value="Reference"/>
        <targetProfile
                       value="http://hl7.org/fhir/StructureDefinition/Medication"/>
      </type>
      <mapping>
        <identity value="script10.6"/>
        <map value="no mapping"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value=".player"/>
      </mapping>
    </element>
    <element id="Medication:cimi-entity-Medication.package.content.amount">
      <path value="Medication.package.content.amount"/>
      <short value="Quantity present in the package"/>
      <definition value="The amount of the product that is in the package."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Medication.package.content.amount"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="Quantity"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/SimpleQuantity"/>
      </type>
      <mapping>
        <identity value="script10.6"/>
        <map value="no mapping"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value=".quantity"/>
      </mapping>
    </element>
    <element id="Medication:cimi-entity-Medication.package.batch">
      <path value="Medication.package.batch"/>
      <short value="Identifies a single production run"/>
      <definition
                  value="Information about a group of medication produced or packaged from one production run."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Medication.package.batch"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="BackboneElement"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression value="hasValue() | (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="Element"/>
      </constraint>
      <mapping>
        <identity value="script10.6"/>
        <map value="no mapping"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map
             value="participation[typeCode=CSM].role[classCode=INST].scopedRole.scoper[classCode=MMAT].id"/>
      </mapping>
    </element>
    <element id="Medication:cimi-entity-Medication.package.batch.id">
      <path value="Medication.package.batch.id"/>
      <representation value="xmlAttr"/>
      <short value="xml:id (or equivalent in JSON)"/>
      <definition
                  value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Element.id"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="string"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="Medication:cimi-entity-Medication.package.batch.extension">
      <path value="Medication.package.batch.extension"/>
      <short value="Additional Content defined by implementations"/>
      <definition
                  value="May be used to represent additional information that is not part of the basic definition of the element. In order 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."/>
      <comment
               value="There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone."/>
      <alias value="extensions"/>
      <alias value="user content"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Element.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element
             id="Medication:cimi-entity-Medication.package.batch.modifierExtension">
      <path value="Medication.package.batch.modifierExtension"/>
      <short value="Extensions that cannot be ignored"/>
      <definition
                  value="May be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order 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."/>
      <comment
               value="There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone."/>
      <alias value="extensions"/>
      <alias value="user content"/>
      <alias value="modifiers"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="BackboneElement.modifierExtension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <isModifier value="true"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="rim"/>
        <map value="N/A"/>
      </mapping>
    </element>
    <element id="Medication:cimi-entity-Medication.package.batch.lotNumber">
      <path value="Medication.package.batch.lotNumber"/>
      <short value="Identifier assigned to batch"/>
      <definition
                  value="The assigned lot number of a batch of the specified product."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Medication.package.batch.lotNumber"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="string"/>
      </type>
      <mapping>
        <identity value="script10.6"/>
        <map value="no mapping"/>
      </mapping>
      <mapping>
        <identity value="v2"/>
        <map value="RXA-15 Substance Lot Number / RXG-19 Substance Lot Number"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value=".id"/>
      </mapping>
    </element>
    <element id="Medication:cimi-entity-Medication.package.batch.expirationDate">
      <path value="Medication.package.batch.expirationDate"/>
      <short value="When batch will expire"/>
      <definition value="When this specific batch of product will expire."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Medication.package.batch.expirationDate"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="dateTime"/>
      </type>
      <mapping>
        <identity value="script10.6"/>
        <map value="no mapping"/>
      </mapping>
      <mapping>
        <identity value="v2"/>
        <map
             value="RXA-16 Substance Expiration Date / RXG-20 Substance Expiration Date"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map
             value="participation[typeCode=CSM].role[classCode=INST].scopedRole.scoper[classCode=MMAT].expirationTime"/>
      </mapping>
    </element>
    <element id="Medication:cimi-entity-Medication.image">
      <path value="Medication.image"/>
      <short value="Picture of the medication"/>
      <definition
                  value="Photo(s) or graphic representation(s) of the medication."/>
      <requirements
                    value="Note that &quot;image&quot; is only applicable when the medication.code represents a physical item (e.g. Amoxil 250 mg capsule) and not an abstract item (e.g. amoxicillin 250 mg)."/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Medication.image"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Attachment"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map
             value=".participation[typeCode=SUBJ].role[classCode=MANU],source[classCode=OBS,moodCode=EVN,code=&quot;type of image&quot;].value(ED.image)"/>
      </mapping>
    </element>
  </snapshot>
  <differential>
    <element id="Medication:cimi-entity-Medication">
      <path value="Medication"/>
      <short value="SW Medication Profile"/>
      <definition
                  value="A type of prescription drug or over-the-counter drug that is used to prevent, treat, or relieve symptoms of a disease or abnormal condition, but excluding vaccines."/>
      <mustSupport value="false"/>
    </element>
    <element id="Medication:cimi-entity-Medication.manufacturer">
      <path value="Medication.manufacturer"/>
      <type>
        <code value="Reference"/>
        <targetProfile
                       value="http://hl7.org/fhir/us/sw/StructureDefinition/cimi-entity-Organization"/>
      </type>
    </element>
    <element id="Medication:cimi-entity-Medication.form">
      <path value="Medication.form"/>
      <binding>
        <extension
                   url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="MedicationForm"/>
        </extension>
        <strength value="required"/>
        <description value="A coded concept defining the form of a medication"/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/medication-form-codes"/>
        </valueSetReference>
      </binding>
    </element>
    <element id="Medication:cimi-entity-Medication.ingredient">
      <path value="Medication.ingredient"/>
    </element>
    <element id="Medication:cimi-entity-Medication.ingredient.item[x]">
      <path value="Medication.ingredient.item[x]"/>
      <type>
        <code value="CodeableConcept"/>
      </type>
      <type>
        <code value="Reference"/>
        <targetProfile
                       value="http://hl7.org/fhir/us/sw/StructureDefinition/cimi-entity-Substance"/>
      </type>
      <type>
        <code value="Reference"/>
        <targetProfile
                       value="http://hl7.org/fhir/us/sw/StructureDefinition/cimi-entity-Medication"/>
      </type>
    </element>
    <element id="Medication:cimi-entity-Medication.package">
      <path value="Medication.package"/>
    </element>
    <element id="Medication:cimi-entity-Medication.package.batch">
      <path value="Medication.package.batch"/>
      <min value="0"/>
      <max value="1"/>
    </element>
  </differential>
</StructureDefinition>