Find Document References

Endpoint

POST https://api.pjd.test.nhn.no/R4/fhir/DocumentReference/_search

Scopes

The endpoint requires one of the following two scopes. It's not possible to use both scopes in the same request.

Scope Lovverk Description
nhn:phr/mhd/read-documentreferences Helsepersonelloven p. 45 No access basis header parameter. No filtering according to Kjernejournalforskriften.
nhn:phr/mhd/read-documentreferences/kjernejournalforskriften Kjernejournalforskriften Access basis header parameter is required. Filtering according to Kjernejournalforskriften.

Filtering according to Kjernejournalforskriften

If using the second scope.

Category Dokumentgruppe Varighet på visning i kjernejournal Eksempler på dokumenter
A00-1 Epikriser og sammenfatninger Ubegrenset Epikriser etter innleggelse, poliklinikk m.m.
C00-1 Prøvesvar, vev og vesker 1 år Medisinks biokjemi, patologi m.m.
D00-1 Organfunksjon 5 år Ultralyd av hjerte, spirometri m.m.
E00-1 Bildediagnostikk 5 år Radiologi, ultralyd m.m.
I00-1 Korrespondanse 1 år Henvisninger

Example

Simple POST to retreive all document references for LINE DANSER

Example POST Body

POST api.pjd.test.nhn.no/fhir/DocumentReference/_search	  
Host api.pjd.test.nhn.no
Content-Type: application/x-www-form-urlencoded
Accept: application/fhir+json; fhirVersion=4.0
nhn-source-system: EPJ System 1.0
nhn-event-id: <unique id>
Authorization: DPoP <DPoP authorization bearer token>
DPoP: <DPoP proof token>

patient.identifier=13116900216&status=current

Header Parameters

Header parameter Required? Possible values
nhn-access-basis Only for Kjernejournalforskriften UNNTAK, SAMTYKKE, FORHOYET_SAMTYKKE, AKUTT, FORHOYET_AKUTT
nhn-source-system Required Name and version of the EPJ system
nhn-event-id Optional Unique id from consumer

Query Parameters

See ITI-67 for full details

Query parameter Required? Type Description
patient.identifier required token Patient identifier (NIN)
status required token The status (availabilityStatus) of the DocumentReference Resource
author.given string Given name of the author person
author.family string Family name of the author person
category token General classification (classCode) of the DocumentReference Resource
creation DateTime Specifies a search against the DocumentReference.content.attachment.creation
date The time when the DocumentReference was created
event token Specifies the main clinical acts (eventCodeList) documented by the DocumentReference Resource
facility token The kind of facility found in DocumentReference.context.facilityType (healthcareFacilityTypeCode)
format token The format (formatCode ) of the DocumentReference Resource
identifier token An identifier for this DocumentReference and/or the contained document. The search results represent the results of a search on DocumentReference.masterIdentifier and DocumentReference.identifier
period date Represents the time of service that is being documented by the DocumentReference. This query parameter represents from/to parameters for the serviceStartTime and serviceStopTime of the Document Entry
related reference Represents other identifiers (referenceIdList) associated with the DocumentReference Resource
security-label token The security labels (confidentialityCode) of the document referenced by DocumentReference Resource
setting token The specific practice setting (practiceSettingCode) of the DocumentReference Resource
type token The specific type of the DocumentReference resource or in Document Sharing nomenclature, the typeCode of the Document Entry

Return value

The endpoint returns a FHIR bundle according to ITI-67.

Return header parameters

Response header parameter
NHN-SecurityLabel-Nors-Count The total count of documents with security label 'NORS'

Response validation

The structure of the response has been validated with Matchbox.health validation service and should be compliant with FHIR R4 and ITI-67.

Personverninnstillinger (PVK stream)

The endpoint has access control according to Personverninnstillinger for patient in Helsenorge.