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

meta: Meta

...

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

Resource id

[[Medication.Aggregated Data Point ID]]

Resource meta

structuredefinition
version-persisted extension.
      • source-organization

      • code = the resource ID of the Organization representing the [[Data Point.Source Organisation]]

    • security[x]: Coding

      • system =

 "
privacy
label"
 
      • the resource ID of the Organization representing the [[Data Point.

Privacy Label
organization
Organization representing the [[Data Point.Source Organisation]]
team
      • patient

      • code = the resource ID of the

Organization representing the [[Data Point.Source Team]]
  • <conditional>

  • If Source Person is a Professional:

  • source
    practitioner
        • org

        • code = the resource ID of

    the Practitioner
  • Else if Source Person is a Patient:

  • security[x]: Coding

  • security[x]: Coding

    system
        • the Organization representing the [[Data Point.Connecting Organisation]]

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

    • GENERAL_HEALTH → GENERAL_HEALTH

    • MENTAL_HEALTH → MENTAL_HEALTH

    • SEXUAL_HEALTH → SEXUAL_HEALTH

    • SOCIAL_CARE → SOCIAL_CARE

    codesystem
    connecting
    org
  • code = the resource ID of the Organization representing the [[Data Point.Connecting Organisation]]

      • valueString = [[Data Point.

    Privacy Label
      • Uploaded Data ID]]

     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.

    • extension[x]: Extension

      • url =

    "
    /source-text"valueString
    Source Text
        • Access Route]]

    • extension[x]: Extension

      • url =

    responsible
    organization
      • text"

      • valueString = [[Data Point.

    Responsible Organisation Identifier
      • Source Text]]

    partner
    identifier

    identifier: Identifier

    value

    valueReference: Reference

      • valueString = [[Data Point.

    HL7 Partner
      • Responsible Organisation Identifier]]

  • system = http://fhir.patientsknowbest.com/id/public-id

  • access
    route
    valueCoding: Codingcode
      • valueReference: Reference

        • identifier: Identifier

          • system =

    http://fhir.patientsknowbest.com/codesystem/access-route
          • “urn:uuid:cd97da65-0aa4-43a6-b695-cfd0c6f3267d

          • value = [[Data Point.

    Access Route
          • HL7 Partner]]

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

    recent privacy override
        • recent privacy override

    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.

    ]]

    extension[x]: Extension

  • url = “https://fhir.patientsknowbest.com/structuredefinition/upstream-last-updated

  • valueDateTime = <as per extension definition>
      • ]]

    • extension[x]: Extension

      • url = “

    http
    uploaded
    data
    id

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

  • valueString = [[Data Point.Uploaded Data ID]]

      • valueDateTime = as per extension definition

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