Status

Status ressursen returner informasjon om pasient har behandlingsplan, og når eventuelt plan sist ble endret

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 eksempel

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

Respons

Felt Format Beskrivelse
activeCarePlan booleam True = har aktive plan, False = har ingen (aktive) plan
lastChangedDateTime DateTime Null hvis ingen plan, ellers tidspunkt for når planen ble sist endret
privacySetting.consent Boolean If the patient has consented to have a careplan or not
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.

Respons eksempel

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