Status

The status resource returns information about whether the patient has a careplan, and when the careplan was last changed.

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 a care plan 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 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

Felt Format
nin Fødselsnr

Request example

curl --location --request POST 'http://localhost:8080/api/careplan/status' \
--data-raw '{"nin":"28031561584"}'

Response

Felt Format Beskrivelse
activeCarePlan booleam True = has active careplan, False = has none (active) careplan.
lastChangedDateTime DateTime Null if no careplan, otherwise time of when the careplan was last changed.
privacySetting.consent Boolean If the patient has consented to have a careplan.
privacySetting.hasReservationKjernejournal Boolean If the patient has set a kjernejournal reservation.
privacySetting.isRestricted Boolean Patient has set restriction for access to careplan. 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

{
    "activeCarePlan": true,
    "lastChangedDateTime": "2023-01-07T10:52:17.3133333+01:00",
    "privacySetting": {
        "consent": true,
        "hasReservationKjernejournal": false,
        "isRestricted": false,
        "isBlocked": false
    }
}