@healthcloudai/hc-sdk 3.5.2 → 3.6.1

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 (57) hide show
  1. package/dist/index.cjs +153 -17
  2. package/dist/index.d.cts +1618 -182
  3. package/dist/index.d.ts +1618 -182
  4. package/dist/index.js +153 -17
  5. package/docs/clients/AppointmentsClient.md +1 -1
  6. package/docs/clients/PatientClient.md +4 -1
  7. package/docs/clients/ProviderClient.md +1 -0
  8. package/docs/docs-manifest.json +28 -5
  9. package/docs/examples/index.md +6 -2
  10. package/docs/index.md +6 -2
  11. package/docs/models/AddPatientIntakeRequest.md +24 -0
  12. package/docs/models/AddPatientIntakeResponse.md +17 -0
  13. package/docs/models/AdvanceDirective.md +31 -0
  14. package/docs/models/AdvanceDirectiveType.md +15 -0
  15. package/docs/models/AthenaListAppointmentsRequest.md +1 -1
  16. package/docs/models/CarequalityRetrieveDocumentsRequest.md +1 -1
  17. package/docs/models/DirectiveScope.md +15 -0
  18. package/docs/models/DirectiveStatus.md +15 -0
  19. package/docs/models/GetAppointmentTelehealthLinkResponse.md +1 -1
  20. package/docs/models/GetHealthRecordResponse.md +2 -2
  21. package/docs/models/Immunization.md +40 -0
  22. package/docs/models/ImmunizationRoute.md +15 -0
  23. package/docs/models/ImmunizationStatus.md +15 -0
  24. package/docs/models/ListDirectivesResponse.md +1 -1
  25. package/docs/models/ListImmunizationsResponse.md +1 -1
  26. package/docs/models/ListProceduresResponse.md +1 -1
  27. package/docs/models/OpenAIEmbedRequest.md +1 -1
  28. package/docs/models/Procedure.md +37 -0
  29. package/docs/models/ProcedureLaterality.md +15 -0
  30. package/docs/models/ProcedureStatus.md +15 -0
  31. package/docs/models/SendGridSendEmailRequest.md +1 -1
  32. package/docs/models/StediClaimsResponse.md +18 -0
  33. package/docs/models/StediEligibilityBatchItem.md +22 -0
  34. package/docs/models/StediEligibilityBatchRequest.md +17 -0
  35. package/docs/models/StediEligibilityBatchResponse.md +17 -0
  36. package/docs/models/StediEligibilityCheckRequest.md +21 -0
  37. package/docs/models/StediRawX12EligibilityRequest.md +17 -0
  38. package/docs/models/VaccinationSite.md +15 -0
  39. package/docs/models/ehr.ImmunizationReaction.md +20 -0
  40. package/docs/models/ehr.ListMedicationsResponse.md +1 -1
  41. package/docs/models/index.md +20 -1
  42. package/docs/operations/appointments.getTelehealthLink.md +4 -4
  43. package/docs/operations/connectors.athenaListAppointments.md +1 -3
  44. package/docs/operations/connectors.carequalityRetrieveDocuments.md +11 -7
  45. package/docs/operations/connectors.openaiEmbed.md +3 -7
  46. package/docs/operations/connectors.sendgridSend.md +3 -7
  47. package/docs/operations/diagnostics.lookupTestByGs1.md +11 -3
  48. package/docs/operations/ehr.listMedications.md +2 -2
  49. package/docs/operations/patient.addPatientIntake.md +138 -0
  50. package/docs/operations/patient.checkPatientInsuranceEligibility.md +170 -0
  51. package/docs/operations/patient.listMedications.md +2 -2
  52. package/docs/operations/patient.listPatientInsuranceClaims.md +181 -0
  53. package/docs/operations/patient.submitPatientRawX12Eligibility.md +162 -0
  54. package/docs/operations/provider.submitInsuranceEligibilityBatch.md +164 -0
  55. package/package.json +1 -1
  56. package/docs/models/CheckEligibilityRequest.md +0 -23
  57. package/docs/operations/patient.checkEligibility.md +0 -147
@@ -52,9 +52,7 @@ Request model: [`OpenAIEmbedRequest`](../models/OpenAIEmbedRequest.md)
52
52
  "mode": "sandbox",
53
53
  "model": "text-embedding-3-small",
54
54
  "organization": "example-organization",
55
- "text": {
56
- "vendorField": "vendor-defined value"
57
- }
55
+ "text": "example-text"
58
56
  }
59
57
  ```
60
58
 
@@ -141,9 +139,7 @@ const body = {
141
139
  "mode": "sandbox",
142
140
  "model": "text-embedding-3-small",
143
141
  "organization": "example-organization",
144
- "text": {
145
- "vendorField": "vendor-defined value"
146
- }
142
+ "text": "example-text"
147
143
  };
148
144
 
149
145
  const result = await connectors.openai.createClient(config).embed(body);
@@ -155,7 +151,7 @@ const result = await connectors.openai.createClient(config).embed(body);
155
151
  curl -X POST \
156
152
  -H 'Authorization: Bearer <ACCESS_TOKEN>' \
157
153
  -H 'Content-Type: application/json' \
158
- -d '{"api_key":"example-api-key","default_model":"gpt-4o","environment":"example-environment","mode":"sandbox","model":"text-embedding-3-small","organization":"example-organization","text":{"vendorField":"vendor-defined value"}}' \
154
+ -d '{"api_key":"example-api-key","default_model":"gpt-4o","environment":"example-environment","mode":"sandbox","model":"text-embedding-3-small","organization":"example-organization","text":"example-text"}' \
159
155
  'https://dev-api-connectors.health.cloud/connectors/openai/embed'
160
156
  ```
161
157
 
@@ -53,9 +53,7 @@ Request model: [`SendGridSendEmailRequest`](../models/SendGridSendEmailRequest.m
53
53
  "mode": "sandbox",
54
54
  "subject": "Your appointment confirmation",
55
55
  "text_content": "Your appointment is confirmed.",
56
- "to": {
57
- "vendorField": "vendor-defined value"
58
- }
56
+ "to": "patient@example.com"
59
57
  }
60
58
  ```
61
59
 
@@ -144,9 +142,7 @@ const body = {
144
142
  "mode": "sandbox",
145
143
  "subject": "Your appointment confirmation",
146
144
  "text_content": "Your appointment is confirmed.",
147
- "to": {
148
- "vendorField": "vendor-defined value"
149
- }
145
+ "to": "patient@example.com"
150
146
  };
151
147
 
152
148
  const result = await connectors.sendgrid.createClient(config).sendEmail(body);
@@ -158,7 +154,7 @@ const result = await connectors.sendgrid.createClient(config).sendEmail(body);
158
154
  curl -X POST \
159
155
  -H 'Authorization: Bearer <ACCESS_TOKEN>' \
160
156
  -H 'Content-Type: application/json' \
161
- -d '{"api_key":"example-api-key","from_email":"patient@example.com","from_name":"Example Name","html_content":"<p>Your appointment is confirmed.</p>","mode":"sandbox","subject":"Your appointment confirmation","text_content":"Your appointment is confirmed.","to":{"vendorField":"vendor-defined value"}}' \
157
+ -d '{"api_key":"example-api-key","from_email":"patient@example.com","from_name":"Example Name","html_content":"<p>Your appointment is confirmed.</p>","mode":"sandbox","subject":"Your appointment confirmation","text_content":"Your appointment is confirmed.","to":"patient@example.com"}' \
162
158
  'https://dev-api-connectors.health.cloud/connectors/sendgrid/send-email'
163
159
  ```
164
160
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Operation ID: `diagnostics.lookupTestByGs1`
4
4
 
5
- Parse a GS1 Application Identifier barcode string (?gs1=) and, if the GTIN is recognized, return the matching manufacturer test profile (IFU instructions, analytes, regulatory status) from the catalog. product is null when the GTIN is not recognized. Same PATIENT-pool ownership rule as diagnostics.listDiagnostics applies to {patient_id}, though the lookup itself is not patient-scoped — it queries the shared test-kit catalog.
5
+ Parse a GS1 Application Identifier barcode string (?gs1=) and, if the GTIN is recognized, return the matching manufacturer test profile (IFU instructions, analytes, regulatory status) from the catalog. A GTIN of any standard length (8/12/13/14 digits) is accepted and normalized to canonical GTIN-14 before matching. A syntactically valid barcode whose GTIN isn't in the catalog is 404, not a 200 with a null product. Same PATIENT-pool ownership rule as diagnostics.listDiagnostics applies to {patient_id}, though the lookup itself is not patient-scoped — it queries the shared test-kit catalog.
6
6
 
7
7
  ## Public method
8
8
 
@@ -84,10 +84,10 @@ None declared in canonical OpenAPI.
84
84
 
85
85
  | Status | Shape | Content type | Description |
86
86
  |---|---|---|---|
87
- | `400` | [`diagnostics.ErrorResponse`](../models/diagnostics.ErrorResponse.md) | application/json | The gs1 query parameter was not supplied |
87
+ | `400` | [`diagnostics.ErrorResponse`](../models/diagnostics.ErrorResponse.md) | application/json | The gs1 query parameter was missing or could not be parsed as a GS1 barcode |
88
88
  | `401` | [`diagnostics.ErrorResponse`](../models/diagnostics.ErrorResponse.md) | application/json | Authorization required — missing or invalid Bearer JWT |
89
89
  | `403` | [`diagnostics.ErrorResponse`](../models/diagnostics.ErrorResponse.md) | application/json | A PATIENT-pool caller attempted to access another patient's data |
90
- | `404` | [`diagnostics.ErrorResponse`](../models/diagnostics.ErrorResponse.md) | application/json | The PATIENT-pool caller's own FHIR Patient record could not be resolved |
90
+ | `404` | [`diagnostics.ErrorResponse`](../models/diagnostics.ErrorResponse.md) | application/json | The GS1 barcode parsed cleanly but its GTIN has no configured test profile |
91
91
  | `500` | [`diagnostics.ErrorResponse`](../models/diagnostics.ErrorResponse.md) | application/json | Internal server error |
92
92
 
93
93
  ## Error examples
@@ -124,6 +124,14 @@ None declared in canonical OpenAPI.
124
124
  }
125
125
  ```
126
126
 
127
+ ### 404 — GTIN parsed but not in the catalog
128
+
129
+ ```json
130
+ {
131
+ "error": "No diagnostic test profile is configured for GTIN 00000000000000"
132
+ }
133
+ ```
134
+
127
135
  ### 500 — Unexpected service failure (sanitized example)
128
136
 
129
137
  ```json
@@ -2,7 +2,7 @@
2
2
 
3
3
  Operation ID: `ehr.listMedications`
4
4
 
5
- List medication resources for a patient. ?resource_type= selects the FHIR resource type queried (MedicationRequest, MedicationStatement, ...); defaults to MedicationRequest.
5
+ List medication resources for a patient. ?resource_type= optionally filters to one FHIR resource type (MedicationRequest, MedicationStatement); omitted, returns both.
6
6
 
7
7
  ## Public method
8
8
 
@@ -36,7 +36,7 @@ None documented.
36
36
 
37
37
  | Name | Type | Required | Format | Allowed values | Default | Nullable | Description |
38
38
  |---|---|---:|---|---|---|---:|---|
39
- | `resource_type` | `string` | No | | MedicationRequest, MedicationStatement | `"MedicationRequest"` | No | |
39
+ | `resource_type` | `string` | No | | MedicationRequest, MedicationStatement | | No | Optional filter; omit to get both MedicationRequest and MedicationStatement. |
40
40
 
41
41
  ## Body parameters
42
42
 
@@ -0,0 +1,138 @@
1
+ # Add one structured patient intake section
2
+
3
+ Operation ID: `patient.addPatientIntake`
4
+
5
+ Adds exactly one agent-collected intake section to FHIR and Athena. Returns an empty error_messages list only after both FHIR storage and Athena chart read-back succeed.
6
+
7
+ ## Public method
8
+
9
+ `addToIntake`
10
+
11
+ Signature: `patient.addToIntake(patientId, section, summary)`
12
+
13
+ Return type: `Promise<AddPatientIntakeResponse>`
14
+
15
+ ## Authentication
16
+
17
+ Classification: **AUTHENTICATED**
18
+
19
+ Schemes: `bearerAuth`
20
+
21
+ ## Prerequisites
22
+
23
+ None documented.
24
+
25
+ ## HTTP
26
+
27
+ `POST /healthrecords/intake/add`
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` | [`AddPatientIntakeRequest`](../models/AddPatientIntakeRequest.md) | Yes | | | | No | |
42
+
43
+ Request model: [`AddPatientIntakeRequest`](../models/AddPatientIntakeRequest.md)
44
+
45
+ ## Request example
46
+
47
+ ```json
48
+ {
49
+ "patient_id": "string",
50
+ "section": "allergies",
51
+ "summary": {}
52
+ }
53
+ ```
54
+
55
+ ## Success responses
56
+
57
+ | Status | Shape | Content type | Description |
58
+ |---|---|---|---|
59
+ | `200` | [`AddPatientIntakeResponse`](../models/AddPatientIntakeResponse.md) | application/json | FHIR and EHR write/read-back succeeded |
60
+
61
+ ## Success response examples
62
+
63
+ ### 200
64
+
65
+ ```json
66
+ {
67
+ "error_messages": [
68
+ "string"
69
+ ]
70
+ }
71
+ ```
72
+
73
+ ## Common errors
74
+
75
+ | Status | Shape | Content type | Description |
76
+ |---|---|---|---|
77
+ | `422` | [`AddPatientIntakeResponse`](../models/AddPatientIntakeResponse.md) | application/json | The submitted section needs correction |
78
+ | `502` | [`AddPatientIntakeResponse`](../models/AddPatientIntakeResponse.md) | application/json | FHIR or EHR completion could not be confirmed |
79
+
80
+ ## Error examples
81
+
82
+ ### 422
83
+
84
+ ```json
85
+ {
86
+ "error_messages": [
87
+ "string"
88
+ ]
89
+ }
90
+ ```
91
+
92
+ ### 502
93
+
94
+ ```json
95
+ {
96
+ "error_messages": [
97
+ "string"
98
+ ]
99
+ }
100
+ ```
101
+
102
+ ## NodeJS / TypeScript implementation
103
+
104
+ ```ts
105
+ import { HCSDK } from "@healthcloudai/hc-sdk";
106
+ ```
107
+
108
+ ```ts
109
+ const patientId = "<PATIENT_ID>";
110
+
111
+ const section = "<SECTION>";
112
+
113
+ const summary = "<SUMMARY>";
114
+
115
+ const result = await patient.addToIntake(patientId, section, summary);
116
+ ```
117
+
118
+ ## cURL
119
+
120
+ ```bash
121
+ curl -X POST \
122
+ -H 'Authorization: Bearer <ACCESS_TOKEN>' \
123
+ -H 'Content-Type: application/json' \
124
+ -d '{"patient_id":"string","section":"allergies","summary":{}}' \
125
+ 'https://dev-api-patient.health.cloud/healthrecords/intake/add'
126
+ ```
127
+
128
+ ## Notes
129
+
130
+ None.
131
+
132
+ ## Prepared Test Console scenario
133
+
134
+ No canonical scenario is currently associated.
135
+
136
+ ## Real response
137
+
138
+ No approved real integration response is currently published. Unapproved candidates are never rendered as examples.
@@ -0,0 +1,170 @@
1
+ # Check insurance eligibility and benefits
2
+
3
+ Operation ID: `patient.checkPatientInsuranceEligibility`
4
+
5
+ Check the authenticated patient's active insurance coverage and benefits for requested services. The patient is resolved only from the Bearer JWT.
6
+
7
+ ## Public method
8
+
9
+ `checkInsuranceEligibility`
10
+
11
+ Signature: `patient.checkInsuranceEligibility(request)`
12
+
13
+ Return type: `Promise<JsonValue>`
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/eligibility`
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` | [`StediEligibilityCheckRequest`](../models/StediEligibilityCheckRequest.md) | Yes | | | | No | |
42
+
43
+ Request model: [`StediEligibilityCheckRequest`](../models/StediEligibilityCheckRequest.md)
44
+
45
+ ## Request example
46
+
47
+ ```json
48
+ {
49
+ "dependent": {},
50
+ "encounter": {},
51
+ "payer_id": "string",
52
+ "provider": {},
53
+ "subscriber": {}
54
+ }
55
+ ```
56
+
57
+ ## Success responses
58
+
59
+ | Status | Shape | Content type | Description |
60
+ |---|---|---|---|
61
+ | `200` | [`patient.JsonValue`](../models/patient.JsonValue.md) | application/json | Eligibility payload is relayed from Stedi and its fields vary by payer and benefit configuration. |
62
+
63
+ ## Success response examples
64
+
65
+ ### 200
66
+
67
+ ```json
68
+ {}
69
+ ```
70
+
71
+ ## Common errors
72
+
73
+ | Status | Shape | Content type | Description |
74
+ |---|---|---|---|
75
+ | `401` | [`patient.ErrorResponse`](../models/patient.ErrorResponse.md) | application/json | Authorization required — missing, invalid, expired, or non-patient Bearer JWT |
76
+ | `404` | [`patient.ErrorResponse`](../models/patient.ErrorResponse.md) | application/json | The authenticated patient has no FHIR Patient record |
77
+ | `422` | [`patient.ErrorResponse`](../models/patient.ErrorResponse.md) | application/json | The payer rejected the supplied eligibility request |
78
+ | `502` | [`patient.ErrorResponse`](../models/patient.ErrorResponse.md) | application/json | The insurance service could not be reached or returned an invalid response |
79
+ | `503` | [`patient.ErrorResponse`](../models/patient.ErrorResponse.md) | application/json | Insurance operations are not configured for this deployment |
80
+ | `504` | [`patient.ErrorResponse`](../models/patient.ErrorResponse.md) | application/json | The insurance service did not respond before the request timeout |
81
+
82
+ ## Error examples
83
+
84
+ ### 401 — Missing or invalid access token
85
+
86
+ ```json
87
+ {
88
+ "error": "Authorization required"
89
+ }
90
+ ```
91
+
92
+ ### 404 — Patient not found
93
+
94
+ ```json
95
+ {
96
+ "error": "Patient not found"
97
+ }
98
+ ```
99
+
100
+ ### 422 — The payer rejected invalid subscriber or provider data
101
+
102
+ ```json
103
+ {
104
+ "error": "Insurance request was rejected: invalid request data"
105
+ }
106
+ ```
107
+
108
+ ### 502 — Upstream insurance service is unavailable
109
+
110
+ ```json
111
+ {
112
+ "error": "Insurance service is unavailable"
113
+ }
114
+ ```
115
+
116
+ ### 503 — No Stedi API key is configured
117
+
118
+ ```json
119
+ {
120
+ "error": "Insurance eligibility is not configured"
121
+ }
122
+ ```
123
+
124
+ ### 504 — Eligibility request timed out
125
+
126
+ ```json
127
+ {
128
+ "error": "Insurance service timed out; retry the request"
129
+ }
130
+ ```
131
+
132
+ ## NodeJS / TypeScript implementation
133
+
134
+ ```ts
135
+ import { HCSDK } from "@healthcloudai/hc-sdk";
136
+ ```
137
+
138
+ ```ts
139
+ const request = {
140
+ "dependent": {},
141
+ "encounter": {},
142
+ "payer_id": "string",
143
+ "provider": {},
144
+ "subscriber": {}
145
+ };
146
+
147
+ const result = await patient.checkInsuranceEligibility(request);
148
+ ```
149
+
150
+ ## cURL
151
+
152
+ ```bash
153
+ curl -X POST \
154
+ -H 'Authorization: Bearer <ACCESS_TOKEN>' \
155
+ -H 'Content-Type: application/json' \
156
+ -d '{"dependent":{},"encounter":{},"payer_id":"string","provider":{},"subscriber":{}}' \
157
+ 'https://dev-api-patient.health.cloud/insurance/eligibility'
158
+ ```
159
+
160
+ ## Notes
161
+
162
+ None.
163
+
164
+ ## Prepared Test Console scenario
165
+
166
+ No canonical scenario is currently associated.
167
+
168
+ ## Real response
169
+
170
+ 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.listMedications`
4
4
 
5
- Return the authenticated patient's medications, filtered by `resource_type` (defaults to `MedicationRequest`). Requires a patient Bearer JWT.
5
+ Return the authenticated patient's medications, optionally filtered by `resource_type` (MedicationRequest or MedicationStatement); omitted, returns both. Requires a patient Bearer JWT.
6
6
 
7
7
  ## Public method
8
8
 
@@ -34,7 +34,7 @@ None.
34
34
 
35
35
  | Name | Type | Required | Format | Allowed values | Default | Nullable | Description |
36
36
  |---|---|---:|---|---|---|---:|---|
37
- | `resource_type` | `string` | No | | MedicationRequest, MedicationStatement | `"MedicationRequest"` | No | |
37
+ | `resource_type` | `string` | No | | MedicationRequest, MedicationStatement | | No | Optional filter; omit to get both MedicationRequest and MedicationStatement. |
38
38
 
39
39
  ## Body parameters
40
40
 
@@ -0,0 +1,181 @@
1
+ # List claims for the authenticated patient
2
+
3
+ Operation ID: `patient.listPatientInsuranceClaims`
4
+
5
+ List claims linked to the authenticated patient. HealthCloud reads the patient from the Bearer JWT and supplies only Stedi claim-control numbers recorded by a server-created FHIR Claim; callers cannot query arbitrary claim numbers.
6
+
7
+ ## Public method
8
+
9
+ `listInsuranceClaims`
10
+
11
+ Signature: `patient.listInsuranceClaims(query)`
12
+
13
+ Return type: `Promise<StediClaimsResponse>`
14
+
15
+ ## Authentication
16
+
17
+ Classification: **AUTHENTICATED**
18
+
19
+ Schemes: `bearerAuth`
20
+
21
+ ## Prerequisites
22
+
23
+ None documented.
24
+
25
+ ## HTTP
26
+
27
+ `GET /insurance/claims`
28
+
29
+ ## Path parameters
30
+
31
+ None.
32
+
33
+ ## Query parameters
34
+
35
+ | Name | Type | Required | Format | Allowed values | Default | Nullable | Description |
36
+ |---|---|---:|---|---|---|---:|---|
37
+ | `page_size` | `integer` | No | | | `20` | No | |
38
+ | `page_token` | `string` | No | | | | No | Pagination token returned by a prior claim-list response. |
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` | [`StediClaimsResponse`](../models/StediClaimsResponse.md) | application/json | Claims linked to the authenticated patient |
55
+
56
+ ## Success response examples
57
+
58
+ ### 200
59
+
60
+ ```json
61
+ {
62
+ "items": [
63
+ {}
64
+ ],
65
+ "nextPageToken": "string"
66
+ }
67
+ ```
68
+
69
+ ## Common errors
70
+
71
+ | Status | Shape | Content type | Description |
72
+ |---|---|---|---|
73
+ | `400` | [`patient.ErrorResponse`](../models/patient.ErrorResponse.md) | application/json | page_size is not an integer from 1 through 100 |
74
+ | `401` | [`patient.ErrorResponse`](../models/patient.ErrorResponse.md) | application/json | Authorization required — missing, invalid, expired, or non-patient Bearer JWT |
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 | No Stedi claim-control number is linked to this patient yet |
77
+ | `422` | [`patient.ErrorResponse`](../models/patient.ErrorResponse.md) | application/json | The payer rejected the supplied eligibility request |
78
+ | `502` | [`patient.ErrorResponse`](../models/patient.ErrorResponse.md) | application/json | The insurance service could not be reached or returned an invalid response |
79
+ | `503` | [`patient.ErrorResponse`](../models/patient.ErrorResponse.md) | application/json | Insurance operations are not configured for this deployment |
80
+ | `504` | [`patient.ErrorResponse`](../models/patient.ErrorResponse.md) | application/json | The insurance service did not respond before the request timeout |
81
+
82
+ ## Error examples
83
+
84
+ ### 400 — Invalid page size
85
+
86
+ ```json
87
+ {
88
+ "error": "page_size must be an integer between 1 and 100"
89
+ }
90
+ ```
91
+
92
+ ### 401 — Missing or invalid access token
93
+
94
+ ```json
95
+ {
96
+ "error": "Authorization required"
97
+ }
98
+ ```
99
+
100
+ ### 404 — Patient not found
101
+
102
+ ```json
103
+ {
104
+ "error": "Patient not found"
105
+ }
106
+ ```
107
+
108
+ ### 409 — No claims linked
109
+
110
+ ```json
111
+ {
112
+ "error": "No insurance claims are linked to this patient"
113
+ }
114
+ ```
115
+
116
+ ### 422 — The payer rejected invalid subscriber or provider data
117
+
118
+ ```json
119
+ {
120
+ "error": "Insurance request was rejected: invalid request data"
121
+ }
122
+ ```
123
+
124
+ ### 502 — Upstream insurance service is unavailable
125
+
126
+ ```json
127
+ {
128
+ "error": "Insurance service is unavailable"
129
+ }
130
+ ```
131
+
132
+ ### 503 — No Stedi API key is configured
133
+
134
+ ```json
135
+ {
136
+ "error": "Insurance eligibility is not configured"
137
+ }
138
+ ```
139
+
140
+ ### 504 — Eligibility request timed out
141
+
142
+ ```json
143
+ {
144
+ "error": "Insurance service timed out; retry the request"
145
+ }
146
+ ```
147
+
148
+ ## NodeJS / TypeScript implementation
149
+
150
+ ```ts
151
+ import { HCSDK } from "@healthcloudai/hc-sdk";
152
+ ```
153
+
154
+ ```ts
155
+ const query = {
156
+ "page_size": 20,
157
+ "page_token": "<PAGE_TOKEN>"
158
+ };
159
+
160
+ const result = await patient.listInsuranceClaims(query);
161
+ ```
162
+
163
+ ## cURL
164
+
165
+ ```bash
166
+ curl -X GET \
167
+ -H 'Authorization: Bearer <ACCESS_TOKEN>' \
168
+ 'https://dev-api-patient.health.cloud/insurance/claims?page_size=20&page_token=%3CPAGE_TOKEN%3E'
169
+ ```
170
+
171
+ ## Notes
172
+
173
+ None.
174
+
175
+ ## Prepared Test Console scenario
176
+
177
+ No canonical scenario is currently associated.
178
+
179
+ ## Real response
180
+
181
+ No approved real integration response is currently published. Unapproved candidates are never rendered as examples.