R4 Ballot #1 (Mixed Normative/Trial use)

This page is part of the FHIR Specification (v3.3.0: R4 Ballot 2). The current version which supercedes this version is 5.0.0. For a full list of available versions, see the Directory of published versions . Page versions: R5 R4B R4 R3 R2

Medication.profile.json

Pharmacy Work GroupMaturity Level: N/ABallot Status: InformativeCompartments: Not linked to any defined compartments

Raw JSON (canonical form)

StructureDefinition for medication

{
  "resourceType": "StructureDefinition",
  "id": "Medication",
  "meta": {
    "lastUpdated": "2018-04-03T12:05:46.262+10:00"
  },
  "text": {
    "status": "generated",
    "div": "<div>!-- Snipped for Brevity --></div>"
  },
  "extension": [
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-ballot-status",
      "valueString": "Trial Use"
    },
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm",
      "valueInteger": 3
    },
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg",
      "valueCode": "phx"
    }
  ],
  "url": "http://hl7.org/fhir/StructureDefinition/Medication",
  "name": "Medication",
  "status": "draft",
  "date": "2018-04-03T12:05:46+10:00",
  "publisher": "Health Level Seven International (Pharmacy)",
  "contact": [
    {
      "telecom": [
        {
          "system": "url",
          "value": "http://hl7.org/fhir"
        }
      ]
    },
    {
      "telecom": [
        {
          "system": "url",
          "value": "http://www.hl7.org/Special/committees/medication/index.cfm"
        }
      ]
    }
  ],
  "description": "This resource is primarily used for the identification and definition of a medication for the purposes of prescribing, dispensing, and administering a medication as well as for making statements about medication use.",
  "fhirVersion": "3.3.0",
  "mapping": [
    {
      "identity": "script10.6",
      "uri": "http://ncpdp.org/SCRIPT10_6",
      "name": "Mapping to NCPDP SCRIPT 10.6"
    },
    {
      "identity": "rim",
      "uri": "http://hl7.org/v3",
      "name": "RIM Mapping"
    },
    {
      "identity": "w5",
      "uri": "http://hl7.org/fhir/fivews",
      "name": "FiveWs Pattern"
    },
    {
      "identity": "v2",
      "uri": "http://hl7.org/v2",
      "name": "HL7 v2 Mapping"
    }
  ],
  "kind": "resource",
  "abstract": false,
  "type": "Medication",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/DomainResource",
  "derivation": "specialization",
  "snapshot": {
    "element": [
      {
        "id": "Medication",
        "path": "Medication",
        "short": "Definition of a Medication",
        "definition": "This resource is primarily used for the identification and definition of a medication for the purposes of prescribing, dispensing, and administering a medication as well as for making statements about medication use.",
        "min": 0,
        "max": "*",
        "base": {
          "path": "Medication",
          "min": 0,
          "max": "*"
        },
        "constraint": [
          {
            "key": "dom-2",
            "severity": "error",
            "human": "If the resource is contained in another resource, it SHALL NOT contain nested Resources",
            "expression": "contained.contained.empty()",
            "xpath": "not(parent::f:contained and f:contained)",
            "source": "DomainResource"
          },
          {
            "key": "dom-1",
            "severity": "error",
            "human": "If the resource is contained in another resource, it SHALL NOT contain any narrative",
            "expression": "contained.text.empty()",
            "xpath": "not(parent::f:contained and f:text)",
            "source": "DomainResource"
          },
          {
            "key": "dom-4",
            "severity": "error",
            "human": "If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated",
            "expression": "contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()",
            "xpath": "not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))",
            "source": "DomainResource"
          },
          {
            "key": "dom-3",
            "severity": "error",
            "human": "If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource",
            "expression": "contained.all(('#'+id in (%resource.descendants().reference | %resource.descendants().as(canonical))) or descendants().where(reference = '#').exists() or descendants().where(as(canonical) = '#').exists())",
            "xpath": "not(exists(for $contained in f:contained return $contained[not(parent::*/descendant::f:reference/@value=concat('#', $contained/*/id/@value) or descendant::f:reference[@value='#'])]))",
            "source": "DomainResource"
          }
        ],
        "isModifier": false,
        "isSummary": false,
        "mapping": [
          {
            "identity": "rim",
            "map": "Entity. Role, or Act"
          },
          {
            "identity": "script10.6",
            "map": "NewRx/MedicationPrescribed\r-or-\rRxFill/MedicationDispensed\r-or-\rRxHistoryResponse/MedicationDispensed\r-or-\rRxHistoryResponse/MedicationPrescribed"
          },
          {
            "identity": "rim",
            "map": "ManufacturedProduct[classCode=ADMM]"
          }
        ]
      },
      {
        "id": "Medication.id",
        "path": "Medication.id",
        "short": "Logical id of this artifact",
        "definition": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.",
        "comment": "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": 0,
        "max": "1",
        "base": {
          "path": "Resource.id",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "id"
          }
        ],
        "isModifier": false,
        "isSummary": true
      },
      {
        "id": "Medication.meta",
        "path": "Medication.meta",
        "short": "Metadata about the resource",
        "definition": "The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Resource.meta",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "Meta"
          }
        ],
        "isModifier": false,
        "isSummary": true
      },
      {
        "id": "Medication.implicitRules",
        "path": "Medication.implicitRules",
        "short": "A set of rules under which this content was created",
        "definition": "A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.",
        "comment": "Asserting this rule set restricts the content to be only understood by a limited set of trading partners. This inherently limits the usefulness of the data in the long term. However, the existing health eco-system is highly fractured, and not yet ready to define, collect, and exchange data in a generally computable sense. Wherever possible, implementers and/or specification writers should avoid using this element. Often, when used, the URL is a reference to an implementation guide that defines these special rules as part of it's narrative along with other profiles, value sets, etc.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Resource.implicitRules",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "uri"
          }
        ],
        "isModifier": true,
        "isModifierReason": "This element is labeled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation",
        "isSummary": true
      },
      {
        "id": "Medication.language",
        "path": "Medication.language",
        "short": "Language of the resource content",
        "definition": "The base language in which the resource is written.",
        "comment": "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": 0,
        "max": "1",
        "base": {
          "path": "Resource.language",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "code"
          }
        ],
        "isModifier": false,
        "isSummary": false,
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet",
              "valueReference": {
                "reference": "http://hl7.org/fhir/ValueSet/all-languages"
              }
            },
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "Language"
            },
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
              "valueBoolean": true
            }
          ],
          "strength": "extensible",
          "description": "A human language.",
          "valueSetCanonical": "http://hl7.org/fhir/ValueSet/languages"
        }
      },
      {
        "id": "Medication.text",
        "path": "Medication.text",
        "short": "Text summary of the resource, for human interpretation",
        "definition": "A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it \"clinically safe\" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.",
        "comment": "Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative. In some cases, a resource may only have text with little or no additional discrete data (as long as all minOccurs=1 elements are satisfied).  This may be necessary for data from legacy systems where information is captured as a \"text blob\" or where text is additionally entered raw or narrated and encoded in formation is added later.",
        "alias": [
          "narrative",
          "html",
          "xhtml",
          "display"
        ],
        "min": 0,
        "max": "1",
        "base": {
          "path": "DomainResource.text",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "Narrative"
          }
        ],
        "condition": [
          "dom-1"
        ],
        "isModifier": false,
        "isSummary": false,
        "mapping": [
          {
            "identity": "rim",
            "map": "Act.text?"
          }
        ]
      },
      {
        "id": "Medication.contained",
        "path": "Medication.contained",
        "short": "Contained, inline Resources",
        "definition": "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": "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": [
          "inline resources",
          "anonymous resources",
          "contained resources"
        ],
        "min": 0,
        "max": "*",
        "base": {
          "path": "DomainResource.contained",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Resource"
          }
        ],
        "isModifier": false,
        "isSummary": false,
        "mapping": [
          {
            "identity": "rim",
            "map": "N/A"
          }
        ]
      },
      {
        "id": "Medication.extension",
        "path": "Medication.extension",
        "short": "Additional Content defined by implementations",
        "definition": "May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
        "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
        "alias": [
          "extensions",
          "user content"
        ],
        "min": 0,
        "max": "*",
        "base": {
          "path": "DomainResource.extension",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Extension"
          }
        ],
        "isModifier": false,
        "isSummary": false,
        "mapping": [
          {
            "identity": "rim",
            "map": "N/A"
          }
        ]
      },
      {
        "id": "Medication.modifierExtension",
        "path": "Medication.modifierExtension",
        "short": "Extensions that cannot be ignored",
        "definition": "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. 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": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
        "alias": [
          "extensions",
          "user content"
        ],
        "min": 0,
        "max": "*",
        "base": {
          "path": "DomainResource.modifierExtension",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Extension"
          }
        ],
        "isModifier": true,
        "isModifierReason": "Not known why this is labelled a modifier",
        "isSummary": false,
        "mapping": [
          {
            "identity": "rim",
            "map": "N/A"
          }
        ]
      },
      {
        "id": "Medication.code",
        "path": "Medication.code",
        "short": "Codes that identify this medication",
        "definition": "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": "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).",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Medication.code",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "isModifier": false,
        "isSummary": true,
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "MedicationFormalRepresentation"
            }
          ],
          "strength": "example",
          "description": "A coded concept that defines the type of a medication",
          "valueSetCanonical": "http://hl7.org/fhir/ValueSet/medication-codes"
        },
        "mapping": [
          {
            "identity": "script10.6",
            "map": "coding.code = //element(*,MedicationType)/DrugCoded/ProductCode\r\rcoding.system = //element(*,MedicationType)/DrugCoded/ProductCodeQualifier\r\rcoding.display = //element(*,MedicationType)/DrugDescription"
          },
          {
            "identity": "w5",
            "map": "FiveWs.class"
          },
          {
            "identity": "v2",
            "map": "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"
          },
          {
            "identity": "rim",
            "map": ".code"
          }
        ]
      },
      {
        "id": "Medication.status",
        "path": "Medication.status",
        "short": "active | inactive | entered-in-error",
        "definition": "A code to indicate if the medication is in active use.",
        "comment": "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.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Medication.status",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "code"
          }
        ],
        "isModifier": false,
        "isSummary": true,
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "MedicationStatus"
            }
          ],
          "strength": "required",
          "description": "A coded concept defining if the medication is in active use",
          "valueSetCanonical": "http://hl7.org/fhir/ValueSet/medication-status"
        },
        "mapping": [
          {
            "identity": "rim",
            "map": ".statusCode"
          }
        ]
      },
      {
        "id": "Medication.manufacturer",
        "path": "Medication.manufacturer",
        "short": "Manufacturer of the item",
        "definition": "Describes the details of the manufacturer of the medication product.  This is not intended to represent the distributor of a medication product.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Medication.manufacturer",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Organization"
            ]
          }
        ],
        "isModifier": false,
        "isSummary": true,
        "mapping": [
          {
            "identity": "script10.6",
            "map": "no mapping"
          },
          {
            "identity": "w5",
            "map": "FiveWs.actor"
          },
          {
            "identity": "v2",
            "map": "RXD-20-Substance Manufacturer Name / RXG-21-Substance Manufacturer Name / RXA-17-Substance Manufacturer Name"
          },
          {
            "identity": "rim",
            "map": ".player.scopingRole[typeCode=MANU].scoper"
          }
        ]
      },
      {
        "id": "Medication.form",
        "path": "Medication.form",
        "short": "powder | tablets | capsule +",
        "definition": "Describes the form of the item.  Powder; tablets; capsule.",
        "comment": "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": 0,
        "max": "1",
        "base": {
          "path": "Medication.form",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "isModifier": false,
        "isSummary": false,
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "MedicationForm"
            }
          ],
          "strength": "example",
          "description": "A coded concept defining the form of a medication",
          "valueSetCanonical": "http://hl7.org/fhir/ValueSet/medication-form-codes"
        },
        "mapping": [
          {
            "identity": "script10.6",
            "map": "coding.code =  //element(*,DrugCodedType)/FormCode\r\rcoding.system = //element(*,DrugCodedType)/FormSourceCode"
          },
          {
            "identity": "v2",
            "map": "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"
          },
          {
            "identity": "rim",
            "map": ".formCode"
          }
        ]
      },
      {
        "id": "Medication.amount",
        "path": "Medication.amount",
        "short": "Amount of drug in package",
        "definition": "Specific amount of the drug in the packaged 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.).",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Medication.amount",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "Quantity",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/SimpleQuantity"
            ]
          }
        ],
        "isModifier": true,
        "isModifierReason": "This element changes the understanding of the medication and cannot be ignored",
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": ".quantity"
          }
        ]
      },
      {
        "id": "Medication.ingredient",
        "path": "Medication.ingredient",
        "short": "Active or inactive ingredient",
        "definition": "Identifies a particular constituent of interest in the product.",
        "comment": "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": 0,
        "max": "*",
        "base": {
          "path": "Medication.ingredient",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "BackboneElement"
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() | (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "Element"
          }
        ],
        "isModifier": false,
        "isSummary": false,
        "mapping": [
          {
            "identity": "rim",
            "map": ".scopesRole[typeCode=INGR]"
          }
        ]
      },
      {
        "id": "Medication.ingredient.id",
        "path": "Medication.ingredient.id",
        "representation": [
          "xmlAttr"
        ],
        "short": "xml:id (or equivalent in JSON)",
        "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Element.id",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "string"
          }
        ],
        "isModifier": false,
        "isSummary": false,
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          }
        ]
      },
      {
        "id": "Medication.ingredient.extension",
        "path": "Medication.ingredient.extension",
        "short": "Additional content defined by implementations",
        "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
        "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
        "alias": [
          "extensions",
          "user content"
        ],
        "min": 0,
        "max": "*",
        "base": {
          "path": "Element.extension",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Extension"
          }
        ],
        "isModifier": false,
        "isSummary": false,
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          }
        ]
      },
      {
        "id": "Medication.ingredient.modifierExtension",
        "path": "Medication.ingredient.modifierExtension",
        "short": "Extensions that cannot be ignored",
        "definition": "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.",
        "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
        "alias": [
          "extensions",
          "user content",
          "modifiers"
        ],
        "min": 0,
        "max": "*",
        "base": {
          "path": "BackboneElement.modifierExtension",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Extension"
          }
        ],
        "isModifier": true,
        "isModifierReason": "modifierExtension is reserved for use where modifier extensions must be used",
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "N/A"
          }
        ]
      },
      {
        "id": "Medication.ingredient.item[x]",
        "path": "Medication.ingredient.item[x]",
        "short": "The product contained",
        "definition": "The actual ingredient - either a substance (simple ingredient) or another medication.",
        "min": 1,
        "max": "1",
        "base": {
          "path": "Medication.ingredient.item[x]",
          "min": 1,
          "max": "1"
        },
        "type": [
          {
            "code": "CodeableConcept"
          },
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Substance",
              "http://hl7.org/fhir/StructureDefinition/Medication"
            ]
          }
        ],
        "isModifier": false,
        "isSummary": false,
        "mapping": [
          {
            "identity": "script10.6",
            "map": "coding.code = //element(*,MedicationType)/DrugCoded/ProductCode\r\rcoding.system = //element(*,MedicationType)/DrugCoded/ProductCodeQualifier\r\rcoding.display = //element(*,MedicationType)/DrugDescription"
          },
          {
            "identity": "v2",
            "map": "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"
          },
          {
            "identity": "rim",
            "map": ".player"
          }
        ]
      },
      {
        "id": "Medication.ingredient.isActive",
        "path": "Medication.ingredient.isActive",
        "short": "Active ingredient indicator",
        "definition": "Indication of whether this ingredient affects the therapeutic action of the drug.",
        "requirements": "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).",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Medication.ingredient.isActive",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "boolean"
          }
        ],
        "isModifier": false,
        "isSummary": false,
        "mapping": [
          {
            "identity": "rim",
            "map": "NA"
          }
        ]
      },
      {
        "id": "Medication.ingredient.amount",
        "path": "Medication.ingredient.amount",
        "short": "Quantity of ingredient present",
        "definition": "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": 0,
        "max": "1",
        "base": {
          "path": "Medication.ingredient.amount",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "Ratio"
          }
        ],
        "isModifier": false,
        "isSummary": false,
        "mapping": [
          {
            "identity": "script10.6",
            "map": "//element(*,DrugCodedType)/Strength"
          },
          {
            "identity": "v2",
            "map": "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"
          },
          {
            "identity": "rim",
            "map": ".quantity"
          }
        ]
      },
      {
        "id": "Medication.batch",
        "path": "Medication.batch",
        "short": "Details about packaged medications",
        "definition": "Information that only applies to packages (not products).",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Medication.batch",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "BackboneElement"
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() | (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "Element"
          }
        ],
        "isModifier": false,
        "isSummary": false,
        "mapping": [
          {
            "identity": "script10.6",
            "map": "no mapping"
          },
          {
            "identity": "rim",
            "map": ".player[classCode=CONT]"
          }
        ]
      },
      {
        "id": "Medication.batch.id",
        "path": "Medication.batch.id",
        "representation": [
          "xmlAttr"
        ],
        "short": "xml:id (or equivalent in JSON)",
        "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Element.id",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "string"
          }
        ],
        "isModifier": false,
        "isSummary": false,
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          }
        ]
      },
      {
        "id": "Medication.batch.extension",
        "path": "Medication.batch.extension",
        "short": "Additional content defined by implementations",
        "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
        "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
        "alias": [
          "extensions",
          "user content"
        ],
        "min": 0,
        "max": "*",
        "base": {
          "path": "Element.extension",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Extension"
          }
        ],
        "isModifier": false,
        "isSummary": false,
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          }
        ]
      },
      {
        "id": "Medication.batch.modifierExtension",
        "path": "Medication.batch.modifierExtension",
        "short": "Extensions that cannot be ignored",
        "definition": "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.",
        "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
        "alias": [
          "extensions",
          "user content",
          "modifiers"
        ],
        "min": 0,
        "max": "*",
        "base": {
          "path": "BackboneElement.modifierExtension",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Extension"
          }
        ],
        "isModifier": true,
        "isModifierReason": "modifierExtension is reserved for use where modifier extensions must be used",
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "N/A"
          }
        ]
      },
      {
        "id": "Medication.batch.lotNumber",
        "path": "Medication.batch.lotNumber",
        "short": "Identifier assigned to batch",
        "definition": "The assigned lot number of a batch of the specified product.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Medication.batch.lotNumber",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "string"
          }
        ],
        "isModifier": false,
        "isSummary": false,
        "mapping": [
          {
            "identity": "script10.6",
            "map": "no mapping"
          },
          {
            "identity": "v2",
            "map": "RXA-15 Substance Lot Number / RXG-19 Substance Lot Number"
          },
          {
            "identity": "rim",
            "map": ".id"
          }
        ]
      },
      {
        "id": "Medication.batch.expirationDate",
        "path": "Medication.batch.expirationDate",
        "short": "When batch will expire",
        "definition": "When this specific batch of product will expire.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Medication.batch.expirationDate",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "dateTime"
          }
        ],
        "isModifier": false,
        "isSummary": false,
        "mapping": [
          {
            "identity": "script10.6",
            "map": "no mapping"
          },
          {
            "identity": "v2",
            "map": "RXA-16 Substance Expiration Date / RXG-20 Substance Expiration Date"
          },
          {
            "identity": "rim",
            "map": "participation[typeCode=CSM].role[classCode=INST].scopedRole.scoper[classCode=MMAT].expirationTime"
          }
        ]
      },
      {
        "id": "Medication.batch.serialNumber",
        "path": "Medication.batch.serialNumber",
        "short": "Identifier assigned to a drug at the time of manufacture",
        "definition": "An identifier assigned to a drug at the point of manufacturing and repackaging (at the package or pallet level), sufficient to facilitate the identification, validation, authentication, and tracking and tracking of drugs.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Medication.batch.serialNumber",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "string"
          }
        ],
        "isModifier": false,
        "isSummary": false,
        "mapping": [
          {
            "identity": "rim",
            "map": ".id"
          }
        ]
      }
    ]
  },
  "differential": {
    "element": [
      {
        "id": "Medication",
        "path": "Medication",
        "short": "Definition of a Medication",
        "definition": "This resource is primarily used for the identification and definition of a medication for the purposes of prescribing, dispensing, and administering a medication as well as for making statements about medication use.",
        "min": 0,
        "max": "*",
        "mapping": [
          {
            "identity": "script10.6",
            "map": "NewRx/MedicationPrescribed\r-or-\rRxFill/MedicationDispensed\r-or-\rRxHistoryResponse/MedicationDispensed\r-or-\rRxHistoryResponse/MedicationPrescribed"
          },
          {
            "identity": "rim",
            "map": "ManufacturedProduct[classCode=ADMM]"
          }
        ]
      },
      {
        "id": "Medication.code",
        "path": "Medication.code",
        "short": "Codes that identify this medication",
        "definition": "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": "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).",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "isSummary": true,
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "MedicationFormalRepresentation"
            }
          ],
          "strength": "example",
          "description": "A coded concept that defines the type of a medication",
          "valueSetCanonical": "http://hl7.org/fhir/ValueSet/medication-codes"
        },
        "mapping": [
          {
            "identity": "script10.6",
            "map": "coding.code = //element(*,MedicationType)/DrugCoded/ProductCode\r\rcoding.system = //element(*,MedicationType)/DrugCoded/ProductCodeQualifier\r\rcoding.display = //element(*,MedicationType)/DrugDescription"
          },
          {
            "identity": "w5",
            "map": "FiveWs.class"
          },
          {
            "identity": "v2",
            "map": "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"
          },
          {
            "identity": "rim",
            "map": ".code"
          }
        ]
      },
      {
        "id": "Medication.status",
        "path": "Medication.status",
        "short": "active | inactive | entered-in-error",
        "definition": "A code to indicate if the medication is in active use.",
        "comment": "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.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "code"
          }
        ],
        "isSummary": true,
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "MedicationStatus"
            }
          ],
          "strength": "required",
          "description": "A coded concept defining if the medication is in active use",
          "valueSetCanonical": "http://hl7.org/fhir/ValueSet/medication-status"
        },
        "mapping": [
          {
            "identity": "rim",
            "map": ".statusCode"
          }
        ]
      },
      {
        "id": "Medication.manufacturer",
        "path": "Medication.manufacturer",
        "short": "Manufacturer of the item",
        "definition": "Describes the details of the manufacturer of the medication product.  This is not intended to represent the distributor of a medication product.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Organization"
            ]
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "script10.6",
            "map": "no mapping"
          },
          {
            "identity": "w5",
            "map": "FiveWs.actor"
          },
          {
            "identity": "v2",
            "map": "RXD-20-Substance Manufacturer Name / RXG-21-Substance Manufacturer Name / RXA-17-Substance Manufacturer Name"
          },
          {
            "identity": "rim",
            "map": ".player.scopingRole[typeCode=MANU].scoper"
          }
        ]
      },
      {
        "id": "Medication.form",
        "path": "Medication.form",
        "short": "powder | tablets | capsule +",
        "definition": "Describes the form of the item.  Powder; tablets; capsule.",
        "comment": "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": 0,
        "max": "1",
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "MedicationForm"
            }
          ],
          "strength": "example",
          "description": "A coded concept defining the form of a medication",
          "valueSetCanonical": "http://hl7.org/fhir/ValueSet/medication-form-codes"
        },
        "mapping": [
          {
            "identity": "script10.6",
            "map": "coding.code =  //element(*,DrugCodedType)/FormCode\r\rcoding.system = //element(*,DrugCodedType)/FormSourceCode"
          },
          {
            "identity": "v2",
            "map": "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"
          },
          {
            "identity": "rim",
            "map": ".formCode"
          }
        ]
      },
      {
        "id": "Medication.amount",
        "path": "Medication.amount",
        "short": "Amount of drug in package",
        "definition": "Specific amount of the drug in the packaged 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.).",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Quantity",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/SimpleQuantity"
            ]
          }
        ],
        "isModifier": true,
        "isModifierReason": "This element changes the understanding of the medication and cannot be ignored",
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": ".quantity"
          }
        ]
      },
      {
        "id": "Medication.ingredient",
        "path": "Medication.ingredient",
        "short": "Active or inactive ingredient",
        "definition": "Identifies a particular constituent of interest in the product.",
        "comment": "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": 0,
        "max": "*",
        "type": [
          {
            "code": "BackboneElement"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": ".scopesRole[typeCode=INGR]"
          }
        ]
      },
      {
        "id": "Medication.ingredient.item[x]",
        "path": "Medication.ingredient.item[x]",
        "short": "The product contained",
        "definition": "The actual ingredient - either a substance (simple ingredient) or another medication.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "CodeableConcept"
          },
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Substance",
              "http://hl7.org/fhir/StructureDefinition/Medication"
            ]
          }
        ],
        "mapping": [
          {
            "identity": "script10.6",
            "map": "coding.code = //element(*,MedicationType)/DrugCoded/ProductCode\r\rcoding.system = //element(*,MedicationType)/DrugCoded/ProductCodeQualifier\r\rcoding.display = //element(*,MedicationType)/DrugDescription"
          },
          {
            "identity": "v2",
            "map": "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"
          },
          {
            "identity": "rim",
            "map": ".player"
          }
        ]
      },
      {
        "id": "Medication.ingredient.isActive",
        "path": "Medication.ingredient.isActive",
        "short": "Active ingredient indicator",
        "definition": "Indication of whether this ingredient affects the therapeutic action of the drug.",
        "requirements": "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).",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "boolean"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "NA"
          }
        ]
      },
      {
        "id": "Medication.ingredient.amount",
        "path": "Medication.ingredient.amount",
        "short": "Quantity of ingredient present",
        "definition": "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": 0,
        "max": "1",
        "type": [
          {
            "code": "Ratio"
          }
        ],
        "mapping": [
          {
            "identity": "script10.6",
            "map": "//element(*,DrugCodedType)/Strength"
          },
          {
            "identity": "v2",
            "map": "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"
          },
          {
            "identity": "rim",
            "map": ".quantity"
          }
        ]
      },
      {
        "id": "Medication.batch",
        "path": "Medication.batch",
        "short": "Details about packaged medications",
        "definition": "Information that only applies to packages (not products).",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "BackboneElement"
          }
        ],
        "mapping": [
          {
            "identity": "script10.6",
            "map": "no mapping"
          },
          {
            "identity": "rim",
            "map": ".player[classCode=CONT]"
          }
        ]
      },
      {
        "id": "Medication.batch.lotNumber",
        "path": "Medication.batch.lotNumber",
        "short": "Identifier assigned to batch",
        "definition": "The assigned lot number of a batch of the specified product.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "string"
          }
        ],
        "mapping": [
          {
            "identity": "script10.6",
            "map": "no mapping"
          },
          {
            "identity": "v2",
            "map": "RXA-15 Substance Lot Number / RXG-19 Substance Lot Number"
          },
          {
            "identity": "rim",
            "map": ".id"
          }
        ]
      },
      {
        "id": "Medication.batch.expirationDate",
        "path": "Medication.batch.expirationDate",
        "short": "When batch will expire",
        "definition": "When this specific batch of product will expire.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "dateTime"
          }
        ],
        "mapping": [
          {
            "identity": "script10.6",
            "map": "no mapping"
          },
          {
            "identity": "v2",
            "map": "RXA-16 Substance Expiration Date / RXG-20 Substance Expiration Date"
          },
          {
            "identity": "rim",
            "map": "participation[typeCode=CSM].role[classCode=INST].scopedRole.scoper[classCode=MMAT].expirationTime"
          }
        ]
      },
      {
        "id": "Medication.batch.serialNumber",
        "path": "Medication.batch.serialNumber",
        "short": "Identifier assigned to a drug at the time of manufacture",
        "definition": "An identifier assigned to a drug at the point of manufacturing and repackaging (at the package or pallet level), sufficient to facilitate the identification, validation, authentication, and tracking and tracking of drugs.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "string"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": ".id"
          }
        ]
      }
    ]
  }
}

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.