@healthcloudai/hc-sdk 2.6.2 → 2.8.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 +173 -0
- package/dist/index.d.cts +5950 -5764
- package/dist/index.d.ts +5950 -5764
- package/dist/index.js +173 -0
- package/docs/clients/EhrClient.md +15 -0
- package/docs/clients/PatientClient.md +3 -0
- package/docs/docs-manifest.json +62 -5
- package/docs/examples/index.md +18 -0
- package/docs/index.md +18 -0
- package/docs/models/AddInsuranceRequest.md +1 -0
- package/docs/models/AddInsuranceResponse.md +2 -0
- package/docs/models/Allergy.md +31 -0
- package/docs/models/AllergyCategory.md +15 -0
- package/docs/models/AllergyCriticality.md +15 -0
- package/docs/models/AllergyReaction.md +21 -0
- package/docs/models/AllergyStatus.md +15 -0
- package/docs/models/AllergyVerificationStatus.md +15 -0
- package/docs/models/Appointment.md +1 -0
- package/docs/models/AthenaAppointment.md +1 -0
- package/docs/models/BookAppointmentRequest.md +1 -0
- package/docs/models/CheckEncounterRequest.md +17 -0
- package/docs/models/CheckInEncounterRequest.md +17 -0
- package/docs/models/CodedConcept.md +19 -0
- package/docs/models/FamilyCondition.md +21 -0
- package/docs/models/FamilyHistoryEntry.md +30 -0
- package/docs/models/FamilyHistoryStatus.md +15 -0
- package/docs/models/FamilyRelationship.md +15 -0
- package/docs/models/GS1LookupResponse.md +3 -2
- package/docs/models/GetEncounterResponse.md +3 -0
- package/docs/models/GetHealthRecordResponse.md +19 -0
- package/docs/models/GetLatestEncounterResponse.md +17 -0
- package/docs/models/GetPatientResponse.md +2 -0
- package/docs/models/GetScanUploadUrlRequest.md +3 -2
- package/docs/models/GetTestResultResponse.md +20 -0
- package/docs/models/IntoleranceType.md +15 -0
- package/docs/models/ListAllergiesResponse.md +19 -0
- package/docs/models/ListConditionsResponse.md +19 -0
- package/docs/models/ListDirectivesResponse.md +19 -0
- package/docs/models/ListFamilyHistoryResponse.md +19 -0
- package/docs/models/ListFunctionalStatusResponse.md +19 -0
- package/docs/models/ListImmunizationsResponse.md +19 -0
- package/docs/models/ListObservationsResponse.md +19 -0
- package/docs/models/ListProceduresResponse.md +19 -0
- package/docs/models/ListQuestionnaireResponsesResponse.md +19 -0
- package/docs/models/ListSocialHistoryResponse.md +19 -0
- package/docs/models/ListVitalsResponse.md +19 -0
- package/docs/models/PatientDemographics.md +2 -0
- package/docs/models/Problem.md +37 -0
- package/docs/models/ProblemCategory.md +15 -0
- package/docs/models/ProblemClinicalStatus.md +15 -0
- package/docs/models/ProblemSeverity.md +15 -0
- package/docs/models/ProblemVerificationStatus.md +15 -0
- package/docs/models/QuestionnaireResponse.md +27 -0
- package/docs/models/QuestionnaireResponseStatus.md +15 -0
- package/docs/models/ReactionSeverity.md +15 -0
- package/docs/models/ResponseAnswer.md +27 -0
- package/docs/models/ResponseItem.md +21 -0
- package/docs/models/ScanUploadResponse.md +4 -4
- package/docs/models/Slot.md +1 -0
- package/docs/models/ehr.ListDiagnosticsResponse.md +19 -0
- package/docs/models/ehr.ListEncountersResponse.md +19 -0
- package/docs/models/ehr.ListMedicationsResponse.md +19 -0
- package/docs/models/fieldagent.Encounter.md +3 -0
- package/docs/models/index.md +41 -2
- package/docs/models/patient.Encounter.md +3 -0
- package/docs/operations/appointments.book.md +18 -15
- package/docs/operations/appointments.cancel.md +12 -11
- package/docs/operations/appointments.createSlot.md +44 -9
- package/docs/operations/appointments.listPatientAppointments.md +13 -12
- package/docs/operations/appointments.listSlots.md +9 -8
- package/docs/operations/appointments.reschedule.md +11 -10
- package/docs/operations/connectors.athenaBookAppointment.md +1 -0
- package/docs/operations/connectors.athenaCreateInsurancePackage.md +1 -1
- package/docs/operations/connectors.athenaGetAppointmentDetails.md +1 -0
- package/docs/operations/connectors.athenaGetBookedAppointments.md +1 -0
- package/docs/operations/connectors.athenaGetEncounter.md +1 -0
- package/docs/operations/connectors.athenaListAppointments.md +1 -0
- package/docs/operations/connectors.athenaListPatientAppointments.md +1 -0
- package/docs/operations/diagnostics.getScanUploadUrl.md +7 -5
- package/docs/operations/diagnostics.getTestResult.md +5 -23
- package/docs/operations/diagnostics.lookupTestByGs1.md +12 -6
- package/docs/operations/ehr.getHealthRecord.md +122 -0
- package/docs/operations/ehr.listAllergies.md +156 -0
- package/docs/operations/ehr.listConditions.md +152 -0
- package/docs/operations/ehr.listDiagnostics.md +147 -0
- package/docs/operations/ehr.listDirectives.md +122 -0
- package/docs/operations/ehr.listEncounters.md +178 -0
- package/docs/operations/ehr.listFamilyHistory.md +147 -0
- package/docs/operations/ehr.listFunctionalStatus.md +122 -0
- package/docs/operations/ehr.listImmunizations.md +122 -0
- package/docs/operations/ehr.listMedications.md +163 -0
- package/docs/operations/ehr.listObservations.md +126 -0
- package/docs/operations/ehr.listProcedures.md +122 -0
- package/docs/operations/ehr.listQuestionnaireResponses.md +162 -0
- package/docs/operations/ehr.listSocialHistory.md +122 -0
- package/docs/operations/ehr.listVitals.md +132 -0
- package/docs/operations/fieldagent.listEncounters.md +42 -39
- package/docs/operations/fieldagent.listPatients.md +60 -95
- package/docs/operations/patient.addInsurance.md +14 -10
- package/docs/operations/patient.checkEncounter.md +110 -0
- package/docs/operations/patient.checkInEncounter.md +173 -0
- package/docs/operations/patient.createEncounter.md +40 -37
- package/docs/operations/patient.getCheckinCheckin.md +41 -38
- package/docs/operations/patient.getCurrentCareSessionCareSessionsCurrent.md +43 -40
- package/docs/operations/patient.getEncounter.md +40 -37
- package/docs/operations/patient.getLatestEncounter.md +162 -0
- package/docs/operations/patient.getPatient.md +57 -92
- package/docs/operations/patient.getPatientSidebarPatientSidebar.md +97 -129
- package/docs/operations/patient.listEncounters.md +41 -38
- package/package.json +1 -1
- package/docs/models/PanelResult.md +0 -24
- package/docs/models/SingleTestResultResponse.md +0 -28
|
@@ -64,19 +64,20 @@ Request model: [`RescheduleAppointmentRequest`](../models/RescheduleAppointmentR
|
|
|
64
64
|
|
|
65
65
|
```json
|
|
66
66
|
{
|
|
67
|
-
"appointment_id": "
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
"
|
|
67
|
+
"appointment_id": "string",
|
|
68
|
+
"athena_appointment_id": "string",
|
|
69
|
+
"created_at": "string",
|
|
70
|
+
"end": "string",
|
|
71
|
+
"patient_id": "string",
|
|
72
|
+
"provider_id": "string",
|
|
73
|
+
"slot_id": "string",
|
|
73
74
|
"slot_ids": [
|
|
74
|
-
"
|
|
75
|
+
"string"
|
|
75
76
|
],
|
|
76
|
-
"specialty_code": "
|
|
77
|
-
"start": "
|
|
77
|
+
"specialty_code": "string",
|
|
78
|
+
"start": "string",
|
|
78
79
|
"status": "scheduled",
|
|
79
|
-
"updated_at": "
|
|
80
|
+
"updated_at": "string"
|
|
80
81
|
}
|
|
81
82
|
```
|
|
82
83
|
|
|
@@ -75,6 +75,7 @@ Request model: [`AthenaBookAppointmentRequest`](../models/AthenaBookAppointmentR
|
|
|
75
75
|
"appointment_type_id": "12345",
|
|
76
76
|
"date": "example-date",
|
|
77
77
|
"department_id": "12345",
|
|
78
|
+
"encounter_id": "12345",
|
|
78
79
|
"last_modified": "example-last-modified",
|
|
79
80
|
"patient_appointment_type_name": "Example Name",
|
|
80
81
|
"patient_id": "12345",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Operation ID: `connectors.athenaCreateInsurancePackage`
|
|
4
4
|
|
|
5
|
-
Create an insurance record from an insurance package.
|
|
5
|
+
Create an insurance record from an insurance package. Tries sequence numbers 1 → 2 → 3 (Athena's primary/secondary/tertiary insurance slots) since an occupied slot rejects the write. Raises the last error (e.g. an invalid ``package_id``) if none of the three slots accept it, rather than swallowing it — silently returning None here left callers unable to tell "no free slot" apart from "Athena rejected this package outright", both by AthenaInsuranceSync and by direct API/MCP callers of this connector method.
|
|
6
6
|
|
|
7
7
|
## Public method
|
|
8
8
|
|
|
@@ -72,6 +72,7 @@ Request model: [`AthenaGetAppointmentDetailsRequest`](../models/AthenaGetAppoint
|
|
|
72
72
|
"appointment_type_id": "12345",
|
|
73
73
|
"date": "example-date",
|
|
74
74
|
"department_id": "12345",
|
|
75
|
+
"encounter_id": "12345",
|
|
75
76
|
"last_modified": "example-last-modified",
|
|
76
77
|
"patient_appointment_type_name": "Example Name",
|
|
77
78
|
"patient_id": "12345",
|
|
@@ -74,6 +74,7 @@ Request model: [`AthenaGetBookedAppointmentsRequest`](../models/AthenaGetBookedA
|
|
|
74
74
|
"appointment_type_id": "12345",
|
|
75
75
|
"date": "example-date",
|
|
76
76
|
"department_id": "12345",
|
|
77
|
+
"encounter_id": "12345",
|
|
77
78
|
"last_modified": "example-last-modified",
|
|
78
79
|
"patient_appointment_type_name": "Example Name",
|
|
79
80
|
"patient_id": "12345",
|
|
@@ -72,6 +72,7 @@ Request model: [`AthenaGetEncounterRequest`](../models/AthenaGetEncounterRequest
|
|
|
72
72
|
"appointment_type_id": "12345",
|
|
73
73
|
"date": "example-date",
|
|
74
74
|
"department_id": "12345",
|
|
75
|
+
"encounter_id": "12345",
|
|
75
76
|
"last_modified": "example-last-modified",
|
|
76
77
|
"patient_appointment_type_name": "Example Name",
|
|
77
78
|
"patient_id": "12345",
|
|
@@ -74,6 +74,7 @@ Request model: [`AthenaListAppointmentsRequest`](../models/AthenaListAppointment
|
|
|
74
74
|
"appointment_type_id": "12345",
|
|
75
75
|
"date": "example-date",
|
|
76
76
|
"department_id": "12345",
|
|
77
|
+
"encounter_id": "12345",
|
|
77
78
|
"last_modified": "example-last-modified",
|
|
78
79
|
"patient_appointment_type_name": "Example Name",
|
|
79
80
|
"patient_id": "12345",
|
|
@@ -73,6 +73,7 @@ Request model: [`AthenaListPatientAppointmentsRequest`](../models/AthenaListPati
|
|
|
73
73
|
"appointment_type_id": "12345",
|
|
74
74
|
"date": "example-date",
|
|
75
75
|
"department_id": "12345",
|
|
76
|
+
"encounter_id": "12345",
|
|
76
77
|
"last_modified": "example-last-modified",
|
|
77
78
|
"patient_appointment_type_name": "Example Name",
|
|
78
79
|
"patient_id": "12345",
|
|
@@ -49,8 +49,9 @@ Request model: [`GetScanUploadUrlRequest`](../models/GetScanUploadUrlRequest.md)
|
|
|
49
49
|
```json
|
|
50
50
|
{
|
|
51
51
|
"content_type": "image/jpeg",
|
|
52
|
-
"filename": "
|
|
53
|
-
"
|
|
52
|
+
"filename": "scan.jpg",
|
|
53
|
+
"gtin": "string",
|
|
54
|
+
"test_id": "00000000-0000-0000-0000-000000000000"
|
|
54
55
|
}
|
|
55
56
|
```
|
|
56
57
|
|
|
@@ -137,8 +138,9 @@ const patientId = "<PATIENT_ID>";
|
|
|
137
138
|
|
|
138
139
|
const request = {
|
|
139
140
|
"content_type": "image/jpeg",
|
|
140
|
-
"filename": "
|
|
141
|
-
"
|
|
141
|
+
"filename": "scan.jpg",
|
|
142
|
+
"gtin": "string",
|
|
143
|
+
"test_id": "00000000-0000-0000-0000-000000000000"
|
|
142
144
|
};
|
|
143
145
|
|
|
144
146
|
const result = await diagnostics.getScanUploadUrl(patientId, request);
|
|
@@ -150,7 +152,7 @@ const result = await diagnostics.getScanUploadUrl(patientId, request);
|
|
|
150
152
|
curl -X POST \
|
|
151
153
|
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
|
|
152
154
|
-H 'Content-Type: application/json' \
|
|
153
|
-
-d '{"content_type":"image/jpeg","filename":"
|
|
155
|
+
-d '{"content_type":"image/jpeg","filename":"scan.jpg","gtin":"string","test_id":"00000000-0000-0000-0000-000000000000"}' \
|
|
154
156
|
'https://dev-api-diagnostics.health.cloud/patients/%3CPATIENT_ID%3E/diagnostics/scan-upload-url'
|
|
155
157
|
```
|
|
156
158
|
|
|
@@ -51,7 +51,7 @@ None declared in canonical OpenAPI.
|
|
|
51
51
|
|
|
52
52
|
| Status | Shape | Content type | Description |
|
|
53
53
|
|---|---|---|---|
|
|
54
|
-
| `200` | [`
|
|
54
|
+
| `200` | [`GetTestResultResponse`](../models/GetTestResultResponse.md) | application/json | Single test result, supports 1-N panels |
|
|
55
55
|
|
|
56
56
|
## Success response examples
|
|
57
57
|
|
|
@@ -59,28 +59,10 @@ None declared in canonical OpenAPI.
|
|
|
59
59
|
|
|
60
60
|
```json
|
|
61
61
|
{
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
{
|
|
67
|
-
"interpretation": "NEG",
|
|
68
|
-
"loinc_code": "94500-6",
|
|
69
|
-
"loinc_display": "SARS-CoV-2 RNA",
|
|
70
|
-
"panel_name": "SARS-CoV-2",
|
|
71
|
-
"quantitative_unit": "index",
|
|
72
|
-
"quantitative_value": 0.12,
|
|
73
|
-
"result": "not_detected",
|
|
74
|
-
"result_type": "quantitative"
|
|
75
|
-
}
|
|
76
|
-
],
|
|
77
|
-
"patient_id": "patient-example-001",
|
|
78
|
-
"performed_by": "provider-example-001",
|
|
79
|
-
"performed_datetime": "2026-08-10T12:00:00Z",
|
|
80
|
-
"scan_url": "https://example.com/resource",
|
|
81
|
-
"status": "final",
|
|
82
|
-
"test_id": "00000000-0000-4000-8000-000000000001",
|
|
83
|
-
"test_type": "covid19"
|
|
62
|
+
"code": 0,
|
|
63
|
+
"data": {},
|
|
64
|
+
"message": "string",
|
|
65
|
+
"success": true
|
|
84
66
|
}
|
|
85
67
|
```
|
|
86
68
|
|
|
@@ -61,13 +61,19 @@ None declared in canonical OpenAPI.
|
|
|
61
61
|
```json
|
|
62
62
|
{
|
|
63
63
|
"gs1_parsed": {
|
|
64
|
-
"expiration_date": "
|
|
65
|
-
"gtin": "
|
|
66
|
-
"lot_number": "
|
|
67
|
-
"serial_number": "
|
|
64
|
+
"expiration_date": "2026-01-01",
|
|
65
|
+
"gtin": "string",
|
|
66
|
+
"lot_number": "string",
|
|
67
|
+
"serial_number": "string"
|
|
68
68
|
},
|
|
69
|
-
"product":
|
|
70
|
-
"raw_gs1": "
|
|
69
|
+
"product": {},
|
|
70
|
+
"raw_gs1": "string",
|
|
71
|
+
"scan_upload": {
|
|
72
|
+
"expires_in": 0,
|
|
73
|
+
"storage_key": "string",
|
|
74
|
+
"test_id": "00000000-0000-0000-0000-000000000000",
|
|
75
|
+
"upload_url": "string"
|
|
76
|
+
}
|
|
71
77
|
}
|
|
72
78
|
```
|
|
73
79
|
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
# Get a patient's consolidated health record
|
|
2
|
+
|
|
3
|
+
Operation ID: `ehr.getHealthRecord`
|
|
4
|
+
|
|
5
|
+
Return a consolidated view of a patient's clinical record — conditions, allergies, medications, procedures, immunizations, family history, and directives from the EHR service, plus encounters, vitals, questionnaire responses, and diagnostics fetched from their respective services. Aggregation is best-effort per resource type: if one downstream fetch fails, that resource type comes back as an empty list rather than failing the whole request — the response is not proof that a resource type genuinely has zero records.
|
|
6
|
+
|
|
7
|
+
## Public method
|
|
8
|
+
|
|
9
|
+
`getHealthRecord`
|
|
10
|
+
|
|
11
|
+
Signature: `ehr.getHealthRecord(patientId)`
|
|
12
|
+
|
|
13
|
+
Return type: `Promise<GetHealthRecordResponse>`
|
|
14
|
+
|
|
15
|
+
## Authentication
|
|
16
|
+
|
|
17
|
+
Classification: **AUTHENTICATED**
|
|
18
|
+
|
|
19
|
+
Schemes: `bearerAuth`
|
|
20
|
+
|
|
21
|
+
## Prerequisites
|
|
22
|
+
|
|
23
|
+
None documented.
|
|
24
|
+
|
|
25
|
+
## HTTP
|
|
26
|
+
|
|
27
|
+
`GET /patients/{patient_id}/record`
|
|
28
|
+
|
|
29
|
+
## Path parameters
|
|
30
|
+
|
|
31
|
+
| Name | Type | Required | Format | Allowed values | Default | Nullable | Description |
|
|
32
|
+
|---|---|---:|---|---|---|---:|---|
|
|
33
|
+
| `patient_id` | `string` | Yes | | | | No | |
|
|
34
|
+
|
|
35
|
+
## Query parameters
|
|
36
|
+
|
|
37
|
+
None.
|
|
38
|
+
|
|
39
|
+
## Body parameters
|
|
40
|
+
|
|
41
|
+
None.
|
|
42
|
+
|
|
43
|
+
Request model: None.
|
|
44
|
+
|
|
45
|
+
## Request example
|
|
46
|
+
|
|
47
|
+
None declared in canonical OpenAPI.
|
|
48
|
+
|
|
49
|
+
## Success responses
|
|
50
|
+
|
|
51
|
+
| Status | Shape | Content type | Description |
|
|
52
|
+
|---|---|---|---|
|
|
53
|
+
| `200` | [`GetHealthRecordResponse`](../models/GetHealthRecordResponse.md) | application/json | Consolidated patient health record |
|
|
54
|
+
|
|
55
|
+
## Success response examples
|
|
56
|
+
|
|
57
|
+
### 200
|
|
58
|
+
|
|
59
|
+
```json
|
|
60
|
+
{
|
|
61
|
+
"patient_id": "patient-example-001",
|
|
62
|
+
"resources": {},
|
|
63
|
+
"totals": {}
|
|
64
|
+
}
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Common errors
|
|
68
|
+
|
|
69
|
+
| Status | Shape | Content type | Description |
|
|
70
|
+
|---|---|---|---|
|
|
71
|
+
| `401` | [`StandardErrorResponse`](../models/StandardErrorResponse.md) | application/json | Authorization required — missing or invalid Bearer JWT |
|
|
72
|
+
| `500` | [`StandardErrorResponse`](../models/StandardErrorResponse.md) | application/json | Internal server error |
|
|
73
|
+
|
|
74
|
+
## Error examples
|
|
75
|
+
|
|
76
|
+
### 401 — Missing or invalid access token
|
|
77
|
+
|
|
78
|
+
```json
|
|
79
|
+
{
|
|
80
|
+
"error": "Authorization required"
|
|
81
|
+
}
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### 500 — Unexpected service failure (sanitized example)
|
|
85
|
+
|
|
86
|
+
```json
|
|
87
|
+
{
|
|
88
|
+
"error": "Internal server error"
|
|
89
|
+
}
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## NodeJS / TypeScript implementation
|
|
93
|
+
|
|
94
|
+
```ts
|
|
95
|
+
import { HCSDK } from "@healthcloudai/hc-sdk";
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
```ts
|
|
99
|
+
const patientId = "<PATIENT_ID>";
|
|
100
|
+
|
|
101
|
+
const result = await ehr.getHealthRecord(patientId);
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
## cURL
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
curl -X GET \
|
|
108
|
+
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
|
|
109
|
+
'https://dev-api-ehr.health.cloud/patients/%3CPATIENT_ID%3E/record'
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
## Notes
|
|
113
|
+
|
|
114
|
+
None.
|
|
115
|
+
|
|
116
|
+
## Prepared Test Console scenario
|
|
117
|
+
|
|
118
|
+
No canonical scenario is currently associated.
|
|
119
|
+
|
|
120
|
+
## Real response
|
|
121
|
+
|
|
122
|
+
No approved real integration response is currently published. Unapproved candidates are never rendered as examples.
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
# List a patient's allergies
|
|
2
|
+
|
|
3
|
+
Operation ID: `ehr.listAllergies`
|
|
4
|
+
|
|
5
|
+
List FHIR AllergyIntolerance resources for a patient.
|
|
6
|
+
|
|
7
|
+
## Public method
|
|
8
|
+
|
|
9
|
+
`listAllergies`
|
|
10
|
+
|
|
11
|
+
Signature: `ehr.listAllergies(patientId)`
|
|
12
|
+
|
|
13
|
+
Return type: `Promise<ListAllergiesResponse>`
|
|
14
|
+
|
|
15
|
+
## Authentication
|
|
16
|
+
|
|
17
|
+
Classification: **AUTHENTICATED**
|
|
18
|
+
|
|
19
|
+
Schemes: `bearerAuth`
|
|
20
|
+
|
|
21
|
+
## Prerequisites
|
|
22
|
+
|
|
23
|
+
None documented.
|
|
24
|
+
|
|
25
|
+
## HTTP
|
|
26
|
+
|
|
27
|
+
`GET /patients/{patient_id}/allergies`
|
|
28
|
+
|
|
29
|
+
## Path parameters
|
|
30
|
+
|
|
31
|
+
| Name | Type | Required | Format | Allowed values | Default | Nullable | Description |
|
|
32
|
+
|---|---|---:|---|---|---|---:|---|
|
|
33
|
+
| `patient_id` | `string` | Yes | | | | No | |
|
|
34
|
+
|
|
35
|
+
## Query parameters
|
|
36
|
+
|
|
37
|
+
None.
|
|
38
|
+
|
|
39
|
+
## Body parameters
|
|
40
|
+
|
|
41
|
+
None.
|
|
42
|
+
|
|
43
|
+
Request model: None.
|
|
44
|
+
|
|
45
|
+
## Request example
|
|
46
|
+
|
|
47
|
+
None declared in canonical OpenAPI.
|
|
48
|
+
|
|
49
|
+
## Success responses
|
|
50
|
+
|
|
51
|
+
| Status | Shape | Content type | Description |
|
|
52
|
+
|---|---|---|---|
|
|
53
|
+
| `200` | [`ListAllergiesResponse`](../models/ListAllergiesResponse.md) | application/json | Successful Response |
|
|
54
|
+
|
|
55
|
+
## Success response examples
|
|
56
|
+
|
|
57
|
+
### 200
|
|
58
|
+
|
|
59
|
+
```json
|
|
60
|
+
{
|
|
61
|
+
"allergies": [
|
|
62
|
+
{
|
|
63
|
+
"allergen": "Peanut",
|
|
64
|
+
"allergen_code": {
|
|
65
|
+
"code": "91935009",
|
|
66
|
+
"display": "Allergy to peanut",
|
|
67
|
+
"system": "http://snomed.info/sct"
|
|
68
|
+
},
|
|
69
|
+
"allergy_id": "00000000-0000-4000-8000-000000000301",
|
|
70
|
+
"asserted_by": "provider-example-001",
|
|
71
|
+
"asserted_date": "2026-01-15T10:00:00Z",
|
|
72
|
+
"category": "food",
|
|
73
|
+
"criticality": "high",
|
|
74
|
+
"fhir_id": "allergy-example-001",
|
|
75
|
+
"intolerance_type": "allergy",
|
|
76
|
+
"notes": "Synthetic confirmed food allergy",
|
|
77
|
+
"onset_date": "2015-06-01",
|
|
78
|
+
"reactions": [
|
|
79
|
+
{
|
|
80
|
+
"manifestation": "Urticaria",
|
|
81
|
+
"manifestation_code": {
|
|
82
|
+
"code": "126485001",
|
|
83
|
+
"display": "Urticaria",
|
|
84
|
+
"system": "http://snomed.info/sct"
|
|
85
|
+
},
|
|
86
|
+
"notes": "Hives after exposure",
|
|
87
|
+
"onset": "2015-06-01T12:00:00Z",
|
|
88
|
+
"severity": "severe"
|
|
89
|
+
}
|
|
90
|
+
],
|
|
91
|
+
"resolved_date": null,
|
|
92
|
+
"status": "active",
|
|
93
|
+
"verification_status": "confirmed"
|
|
94
|
+
}
|
|
95
|
+
],
|
|
96
|
+
"patient_id": "patient-example-001",
|
|
97
|
+
"total": 1
|
|
98
|
+
}
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## Common errors
|
|
102
|
+
|
|
103
|
+
| Status | Shape | Content type | Description |
|
|
104
|
+
|---|---|---|---|
|
|
105
|
+
| `401` | [`StandardErrorResponse`](../models/StandardErrorResponse.md) | application/json | Authorization required — missing or invalid Bearer JWT |
|
|
106
|
+
| `500` | [`StandardErrorResponse`](../models/StandardErrorResponse.md) | application/json | Internal server error |
|
|
107
|
+
|
|
108
|
+
## Error examples
|
|
109
|
+
|
|
110
|
+
### 401 — Missing or invalid access token
|
|
111
|
+
|
|
112
|
+
```json
|
|
113
|
+
{
|
|
114
|
+
"error": "Authorization required"
|
|
115
|
+
}
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### 500 — Unexpected service failure (sanitized example)
|
|
119
|
+
|
|
120
|
+
```json
|
|
121
|
+
{
|
|
122
|
+
"error": "Internal server error"
|
|
123
|
+
}
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
## NodeJS / TypeScript implementation
|
|
127
|
+
|
|
128
|
+
```ts
|
|
129
|
+
import { HCSDK } from "@healthcloudai/hc-sdk";
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
```ts
|
|
133
|
+
const patientId = "<PATIENT_ID>";
|
|
134
|
+
|
|
135
|
+
const result = await ehr.listAllergies(patientId);
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
## cURL
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
curl -X GET \
|
|
142
|
+
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
|
|
143
|
+
'https://dev-api-ehr.health.cloud/patients/%3CPATIENT_ID%3E/allergies'
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
## Notes
|
|
147
|
+
|
|
148
|
+
None.
|
|
149
|
+
|
|
150
|
+
## Prepared Test Console scenario
|
|
151
|
+
|
|
152
|
+
No canonical scenario is currently associated.
|
|
153
|
+
|
|
154
|
+
## Real response
|
|
155
|
+
|
|
156
|
+
No approved real integration response is currently published. Unapproved candidates are never rendered as examples.
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
# List a patient's conditions
|
|
2
|
+
|
|
3
|
+
Operation ID: `ehr.listConditions`
|
|
4
|
+
|
|
5
|
+
List FHIR Condition resources for a patient, optionally filtered by ?clinical_status= (e.g. active, resolved).
|
|
6
|
+
|
|
7
|
+
## Public method
|
|
8
|
+
|
|
9
|
+
`listConditions`
|
|
10
|
+
|
|
11
|
+
Signature: `ehr.listConditions(patientId, clinicalStatus)`
|
|
12
|
+
|
|
13
|
+
Return type: `Promise<ListConditionsResponse>`
|
|
14
|
+
|
|
15
|
+
## Authentication
|
|
16
|
+
|
|
17
|
+
Classification: **AUTHENTICATED**
|
|
18
|
+
|
|
19
|
+
Schemes: `bearerAuth`
|
|
20
|
+
|
|
21
|
+
## Prerequisites
|
|
22
|
+
|
|
23
|
+
None documented.
|
|
24
|
+
|
|
25
|
+
## HTTP
|
|
26
|
+
|
|
27
|
+
`GET /patients/{patient_id}/conditions`
|
|
28
|
+
|
|
29
|
+
## Path parameters
|
|
30
|
+
|
|
31
|
+
| Name | Type | Required | Format | Allowed values | Default | Nullable | Description |
|
|
32
|
+
|---|---|---:|---|---|---|---:|---|
|
|
33
|
+
| `patient_id` | `string` | Yes | | | | No | |
|
|
34
|
+
|
|
35
|
+
## Query parameters
|
|
36
|
+
|
|
37
|
+
| Name | Type | Required | Format | Allowed values | Default | Nullable | Description |
|
|
38
|
+
|---|---|---:|---|---|---|---:|---|
|
|
39
|
+
| `clinical_status` | `string` | No | | | | No | Filter: active, recurrence, relapse, inactive, remission, resolved |
|
|
40
|
+
|
|
41
|
+
## Body parameters
|
|
42
|
+
|
|
43
|
+
None.
|
|
44
|
+
|
|
45
|
+
Request model: None.
|
|
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` | [`ListConditionsResponse`](../models/ListConditionsResponse.md) | application/json | Successful Response |
|
|
56
|
+
|
|
57
|
+
## Success response examples
|
|
58
|
+
|
|
59
|
+
### 200
|
|
60
|
+
|
|
61
|
+
```json
|
|
62
|
+
{
|
|
63
|
+
"conditions": [
|
|
64
|
+
{
|
|
65
|
+
"asserted_date": "2026-01-15T10:00:00Z",
|
|
66
|
+
"asserter_name": "Dr. Alex Smith",
|
|
67
|
+
"asserter_type": "Practitioner",
|
|
68
|
+
"body_site": "Respiratory system",
|
|
69
|
+
"categories": [
|
|
70
|
+
"problem-list-item"
|
|
71
|
+
],
|
|
72
|
+
"clinical_status": "active",
|
|
73
|
+
"description": "Mild persistent asthma",
|
|
74
|
+
"encounter_id": "encounter-example-001",
|
|
75
|
+
"fhir_id": "condition-example-001",
|
|
76
|
+
"icd10_code": "J45.30",
|
|
77
|
+
"laterality": "not_applicable",
|
|
78
|
+
"notes": "Controlled with maintenance therapy",
|
|
79
|
+
"onset_age": 25,
|
|
80
|
+
"onset_date": "2015-01-01",
|
|
81
|
+
"problem_id": "00000000-0000-4000-8000-000000000302",
|
|
82
|
+
"recorded_date": "2026-01-15",
|
|
83
|
+
"recorder_name": "Dr. Alex Smith",
|
|
84
|
+
"resolved_date": null,
|
|
85
|
+
"severity": "mild",
|
|
86
|
+
"snomed_code": "195967001",
|
|
87
|
+
"verification_status": "confirmed"
|
|
88
|
+
}
|
|
89
|
+
],
|
|
90
|
+
"patient_id": "patient-example-001",
|
|
91
|
+
"total": 1
|
|
92
|
+
}
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## Common errors
|
|
96
|
+
|
|
97
|
+
| Status | Shape | Content type | Description |
|
|
98
|
+
|---|---|---|---|
|
|
99
|
+
| `401` | [`StandardErrorResponse`](../models/StandardErrorResponse.md) | application/json | Authorization required — missing or invalid Bearer JWT |
|
|
100
|
+
| `500` | [`StandardErrorResponse`](../models/StandardErrorResponse.md) | application/json | Internal server error |
|
|
101
|
+
|
|
102
|
+
## Error examples
|
|
103
|
+
|
|
104
|
+
### 401 — Missing or invalid access token
|
|
105
|
+
|
|
106
|
+
```json
|
|
107
|
+
{
|
|
108
|
+
"error": "Authorization required"
|
|
109
|
+
}
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### 500 — Unexpected service failure (sanitized example)
|
|
113
|
+
|
|
114
|
+
```json
|
|
115
|
+
{
|
|
116
|
+
"error": "Internal server error"
|
|
117
|
+
}
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
## NodeJS / TypeScript implementation
|
|
121
|
+
|
|
122
|
+
```ts
|
|
123
|
+
import { HCSDK } from "@healthcloudai/hc-sdk";
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
```ts
|
|
127
|
+
const patientId = "<PATIENT_ID>";
|
|
128
|
+
|
|
129
|
+
const clinicalStatus = "<CLINICAL_STATUS>";
|
|
130
|
+
|
|
131
|
+
const result = await ehr.listConditions(patientId, clinicalStatus);
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
## cURL
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
curl -X GET \
|
|
138
|
+
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
|
|
139
|
+
'https://dev-api-ehr.health.cloud/patients/%3CPATIENT_ID%3E/conditions?clinical_status=%3CCLINICAL_STATUS%3E'
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
## Notes
|
|
143
|
+
|
|
144
|
+
None.
|
|
145
|
+
|
|
146
|
+
## Prepared Test Console scenario
|
|
147
|
+
|
|
148
|
+
No canonical scenario is currently associated.
|
|
149
|
+
|
|
150
|
+
## Real response
|
|
151
|
+
|
|
152
|
+
No approved real integration response is currently published. Unapproved candidates are never rendered as examples.
|