Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

This page provides more detail on how the web interface displays medication information, which it fetches from the Aggregated FHIR API.

The Manual provides more information on the functionality; this page is aimed at a technical audience who need to understand which FHIR elements are used to populate the information displayed.

FHIR Resources

The web interface populates Medicines from the following FHIR resources:

Overview

The web interface shows a list of medications. These are separated into “Current medicines” and “Past medicines”. A medication is considered to be current unless either of the following are true:

  • The medication has an End Timestamp which is in the past

  • The medication Status is INACTIVE

Mappings

Component

MedicationRequest

MedicationStatement

Status

This is not shown explicitly, but is included in the logic which determines if the medication is current or past.

status

status code mappings (FHIR → PKB):

  • active → ???

  • on-hold → ???

  • cancelled → ???

  • completed → ???

  • entered-in-error → ???

  • stopped → ???

  • draft → ???

  • unknown → ???

status

status code mappings (FHIR → PKB):

  • active → ???

  • completed → ???

  • entered-in-error → ???

  • intended → ???

  • stopped → ???

  • on-hold → ???

  • unknown → ???

  • not-taken → ???

Substance

<conditional>

If medicationReference is populated:

???

Else:

???

Start Timestamp

<conditional>

If this extension is present: http://nictiz.nl/fhir/StructureDefinition/zib-Medication-PeriodOfUse

extension[x]: valuePeriod.start

Else:

authoredOn

effectivePeriod.start

End Timestamp

<conditional>

If this extension is present: http://nictiz.nl/fhir/StructureDefinition/zib-Medication-PeriodOfUse

extension[x]: valuePeriod.end

Else:

No value.

effectivePeriod.end

Frequency Text

Frequency Value

Frequency Units

Frequency Priority

Dose Value

First, the main Dosage is determined as follows (from the dosageInstruction element for MedicationRequest, or dosage element for MedicationStatement):

  • If there is exactly one Dosage where sequence is 1, then use that Dosage

  • Otherwise use the first Dosage in the list

Then, we inspect the main Dosage and retrieve:

doseAndRep[0].doseQuantity.value

Dose Units

First, the main Dosage is determined as follows (from the dosage element):

  • If there is exactly one Dosage where sequence is 1, then use that Dosage

  • Otherwise use the first Dosage in the list

Then, we inspect the main Dosage and retrieve:

doseAndRep[0].doseQuantity

If this Quantity has a code, no unit and no system, then it is considered to contain a PKB-assigned code.

Otherwise, we inspect the first Dosage (which might differ from the previously determined main Dosage) and inspect doseAndRep[0].doseQuantity for the http://fhir.patientsknowbest.com/structuredefinition/dose-units extension.

Medication Unit

Instructions

  • No labels