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
| 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:
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 Code | Relationship | Target Code | Comment |
| 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 Code | Relationship | Target Code | Comment |
| medicationMedicalRecord.medicationMedicalRecordHeader.documentId (Document ID (ordinations-id)) | is equivalent to | identifier | Unique identifier for medication record. Maps to MedicationStatement.identifier |
| medicationMedicalRecord.medicationMedicalRecordHeader.patientId (Patient ID) | is equivalent to | subject | Reference to Patient resource with Swedish national identifier |
| medicationMedicalRecord.medicationMedicalRecordHeader.careContactId (Care contact ID) | is equivalent to | context | Reference to Encounter that prompted the medication record |
| medicationMedicalRecord.medicationMedicalRecordBody.medicationPrescription.prescriptionId (Prescription ID) | is equivalent to | identifier | Unique identifier for prescription. Often same as documentId |
| medicationMedicalRecord.medicationMedicalRecordBody.medicationPrescription.typeOfPrescription (Type of prescription (I=Insättning, U=Utsättning)) | is related to | extension | Use extension for prescription type. I=start, U=stop. Map to status and statusReason |
| medicationMedicalRecord.medicationMedicalRecordBody.medicationPrescription.prescriptionStatus (Prescription status (Active/Inactive)) | is equivalent to | status | MedicationStatement status: active | completed | entered-in-error | intended | stopped | on-hold | unknown | not-taken |
| medicationMedicalRecord.medicationMedicalRecordBody.medicationPrescription.prescriptionNote (Prescription note) | is equivalent to | note.text | Free text describing the prescription, why started or changed |
| medicationMedicalRecord.medicationMedicalRecordBody.medicationPrescription.principalPrescriptionReason.reason (Principal prescription reason (NKOO code)) | is equivalent to | reasonCode | Primary reason for prescription. Use Socialstyrelsens NKOO CodeSystem |
| medicationMedicalRecord.medicationMedicalRecordBody.medicationPrescription.treatmentPurpose (Treatment purpose) | maps to wider concept | note.text | Free text describing treatment purpose (e.g., 'For high blood pressure'). Add to note |
| medicationMedicalRecord.medicationMedicalRecordBody.medicationPrescription.prescriptionChainId (Prescription chain ID) | is related to | partOf | Links prescriptions in same chain. Use partOf to reference previous MedicationStatement or custom extension |
| medicationMedicalRecord.medicationMedicalRecordBody.medicationPrescription.startOfTreatment (Start of treatment) | is equivalent to | effectivePeriod.start | Date when patient should start taking medication |
| medicationMedicalRecord.medicationMedicalRecordBody.medicationPrescription.endOfTreatment (End of treatment) | is equivalent to | effectivePeriod.end | Date when patient should stop taking medication |
| medicationMedicalRecord.medicationMedicalRecordBody.medicationPrescription.endOfTreatmentReason (End of treatment reason) | is equivalent to | statusReason | Reason for stopping medication. Use when status=stopped |
| medicationMedicalRecord.medicationMedicalRecordBody.medicationPrescription.selfMedication (Self medication (patient-prescribed)) | is related to | informationSource | If true, informationSource references the Patient. If false, references Practitioner/prescriber |
| medicationMedicalRecord.medicationMedicalRecordBody.medicationPrescription.drug.drug.nplId (NPL product ID) | is equivalent to | medicationCodeableConcept.coding.code | Medication 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 to | medicationCodeableConcept.coding.code | ATC classification code. CodeSystem: http://www.whocc.no/atc |
| medicationMedicalRecord.medicationMedicalRecordBody.medicationPrescription.drug.drug.pharmaceuticalForm (Pharmaceutical form (tablett, kapsel, etc.)) | is equivalent to | medicationReference.form | Form of medication. Reference Medication resource with form element using SIL codes |
| medicationMedicalRecord.medicationMedicalRecordBody.medicationPrescription.drug.drug.strength (Medication strength) | is equivalent to | medicationReference.ingredient.strength | Strength of medication (e.g., 20.0 mg). Reference Medication resource with ingredient details |
| medicationMedicalRecord.medicationMedicalRecordBody.medicationPrescription.drug.drug.routeOfAdministration (Route of administration) | is equivalent to | dosage.route | How medication is administered (oral, intravenous, etc.). Use SNOMED CT |
| medicationMedicalRecord.medicationMedicalRecordBody.medicationPrescription.drug.dosage.dosageInstruction (Dosage instruction (patient-facing text)) | is equivalent to | dosage.text | Free text instructions for patient |
| medicationMedicalRecord.medicationMedicalRecordBody.medicationPrescription.drug.dosage.unitDose (Unit dose (tablett, ml, etc.)) | is equivalent to | dosage.doseAndRate.doseQuantity.unit | Unit for dosage (e.g., tablett, ml). Use UCUM codes |
| medicationMedicalRecord.medicationMedicalRecordBody.medicationPrescription.drug.dosage.shortNotation (Short dosage notation (e.g., 1x2)) | maps to wider concept | dosage.patientInstruction | Abbreviated dosage description. Add to dosage.text or patientInstruction |
Group 3 Mapping from https://rivta.se/domains/clinicalprocess/activityprescription/actoutcome/GetMedicationHistoryResponder/2 to Provenance
| Source Code | Relationship | Target Code | Comment |
| medicationMedicalRecord.medicationMedicalRecordHeader.sourceSystemHSAId (Source system HSA-ID) | is equivalent to | entity.what | Provenance.entity.what references Device with HSA-ID. Provenance.entity.role = source |
| medicationMedicalRecord.medicationMedicalRecordHeader.accountableHealthcareProfessional.authorTime (Author time (documentation time)) | is equivalent to | recorded | When information was documented/updated in source system |
| medicationMedicalRecord.medicationMedicalRecordHeader.accountableHealthcareProfessional.healthcareProfessionalHSAId (Documenting practitioner HSA-ID) | is equivalent to | agent.who | Provenance.agent (type=author) references Practitioner who documented |
| medicationMedicalRecord.medicationMedicalRecordHeader.accountableHealthcareProfessional.healthcareProfessionalcareUnitHSAId (Care unit HSA-ID) | is equivalent to | agent.onBehalfOf | Provenance.agent.onBehalfOf references Organization (care unit) |
| medicationMedicalRecord.medicationMedicalRecordHeader.accountableHealthcareProfessional.healthcareProfessionalcareGiverHSAId (Care giver HSA-ID) | is related to | entity.what | Care giver organization. Create nested Provenance.entity for organizational hierarchy |
| medicationMedicalRecord.medicationMedicalRecordHeader.legalAuthenticator.signatureTime (Signature time) | is equivalent to | signature.when | Provenance.signature.when for legal signature |
| medicationMedicalRecord.medicationMedicalRecordHeader.legalAuthenticator.legalAuthenticatorHSAId (Signer HSA-ID) | is equivalent to | signature.who | Provenance.signature.who references Practitioner who signed |
| medicationMedicalRecord.medicationMedicalRecordBody.medicationPrescription.prescriber.authorTime (Prescriber decision time) | is equivalent to | occurredDateTime | When prescription decision was made. Use separate Provenance for prescriber role |
| medicationMedicalRecord.medicationMedicalRecordBody.medicationPrescription.prescriber.healthcareProfessionalHSAId (Prescriber HSA-ID) | is equivalent to | agent.who | Provenance.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 Code | Relationship | Target Code | Comment |
| 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 | |