@healthcloudai/hc-sdk 3.24.1 → 3.25.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 +43 -2
- package/dist/index.d.cts +840 -26
- package/dist/index.d.ts +840 -26
- package/dist/index.js +43 -2
- package/docs/clients/ProviderClient.md +7 -2
- package/docs/docs-manifest.json +18 -3
- package/docs/examples/index.md +7 -2
- package/docs/index.md +7 -2
- package/docs/models/CheckInEncounterResponse.md +2 -0
- package/docs/models/ClaimEncounterResponse.md +20 -0
- package/docs/models/DiagnosisInput.md +20 -0
- package/docs/models/GetEncounterResponse.md +2 -0
- package/docs/models/Icd10Code.md +18 -0
- package/docs/models/Icd10SearchResponse.md +19 -0
- package/docs/models/ProviderEncounterQueueResponse.md +19 -0
- package/docs/models/ProviderEncounterRecord.md +2 -0
- package/docs/models/ProviderQueueEncounter.md +28 -0
- package/docs/models/ProviderQueuePatient.md +21 -0
- package/docs/models/SignEncounterResponse.md +18 -0
- package/docs/models/UpdateEncounterDiagnosesRequest.md +17 -0
- package/docs/models/UpdateEncounterDiagnosesResponse.md +17 -0
- package/docs/models/fieldagent.Encounter.md +2 -0
- package/docs/models/index.md +10 -0
- package/docs/models/patient.Encounter.md +2 -0
- package/docs/models/provider.Encounter.md +2 -0
- package/docs/operations/fieldagent.listEncounters.md +2 -0
- package/docs/operations/patient.checkEncounter.md +64 -64
- package/docs/operations/patient.checkInEncounter.md +2 -0
- package/docs/operations/patient.createEncounter.md +2 -0
- package/docs/operations/patient.getCheckinCheckin.md +2 -0
- package/docs/operations/patient.getCurrentCareSessionCareSessionsCurrent.md +2 -0
- package/docs/operations/patient.getEncounter.md +2 -0
- package/docs/operations/patient.getLatestEncounter.md +2 -0
- package/docs/operations/patient.getPatientSidebarPatientSidebar.md +2 -0
- package/docs/operations/patient.listEncounters.md +2 -0
- package/docs/operations/provider.claimEncounter.md +235 -0
- package/docs/operations/provider.getEncounter.md +12 -1
- package/docs/operations/provider.getEncounterQueue.md +148 -0
- package/docs/operations/provider.getPatientRecord.md +11 -0
- package/docs/operations/provider.listEncounters.md +24 -3
- package/docs/operations/provider.searchIcd10.md +128 -0
- package/docs/operations/provider.signEncounter.md +233 -0
- package/docs/operations/provider.updateEncounterClinicalNote.md +20 -0
- package/docs/operations/provider.updateEncounterDiagnoses.md +267 -0
- package/docs/operations/provider.updateEncounterStatus.md +20 -0
- package/package.json +1 -1
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
# Add, change or remove an encounter's diagnoses
|
|
2
|
+
|
|
3
|
+
Operation ID: `provider.updateEncounterDiagnoses`
|
|
4
|
+
|
|
5
|
+
Replaces the encounter's diagnosis list with the one sent: codes not listed are removed (kept for audit, marked entered-in-error), new ones are added, ranks and roles are updated. Codes must come from GET /icd10 (400 otherwise). Only the assigned provider may do this (403); a signed encounter answers 409. The patient is notified that the visit was updated.
|
|
6
|
+
|
|
7
|
+
## Public method
|
|
8
|
+
|
|
9
|
+
`updateEncounterDiagnoses`
|
|
10
|
+
|
|
11
|
+
Signature: `provider.updateEncounterDiagnoses(encounterId, request)`
|
|
12
|
+
|
|
13
|
+
Return type: `Promise<UpdateEncounterDiagnosesResponse>`
|
|
14
|
+
|
|
15
|
+
## Authentication
|
|
16
|
+
|
|
17
|
+
Classification: **AUTHENTICATED**
|
|
18
|
+
|
|
19
|
+
Schemes: `bearerAuth`
|
|
20
|
+
|
|
21
|
+
## Prerequisites
|
|
22
|
+
|
|
23
|
+
None documented.
|
|
24
|
+
|
|
25
|
+
## HTTP
|
|
26
|
+
|
|
27
|
+
`PUT /encounters/{encounter_id}/diagnoses`
|
|
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` | [`UpdateEncounterDiagnosesRequest`](../models/UpdateEncounterDiagnosesRequest.md) | No | | | | Yes | |
|
|
44
|
+
|
|
45
|
+
Request model: [`UpdateEncounterDiagnosesRequest`](../models/UpdateEncounterDiagnosesRequest.md)
|
|
46
|
+
|
|
47
|
+
## Request example
|
|
48
|
+
|
|
49
|
+
```json
|
|
50
|
+
{
|
|
51
|
+
"diagnoses": [
|
|
52
|
+
{
|
|
53
|
+
"display": "string",
|
|
54
|
+
"icd10_code": "string",
|
|
55
|
+
"rank": 1,
|
|
56
|
+
"use": "string"
|
|
57
|
+
}
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Success responses
|
|
63
|
+
|
|
64
|
+
| Status | Shape | Content type | Description |
|
|
65
|
+
|---|---|---|---|
|
|
66
|
+
| `200` | [`UpdateEncounterDiagnosesResponse`](../models/UpdateEncounterDiagnosesResponse.md) | application/json | Diagnoses updated |
|
|
67
|
+
|
|
68
|
+
## Success response examples
|
|
69
|
+
|
|
70
|
+
### 200
|
|
71
|
+
|
|
72
|
+
```json
|
|
73
|
+
{
|
|
74
|
+
"encounter": {
|
|
75
|
+
"appointment_id": "string",
|
|
76
|
+
"athena_appointment_id": "string",
|
|
77
|
+
"athena_encounter_id": "string",
|
|
78
|
+
"created_by": "self",
|
|
79
|
+
"created_date": "2026-01-01T09:00:00Z",
|
|
80
|
+
"diagnoses": [
|
|
81
|
+
{
|
|
82
|
+
"condition_display": "string",
|
|
83
|
+
"condition_id": "string",
|
|
84
|
+
"rank": 1,
|
|
85
|
+
"use_code": "CC"
|
|
86
|
+
}
|
|
87
|
+
],
|
|
88
|
+
"encounter_class": "AMB",
|
|
89
|
+
"encounter_id": "00000000-0000-0000-0000-000000000000",
|
|
90
|
+
"fhir_id": "string",
|
|
91
|
+
"hospitalization": {
|
|
92
|
+
"admit_source_code": "string",
|
|
93
|
+
"destination_id": "string",
|
|
94
|
+
"discharge_disposition": "home",
|
|
95
|
+
"origin_id": "string",
|
|
96
|
+
"pre_admission_id": "string",
|
|
97
|
+
"re_admission_code": "string"
|
|
98
|
+
},
|
|
99
|
+
"length_minutes": 0,
|
|
100
|
+
"locations": [
|
|
101
|
+
{
|
|
102
|
+
"location_display": "string",
|
|
103
|
+
"location_id": "string",
|
|
104
|
+
"period_end": "2026-01-01T09:00:00Z",
|
|
105
|
+
"period_start": "2026-01-01T09:00:00Z",
|
|
106
|
+
"status": "active"
|
|
107
|
+
}
|
|
108
|
+
],
|
|
109
|
+
"notes": "string",
|
|
110
|
+
"openloop_appointment_id": "string",
|
|
111
|
+
"openloop_encounter_id": "string",
|
|
112
|
+
"participants": [
|
|
113
|
+
{
|
|
114
|
+
"participant_type": "PPRF",
|
|
115
|
+
"period_end": "2026-01-01T09:00:00Z",
|
|
116
|
+
"period_start": "2026-01-01T09:00:00Z",
|
|
117
|
+
"practitioner_display": "string",
|
|
118
|
+
"practitioner_id": "string"
|
|
119
|
+
}
|
|
120
|
+
],
|
|
121
|
+
"patient": {
|
|
122
|
+
"address": {
|
|
123
|
+
"city": "string",
|
|
124
|
+
"country": "string",
|
|
125
|
+
"state": "string",
|
|
126
|
+
"street1": "string",
|
|
127
|
+
"street2": "string",
|
|
128
|
+
"zip_code": "string"
|
|
129
|
+
},
|
|
130
|
+
"date_of_birth": "string",
|
|
131
|
+
"first_name": "string",
|
|
132
|
+
"gender": "string",
|
|
133
|
+
"last_name": "string",
|
|
134
|
+
"patient_id": "string",
|
|
135
|
+
"phone": {
|
|
136
|
+
"extension": "string",
|
|
137
|
+
"number": "string",
|
|
138
|
+
"type": "string"
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
"patient_id": "string",
|
|
142
|
+
"period_end": "2026-01-01T09:00:00Z",
|
|
143
|
+
"period_start": "2026-01-01T09:00:00Z",
|
|
144
|
+
"priority_code": "string",
|
|
145
|
+
"priority_display": "string",
|
|
146
|
+
"reason_code": "string",
|
|
147
|
+
"reason_display": "string",
|
|
148
|
+
"service_provider_display": "string",
|
|
149
|
+
"service_provider_id": "string",
|
|
150
|
+
"service_type_code": "string",
|
|
151
|
+
"service_type_display": "string",
|
|
152
|
+
"signed_at": "2026-01-01T09:00:00Z",
|
|
153
|
+
"signed_by": "string",
|
|
154
|
+
"status": "planned",
|
|
155
|
+
"steadymd_consult_guid": "string",
|
|
156
|
+
"steadymd_episode_guid": "string",
|
|
157
|
+
"type_code": "string",
|
|
158
|
+
"type_display": "string"
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
## Common errors
|
|
164
|
+
|
|
165
|
+
| Status | Shape | Content type | Description |
|
|
166
|
+
|---|---|---|---|
|
|
167
|
+
| `400` | [`provider.ErrorResponse`](../models/provider.ErrorResponse.md) | application/json | |
|
|
168
|
+
| `401` | [`provider.ErrorResponse`](../models/provider.ErrorResponse.md) | application/json | Authorization required — missing or invalid Bearer JWT |
|
|
169
|
+
| `403` | [`provider.ErrorResponse`](../models/provider.ErrorResponse.md) | application/json | |
|
|
170
|
+
| `404` | [`provider.ErrorResponse`](../models/provider.ErrorResponse.md) | application/json | |
|
|
171
|
+
| `409` | [`provider.ErrorResponse`](../models/provider.ErrorResponse.md) | application/json | |
|
|
172
|
+
| `502` | [`provider.ErrorResponse`](../models/provider.ErrorResponse.md) | application/json | |
|
|
173
|
+
|
|
174
|
+
## Error examples
|
|
175
|
+
|
|
176
|
+
### 400
|
|
177
|
+
|
|
178
|
+
```json
|
|
179
|
+
{
|
|
180
|
+
"error": "string"
|
|
181
|
+
}
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
### 401
|
|
185
|
+
|
|
186
|
+
```json
|
|
187
|
+
{
|
|
188
|
+
"error": "string"
|
|
189
|
+
}
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
### 403
|
|
193
|
+
|
|
194
|
+
```json
|
|
195
|
+
{
|
|
196
|
+
"error": "string"
|
|
197
|
+
}
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
### 404
|
|
201
|
+
|
|
202
|
+
```json
|
|
203
|
+
{
|
|
204
|
+
"error": "string"
|
|
205
|
+
}
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
### 409
|
|
209
|
+
|
|
210
|
+
```json
|
|
211
|
+
{
|
|
212
|
+
"error": "string"
|
|
213
|
+
}
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
### 502
|
|
217
|
+
|
|
218
|
+
```json
|
|
219
|
+
{
|
|
220
|
+
"error": "string"
|
|
221
|
+
}
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
## NodeJS / TypeScript implementation
|
|
225
|
+
|
|
226
|
+
```ts
|
|
227
|
+
import { HCSDK } from "@healthcloudai/hc-sdk";
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
```ts
|
|
231
|
+
const encounterId = "<ENCOUNTER_ID>";
|
|
232
|
+
|
|
233
|
+
const request = {
|
|
234
|
+
"diagnoses": [
|
|
235
|
+
{
|
|
236
|
+
"display": "string",
|
|
237
|
+
"icd10_code": "string",
|
|
238
|
+
"rank": 1,
|
|
239
|
+
"use": "string"
|
|
240
|
+
}
|
|
241
|
+
]
|
|
242
|
+
};
|
|
243
|
+
|
|
244
|
+
const result = await provider.updateEncounterDiagnoses(encounterId, request);
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
## cURL
|
|
248
|
+
|
|
249
|
+
```bash
|
|
250
|
+
curl -X PUT \
|
|
251
|
+
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
|
|
252
|
+
-H 'Content-Type: application/json' \
|
|
253
|
+
-d '{"diagnoses":[{"display":"string","icd10_code":"string","rank":1,"use":"string"}]}' \
|
|
254
|
+
'https://dev-api-provider.health.cloud/encounters/%3CENCOUNTER_ID%3E/diagnoses'
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
## Notes
|
|
258
|
+
|
|
259
|
+
None.
|
|
260
|
+
|
|
261
|
+
## Prepared Test Console scenario
|
|
262
|
+
|
|
263
|
+
No canonical scenario is currently associated.
|
|
264
|
+
|
|
265
|
+
## Real response
|
|
266
|
+
|
|
267
|
+
No approved real integration response is currently published. Unapproved candidates are never rendered as examples.
|
|
@@ -143,6 +143,8 @@ Request model: [`UpdateEncounterStatusRequest`](../models/UpdateEncounterStatusR
|
|
|
143
143
|
"service_provider_id": "string",
|
|
144
144
|
"service_type_code": "string",
|
|
145
145
|
"service_type_display": "string",
|
|
146
|
+
"signed_at": "2026-01-01T09:00:00Z",
|
|
147
|
+
"signed_by": "string",
|
|
146
148
|
"status": "planned",
|
|
147
149
|
"steadymd_consult_guid": "string",
|
|
148
150
|
"steadymd_episode_guid": "string",
|
|
@@ -159,6 +161,8 @@ Request model: [`UpdateEncounterStatusRequest`](../models/UpdateEncounterStatusR
|
|
|
159
161
|
|---|---|---|---|
|
|
160
162
|
| `400` | [`provider.ErrorResponse`](../models/provider.ErrorResponse.md) | application/json | The HealthCloud status is invalid |
|
|
161
163
|
| `401` | [`provider.ErrorResponse`](../models/provider.ErrorResponse.md) | application/json | Provider Bearer authentication is required |
|
|
164
|
+
| `403` | [`provider.ErrorResponse`](../models/provider.ErrorResponse.md) | application/json | |
|
|
165
|
+
| `404` | [`provider.ErrorResponse`](../models/provider.ErrorResponse.md) | application/json | |
|
|
162
166
|
| `409` | [`provider.ErrorResponse`](../models/provider.ErrorResponse.md) | application/json | The encounter is linked but no EHR integration is configured |
|
|
163
167
|
| `502` | [`provider.ErrorResponse`](../models/provider.ErrorResponse.md) | application/json | The EHR or FHIR update failed after request validation |
|
|
164
168
|
|
|
@@ -180,6 +184,22 @@ Request model: [`UpdateEncounterStatusRequest`](../models/UpdateEncounterStatusR
|
|
|
180
184
|
}
|
|
181
185
|
```
|
|
182
186
|
|
|
187
|
+
### 403
|
|
188
|
+
|
|
189
|
+
```json
|
|
190
|
+
{
|
|
191
|
+
"error": "string"
|
|
192
|
+
}
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
### 404
|
|
196
|
+
|
|
197
|
+
```json
|
|
198
|
+
{
|
|
199
|
+
"error": "string"
|
|
200
|
+
}
|
|
201
|
+
```
|
|
202
|
+
|
|
183
203
|
### 409 — Linked EHR unavailable
|
|
184
204
|
|
|
185
205
|
```json
|
package/package.json
CHANGED