SFM Basis API Implementation Guide

$sendMedication

$sendMedication is used to send medical data to RF.

Rules for using sendMedication

  • SFM requires that last lookup has been performed within the last 4 hours
  • if EPJ do not receive response from SFM or SFM respond with operationOutcom (error) the EPJ need to send a new getMedication
  • EPJ may send more than one sendMedication for each getMedication
  • All medicationStatements represented in getMedication/latest sendMedication must be referred within sendMedication, either as medicationStatement or within recall-info.
  • All head of chain delivered in last lookup ($getMedication) are represented in the bundle.
  • The user must have rights to deliver prescriptions to RF
  • SFM creates a new session each time a getMedication is called

Operation resource: sendMedication

Invocations

URL: [base]/Patient/$sendMedication

Parameters (In)

NameCardinalityTypeDocumentation
medication1..1Bundle(sfm-MedicationBundle)

Medication bundle document containing medicatiation and other prescription info. Patient must be present in the bundle, with sufficient info for messages to Reseptformidleren. See $getMedication

Return Values (Out)

NameCardinalityTypeDocumentation
prescriptionCount1..1integer

the number of prescription signed and sent to Reseptformidleren

recallCount1..1integer

the number of withdrawals sent to Reseptformidleren

PllResult0..1

Result of PLL delivery to Reseptformidleren

PllResult.PllmessageID1..1string

MessageID for M25.1 sent to Reseptformidleren

PllResult.resultCode1..1Coding

Ok, or error code from Reseptformidleren or SFM

prescriptionOperationResult0..*

Result of prescription delivery (M1) or prescription recall (M5) to Reseptformidleren

prescriptionOperationResult.reseptID1..1string

ReseptID involved in the operation

prescriptionOperationResult.refnum0..1string

Referansenumber assigned to prescription when relevant for M1

prescriptionOperationResult.resultCode1..1Coding

Ok, or error code from Reseptformidleren or SFM

This operation is complex, and require that the Practitioner performing the operation presents a valid HelseID token with identity information, and that the authorisation is available in Helsepersonellregisteret

Note that the binding (sfm-rfkj-lookupcodes) for parameter-part resultCode is not rendered here. See the OperationDefinition for details.