@healthcloudai/hc-sdk 3.20.0 → 3.22.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 (40) hide show
  1. package/dist/index.cjs +259 -1
  2. package/dist/index.d.cts +1010 -101
  3. package/dist/index.d.ts +1010 -101
  4. package/dist/index.js +259 -1
  5. package/docs/clients/PatientClient.md +4 -0
  6. package/docs/clients/QuestClient.md +1 -1
  7. package/docs/docs-manifest.json +22 -3
  8. package/docs/examples/index.md +5 -1
  9. package/docs/index.md +5 -1
  10. package/docs/models/CatalogItemKind.md +15 -0
  11. package/docs/models/CatalogVendor.md +15 -0
  12. package/docs/models/CollectionModality.md +15 -0
  13. package/docs/models/EncounterEffect.md +18 -0
  14. package/docs/models/EncounterOperationError.md +18 -0
  15. package/docs/models/EncounterOperationResponse.md +22 -0
  16. package/docs/models/EncounterSections.md +22 -0
  17. package/docs/models/GetTestOrderResponse.md +1 -0
  18. package/docs/models/IntakeOperationError.md +18 -0
  19. package/docs/models/IntakeOperationResponse.md +22 -0
  20. package/docs/models/ObservedEncounterResponse.md +26 -0
  21. package/docs/models/ObservedIntakeResponse.md +17 -0
  22. package/docs/models/OrderItem.md +4 -0
  23. package/docs/models/PlaceTestOrderResponse.md +1 -0
  24. package/docs/models/QuestRetrieveCompendiumResponse.md +5 -0
  25. package/docs/models/SubmitEncounterOperationRequest.md +18 -0
  26. package/docs/models/SubmitIntakeOperationRequest.md +19 -0
  27. package/docs/models/TestOrder.md +1 -0
  28. package/docs/models/UnknownEncounterOperation.md +18 -0
  29. package/docs/models/UnknownIntakeOperation.md +18 -0
  30. package/docs/models/index.md +15 -0
  31. package/docs/operations/connectors.questRetrieveCompendium.md +17 -2
  32. package/docs/operations/patient.getPatientEncounterOperation.md +151 -0
  33. package/docs/operations/patient.getPatientIntakeOperation.md +166 -0
  34. package/docs/operations/patient.getTestOrder.md +1 -0
  35. package/docs/operations/patient.listOrderItems.md +12 -4
  36. package/docs/operations/patient.listTestOrders.md +1 -0
  37. package/docs/operations/patient.placeTestOrder.md +2 -0
  38. package/docs/operations/patient.submitPatientEncounterOperation.md +161 -0
  39. package/docs/operations/patient.submitPatientIntakeOperation.md +178 -0
  40. package/package.json +1 -1
@@ -32,7 +32,9 @@ None.
32
32
 
33
33
  ## Query parameters
34
34
 
35
- None.
35
+ | Name | Type | Required | Format | Allowed values | Default | Nullable | Description |
36
+ |---|---|---:|---|---|---|---:|---|
37
+ | `include_catalog` | `boolean` | No | | | `false` | No | Also list patient-visible lab tests and panels, which cannot be ordered for delivery |
36
38
 
37
39
  ## Body parameters
38
40
 
@@ -48,7 +50,7 @@ None declared in canonical OpenAPI.
48
50
 
49
51
  | Status | Shape | Content type | Description |
50
52
  |---|---|---|---|
51
- | `200` | [`ListOrderItemsResponse`](../models/ListOrderItemsResponse.md) | application/json | Orderable catalog items: id, name and image |
53
+ | `200` | [`ListOrderItemsResponse`](../models/ListOrderItemsResponse.md) | application/json | Orderable catalog items: id, name, image, kind, vendor, collection_modality and, for a panel, collection_modalities |
52
54
 
53
55
  ## Success response examples
54
56
 
@@ -58,9 +60,15 @@ None declared in canonical OpenAPI.
58
60
  {
59
61
  "items": [
60
62
  {
63
+ "collection_modalities": [
64
+ "rapid"
65
+ ],
66
+ "collection_modality": "rapid",
61
67
  "id": "00000000-0000-0000-0000-000000000000",
62
68
  "image": "string",
63
- "name": "string"
69
+ "kind": "test",
70
+ "name": "string",
71
+ "vendor": "quest"
64
72
  }
65
73
  ],
66
74
  "total": 0
@@ -113,7 +121,7 @@ const result = await patient.listOrderItems();
113
121
  ```bash
114
122
  curl -X GET \
115
123
  -H 'Authorization: Bearer <ACCESS_TOKEN>' \
116
- 'https://dev-api-patient.health.cloud/patients/order-items'
124
+ 'https://dev-api-patient.health.cloud/patients/order-items?include_catalog=false'
117
125
  ```
118
126
 
119
127
  ## Notes
@@ -82,6 +82,7 @@ None declared in canonical OpenAPI.
82
82
  "patient_fhir_id": "string",
83
83
  "performer_name": "string",
84
84
  "priority": "routine",
85
+ "quest_placer_order_number": "string",
85
86
  "reason": "string",
86
87
  "requester_name": "string",
87
88
  "requester_npi": "string",
@@ -106,6 +106,7 @@ Request model: [`PlaceTestOrderRequest`](../models/PlaceTestOrderRequest.md)
106
106
  "patient_fhir_id": "string",
107
107
  "performer_name": "string",
108
108
  "priority": "routine",
109
+ "quest_placer_order_number": "string",
109
110
  "reason": "string",
110
111
  "requester_name": "string",
111
112
  "requester_npi": "string",
@@ -158,6 +159,7 @@ Request model: [`PlaceTestOrderRequest`](../models/PlaceTestOrderRequest.md)
158
159
  "patient_fhir_id": "string",
159
160
  "performer_name": "string",
160
161
  "priority": "routine",
162
+ "quest_placer_order_number": "string",
161
163
  "reason": "string",
162
164
  "requester_name": "string",
163
165
  "requester_npi": "string",
@@ -0,0 +1,161 @@
1
+ # Execute or replay one keyed agent encounter operation
2
+
3
+ Operation ID: `patient.submitPatientEncounterOperation`
4
+
5
+ Derives tenant/patient from patient login and binds the key to exact reviewed public-conversation notes. A committed first-dispatch marker precedes the shared encounter pipeline. Existing pending/unknown keys return HTTP 202 without repeating writes; recorded responses replay under HTTP 200 with their original response_code and a sanitized observation body. Recorded is not independent proof that every clinical effect succeeded. Requires a separately provisioned operation journal; fails closed without it.
6
+
7
+ ## Public method
8
+
9
+ `submitPatientEncounterOperation`
10
+
11
+ Signature: `patient.submitPatientEncounterOperation(request)`
12
+
13
+ Return type: `Promise<EncounterOperationResponse>`
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/encounter/operations`
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` | [`SubmitEncounterOperationRequest`](../models/SubmitEncounterOperationRequest.md) | Yes | | | | No | |
42
+
43
+ Request model: [`SubmitEncounterOperationRequest`](../models/SubmitEncounterOperationRequest.md)
44
+
45
+ ## Request example
46
+
47
+ ```json
48
+ {
49
+ "idempotency_key": "940be5cc-c1fd-4b38-ae7d-13516f9ac098",
50
+ "notes": "Synthetic encounter note."
51
+ }
52
+ ```
53
+
54
+ ## Success responses
55
+
56
+ | Status | Shape | Content type | Description |
57
+ |---|---|---|---|
58
+ | `200` | [`EncounterOperationResponse`](../models/EncounterOperationResponse.md) | application/json | Scope/key-bound journal state; recorded HTTP response is not independent clinical success evidence |
59
+ | `202` | [`EncounterOperationResponse`](../models/EncounterOperationResponse.md) | application/json | Scope/key-bound journal state; recorded HTTP response is not independent clinical success evidence |
60
+
61
+ ## Success response examples
62
+
63
+ None declared in canonical OpenAPI.
64
+
65
+ ## Common errors
66
+
67
+ | Status | Shape | Content type | Description |
68
+ |---|---|---|---|
69
+ | `401` | [`EncounterOperationError`](../models/EncounterOperationError.md) | application/json | Patient login required |
70
+ | `403` | [`EncounterOperationError`](../models/EncounterOperationError.md) | application/json | Verified tenant required |
71
+ | `404` | [`EncounterOperationError`](../models/EncounterOperationError.md) | application/json | Patient or operation not found; an in-flight operation may still commit |
72
+ | `409` | [`EncounterOperationError`](../models/EncounterOperationError.md) | application/json | Key already bound to different raw terms |
73
+ | `422` | [`EncounterOperationError`](../models/EncounterOperationError.md) | application/json | Invalid key or encounter terms |
74
+ | `503` | [`EncounterOperationError`](../models/EncounterOperationError.md) | application/json | Coordination or outcome unavailable; look up the original key, never fall back to an unkeyed write |
75
+
76
+ ## Error examples
77
+
78
+ ### 401
79
+
80
+ ```json
81
+ {
82
+ "error": "string"
83
+ }
84
+ ```
85
+
86
+ ### 403
87
+
88
+ ```json
89
+ {
90
+ "error": "string"
91
+ }
92
+ ```
93
+
94
+ ### 404
95
+
96
+ ```json
97
+ {
98
+ "error": "string"
99
+ }
100
+ ```
101
+
102
+ ### 409
103
+
104
+ ```json
105
+ {
106
+ "error": "string"
107
+ }
108
+ ```
109
+
110
+ ### 422
111
+
112
+ ```json
113
+ {
114
+ "error": "string"
115
+ }
116
+ ```
117
+
118
+ ### 503
119
+
120
+ ```json
121
+ {
122
+ "error": "string"
123
+ }
124
+ ```
125
+
126
+ ## NodeJS / TypeScript implementation
127
+
128
+ ```ts
129
+ import { HCSDK } from "@healthcloudai/hc-sdk";
130
+ ```
131
+
132
+ ```ts
133
+ const request = {
134
+ "idempotency_key": "940be5cc-c1fd-4b38-ae7d-13516f9ac098",
135
+ "notes": "Synthetic encounter note."
136
+ };
137
+
138
+ const result = await patient.submitPatientEncounterOperation(request);
139
+ ```
140
+
141
+ ## cURL
142
+
143
+ ```bash
144
+ curl -X POST \
145
+ -H 'Authorization: Bearer <ACCESS_TOKEN>' \
146
+ -H 'Content-Type: application/json' \
147
+ -d '{"idempotency_key":"940be5cc-c1fd-4b38-ae7d-13516f9ac098","notes":"Synthetic encounter note."}' \
148
+ 'https://dev-api-patient.health.cloud/patients/encounter/operations'
149
+ ```
150
+
151
+ ## Notes
152
+
153
+ None.
154
+
155
+ ## Prepared Test Console scenario
156
+
157
+ No canonical scenario is currently associated.
158
+
159
+ ## Real response
160
+
161
+ No approved real integration response is currently published. Unapproved candidates are never rendered as examples.
@@ -0,0 +1,178 @@
1
+ # Execute or replay one keyed agent intake operation
2
+
3
+ Operation ID: `patient.submitPatientIntakeOperation`
4
+
5
+ Derives tenant/patient from patient login and binds the key to exact raw section/summary. A committed first-dispatch marker precedes the shared intake pipeline. Existing pending/unknown keys return HTTP 202 without repeating writes; recorded responses replay under HTTP 200 with their original response_code and a sanitized observation body. Recorded is not independent proof that every clinical effect succeeded. Requires a separately provisioned operation journal; fails closed without it.
6
+
7
+ ## Public method
8
+
9
+ `submitPatientIntakeOperation`
10
+
11
+ Signature: `patient.submitPatientIntakeOperation(request)`
12
+
13
+ Return type: `Promise<IntakeOperationResponse>`
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/intake/operations`
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` | [`SubmitIntakeOperationRequest`](../models/SubmitIntakeOperationRequest.md) | Yes | | | | No | |
42
+
43
+ Request model: [`SubmitIntakeOperationRequest`](../models/SubmitIntakeOperationRequest.md)
44
+
45
+ ## Request example
46
+
47
+ ```json
48
+ {
49
+ "idempotency_key": "940be5cc-c1fd-4b38-ae7d-13516f9ac098",
50
+ "section": "allergies",
51
+ "summary": "Synthetic intake note."
52
+ }
53
+ ```
54
+
55
+ ## Success responses
56
+
57
+ | Status | Shape | Content type | Description |
58
+ |---|---|---|---|
59
+ | `200` | [`IntakeOperationResponse`](../models/IntakeOperationResponse.md) | application/json | Scope/key-bound journal state; recorded HTTP response is not independent clinical success evidence |
60
+ | `202` | [`IntakeOperationResponse`](../models/IntakeOperationResponse.md) | application/json | Scope/key-bound journal state; recorded HTTP response is not independent clinical success evidence |
61
+
62
+ ## Success response examples
63
+
64
+ ### 200
65
+
66
+ ```json
67
+ {
68
+ "idempotency_key": "940be5cc-c1fd-4b38-ae7d-13516f9ac098",
69
+ "patient_id": "patient-example-001",
70
+ "request_hash": "a7c3a0a2f1d949380f4312a44f9a4a02b0ab754a47fc57f10c92a6f8fb5cd544",
71
+ "response_body": {
72
+ "error_messages": [
73
+ "Synthetic outcome needs clinical reconciliation"
74
+ ]
75
+ },
76
+ "response_code": 502,
77
+ "status": "recorded"
78
+ }
79
+ ```
80
+
81
+ ## Common errors
82
+
83
+ | Status | Shape | Content type | Description |
84
+ |---|---|---|---|
85
+ | `401` | [`IntakeOperationError`](../models/IntakeOperationError.md) | application/json | Patient login required |
86
+ | `403` | [`IntakeOperationError`](../models/IntakeOperationError.md) | application/json | Verified tenant required |
87
+ | `404` | [`IntakeOperationError`](../models/IntakeOperationError.md) | application/json | Patient or operation not found; an in-flight operation may still commit |
88
+ | `409` | [`IntakeOperationError`](../models/IntakeOperationError.md) | application/json | Key already bound to different raw terms |
89
+ | `422` | [`IntakeOperationError`](../models/IntakeOperationError.md) | application/json | Invalid key or intake terms |
90
+ | `503` | [`IntakeOperationError`](../models/IntakeOperationError.md) | application/json | Coordination or outcome unavailable; look up the original key, never fall back to an unkeyed write |
91
+
92
+ ## Error examples
93
+
94
+ ### 401
95
+
96
+ ```json
97
+ {
98
+ "error": "string"
99
+ }
100
+ ```
101
+
102
+ ### 403
103
+
104
+ ```json
105
+ {
106
+ "error": "string"
107
+ }
108
+ ```
109
+
110
+ ### 404
111
+
112
+ ```json
113
+ {
114
+ "error": "string"
115
+ }
116
+ ```
117
+
118
+ ### 409
119
+
120
+ ```json
121
+ {
122
+ "error": "string"
123
+ }
124
+ ```
125
+
126
+ ### 422
127
+
128
+ ```json
129
+ {
130
+ "error": "string"
131
+ }
132
+ ```
133
+
134
+ ### 503
135
+
136
+ ```json
137
+ {
138
+ "error": "string"
139
+ }
140
+ ```
141
+
142
+ ## NodeJS / TypeScript implementation
143
+
144
+ ```ts
145
+ import { HCSDK } from "@healthcloudai/hc-sdk";
146
+ ```
147
+
148
+ ```ts
149
+ const request = {
150
+ "idempotency_key": "940be5cc-c1fd-4b38-ae7d-13516f9ac098",
151
+ "section": "allergies",
152
+ "summary": "Synthetic intake note."
153
+ };
154
+
155
+ const result = await patient.submitPatientIntakeOperation(request);
156
+ ```
157
+
158
+ ## cURL
159
+
160
+ ```bash
161
+ curl -X POST \
162
+ -H 'Authorization: Bearer <ACCESS_TOKEN>' \
163
+ -H 'Content-Type: application/json' \
164
+ -d '{"idempotency_key":"940be5cc-c1fd-4b38-ae7d-13516f9ac098","section":"allergies","summary":"Synthetic intake note."}' \
165
+ 'https://dev-api-patient.health.cloud/patients/intake/operations'
166
+ ```
167
+
168
+ ## Notes
169
+
170
+ None.
171
+
172
+ ## Prepared Test Console scenario
173
+
174
+ No canonical scenario is currently associated.
175
+
176
+ ## Real response
177
+
178
+ No approved real integration response is currently published. Unapproved candidates are never rendered as examples.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@healthcloudai/hc-sdk",
3
- "version": "3.20.0",
3
+ "version": "3.22.0",
4
4
  "description": "All-in-one HealthCloud SDK with typed platform APIs and secure connector clients.",
5
5
  "author": "Healthcheck Systems Inc",
6
6
  "license": "MIT",