SFM Basis API Implementation Guide

Populating $sendMedication

When submitting medication data to national systems, a MedicationBundle shall be used.

Current regulations and requirements states that a $sendMedication operation shall follow a recent $getMedication operation including lookup in RF. SFM requires consistency between the two, and defines a timeframe of maximum 4 hours between most recent lookup in Reseptformidleren and a $sendMedication.

When seveal lookups for the same patient has been made within this window in time, the reference shall be to the latest lookup including RF. The same applies to the consistensy requirement between the received data and the submitted data: Consistency is required between the latest "RF" lookup and the bundle delivered with $sendMedication. I two consecutive $sendMedication operations occur, without intermediate lookup, the second must be consistent with the first.

To support patients both with and without national IDs, a reference is (always) required from the $sendMedication to the prior $getMedication by using

Composition.relatesTo.targetIdentifier

pointing to

Composition.identifier

(june 2020: this is still under developement, and the Composition.identifier is still not present in current test-environment)

Medication

The overall principle:

  • all "head of chain" prescriptions shall be returned when submitting the sfm-MedicationBundle, either altered or unchanged, toghether with any new prescriptions.

  • any sfm-MedicationStatement identified as part of PLL shall be returned. SFM will remove completed entries according to current rules for PLL/Multidose.

PLLinfo

When, for a reason, the user choose to send sfm-MedicationBundle without intent of delivering PLL, the sectionPLLinfo may be delivered with no entries, and having the emptyReason=nilknown OR the obtained info may be mirrored, keeping the createPLL=false

Not that SFM will have a separate configuration item to control the delivery of PLL, and when disabled, the PLL/M25.1 will only be submitted for Multidose patients on the $sendMedication from the registered responsible organization/doctor OR by indicating that the doctor substitutes for the responsible one substitute=true.

Summary:

SectionMedication
SectionOtherPrescriptions
SectionAllergies

shall all be returned with data consistent to the received bundle.

Generally also the SectionPLLinfo

Attester shall be added for organization and Practitioner subbmiting the data.

SectionDispense is not relevant for $sendMedication and shall be ommited.

SFM will build a chain of prescriptions based on available renewal information retreived from national systems. All sfm-MedicationStatement's having partOf reference to another prescription AND not listed with PLL-id is considered obsolete and may be ommited.