Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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

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

Description

This profile describes how non-FHIR data will be mapped to FHIR in the Aggregated FHIR endpoint by PKB. Other resources returned from the Aggregated FHIR endpoint are not guaranteed to conform to this profile.

Relevant PKB entities

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.

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

          • url = “http://fhir.patientsknowbest.com/structuredefinition/dose-units”

          • valueCodeableConcept = [[Medication.Dose Units]]

        • 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.

...