@healthcloudai/hc-sdk 3.16.0 → 3.18.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 (122) hide show
  1. package/dist/index.cjs +23 -0
  2. package/dist/index.d.cts +314 -2
  3. package/dist/index.d.ts +314 -2
  4. package/dist/index.js +23 -0
  5. package/docs/clients/PatientClient.md +2 -0
  6. package/docs/docs-manifest.json +78 -12
  7. package/docs/examples/index.md +2 -0
  8. package/docs/index.md +2 -0
  9. package/docs/models/AlcoholFrequency.md +15 -0
  10. package/docs/models/AlcoholUse.md +20 -0
  11. package/docs/models/BodyHeight.md +17 -0
  12. package/docs/models/BodyTemperature.md +18 -0
  13. package/docs/models/BodyWeight.md +18 -0
  14. package/docs/models/BookAppointmentRequest.md +2 -0
  15. package/docs/models/DietCategory.md +19 -0
  16. package/docs/models/EducationLevel.md +15 -0
  17. package/docs/models/ExerciseFrequency.md +15 -0
  18. package/docs/models/FunctionalLevel.md +15 -0
  19. package/docs/models/FunctionalStatus.md +40 -0
  20. package/docs/models/GetPractitionerResponse.md +8 -2
  21. package/docs/models/Insurance.md +2 -0
  22. package/docs/models/LicenseVerification.md +19 -0
  23. package/docs/models/ListAllergiesResponse.md +1 -1
  24. package/docs/models/ListConditionsResponse.md +1 -1
  25. package/docs/models/ListDirectivesResponse.md +1 -1
  26. package/docs/models/ListFamilyHistoryResponse.md +1 -1
  27. package/docs/models/ListImmunizationsResponse.md +1 -1
  28. package/docs/models/ListProceduresResponse.md +1 -1
  29. package/docs/models/ListQuestionnaireResponsesResponse.md +1 -1
  30. package/docs/models/LivingSituation.md +15 -0
  31. package/docs/models/NpiVerification.md +21 -0
  32. package/docs/models/OnboardingProgressRequest.md +18 -0
  33. package/docs/models/PortalRole.md +18 -0
  34. package/docs/models/Practitioner.md +9 -2
  35. package/docs/models/ProviderCredential.md +19 -0
  36. package/docs/models/ProviderEducationCredential.md +6 -2
  37. package/docs/models/ProviderEncounterListResponse.md +1 -1
  38. package/docs/models/ProviderEncounterRecord.md +49 -0
  39. package/docs/models/ProviderEncounterResponse.md +1 -1
  40. package/docs/models/ProviderLanguage.md +3 -2
  41. package/docs/models/ProviderOnboardingStatus.md +19 -0
  42. package/docs/models/ProviderPatientRecordResources.md +32 -0
  43. package/docs/models/ProviderPatientRecordResponse.md +1 -1
  44. package/docs/models/ProviderPostgraduateTraining.md +22 -0
  45. package/docs/models/ProviderProfessionalLiability.md +19 -0
  46. package/docs/models/ProviderSpecialty.md +1 -1
  47. package/docs/models/ProviderStateLicense.md +9 -2
  48. package/docs/models/ReplaceInsuranceRequest.md +25 -0
  49. package/docs/models/ReplaceInsuranceResponse.md +20 -0
  50. package/docs/models/RetireInsuranceRequest.md +17 -0
  51. package/docs/models/RetireInsuranceResponse.md +19 -0
  52. package/docs/models/SexualOrientation.md +15 -0
  53. package/docs/models/SmokingStatus.md +15 -0
  54. package/docs/models/SocialHistory.md +35 -0
  55. package/docs/models/SubstanceStatus.md +15 -0
  56. package/docs/models/SubstanceUse.md +23 -0
  57. package/docs/models/TobaccoUse.md +22 -0
  58. package/docs/models/UpdateEncounterClinicalNoteResponse.md +1 -1
  59. package/docs/models/UpdateEncounterStatusResponse.md +1 -1
  60. package/docs/models/UpdatePractitionerRequest.md +5 -0
  61. package/docs/models/UpdatePractitionerResponse.md +8 -2
  62. package/docs/models/VitalsRecord.md +41 -0
  63. package/docs/models/appointments.ErrorResponse.md +1 -0
  64. package/docs/models/diagnostics.Coding.md +19 -0
  65. package/docs/models/diagnostics.LabObservation.md +1 -1
  66. package/docs/models/{AdvanceDirective.md → ehr.AdvanceDirective.md} +1 -1
  67. package/docs/models/{Allergy.md → ehr.Allergy.md} +1 -1
  68. package/docs/models/ehr.Coding.md +19 -0
  69. package/docs/models/{FamilyHistoryEntry.md → ehr.FamilyHistoryEntry.md} +1 -1
  70. package/docs/models/{Immunization.md → ehr.Immunization.md} +1 -1
  71. package/docs/models/{Problem.md → ehr.Problem.md} +1 -1
  72. package/docs/models/{Procedure.md → ehr.Procedure.md} +1 -1
  73. package/docs/models/ehr.Quantity.md +20 -0
  74. package/docs/models/{QuestionnaireResponse.md → ehr.QuestionnaireResponse.md} +2 -2
  75. package/docs/models/{ResponseAnswer.md → ehr.ResponseAnswer.md} +4 -4
  76. package/docs/models/{ResponseItem.md → ehr.ResponseItem.md} +3 -3
  77. package/docs/models/index.md +73 -9
  78. package/docs/models/provider.AdvanceDirective.md +31 -0
  79. package/docs/models/provider.Allergy.md +31 -0
  80. package/docs/models/provider.AllergyReaction.md +21 -0
  81. package/docs/models/provider.BloodPressure.md +20 -0
  82. package/docs/models/provider.CodedConcept.md +19 -0
  83. package/docs/models/provider.Coding.md +19 -0
  84. package/docs/models/provider.Dosage.md +24 -0
  85. package/docs/models/provider.Encounter.md +48 -0
  86. package/docs/models/provider.EncounterDiagnosis.md +20 -0
  87. package/docs/models/provider.EncounterHospitalization.md +22 -0
  88. package/docs/models/provider.EncounterLocation.md +21 -0
  89. package/docs/models/provider.EncounterParticipant.md +21 -0
  90. package/docs/models/provider.FamilyCondition.md +22 -0
  91. package/docs/models/provider.FamilyHistoryEntry.md +30 -0
  92. package/docs/models/provider.GynHistory.md +25 -0
  93. package/docs/models/provider.HeartRate.md +18 -0
  94. package/docs/models/provider.Immunization.md +40 -0
  95. package/docs/models/provider.ImmunizationReaction.md +20 -0
  96. package/docs/models/provider.LabObservation.md +29 -0
  97. package/docs/models/provider.Medication.md +41 -0
  98. package/docs/models/provider.PerinatalHistory.md +25 -0
  99. package/docs/models/provider.Problem.md +37 -0
  100. package/docs/models/provider.Procedure.md +37 -0
  101. package/docs/models/provider.PulseOximetry.md +20 -0
  102. package/docs/models/provider.Quantity.md +20 -0
  103. package/docs/models/provider.QuestionnaireResponse.md +27 -0
  104. package/docs/models/provider.ReferenceRange.md +20 -0
  105. package/docs/models/provider.ResponseAnswer.md +27 -0
  106. package/docs/models/provider.ResponseItem.md +21 -0
  107. package/docs/operations/appointments.book.md +34 -1
  108. package/docs/operations/fieldagent.listPatients.md +2 -0
  109. package/docs/operations/patient.getInsurance.md +17 -15
  110. package/docs/operations/patient.getPatient.md +2 -0
  111. package/docs/operations/patient.getPatientSidebarPatientSidebar.md +2 -0
  112. package/docs/operations/patient.replaceInsurance.md +124 -0
  113. package/docs/operations/patient.retireInsurance.md +129 -0
  114. package/docs/operations/provider.getEncounter.md +84 -1
  115. package/docs/operations/provider.getPatientRecord.md +516 -1
  116. package/docs/operations/provider.getPractitioner.md +92 -53
  117. package/docs/operations/provider.listEncounters.md +84 -1
  118. package/docs/operations/provider.register.md +25 -3
  119. package/docs/operations/provider.updateEncounterClinicalNote.md +84 -1
  120. package/docs/operations/provider.updateEncounterStatus.md +84 -1
  121. package/docs/operations/provider.updatePractitioner.md +256 -150
  122. package/package.json +1 -1
@@ -0,0 +1,37 @@
1
+ # Procedure
2
+
3
+ Model ID: `provider.Procedure`
4
+
5
+ No description.
6
+
7
+ Type: `object`
8
+
9
+ ## Fields
10
+
11
+ | Field | Type | Required | Format | Allowed values | Default | Nullable | Description |
12
+ |---|---|---:|---|---|---|---:|---|
13
+ | `anesthesia_type` | `string|null` | No | | | | Yes | |
14
+ | `body_sites` | `array` | No | | | | No | |
15
+ | `complications` | `array` | No | | | | No | |
16
+ | `cpt_code` | `string|null` | No | | | | Yes | |
17
+ | `description` | `string` | Yes | | | | No | |
18
+ | `encounter_id` | `string|null` | No | | | | Yes | |
19
+ | `facility` | `string|null` | No | | | | Yes | |
20
+ | `fhir_id` | `string|null` | No | | | | Yes | |
21
+ | `indication` | `string|null` | No | | | | Yes | |
22
+ | `laterality` | [`ProcedureLaterality`](./ProcedureLaterality.md) | No | | | | Yes | |
23
+ | `notes` | `string|null` | No | | | | Yes | |
24
+ | `outcome` | `string|null` | No | | | | Yes | |
25
+ | `performed_date` | `string|null` | No | | | | Yes | |
26
+ | `performed_date_end` | `string|null` | No | | | | Yes | |
27
+ | `performer_id` | `string|null` | No | | | | Yes | |
28
+ | `performer_name` | `string|null` | No | | | | Yes | |
29
+ | `problem_reference` | `string|null` | No | | | | Yes | |
30
+ | `procedure_id` | `string` | No | uuid | | | No | |
31
+ | `reported` | `boolean` | No | | | `false` | No | |
32
+ | `snomed_code` | `string|null` | No | | | | Yes | |
33
+ | `status` | [`ProcedureStatus`](./ProcedureStatus.md) | No | | | `"completed"` | No | |
34
+
35
+ ## Example
36
+
37
+ None declared in canonical OpenAPI.
@@ -0,0 +1,20 @@
1
+ # PulseOximetry
2
+
3
+ Model ID: `provider.PulseOximetry`
4
+
5
+ An SpO2 (blood oxygen saturation) reading.
6
+
7
+ Type: `object`
8
+
9
+ ## Fields
10
+
11
+ | Field | Type | Required | Format | Allowed values | Default | Nullable | Description |
12
+ |---|---|---:|---|---|---|---:|---|
13
+ | `fio2` | `number|null` | No | | | | Yes | FiO2 % |
14
+ | `flow_rate` | `number|null` | No | | | | Yes | O2 flow rate L/min |
15
+ | `on_supplemental_oxygen` | `boolean` | No | | | `false` | No | True if the patient was on supplemental oxygen during the reading. |
16
+ | `spo2` | `number` | Yes | | | | No | SpO2 percentage |
17
+
18
+ ## Example
19
+
20
+ None declared in canonical OpenAPI.
@@ -0,0 +1,20 @@
1
+ # Quantity
2
+
3
+ Model ID: `provider.Quantity`
4
+
5
+ No description.
6
+
7
+ Type: `object`
8
+
9
+ ## Fields
10
+
11
+ | Field | Type | Required | Format | Allowed values | Default | Nullable | Description |
12
+ |---|---|---:|---|---|---|---:|---|
13
+ | `code` | `string|null` | No | | | | Yes | Unit code within the system. |
14
+ | `system` | `string|null` | No | | | | Yes | Unit code system URI. |
15
+ | `unit` | `string|null` | No | | | | Yes | Unit of measure, for display. |
16
+ | `value` | `number|null` | No | | | | Yes | Numeric value. |
17
+
18
+ ## Example
19
+
20
+ None declared in canonical OpenAPI.
@@ -0,0 +1,27 @@
1
+ # QuestionnaireResponse
2
+
3
+ Model ID: `provider.QuestionnaireResponse`
4
+
5
+ No description.
6
+
7
+ Type: `object`
8
+
9
+ ## Fields
10
+
11
+ | Field | Type | Required | Format | Allowed values | Default | Nullable | Description |
12
+ |---|---|---:|---|---|---|---:|---|
13
+ | `authored` | `string|null` | No | | | | Yes | ISO 8601 dateTime |
14
+ | `authored_by_name` | `string|null` | No | | | | Yes | Display name of the author, when known. |
15
+ | `authored_by_patient` | `boolean` | No | | | `true` | No | Whether the response was authored by the patient (true) or a practitioner (false). |
16
+ | `encounter_id` | `string|null` | No | | | | Yes | FHIR Encounter id during which the response was collected, when linked. |
17
+ | `fhir_id` | `string|null` | No | | | | Yes | FHIR QuestionnaireResponse resource id, when stored. |
18
+ | `items` | array of [`provider.ResponseItem`](./provider.ResponseItem.md) | No | | | | No | Response items (answers), one per Questionnaire item linkId. |
19
+ | `patient_fhir_id` | `string|null` | No | | | | Yes | FHIR Patient id who is the subject of the response, when linked. |
20
+ | `questionnaire_fhir_id` | `string|null` | No | | | | Yes | FHIR Questionnaire id this response answers, when linked. |
21
+ | `questionnaire_url` | `string|null` | No | | | | Yes | Canonical URL of the Questionnaire |
22
+ | `response_id` | `string` | No | uuid | | | No | HealthCloud questionnaire-response identifier (UUID). |
23
+ | `status` | [`QuestionnaireResponseStatus`](./QuestionnaireResponseStatus.md) | No | | | `"completed"` | No | Response status: in-progress, completed, amended, entered-in-error, or stopped. |
24
+
25
+ ## Example
26
+
27
+ None declared in canonical OpenAPI.
@@ -0,0 +1,20 @@
1
+ # ReferenceRange
2
+
3
+ Model ID: `provider.ReferenceRange`
4
+
5
+ The normal/expected range for a lab observation's value.
6
+
7
+ Type: `object`
8
+
9
+ ## Fields
10
+
11
+ | Field | Type | Required | Format | Allowed values | Default | Nullable | Description |
12
+ |---|---|---:|---|---|---|---:|---|
13
+ | `high` | `number|null` | No | | | | Yes | Upper bound of the normal range, optional. |
14
+ | `low` | `number|null` | No | | | | Yes | Lower bound of the normal range, optional. |
15
+ | `text` | `string|null` | No | | | | Yes | Free-text range description, e.g. 'Negative', optional. |
16
+ | `unit` | `string|null` | No | | | | Yes | Unit of measure for low/high, optional. |
17
+
18
+ ## Example
19
+
20
+ None declared in canonical OpenAPI.
@@ -0,0 +1,27 @@
1
+ # ResponseAnswer
2
+
3
+ Model ID: `provider.ResponseAnswer`
4
+
5
+ No description.
6
+
7
+ Type: `object`
8
+
9
+ ## Fields
10
+
11
+ | Field | Type | Required | Format | Allowed values | Default | Nullable | Description |
12
+ |---|---|---:|---|---|---|---:|---|
13
+ | `sub_items` | array of [`provider.ResponseItem`](./provider.ResponseItem.md) | No | | | | No | Nested sub-items under this answer, for grouped questions. |
14
+ | `value_boolean` | `boolean|null` | No | | | | Yes | Boolean answer value, when the question type is boolean. |
15
+ | `value_coding` | [`provider.Coding`](./provider.Coding.md) | No | | | | Yes | Coded answer value (system/code/display), when the question type is choice or open-choice. |
16
+ | `value_date` | `string|null` | No | | | | Yes | Date answer value (ISO date), when the question type is date. |
17
+ | `value_date_time` | `string|null` | No | | | | Yes | DateTime answer value (ISO dateTime), when the question type is dateTime. |
18
+ | `value_decimal` | `number|null` | No | | | | Yes | Decimal answer value, when the question type is decimal. |
19
+ | `value_integer` | `integer|null` | No | | | | Yes | Integer answer value, when the question type is integer. |
20
+ | `value_quantity` | [`provider.Quantity`](./provider.Quantity.md) | No | | | | Yes | Quantity answer value (value/unit/system), when the question type is quantity. |
21
+ | `value_string` | `string|null` | No | | | | Yes | String answer value, when the question type is string. |
22
+ | `value_time` | `string|null` | No | | | | Yes | Time answer value, when the question type is time. |
23
+ | `value_uri` | `string|null` | No | | | | Yes | URI answer value, when the question type is uri. |
24
+
25
+ ## Example
26
+
27
+ None declared in canonical OpenAPI.
@@ -0,0 +1,21 @@
1
+ # ResponseItem
2
+
3
+ Model ID: `provider.ResponseItem`
4
+
5
+ No description.
6
+
7
+ Type: `object`
8
+
9
+ ## Fields
10
+
11
+ | Field | Type | Required | Format | Allowed values | Default | Nullable | Description |
12
+ |---|---|---:|---|---|---|---:|---|
13
+ | `answers` | array of [`provider.ResponseAnswer`](./provider.ResponseAnswer.md) | No | | | | No | Answers given for this item. |
14
+ | `definition` | `string|null` | No | | | | Yes | Canonical URI of the element this item collects, when defined. |
15
+ | `link_id` | `string` | Yes | | | | No | Stable linkId matching the corresponding Questionnaire.item.linkId. |
16
+ | `sub_items` | array of [`provider.ResponseItem`](./provider.ResponseItem.md) | No | | | | No | Nested sub-items, for grouped questions. |
17
+ | `text` | `string|null` | No | | | | Yes | Display text of the question, when present. |
18
+
19
+ ## Example
20
+
21
+ None declared in canonical OpenAPI.
@@ -47,6 +47,7 @@ Request model: [`BookAppointmentRequest`](../models/BookAppointmentRequest.md)
47
47
  ```json
48
48
  {
49
49
  "athena_appointment_id": "string",
50
+ "note": "string",
50
51
  "patient_id": "string",
51
52
  "slot_id": "string",
52
53
  "start": "string",
@@ -94,7 +95,10 @@ Request model: [`BookAppointmentRequest`](../models/BookAppointmentRequest.md)
94
95
  | `401` | [`appointments.ErrorResponse`](../models/appointments.ErrorResponse.md) | application/json | Authorization required — missing or invalid Bearer JWT |
95
96
  | `404` | [`appointments.ErrorResponse`](../models/appointments.ErrorResponse.md) | application/json | The requested slot was not found |
96
97
  | `409` | [`appointments.ErrorResponse`](../models/appointments.ErrorResponse.md) | application/json | Conflict — slot not available |
98
+ | `410` | [`appointments.ErrorResponse`](../models/appointments.ErrorResponse.md) | application/json | |
97
99
  | `500` | [`appointments.ErrorResponse`](../models/appointments.ErrorResponse.md) | application/json | Internal server error |
100
+ | `502` | [`appointments.ErrorResponse`](../models/appointments.ErrorResponse.md) | application/json | |
101
+ | `503` | [`appointments.ErrorResponse`](../models/appointments.ErrorResponse.md) | application/json | Athena rate limited the upstream request; Retry-After is forwarded when valid |
98
102
 
99
103
  ## Error examples
100
104
 
@@ -130,6 +134,16 @@ Request model: [`BookAppointmentRequest`](../models/BookAppointmentRequest.md)
130
134
  }
131
135
  ```
132
136
 
137
+ ### 410
138
+
139
+ ```json
140
+ {
141
+ "code": "string",
142
+ "error": "string",
143
+ "outcome": {}
144
+ }
145
+ ```
146
+
133
147
  ### 500 — Unexpected service failure (sanitized example)
134
148
 
135
149
  ```json
@@ -138,6 +152,24 @@ Request model: [`BookAppointmentRequest`](../models/BookAppointmentRequest.md)
138
152
  }
139
153
  ```
140
154
 
155
+ ### 502
156
+
157
+ ```json
158
+ {
159
+ "code": "string",
160
+ "error": "string",
161
+ "outcome": {}
162
+ }
163
+ ```
164
+
165
+ ### 503 — Athena temporarily rate limited this read
166
+
167
+ ```json
168
+ {
169
+ "error": "Appointments are temporarily unavailable because the upstream service is rate limited"
170
+ }
171
+ ```
172
+
141
173
  ## NodeJS / TypeScript implementation
142
174
 
143
175
  ```ts
@@ -148,6 +180,7 @@ import type { BookAppointmentRequest } from "@healthcloudai/hc-sdk";
148
180
  ```ts
149
181
  const request = {
150
182
  "athena_appointment_id": "string",
183
+ "note": "string",
151
184
  "patient_id": "string",
152
185
  "slot_id": "string",
153
186
  "start": "string",
@@ -163,7 +196,7 @@ const result = await appointments.book(request);
163
196
  curl -X POST \
164
197
  -H 'Authorization: Bearer <ACCESS_TOKEN>' \
165
198
  -H 'Content-Type: application/json' \
166
- -d '{"athena_appointment_id":"string","patient_id":"string","slot_id":"string","start":"string","steadymd_clinician_guid":"string"}' \
199
+ -d '{"athena_appointment_id":"string","note":"string","patient_id":"string","slot_id":"string","start":"string","steadymd_clinician_guid":"string"}' \
167
200
  'https://dev-api-appointments.health.cloud/appointments/book'
168
201
  ```
169
202
 
@@ -98,6 +98,7 @@ None declared in canonical OpenAPI.
98
98
  "impilo_patient_id": "string",
99
99
  "insurance": [
100
100
  {
101
+ "change_pending": false,
101
102
  "copay": 0,
102
103
  "deductible": 0,
103
104
  "effective_date": "2026-01-01",
@@ -108,6 +109,7 @@ None declared in canonical OpenAPI.
108
109
  "plan_name": "string",
109
110
  "plan_type": "string",
110
111
  "priority": "primary",
112
+ "status": "active",
111
113
  "subscriber_date_of_birth": "2026-01-01",
112
114
  "subscriber_first_name": "string",
113
115
  "subscriber_id": "string",
@@ -58,26 +58,28 @@ None declared in canonical OpenAPI.
58
58
  {
59
59
  "insurances": [
60
60
  {
61
- "copay": 25,
62
- "deductible": 1000,
61
+ "change_pending": false,
62
+ "copay": 0,
63
+ "deductible": 0,
63
64
  "effective_date": "2026-01-01",
64
- "group_number": "GRP-example-001",
65
- "member_id": "MEM-example-001",
66
- "payer_id": "60054",
67
- "payer_name": "Example Health Plan",
68
- "plan_name": "Example Gold Plan",
69
- "plan_type": "PPO",
65
+ "group_number": "string",
66
+ "member_id": "string",
67
+ "payer_id": "string",
68
+ "payer_name": "string",
69
+ "plan_name": "string",
70
+ "plan_type": "string",
70
71
  "priority": "primary",
71
- "subscriber_date_of_birth": "1990-05-15",
72
- "subscriber_first_name": "Test",
73
- "subscriber_id": "SUB-example-001",
74
- "subscriber_last_name": "User",
72
+ "status": "active",
73
+ "subscriber_date_of_birth": "2026-01-01",
74
+ "subscriber_first_name": "string",
75
+ "subscriber_id": "string",
76
+ "subscriber_last_name": "string",
75
77
  "subscriber_relationship": "self",
76
- "termination_date": "2026-12-31"
78
+ "termination_date": "2026-01-01"
77
79
  }
78
80
  ],
79
- "patient_id": "patient-example-001",
80
- "total": 1
81
+ "patient_id": "string",
82
+ "total": 0
81
83
  }
82
84
  ```
83
85
 
@@ -88,6 +88,7 @@ None declared in canonical OpenAPI.
88
88
  "impilo_patient_id": "string",
89
89
  "insurance": [
90
90
  {
91
+ "change_pending": false,
91
92
  "copay": 0,
92
93
  "deductible": 0,
93
94
  "effective_date": "2026-01-01",
@@ -98,6 +99,7 @@ None declared in canonical OpenAPI.
98
99
  "plan_name": "string",
99
100
  "plan_type": "string",
100
101
  "priority": "primary",
102
+ "status": "active",
101
103
  "subscriber_date_of_birth": "2026-01-01",
102
104
  "subscriber_first_name": "string",
103
105
  "subscriber_id": "string",
@@ -92,6 +92,7 @@ None declared in canonical OpenAPI.
92
92
  "impilo_patient_id": "string",
93
93
  "insurance": [
94
94
  {
95
+ "change_pending": false,
95
96
  "copay": 0,
96
97
  "deductible": 0,
97
98
  "effective_date": "2026-01-01",
@@ -102,6 +103,7 @@ None declared in canonical OpenAPI.
102
103
  "plan_name": "string",
103
104
  "plan_type": "string",
104
105
  "priority": "primary",
106
+ "status": "active",
105
107
  "subscriber_date_of_birth": "2026-01-01",
106
108
  "subscriber_first_name": "string",
107
109
  "subscriber_id": "string",
@@ -0,0 +1,124 @@
1
+ # Replace a saved primary self insurance coverage after patient confirmation
2
+
3
+ Operation ID: `patient.replaceInsurance`
4
+
5
+ Creates a new Coverage ID and card image, retiring the prior record with history retained. Reuse request_id and the same body for retries. 202 means vendor reconciliation is pending; do not call insurance creation or eligibility in response. Existing Athena coverage needs an exact server-recorded policy mapping. No patient demographics are changed.
6
+
7
+ ## Public method
8
+
9
+ `replaceInsurance`
10
+
11
+ Signature: `patient.replaceInsurance(coverageId, request)`
12
+
13
+ Return type: `Promise<ReplaceInsuranceResponse>`
14
+
15
+ ## Authentication
16
+
17
+ Classification: **AUTHENTICATED**
18
+
19
+ Schemes: `bearerAuth`
20
+
21
+ ## Prerequisites
22
+
23
+ None documented.
24
+
25
+ ## HTTP
26
+
27
+ `PUT /patients/insurance/{coverage_id}`
28
+
29
+ ## Path parameters
30
+
31
+ | Name | Type | Required | Format | Allowed values | Default | Nullable | Description |
32
+ |---|---|---:|---|---|---|---:|---|
33
+ | `coverage_id` | `string` | Yes | | | | No | |
34
+
35
+ ## Query parameters
36
+
37
+ None.
38
+
39
+ ## Body parameters
40
+
41
+ | Name | Type | Required | Format | Allowed values | Default | Nullable | Description |
42
+ |---|---|---:|---|---|---|---:|---|
43
+ | `body` | [`ReplaceInsuranceRequest`](../models/ReplaceInsuranceRequest.md) | Yes | | | | No | |
44
+
45
+ Request model: [`ReplaceInsuranceRequest`](../models/ReplaceInsuranceRequest.md)
46
+
47
+ ## Request example
48
+
49
+ None declared in canonical OpenAPI.
50
+
51
+ ## Success responses
52
+
53
+ | Status | Shape | Content type | Description |
54
+ |---|---|---|---|
55
+ | `200` | [`ReplaceInsuranceResponse`](../models/ReplaceInsuranceResponse.md) | application/json | Replacement completed |
56
+ | `202` | [`ReplaceInsuranceResponse`](../models/ReplaceInsuranceResponse.md) | application/json | Replacement pending reconciliation |
57
+
58
+ ## Success response examples
59
+
60
+ ### 200
61
+
62
+ ```json
63
+ {
64
+ "code": "replacement_completed",
65
+ "coverage_id": "new-coverage",
66
+ "previous_coverage_id": "old-coverage",
67
+ "status": "completed"
68
+ }
69
+ ```
70
+
71
+ ### 202
72
+
73
+ ```json
74
+ {
75
+ "code": "replacement_pending",
76
+ "coverage_id": null,
77
+ "previous_coverage_id": "old-coverage",
78
+ "status": "pending"
79
+ }
80
+ ```
81
+
82
+ ## Common errors
83
+
84
+ None declared in canonical OpenAPI.
85
+
86
+ ## Error examples
87
+
88
+ None declared in canonical OpenAPI.
89
+
90
+ ## NodeJS / TypeScript implementation
91
+
92
+ ```ts
93
+ import { HCSDK } from "@healthcloudai/hc-sdk";
94
+ ```
95
+
96
+ ```ts
97
+ const coverageId = "<COVERAGE_ID>";
98
+
99
+ const request = "<REQUEST>";
100
+
101
+ const result = await patient.replaceInsurance(coverageId, request);
102
+ ```
103
+
104
+ ## cURL
105
+
106
+ ```bash
107
+ curl -X PUT \
108
+ -H 'Authorization: Bearer <ACCESS_TOKEN>' \
109
+ -H 'Content-Type: application/json' \
110
+ -d '<REQUEST_BODY_JSON>' \
111
+ 'https://dev-api-patient.health.cloud/patients/insurance/%3CCOVERAGE_ID%3E'
112
+ ```
113
+
114
+ ## Notes
115
+
116
+ None.
117
+
118
+ ## Prepared Test Console scenario
119
+
120
+ No canonical scenario is currently associated.
121
+
122
+ ## Real response
123
+
124
+ No approved real integration response is currently published. Unapproved candidates are never rendered as examples.
@@ -0,0 +1,129 @@
1
+ # Retire saved primary self insurance after explicit patient confirmation
2
+
3
+ Operation ID: `patient.retireInsurance`
4
+
5
+ Retires the exact token-owned Coverage and mapped Athena insurance record. History is retained; no replacement is created and the real-world insurance contract is not cancelled. Reuse request_id for retries. 202 means reconciliation is pending, not successful removal.
6
+
7
+ ## Public method
8
+
9
+ `retireInsurance`
10
+
11
+ Signature: `patient.retireInsurance(coverageId, request)`
12
+
13
+ Return type: `Promise<RetireInsuranceResponse>`
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/insurance/{coverage_id}/retire`
28
+
29
+ ## Path parameters
30
+
31
+ | Name | Type | Required | Format | Allowed values | Default | Nullable | Description |
32
+ |---|---|---:|---|---|---|---:|---|
33
+ | `coverage_id` | `string` | Yes | | | | No | |
34
+
35
+ ## Query parameters
36
+
37
+ None.
38
+
39
+ ## Body parameters
40
+
41
+ | Name | Type | Required | Format | Allowed values | Default | Nullable | Description |
42
+ |---|---|---:|---|---|---|---:|---|
43
+ | `body` | [`RetireInsuranceRequest`](../models/RetireInsuranceRequest.md) | Yes | | | | No | |
44
+
45
+ Request model: [`RetireInsuranceRequest`](../models/RetireInsuranceRequest.md)
46
+
47
+ ## Request example
48
+
49
+ ```json
50
+ {
51
+ "request_id": "00000000-0000-0000-0000-000000000000"
52
+ }
53
+ ```
54
+
55
+ ## Success responses
56
+
57
+ | Status | Shape | Content type | Description |
58
+ |---|---|---|---|
59
+ | `200` | [`RetireInsuranceResponse`](../models/RetireInsuranceResponse.md) | application/json | Insurance retired |
60
+ | `202` | [`RetireInsuranceResponse`](../models/RetireInsuranceResponse.md) | application/json | Retirement pending reconciliation |
61
+
62
+ ## Success response examples
63
+
64
+ ### 200
65
+
66
+ ```json
67
+ {
68
+ "code": "retirement_completed",
69
+ "previous_coverage_id": "string",
70
+ "status": "completed"
71
+ }
72
+ ```
73
+
74
+ ### 202
75
+
76
+ ```json
77
+ {
78
+ "code": "retirement_completed",
79
+ "previous_coverage_id": "string",
80
+ "status": "completed"
81
+ }
82
+ ```
83
+
84
+ ## Common errors
85
+
86
+ None declared in canonical OpenAPI.
87
+
88
+ ## Error examples
89
+
90
+ None declared in canonical OpenAPI.
91
+
92
+ ## NodeJS / TypeScript implementation
93
+
94
+ ```ts
95
+ import { HCSDK } from "@healthcloudai/hc-sdk";
96
+ import type { RetireInsuranceRequest } from "@healthcloudai/hc-sdk";
97
+ ```
98
+
99
+ ```ts
100
+ const coverageId = "<COVERAGE_ID>";
101
+
102
+ const request = {
103
+ "request_id": "00000000-0000-0000-0000-000000000000"
104
+ };
105
+
106
+ const result = await patient.retireInsurance(coverageId, request);
107
+ ```
108
+
109
+ ## cURL
110
+
111
+ ```bash
112
+ curl -X POST \
113
+ -H 'Authorization: Bearer <ACCESS_TOKEN>' \
114
+ -H 'Content-Type: application/json' \
115
+ -d '{"request_id":"00000000-0000-0000-0000-000000000000"}' \
116
+ 'https://dev-api-patient.health.cloud/patients/insurance/%3CCOVERAGE_ID%3E/retire'
117
+ ```
118
+
119
+ ## Notes
120
+
121
+ None.
122
+
123
+ ## Prepared Test Console scenario
124
+
125
+ No canonical scenario is currently associated.
126
+
127
+ ## Real response
128
+
129
+ No approved real integration response is currently published. Unapproved candidates are never rendered as examples.