@healthcloudai/hc-sdk 3.7.0 → 3.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +44 -0
- package/dist/index.d.cts +792 -403
- package/dist/index.d.ts +792 -403
- package/dist/index.js +44 -0
- package/docs/clients/ProviderClient.md +7 -0
- package/docs/docs-manifest.json +23 -3
- package/docs/examples/index.md +7 -0
- package/docs/index.md +7 -0
- package/docs/models/ProviderAppointment.md +24 -0
- package/docs/models/ProviderAppointmentResponse.md +17 -0
- package/docs/models/ProviderAppointmentsResponse.md +18 -0
- package/docs/models/ProviderEncounterListResponse.md +18 -0
- package/docs/models/ProviderEncounterResponse.md +17 -0
- package/docs/models/ProviderPatientAddress.md +22 -0
- package/docs/models/ProviderPatientPhone.md +19 -0
- package/docs/models/ProviderPatientRecordResponse.md +24 -0
- package/docs/models/ProviderPatientSummary.md +27 -0
- package/docs/models/UpdateEncounterClinicalNoteRequest.md +24 -0
- package/docs/models/UpdateEncounterClinicalNoteResponse.md +19 -0
- package/docs/models/UpdateEncounterStatusRequest.md +21 -0
- package/docs/models/UpdateEncounterStatusResponse.md +19 -0
- package/docs/models/index.md +13 -0
- package/docs/operations/provider.getAppointment.md +148 -0
- package/docs/operations/provider.getEncounter.md +120 -0
- package/docs/operations/provider.getPatientRecord.md +122 -0
- package/docs/operations/provider.listAppointments.md +176 -0
- package/docs/operations/provider.listEncounters.md +123 -0
- package/docs/operations/provider.updateEncounterClinicalNote.md +154 -0
- package/docs/operations/provider.updateEncounterStatus.md +152 -0
- package/package.json +1 -1
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
# Update encounter status
|
|
2
|
+
|
|
3
|
+
Operation ID: `provider.updateEncounterStatus`
|
|
4
|
+
|
|
5
|
+
Update a tenant-scoped FHIR encounter status. When the encounter is linked to Athena, the backend writes the practice's flow-board patient status before FHIR, using a fixed HealthCloud->Athena mapping (arrived -> ready for staff, triaged -> ready for provider, in-progress -> with provider, finished -> checked out). HealthCloud statuses without a flow-board equivalent (planned, onleave, cancelled, entered-in-error, unknown) skip the Athena mirror and update FHIR only, returning ehr_status='skipped'. Closing (finished) also stamps period.end and the recorded visit length; starting (in-progress) stamps period.start when missing. Provider clients never submit Athena IDs.
|
|
6
|
+
|
|
7
|
+
## Public method
|
|
8
|
+
|
|
9
|
+
`updateEncounterStatus`
|
|
10
|
+
|
|
11
|
+
Signature: `provider.updateEncounterStatus(encounterId, request)`
|
|
12
|
+
|
|
13
|
+
Return type: `Promise<UpdateEncounterStatusResponse>`
|
|
14
|
+
|
|
15
|
+
## Authentication
|
|
16
|
+
|
|
17
|
+
Classification: **AUTHENTICATED**
|
|
18
|
+
|
|
19
|
+
Schemes: `bearerAuth`
|
|
20
|
+
|
|
21
|
+
## Prerequisites
|
|
22
|
+
|
|
23
|
+
None documented.
|
|
24
|
+
|
|
25
|
+
## HTTP
|
|
26
|
+
|
|
27
|
+
`PATCH /encounters/{encounter_id}/status`
|
|
28
|
+
|
|
29
|
+
## Path parameters
|
|
30
|
+
|
|
31
|
+
| Name | Type | Required | Format | Allowed values | Default | Nullable | Description |
|
|
32
|
+
|---|---|---:|---|---|---|---:|---|
|
|
33
|
+
| `encounter_id` | `string` | Yes | | | | No | |
|
|
34
|
+
|
|
35
|
+
## Query parameters
|
|
36
|
+
|
|
37
|
+
None.
|
|
38
|
+
|
|
39
|
+
## Body parameters
|
|
40
|
+
|
|
41
|
+
| Name | Type | Required | Format | Allowed values | Default | Nullable | Description |
|
|
42
|
+
|---|---|---:|---|---|---|---:|---|
|
|
43
|
+
| `body` | [`UpdateEncounterStatusRequest`](../models/UpdateEncounterStatusRequest.md) | No | | | | Yes | |
|
|
44
|
+
|
|
45
|
+
Request model: [`UpdateEncounterStatusRequest`](../models/UpdateEncounterStatusRequest.md)
|
|
46
|
+
|
|
47
|
+
## Request example
|
|
48
|
+
|
|
49
|
+
```json
|
|
50
|
+
{
|
|
51
|
+
"status": "arrived"
|
|
52
|
+
}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Success responses
|
|
56
|
+
|
|
57
|
+
| Status | Shape | Content type | Description |
|
|
58
|
+
|---|---|---|---|
|
|
59
|
+
| `200` | [`UpdateEncounterStatusResponse`](../models/UpdateEncounterStatusResponse.md) | application/json | FHIR and linked EHR encounter status updated |
|
|
60
|
+
|
|
61
|
+
## Success response examples
|
|
62
|
+
|
|
63
|
+
### 200
|
|
64
|
+
|
|
65
|
+
```json
|
|
66
|
+
{
|
|
67
|
+
"ehr_status": "updated",
|
|
68
|
+
"encounter": {},
|
|
69
|
+
"fhir_status": "updated"
|
|
70
|
+
}
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Common errors
|
|
74
|
+
|
|
75
|
+
| Status | Shape | Content type | Description |
|
|
76
|
+
|---|---|---|---|
|
|
77
|
+
| `400` | [`provider.ErrorResponse`](../models/provider.ErrorResponse.md) | application/json | The HealthCloud status is invalid |
|
|
78
|
+
| `401` | [`provider.ErrorResponse`](../models/provider.ErrorResponse.md) | application/json | Provider Bearer authentication is required |
|
|
79
|
+
| `409` | [`provider.ErrorResponse`](../models/provider.ErrorResponse.md) | application/json | The encounter is linked but no EHR integration is configured |
|
|
80
|
+
| `502` | [`provider.ErrorResponse`](../models/provider.ErrorResponse.md) | application/json | The EHR or FHIR update failed after request validation |
|
|
81
|
+
|
|
82
|
+
## Error examples
|
|
83
|
+
|
|
84
|
+
### 400 — Invalid status
|
|
85
|
+
|
|
86
|
+
```json
|
|
87
|
+
{
|
|
88
|
+
"error": "status must be a valid HealthCloud encounter status"
|
|
89
|
+
}
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### 401 — No provider JWT
|
|
93
|
+
|
|
94
|
+
```json
|
|
95
|
+
{
|
|
96
|
+
"error": "Provider authorization required"
|
|
97
|
+
}
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### 409 — Linked EHR unavailable
|
|
101
|
+
|
|
102
|
+
```json
|
|
103
|
+
{
|
|
104
|
+
"error": "Encounter is linked to an EHR but no EHR integration is configured"
|
|
105
|
+
}
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
### 502 — EHR update failure
|
|
109
|
+
|
|
110
|
+
```json
|
|
111
|
+
{
|
|
112
|
+
"error": "EHR update failed"
|
|
113
|
+
}
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
## NodeJS / TypeScript implementation
|
|
117
|
+
|
|
118
|
+
```ts
|
|
119
|
+
import { HCSDK } from "@healthcloudai/hc-sdk";
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
```ts
|
|
123
|
+
const encounterId = "<ENCOUNTER_ID>";
|
|
124
|
+
|
|
125
|
+
const request = {
|
|
126
|
+
"status": "arrived"
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
const result = await provider.updateEncounterStatus(encounterId, request);
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
## cURL
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
curl -X PATCH \
|
|
136
|
+
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
|
|
137
|
+
-H 'Content-Type: application/json' \
|
|
138
|
+
-d '{"status":"arrived"}' \
|
|
139
|
+
'https://dev-api-provider.health.cloud/encounters/%3CENCOUNTER_ID%3E/status'
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
## Notes
|
|
143
|
+
|
|
144
|
+
None.
|
|
145
|
+
|
|
146
|
+
## Prepared Test Console scenario
|
|
147
|
+
|
|
148
|
+
No canonical scenario is currently associated.
|
|
149
|
+
|
|
150
|
+
## Real response
|
|
151
|
+
|
|
152
|
+
No approved real integration response is currently published. Unapproved candidates are never rendered as examples.
|
package/package.json
CHANGED