Mappings for the NIMMedication resource profile.
  
  
  
 | NIMMedication | 
 | Medication | NewRx/MedicationPrescribed
-or-
RxFill/MedicationDispensed
-or-
RxHistoryResponse/MedicationDispensed
-or-
RxHistoryResponse/MedicationPrescribed |  
 |    code | coding.code = //element(*,MedicationType)/DrugCoded/ProductCode
coding.system = //element(*,MedicationType)/DrugCoded/ProductCodeQualifier
coding.display = //element(*,MedicationType)/DrugDescription |  
 |    manufacturer | no mapping |  
 |    form | coding.code =  //element(*,DrugCodedType)/FormCode
coding.system = //element(*,DrugCodedType)/FormSourceCode |  
 |    ingredient |  |  
 |       item[x] | coding.code = //element(*,MedicationType)/DrugCoded/ProductCode
coding.system = //element(*,MedicationType)/DrugCoded/ProductCodeQualifier
coding.display = //element(*,MedicationType)/DrugDescription |  
 |       item[x] (itemReference) | coding.code = //element(*,MedicationType)/DrugCoded/ProductCode
coding.system = //element(*,MedicationType)/DrugCoded/ProductCodeQualifier
coding.display = //element(*,MedicationType)/DrugDescription |  
 |       strength | //element(*,DrugCodedType)/Strength |  
 |    batch | no mapping |  
 |       lotNumber | no mapping |  
 |       expirationDate | no mapping |  
 | NIMMedication | 
 | Medication | Entity. Role, or Act, ManufacturedProduct[classCode=ADMM] |  
 |    text | Act.text? |  
 |    contained | N/A |  
 |    modifierExtension | N/A |  
 |    identifier | .id |  
 |    identifier (nplpackid) | .id |  
 |       id | n/a |  
 |       extension | n/a |  
 |       use | Role.code or implied by context |  
 |       type | Role.code or implied by context |  
 |       system | II.root or Role.id.root |  
 |       value | II.extension or II.root if system indicates OID or GUID (Or Role.id.extension or root) |  
 |       period | Role.effectiveTime or implied by context |  
 |       assigner | II.assigningAuthorityName but note that this is an improper use by the definition of the field.  Also Role.scoper |  
 |    identifier (varunr) | .id |  
 |       id | n/a |  
 |       extension | n/a |  
 |       use | Role.code or implied by context |  
 |       type | Role.code or implied by context |  
 |       system | II.root or Role.id.root |  
 |       value | II.extension or II.root if system indicates OID or GUID (Or Role.id.extension or root) |  
 |       period | Role.effectiveTime or implied by context |  
 |       assigner | II.assigningAuthorityName but note that this is an improper use by the definition of the field.  Also Role.scoper |  
 |    code | .code |  
 |       id | n/a |  
 |       extension | n/a |  
 |       coding | union(., ./translation) |  
 |          id | n/a |  
 |          extension | n/a |  
 |          system | ./codeSystem |  
 |          version | ./codeSystemVersion |  
 |          code | ./code |  
 |          display | CV.displayName |  
 |          userSelected | CD.codingRationale |  
 |       text | ./originalText[mediaType/code="text/plain"]/data |  
 |    status | .statusCode |  
 |    manufacturer | .player.scopingRole[typeCode=MANU].scoper |  
 |    form | .formCode |  
 |       id | n/a |  
 |       extension | n/a |  
 |       coding | union(., ./translation) |  
 |       text | ./originalText[mediaType/code="text/plain"]/data |  
 |    amount | .quantity |  
 |    ingredient | .scopesRole[typeCode=INGR] |  
 |       id | n/a |  
 |       extension | n/a |  
 |       modifierExtension | N/A |  
 |       item[x] | .player |  
 |       item[x] (itemReference) | .player |  
 |       isActive | NA |  
 |       strength | .quantity |  
 |    batch | .player[classCode=CONT] |  
 |       id | n/a |  
 |       extension | n/a |  
 |       modifierExtension | N/A |  
 |       lotNumber | .id |  
 |       expirationDate | participation[typeCode=CSM].role[classCode=INST].scopedRole.scoper[classCode=MMAT].expirationTime |  
 | NIMMedication | 
 | Medication |  |  
 |    identifier |  |  
 |    identifier (nplpackid) |  |  
 |       use | N/A |  
 |       type | CX.5 |  
 |       system | CX.4 / EI-2-4 |  
 |       value | CX.1 / EI.1 |  
 |       period | CX.7 + CX.8 |  
 |       assigner | CX.4 / (CX.4,CX.9,CX.10) |  
 |    identifier (varunr) |  |  
 |       use | N/A |  
 |       type | CX.5 |  
 |       system | CX.4 / EI-2-4 |  
 |       value | CX.1 / EI.1 |  
 |       period | CX.7 + CX.8 |  
 |       assigner | CX.4 / (CX.4,CX.9,CX.10) |  
 |    code | 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 |  
 |       coding | C*E.1-8, C*E.10-22 |  
 |          system | C*E.3 |  
 |          version | C*E.7 |  
 |          code | C*E.1 |  
 |          display | C*E.2 - but note this is not well followed |  
 |          userSelected | Sometimes implied by being first |  
 |       text | C*E.9. But note many systems use C*E.2 for this |  
 |    manufacturer | RXD-20-Substance Manufacturer Name / RXG-21-Substance Manufacturer Name / RXA-17-Substance Manufacturer Name |  
 |    form | 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 |  
 |       coding | C*E.1-8, C*E.10-22 |  
 |       text | C*E.9. But note many systems use C*E.2 for this |  
 |    ingredient |  |  
 |       item[x] | 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 |  
 |       item[x] (itemReference) | 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 |  
 |       strength | 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 |  
 |    batch |  |  
 |       lotNumber | RXA-15 Substance Lot Number / RXG-19 Substance Lot Number |  
 |       expirationDate | RXA-16 Substance Expiration Date / RXG-20 Substance Expiration Date |