Aggregated MedicationStatement

http://fhir.patientsknowbest.com/structuredefinition/aggregated-medicationstatement

https://www.hl7.org/fhir/R4/medicationstatement.html

Description

This profile is…

This profile is not…

  • a spec for all Medication and MedicationStatement resources returned from the Aggregated FHIR endpoint; resources sent to a Customer FHIR endpoint are not guaranteed to conform to this profile

  • a spec describing how Medication and MedicationStatement resources must be sent to a Customer FHIR endpoint; some of the elements used in this profile might only be meaningful for migrated data and cannot be provided to a Customer FHIR endpoint

Relevant PKB entities

FHIR

PKB

Notes

FHIR

PKB

Notes

Resource id

[[Medication.Aggregated Data Point ID]]

 

Resource meta

[[Data Point.Privacy Label]] code mappings (PKB → FHIR):

  • GENERAL_HEALTH → GENERAL_HEALTH

  • MENTAL_HEALTH → MENTAL_HEALTH

  • SEXUAL_HEALTH → SEXUAL_HEALTH

  • SOCIAL_CARE → SOCIAL_CARE

 

 

A single uploadeddata entry can result in multiple data points, so this ID does not necessarily uniquely identify a data point.

 

 

 

 

 

 

 

 

 

Note that this is a reference, unlike the meta.security which contains a code.

 

Note that this is a reference, unlike the meta.security which contains a code.

 

Note that this is a reference, unlike the meta.security which contains a code.

 

 

 

 

 

 

 

 

 

 

MedicationStatement.extension

For each [[Medication.Attachment]]:

 

 

The “Resolve()” notation indicates that the display value for the corresponding specialty code will be determined at the time of retrieval, based on the (optional) code set for the source organisation.

 

 

MedicationStatement.identifier

 

 

  • identifier[x]: Identifier

    • value = [[Data Point.External Data Point ID]]

    • assigner: Reference

      • reference = the relative URL of the Organization representing the [[Data Point.Source Organisation]]

 

MedicationStatement.status

  • <conditional>

  • If [[Medication.Status]] == INACTIVE:

    • “completed“

  • Else

    • “active“

 

MedicationStatement.medicationCodeableConcept

[[Medication.Substance]]

 

MedicationStatement.effectivePeriod

  • effectivePeriod: Period

    • start = [[Medication.Start Timestamp]]

    • end = [[Medication.End Timestamp]]

 

MedicationStatement.subject

  • subject: Reference

    • reference = the relative URL of the Patient resource

    • display = [[User.Title]] [[User.Given Name]] [[User.Family Name]]

 

MedicationStatement.dosage

  • dosage[0]: Dosage

    • text = [[Medication.Frequency Text]]

    • patientInstruction = [[Medication.Instructions]]

    • timing: Timing

      • <conditional>

      • If [[Medication.Frequency Priority]] != AS_DIRECTED AND != AS_NEEDED:

        • repeat: Element

          • frequency = 1

          • period = [[Medication.Frequency Value]]

          • periodUnit = [[Medication.Frequency Units]]

      • Else if [[Medication.Frequency Priority]] == AS_DIRECTED:

        • code: CodeableConcept

          • text = "As directed"

      • Else:

        • Omit the "code" element

    • <conditional>

    • If [[Medication.Frequency Priority]] == AS_NEEDED:

      • asNeededBoolean = true

    • Else:

      • Omit the "asNeededBoolean" element

    • doseAndRate: Element

      • doseQuantity: SimpleQuantity

        • extension[x]: Extension

        • value = [[Medication.Dose Value]]

        • <conditional>

        • If [[Medication.Medication Unit]] NOT NULL:

          • code = [[Medication.Medication Unit]]

        • Else if [[Medication.Dose Units.Display Text]] NOT BLANK:

          • unit = [[Medication.Dose Units.Display Text]]

        • Else:

          • unit = [[Medication.Dose Units]] {coding[0] - display}

          • system = [[Medication.Dose Units]] {coding[0] - system}

          • code = [[Medication.Dose Units]] {coding[0] - code}

[[Medication.Frequency Units]] code mappings (PKB → FHIR):

  • HOUR → h

Note #1: PKB supports more than one for dose units, but Quantity can represent only one. To ensure data is not lost, an extension is returned with the full CodeableConcept.

Note #2: Frequency instructions of “as directed” are discouraged, but if they have been provided then “As directed” will be set into the timing.code.text element.