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:

identifier (0..*)

if identifier is not provided, then search among all patients - if one or more values are included, limit the search to the patients identified

from (0..1) to (0..1)

If from and to are 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 from or to 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.

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

output

list of patients

standard fhir error handling.

Searching by patient identifiers:

GET [base]/Patient?identifier=<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

*Several patient ids are sent as a comma-separated list on the identifier search parameter.

Searching by medications:

GET [base]/Patient?medication=<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?medication=<system>|<string>,<system>|<string>&from=<date>&to=<date>

Example query:

GET [base]/Patient/?identifier=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&medication=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