@healthcloudai/hc-sdk 3.13.4 → 3.14.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 +432 -0
- package/dist/index.d.cts +1875 -1007
- package/dist/index.d.ts +1875 -1007
- package/dist/index.js +432 -0
- package/docs/clients/PatientClient.md +8 -0
- package/docs/docs-manifest.json +28 -3
- package/docs/examples/index.md +8 -0
- package/docs/index.md +8 -0
- package/docs/models/CancelTestOrderResponse.md +19 -0
- package/docs/models/CreateDeliveryOrderRequest.md +21 -0
- package/docs/models/DeliveryContact.md +24 -0
- package/docs/models/DeliveryOrder.md +30 -0
- package/docs/models/DeliveryPharmacy.md +25 -0
- package/docs/models/GetPatientResponse.md +1 -0
- package/docs/models/GetTestOrderResponse.md +44 -0
- package/docs/models/ListDeliveryOrdersResponse.md +19 -0
- package/docs/models/ListOrderItemsResponse.md +18 -0
- package/docs/models/ListTestOrdersResponse.md +18 -0
- package/docs/models/OrderItem.md +19 -0
- package/docs/models/OrderPriority.md +15 -0
- package/docs/models/OrderStatus.md +15 -0
- package/docs/models/PatientDemographics.md +1 -0
- package/docs/models/PlaceTestOrderRequest.md +43 -0
- package/docs/models/PlaceTestOrderResponse.md +44 -0
- package/docs/models/Specimen.md +30 -0
- package/docs/models/SpecimenStatus.md +15 -0
- package/docs/models/TestOrder.md +44 -0
- package/docs/models/index.md +17 -0
- package/docs/operations/connectors.athenaGetInsurancePackages.md +1 -1
- package/docs/operations/fieldagent.listPatients.md +1 -0
- package/docs/operations/patient.addPatientIntake.md +12 -1
- package/docs/operations/patient.cancelTestOrder.md +152 -0
- package/docs/operations/patient.createDeliveryOrder.md +171 -0
- package/docs/operations/patient.getDeliveryOrder.md +156 -0
- package/docs/operations/patient.getPatient.md +1 -0
- package/docs/operations/patient.getPatientSidebarPatientSidebar.md +1 -0
- package/docs/operations/patient.getTestOrder.md +194 -0
- package/docs/operations/patient.listDeliveryOrders.md +156 -0
- package/docs/operations/patient.listOrderItems.md +129 -0
- package/docs/operations/patient.listTestOrders.md +201 -0
- package/docs/operations/patient.placeTestOrder.md +309 -0
- package/docs/operations/patient.submitPatientIntake.md +4 -2
- package/package.json +1 -1
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
# Place a diagnostic test order
|
|
2
|
+
|
|
3
|
+
Operation ID: `patient.placeTestOrder`
|
|
4
|
+
|
|
5
|
+
Place a diagnostic test order
|
|
6
|
+
|
|
7
|
+
## Public method
|
|
8
|
+
|
|
9
|
+
`placeTestOrder`
|
|
10
|
+
|
|
11
|
+
Signature: `patient.placeTestOrder(request)`
|
|
12
|
+
|
|
13
|
+
Return type: `Promise<PlaceTestOrderResponse>`
|
|
14
|
+
|
|
15
|
+
## Authentication
|
|
16
|
+
|
|
17
|
+
Classification: **AUTHENTICATED**
|
|
18
|
+
|
|
19
|
+
Schemes: `bearerAuth`
|
|
20
|
+
|
|
21
|
+
## Prerequisites
|
|
22
|
+
|
|
23
|
+
None documented.
|
|
24
|
+
|
|
25
|
+
## HTTP
|
|
26
|
+
|
|
27
|
+
`POST /patients/orders`
|
|
28
|
+
|
|
29
|
+
## Path parameters
|
|
30
|
+
|
|
31
|
+
None.
|
|
32
|
+
|
|
33
|
+
## Query parameters
|
|
34
|
+
|
|
35
|
+
None.
|
|
36
|
+
|
|
37
|
+
## Body parameters
|
|
38
|
+
|
|
39
|
+
| Name | Type | Required | Format | Allowed values | Default | Nullable | Description |
|
|
40
|
+
|---|---|---:|---|---|---|---:|---|
|
|
41
|
+
| `body` | [`PlaceTestOrderRequest`](../models/PlaceTestOrderRequest.md) | Yes | | | | No | |
|
|
42
|
+
|
|
43
|
+
Request model: [`PlaceTestOrderRequest`](../models/PlaceTestOrderRequest.md)
|
|
44
|
+
|
|
45
|
+
## Request example
|
|
46
|
+
|
|
47
|
+
```json
|
|
48
|
+
{
|
|
49
|
+
"cpt_code": "string",
|
|
50
|
+
"diagnosis_codes": [
|
|
51
|
+
"string"
|
|
52
|
+
],
|
|
53
|
+
"display": "string",
|
|
54
|
+
"encounter_id": "string",
|
|
55
|
+
"fasting_required": false,
|
|
56
|
+
"idempotency_key": "00000000-0000-0000-0000-000000000000",
|
|
57
|
+
"lab_name": "string",
|
|
58
|
+
"loinc_code": "string",
|
|
59
|
+
"notes": "string",
|
|
60
|
+
"occurrence_date": "2026-01-01",
|
|
61
|
+
"occurrence_datetime": "2026-01-01T09:00:00Z",
|
|
62
|
+
"performer_name": "string",
|
|
63
|
+
"priority": "routine",
|
|
64
|
+
"reason": "string",
|
|
65
|
+
"requester_name": "string",
|
|
66
|
+
"requester_npi": "string",
|
|
67
|
+
"requisition_number": "string",
|
|
68
|
+
"snomed_code": "string",
|
|
69
|
+
"standing_order": false,
|
|
70
|
+
"test_name": "string"
|
|
71
|
+
}
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## Success responses
|
|
75
|
+
|
|
76
|
+
| Status | Shape | Content type | Description |
|
|
77
|
+
|---|---|---|---|
|
|
78
|
+
| `200` | [`PlaceTestOrderResponse`](../models/PlaceTestOrderResponse.md) | application/json | Existing order returned for the same idempotency key |
|
|
79
|
+
| `201` | [`PlaceTestOrderResponse`](../models/PlaceTestOrderResponse.md) | application/json | Test order placed |
|
|
80
|
+
|
|
81
|
+
## Success response examples
|
|
82
|
+
|
|
83
|
+
### 200
|
|
84
|
+
|
|
85
|
+
```json
|
|
86
|
+
{
|
|
87
|
+
"athena_encounter_id": "string",
|
|
88
|
+
"athena_order_id": "string",
|
|
89
|
+
"athena_order_status": "string",
|
|
90
|
+
"authored_on": "2026-01-01",
|
|
91
|
+
"cpt_code": "string",
|
|
92
|
+
"diagnosis_codes": [
|
|
93
|
+
"string"
|
|
94
|
+
],
|
|
95
|
+
"display": "string",
|
|
96
|
+
"encounter_id": "string",
|
|
97
|
+
"fasting_required": false,
|
|
98
|
+
"fhir_id": "string",
|
|
99
|
+
"intent": "order",
|
|
100
|
+
"lab_name": "string",
|
|
101
|
+
"loinc_code": "string",
|
|
102
|
+
"notes": "string",
|
|
103
|
+
"occurrence_date": "2026-01-01",
|
|
104
|
+
"occurrence_datetime": "2026-01-01T09:00:00Z",
|
|
105
|
+
"order_id": "string",
|
|
106
|
+
"patient_fhir_id": "string",
|
|
107
|
+
"performer_name": "string",
|
|
108
|
+
"priority": "routine",
|
|
109
|
+
"reason": "string",
|
|
110
|
+
"requester_name": "string",
|
|
111
|
+
"requester_npi": "string",
|
|
112
|
+
"requisition_number": "string",
|
|
113
|
+
"snomed_code": "string",
|
|
114
|
+
"specimen": {
|
|
115
|
+
"accession_number": "string",
|
|
116
|
+
"body_site": "string",
|
|
117
|
+
"collected_by": "string",
|
|
118
|
+
"collection_date": "2026-01-01",
|
|
119
|
+
"collection_datetime": "2026-01-01T09:00:00Z",
|
|
120
|
+
"condition": "string",
|
|
121
|
+
"container": "string",
|
|
122
|
+
"fhir_id": "string",
|
|
123
|
+
"notes": "string",
|
|
124
|
+
"received_datetime": "2026-01-01T09:00:00Z",
|
|
125
|
+
"specimen_id": "00000000-0000-0000-0000-000000000000",
|
|
126
|
+
"status": "available",
|
|
127
|
+
"type": "blood",
|
|
128
|
+
"volume_ml": 1
|
|
129
|
+
},
|
|
130
|
+
"standing_order": false,
|
|
131
|
+
"status": "active"
|
|
132
|
+
}
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### 201
|
|
136
|
+
|
|
137
|
+
```json
|
|
138
|
+
{
|
|
139
|
+
"athena_encounter_id": "string",
|
|
140
|
+
"athena_order_id": "string",
|
|
141
|
+
"athena_order_status": "string",
|
|
142
|
+
"authored_on": "2026-01-01",
|
|
143
|
+
"cpt_code": "string",
|
|
144
|
+
"diagnosis_codes": [
|
|
145
|
+
"string"
|
|
146
|
+
],
|
|
147
|
+
"display": "string",
|
|
148
|
+
"encounter_id": "string",
|
|
149
|
+
"fasting_required": false,
|
|
150
|
+
"fhir_id": "string",
|
|
151
|
+
"intent": "order",
|
|
152
|
+
"lab_name": "string",
|
|
153
|
+
"loinc_code": "string",
|
|
154
|
+
"notes": "string",
|
|
155
|
+
"occurrence_date": "2026-01-01",
|
|
156
|
+
"occurrence_datetime": "2026-01-01T09:00:00Z",
|
|
157
|
+
"order_id": "string",
|
|
158
|
+
"patient_fhir_id": "string",
|
|
159
|
+
"performer_name": "string",
|
|
160
|
+
"priority": "routine",
|
|
161
|
+
"reason": "string",
|
|
162
|
+
"requester_name": "string",
|
|
163
|
+
"requester_npi": "string",
|
|
164
|
+
"requisition_number": "string",
|
|
165
|
+
"snomed_code": "string",
|
|
166
|
+
"specimen": {
|
|
167
|
+
"accession_number": "string",
|
|
168
|
+
"body_site": "string",
|
|
169
|
+
"collected_by": "string",
|
|
170
|
+
"collection_date": "2026-01-01",
|
|
171
|
+
"collection_datetime": "2026-01-01T09:00:00Z",
|
|
172
|
+
"condition": "string",
|
|
173
|
+
"container": "string",
|
|
174
|
+
"fhir_id": "string",
|
|
175
|
+
"notes": "string",
|
|
176
|
+
"received_datetime": "2026-01-01T09:00:00Z",
|
|
177
|
+
"specimen_id": "00000000-0000-0000-0000-000000000000",
|
|
178
|
+
"status": "available",
|
|
179
|
+
"type": "blood",
|
|
180
|
+
"volume_ml": 1
|
|
181
|
+
},
|
|
182
|
+
"standing_order": false,
|
|
183
|
+
"status": "active"
|
|
184
|
+
}
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
## Common errors
|
|
188
|
+
|
|
189
|
+
| Status | Shape | Content type | Description |
|
|
190
|
+
|---|---|---|---|
|
|
191
|
+
| `400` | [`patient.ErrorResponse`](../models/patient.ErrorResponse.md) | application/json | |
|
|
192
|
+
| `401` | [`patient.ErrorResponse`](../models/patient.ErrorResponse.md) | application/json | Authorization required — missing or invalid Bearer JWT |
|
|
193
|
+
| `404` | [`patient.ErrorResponse`](../models/patient.ErrorResponse.md) | application/json | |
|
|
194
|
+
| `409` | [`patient.ErrorResponse`](../models/patient.ErrorResponse.md) | application/json | |
|
|
195
|
+
| `502` | [`patient.ErrorResponse`](../models/patient.ErrorResponse.md) | application/json | |
|
|
196
|
+
|
|
197
|
+
## Error examples
|
|
198
|
+
|
|
199
|
+
### 400
|
|
200
|
+
|
|
201
|
+
```json
|
|
202
|
+
{
|
|
203
|
+
"details": [
|
|
204
|
+
{}
|
|
205
|
+
],
|
|
206
|
+
"error": "string"
|
|
207
|
+
}
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
### 401
|
|
211
|
+
|
|
212
|
+
```json
|
|
213
|
+
{
|
|
214
|
+
"details": [
|
|
215
|
+
{}
|
|
216
|
+
],
|
|
217
|
+
"error": "string"
|
|
218
|
+
}
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
### 404
|
|
222
|
+
|
|
223
|
+
```json
|
|
224
|
+
{
|
|
225
|
+
"details": [
|
|
226
|
+
{}
|
|
227
|
+
],
|
|
228
|
+
"error": "string"
|
|
229
|
+
}
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
### 409
|
|
233
|
+
|
|
234
|
+
```json
|
|
235
|
+
{
|
|
236
|
+
"details": [
|
|
237
|
+
{}
|
|
238
|
+
],
|
|
239
|
+
"error": "string"
|
|
240
|
+
}
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
### 502
|
|
244
|
+
|
|
245
|
+
```json
|
|
246
|
+
{
|
|
247
|
+
"details": [
|
|
248
|
+
{}
|
|
249
|
+
],
|
|
250
|
+
"error": "string"
|
|
251
|
+
}
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
## NodeJS / TypeScript implementation
|
|
255
|
+
|
|
256
|
+
```ts
|
|
257
|
+
import { HCSDK } from "@healthcloudai/hc-sdk";
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
```ts
|
|
261
|
+
const request = {
|
|
262
|
+
"cpt_code": "string",
|
|
263
|
+
"diagnosis_codes": [
|
|
264
|
+
"string"
|
|
265
|
+
],
|
|
266
|
+
"display": "string",
|
|
267
|
+
"encounter_id": "string",
|
|
268
|
+
"fasting_required": false,
|
|
269
|
+
"idempotency_key": "00000000-0000-0000-0000-000000000000",
|
|
270
|
+
"lab_name": "string",
|
|
271
|
+
"loinc_code": "string",
|
|
272
|
+
"notes": "string",
|
|
273
|
+
"occurrence_date": "2026-01-01",
|
|
274
|
+
"occurrence_datetime": "2026-01-01T09:00:00Z",
|
|
275
|
+
"performer_name": "string",
|
|
276
|
+
"priority": "routine",
|
|
277
|
+
"reason": "string",
|
|
278
|
+
"requester_name": "string",
|
|
279
|
+
"requester_npi": "string",
|
|
280
|
+
"requisition_number": "string",
|
|
281
|
+
"snomed_code": "string",
|
|
282
|
+
"standing_order": false,
|
|
283
|
+
"test_name": "string"
|
|
284
|
+
};
|
|
285
|
+
|
|
286
|
+
const result = await patient.placeTestOrder(request);
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
## cURL
|
|
290
|
+
|
|
291
|
+
```bash
|
|
292
|
+
curl -X POST \
|
|
293
|
+
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
|
|
294
|
+
-H 'Content-Type: application/json' \
|
|
295
|
+
-d '{"cpt_code":"string","diagnosis_codes":["string"],"display":"string","encounter_id":"string","fasting_required":false,"idempotency_key":"00000000-0000-0000-0000-000000000000","lab_name":"string","loinc_code":"string","notes":"string","occurrence_date":"2026-01-01","occurrence_datetime":"2026-01-01T09:00:00Z","performer_name":"string","priority":"routine","reason":"string","requester_name":"string","requester_npi":"string","requisition_number":"string","snomed_code":"string","standing_order":false,"test_name":"string"}' \
|
|
296
|
+
'https://dev-api-patient.health.cloud/patients/orders'
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
## Notes
|
|
300
|
+
|
|
301
|
+
None.
|
|
302
|
+
|
|
303
|
+
## Prepared Test Console scenario
|
|
304
|
+
|
|
305
|
+
No canonical scenario is currently associated.
|
|
306
|
+
|
|
307
|
+
## Real response
|
|
308
|
+
|
|
309
|
+
No approved real integration response is currently published. Unapproved candidates are never rendered as examples.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Operation ID: `patient.submitPatientIntake`
|
|
4
4
|
|
|
5
|
-
Additive intake for the authenticated patient. Each POST creates a new submission; repeated requests can create duplicate records. The server assigns all identifiers. Vendor status is separate from FHIR storage success.
|
|
5
|
+
Additive intake for the authenticated patient, linked to the patient's existing current open FHIR encounter. Returns 409 before writes when no valid open encounter exists. Each POST creates a new submission; repeated requests can create duplicate records. The server assigns all identifiers. Vendor status is separate from FHIR storage success.
|
|
6
6
|
|
|
7
7
|
## Public method
|
|
8
8
|
|
|
@@ -354,7 +354,9 @@ Request model: [`PatientIntakeRequest`](../models/PatientIntakeRequest.md)
|
|
|
354
354
|
|
|
355
355
|
## Common errors
|
|
356
356
|
|
|
357
|
-
|
|
357
|
+
| Status | Shape | Content type | Description |
|
|
358
|
+
|---|---|---|---|
|
|
359
|
+
| `409` | `unknown` | application/json | An existing open encounter belonging to the patient is required |
|
|
358
360
|
|
|
359
361
|
## Error examples
|
|
360
362
|
|
package/package.json
CHANGED