@healthcloudai/hc-sdk 3.21.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.
- package/dist/index.cjs +166 -1
- package/dist/index.d.cts +612 -2
- package/dist/index.d.ts +612 -2
- package/dist/index.js +166 -1
- package/docs/clients/PatientClient.md +2 -0
- package/docs/clients/QuestClient.md +1 -1
- package/docs/docs-manifest.json +15 -3
- package/docs/examples/index.md +3 -1
- package/docs/index.md +3 -1
- package/docs/models/CatalogItemKind.md +15 -0
- package/docs/models/CatalogVendor.md +15 -0
- package/docs/models/CollectionModality.md +15 -0
- package/docs/models/EncounterEffect.md +18 -0
- package/docs/models/EncounterOperationError.md +18 -0
- package/docs/models/EncounterOperationResponse.md +22 -0
- package/docs/models/EncounterSections.md +22 -0
- package/docs/models/GetTestOrderResponse.md +1 -0
- package/docs/models/ObservedEncounterResponse.md +26 -0
- package/docs/models/OrderItem.md +4 -0
- package/docs/models/PlaceTestOrderResponse.md +1 -0
- package/docs/models/QuestRetrieveCompendiumResponse.md +5 -0
- package/docs/models/SubmitEncounterOperationRequest.md +18 -0
- package/docs/models/TestOrder.md +1 -0
- package/docs/models/UnknownEncounterOperation.md +18 -0
- package/docs/models/index.md +10 -0
- package/docs/operations/connectors.questRetrieveCompendium.md +17 -2
- package/docs/operations/patient.getPatientEncounterOperation.md +151 -0
- package/docs/operations/patient.getTestOrder.md +1 -0
- package/docs/operations/patient.listOrderItems.md +12 -4
- package/docs/operations/patient.listTestOrders.md +1 -0
- package/docs/operations/patient.placeTestOrder.md +2 -0
- package/docs/operations/patient.submitPatientEncounterOperation.md +161 -0
- package/docs/operations/patient.submitPatientIntakeOperation.md +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# UnknownEncounterOperation
|
|
2
|
+
|
|
3
|
+
Model ID: `UnknownEncounterOperation`
|
|
4
|
+
|
|
5
|
+
No description.
|
|
6
|
+
|
|
7
|
+
Type: `object`
|
|
8
|
+
|
|
9
|
+
## Fields
|
|
10
|
+
|
|
11
|
+
| Field | Type | Required | Format | Allowed values | Default | Nullable | Description |
|
|
12
|
+
|---|---|---:|---|---|---|---:|---|
|
|
13
|
+
| `idempotency_key` | `string` | Yes | | | | No | |
|
|
14
|
+
| `status` | `string` | No | | | `"unknown"` | No | |
|
|
15
|
+
|
|
16
|
+
## Example
|
|
17
|
+
|
|
18
|
+
None declared in canonical OpenAPI.
|
package/docs/models/index.md
CHANGED
|
@@ -396,6 +396,8 @@
|
|
|
396
396
|
- [CarequalityRetrieveDocumentsRequest](CarequalityRetrieveDocumentsRequest.md)
|
|
397
397
|
- [CarequalityRetrieveDocumentsResponse](CarequalityRetrieveDocumentsResponse.md)
|
|
398
398
|
- [CareSession](CareSession.md)
|
|
399
|
+
- [CatalogItemKind](CatalogItemKind.md)
|
|
400
|
+
- [CatalogVendor](CatalogVendor.md)
|
|
399
401
|
- [ChatMessageRecord](ChatMessageRecord.md)
|
|
400
402
|
- [CheckEligibilityRequest](CheckEligibilityRequest.md)
|
|
401
403
|
- [CheckEligibilityResponse](CheckEligibilityResponse.md)
|
|
@@ -408,6 +410,7 @@
|
|
|
408
410
|
- [CmsGetCountyFipsRequest](CmsGetCountyFipsRequest.md)
|
|
409
411
|
- [CmsSearchHealthPlansRequest](CmsSearchHealthPlansRequest.md)
|
|
410
412
|
- [CmsSearchHealthPlansResponse](CmsSearchHealthPlansResponse.md)
|
|
413
|
+
- [CollectionModality](CollectionModality.md)
|
|
411
414
|
- [CommGroupRecord](CommGroupRecord.md)
|
|
412
415
|
- [CommunicationsState](CommsGetStateResponse.md)
|
|
413
416
|
- [CommsGetUnreadCountResponse](CommsGetUnreadCountResponse.md)
|
|
@@ -556,6 +559,10 @@
|
|
|
556
559
|
- [ElevenLabsVoice](ElevenLabsVoice.md)
|
|
557
560
|
- [EmergencyContact](EmergencyContact.md)
|
|
558
561
|
- [EncounterClass](EncounterClass.md)
|
|
562
|
+
- [EncounterEffect](EncounterEffect.md)
|
|
563
|
+
- [EncounterOperationError](EncounterOperationError.md)
|
|
564
|
+
- [EncounterOperationResponse](EncounterOperationResponse.md)
|
|
565
|
+
- [EncounterSections](EncounterSections.md)
|
|
559
566
|
- [EncounterStatus](EncounterStatus.md)
|
|
560
567
|
- [Ethnicity](Ethnicity.md)
|
|
561
568
|
- [ExerciseFrequency](ExerciseFrequency.md)
|
|
@@ -1305,6 +1312,7 @@
|
|
|
1305
1312
|
- [NppesVerifyProviderResponse](NppesVerifyProviderResponse.md)
|
|
1306
1313
|
- [ObservationComponent](ObservationComponent.md)
|
|
1307
1314
|
- [ObservationStatus](ObservationStatus.md)
|
|
1315
|
+
- [ObservedEncounterResponse](ObservedEncounterResponse.md)
|
|
1308
1316
|
- [ObservedIntakeResponse](ObservedIntakeResponse.md)
|
|
1309
1317
|
- [OnboardEncounterPayload](OnboardEncounterPayload.md)
|
|
1310
1318
|
- [OnboardEncounterStepResult](OnboardEncounterStepResult.md)
|
|
@@ -1924,6 +1932,7 @@
|
|
|
1924
1932
|
- [StripeVerifyConnectionResponse](StripeVerifyConnectionResponse.md)
|
|
1925
1933
|
- [SubmitCurrentSymptomsScreeningsCurrentSymptomsRequest](SubmitCurrentSymptomsScreeningsCurrentSymptomsRequest.md)
|
|
1926
1934
|
- [SubmitCurrentSymptomsResponse](SubmitCurrentSymptomsScreeningsCurrentSymptomsResponse.md)
|
|
1935
|
+
- [SubmitEncounterOperationRequest](SubmitEncounterOperationRequest.md)
|
|
1927
1936
|
- [SubmitIntakeOperationRequest](SubmitIntakeOperationRequest.md)
|
|
1928
1937
|
- [SubmitSummaryRequest](SubmitSummaryRequest.md)
|
|
1929
1938
|
- [SubscriberRelationship](SubscriberRelationship.md)
|
|
@@ -1954,6 +1963,7 @@
|
|
|
1954
1963
|
- [UberGetUndeliveredOrdersResponse](UberGetUndeliveredOrdersResponse.md)
|
|
1955
1964
|
- [UberUpdateDeliveryRequest](UberUpdateDeliveryRequest.md)
|
|
1956
1965
|
- [UberWaypoint](UberWaypoint.md)
|
|
1966
|
+
- [UnknownEncounterOperation](UnknownEncounterOperation.md)
|
|
1957
1967
|
- [UnknownFlagOperation](UnknownFlagOperation.md)
|
|
1958
1968
|
- [UnknownIntakeOperation](UnknownIntakeOperation.md)
|
|
1959
1969
|
- [UpdateAddressRequest](UpdateAddressRequest.md)
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
# Retrieve a compendium zip
|
|
1
|
+
# Retrieve a compendium zip as Base64, or as a short-lived download URL
|
|
2
2
|
|
|
3
3
|
Operation ID: `connectors.questRetrieveCompendium`
|
|
4
4
|
|
|
5
|
-
Retrieve a compendium zip
|
|
5
|
+
Retrieve a compendium zip as Base64, or as a short-lived download URL. ``content_b64`` is inline unless the gateway staged a ZIP too large for a Lambda response; then ``download_url`` is set instead. ``size_bytes`` and ``sha256`` always describe the original ZIP.
|
|
6
6
|
|
|
7
7
|
## Public method
|
|
8
8
|
|
|
@@ -72,8 +72,23 @@ Request model: [`QuestRetrieveCompendiumRequest`](../models/QuestRetrieveCompend
|
|
|
72
72
|
"content_type": {
|
|
73
73
|
"vendorField": "vendor-defined value"
|
|
74
74
|
},
|
|
75
|
+
"delivery": {
|
|
76
|
+
"vendorField": "vendor-defined value"
|
|
77
|
+
},
|
|
78
|
+
"download_url": {
|
|
79
|
+
"vendorField": "vendor-defined value"
|
|
80
|
+
},
|
|
81
|
+
"download_url_expires_in": {
|
|
82
|
+
"vendorField": "vendor-defined value"
|
|
83
|
+
},
|
|
75
84
|
"file_name": {
|
|
76
85
|
"vendorField": "vendor-defined value"
|
|
86
|
+
},
|
|
87
|
+
"sha256": {
|
|
88
|
+
"vendorField": "vendor-defined value"
|
|
89
|
+
},
|
|
90
|
+
"size_bytes": {
|
|
91
|
+
"vendorField": "vendor-defined value"
|
|
77
92
|
}
|
|
78
93
|
}
|
|
79
94
|
```
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
# Read the logged-in patient's keyed encounter journal state
|
|
2
|
+
|
|
3
|
+
Operation ID: `patient.getPatientEncounterOperation`
|
|
4
|
+
|
|
5
|
+
Reads the original scope-bound journal entry without executing encounter. Missing/pending state is not evidence of failure or permission to repeat a write.
|
|
6
|
+
|
|
7
|
+
## Public method
|
|
8
|
+
|
|
9
|
+
`getPatientEncounterOperation`
|
|
10
|
+
|
|
11
|
+
Signature: `patient.getPatientEncounterOperation(idempotencyKey)`
|
|
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
|
+
`GET /patients/encounter/operations/{idempotency_key}`
|
|
28
|
+
|
|
29
|
+
## Path parameters
|
|
30
|
+
|
|
31
|
+
| Name | Type | Required | Format | Allowed values | Default | Nullable | Description |
|
|
32
|
+
|---|---|---:|---|---|---|---:|---|
|
|
33
|
+
| `idempotency_key` | `string` | Yes | | | | No | |
|
|
34
|
+
|
|
35
|
+
## Query parameters
|
|
36
|
+
|
|
37
|
+
None.
|
|
38
|
+
|
|
39
|
+
## Body parameters
|
|
40
|
+
|
|
41
|
+
None.
|
|
42
|
+
|
|
43
|
+
Request model: None.
|
|
44
|
+
|
|
45
|
+
## Request example
|
|
46
|
+
|
|
47
|
+
None declared in canonical OpenAPI.
|
|
48
|
+
|
|
49
|
+
## Success responses
|
|
50
|
+
|
|
51
|
+
| Status | Shape | Content type | Description |
|
|
52
|
+
|---|---|---|---|
|
|
53
|
+
| `200` | [`EncounterOperationResponse`](../models/EncounterOperationResponse.md) | application/json | Scope/key-bound journal state; recorded HTTP response is not independent clinical success evidence |
|
|
54
|
+
| `202` | [`EncounterOperationResponse`](../models/EncounterOperationResponse.md) | application/json | Scope/key-bound journal state; recorded HTTP response is not independent clinical success evidence |
|
|
55
|
+
|
|
56
|
+
## Success response examples
|
|
57
|
+
|
|
58
|
+
None declared in canonical OpenAPI.
|
|
59
|
+
|
|
60
|
+
## Common errors
|
|
61
|
+
|
|
62
|
+
| Status | Shape | Content type | Description |
|
|
63
|
+
|---|---|---|---|
|
|
64
|
+
| `401` | [`EncounterOperationError`](../models/EncounterOperationError.md) | application/json | Patient login required |
|
|
65
|
+
| `403` | [`EncounterOperationError`](../models/EncounterOperationError.md) | application/json | Verified tenant required |
|
|
66
|
+
| `404` | [`EncounterOperationError`](../models/EncounterOperationError.md) | application/json | Patient or operation not found; an in-flight operation may still commit |
|
|
67
|
+
| `409` | [`EncounterOperationError`](../models/EncounterOperationError.md) | application/json | Key already bound to different raw terms |
|
|
68
|
+
| `422` | [`EncounterOperationError`](../models/EncounterOperationError.md) | application/json | Invalid key or encounter terms |
|
|
69
|
+
| `503` | [`EncounterOperationError`](../models/EncounterOperationError.md) | application/json | Coordination or outcome unavailable; look up the original key, never fall back to an unkeyed write |
|
|
70
|
+
|
|
71
|
+
## Error examples
|
|
72
|
+
|
|
73
|
+
### 401
|
|
74
|
+
|
|
75
|
+
```json
|
|
76
|
+
{
|
|
77
|
+
"error": "string"
|
|
78
|
+
}
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### 403
|
|
82
|
+
|
|
83
|
+
```json
|
|
84
|
+
{
|
|
85
|
+
"error": "string"
|
|
86
|
+
}
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### 404
|
|
90
|
+
|
|
91
|
+
```json
|
|
92
|
+
{
|
|
93
|
+
"error": "string"
|
|
94
|
+
}
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### 409
|
|
98
|
+
|
|
99
|
+
```json
|
|
100
|
+
{
|
|
101
|
+
"error": "string"
|
|
102
|
+
}
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### 422
|
|
106
|
+
|
|
107
|
+
```json
|
|
108
|
+
{
|
|
109
|
+
"error": "string"
|
|
110
|
+
}
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
### 503
|
|
114
|
+
|
|
115
|
+
```json
|
|
116
|
+
{
|
|
117
|
+
"error": "string"
|
|
118
|
+
}
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## NodeJS / TypeScript implementation
|
|
122
|
+
|
|
123
|
+
```ts
|
|
124
|
+
import { HCSDK } from "@healthcloudai/hc-sdk";
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
```ts
|
|
128
|
+
const idempotencyKey = "<IDEMPOTENCY_KEY>";
|
|
129
|
+
|
|
130
|
+
const result = await patient.getPatientEncounterOperation(idempotencyKey);
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
## cURL
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
curl -X GET \
|
|
137
|
+
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
|
|
138
|
+
'https://dev-api-patient.health.cloud/patients/encounter/operations/%3CIDEMPOTENCY_KEY%3E'
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
## Notes
|
|
142
|
+
|
|
143
|
+
None.
|
|
144
|
+
|
|
145
|
+
## Prepared Test Console scenario
|
|
146
|
+
|
|
147
|
+
No canonical scenario is currently associated.
|
|
148
|
+
|
|
149
|
+
## Real response
|
|
150
|
+
|
|
151
|
+
No approved real integration response is currently published. Unapproved candidates are never rendered as examples.
|
|
@@ -32,7 +32,9 @@ None.
|
|
|
32
32
|
|
|
33
33
|
## Query parameters
|
|
34
34
|
|
|
35
|
-
|
|
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
|
|
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
|
-
"
|
|
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
|
|
@@ -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.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Operation ID: `patient.submitPatientIntakeOperation`
|
|
4
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
|
|
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
6
|
|
|
7
7
|
## Public method
|
|
8
8
|
|
package/package.json
CHANGED