@healthcloudai/hc-sdk 3.4.0 → 3.5.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 +4 -0
- package/dist/index.d.cts +228 -163
- package/dist/index.d.ts +228 -163
- package/dist/index.js +4 -0
- package/docs/docs-manifest.json +6 -3
- package/docs/models/AddInsuranceRequest.md +1 -0
- package/docs/models/CheckEncounterResponse.md +36 -0
- package/docs/models/CheckInEncounterResponse.md +51 -0
- package/docs/models/CreateRapidTestRequest.md +3 -0
- package/docs/models/{RapidTest.md → CreateRapidTestResponse.md} +8 -4
- package/docs/models/GetAppointmentTelehealthLinkResponse.md +17 -0
- package/docs/models/GetPreferredPharmacyResponse.md +2 -2
- package/docs/models/GetScanUploadUrlRequest.md +1 -0
- package/docs/models/index.md +4 -1
- package/docs/operations/appointments.getTelehealthLink.md +4 -2
- package/docs/operations/diagnostics.createRapidTest.md +49 -37
- package/docs/operations/diagnostics.getScanUploadUrl.md +3 -1
- package/docs/operations/diagnostics.lookupTestByGs1.md +3 -1
- package/docs/operations/patient.addInsurance.md +11 -9
- package/docs/operations/patient.checkEncounter.md +93 -7
- package/docs/operations/patient.checkInEncounter.md +68 -2
- package/docs/operations/patient.getPreferredPharmacy.md +13 -1
- package/package.json +1 -1
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# CheckInEncounterResponse
|
|
2
|
+
|
|
3
|
+
Model ID: `CheckInEncounterResponse`
|
|
4
|
+
|
|
5
|
+
Checked-in encounter with metadata for the tenant's active EHR.
|
|
6
|
+
|
|
7
|
+
Type: `object`
|
|
8
|
+
|
|
9
|
+
## Fields
|
|
10
|
+
|
|
11
|
+
| Field | Type | Required | Format | Allowed values | Default | Nullable | Description |
|
|
12
|
+
|---|---|---:|---|---|---|---:|---|
|
|
13
|
+
| `appointment_id` | `string|null` | No | | | | Yes | FHIR Appointment id this encounter fulfills, when linked. |
|
|
14
|
+
| `athena_appointment_id` | `string|null` | No | | | | Yes | Athena Health appointment id this encounter was checked in from, when checked in via Athena. Vendor id — unlike appointment_id it is NOT a FHIR reference. |
|
|
15
|
+
| `athena_encounter_id` | `string|null` | No | | | | Yes | Athena Health encounter id this encounter is linked to, when checked in via Athena. |
|
|
16
|
+
| `athena_patient_id` | `string|null` | No | | | | Yes | Athena patient id used for check-in, for Athena-integrated tenants. |
|
|
17
|
+
| `created_by` | `string` | No | | | `"self"` | No | Person FHIR resource ID of the creating field agent, or 'self' |
|
|
18
|
+
| `created_date` | `string|null` | No | | | | Yes | UTC datetime when the encounter was created |
|
|
19
|
+
| `diagnoses` | array of [`patient.EncounterDiagnosis`](./patient.EncounterDiagnosis.md) | No | | | | No | Diagnoses recorded for this encounter, ranked by rank. |
|
|
20
|
+
| `encounter_class` | [`EncounterClass`](./EncounterClass.md) | No | | | `"AMB"` | No | Encounter class: AMB (ambulatory), EMER (emergency), FLD (field), HH (home health), ACUTE, NONAC, OBSENC, PRENC, SS, or VR (virtual). |
|
|
21
|
+
| `encounter_id` | `string` | No | uuid | | | No | HealthCloud encounter identifier (UUID). |
|
|
22
|
+
| `fhir_id` | `string|null` | No | | | | Yes | FHIR Encounter resource id, when stored. |
|
|
23
|
+
| `hospitalization` | [`patient.EncounterHospitalization`](./patient.EncounterHospitalization.md) | No | | | | Yes | Hospitalization details (admit source, discharge disposition, etc.), for inpatient encounters. |
|
|
24
|
+
| `length_minutes` | `integer|null` | No | | | | Yes | Duration of the encounter in minutes, when known. |
|
|
25
|
+
| `locations` | array of [`patient.EncounterLocation`](./patient.EncounterLocation.md) | No | | | | No | Locations where the encounter takes place, with status and period. |
|
|
26
|
+
| `notes` | `string|null` | No | | | | Yes | Free-text encounter notes, e.g. synced from an external EHR's assessment/SOAP note. |
|
|
27
|
+
| `openloop_appointment_id` | `string|null` | No | | | | Yes | OpenLoop (Healthie) appointment id this encounter was checked in from, when checked in via OpenLoop. Vendor id — unlike appointment_id it is NOT a FHIR reference. |
|
|
28
|
+
| `openloop_encounter_id` | `string|null` | No | | | | Yes | OpenLoop (Healthie) Patient Encounter id this encounter is linked to, when checked in via OpenLoop. |
|
|
29
|
+
| `openloop_encounter_status` | `string|null` | No | | | | Yes | `linked` when the OpenLoop appointment and encounter were linked successfully. |
|
|
30
|
+
| `openloop_patient_id` | `string|null` | No | | | | Yes | OpenLoop patient id used for check-in, for OpenLoop-integrated tenants. |
|
|
31
|
+
| `participants` | array of [`patient.EncounterParticipant`](./patient.EncounterParticipant.md) | No | | | | No | Practitioners participating in the encounter, with their roles. |
|
|
32
|
+
| `patient_id` | `string` | Yes | | | | No | FHIR Patient id who is the subject of the encounter. |
|
|
33
|
+
| `period_end` | `string|null` | No | | | | Yes | When the encounter ended, when recorded. |
|
|
34
|
+
| `period_start` | `string|null` | No | | | | Yes | When the encounter started, when recorded. |
|
|
35
|
+
| `priority_code` | `string|null` | No | | | | Yes | Code for the encounter priority (e.g. routine, urgent, emergent), when coded. |
|
|
36
|
+
| `priority_display` | `string|null` | No | | | | Yes | Display text for the encounter priority, when available. |
|
|
37
|
+
| `reason_code` | `string|null` | No | | | | Yes | SNOMED CT code for the reason for the encounter, when coded. |
|
|
38
|
+
| `reason_display` | `string|null` | No | | | | Yes | Display text for the reason for the encounter, when available. |
|
|
39
|
+
| `service_provider_display` | `string|null` | No | | | | Yes | Display name of the service provider organization, when available. |
|
|
40
|
+
| `service_provider_id` | `string|null` | No | | | | Yes | FHIR Organization id of the service provider, when linked. |
|
|
41
|
+
| `service_type_code` | `string|null` | No | | | | Yes | SNOMED CT code for the service type, when coded. |
|
|
42
|
+
| `service_type_display` | `string|null` | No | | | | Yes | Display text for the service type, when available. |
|
|
43
|
+
| `status` | [`EncounterStatus`](./EncounterStatus.md) | No | | | `"planned"` | No | Encounter status: planned, arrived, triaged, in-progress, onleave, finished, cancelled, entered-in-error, or unknown. |
|
|
44
|
+
| `steadymd_consult_guid` | `string|null` | No | | | | Yes | SteadyMD consult guid this encounter was checked in from, when checked in via SteadyMD. Vendor id — unlike appointment_id it is NOT a FHIR reference. |
|
|
45
|
+
| `steadymd_episode_guid` | `string|null` | No | | | | Yes | SteadyMD episode guid this encounter is linked to, when checked in via SteadyMD. |
|
|
46
|
+
| `type_code` | `string|null` | No | | | | Yes | SNOMED CT code for the encounter type (e.g. office visit, follow-up), when coded. |
|
|
47
|
+
| `type_display` | `string|null` | No | | | | Yes | Display text for the encounter type, when available. |
|
|
48
|
+
|
|
49
|
+
## Example
|
|
50
|
+
|
|
51
|
+
None declared in canonical OpenAPI.
|
|
@@ -11,7 +11,9 @@ Type: `object`
|
|
|
11
11
|
| Field | Type | Required | Format | Allowed values | Default | Nullable | Description |
|
|
12
12
|
|---|---|---:|---|---|---|---:|---|
|
|
13
13
|
| `administered_date` | `string` | No | | | | No | ISO date or date-time; accepted as an alias for performed_date/performed_datetime (hc/apis/diagnostics/src/app.py::create_rapid_test). |
|
|
14
|
+
| `athena_encounter_id` | `string` | No | | | | No | Athena encounter id to mirror this result onto directly, optional. Overrides the encounter_id -> FHIR Encounter lookup when the caller already knows it. |
|
|
14
15
|
| `device_name` | `string` | No | | | | No | CLIA-waived device make/model, optional. |
|
|
16
|
+
| `encounter_id` | `string` | No | | | | No | FHIR Encounter id this test is associated with, optional. When the tenant has Athena and the patient is linked, this is used to resolve athena_encounter_id (from the Encounter's Athena extension) for the best-effort Athena mirror. Required for the Athena mirror to run unless athena_encounter_id is supplied directly. |
|
|
15
17
|
| `lot_number` | `string` | No | | | | No | Test kit lot number, optional. |
|
|
16
18
|
| `notes` | `string` | No | | | | No | Free-text notes, optional. |
|
|
17
19
|
| `performed_date` | `string` | No | date | | | No | ISO 8601 date the test was performed, optional. |
|
|
@@ -19,6 +21,7 @@ Type: `object`
|
|
|
19
21
|
| `quantitative_unit` | `string` | No | | | | No | Unit of measure for quantitative_value, optional. |
|
|
20
22
|
| `quantitative_value` | `number` | No | | | | No | Numeric result value, for tests that report a quantitative reading. Requires quantitative_unit. |
|
|
21
23
|
| `result` | [`RapidTestResult`](./RapidTestResult.md) | No | | | | No | The qualitative result, optional. |
|
|
24
|
+
| `scan_storage_key` | `string` | No | | | | No | SAFE CDX S3 object key of the captured test-strip image (from diagnostics.getScanUploadUrl), optional. When present and the Athena mirror runs, the image is attached to the Athena lab result document; when absent, the Athena mirror still runs but without an image attachment. |
|
|
22
25
|
| `specimen_type` | [`SpecimenType`](./SpecimenType.md) | No | | | | No | Type of specimen the test was run on. Defaults to nasopharyngeal_swab if omitted. |
|
|
23
26
|
| `type` | [`RapidTestType`](./RapidTestType.md) | No | | | | No | Which rapid test kit was used. Defaults to 'other' if omitted. |
|
|
24
27
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
#
|
|
1
|
+
# CreateRapidTestResponse
|
|
2
2
|
|
|
3
|
-
Model ID: `
|
|
3
|
+
Model ID: `CreateRapidTestResponse`
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
Response for POST /patients/{patient_id}/diagnostics/rapid-tests.
|
|
6
|
+
Extends RapidTest with the best-effort Athena mirror outcome.
|
|
7
7
|
|
|
8
8
|
Type: `object`
|
|
9
9
|
|
|
@@ -11,7 +11,11 @@ Type: `object`
|
|
|
11
11
|
|
|
12
12
|
| Field | Type | Required | Format | Allowed values | Default | Nullable | Description |
|
|
13
13
|
|---|---|---:|---|---|---|---:|---|
|
|
14
|
+
| `athena_error` | `string|null` | No | | | | Yes | Reason the Athena mirror failed, only present when athena_status is 'failed'. |
|
|
15
|
+
| `athena_order_id` | `string|null` | No | | | | Yes | The Athena lab order id the result document ties to, only present when athena_status is 'linked'. |
|
|
16
|
+
| `athena_status` | `string|null` | No | | | | Yes | Outcome of mirroring this result to Athena. `linked` means the diagnosis + lab order + lab result document (with image, when scan_storage_key was supplied) were created in Athena. `skipped_no_athena` means the tenant is not Athena-integrated; `skipped_unlinked` means the patient has no athena_patient_id; `skipped_no_encounter` means neither encounter_id nor athena_encounter_id was supplied; `skipped_no_athena_encounter` means the given FHIR Encounter has no linked Athena encounter id. Absent entirely when the request supplied neither encounter_id nor athena_encounter_id. |
|
|
14
17
|
| `collected_by` | `string|null` | No | | | | Yes | Name of the person who collected the specimen, optional. |
|
|
18
|
+
| `derived_from` | `array|null` | No | | | | Yes | FHIR resource IDs this observation is derived from, e.g. ['Media/{id}'] for the captured test-kit image. Per FHIR R4 Observation.derivedFrom. |
|
|
15
19
|
| `device_name` | `string|null` | No | | | | Yes | CLIA-waived device make/model |
|
|
16
20
|
| `encounter_id` | `string|null` | No | | | | Yes | FHIR Encounter ID this test is associated with, optional. |
|
|
17
21
|
| `fhir_id` | `string|null` | No | | | | Yes | FHIR Observation resource ID; set once the record has been persisted. |
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# GetAppointmentTelehealthLinkResponse
|
|
2
|
+
|
|
3
|
+
Model ID: `GetAppointmentTelehealthLinkResponse`
|
|
4
|
+
|
|
5
|
+
Join link persisted in the Athena appointment's notes.
|
|
6
|
+
|
|
7
|
+
Type: `object`
|
|
8
|
+
|
|
9
|
+
## Fields
|
|
10
|
+
|
|
11
|
+
| Field | Type | Required | Format | Allowed values | Default | Nullable | Description |
|
|
12
|
+
|---|---|---:|---|---|---|---:|---|
|
|
13
|
+
| `telehealth_link` | `string` | Yes | | | | No | HealthCloud provider-app URL for this appointment's video visit. |
|
|
14
|
+
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
None declared in canonical OpenAPI.
|
|
@@ -11,6 +11,7 @@ Type: `object`
|
|
|
11
11
|
| Field | Type | Required | Format | Allowed values | Default | Nullable | Description |
|
|
12
12
|
|---|---|---:|---|---|---|---:|---|
|
|
13
13
|
| `content_type` | `string` | No | | | `"image/jpeg"` | No | MIME type of the scan image. Defaults to image/jpeg. |
|
|
14
|
+
| `encounter_id` | `string|null` | No | | | | Yes | FHIR Encounter id this scan is associated with, optional. Stored on the pending Observation so the async SAFE CDX result ingestion can mirror the finished result to Athena (when the tenant/patient are Athena-linked) once CVML processing completes. |
|
|
14
15
|
| `filename` | `string` | No | | | `"scan.jpg"` | No | Filename of the uploaded scan. Defaults to scan.jpg. |
|
|
15
16
|
| `gtin` | `string|null` | No | | | | Yes | GTIN of the test kit. Optional for the compatibility upload endpoint; the combined GS1 lookup flow supplies it automatically. |
|
|
16
17
|
| `test_id` | `string` | Yes | uuid | | | No | Health Cloud correlation UUID for the diagnostic scan. |
|
package/docs/models/index.md
CHANGED
|
@@ -388,7 +388,9 @@
|
|
|
388
388
|
- [ChatMessageRecord](ChatMessageRecord.md)
|
|
389
389
|
- [CheckEligibilityRequest](CheckEligibilityRequest.md)
|
|
390
390
|
- [CheckEncounterRequest](CheckEncounterRequest.md)
|
|
391
|
+
- [CheckEncounterResponse](CheckEncounterResponse.md)
|
|
391
392
|
- [CheckInEncounterRequest](CheckInEncounterRequest.md)
|
|
393
|
+
- [CheckInEncounterResponse](CheckInEncounterResponse.md)
|
|
392
394
|
- [CMSCounty](CMSCounty.md)
|
|
393
395
|
- [CmsGetCountyFipsRequest](CmsGetCountyFipsRequest.md)
|
|
394
396
|
- [CmsSearchHealthPlansRequest](CmsSearchHealthPlansRequest.md)
|
|
@@ -448,6 +450,7 @@
|
|
|
448
450
|
- [CreateQuestionnaireResponseRequest](CreateQuestionnaireResponseRequest.md)
|
|
449
451
|
- [CreateQuestionnaireResponseResponse](CreateQuestionnaireResponseResponse.md)
|
|
450
452
|
- [CreateRapidTestRequest](CreateRapidTestRequest.md)
|
|
453
|
+
- [CreateRapidTestResponse](CreateRapidTestResponse.md)
|
|
451
454
|
- [CreateSlotRequest](CreateSlotRequest.md)
|
|
452
455
|
- [CreateSummaryResponse](CreateSummaryResponse.md)
|
|
453
456
|
- [CypherQueryResponse](CypherQueryResponse.md)
|
|
@@ -561,6 +564,7 @@
|
|
|
561
564
|
- [GetAgentAgentResponse](GetAgentAgentResponse.md)
|
|
562
565
|
- [GetAgentConfigurationAgentconfigurationResponse](GetAgentConfigurationAgentconfigurationResponse.md)
|
|
563
566
|
- [FieldAgentPhotoResponse](GetAgentPhotoResponse.md)
|
|
567
|
+
- [GetAppointmentTelehealthLinkResponse](GetAppointmentTelehealthLinkResponse.md)
|
|
564
568
|
- [GetCheckinCheckinResponse](GetCheckinCheckinResponse.md)
|
|
565
569
|
- [GetCurrentCareSessionCareSessionsCurrentResponse](GetCurrentCareSessionCareSessionsCurrentResponse.md)
|
|
566
570
|
- [GetDiagnosticAnalyteResponse](GetDiagnosticAnalyteResponse.md)
|
|
@@ -1485,7 +1489,6 @@
|
|
|
1485
1489
|
- [QuestSubmitOrderRequest](QuestSubmitOrderRequest.md)
|
|
1486
1490
|
- [QuestSyncCompendiumsRequest](QuestSyncCompendiumsRequest.md)
|
|
1487
1491
|
- [Race](Race.md)
|
|
1488
|
-
- [RapidTest](RapidTest.md)
|
|
1489
1492
|
- [RapidTestResult](RapidTestResult.md)
|
|
1490
1493
|
- [RapidTestType](RapidTestType.md)
|
|
1491
1494
|
- [ReactionSeverity](ReactionSeverity.md)
|
|
@@ -50,14 +50,16 @@ None declared in canonical OpenAPI.
|
|
|
50
50
|
|
|
51
51
|
| Status | Shape | Content type | Description |
|
|
52
52
|
|---|---|---|---|
|
|
53
|
-
| `200` | `
|
|
53
|
+
| `200` | [`GetAppointmentTelehealthLinkResponse`](../models/GetAppointmentTelehealthLinkResponse.md) | application/json | The telehealth join link written to this appointment's Athena notes at booking time |
|
|
54
54
|
|
|
55
55
|
## Success response examples
|
|
56
56
|
|
|
57
57
|
### 200
|
|
58
58
|
|
|
59
59
|
```json
|
|
60
|
-
{
|
|
60
|
+
{
|
|
61
|
+
"telehealth_link": "https://healthcheck-provider.health.cloud/telehealth/example-channel"
|
|
62
|
+
}
|
|
61
63
|
```
|
|
62
64
|
|
|
63
65
|
## Common errors
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Operation ID: `diagnostics.createRapidTest`
|
|
4
4
|
|
|
5
|
-
Create a rapid test Observation for a patient (COVID, flu, pregnancy, glucose, etc.). Returns the created test's test_id — use it with diagnostics.getScanUploadUrl to attach a photo of the test device, or with diagnostics.getTestResult to retrieve it later. administered_date is accepted as an alias for performed_date/performed_datetime; when none of the three date fields are supplied, the test is recorded as performed today.
|
|
5
|
+
Create a rapid test Observation for a patient (COVID, flu, pregnancy, glucose, etc.). Returns the created test's test_id — use it with diagnostics.getScanUploadUrl to attach a photo of the test device, or with diagnostics.getTestResult to retrieve it later. administered_date is accepted as an alias for performed_date/performed_datetime; when none of the three date fields are supplied, the test is recorded as performed today. When encounter_id (or athena_encounter_id directly) is supplied and the tenant has Athena with this patient linked, the result is also mirrored to the Athena chart as a lab order + lab result document (image attached when scan_storage_key resolves to one) — a best-effort, non-fatal step reported back via athena_status/athena_error/athena_order_id; the FHIR write always succeeds independently of the Athena outcome.
|
|
6
6
|
|
|
7
7
|
## Public method
|
|
8
8
|
|
|
@@ -48,16 +48,19 @@ Request model: [`CreateRapidTestRequest`](../models/CreateRapidTestRequest.md)
|
|
|
48
48
|
|
|
49
49
|
```json
|
|
50
50
|
{
|
|
51
|
-
"administered_date": "
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"
|
|
51
|
+
"administered_date": "string",
|
|
52
|
+
"athena_encounter_id": "string",
|
|
53
|
+
"device_name": "string",
|
|
54
|
+
"encounter_id": "string",
|
|
55
|
+
"lot_number": "string",
|
|
56
|
+
"notes": "string",
|
|
57
|
+
"performed_date": "2026-01-01",
|
|
58
|
+
"performed_datetime": "2026-01-01T09:00:00Z",
|
|
59
|
+
"quantitative_unit": "string",
|
|
60
|
+
"quantitative_value": 0,
|
|
61
|
+
"result": "positive",
|
|
62
|
+
"scan_storage_key": "string",
|
|
63
|
+
"specimen_type": "blood",
|
|
61
64
|
"type": "covid19"
|
|
62
65
|
}
|
|
63
66
|
```
|
|
@@ -66,7 +69,7 @@ Request model: [`CreateRapidTestRequest`](../models/CreateRapidTestRequest.md)
|
|
|
66
69
|
|
|
67
70
|
| Status | Shape | Content type | Description |
|
|
68
71
|
|---|---|---|---|
|
|
69
|
-
| `201` | [`
|
|
72
|
+
| `201` | [`CreateRapidTestResponse`](../models/CreateRapidTestResponse.md) | application/json | Rapid point-of-care test result created |
|
|
70
73
|
|
|
71
74
|
## Success response examples
|
|
72
75
|
|
|
@@ -74,21 +77,27 @@ Request model: [`CreateRapidTestRequest`](../models/CreateRapidTestRequest.md)
|
|
|
74
77
|
|
|
75
78
|
```json
|
|
76
79
|
{
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
"
|
|
81
|
-
"
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
"
|
|
85
|
-
"
|
|
86
|
-
"
|
|
87
|
-
"
|
|
88
|
-
"
|
|
89
|
-
"
|
|
80
|
+
"athena_error": "string",
|
|
81
|
+
"athena_order_id": "string",
|
|
82
|
+
"athena_status": "linked",
|
|
83
|
+
"collected_by": "string",
|
|
84
|
+
"derived_from": [
|
|
85
|
+
"string"
|
|
86
|
+
],
|
|
87
|
+
"device_name": "string",
|
|
88
|
+
"encounter_id": "string",
|
|
89
|
+
"fhir_id": "string",
|
|
90
|
+
"lot_number": "string",
|
|
91
|
+
"notes": "string",
|
|
92
|
+
"performed_by": "string",
|
|
93
|
+
"performed_date": "2026-01-01",
|
|
94
|
+
"performed_datetime": "2026-01-01T09:00:00Z",
|
|
95
|
+
"quantitative_unit": "string",
|
|
96
|
+
"quantitative_value": 0,
|
|
97
|
+
"result": "positive",
|
|
98
|
+
"specimen_type": "nasopharyngeal_swab",
|
|
90
99
|
"status": "final",
|
|
91
|
-
"test_id": "00000000-0000-
|
|
100
|
+
"test_id": "00000000-0000-0000-0000-000000000000",
|
|
92
101
|
"type": "covid19"
|
|
93
102
|
}
|
|
94
103
|
```
|
|
@@ -163,16 +172,19 @@ import { HCSDK } from "@healthcloudai/hc-sdk";
|
|
|
163
172
|
const patientId = "<PATIENT_ID>";
|
|
164
173
|
|
|
165
174
|
const request = {
|
|
166
|
-
"administered_date": "
|
|
167
|
-
"
|
|
168
|
-
"
|
|
169
|
-
"
|
|
170
|
-
"
|
|
171
|
-
"
|
|
172
|
-
"
|
|
173
|
-
"
|
|
174
|
-
"
|
|
175
|
-
"
|
|
175
|
+
"administered_date": "string",
|
|
176
|
+
"athena_encounter_id": "string",
|
|
177
|
+
"device_name": "string",
|
|
178
|
+
"encounter_id": "string",
|
|
179
|
+
"lot_number": "string",
|
|
180
|
+
"notes": "string",
|
|
181
|
+
"performed_date": "2026-01-01",
|
|
182
|
+
"performed_datetime": "2026-01-01T09:00:00Z",
|
|
183
|
+
"quantitative_unit": "string",
|
|
184
|
+
"quantitative_value": 0,
|
|
185
|
+
"result": "positive",
|
|
186
|
+
"scan_storage_key": "string",
|
|
187
|
+
"specimen_type": "blood",
|
|
176
188
|
"type": "covid19"
|
|
177
189
|
};
|
|
178
190
|
|
|
@@ -185,7 +197,7 @@ const result = await diagnostics.createRapidTest(patientId, request);
|
|
|
185
197
|
curl -X POST \
|
|
186
198
|
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
|
|
187
199
|
-H 'Content-Type: application/json' \
|
|
188
|
-
-d '{"administered_date":"
|
|
200
|
+
-d '{"administered_date":"string","athena_encounter_id":"string","device_name":"string","encounter_id":"string","lot_number":"string","notes":"string","performed_date":"2026-01-01","performed_datetime":"2026-01-01T09:00:00Z","quantitative_unit":"string","quantitative_value":0,"result":"positive","scan_storage_key":"string","specimen_type":"blood","type":"covid19"}' \
|
|
189
201
|
'https://dev-api-diagnostics.health.cloud/patients/%3CPATIENT_ID%3E/diagnostics/rapid-tests'
|
|
190
202
|
```
|
|
191
203
|
|
|
@@ -49,6 +49,7 @@ Request model: [`GetScanUploadUrlRequest`](../models/GetScanUploadUrlRequest.md)
|
|
|
49
49
|
```json
|
|
50
50
|
{
|
|
51
51
|
"content_type": "image/jpeg",
|
|
52
|
+
"encounter_id": "string",
|
|
52
53
|
"filename": "scan.jpg",
|
|
53
54
|
"gtin": "string",
|
|
54
55
|
"test_id": "00000000-0000-0000-0000-000000000000"
|
|
@@ -137,6 +138,7 @@ const patientId = "<PATIENT_ID>";
|
|
|
137
138
|
|
|
138
139
|
const request = {
|
|
139
140
|
"content_type": "image/jpeg",
|
|
141
|
+
"encounter_id": "string",
|
|
140
142
|
"filename": "scan.jpg",
|
|
141
143
|
"gtin": "string",
|
|
142
144
|
"test_id": "00000000-0000-0000-0000-000000000000"
|
|
@@ -151,7 +153,7 @@ const result = await diagnostics.getScanUploadUrl(patientId, request);
|
|
|
151
153
|
curl -X POST \
|
|
152
154
|
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
|
|
153
155
|
-H 'Content-Type: application/json' \
|
|
154
|
-
-d '{"content_type":"image/jpeg","filename":"scan.jpg","gtin":"string","test_id":"00000000-0000-0000-0000-000000000000"}' \
|
|
156
|
+
-d '{"content_type":"image/jpeg","encounter_id":"string","filename":"scan.jpg","gtin":"string","test_id":"00000000-0000-0000-0000-000000000000"}' \
|
|
155
157
|
'https://dev-api-diagnostics.health.cloud/patients/%3CPATIENT_ID%3E/diagnostics/scan-upload-url'
|
|
156
158
|
```
|
|
157
159
|
|
|
@@ -36,6 +36,7 @@ None documented.
|
|
|
36
36
|
|
|
37
37
|
| Name | Type | Required | Format | Allowed values | Default | Nullable | Description |
|
|
38
38
|
|---|---|---:|---|---|---|---:|---|
|
|
39
|
+
| `encounter_id` | `string` | No | | | | No | |
|
|
39
40
|
| `gs1` | `string` | Yes | | | | No | GS1 barcode value (e.g. 01095577222334451721053110ABC123) |
|
|
40
41
|
|
|
41
42
|
## Body parameters
|
|
@@ -139,6 +140,7 @@ import { HCSDK } from "@healthcloudai/hc-sdk";
|
|
|
139
140
|
const patientId = "<PATIENT_ID>";
|
|
140
141
|
|
|
141
142
|
const query = {
|
|
143
|
+
"encounter_id": "<ENCOUNTER_ID>",
|
|
142
144
|
"gs1": "<GS1>"
|
|
143
145
|
};
|
|
144
146
|
|
|
@@ -150,7 +152,7 @@ const result = await diagnostics.lookupByGs1(patientId, query);
|
|
|
150
152
|
```bash
|
|
151
153
|
curl -X GET \
|
|
152
154
|
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
|
|
153
|
-
'https://dev-api-diagnostics.health.cloud/patients/%3CPATIENT_ID%3E/diagnostics/lookup?gs1=%3CGS1%3E'
|
|
155
|
+
'https://dev-api-diagnostics.health.cloud/patients/%3CPATIENT_ID%3E/diagnostics/lookup?encounter_id=%3CENCOUNTER_ID%3E&gs1=%3CGS1%3E'
|
|
154
156
|
```
|
|
155
157
|
|
|
156
158
|
## Notes
|
|
@@ -46,11 +46,12 @@ Request model: [`AddInsuranceRequest`](../models/AddInsuranceRequest.md)
|
|
|
46
46
|
|
|
47
47
|
```json
|
|
48
48
|
{
|
|
49
|
-
"member_id": "
|
|
50
|
-
"payer_id": "
|
|
51
|
-
"payer_name": "
|
|
49
|
+
"member_id": "string",
|
|
50
|
+
"payer_id": "string",
|
|
51
|
+
"payer_name": "string",
|
|
52
52
|
"priority": "primary",
|
|
53
|
-
"relationship": "self"
|
|
53
|
+
"relationship": "self",
|
|
54
|
+
"state": "string"
|
|
54
55
|
}
|
|
55
56
|
```
|
|
56
57
|
|
|
@@ -121,11 +122,12 @@ import type { CreateInsuranceRequest } from "@healthcloudai/hc-sdk";
|
|
|
121
122
|
|
|
122
123
|
```ts
|
|
123
124
|
const request = {
|
|
124
|
-
"member_id": "
|
|
125
|
-
"payer_id": "
|
|
126
|
-
"payer_name": "
|
|
125
|
+
"member_id": "string",
|
|
126
|
+
"payer_id": "string",
|
|
127
|
+
"payer_name": "string",
|
|
127
128
|
"priority": "primary",
|
|
128
|
-
"relationship": "self"
|
|
129
|
+
"relationship": "self",
|
|
130
|
+
"state": "string"
|
|
129
131
|
};
|
|
130
132
|
|
|
131
133
|
const result = await patient.createInsurance(request);
|
|
@@ -137,7 +139,7 @@ const result = await patient.createInsurance(request);
|
|
|
137
139
|
curl -X POST \
|
|
138
140
|
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
|
|
139
141
|
-H 'Content-Type: application/json' \
|
|
140
|
-
-d '{"member_id":"
|
|
142
|
+
-d '{"member_id":"string","payer_id":"string","payer_name":"string","priority":"primary","relationship":"self","state":"string"}' \
|
|
141
143
|
'https://dev-api-patient.health.cloud/patients/insurance'
|
|
142
144
|
```
|
|
143
145
|
|
|
@@ -46,8 +46,8 @@ Request model: [`CheckEncounterRequest`](../models/CheckEncounterRequest.md)
|
|
|
46
46
|
|
|
47
47
|
```json
|
|
48
48
|
{
|
|
49
|
-
"notes": "
|
|
50
|
-
"patient_id": "
|
|
49
|
+
"notes": "Synthetic visit note",
|
|
50
|
+
"patient_id": "patient-example-001"
|
|
51
51
|
}
|
|
52
52
|
```
|
|
53
53
|
|
|
@@ -55,14 +55,100 @@ Request model: [`CheckEncounterRequest`](../models/CheckEncounterRequest.md)
|
|
|
55
55
|
|
|
56
56
|
| Status | Shape | Content type | Description |
|
|
57
57
|
|---|---|---|---|
|
|
58
|
-
| `200` | `
|
|
58
|
+
| `200` | [`CheckEncounterResponse`](../models/CheckEncounterResponse.md) | application/json | Current or newly created encounter, with Athena walk-in status |
|
|
59
59
|
|
|
60
60
|
## Success response examples
|
|
61
61
|
|
|
62
62
|
### 200
|
|
63
63
|
|
|
64
64
|
```json
|
|
65
|
-
{
|
|
65
|
+
{
|
|
66
|
+
"athena_appointment_id": "athena-appointment-example-001",
|
|
67
|
+
"athena_encounter_error": null,
|
|
68
|
+
"athena_encounter_id": "athena-encounter-example-001",
|
|
69
|
+
"athena_encounter_status": "linked",
|
|
70
|
+
"athena_insurance_error": null,
|
|
71
|
+
"athena_insurance_status": "linked",
|
|
72
|
+
"athena_patient_id": "athena-patient-example-001",
|
|
73
|
+
"created": true,
|
|
74
|
+
"encounter": {
|
|
75
|
+
"appointment_id": "appointment-example-001",
|
|
76
|
+
"athena_appointment_id": null,
|
|
77
|
+
"athena_encounter_id": null,
|
|
78
|
+
"created_by": "self",
|
|
79
|
+
"created_date": "2026-08-10T23:36:57Z",
|
|
80
|
+
"diagnoses": [
|
|
81
|
+
{
|
|
82
|
+
"condition_display": "Acute upper respiratory infection",
|
|
83
|
+
"condition_id": "condition-example-001",
|
|
84
|
+
"rank": 1,
|
|
85
|
+
"use_code": "AD"
|
|
86
|
+
}
|
|
87
|
+
],
|
|
88
|
+
"encounter_class": "AMB",
|
|
89
|
+
"encounter_id": "167dd34e-1833-4260-a8b1-ea0b38229a1b",
|
|
90
|
+
"fhir_id": "6e0d484f-4f8b-4025-b6ef-abedf69f0f91",
|
|
91
|
+
"hospitalization": {
|
|
92
|
+
"admit_source_code": "physician-referral",
|
|
93
|
+
"destination_id": "location-example-002",
|
|
94
|
+
"discharge_disposition": "home",
|
|
95
|
+
"origin_id": "location-example-001",
|
|
96
|
+
"pre_admission_id": "encounter-example-prior",
|
|
97
|
+
"re_admission_code": "N"
|
|
98
|
+
},
|
|
99
|
+
"length_minutes": 30,
|
|
100
|
+
"locations": [
|
|
101
|
+
{
|
|
102
|
+
"location_display": "Example Clinic, Room 101",
|
|
103
|
+
"location_id": "location-example-001",
|
|
104
|
+
"period_end": "2026-08-10T10:30:00Z",
|
|
105
|
+
"period_start": "2026-08-10T10:00:00Z",
|
|
106
|
+
"status": "completed"
|
|
107
|
+
}
|
|
108
|
+
],
|
|
109
|
+
"notes": null,
|
|
110
|
+
"openloop_appointment_id": null,
|
|
111
|
+
"openloop_encounter_id": null,
|
|
112
|
+
"participants": [
|
|
113
|
+
{
|
|
114
|
+
"participant_type": "ATND",
|
|
115
|
+
"period_end": "2026-08-10T10:30:00Z",
|
|
116
|
+
"period_start": "2026-08-10T10:00:00Z",
|
|
117
|
+
"practitioner_display": "Dr. Alex Smith",
|
|
118
|
+
"practitioner_id": "provider-example-001"
|
|
119
|
+
}
|
|
120
|
+
],
|
|
121
|
+
"patient_id": "patient-example-001",
|
|
122
|
+
"period_end": "2026-08-10T10:30:00Z",
|
|
123
|
+
"period_start": "2026-08-10T10:00:00Z",
|
|
124
|
+
"priority_code": "R",
|
|
125
|
+
"priority_display": "Routine",
|
|
126
|
+
"reason_code": "386661006",
|
|
127
|
+
"reason_display": "Fever",
|
|
128
|
+
"service_provider_display": "Example Health Clinic",
|
|
129
|
+
"service_provider_id": "organization-example-001",
|
|
130
|
+
"service_type_code": "124",
|
|
131
|
+
"service_type_display": "General practice",
|
|
132
|
+
"status": "finished",
|
|
133
|
+
"steadymd_consult_guid": null,
|
|
134
|
+
"steadymd_episode_guid": null,
|
|
135
|
+
"type_code": "99213",
|
|
136
|
+
"type_display": "Office outpatient visit"
|
|
137
|
+
},
|
|
138
|
+
"notes_athena_sections": {
|
|
139
|
+
"status": "linked"
|
|
140
|
+
},
|
|
141
|
+
"notes_fhir_error": null,
|
|
142
|
+
"notes_fhir_status": "linked",
|
|
143
|
+
"openloop_appointment_id": null,
|
|
144
|
+
"openloop_encounter_error": null,
|
|
145
|
+
"openloop_encounter_id": null,
|
|
146
|
+
"openloop_encounter_status": "skipped_no_openloop",
|
|
147
|
+
"steadymd_consult_guid": null,
|
|
148
|
+
"steadymd_encounter_error": null,
|
|
149
|
+
"steadymd_encounter_status": "skipped_no_steadymd",
|
|
150
|
+
"steadymd_episode_guid": null
|
|
151
|
+
}
|
|
66
152
|
```
|
|
67
153
|
|
|
68
154
|
## Common errors
|
|
@@ -82,8 +168,8 @@ import type { CheckEncounterRequest } from "@healthcloudai/hc-sdk";
|
|
|
82
168
|
|
|
83
169
|
```ts
|
|
84
170
|
const request = {
|
|
85
|
-
"notes": "
|
|
86
|
-
"patient_id": "
|
|
171
|
+
"notes": "Synthetic visit note",
|
|
172
|
+
"patient_id": "patient-example-001"
|
|
87
173
|
};
|
|
88
174
|
|
|
89
175
|
const result = await patient.checkEncounter(request);
|
|
@@ -95,7 +181,7 @@ const result = await patient.checkEncounter(request);
|
|
|
95
181
|
curl -X POST \
|
|
96
182
|
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
|
|
97
183
|
-H 'Content-Type: application/json' \
|
|
98
|
-
-d '{"notes":"
|
|
184
|
+
-d '{"notes":"Synthetic visit note","patient_id":"patient-example-001"}' \
|
|
99
185
|
'https://dev-api-patient.health.cloud/encounters/check'
|
|
100
186
|
```
|
|
101
187
|
|
|
@@ -56,14 +56,80 @@ Request model: [`CheckInEncounterRequest`](../models/CheckInEncounterRequest.md)
|
|
|
56
56
|
|
|
57
57
|
| Status | Shape | Content type | Description |
|
|
58
58
|
|---|---|---|---|
|
|
59
|
-
| `200` | `
|
|
59
|
+
| `200` | [`CheckInEncounterResponse`](../models/CheckInEncounterResponse.md) | application/json | Encounter checked in and linked to the EHR encounter, plus athena_patient_id |
|
|
60
60
|
|
|
61
61
|
## Success response examples
|
|
62
62
|
|
|
63
63
|
### 200
|
|
64
64
|
|
|
65
65
|
```json
|
|
66
|
-
{
|
|
66
|
+
{
|
|
67
|
+
"appointment_id": "string",
|
|
68
|
+
"athena_appointment_id": "string",
|
|
69
|
+
"athena_encounter_id": "string",
|
|
70
|
+
"athena_patient_id": "string",
|
|
71
|
+
"created_by": "self",
|
|
72
|
+
"created_date": "2026-01-01T09:00:00Z",
|
|
73
|
+
"diagnoses": [
|
|
74
|
+
{
|
|
75
|
+
"condition_display": "string",
|
|
76
|
+
"condition_id": "string",
|
|
77
|
+
"rank": 1,
|
|
78
|
+
"use_code": "CC"
|
|
79
|
+
}
|
|
80
|
+
],
|
|
81
|
+
"encounter_class": "AMB",
|
|
82
|
+
"encounter_id": "00000000-0000-0000-0000-000000000000",
|
|
83
|
+
"fhir_id": "string",
|
|
84
|
+
"hospitalization": {
|
|
85
|
+
"admit_source_code": "string",
|
|
86
|
+
"destination_id": "string",
|
|
87
|
+
"discharge_disposition": "home",
|
|
88
|
+
"origin_id": "string",
|
|
89
|
+
"pre_admission_id": "string",
|
|
90
|
+
"re_admission_code": "string"
|
|
91
|
+
},
|
|
92
|
+
"length_minutes": 0,
|
|
93
|
+
"locations": [
|
|
94
|
+
{
|
|
95
|
+
"location_display": "string",
|
|
96
|
+
"location_id": "string",
|
|
97
|
+
"period_end": "2026-01-01T09:00:00Z",
|
|
98
|
+
"period_start": "2026-01-01T09:00:00Z",
|
|
99
|
+
"status": "active"
|
|
100
|
+
}
|
|
101
|
+
],
|
|
102
|
+
"notes": "string",
|
|
103
|
+
"openloop_appointment_id": "string",
|
|
104
|
+
"openloop_encounter_id": "string",
|
|
105
|
+
"openloop_encounter_status": "linked",
|
|
106
|
+
"openloop_patient_id": "string",
|
|
107
|
+
"participants": [
|
|
108
|
+
{
|
|
109
|
+
"participant_type": "PPRF",
|
|
110
|
+
"period_end": "2026-01-01T09:00:00Z",
|
|
111
|
+
"period_start": "2026-01-01T09:00:00Z",
|
|
112
|
+
"practitioner_display": "string",
|
|
113
|
+
"practitioner_id": "string"
|
|
114
|
+
}
|
|
115
|
+
],
|
|
116
|
+
"patient_id": "string",
|
|
117
|
+
"period_end": "2026-01-01T09:00:00Z",
|
|
118
|
+
"period_start": "2026-01-01T09:00:00Z",
|
|
119
|
+
"priority_code": "string",
|
|
120
|
+
"priority_display": "string",
|
|
121
|
+
"reason_code": "string",
|
|
122
|
+
"reason_display": "string",
|
|
123
|
+
"service_provider_display": "string",
|
|
124
|
+
"service_provider_id": "string",
|
|
125
|
+
"service_type_code": "string",
|
|
126
|
+
"service_type_display": "string",
|
|
127
|
+
"status": "planned",
|
|
128
|
+
"steadymd_consult_guid": "string",
|
|
129
|
+
"steadymd_episode_guid": "string",
|
|
130
|
+
"type_code": "string",
|
|
131
|
+
"type_display": "string"
|
|
132
|
+
}
|
|
67
133
|
```
|
|
68
134
|
|
|
69
135
|
## Common errors
|