@healthcloudai/hc-sdk 3.23.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 (33) hide show
  1. package/dist/index.cjs +31 -0
  2. package/dist/index.d.cts +1101 -2
  3. package/dist/index.d.ts +1101 -2
  4. package/dist/index.js +31 -0
  5. package/docs/clients/ProviderClient.md +7 -0
  6. package/docs/docs-manifest.json +26 -3
  7. package/docs/examples/index.md +7 -0
  8. package/docs/index.md +7 -0
  9. package/docs/models/CreateProviderPatientRequest.md +22 -0
  10. package/docs/models/LabOrder.md +35 -0
  11. package/docs/models/LabOrderDiagnosis.md +18 -0
  12. package/docs/models/LabOrderErrorResponse.md +21 -0
  13. package/docs/models/LabOrderItemRequest.md +17 -0
  14. package/docs/models/LabOrderProvider.md +20 -0
  15. package/docs/models/LabOrderRequisitionResponse.md +20 -0
  16. package/docs/models/LabOrderTest.md +19 -0
  17. package/docs/models/LabOrderUnsentItem.md +19 -0
  18. package/docs/models/ListLabOrdersResponse.md +18 -0
  19. package/docs/models/PlaceLabOrderRequest.md +27 -0
  20. package/docs/models/PlaceLabOrderResponse.md +20 -0
  21. package/docs/models/ProviderEncounterStatusCounts.md +21 -0
  22. package/docs/models/ProviderHomeSummaryResponse.md +19 -0
  23. package/docs/models/ProviderPatientListResponse.md +19 -0
  24. package/docs/models/ProviderPatientResponse.md +17 -0
  25. package/docs/models/index.md +16 -0
  26. package/docs/operations/provider.createPatient.md +155 -0
  27. package/docs/operations/provider.getHomeSummary.md +115 -0
  28. package/docs/operations/provider.getLabOrder.md +179 -0
  29. package/docs/operations/provider.getLabOrderRequisition.md +148 -0
  30. package/docs/operations/provider.listLabOrders.md +198 -0
  31. package/docs/operations/provider.listPatients.md +154 -0
  32. package/docs/operations/provider.placeLabOrder.md +384 -0
  33. package/package.json +1 -1
@@ -0,0 +1,155 @@
1
+ # Create a patient on the calling practitioner's care team
2
+
3
+ Operation ID: `provider.createPatient`
4
+
5
+ Creates a FHIR Patient in the provider's own tenant, assigned to the calling practitioner, and returns its demographic summary.
6
+
7
+ ## Public method
8
+
9
+ `createPatient`
10
+
11
+ Signature: `provider.createPatient(request)`
12
+
13
+ Return type: `Promise<ProviderPatientResponse>`
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`
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` | [`CreateProviderPatientRequest`](../models/CreateProviderPatientRequest.md) | No | | | | Yes | |
42
+
43
+ Request model: [`CreateProviderPatientRequest`](../models/CreateProviderPatientRequest.md)
44
+
45
+ ## Request example
46
+
47
+ ```json
48
+ {
49
+ "date_of_birth": "2026-01-01",
50
+ "email": "user@example.com",
51
+ "first_name": "string",
52
+ "gender": "male",
53
+ "last_name": "string"
54
+ }
55
+ ```
56
+
57
+ ## Success responses
58
+
59
+ | Status | Shape | Content type | Description |
60
+ |---|---|---|---|
61
+ | `201` | [`ProviderPatientResponse`](../models/ProviderPatientResponse.md) | application/json | Patient created |
62
+
63
+ ## Success response examples
64
+
65
+ ### 201
66
+
67
+ ```json
68
+ {
69
+ "patient": {
70
+ "address": {
71
+ "city": "string",
72
+ "country": "string",
73
+ "state": "string",
74
+ "street1": "string",
75
+ "street2": "string",
76
+ "zip_code": "string"
77
+ },
78
+ "date_of_birth": "string",
79
+ "first_name": "string",
80
+ "gender": "string",
81
+ "last_name": "string",
82
+ "patient_id": "string",
83
+ "phone": {
84
+ "extension": "string",
85
+ "number": "string",
86
+ "type": "string"
87
+ }
88
+ }
89
+ }
90
+ ```
91
+
92
+ ## Common errors
93
+
94
+ | Status | Shape | Content type | Description |
95
+ |---|---|---|---|
96
+ | `400` | [`provider.ErrorResponse`](../models/provider.ErrorResponse.md) | application/json | Invalid patient details |
97
+ | `401` | [`provider.ErrorResponse`](../models/provider.ErrorResponse.md) | application/json | Provider authorization required |
98
+
99
+ ## Error examples
100
+
101
+ ### 400
102
+
103
+ ```json
104
+ {
105
+ "error": "string"
106
+ }
107
+ ```
108
+
109
+ ### 401
110
+
111
+ ```json
112
+ {
113
+ "error": "string"
114
+ }
115
+ ```
116
+
117
+ ## NodeJS / TypeScript implementation
118
+
119
+ ```ts
120
+ import { HCSDK } from "@healthcloudai/hc-sdk";
121
+ ```
122
+
123
+ ```ts
124
+ const request = {
125
+ "date_of_birth": "2026-01-01",
126
+ "email": "user@example.com",
127
+ "first_name": "string",
128
+ "gender": "male",
129
+ "last_name": "string"
130
+ };
131
+
132
+ const result = await provider.createPatient(request);
133
+ ```
134
+
135
+ ## cURL
136
+
137
+ ```bash
138
+ curl -X POST \
139
+ -H 'Authorization: Bearer <ACCESS_TOKEN>' \
140
+ -H 'Content-Type: application/json' \
141
+ -d '{"date_of_birth":"2026-01-01","email":"user@example.com","first_name":"string","gender":"male","last_name":"string"}' \
142
+ 'https://dev-api-provider.health.cloud/patients'
143
+ ```
144
+
145
+ ## Notes
146
+
147
+ None.
148
+
149
+ ## Prepared Test Console scenario
150
+
151
+ No canonical scenario is currently associated.
152
+
153
+ ## Real response
154
+
155
+ No approved real integration response is currently published. Unapproved candidates are never rendered as examples.
@@ -0,0 +1,115 @@
1
+ # Counts for the provider's home screen
2
+
3
+ Operation ID: `provider.getHomeSummary`
4
+
5
+ The calling practitioner's own patients and encounters-by-status (never tenant-wide), counted by the FHIR store.
6
+
7
+ ## Public method
8
+
9
+ `getHomeSummary`
10
+
11
+ Signature: `provider.getHomeSummary()`
12
+
13
+ Return type: `Promise<ProviderHomeSummaryResponse>`
14
+
15
+ ## Authentication
16
+
17
+ Classification: **AUTHENTICATED**
18
+
19
+ Schemes: `bearerAuth`
20
+
21
+ ## Prerequisites
22
+
23
+ None documented.
24
+
25
+ ## HTTP
26
+
27
+ `GET /dashboard/summary`
28
+
29
+ ## Path parameters
30
+
31
+ None.
32
+
33
+ ## Query parameters
34
+
35
+ None.
36
+
37
+ ## Body parameters
38
+
39
+ None.
40
+
41
+ Request model: None.
42
+
43
+ ## Request example
44
+
45
+ None declared in canonical OpenAPI.
46
+
47
+ ## Success responses
48
+
49
+ | Status | Shape | Content type | Description |
50
+ |---|---|---|---|
51
+ | `200` | [`ProviderHomeSummaryResponse`](../models/ProviderHomeSummaryResponse.md) | application/json | Home screen counts |
52
+
53
+ ## Success response examples
54
+
55
+ ### 200
56
+
57
+ ```json
58
+ {
59
+ "as_of": "string",
60
+ "encounters": {
61
+ "arrived": 0,
62
+ "finished": 0,
63
+ "in_progress": 0,
64
+ "planned": 0,
65
+ "triaged": 0
66
+ },
67
+ "patients_total": 0
68
+ }
69
+ ```
70
+
71
+ ## Common errors
72
+
73
+ | Status | Shape | Content type | Description |
74
+ |---|---|---|---|
75
+ | `401` | [`provider.ErrorResponse`](../models/provider.ErrorResponse.md) | application/json | Provider authorization required |
76
+
77
+ ## Error examples
78
+
79
+ ### 401
80
+
81
+ ```json
82
+ {
83
+ "error": "string"
84
+ }
85
+ ```
86
+
87
+ ## NodeJS / TypeScript implementation
88
+
89
+ ```ts
90
+ import { HCSDK } from "@healthcloudai/hc-sdk";
91
+ ```
92
+
93
+ ```ts
94
+ const result = await provider.getHomeSummary();
95
+ ```
96
+
97
+ ## cURL
98
+
99
+ ```bash
100
+ curl -X GET \
101
+ -H 'Authorization: Bearer <ACCESS_TOKEN>' \
102
+ 'https://dev-api-provider.health.cloud/dashboard/summary'
103
+ ```
104
+
105
+ ## Notes
106
+
107
+ None.
108
+
109
+ ## Prepared Test Console scenario
110
+
111
+ No canonical scenario is currently associated.
112
+
113
+ ## Real response
114
+
115
+ No approved real integration response is currently published. Unapproved candidates are never rendered as examples.
@@ -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.