@healthcloudai/hc-sdk 3.36.0 → 3.37.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 (43) hide show
  1. package/dist/index.cjs +118 -4
  2. package/dist/index.d.cts +613 -5
  3. package/dist/index.d.ts +613 -5
  4. package/dist/index.js +118 -4
  5. package/docs/clients/PatientClient.md +2 -1
  6. package/docs/docs-manifest.json +10 -3
  7. package/docs/examples/index.md +2 -1
  8. package/docs/index.md +2 -1
  9. package/docs/models/AddInsuranceResponse.md +1 -0
  10. package/docs/models/Appointment.md +1 -0
  11. package/docs/models/CheckEligibilityResponse.md +1 -0
  12. package/docs/models/CheckInsuranceNetworkRequest.md +21 -0
  13. package/docs/models/CheckInsuranceNetworkResponse.md +33 -0
  14. package/docs/models/CoverageChoice.md +20 -0
  15. package/docs/models/MedicalConcept.md +29 -4
  16. package/docs/models/MedicalConceptSearchRequest.md +6 -4
  17. package/docs/models/NetworkEvidence.md +21 -0
  18. package/docs/models/NetworkPlan.md +21 -0
  19. package/docs/models/ProducerReceipt.md +20 -0
  20. package/docs/models/SearchMedicalConceptsRequest.md +3 -1
  21. package/docs/models/index.md +6 -0
  22. package/docs/operations/appointments.book.md +6 -0
  23. package/docs/operations/appointments.cancel.md +6 -0
  24. package/docs/operations/appointments.listPatientAppointments.md +6 -0
  25. package/docs/operations/appointments.reschedule.md +6 -0
  26. package/docs/operations/graph.getMedicalConcept.md +1 -1
  27. package/docs/operations/graph.getMedicalConceptRelationships.md +2 -2
  28. package/docs/operations/graph.getMedicalConceptVocabularies.md +1 -1
  29. package/docs/operations/graph.listMedicalConceptsGet.md +56 -16
  30. package/docs/operations/graph.searchMedicalConcepts.md +73 -27
  31. package/docs/operations/graph.searchMedicalConceptsGet.md +73 -27
  32. package/docs/operations/patient.addInsurance.md +11 -5
  33. package/docs/operations/patient.addPatientIntake.md +3 -3
  34. package/docs/operations/patient.checkPatientInsuranceEligibility.md +11 -5
  35. package/docs/operations/patient.checkPatientInsuranceNetwork.md +212 -0
  36. package/docs/operations/patient.setPreferredPharmacy.md +9 -0
  37. package/docs/operations/patient.updateAddress.md +9 -0
  38. package/docs/operations/patient.updateDemographics.md +9 -0
  39. package/docs/operations/patient.updatePatientAttributes.md +9 -0
  40. package/docs/operations/patient.updatePatientFlags.md +9 -0
  41. package/docs/operations/patient.updatePhone.md +9 -0
  42. package/docs/operations/patient.updateRace.md +9 -0
  43. package/package.json +1 -1
@@ -0,0 +1,212 @@
1
+ # Check an explicitly selected saved plan and provider against the loaded directory
2
+
3
+ Operation ID: `patient.checkPatientInsuranceNetwork`
4
+
5
+ Read-only directory check for the authenticated patient. Unique owned active primary Coverage (or the only active Coverage) is loaded server-side; ambiguity asks for an explicit owned coverage_id. The selected target provider and exact canonical plan must be known before membership is checked; virtual-practice, pharmacy and requesting-organization NPIs are never target defaults. No trusted canonical graph ID is currently stored in Coverage, so plan_graph_id is an explicit missing choice. Missing selectors return clarification choices. Optional plan_name is explicit user-named search text for saved cards without a plan display name; it never establishes canonical identity. Even one suggested plan is never selected automatically. Provider identity and membership come from existing Graph API operations. in_network means a loaded directory link, with actual basis/confidence preserved; missing membership means unknown, never out_of_network. source identifies the operation, not issuer provenance or load time. plan_choices_incomplete marks a bounded non-exhaustive list. request_id/check_id correlate one action; callers must also compare the current card context and latest action before applying a result. Eligibility is independent: this operation never calls Stedi, changes Coverage, or creates another insurance card.
6
+
7
+ ## Public method
8
+
9
+ `checkInsuranceNetwork`
10
+
11
+ Signature: `patient.checkInsuranceNetwork(request)`
12
+
13
+ Return type: `Promise<CheckInsuranceNetworkResponse>`
14
+
15
+ ## Authentication
16
+
17
+ Classification: **AUTHENTICATED**
18
+
19
+ Schemes: `bearerAuth`
20
+
21
+ ## Prerequisites
22
+
23
+ None documented.
24
+
25
+ ## HTTP
26
+
27
+ `POST /insurance/network`
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` | [`CheckInsuranceNetworkRequest`](../models/CheckInsuranceNetworkRequest.md) | Yes | | | | No | |
42
+
43
+ Request model: [`CheckInsuranceNetworkRequest`](../models/CheckInsuranceNetworkRequest.md)
44
+
45
+ ## Request example
46
+
47
+ ```json
48
+ {
49
+ "coverage_id": "string",
50
+ "plan_name": "string",
51
+ "request_id": "00000000-0000-0000-0000-000000000000"
52
+ }
53
+ ```
54
+
55
+ ## Success responses
56
+
57
+ | Status | Shape | Content type | Description |
58
+ |---|---|---|---|
59
+ | `200` | [`CheckInsuranceNetworkResponse`](../models/CheckInsuranceNetworkResponse.md) | application/json | Completed directory answer or explicit selection required. |
60
+
61
+ ## Success response examples
62
+
63
+ ### 200
64
+
65
+ ```json
66
+ {
67
+ "check_id": "00000000-0000-0000-0000-000000000000",
68
+ "checked_at": "2026-01-01T09:00:00Z",
69
+ "coverage_choices": [
70
+ {
71
+ "coverage_id": "string",
72
+ "payer_name": "string",
73
+ "plan_name": "string",
74
+ "priority": 1
75
+ }
76
+ ],
77
+ "coverage_id": "string",
78
+ "coverage_selection": "explicit_choice",
79
+ "evidence": [
80
+ {
81
+ "basis": "string",
82
+ "confidence": "string",
83
+ "network": "string",
84
+ "network_graph_id": "string",
85
+ "network_id": "string"
86
+ }
87
+ ],
88
+ "network_status": "in_network",
89
+ "plan_choices": [],
90
+ "plan_choices_incomplete": false,
91
+ "plan_selection": "explicit_choice",
92
+ "provider_name": "string",
93
+ "reason": "coverage_selection_required",
94
+ "source": "graph.listProviderPlans",
95
+ "status": "completed"
96
+ }
97
+ ```
98
+
99
+ ## Common errors
100
+
101
+ | Status | Shape | Content type | Description |
102
+ |---|---|---|---|
103
+ | `401` | [`patient.ErrorResponse`](../models/patient.ErrorResponse.md) | application/json | Authorization required — missing, invalid, expired, or non-patient Bearer JWT |
104
+ | `404` | [`patient.ErrorResponse`](../models/patient.ErrorResponse.md) | application/json | Patient or selected owned insurance record not found. |
105
+ | `422` | [`patient.ErrorResponse`](../models/patient.ErrorResponse.md) | application/json | Invalid closed network-check request. |
106
+ | `503` | [`CheckInsuranceNetworkResponse`](../models/CheckInsuranceNetworkResponse.md) | application/json | Safe unavailable result, never a successful directory absence. |
107
+
108
+ ## Error examples
109
+
110
+ ### 401 — Missing or invalid access token
111
+
112
+ ```json
113
+ {
114
+ "error": "Authorization required"
115
+ }
116
+ ```
117
+
118
+ ### 404
119
+
120
+ ```json
121
+ {
122
+ "details": [
123
+ {}
124
+ ],
125
+ "error": "string"
126
+ }
127
+ ```
128
+
129
+ ### 422
130
+
131
+ ```json
132
+ {
133
+ "details": [
134
+ {}
135
+ ],
136
+ "error": "string"
137
+ }
138
+ ```
139
+
140
+ ### 503
141
+
142
+ ```json
143
+ {
144
+ "check_id": "00000000-0000-0000-0000-000000000000",
145
+ "checked_at": "2026-01-01T09:00:00Z",
146
+ "coverage_choices": [
147
+ {
148
+ "coverage_id": "string",
149
+ "payer_name": "string",
150
+ "plan_name": "string",
151
+ "priority": 1
152
+ }
153
+ ],
154
+ "coverage_id": "string",
155
+ "coverage_selection": "explicit_choice",
156
+ "evidence": [
157
+ {
158
+ "basis": "string",
159
+ "confidence": "string",
160
+ "network": "string",
161
+ "network_graph_id": "string",
162
+ "network_id": "string"
163
+ }
164
+ ],
165
+ "network_status": "in_network",
166
+ "plan_choices": [],
167
+ "plan_choices_incomplete": false,
168
+ "plan_selection": "explicit_choice",
169
+ "provider_name": "string",
170
+ "reason": "coverage_selection_required",
171
+ "source": "graph.listProviderPlans",
172
+ "status": "completed"
173
+ }
174
+ ```
175
+
176
+ ## NodeJS / TypeScript implementation
177
+
178
+ ```ts
179
+ import { HCSDK } from "@healthcloudai/hc-sdk";
180
+ ```
181
+
182
+ ```ts
183
+ const request = {
184
+ "coverage_id": "string",
185
+ "plan_name": "string",
186
+ "request_id": "00000000-0000-0000-0000-000000000000"
187
+ };
188
+
189
+ const result = await patient.checkInsuranceNetwork(request);
190
+ ```
191
+
192
+ ## cURL
193
+
194
+ ```bash
195
+ curl -X POST \
196
+ -H 'Authorization: Bearer <ACCESS_TOKEN>' \
197
+ -H 'Content-Type: application/json' \
198
+ -d '{"coverage_id":"string","plan_name":"string","request_id":"00000000-0000-0000-0000-000000000000"}' \
199
+ 'https://dev-api-patient.health.cloud/insurance/network'
200
+ ```
201
+
202
+ ## Notes
203
+
204
+ None.
205
+
206
+ ## Prepared Test Console scenario
207
+
208
+ No canonical scenario is currently associated.
209
+
210
+ ## Real response
211
+
212
+ No approved real integration response is currently published. Unapproved candidates are never rendered as examples.
@@ -89,6 +89,7 @@ Request model: [`SetPreferredPharmacyRequest`](../models/SetPreferredPharmacyReq
89
89
  | `400` | [`patient.ErrorResponse`](../models/patient.ErrorResponse.md) | application/json | The pharmacy payload failed validation |
90
90
  | `401` | [`patient.ErrorResponse`](../models/patient.ErrorResponse.md) | application/json | Authorization required — missing, invalid, expired, or non-patient Bearer JWT |
91
91
  | `404` | [`patient.ErrorResponse`](../models/patient.ErrorResponse.md) | application/json | The authenticated patient has no FHIR Patient record |
92
+ | `409` | [`patient.ErrorResponse`](../models/patient.ErrorResponse.md) | application/json | The Patient changed during all three version-checked write attempts, or the stored Patient has no version and cannot be updated safely. Refresh and retry. |
92
93
 
93
94
  ## Error examples
94
95
 
@@ -116,6 +117,14 @@ Request model: [`SetPreferredPharmacyRequest`](../models/SetPreferredPharmacyReq
116
117
  }
117
118
  ```
118
119
 
120
+ ### 409 — The Patient write could not be applied safely
121
+
122
+ ```json
123
+ {
124
+ "error": "Patient changed concurrently; try again"
125
+ }
126
+ ```
127
+
119
128
  ## NodeJS / TypeScript implementation
120
129
 
121
130
  ```ts
@@ -77,6 +77,7 @@ Request model: [`UpdateAddressRequest`](../models/UpdateAddressRequest.md)
77
77
  | `400` | [`patient.ErrorResponse`](../models/patient.ErrorResponse.md) | application/json | The address payload failed validation (street, city, state, and zip are required) |
78
78
  | `401` | [`patient.ErrorResponse`](../models/patient.ErrorResponse.md) | application/json | Authorization required — missing, invalid, expired, or non-patient Bearer JWT |
79
79
  | `404` | [`patient.ErrorResponse`](../models/patient.ErrorResponse.md) | application/json | The authenticated patient has no FHIR Patient record |
80
+ | `409` | [`patient.ErrorResponse`](../models/patient.ErrorResponse.md) | application/json | The Patient changed during all three version-checked write attempts, or the stored Patient has no version and cannot be updated safely. Refresh and retry. |
80
81
 
81
82
  ## Error examples
82
83
 
@@ -104,6 +105,14 @@ Request model: [`UpdateAddressRequest`](../models/UpdateAddressRequest.md)
104
105
  }
105
106
  ```
106
107
 
108
+ ### 409 — The Patient write could not be applied safely
109
+
110
+ ```json
111
+ {
112
+ "error": "Patient changed concurrently; try again"
113
+ }
114
+ ```
115
+
107
116
  ## NodeJS / TypeScript implementation
108
117
 
109
118
  ```ts
@@ -89,6 +89,7 @@ Request model: [`UpdateDemographicsRequest`](../models/UpdateDemographicsRequest
89
89
  | `400` | [`patient.ErrorResponse`](../models/patient.ErrorResponse.md) | application/json | Bad request — the body is empty or failed validation |
90
90
  | `401` | [`patient.ErrorResponse`](../models/patient.ErrorResponse.md) | application/json | Authorization required — missing, invalid, expired, or non-patient Bearer JWT |
91
91
  | `404` | [`patient.ErrorResponse`](../models/patient.ErrorResponse.md) | application/json | The authenticated patient has no FHIR Patient record |
92
+ | `409` | [`patient.ErrorResponse`](../models/patient.ErrorResponse.md) | application/json | The Patient changed during all three version-checked write attempts, or the stored Patient has no version and cannot be updated safely. Refresh and retry. |
92
93
 
93
94
  ## Error examples
94
95
 
@@ -116,6 +117,14 @@ Request model: [`UpdateDemographicsRequest`](../models/UpdateDemographicsRequest
116
117
  }
117
118
  ```
118
119
 
120
+ ### 409 — The Patient write could not be applied safely
121
+
122
+ ```json
123
+ {
124
+ "error": "Patient changed concurrently; try again"
125
+ }
126
+ ```
127
+
119
128
  ## NodeJS / TypeScript implementation
120
129
 
121
130
  ```ts
@@ -74,6 +74,7 @@ Request model: [`UpdatePatientAttributesRequest`](../models/UpdatePatientAttribu
74
74
  | `400` | [`patient.ErrorResponse`](../models/patient.ErrorResponse.md) | application/json | The attributes body failed validation (not an object, or a value JSON cannot represent) |
75
75
  | `401` | [`patient.ErrorResponse`](../models/patient.ErrorResponse.md) | application/json | Authorization required — missing, invalid, expired, or non-patient Bearer JWT |
76
76
  | `404` | [`patient.ErrorResponse`](../models/patient.ErrorResponse.md) | application/json | The authenticated patient has no FHIR Patient record |
77
+ | `409` | [`patient.ErrorResponse`](../models/patient.ErrorResponse.md) | application/json | The Patient changed during all three version-checked write attempts, or the stored Patient has no version and cannot be updated safely. Refresh and retry. |
77
78
 
78
79
  ## Error examples
79
80
 
@@ -101,6 +102,14 @@ Request model: [`UpdatePatientAttributesRequest`](../models/UpdatePatientAttribu
101
102
  }
102
103
  ```
103
104
 
105
+ ### 409 — The Patient write could not be applied safely
106
+
107
+ ```json
108
+ {
109
+ "error": "Patient changed concurrently; try again"
110
+ }
111
+ ```
112
+
104
113
  ## NodeJS / TypeScript implementation
105
114
 
106
115
  ```ts
@@ -75,6 +75,7 @@ Request model: [`UpdatePatientFlagsRequest`](../models/UpdatePatientFlagsRequest
75
75
  | `400` | [`patient.ErrorResponse`](../models/patient.ErrorResponse.md) | application/json | The request body failed flags validation (e.g. a non-boolean value) |
76
76
  | `401` | [`patient.ErrorResponse`](../models/patient.ErrorResponse.md) | application/json | Authorization required — missing, invalid, expired, or non-patient Bearer JWT |
77
77
  | `404` | [`patient.ErrorResponse`](../models/patient.ErrorResponse.md) | application/json | The authenticated patient has no FHIR Patient record |
78
+ | `409` | [`patient.ErrorResponse`](../models/patient.ErrorResponse.md) | application/json | The Patient changed during all three version-checked write attempts, or the stored Patient has no version and cannot be updated safely. Refresh and retry. |
78
79
 
79
80
  ## Error examples
80
81
 
@@ -102,6 +103,14 @@ Request model: [`UpdatePatientFlagsRequest`](../models/UpdatePatientFlagsRequest
102
103
  }
103
104
  ```
104
105
 
106
+ ### 409 — The Patient write could not be applied safely
107
+
108
+ ```json
109
+ {
110
+ "error": "Patient changed concurrently; try again"
111
+ }
112
+ ```
113
+
105
114
  ## NodeJS / TypeScript implementation
106
115
 
107
116
  ```ts
@@ -73,6 +73,7 @@ Request model: [`patient.UpdatePhoneRequest`](../models/patient.UpdatePhoneReque
73
73
  | `400` | [`patient.ErrorResponse`](../models/patient.ErrorResponse.md) | application/json | Bad request — phone is missing, malformed, or not a dialable number |
74
74
  | `401` | [`patient.ErrorResponse`](../models/patient.ErrorResponse.md) | application/json | Authorization required — missing, invalid, expired, or non-patient Bearer JWT |
75
75
  | `404` | [`patient.ErrorResponse`](../models/patient.ErrorResponse.md) | application/json | The authenticated patient has no FHIR Patient record |
76
+ | `409` | [`patient.ErrorResponse`](../models/patient.ErrorResponse.md) | application/json | The Patient changed during all three version-checked write attempts, or the stored Patient has no version and cannot be updated safely. Refresh and retry. |
76
77
  | `502` | [`patient.ErrorResponse`](../models/patient.ErrorResponse.md) | application/json | The SMS provider could not be reached or rejected our credentials. The phone number itself was accepted; this is a server-side fault, so the request may be retried unchanged. |
77
78
 
78
79
  ## Error examples
@@ -125,6 +126,14 @@ Request model: [`patient.UpdatePhoneRequest`](../models/patient.UpdatePhoneReque
125
126
  }
126
127
  ```
127
128
 
129
+ ### 409 — The Patient write could not be applied safely
130
+
131
+ ```json
132
+ {
133
+ "error": "Patient changed concurrently; try again"
134
+ }
135
+ ```
136
+
128
137
  ### 502 — Our SMS provider credentials are invalid or expired
129
138
 
130
139
  ```json
@@ -75,6 +75,7 @@ Request model: [`UpdateRaceRequest`](../models/UpdateRaceRequest.md)
75
75
  | `400` | [`patient.ErrorResponse`](../models/patient.ErrorResponse.md) | application/json | Bad request — races is missing/empty, or contains an unrecognized code |
76
76
  | `401` | [`patient.ErrorResponse`](../models/patient.ErrorResponse.md) | application/json | Authorization required — missing, invalid, expired, or non-patient Bearer JWT |
77
77
  | `404` | [`patient.ErrorResponse`](../models/patient.ErrorResponse.md) | application/json | The authenticated patient has no FHIR Patient record |
78
+ | `409` | [`patient.ErrorResponse`](../models/patient.ErrorResponse.md) | application/json | The Patient changed during all three version-checked write attempts, or the stored Patient has no version and cannot be updated safely. Refresh and retry. |
78
79
 
79
80
  ## Error examples
80
81
 
@@ -102,6 +103,14 @@ Request model: [`UpdateRaceRequest`](../models/UpdateRaceRequest.md)
102
103
  }
103
104
  ```
104
105
 
106
+ ### 409 — The Patient write could not be applied safely
107
+
108
+ ```json
109
+ {
110
+ "error": "Patient changed concurrently; try again"
111
+ }
112
+ ```
113
+
105
114
  ## NodeJS / TypeScript implementation
106
115
 
107
116
  ```ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@healthcloudai/hc-sdk",
3
- "version": "3.36.0",
3
+ "version": "3.37.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",