Inera Core Implementation Guide
0.2.0 - ci-build Sweden

Inera Core Implementation Guide - Local Development build (v0.2.0) built by the FHIR (HL7® FHIR® Standard) Build Tools. See the Directory of published versions

ConceptMap: ConceptMap GetMedicationHistory TKB to FHIR MedicationStatement (Experimental)

Official URL: https://inera.se/fhir/core/ConceptMap/getmedicationhistory-tkb-to-medicationstatement Version: 0.2.0
Draft as of 2026-01-09 Computable Name: ConceptMapGetMedicationHistoryTKBToMedicationStatement

Mapping from GetMedicationHistory v2.0 TKB service to FHIR MedicationStatement and Provenance resources.

TKB Service: GetMedicationHistory v2.0
TKB Domain: clinicalprocess:activityprescription:actoutcome v2.0 Logical Model: GetMedicationHistoryResponseLM FHIR Resources: MedicationStatement (primary), Medication, Provenance (metadata)

Mapping Coverage:

  • ✅ Header metadata: 20+ elements (document ID, patient, author, signer, care contact)
  • ✅ Prescription data: 15+ elements (prescription ID, type, status, reason, treatment period)
  • ✅ Drug information: NPL-ID, ATC codes, strength, pharmaceutical form
  • ⚠️ Dosage: High-level mapping (detailed dosage structures in Dosage datatype are complex)

Note: Dosage mappings cover core structures (setDosage, conditionalDosage, rampedDosage) but detailed sub-elements require careful transformation according to FHIR Dosage datatype specification.

Mapping from https://rivta.se/domains/clinicalprocess/activityprescription/actoutcome/GetMedicationHistoryResponder/2 to MedicationStatement


Group 1 Mapping from https://rivta.se/domains/clinicalprocess/activityprescription/actoutcome/GetMedicationHistoryResponder/2 to Bundle

Source CodeRelationshipTarget CodeComment
patientId (Patient ID (personnummer/samordningsnummer))(not mapped)Query parameter: GET /MedicationStatement?subject=Patient/191212121212
careUnitHSAId(not mapped)Query parameter: GET /MedicationStatement?context.custodian=Organization/{hsaid}
datePeriod (Date period for medication)(not mapped)Query parameter: GET /MedicationStatement?effective=ge2024-01-01&effective=le2024-12-31
prescriptionChainId(not mapped)Custom query parameter or filter by identifier
prescriptionStatus (Prescription status (Active/Inactive))(not mapped)Query parameter: GET /MedicationStatement?status=active

Group 2 Mapping from https://rivta.se/domains/clinicalprocess/activityprescription/actoutcome/GetMedicationHistoryResponder/2 to MedicationStatement

Source CodeRelationshipTarget CodeComment
medicationMedicalRecord.medicationMedicalRecordHeader.documentId (Document ID (ordinations-id))is equivalent toidentifierUnique identifier for medication record. Maps to MedicationStatement.identifier
medicationMedicalRecord.medicationMedicalRecordHeader.patientId (Patient ID)is equivalent tosubjectReference to Patient resource with Swedish national identifier
medicationMedicalRecord.medicationMedicalRecordHeader.careContactId (Care contact ID)is equivalent tocontextReference to Encounter that prompted the medication record
medicationMedicalRecord.medicationMedicalRecordBody.medicationPrescription.prescriptionId (Prescription ID)is equivalent toidentifierUnique identifier for prescription. Often same as documentId
medicationMedicalRecord.medicationMedicalRecordBody.medicationPrescription.typeOfPrescription (Type of prescription (I=Insättning, U=Utsättning))is related toextensionUse extension for prescription type. I=start, U=stop. Map to status and statusReason
medicationMedicalRecord.medicationMedicalRecordBody.medicationPrescription.prescriptionStatus (Prescription status (Active/Inactive))is equivalent tostatusMedicationStatement status: active | completed | entered-in-error | intended | stopped | on-hold | unknown | not-taken
medicationMedicalRecord.medicationMedicalRecordBody.medicationPrescription.prescriptionNote (Prescription note)is equivalent tonote.textFree text describing the prescription, why started or changed
medicationMedicalRecord.medicationMedicalRecordBody.medicationPrescription.principalPrescriptionReason.reason (Principal prescription reason (NKOO code))is equivalent toreasonCodePrimary reason for prescription. Use Socialstyrelsens NKOO CodeSystem
medicationMedicalRecord.medicationMedicalRecordBody.medicationPrescription.treatmentPurpose (Treatment purpose)maps to wider conceptnote.textFree text describing treatment purpose (e.g., 'For high blood pressure'). Add to note
medicationMedicalRecord.medicationMedicalRecordBody.medicationPrescription.prescriptionChainId (Prescription chain ID)is related topartOfLinks prescriptions in same chain. Use partOf to reference previous MedicationStatement or custom extension
medicationMedicalRecord.medicationMedicalRecordBody.medicationPrescription.startOfTreatment (Start of treatment)is equivalent toeffectivePeriod.startDate when patient should start taking medication
medicationMedicalRecord.medicationMedicalRecordBody.medicationPrescription.endOfTreatment (End of treatment)is equivalent toeffectivePeriod.endDate when patient should stop taking medication
medicationMedicalRecord.medicationMedicalRecordBody.medicationPrescription.endOfTreatmentReason (End of treatment reason)is equivalent tostatusReasonReason for stopping medication. Use when status=stopped
medicationMedicalRecord.medicationMedicalRecordBody.medicationPrescription.selfMedication (Self medication (patient-prescribed))is related toinformationSourceIf true, informationSource references the Patient. If false, references Practitioner/prescriber
medicationMedicalRecord.medicationMedicalRecordBody.medicationPrescription.drug.drug.nplId (NPL product ID)is equivalent tomedicationCodeableConcept.coding.codeMedication coded with NPL (Nationellt Produktregister för Läkemedel). CodeSystem: 1.2.752.129.2.1.5.1
medicationMedicalRecord.medicationMedicalRecordBody.medicationPrescription.drug.drug.atcCode (ATC code)is equivalent tomedicationCodeableConcept.coding.codeATC classification code. CodeSystem: http://www.whocc.no/atc
medicationMedicalRecord.medicationMedicalRecordBody.medicationPrescription.drug.drug.pharmaceuticalForm (Pharmaceutical form (tablett, kapsel, etc.))is equivalent tomedicationReference.formForm of medication. Reference Medication resource with form element using SIL codes
medicationMedicalRecord.medicationMedicalRecordBody.medicationPrescription.drug.drug.strength (Medication strength)is equivalent tomedicationReference.ingredient.strengthStrength of medication (e.g., 20.0 mg). Reference Medication resource with ingredient details
medicationMedicalRecord.medicationMedicalRecordBody.medicationPrescription.drug.drug.routeOfAdministration (Route of administration)is equivalent todosage.routeHow medication is administered (oral, intravenous, etc.). Use SNOMED CT
medicationMedicalRecord.medicationMedicalRecordBody.medicationPrescription.drug.dosage.dosageInstruction (Dosage instruction (patient-facing text))is equivalent todosage.textFree text instructions for patient
medicationMedicalRecord.medicationMedicalRecordBody.medicationPrescription.drug.dosage.unitDose (Unit dose (tablett, ml, etc.))is equivalent todosage.doseAndRate.doseQuantity.unitUnit for dosage (e.g., tablett, ml). Use UCUM codes
medicationMedicalRecord.medicationMedicalRecordBody.medicationPrescription.drug.dosage.shortNotation (Short dosage notation (e.g., 1x2))maps to wider conceptdosage.patientInstructionAbbreviated dosage description. Add to dosage.text or patientInstruction

Group 3 Mapping from https://rivta.se/domains/clinicalprocess/activityprescription/actoutcome/GetMedicationHistoryResponder/2 to Provenance

Source CodeRelationshipTarget CodeComment
medicationMedicalRecord.medicationMedicalRecordHeader.sourceSystemHSAId (Source system HSA-ID)is equivalent toentity.whatProvenance.entity.what references Device with HSA-ID. Provenance.entity.role = source
medicationMedicalRecord.medicationMedicalRecordHeader.accountableHealthcareProfessional.authorTime (Author time (documentation time))is equivalent torecordedWhen information was documented/updated in source system
medicationMedicalRecord.medicationMedicalRecordHeader.accountableHealthcareProfessional.healthcareProfessionalHSAId (Documenting practitioner HSA-ID)is equivalent toagent.whoProvenance.agent (type=author) references Practitioner who documented
medicationMedicalRecord.medicationMedicalRecordHeader.accountableHealthcareProfessional.healthcareProfessionalcareUnitHSAId (Care unit HSA-ID)is equivalent toagent.onBehalfOfProvenance.agent.onBehalfOf references Organization (care unit)
medicationMedicalRecord.medicationMedicalRecordHeader.accountableHealthcareProfessional.healthcareProfessionalcareGiverHSAId (Care giver HSA-ID)is related toentity.whatCare giver organization. Create nested Provenance.entity for organizational hierarchy
medicationMedicalRecord.medicationMedicalRecordHeader.legalAuthenticator.signatureTime (Signature time)is equivalent tosignature.whenProvenance.signature.when for legal signature
medicationMedicalRecord.medicationMedicalRecordHeader.legalAuthenticator.legalAuthenticatorHSAId (Signer HSA-ID)is equivalent tosignature.whoProvenance.signature.who references Practitioner who signed
medicationMedicalRecord.medicationMedicalRecordBody.medicationPrescription.prescriber.authorTime (Prescriber decision time)is equivalent tooccurredDateTimeWhen prescription decision was made. Use separate Provenance for prescriber role
medicationMedicalRecord.medicationMedicalRecordBody.medicationPrescription.prescriber.healthcareProfessionalHSAId (Prescriber HSA-ID)is equivalent toagent.whoProvenance.agent (type=prescriber or role=doctor) references Practitioner. Note: Different from documenter

Group 4 Mapping from https://rivta.se/domains/clinicalprocess/activityprescription/actoutcome/GetMedicationHistoryResponder/2 to Bundle

Source CodeRelationshipTarget CodeComment
result.resultCode (Result code (OK/INFO/ERROR))(not mapped)Query result metadata. Use Bundle.entry.response for errors or OperationOutcome
result.errorCode (Error code)(not mapped)Error details in OperationOutcome if resultCode=ERROR
result.logId (Log ID (UUID for troubleshooting))(not mapped)Tracing ID. Can be included in OperationOutcome.issue.diagnostics
medicationMedicalRecord.medicationMedicalRecordHeader.nullified (Nullified flag)(not mapped)If true, MedicationStatement should be marked entered-in-error or not included in results
medicationMedicalRecord.medicationMedicalRecordHeader.approvedForPatient (Approved for patient access)(not mapped)PDL/GDPR consent flag. Handle in access control layer, not in resource data