# Get current check-in state

Operation ID: `patient.getCheckinCheckin`

Return whether the caller has an in-progress FHIR Encounter, plus their recent encounters. Requires a Bearer JWT (any authenticated pool type).

## Public method

`getCheckin`

Signature: `patient.getCheckin()`

Return type: `Promise<JsonValue>`

## Authentication

Classification: **AUTHENTICATED**

Schemes: `bearerAuth`

## Prerequisites

None documented.

## HTTP

`GET /checkin`

## Path parameters

None.

## Query parameters

None.

## Body parameters

None.

Request model: None.

## Request example

None declared in canonical OpenAPI.

## Success responses

| Status | Shape | Content type | Description |
|---|---|---|---|
| `200` | [`GetCheckinCheckinResponse`](../models/GetCheckinCheckinResponse.md) | application/json | Current patient check-in state |

## Success response examples

### 200

```json
{
  "checked_in": true,
  "encounters": [
    {
      "appointment_id": "string",
      "athena_appointment_id": "string",
      "athena_encounter_id": "string",
      "created_by": "self",
      "created_date": "2026-01-01T09:00:00Z",
      "diagnoses": [
        {
          "condition_display": "string",
          "condition_id": "string",
          "rank": 1,
          "use_code": "CC"
        }
      ],
      "encounter_class": "AMB",
      "encounter_id": "00000000-0000-0000-0000-000000000000",
      "fhir_id": "string",
      "hospitalization": {
        "admit_source_code": "string",
        "destination_id": "string",
        "discharge_disposition": "home",
        "origin_id": "string",
        "pre_admission_id": "string",
        "re_admission_code": "string"
      },
      "length_minutes": 0,
      "locations": [
        {
          "location_display": "string",
          "location_id": "string",
          "period_end": "2026-01-01T09:00:00Z",
          "period_start": "2026-01-01T09:00:00Z",
          "status": "active"
        }
      ],
      "notes": "string",
      "openloop_appointment_id": "string",
      "openloop_encounter_id": "string",
      "participants": [
        {
          "participant_type": "PPRF",
          "period_end": "2026-01-01T09:00:00Z",
          "period_start": "2026-01-01T09:00:00Z",
          "practitioner_display": "string",
          "practitioner_id": "string"
        }
      ],
      "patient_id": "string",
      "period_end": "2026-01-01T09:00:00Z",
      "period_start": "2026-01-01T09:00:00Z",
      "priority_code": "string",
      "priority_display": "string",
      "reason_code": "string",
      "reason_display": "string",
      "service_provider_display": "string",
      "service_provider_id": "string",
      "service_type_code": "string",
      "service_type_display": "string",
      "status": "planned",
      "steadymd_consult_guid": "string",
      "steadymd_episode_guid": "string",
      "type_code": "string",
      "type_display": "string"
    }
  ],
  "ok": true,
  "patient_id": "string"
}
```

## Common errors

| Status | Shape | Content type | Description |
|---|---|---|---|
| `401` | [`patient.ErrorResponse`](../models/patient.ErrorResponse.md) | application/json | Authorization required — missing or invalid Bearer JWT |
| `404` | [`patient.ErrorResponse`](../models/patient.ErrorResponse.md) | application/json | No FHIR patient record could be resolved for the caller |
| `500` | [`patient.ErrorResponse`](../models/patient.ErrorResponse.md) | application/json | Internal server error |

## Error examples

### 401 — Missing or invalid access token

```json
{
  "error": "Authorization required"
}
```

### 404 — Patient not found

```json
{
  "error": "Patient not found"
}
```

### 500 — Unexpected service failure (sanitized example)

```json
{
  "error": "Internal server error"
}
```

## NodeJS / TypeScript implementation

```ts
import { HCSDK } from "@healthcloudai/hc-sdk";
```

```ts
const result = await patient.getCheckin();
```

## cURL

```bash
curl -X GET \
  -H 'Authorization: Bearer <ACCESS_TOKEN>' \
  'https://dev-api-patient.health.cloud/checkin'
```

## Notes

None.

## Prepared Test Console scenario

No canonical scenario is currently associated.

## Real response

No approved real integration response is currently published. Unapproved candidates are never rendered as examples.
