{
  "resourceType": "StructureDefinition",
  "id": "Medication",
  "meta": {
    "lastUpdated": "2021-01-01T21:58:31.578+00:00"
  },
  "extension": [
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-category",
      "valueString": "Clinical.Medications"
    },
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
      "valueCode": "trial-use"
    },
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm",
      "valueInteger": 3
    },
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-security-category",
      "valueCode": "business"
    },
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg",
      "valueCode": "phx"
    },
    {
      "url": "http://hl7.org/fhir/build/StructureDefinition/entered-in-error-status",
      "valueCode": "Medication does not have a status"
    }
  ],
  "url": "http://hl7.org/fhir/StructureDefinition/Medication",
  "version": "4.6.0",
  "name": "Medication",
  "status": "draft",
  "date": "2021-01-01T21:58:31+00: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, including ingredients, for the purposes of prescribing, dispensing, and administering a medication as well as for making statements about medication use.",
  "fhirVersion": "4.6.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 Mapping"
    },
    {
      "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",
  "differential": {
    "element": [
      {
        "id": "Medication",
        "extension": [
          {
            "url": "http://hl7.org/fhir/build/StructureDefinition/svg",
            "valueCode": "0,0"
          }
        ],
        "path": "Medication",
        "short": "Definition of a Medication",
        "definition": "This resource is primarily used for the identification and definition of a medication, including ingredients, for the purposes of prescribing, dispensing, and administering a medication as well as for making statements about medication use.",
        "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]"
          },
          {
            "identity": "w5",
            "map": "clinical.medication"
          }
        ]
      },
      {
        "id": "Medication.identifier",
        "path": "Medication.identifier",
        "short": "Business identifier for this medication",
        "definition": "Business identifier for this medication.",
        "comment": "The serial number could be included as an identifier.",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Identifier"
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "w5",
            "map": "FiveWs.identifier"
          },
          {
            "identity": "rim",
            "map": ".id"
          }
        ]
      },
      {
        "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.",
          "valueSet": "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"
          }
        ],
        "isModifier": true,
        "isModifierReason": "This element changes the interpretation of all descriptive attributes.",
        "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.",
          "valueSet": "http://hl7.org/fhir/ValueSet/medication-status"
        },
        "mapping": [
          {
            "identity": "rim",
            "map": ".statusCode"
          }
        ]
      },
      {
        "id": "Medication.marketingAuthorizationHolder",
        "path": "Medication.marketingAuthorizationHolder",
        "short": "Organization responsible for manufacturing the item",
        "definition": "Describes the organization that is responsible for the manufacturing of the item and holds the registration to market the product in a jurisdiction. This might not be the company that physically manufactures the product.  May be known as \"Sponsor\" and is commonly called \"Manufacturer\".",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Organization"
            ]
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": ".player.scopingRole[typeCode=MANU].scoper"
          }
        ]
      },
      {
        "id": "Medication.doseForm",
        "path": "Medication.doseForm",
        "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.",
          "valueSet": "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.totalVolume",
        "path": "Medication.totalVolume",
        "short": "When the specified product code does not infer a package size, this is the specific amount of drug in the product",
        "definition": "When the specified product code does not infer a package size, this is the specific amount of drug in the product.  For example, when specifying a product that has the same strength (For example, Insulin glargine 100 unit per mL solution for injection), this attribute provides additional clarification of the package amount (For example, 3 mL, 10mL, etc.).",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Ratio"
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": ".quantity"
          }
        ]
      },
      {
        "id": "Medication.ingredient",
        "extension": [
          {
            "url": "http://hl7.org/fhir/build/StructureDefinition/svg",
            "valueCode": "0,200"
          }
        ],
        "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",
        "path": "Medication.ingredient.item",
        "short": "The ingredient (substance or medication) that the ingredient.strength relates to",
        "definition": "The ingredient (substance or medication) that the ingredient.strength relates to.  This is represented as a concept from a code system or described in another resource (Substance or Medication).",
        "requirements": "The ingredient may reference a substance (for example, amoxicillin) or another medication (for example in the case of a compounded product, Glaxal Base).",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "CodeableReference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Substance",
              "http://hl7.org/fhir/StructureDefinition/Medication"
            ]
          }
        ],
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "MedicationFormalRepresentation"
            }
          ],
          "strength": "example",
          "valueSet": "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": "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.strength[x]",
        "path": "Medication.ingredient.strength[x]",
        "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 but can also be expressed a quantity when the denominator is assumed to be 1 tablet.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Ratio"
          },
          {
            "code": "CodeableConcept"
          },
          {
            "code": "Quantity"
          }
        ],
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "MedicationIngredientStrength"
            }
          ],
          "strength": "preferred",
          "description": "A coded concpet defining the strength of an ingredient.",
          "valueSet": "http://hl7.org/fhir/ValueSet/medication-ingredientstrength"
        },
        "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",
        "extension": [
          {
            "url": "http://hl7.org/fhir/build/StructureDefinition/svg",
            "valueCode": "380,40"
          }
        ],
        "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"
          }
        ]
      }
    ]
  }
}