@healthcloudai/hc-sdk 3.16.0 → 3.17.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 +20 -0
- package/dist/index.d.cts +293 -2
- package/dist/index.d.ts +293 -2
- package/dist/index.js +20 -0
- package/docs/clients/PatientClient.md +2 -0
- package/docs/docs-manifest.json +9 -3
- package/docs/examples/index.md +2 -0
- package/docs/index.md +2 -0
- package/docs/models/Insurance.md +2 -0
- package/docs/models/ReplaceInsuranceRequest.md +25 -0
- package/docs/models/ReplaceInsuranceResponse.md +20 -0
- package/docs/models/RetireInsuranceRequest.md +17 -0
- package/docs/models/RetireInsuranceResponse.md +19 -0
- package/docs/models/index.md +4 -0
- package/docs/operations/fieldagent.listPatients.md +2 -0
- package/docs/operations/patient.getInsurance.md +17 -15
- package/docs/operations/patient.getPatient.md +2 -0
- package/docs/operations/patient.getPatientSidebarPatientSidebar.md +2 -0
- package/docs/operations/patient.replaceInsurance.md +124 -0
- package/docs/operations/patient.retireInsurance.md +129 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2777,6 +2777,26 @@ var PatientClient = class extends BaseServiceClient {
|
|
|
2777
2777
|
listPatientInsurances() {
|
|
2778
2778
|
return this.send("GET", "/patients/insurance", {});
|
|
2779
2779
|
}
|
|
2780
|
+
/** Confirm a change to saved insurance. A pending response is not completion.
|
|
2781
|
+
* Reuse request_id/body for retries; never retry through createInsurance().
|
|
2782
|
+
*/
|
|
2783
|
+
replaceInsurance(coverageId, request) {
|
|
2784
|
+
return this.send(
|
|
2785
|
+
"PUT",
|
|
2786
|
+
`/patients/insurance/${encodeURIComponent(coverageId)}`,
|
|
2787
|
+
{ body: request }
|
|
2788
|
+
);
|
|
2789
|
+
}
|
|
2790
|
+
/** Retire the exact saved coverage after confirmation. History is retained.
|
|
2791
|
+
* Reuse request_id for retries; pending is not completed removal.
|
|
2792
|
+
*/
|
|
2793
|
+
retireInsurance(coverageId, request) {
|
|
2794
|
+
return this.send(
|
|
2795
|
+
"POST",
|
|
2796
|
+
`/patients/insurance/${encodeURIComponent(coverageId)}/retire`,
|
|
2797
|
+
{ body: request }
|
|
2798
|
+
);
|
|
2799
|
+
}
|
|
2780
2800
|
importHealthRecord(payload) {
|
|
2781
2801
|
return this.send("POST", "/patients/health-record/import", {
|
|
2782
2802
|
body: payload
|
|
@@ -80,6 +80,8 @@
|
|
|
80
80
|
- [`nearestLocations`](../operations/patient.nearestLocations.md) — Find nearby healthcare locations
|
|
81
81
|
- [`getPhotoUploadUrl`](../operations/patient.photoUploadUrl.md) — Get a photo upload URL
|
|
82
82
|
- [`placeTestOrder`](../operations/patient.placeTestOrder.md) — Place a diagnostic test order
|
|
83
|
+
- [`replaceInsurance`](../operations/patient.replaceInsurance.md) — Replace a saved primary self insurance coverage after patient confirmation
|
|
84
|
+
- [`retireInsurance`](../operations/patient.retireInsurance.md) — Retire saved primary self insurance after explicit patient confirmation
|
|
83
85
|
- [`searchKnowledge`](../operations/patient.searchKnowledge.md) — Search the knowledge base
|
|
84
86
|
- [`setPreferredPharmacy`](../operations/patient.setPreferredPharmacy.md) — Set preferred pharmacy
|
|
85
87
|
- [`createCurrentScreeningSymptoms`](../operations/patient.submitCurrentSymptomsScreeningsCurrentSymptoms.md) — Submit current symptoms
|
package/docs/docs-manifest.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"docsDataContentDigest": "sha256:
|
|
2
|
+
"docsDataContentDigest": "sha256:2ba44dd2c8b7bc55e158e775cdc5f5f05ef0958ffa56ebf972ceca92449f4db3",
|
|
3
3
|
"generatedFiles": [
|
|
4
4
|
"authentication.md",
|
|
5
5
|
"clients/AmsClient.md",
|
|
@@ -1474,10 +1474,14 @@
|
|
|
1474
1474
|
"models/RapidTestType.md",
|
|
1475
1475
|
"models/ReactionSeverity.md",
|
|
1476
1476
|
"models/RecordVitalsResponse.md",
|
|
1477
|
+
"models/ReplaceInsuranceRequest.md",
|
|
1478
|
+
"models/ReplaceInsuranceResponse.md",
|
|
1477
1479
|
"models/RescheduleAppointmentRequest.md",
|
|
1478
1480
|
"models/RespiratoryRate.md",
|
|
1479
1481
|
"models/ResponseAnswer.md",
|
|
1480
1482
|
"models/ResponseItem.md",
|
|
1483
|
+
"models/RetireInsuranceRequest.md",
|
|
1484
|
+
"models/RetireInsuranceResponse.md",
|
|
1481
1485
|
"models/SalesforceAccount.md",
|
|
1482
1486
|
"models/SalesforceAccountAssets.md",
|
|
1483
1487
|
"models/SalesforceAddress.md",
|
|
@@ -3078,8 +3082,10 @@
|
|
|
3078
3082
|
"operations/patient.placeTestOrder.md",
|
|
3079
3083
|
"operations/patient.refreshToken.md",
|
|
3080
3084
|
"operations/patient.register.md",
|
|
3085
|
+
"operations/patient.replaceInsurance.md",
|
|
3081
3086
|
"operations/patient.resendVerificationCode.md",
|
|
3082
3087
|
"operations/patient.resetPassword.md",
|
|
3088
|
+
"operations/patient.retireInsurance.md",
|
|
3083
3089
|
"operations/patient.searchKnowledge.md",
|
|
3084
3090
|
"operations/patient.setPreferredPharmacy.md",
|
|
3085
3091
|
"operations/patient.submitCurrentSymptomsScreeningsCurrentSymptoms.md",
|
|
@@ -3146,7 +3152,7 @@
|
|
|
3146
3152
|
"operations/vitals.recordVitals.md"
|
|
3147
3153
|
],
|
|
3148
3154
|
"language": "nodejs",
|
|
3149
|
-
"modelCount":
|
|
3150
|
-
"operationCount":
|
|
3155
|
+
"modelCount": 2055,
|
|
3156
|
+
"operationCount": 1040,
|
|
3151
3157
|
"schemaVersion": 1
|
|
3152
3158
|
}
|
package/docs/examples/index.md
CHANGED
|
@@ -974,8 +974,10 @@ Generated call examples use exact public surface signatures. Workflow examples r
|
|
|
974
974
|
- [Place a diagnostic test order](../operations/patient.placeTestOrder.md)
|
|
975
975
|
- [Refresh patient access tokens](../operations/patient.refreshToken.md)
|
|
976
976
|
- [Register a new patient](../operations/patient.register.md)
|
|
977
|
+
- [Replace a saved primary self insurance coverage after patient confirmation](../operations/patient.replaceInsurance.md)
|
|
977
978
|
- [Resend the email verification OTP](../operations/patient.resendVerificationCode.md)
|
|
978
979
|
- [Start a password reset](../operations/patient.resetPassword.md)
|
|
980
|
+
- [Retire saved primary self insurance after explicit patient confirmation](../operations/patient.retireInsurance.md)
|
|
979
981
|
- [Search the knowledge base](../operations/patient.searchKnowledge.md)
|
|
980
982
|
- [Set preferred pharmacy](../operations/patient.setPreferredPharmacy.md)
|
|
981
983
|
- [Submit current symptoms](../operations/patient.submitCurrentSymptomsScreeningsCurrentSymptoms.md)
|
package/docs/index.md
CHANGED
|
@@ -982,8 +982,10 @@ This directory is generated from the shared structured docs data. Do not edit ge
|
|
|
982
982
|
- [Place a diagnostic test order](operations/patient.placeTestOrder.md) (`patient.placeTestOrder`)
|
|
983
983
|
- [Refresh patient access tokens](operations/patient.refreshToken.md) (`patient.refreshToken`)
|
|
984
984
|
- [Register a new patient](operations/patient.register.md) (`patient.register`)
|
|
985
|
+
- [Replace a saved primary self insurance coverage after patient confirmation](operations/patient.replaceInsurance.md) (`patient.replaceInsurance`)
|
|
985
986
|
- [Resend the email verification OTP](operations/patient.resendVerificationCode.md) (`patient.resendVerificationCode`)
|
|
986
987
|
- [Start a password reset](operations/patient.resetPassword.md) (`patient.resetPassword`)
|
|
988
|
+
- [Retire saved primary self insurance after explicit patient confirmation](operations/patient.retireInsurance.md) (`patient.retireInsurance`)
|
|
987
989
|
- [Search the knowledge base](operations/patient.searchKnowledge.md) (`patient.searchKnowledge`)
|
|
988
990
|
- [Set preferred pharmacy](operations/patient.setPreferredPharmacy.md) (`patient.setPreferredPharmacy`)
|
|
989
991
|
- [Submit current symptoms](operations/patient.submitCurrentSymptomsScreeningsCurrentSymptoms.md) (`patient.submitCurrentSymptomsScreeningsCurrentSymptoms`)
|
package/docs/models/Insurance.md
CHANGED
|
@@ -10,6 +10,7 @@ Type: `object`
|
|
|
10
10
|
|
|
11
11
|
| Field | Type | Required | Format | Allowed values | Default | Nullable | Description |
|
|
12
12
|
|---|---|---:|---|---|---|---:|---|
|
|
13
|
+
| `change_pending` | `boolean` | No | | | `false` | No | An explicit insurance change is awaiting reconciliation. |
|
|
13
14
|
| `copay` | `number|null` | No | | | | Yes | Fixed copay amount, when known. |
|
|
14
15
|
| `deductible` | `number|null` | No | | | | Yes | Plan deductible amount, when known. |
|
|
15
16
|
| `effective_date` | `string|null` | No | | | | Yes | Date coverage begins. |
|
|
@@ -20,6 +21,7 @@ Type: `object`
|
|
|
20
21
|
| `plan_name` | `string|null` | No | | | | Yes | Display name of the specific insurance plan. |
|
|
21
22
|
| `plan_type` | `string|null` | No | | | | Yes | HMO, PPO, EPO, POS, etc. |
|
|
22
23
|
| `priority` | [`InsurancePriority`](./InsurancePriority.md) | Yes | | | | No | Coordination-of-benefits order: primary, secondary, or tertiary. |
|
|
24
|
+
| `status` | `string` | No | | active, cancelled, draft, entered-in-error | `"active"` | No | Saved Coverage record status, distinct from eligibility. Cancelled records are retained history. |
|
|
23
25
|
| `subscriber_date_of_birth` | `string|null` | No | | | | Yes | Subscriber's date of birth, when the patient is not the subscriber. |
|
|
24
26
|
| `subscriber_first_name` | `string|null` | No | | | | Yes | Subscriber's first name, when the patient is not the subscriber. |
|
|
25
27
|
| `subscriber_id` | `string|null` | No | | | | Yes | Subscriber's identifier, when different from member_id. |
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# ReplaceInsuranceRequest
|
|
2
|
+
|
|
3
|
+
Model ID: `ReplaceInsuranceRequest`
|
|
4
|
+
|
|
5
|
+
Explicitly replace an already-saved primary self Coverage.
|
|
6
|
+
|
|
7
|
+
Reuse request_id and the identical body for retries. OCR rescans before
|
|
8
|
+
initial save and eligibility retries must not call this operation.
|
|
9
|
+
|
|
10
|
+
Type: `object`
|
|
11
|
+
|
|
12
|
+
## Fields
|
|
13
|
+
|
|
14
|
+
| Field | Type | Required | Format | Allowed values | Default | Nullable | Description |
|
|
15
|
+
|---|---|---:|---|---|---|---:|---|
|
|
16
|
+
| `image` | `string` | Yes | | | | No | Reviewed replacement card image, base64 PNG/JPEG. The previous card is not reused. |
|
|
17
|
+
| `member_id` | `string` | Yes | | | | No | |
|
|
18
|
+
| `payer_id` | `string` | Yes | | | | No | |
|
|
19
|
+
| `payer_name` | `string` | Yes | | | | No | |
|
|
20
|
+
| `request_id` | `string` | Yes | uuid | | | No | Client-generated UUID retained for every retry of this confirmed change. |
|
|
21
|
+
| `state` | `string` | Yes | | | | No | Reviewed US coverage state used for vendor package matching. |
|
|
22
|
+
|
|
23
|
+
## Example
|
|
24
|
+
|
|
25
|
+
None declared in canonical OpenAPI.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# ReplaceInsuranceResponse
|
|
2
|
+
|
|
3
|
+
Model ID: `ReplaceInsuranceResponse`
|
|
4
|
+
|
|
5
|
+
No insurance details or raw vendor errors are returned.
|
|
6
|
+
|
|
7
|
+
Type: `object`
|
|
8
|
+
|
|
9
|
+
## Fields
|
|
10
|
+
|
|
11
|
+
| Field | Type | Required | Format | Allowed values | Default | Nullable | Description |
|
|
12
|
+
|---|---|---:|---|---|---|---:|---|
|
|
13
|
+
| `code` | `string` | Yes | | replacement_completed, replacement_pending | | No | |
|
|
14
|
+
| `coverage_id` | `string|null` | Yes | | | | Yes | New Coverage ID on completion; null while pending. |
|
|
15
|
+
| `previous_coverage_id` | `string` | Yes | | | | No | Retired or pending predecessor Coverage ID. |
|
|
16
|
+
| `status` | `string` | Yes | | completed, pending | | No | |
|
|
17
|
+
|
|
18
|
+
## Example
|
|
19
|
+
|
|
20
|
+
None declared in canonical OpenAPI.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# RetireInsuranceRequest
|
|
2
|
+
|
|
3
|
+
Model ID: `RetireInsuranceRequest`
|
|
4
|
+
|
|
5
|
+
Explicitly retire saved insurance without creating replacement coverage.
|
|
6
|
+
|
|
7
|
+
Type: `object`
|
|
8
|
+
|
|
9
|
+
## Fields
|
|
10
|
+
|
|
11
|
+
| Field | Type | Required | Format | Allowed values | Default | Nullable | Description |
|
|
12
|
+
|---|---|---:|---|---|---|---:|---|
|
|
13
|
+
| `request_id` | `string` | Yes | uuid | | | No | Client-generated UUID retained for retries of this confirmed removal. |
|
|
14
|
+
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
None declared in canonical OpenAPI.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# RetireInsuranceResponse
|
|
2
|
+
|
|
3
|
+
Model ID: `RetireInsuranceResponse`
|
|
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` | Yes | | retirement_completed, retirement_pending | | No | |
|
|
14
|
+
| `previous_coverage_id` | `string` | Yes | | | | No | Retired or pending Coverage ID; history is retained. |
|
|
15
|
+
| `status` | `string` | Yes | | completed, pending | | No | |
|
|
16
|
+
|
|
17
|
+
## Example
|
|
18
|
+
|
|
19
|
+
None declared in canonical OpenAPI.
|
package/docs/models/index.md
CHANGED
|
@@ -1542,10 +1542,14 @@
|
|
|
1542
1542
|
- [RapidTestType](RapidTestType.md)
|
|
1543
1543
|
- [ReactionSeverity](ReactionSeverity.md)
|
|
1544
1544
|
- [RecordVitalsResponse](RecordVitalsResponse.md)
|
|
1545
|
+
- [ReplaceInsuranceRequest](ReplaceInsuranceRequest.md)
|
|
1546
|
+
- [ReplaceInsuranceResponse](ReplaceInsuranceResponse.md)
|
|
1545
1547
|
- [RescheduleAppointmentRequest](RescheduleAppointmentRequest.md)
|
|
1546
1548
|
- [RespiratoryRate](RespiratoryRate.md)
|
|
1547
1549
|
- [ResponseAnswer](ResponseAnswer.md)
|
|
1548
1550
|
- [ResponseItem](ResponseItem.md)
|
|
1551
|
+
- [RetireInsuranceRequest](RetireInsuranceRequest.md)
|
|
1552
|
+
- [RetireInsuranceResponse](RetireInsuranceResponse.md)
|
|
1549
1553
|
- [rppg.ConnectResponse](rppg.ConnectResponse.md)
|
|
1550
1554
|
- [SalesforceAccount](SalesforceAccount.md)
|
|
1551
1555
|
- [SalesforceAccountAssets](SalesforceAccountAssets.md)
|
|
@@ -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
|
-
"
|
|
62
|
-
"
|
|
61
|
+
"change_pending": false,
|
|
62
|
+
"copay": 0,
|
|
63
|
+
"deductible": 0,
|
|
63
64
|
"effective_date": "2026-01-01",
|
|
64
|
-
"group_number": "
|
|
65
|
-
"member_id": "
|
|
66
|
-
"payer_id": "
|
|
67
|
-
"payer_name": "
|
|
68
|
-
"plan_name": "
|
|
69
|
-
"plan_type": "
|
|
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
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"
|
|
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-
|
|
78
|
+
"termination_date": "2026-01-01"
|
|
77
79
|
}
|
|
78
80
|
],
|
|
79
|
-
"patient_id": "
|
|
80
|
-
"total":
|
|
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.
|
package/package.json
CHANGED