SFM Basis API Implementation Guide

$getMedication

$getMedication is used to retrieve medical data for RF and/or KJ.

Rules for using sendMedication

  • The user must have rights to read medical information from RF and/or KJ
  • Kjernejournal rules apply for the use of the flags forwarded to KJ

Note that the "include binary" currently only supports the value: include_reseptdok

This flag makes SFM to include original content from RF/KJ for each medicationStatement that is head in a chain, as a binary resource refered from medicationStatement.derivedFrom

Operation resource: getMedication

Invocations

URL: [base]/Patient/$getMedication

Parameters (In)

NameCardinalityTypeBindingDocumentation
patient1..1Patient(sfm-Patient)

Must be present and contain Name, Address and (identifier OR (birthDate + gender))

Referansenummer0..*string

Refereansenummer shall always be present for patient without national ID. Referansenummer may be present for retreival of låst resept, doctors-name prescriptions or other

historyTimestamp0..1dateTime

For lookup in Kjernejournal: Indicates timestamp from witch changes shall be returned

SamtykkeKjernejournal0..1codesfm-kj-consentcodes (required)

Patient consent type for access to Medication data (HPAKUTT, HPMOTTATTSAMTYKKE, HPUNNTAK)

SamtykkeSperretLegemidler0..1codesfm-kj-consentcodes (required)

Patient consent type for access to disclosed Medication data (HPAKUTT, HPMOTTATTSAMTYKKE)

SamtykkeLasteResepter0..1codesfm-kj-consentcodes (required)

Patient consent type for access to LÅST RESEPT / locked prescriptions (HPAKUTT, HPMOTTATTSAMTYKKE)

IncludeOriginal0..*codesfm-include-binary.valueset (required)

Flag for inclusion of (elements from) original e-resep messages

Return Values (Out)

NameCardinalityTypeBindingDocumentation
medication1..1Bundle

Main result. Medication bundle document

KJHentetTidspunkt0..1dateTime

Time for result from KJ. Absensce shall be interpreted as no lookup performed

RFHentetTidspunkt0..1dateTime

Time for result from RF. Absensce shall be interpreted as no lookup performed

KJFeilkode0..1Codingsfm-rfkj-lookupcodes (required)

Error response from KJ

RFM96Feilkode0..1Codingsfm-rfkj-lookupcodes (required)

Error response from RF on M9.6 lookup

RFM912Feilkode0..1Codingsfm-rfkj-lookupcodes (required)

Error response from RF on M9.12 lookup

KJHarLegemidler0..1boolean

According to response from KJ

KJHarLaste0..1boolean

According to response from KJ

RFHarLaste0..1boolean

According to response from RF

RFPasientreservasjon0..1boolean

According to response from RF

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