Status
The status resource returns information about whether the patient has any patient info registered, and when the patient info was last changed. A last changed timestamp for each type of information is also returned.
The response also contains the privacy settings the patient may have set.
If the patient has set a kjernejournal reservation no information for the patient exists in kjernejournal.
An extra consent must be given for access if the patient has set a restriction for access to kjernejournal or specifically for patient info.
Note that we prefer that clients requests the status-endpoint first for each session in order to determine whether the patient has set restriction or reservation. This will improve the user experience as extra consent must be given for access in that case. See the nhn-access-basis header for how to set consent.
Authorization
The endpoint requires either a machine-to-machine token or a HelseID user token for authentication. The EPJ can use a machine-to-machine token to check if the patient has information and if there has been updates without requiring the user to log in with HelseID.
Note that when a machine-to-machine token is used there are fewer required headers than with a user token.
When a user token is used, the response contains a flag if the users HPR number is blocked or not (see below). This field will always be false if a machine-to-machine token is used since it contains no user data.
Also when a user token is used all the required headers must be set as usual. The "nhn-access-basis" header can in this case always be set to UNNTAK. Note that we do not do any audit logging for requests to the /status endpoint.
Response object
| Field | Type | Description |
|---|---|---|
hasPatientInfo |
Boolean |
True if patient has any patient info resources registered. |
patientInfoLastChanged |
DateTime |
The last time the patient info was modified; may be null. |
hasCommunicationNeeds |
Boolean |
True if any communication needs are registered. |
communicationNeedsLastChanged |
DateTime |
The last time the communication needs were updated; may be null. |
deceased |
Boolean |
True if patient is deceased. |
hasConfidentialAddress |
Boolean |
True if patient has confidential address (no data will be available). |
hasReservasjonKjernejournal |
Boolean |
True if patient has reserved themself from having a kjernejournal (no data will be available). |
hasBlokkering |
Boolean |
True if patient has blocked this HPR-number (only relevant for helsepersonell user logins). |
hasSperring |
Boolean |
True if patient has set sperring for all helsepersonell, forhoyet header is needed to get data. |
Response example
GET https://test.patient-info.hit.nhn.no/api/patient-info/v1/status
{
"hasPatientInfo": true,
"patientInfoLastChanged": "2024-10-01T14:22:35.123Z",
"hasCommunicationNeeds": true,
"communicationNeedsLastChanged": "2024-10-01T14:22:35.123Z",
"deceased": false,
"hasConfidentialAddress": true,
"hasReservasjonKjernejournal": false,
"hasBlokkering": false,
"hasSperring": false
}