SFM Basis API Implementation Guide

Get medical information (getMedication)

Prescriptions and medication list is read from national systems Kjernejournal (KJ) and Reseptformidleren (RF)

Based on input parameters in $getMedication, patient information and user rights, SFM Basis API look up in RF and/or KJ.

getMedication

  1. EHR (EPJ) request information from national systems for a particular patient
  2. SFM retreives PLL from RF
  3. RF returns message with PLL
  4. SFM retreives prescriptions from RF
  5. RF returns the patients prescriptions
  6. SFM performs a lookup for the patients medication in KJ
  7. KJ returns medication info
  8. SFM processes and compiles info from both RF and KJ
  9. SFM converts information to FHIR format
  10. SFM returns a Bundle containing the processed information to EHR (also containg any info on anomalies)
  11. On error, SFM will return an error message.

Compilation of information (Step 8)

  1. Compile M25 messages
  2. Compile prescriptions (M1) and deliveries dispence reports (M6)
  3. Compile the two list from 1 and 2, then clean up inconsistency

From this a list of medication statements are created, and connected prescriptions (renewals) are chained. MedicationStatements are either head of chain or part previous statements identified as tail and connected to a head of chain. Other prescriptions that are not medications are represented as BandaPrescriptions. Prescriptions not representing the "head" will have these properties:

  • status=completed
  • part-of=<reference to another presecription in the bundle>
  • The prescriptions representing the head will NOT have a part-of reference.

If the patient has M25 (PLL), then PLL item identifier is identified for the head of chain.