Statistics

Currently, only one formal report is prepared, namely a report to Direktoratet for Medisinske produkter (formely SLV) on patients using a specific medication.

Below are instructions on how to implement this query.

This report is available through the datasharing API and is implemented as a query on the sfm-Patient resource. It should work in combination with the search parameters that are already implemented.

Input parameters to sfm-Patient resource:

Identifiers (0..*)

if Identifiers are not provided, then search among all patients - if Identifiers (1 or more) is included, limit the search to the patients identified

Period (startdatetime, enddatetime) (0..1)

If period is not included, then find patients with (one of) the identified drug(s) in their current LIB. The current LIB should include entries that are inactive but showing in LIB.

If period is included, then find patients that had (one of) the identified drug(s) in their LIB during that period (i.e. were in the LIB at some point during the period: added to LIB before the period ended, AND either not removed from LIB or removed after the period started). This should NOT include inactive entries, unless some are still showing in LIB.

Medications (ATC, FEST-id, varenummer) (1..*)

output

list of patients

standard fhir error handling.

Searching by patient identifiers:

GET [base]/Patient?identifiers=<system>|<string>,<system>|<string>

where <system> is one of:
urn:oid:2.16.578.1.12.4.1.4.1 for FNR
urn:oid:2.16.578.1.12.4.1.4.2 for DNR
urn:oid:2.16.578.1.12.4.1.4.14 for XxxId

*Note that since it is now possible to send in multiple patient ids the search parameter has been renamed from identifier to identifiers.

Searching by medications:

GET [base]/Patient?medications=<system>|<string>,<system>|<string>

where <system> is one of:
urn:oid:2.16.578.1.12.4.1.1.7180 for Atc number
http://ehelse.no/fhir/CodeSystem/FESTĀ for fest-id and varenummer

Searching by medications and period:

GET [base]/Patient?medications=<system>|<string>,<system>|<string>&from=<date>&to=<date>

Example query:

GET [base]/Patient/?identifiers=urn:oid:2.16.578.1.12.4.1.4.1|20066393055,urn:oid:2.16.578.1.12.4.1.4.14|721b8330-f8a0-4463-8dba-02b2b0ff0bab&from=2021-01-31T10:00:00&to=2022-08-31T12:00:00&medications=urn:oid:2.16.578.1.12.4.1.1.7180|M01AE01,http://ehelse.no/fhir/CodeSystem/FEST|ID_F33860F5-84C5-4A9F-9F7D-3671894EE446&active=true