@healthcloudai/hc-sdk 3.22.0 → 3.24.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.
Files changed (36) hide show
  1. package/dist/index.cjs +77 -0
  2. package/dist/index.d.cts +1312 -4
  3. package/dist/index.d.ts +1312 -4
  4. package/dist/index.js +77 -0
  5. package/docs/clients/PatientClient.md +1 -0
  6. package/docs/clients/ProviderClient.md +7 -0
  7. package/docs/docs-manifest.json +28 -3
  8. package/docs/examples/index.md +8 -0
  9. package/docs/index.md +8 -0
  10. package/docs/models/CreateProviderPatientRequest.md +22 -0
  11. package/docs/models/EncounterClinicalState.md +31 -0
  12. package/docs/models/LabOrder.md +35 -0
  13. package/docs/models/LabOrderDiagnosis.md +18 -0
  14. package/docs/models/LabOrderErrorResponse.md +21 -0
  15. package/docs/models/LabOrderItemRequest.md +17 -0
  16. package/docs/models/LabOrderProvider.md +20 -0
  17. package/docs/models/LabOrderRequisitionResponse.md +20 -0
  18. package/docs/models/LabOrderTest.md +19 -0
  19. package/docs/models/LabOrderUnsentItem.md +19 -0
  20. package/docs/models/ListLabOrdersResponse.md +18 -0
  21. package/docs/models/PlaceLabOrderRequest.md +27 -0
  22. package/docs/models/PlaceLabOrderResponse.md +20 -0
  23. package/docs/models/ProviderEncounterStatusCounts.md +21 -0
  24. package/docs/models/ProviderHomeSummaryResponse.md +19 -0
  25. package/docs/models/ProviderPatientListResponse.md +19 -0
  26. package/docs/models/ProviderPatientResponse.md +17 -0
  27. package/docs/models/index.md +17 -0
  28. package/docs/operations/patient.getPatientEncounterClinicalState.md +170 -0
  29. package/docs/operations/provider.createPatient.md +155 -0
  30. package/docs/operations/provider.getHomeSummary.md +115 -0
  31. package/docs/operations/provider.getLabOrder.md +179 -0
  32. package/docs/operations/provider.getLabOrderRequisition.md +148 -0
  33. package/docs/operations/provider.listLabOrders.md +198 -0
  34. package/docs/operations/provider.listPatients.md +154 -0
  35. package/docs/operations/provider.placeLabOrder.md +384 -0
  36. package/package.json +1 -1
@@ -0,0 +1,179 @@
1
+ # Get one Quest lab order requisition
2
+
3
+ Operation ID: `provider.getLabOrder`
4
+
5
+ Get one Quest requisition of a patient in the authenticated provider's tenant: status, Quest placer number, tests, diagnoses, ordering provider and whether a requisition PDF is stored.
6
+
7
+ ## Public method
8
+
9
+ `getLabOrder`
10
+
11
+ Signature: `provider.getLabOrder(patientId, orderId)`
12
+
13
+ Return type: `Promise<LabOrder>`
14
+
15
+ ## Authentication
16
+
17
+ Classification: **AUTHENTICATED**
18
+
19
+ Schemes: `bearerAuth`
20
+
21
+ ## Prerequisites
22
+
23
+ None documented.
24
+
25
+ ## HTTP
26
+
27
+ `GET /patients/{patient_id}/lab-orders/{order_id}`
28
+
29
+ ## Path parameters
30
+
31
+ | Name | Type | Required | Format | Allowed values | Default | Nullable | Description |
32
+ |---|---|---:|---|---|---|---:|---|
33
+ | `patient_id` | `string` | Yes | | | | No | |
34
+ | `order_id` | `string` | Yes | | | | No | |
35
+
36
+ ## Query parameters
37
+
38
+ None.
39
+
40
+ ## Body parameters
41
+
42
+ None.
43
+
44
+ Request model: None.
45
+
46
+ ## Request example
47
+
48
+ None declared in canonical OpenAPI.
49
+
50
+ ## Success responses
51
+
52
+ | Status | Shape | Content type | Description |
53
+ |---|---|---|---|
54
+ | `200` | [`LabOrder`](../models/LabOrder.md) | application/json | The Quest requisition |
55
+
56
+ ## Success response examples
57
+
58
+ ### 200
59
+
60
+ ```json
61
+ {
62
+ "abn_required": false,
63
+ "ack_code": "AA",
64
+ "authored_at": "2026-10-28T09:15:00-04:00",
65
+ "collection_modality": "psc",
66
+ "diagnoses": [
67
+ {
68
+ "code": "R53.83",
69
+ "description": "Other fatigue"
70
+ }
71
+ ],
72
+ "expected_collection_at": "2026-10-29T08:00:00-04:00",
73
+ "fhir_status": "active",
74
+ "lab": "MET",
75
+ "order_group_id": "00000000-0000-4000-8000-000000000030",
76
+ "order_id": "00000000-0000-4000-8000-000000000040",
77
+ "ordering_provider": {
78
+ "first_name": "Alex",
79
+ "last_name": "Smith",
80
+ "npi": "1234567893",
81
+ "source": "roster"
82
+ },
83
+ "patient_id": "patient-example-001",
84
+ "placer_order_number": "HC0123456789ABCDEF01",
85
+ "quest_http_status": null,
86
+ "requester": "Practitioner/practitioner-example-001",
87
+ "requisition_available": true,
88
+ "source": "provider_app",
89
+ "status": "accepted",
90
+ "tests": [
91
+ {
92
+ "catalog_item_id": "00000000-0000-4000-8000-000000000020",
93
+ "description": "URINALYSIS, COMPLETE",
94
+ "quest_code": "5463"
95
+ }
96
+ ]
97
+ }
98
+ ```
99
+
100
+ ## Common errors
101
+
102
+ | Status | Shape | Content type | Description |
103
+ |---|---|---|---|
104
+ | `401` | [`provider.ErrorResponse`](../models/provider.ErrorResponse.md) | application/json | Provider Bearer authentication is required |
105
+ | `403` | [`LabOrderErrorResponse`](../models/LabOrderErrorResponse.md) | application/json | Only Provider-pool tokens are accepted |
106
+ | `404` | [`LabOrderErrorResponse`](../models/LabOrderErrorResponse.md) | application/json | No Quest lab order with this id exists for the patient in the caller's tenant |
107
+ | `500` | [`provider.ErrorResponse`](../models/provider.ErrorResponse.md) | application/json | Unexpected failure |
108
+
109
+ ## Error examples
110
+
111
+ ### 401 — No provider JWT
112
+
113
+ ```json
114
+ {
115
+ "error": "Provider authorization required"
116
+ }
117
+ ```
118
+
119
+ ### 403 — Other pool
120
+
121
+ ```json
122
+ {
123
+ "code": "provider_pool_required",
124
+ "error": "Provider authorization required",
125
+ "fields": []
126
+ }
127
+ ```
128
+
129
+ ### 404 — Unknown order
130
+
131
+ ```json
132
+ {
133
+ "code": "lab_order_not_found",
134
+ "error": "Lab order not found",
135
+ "fields": []
136
+ }
137
+ ```
138
+
139
+ ### 500 — Unexpected failure
140
+
141
+ ```json
142
+ {
143
+ "error": "Lab order service failed; retry the request"
144
+ }
145
+ ```
146
+
147
+ ## NodeJS / TypeScript implementation
148
+
149
+ ```ts
150
+ import { HCSDK } from "@healthcloudai/hc-sdk";
151
+ ```
152
+
153
+ ```ts
154
+ const patientId = "<PATIENT_ID>";
155
+
156
+ const orderId = "<ORDER_ID>";
157
+
158
+ const result = await provider.getLabOrder(patientId, orderId);
159
+ ```
160
+
161
+ ## cURL
162
+
163
+ ```bash
164
+ curl -X GET \
165
+ -H 'Authorization: Bearer <ACCESS_TOKEN>' \
166
+ 'https://dev-api-provider.health.cloud/patients/%3CPATIENT_ID%3E/lab-orders/%3CORDER_ID%3E'
167
+ ```
168
+
169
+ ## Notes
170
+
171
+ None.
172
+
173
+ ## Prepared Test Console scenario
174
+
175
+ No canonical scenario is currently associated.
176
+
177
+ ## Real response
178
+
179
+ No approved real integration response is currently published. Unapproved candidates are never rendered as examples.
@@ -0,0 +1,148 @@
1
+ # Get the Quest requisition PDF of a lab order
2
+
3
+ Operation ID: `provider.getLabOrderRequisition`
4
+
5
+ Get the Quest requisition PDF (Base64) that was stored when Quest accepted the order. The patient brings it, or its Lab Reference Number, to the Patient Service Center.
6
+
7
+ ## Public method
8
+
9
+ `getLabOrderRequisition`
10
+
11
+ Signature: `provider.getLabOrderRequisition(patientId, orderId)`
12
+
13
+ Return type: `Promise<LabOrderRequisitionResponse>`
14
+
15
+ ## Authentication
16
+
17
+ Classification: **AUTHENTICATED**
18
+
19
+ Schemes: `bearerAuth`
20
+
21
+ ## Prerequisites
22
+
23
+ None documented.
24
+
25
+ ## HTTP
26
+
27
+ `GET /patients/{patient_id}/lab-orders/{order_id}/requisition`
28
+
29
+ ## Path parameters
30
+
31
+ | Name | Type | Required | Format | Allowed values | Default | Nullable | Description |
32
+ |---|---|---:|---|---|---|---:|---|
33
+ | `patient_id` | `string` | Yes | | | | No | |
34
+ | `order_id` | `string` | Yes | | | | No | |
35
+
36
+ ## Query parameters
37
+
38
+ None.
39
+
40
+ ## Body parameters
41
+
42
+ None.
43
+
44
+ Request model: None.
45
+
46
+ ## Request example
47
+
48
+ None declared in canonical OpenAPI.
49
+
50
+ ## Success responses
51
+
52
+ | Status | Shape | Content type | Description |
53
+ |---|---|---|---|
54
+ | `200` | [`LabOrderRequisitionResponse`](../models/LabOrderRequisitionResponse.md) | application/json | Requisition PDF stored when Quest accepted the order |
55
+
56
+ ## Success response examples
57
+
58
+ ### 200
59
+
60
+ ```json
61
+ {
62
+ "content_type": "application/pdf",
63
+ "data_b64": "JVBERi0xLjQK",
64
+ "document_id": "00000000-0000-4000-8000-000000000050",
65
+ "order_id": "00000000-0000-4000-8000-000000000040"
66
+ }
67
+ ```
68
+
69
+ ## Common errors
70
+
71
+ | Status | Shape | Content type | Description |
72
+ |---|---|---|---|
73
+ | `401` | [`provider.ErrorResponse`](../models/provider.ErrorResponse.md) | application/json | Provider Bearer authentication is required |
74
+ | `403` | [`LabOrderErrorResponse`](../models/LabOrderErrorResponse.md) | application/json | Only Provider-pool tokens are accepted |
75
+ | `404` | [`LabOrderErrorResponse`](../models/LabOrderErrorResponse.md) | application/json | Unknown order, or no requisition stored (not accepted yet, or Quest sent none) |
76
+ | `500` | [`provider.ErrorResponse`](../models/provider.ErrorResponse.md) | application/json | Unexpected failure |
77
+
78
+ ## Error examples
79
+
80
+ ### 401 — No provider JWT
81
+
82
+ ```json
83
+ {
84
+ "error": "Provider authorization required"
85
+ }
86
+ ```
87
+
88
+ ### 403 — Other pool
89
+
90
+ ```json
91
+ {
92
+ "code": "provider_pool_required",
93
+ "error": "Provider authorization required",
94
+ "fields": []
95
+ }
96
+ ```
97
+
98
+ ### 404 — No requisition
99
+
100
+ ```json
101
+ {
102
+ "code": "requisition_not_found",
103
+ "error": "No requisition is available for this lab order",
104
+ "fields": []
105
+ }
106
+ ```
107
+
108
+ ### 500 — Unexpected failure
109
+
110
+ ```json
111
+ {
112
+ "error": "Lab order service failed; retry the request"
113
+ }
114
+ ```
115
+
116
+ ## NodeJS / TypeScript implementation
117
+
118
+ ```ts
119
+ import { HCSDK } from "@healthcloudai/hc-sdk";
120
+ ```
121
+
122
+ ```ts
123
+ const patientId = "<PATIENT_ID>";
124
+
125
+ const orderId = "<ORDER_ID>";
126
+
127
+ const result = await provider.getLabOrderRequisition(patientId, orderId);
128
+ ```
129
+
130
+ ## cURL
131
+
132
+ ```bash
133
+ curl -X GET \
134
+ -H 'Authorization: Bearer <ACCESS_TOKEN>' \
135
+ 'https://dev-api-provider.health.cloud/patients/%3CPATIENT_ID%3E/lab-orders/%3CORDER_ID%3E/requisition'
136
+ ```
137
+
138
+ ## Notes
139
+
140
+ None.
141
+
142
+ ## Prepared Test Console scenario
143
+
144
+ No canonical scenario is currently associated.
145
+
146
+ ## Real response
147
+
148
+ No approved real integration response is currently published. Unapproved candidates are never rendered as examples.
@@ -0,0 +1,198 @@
1
+ # List a tenant patient's Quest lab orders
2
+
3
+ Operation ID: `provider.listLabOrders`
4
+
5
+ List a patient's Quest lab orders in the authenticated provider's tenant, one entry per requisition, newest first. status filters to submitting, accepted or rejected.
6
+
7
+ ## Public method
8
+
9
+ `listLabOrders`
10
+
11
+ Signature: `provider.listLabOrders(patientId, filters)`
12
+
13
+ Return type: `Promise<ListLabOrdersResponse>`
14
+
15
+ ## Authentication
16
+
17
+ Classification: **AUTHENTICATED**
18
+
19
+ Schemes: `bearerAuth`
20
+
21
+ ## Prerequisites
22
+
23
+ None documented.
24
+
25
+ ## HTTP
26
+
27
+ `GET /patients/{patient_id}/lab-orders`
28
+
29
+ ## Path parameters
30
+
31
+ | Name | Type | Required | Format | Allowed values | Default | Nullable | Description |
32
+ |---|---|---:|---|---|---|---:|---|
33
+ | `patient_id` | `string` | Yes | | | | No | |
34
+
35
+ ## Query parameters
36
+
37
+ | Name | Type | Required | Format | Allowed values | Default | Nullable | Description |
38
+ |---|---|---:|---|---|---|---:|---|
39
+ | `status` | `string|null` | No | | | | Yes | submitting, accepted or rejected |
40
+
41
+ ## Body parameters
42
+
43
+ None.
44
+
45
+ Request model: None.
46
+
47
+ ## Request example
48
+
49
+ None declared in canonical OpenAPI.
50
+
51
+ ## Success responses
52
+
53
+ | Status | Shape | Content type | Description |
54
+ |---|---|---|---|
55
+ | `200` | [`ListLabOrdersResponse`](../models/ListLabOrdersResponse.md) | application/json | The patient's Quest requisitions, newest first |
56
+
57
+ ## Success response examples
58
+
59
+ ### 200
60
+
61
+ ```json
62
+ {
63
+ "orders": [
64
+ {
65
+ "abn_required": false,
66
+ "ack_code": "AA",
67
+ "authored_at": "2026-10-28T09:15:00-04:00",
68
+ "collection_modality": "psc",
69
+ "diagnoses": [
70
+ {
71
+ "code": "R53.83",
72
+ "description": "Other fatigue"
73
+ }
74
+ ],
75
+ "expected_collection_at": "2026-10-29T08:00:00-04:00",
76
+ "fhir_status": "active",
77
+ "lab": "MET",
78
+ "order_group_id": "00000000-0000-4000-8000-000000000030",
79
+ "order_id": "00000000-0000-4000-8000-000000000040",
80
+ "ordering_provider": {
81
+ "first_name": "Alex",
82
+ "last_name": "Smith",
83
+ "npi": "1234567893",
84
+ "source": "roster"
85
+ },
86
+ "patient_id": "patient-example-001",
87
+ "placer_order_number": "HC0123456789ABCDEF01",
88
+ "quest_http_status": null,
89
+ "requester": "Practitioner/practitioner-example-001",
90
+ "requisition_available": true,
91
+ "source": "provider_app",
92
+ "status": "accepted",
93
+ "tests": [
94
+ {
95
+ "catalog_item_id": "00000000-0000-4000-8000-000000000020",
96
+ "description": "URINALYSIS, COMPLETE",
97
+ "quest_code": "5463"
98
+ }
99
+ ]
100
+ }
101
+ ],
102
+ "total": 1
103
+ }
104
+ ```
105
+
106
+ ## Common errors
107
+
108
+ | Status | Shape | Content type | Description |
109
+ |---|---|---|---|
110
+ | `400` | [`LabOrderErrorResponse`](../models/LabOrderErrorResponse.md) | application/json | status is not submitting, accepted or rejected |
111
+ | `401` | [`provider.ErrorResponse`](../models/provider.ErrorResponse.md) | application/json | Provider Bearer authentication is required |
112
+ | `403` | [`LabOrderErrorResponse`](../models/LabOrderErrorResponse.md) | application/json | Only Provider-pool tokens are accepted |
113
+ | `404` | [`LabOrderErrorResponse`](../models/LabOrderErrorResponse.md) | application/json | No patient exists for the id in the caller's tenant |
114
+ | `500` | [`provider.ErrorResponse`](../models/provider.ErrorResponse.md) | application/json | Unexpected failure |
115
+
116
+ ## Error examples
117
+
118
+ ### 400 — Unknown status
119
+
120
+ ```json
121
+ {
122
+ "code": "invalid_request",
123
+ "error": "status must be one of: submitting, accepted, rejected",
124
+ "fields": [
125
+ "status"
126
+ ]
127
+ }
128
+ ```
129
+
130
+ ### 401 — No provider JWT
131
+
132
+ ```json
133
+ {
134
+ "error": "Provider authorization required"
135
+ }
136
+ ```
137
+
138
+ ### 403 — Other pool
139
+
140
+ ```json
141
+ {
142
+ "code": "provider_pool_required",
143
+ "error": "Provider authorization required",
144
+ "fields": []
145
+ }
146
+ ```
147
+
148
+ ### 404 — Unknown patient
149
+
150
+ ```json
151
+ {
152
+ "code": "patient_not_found",
153
+ "error": "Patient not found in this tenant",
154
+ "fields": []
155
+ }
156
+ ```
157
+
158
+ ### 500 — Unexpected failure
159
+
160
+ ```json
161
+ {
162
+ "error": "Lab order service failed; retry the request"
163
+ }
164
+ ```
165
+
166
+ ## NodeJS / TypeScript implementation
167
+
168
+ ```ts
169
+ import { HCSDK } from "@healthcloudai/hc-sdk";
170
+ ```
171
+
172
+ ```ts
173
+ const patientId = "<PATIENT_ID>";
174
+
175
+ const filters = "<FILTERS>";
176
+
177
+ const result = await provider.listLabOrders(patientId, filters);
178
+ ```
179
+
180
+ ## cURL
181
+
182
+ ```bash
183
+ curl -X GET \
184
+ -H 'Authorization: Bearer <ACCESS_TOKEN>' \
185
+ 'https://dev-api-provider.health.cloud/patients/%3CPATIENT_ID%3E/lab-orders?status=%3CSTATUS%3E'
186
+ ```
187
+
188
+ ## Notes
189
+
190
+ None.
191
+
192
+ ## Prepared Test Console scenario
193
+
194
+ No canonical scenario is currently associated.
195
+
196
+ ## Real response
197
+
198
+ No approved real integration response is currently published. Unapproved candidates are never rendered as examples.
@@ -0,0 +1,154 @@
1
+ # List or search the calling practitioner's patients
2
+
3
+ Operation ID: `provider.listPatients`
4
+
5
+ One page of the patients on the calling practitioner's care team (Patient.generalPractitioner), never the whole tenant. `q` matches the start of a given or family name.
6
+
7
+ ## Public method
8
+
9
+ `listPatients`
10
+
11
+ Signature: `provider.listPatients(filters)`
12
+
13
+ Return type: `Promise<ProviderPatientListResponse>`
14
+
15
+ ## Authentication
16
+
17
+ Classification: **AUTHENTICATED**
18
+
19
+ Schemes: `bearerAuth`
20
+
21
+ ## Prerequisites
22
+
23
+ None documented.
24
+
25
+ ## HTTP
26
+
27
+ `GET /patients`
28
+
29
+ ## Path parameters
30
+
31
+ None.
32
+
33
+ ## Query parameters
34
+
35
+ | Name | Type | Required | Format | Allowed values | Default | Nullable | Description |
36
+ |---|---|---:|---|---|---|---:|---|
37
+ | `q` | `string|null` | No | | | | Yes | Match the start of a given or family name |
38
+ | `page_size` | `integer|null` | No | | | | Yes | Patients per page, 1-100 (default 20) |
39
+ | `page_token` | `string|null` | No | | | | Yes | `next_page_token` from the previous page |
40
+
41
+ ## Body parameters
42
+
43
+ None.
44
+
45
+ Request model: None.
46
+
47
+ ## Request example
48
+
49
+ None declared in canonical OpenAPI.
50
+
51
+ ## Success responses
52
+
53
+ | Status | Shape | Content type | Description |
54
+ |---|---|---|---|
55
+ | `200` | [`ProviderPatientListResponse`](../models/ProviderPatientListResponse.md) | application/json | One page of patient summaries |
56
+
57
+ ## Success response examples
58
+
59
+ ### 200
60
+
61
+ ```json
62
+ {
63
+ "next_page_token": "string",
64
+ "patients": [
65
+ {
66
+ "address": {
67
+ "city": "string",
68
+ "country": "string",
69
+ "state": "string",
70
+ "street1": "string",
71
+ "street2": "string",
72
+ "zip_code": "string"
73
+ },
74
+ "date_of_birth": "string",
75
+ "first_name": "string",
76
+ "gender": "string",
77
+ "last_name": "string",
78
+ "patient_id": "string",
79
+ "phone": {
80
+ "extension": "string",
81
+ "number": "string",
82
+ "type": "string"
83
+ }
84
+ }
85
+ ],
86
+ "total": 0
87
+ }
88
+ ```
89
+
90
+ ## Common errors
91
+
92
+ | Status | Shape | Content type | Description |
93
+ |---|---|---|---|
94
+ | `400` | [`provider.ErrorResponse`](../models/provider.ErrorResponse.md) | application/json | Invalid page_size |
95
+ | `401` | [`provider.ErrorResponse`](../models/provider.ErrorResponse.md) | application/json | Provider authorization required |
96
+ | `403` | [`provider.ErrorResponse`](../models/provider.ErrorResponse.md) | application/json | The account has no practitioner record |
97
+
98
+ ## Error examples
99
+
100
+ ### 400
101
+
102
+ ```json
103
+ {
104
+ "error": "string"
105
+ }
106
+ ```
107
+
108
+ ### 401
109
+
110
+ ```json
111
+ {
112
+ "error": "string"
113
+ }
114
+ ```
115
+
116
+ ### 403
117
+
118
+ ```json
119
+ {
120
+ "error": "string"
121
+ }
122
+ ```
123
+
124
+ ## NodeJS / TypeScript implementation
125
+
126
+ ```ts
127
+ import { HCSDK } from "@healthcloudai/hc-sdk";
128
+ ```
129
+
130
+ ```ts
131
+ const filters = "<FILTERS>";
132
+
133
+ const result = await provider.listPatients(filters);
134
+ ```
135
+
136
+ ## cURL
137
+
138
+ ```bash
139
+ curl -X GET \
140
+ -H 'Authorization: Bearer <ACCESS_TOKEN>' \
141
+ 'https://dev-api-provider.health.cloud/patients?q=%3CQ%3E&page_size=%3CPAGE_SIZE%3E&page_token=%3CPAGE_TOKEN%3E'
142
+ ```
143
+
144
+ ## Notes
145
+
146
+ None.
147
+
148
+ ## Prepared Test Console scenario
149
+
150
+ No canonical scenario is currently associated.
151
+
152
+ ## Real response
153
+
154
+ No approved real integration response is currently published. Unapproved candidates are never rendered as examples.