Status

The status-endpoint returns information whether the patient has registered critical health information or not, and a timestamp in UTC time when the information was last changed. A last changed timestamp for each type of critical 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 critical information for the patient exists in kjernejournal. If the patient has set a restriction for access to kjernejournal or specifically for critical information an extra consent must be given for access.

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 machin-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 critical 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 information is not available 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.

Input

Attribute Format Description
nin String Norwegian national identification number

Curl example: Request status for patient

curl --location --request POST 'https://test1.critical-information.hit.nhn.no/api/critical-information/v1/status' \
--header 'Authorization: Bearer eyJhbGciOiJSUzI1NiI......<HelseId machine token>' \
--header 'nhn-source-system: My EPJ system name' \
--header 'nhn-patient-nin: 10086055555' \
--data '{"nin":"10086055555"}'

Response

Attribute Format Description
patientNIN String The patient NIN (National Identification Number). It's the same as FNR/DNR.
hasCriticalInformation Boolean The patient has at least one critical information record which is active (i.e. not deleted or refuted), but it may be expired.
hasActiveCriticalInformation Boolean The patient has at least one critical information record which is active and not expired.
lastChangedDateTime Timestamp Timestamp when critical information was last changed for this patient.
dateChanged.allergyIntoleranceDate Timestamp Timestamp when the registration of other allergen (annen allergi) or drug reaction (legemiddelreaksjon) was last changed.
dateChanged.conditionComplicationsOfAnesthesiaDate Timestamp Timestamp when the registration of intubation problems or other anesthetic problems was last changed.
dateChanged.conditionCriticalMedicalConditionDate Timestamp Timestamp when the registration of medical condition alert was last changed.
dateChanged.procedure Timestamp Timestamp when the registration of ongoing treatment was last changed.
dateChanged.deviceUseStatementDate Timestamp Timestamp when the registration of (mechanical) device the patient has as implant was last changed.
dateChanged.conditionTransplantsAndOtherForeignBodiesDate Timestamp Timestamp when the registration of transplants and other foreign objects in the body was last changed.
dateChanged.consentDate Timestamp Timestamp when the registration of the consent the patient has given regarding treatment was last changed.
dateChanged.conditionInfectionDate Timestamp Timestamp when the registration of the infectious disease the patient has was last changed.
dateChanged.allergyIntoleranceDate Timestamp Timestamp when the registration of allergies or other reactions was last changed.
privacySetting.hasReservationKjernejournal Boolean If the patient has set a kjernejournal reservation or not.
privacySetting.isRestricted Boolean Patient has set restriction for access to critical information. Extra consent must be given for access.
privacySetting.isBlocked Boolean Always false for machine JWTs. True if a user JWT is used and the HPR-number is blocked. Cannot be overruled.

Response example

{
    "patientNIN": "10086055555",
    "hasCriticalInformation": true,
    "hasActiveCriticalInformation": true,
    "lastChangedDateTime": "2023-11-07T09:21:58.573Z",
    "dateChanged": {
        "allergyIntoleranceDate": "2023-11-07T09:21:58.573Z",
        "conditionComplicationsOfAnesthesiaDate": null,
        "conditionCriticalMedicalConditionDate": null,
        "procedure": null,
        "deviceUseStatementDate": null,
        "conditionTransplantsAndOtherForeignBodiesDate": null,
        "consentDate": null,
        "flagDate": null,
        "conditionInfectionDate": null
    },
    "privacySetting": {
        "hasReservationKjernejournal": false,
        "isRestricted": false,
        "isBlocked": false
    }
}