Use of HTTP URL, verbs and search parameters
General description of FHIR and use of RESTful HTTP: https://www.hl7.org/fhir/http.html
The two SFM FHIR Api's are both implemented using Microsoft FHIR server. Several instances of the SFM is available for integration test and development. The naming standard for API is:
datashare.(implementation).forskrivning.no
One relevant example is datashare.test2.forskrivning.no
The API capabilityStatement
(standard FHIR resource) is available at:
https://datashare.test2.forskrivning.no/metadata
Most operations on the API are requiring an authencicated and preregistered user and a presregistered organsisation. Exceptions are the capabilityStatement shown above and the initial creation of a newly registerede client. This client will present at HelseID token with a unique SFM-id not previously known by SFM.
As stated in the capabilityStatement
the SFM Datadeling API will serve most resources in a standard REST-ful manner, with some special implementation of the Patient LIB list.
For some resources the allowed operations are limited due to privacy concerns. Delete will generally not be available for resources in SFM.
For all patient related data exept for the Patient resource itself, a patientTicket
must be presented as a parameter to the operation.
Examples of using RESTful FHIR:
Resource: sfm-Task (task for SFM user)
Read:
Read: GET [urlbase] / Task / [id] sfm-Task with specified ID is returned as a resource in the HTTP body
Search:
Search: GET [urlbase] / Task / [id]? Owner = Practitioner / [id]
Search: GET [urlbase] / Task / [id]? Status = in-progress Tasks that match the search criteria are returned in a Bundle.
See: https://www.hl7.org/fhir/http.html#search for details
Note that SFM does not fully support paging, but accepts the standard search parameter _count
for controlling the returned amount of matches in a search. Currently, all API consumers must inspect the Bundle.total
to calculate if the total number of matches is lager than the returend records.
If it is essential to get all matches returend, the _count
parameter should be ajusted according to the Bundle.total
, and a new search performed.
Update:
Update: PUT [urlbase] / Task / [id] Used to update sfm-Task with new status.