@healthcloudai/hc-sdk 2.6.2 → 2.7.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 +103 -0
- package/dist/index.d.cts +5805 -5777
- package/dist/index.d.ts +5805 -5777
- package/dist/index.js +103 -0
- package/docs/clients/EhrClient.md +15 -0
- package/docs/docs-manifest.json +55 -3
- package/docs/examples/index.md +15 -0
- package/docs/index.md +15 -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/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/GetHealthRecordResponse.md +19 -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/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/ehr.ListDiagnosticsResponse.md +19 -0
- package/docs/models/ehr.ListEncountersResponse.md +19 -0
- package/docs/models/ehr.ListMedicationsResponse.md +19 -0
- package/docs/models/index.md +37 -0
- 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/package.json +1 -1
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
# List a patient's medications
|
|
2
|
+
|
|
3
|
+
Operation ID: `ehr.listMedications`
|
|
4
|
+
|
|
5
|
+
List medication resources for a patient. ?resource_type= selects the FHIR resource type queried (MedicationRequest, MedicationStatement, ...); defaults to MedicationRequest.
|
|
6
|
+
|
|
7
|
+
## Public method
|
|
8
|
+
|
|
9
|
+
`listMedications`
|
|
10
|
+
|
|
11
|
+
Signature: `ehr.listMedications(patientId, resourceType)`
|
|
12
|
+
|
|
13
|
+
Return type: `Promise<ListMedicationsResponse>`
|
|
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}/medications`
|
|
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
|
+
| `resource_type` | `string` | No | | MedicationRequest, MedicationStatement | `"MedicationRequest"` | No | |
|
|
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` | [`ehr.ListMedicationsResponse`](../models/ehr.ListMedicationsResponse.md) | application/json | Patient medications |
|
|
56
|
+
|
|
57
|
+
## Success response examples
|
|
58
|
+
|
|
59
|
+
### 200
|
|
60
|
+
|
|
61
|
+
```json
|
|
62
|
+
{
|
|
63
|
+
"medications": [
|
|
64
|
+
{
|
|
65
|
+
"authored_on": "2026-01-15T10:00:00Z",
|
|
66
|
+
"brand_name": "Ventolin HFA",
|
|
67
|
+
"discontinued_reason": null,
|
|
68
|
+
"dosage": {
|
|
69
|
+
"duration_days": 30,
|
|
70
|
+
"frequency": "as_needed",
|
|
71
|
+
"frequency_details": "Every 4 to 6 hours as needed",
|
|
72
|
+
"instructions": "Inhale two puffs for wheezing",
|
|
73
|
+
"max_daily_dose": 8,
|
|
74
|
+
"max_daily_dose_unit": "puffs",
|
|
75
|
+
"unit": "puffs",
|
|
76
|
+
"value": 2
|
|
77
|
+
},
|
|
78
|
+
"encounter_id": "encounter-example-001",
|
|
79
|
+
"end_date": null,
|
|
80
|
+
"fhir_id": "medication-example-001",
|
|
81
|
+
"generic_name": "Albuterol",
|
|
82
|
+
"indication": "Asthma",
|
|
83
|
+
"intent": "order",
|
|
84
|
+
"medication_id": "00000000-0000-4000-8000-000000000305",
|
|
85
|
+
"name": "Albuterol 90 mcg inhaler",
|
|
86
|
+
"ndc_code": "00173-0682-20",
|
|
87
|
+
"notes": "Synthetic active medication",
|
|
88
|
+
"pharmacy": "Example Community Pharmacy",
|
|
89
|
+
"prescriber_id": "provider-example-001",
|
|
90
|
+
"prescriber_name": "Dr. Alex Smith",
|
|
91
|
+
"problem_reference": "condition-example-001",
|
|
92
|
+
"refills_authorized": 3,
|
|
93
|
+
"refills_remaining": 2,
|
|
94
|
+
"resource_type": "MedicationRequest",
|
|
95
|
+
"route": "inhaled",
|
|
96
|
+
"rxnorm_code": "745752",
|
|
97
|
+
"start_date": "2026-01-15",
|
|
98
|
+
"status": "active"
|
|
99
|
+
}
|
|
100
|
+
],
|
|
101
|
+
"patient_id": "patient-example-001",
|
|
102
|
+
"total": 1
|
|
103
|
+
}
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
## Common errors
|
|
107
|
+
|
|
108
|
+
| Status | Shape | Content type | Description |
|
|
109
|
+
|---|---|---|---|
|
|
110
|
+
| `401` | [`StandardErrorResponse`](../models/StandardErrorResponse.md) | application/json | Authorization required — missing or invalid Bearer JWT |
|
|
111
|
+
| `500` | [`StandardErrorResponse`](../models/StandardErrorResponse.md) | application/json | Internal server error |
|
|
112
|
+
|
|
113
|
+
## Error examples
|
|
114
|
+
|
|
115
|
+
### 401 — Missing or invalid access token
|
|
116
|
+
|
|
117
|
+
```json
|
|
118
|
+
{
|
|
119
|
+
"error": "Authorization required"
|
|
120
|
+
}
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### 500 — Unexpected service failure (sanitized example)
|
|
124
|
+
|
|
125
|
+
```json
|
|
126
|
+
{
|
|
127
|
+
"error": "Internal server error"
|
|
128
|
+
}
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
## NodeJS / TypeScript implementation
|
|
132
|
+
|
|
133
|
+
```ts
|
|
134
|
+
import { HCSDK } from "@healthcloudai/hc-sdk";
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
```ts
|
|
138
|
+
const patientId = "<PATIENT_ID>";
|
|
139
|
+
|
|
140
|
+
const resourceType = "MedicationRequest";
|
|
141
|
+
|
|
142
|
+
const result = await ehr.listMedications(patientId, resourceType);
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
## cURL
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
curl -X GET \
|
|
149
|
+
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
|
|
150
|
+
'https://dev-api-ehr.health.cloud/patients/%3CPATIENT_ID%3E/medications?resource_type=MedicationRequest'
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
## Notes
|
|
154
|
+
|
|
155
|
+
None.
|
|
156
|
+
|
|
157
|
+
## Prepared Test Console scenario
|
|
158
|
+
|
|
159
|
+
No canonical scenario is currently associated.
|
|
160
|
+
|
|
161
|
+
## Real response
|
|
162
|
+
|
|
163
|
+
No approved real integration response is currently published. Unapproved candidates are never rendered as examples.
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
# List a patient's observations
|
|
2
|
+
|
|
3
|
+
Operation ID: `ehr.listObservations`
|
|
4
|
+
|
|
5
|
+
List all FHIR Observation resources for a patient, optionally filtered by ?category= (e.g. vital-signs, laboratory, social-history).
|
|
6
|
+
|
|
7
|
+
## Public method
|
|
8
|
+
|
|
9
|
+
`listObservations`
|
|
10
|
+
|
|
11
|
+
Signature: `ehr.listObservations(patientId, category)`
|
|
12
|
+
|
|
13
|
+
Return type: `Promise<ListObservationsResponse>`
|
|
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}/observations`
|
|
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
|
+
| `category` | `string` | No | | | | No | Filter: laboratory, vital-signs, social-history, imaging, procedure, survey, exam, therapy |
|
|
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` | [`ListObservationsResponse`](../models/ListObservationsResponse.md) | application/json | Patient observations |
|
|
56
|
+
|
|
57
|
+
## Success response examples
|
|
58
|
+
|
|
59
|
+
### 200
|
|
60
|
+
|
|
61
|
+
```json
|
|
62
|
+
{
|
|
63
|
+
"observations": [],
|
|
64
|
+
"patient_id": "patient-example-001",
|
|
65
|
+
"total": 0
|
|
66
|
+
}
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Common errors
|
|
70
|
+
|
|
71
|
+
| Status | Shape | Content type | Description |
|
|
72
|
+
|---|---|---|---|
|
|
73
|
+
| `401` | [`StandardErrorResponse`](../models/StandardErrorResponse.md) | application/json | Authorization required — missing or invalid Bearer JWT |
|
|
74
|
+
| `500` | [`StandardErrorResponse`](../models/StandardErrorResponse.md) | application/json | Internal server error |
|
|
75
|
+
|
|
76
|
+
## Error examples
|
|
77
|
+
|
|
78
|
+
### 401 — Missing or invalid access token
|
|
79
|
+
|
|
80
|
+
```json
|
|
81
|
+
{
|
|
82
|
+
"error": "Authorization required"
|
|
83
|
+
}
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### 500 — Unexpected service failure (sanitized example)
|
|
87
|
+
|
|
88
|
+
```json
|
|
89
|
+
{
|
|
90
|
+
"error": "Internal server error"
|
|
91
|
+
}
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## NodeJS / TypeScript implementation
|
|
95
|
+
|
|
96
|
+
```ts
|
|
97
|
+
import { HCSDK } from "@healthcloudai/hc-sdk";
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
```ts
|
|
101
|
+
const patientId = "<PATIENT_ID>";
|
|
102
|
+
|
|
103
|
+
const category = "<CATEGORY>";
|
|
104
|
+
|
|
105
|
+
const result = await ehr.listObservations(patientId, category);
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
## cURL
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
curl -X GET \
|
|
112
|
+
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
|
|
113
|
+
'https://dev-api-ehr.health.cloud/patients/%3CPATIENT_ID%3E/observations?category=%3CCATEGORY%3E'
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
## Notes
|
|
117
|
+
|
|
118
|
+
None.
|
|
119
|
+
|
|
120
|
+
## Prepared Test Console scenario
|
|
121
|
+
|
|
122
|
+
No canonical scenario is currently associated.
|
|
123
|
+
|
|
124
|
+
## Real response
|
|
125
|
+
|
|
126
|
+
No approved real integration response is currently published. Unapproved candidates are never rendered as examples.
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
# List a patient's procedures
|
|
2
|
+
|
|
3
|
+
Operation ID: `ehr.listProcedures`
|
|
4
|
+
|
|
5
|
+
List FHIR Procedure resources for a patient.
|
|
6
|
+
|
|
7
|
+
## Public method
|
|
8
|
+
|
|
9
|
+
`listProcedures`
|
|
10
|
+
|
|
11
|
+
Signature: `ehr.listProcedures(patientId)`
|
|
12
|
+
|
|
13
|
+
Return type: `Promise<ListProceduresResponse>`
|
|
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}/procedures`
|
|
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` | [`ListProceduresResponse`](../models/ListProceduresResponse.md) | application/json | Successful Response |
|
|
54
|
+
|
|
55
|
+
## Success response examples
|
|
56
|
+
|
|
57
|
+
### 200
|
|
58
|
+
|
|
59
|
+
```json
|
|
60
|
+
{
|
|
61
|
+
"patient_id": "patient-example-001",
|
|
62
|
+
"procedures": [],
|
|
63
|
+
"total": 0
|
|
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.listProcedures(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/procedures'
|
|
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,162 @@
|
|
|
1
|
+
# List a patient's questionnaire responses
|
|
2
|
+
|
|
3
|
+
Operation ID: `ehr.listQuestionnaireResponses`
|
|
4
|
+
|
|
5
|
+
List FHIR QuestionnaireResponse resources for a patient, optionally filtered by ?questionnaire_url= to scope to one questionnaire.
|
|
6
|
+
|
|
7
|
+
## Public method
|
|
8
|
+
|
|
9
|
+
`listQuestionnaireResponses`
|
|
10
|
+
|
|
11
|
+
Signature: `ehr.listQuestionnaireResponses(patientId, questionnaireUrl)`
|
|
12
|
+
|
|
13
|
+
Return type: `Promise<ListQuestionnaireResponsesResponse>`
|
|
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}/questionnaire-responses`
|
|
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
|
+
| `questionnaire_url` | `string` | No | | | | No | Canonical URL of the Questionnaire |
|
|
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` | [`ListQuestionnaireResponsesResponse`](../models/ListQuestionnaireResponsesResponse.md) | application/json | Successful Response |
|
|
56
|
+
|
|
57
|
+
## Success response examples
|
|
58
|
+
|
|
59
|
+
### 200
|
|
60
|
+
|
|
61
|
+
```json
|
|
62
|
+
{
|
|
63
|
+
"patient_id": "patient-example-001",
|
|
64
|
+
"questionnaire_responses": [
|
|
65
|
+
{
|
|
66
|
+
"authored": "2026-08-10T10:00:00Z",
|
|
67
|
+
"authored_by_name": "Alex Smith",
|
|
68
|
+
"authored_by_patient": true,
|
|
69
|
+
"encounter_id": "encounter-example-001",
|
|
70
|
+
"fhir_id": "questionnaire-response-example-001",
|
|
71
|
+
"items": [
|
|
72
|
+
{
|
|
73
|
+
"answers": [
|
|
74
|
+
{
|
|
75
|
+
"sub_items": [],
|
|
76
|
+
"value_boolean": null,
|
|
77
|
+
"value_coding": null,
|
|
78
|
+
"value_date": null,
|
|
79
|
+
"value_date_time": null,
|
|
80
|
+
"value_decimal": null,
|
|
81
|
+
"value_integer": null,
|
|
82
|
+
"value_quantity": null,
|
|
83
|
+
"value_string": "Good",
|
|
84
|
+
"value_time": null,
|
|
85
|
+
"value_uri": null
|
|
86
|
+
}
|
|
87
|
+
],
|
|
88
|
+
"definition": "https://example.com/questionnaires/general-health#general-health",
|
|
89
|
+
"link_id": "general-health",
|
|
90
|
+
"sub_items": [],
|
|
91
|
+
"text": "How would you rate your general health?"
|
|
92
|
+
}
|
|
93
|
+
],
|
|
94
|
+
"patient_fhir_id": "patient-example-001",
|
|
95
|
+
"questionnaire_fhir_id": "questionnaire-example-001",
|
|
96
|
+
"questionnaire_url": "https://example.com/questionnaires/general-health",
|
|
97
|
+
"response_id": "00000000-0000-4000-8000-000000000306",
|
|
98
|
+
"status": "completed"
|
|
99
|
+
}
|
|
100
|
+
],
|
|
101
|
+
"total": 1
|
|
102
|
+
}
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## Common errors
|
|
106
|
+
|
|
107
|
+
| Status | Shape | Content type | Description |
|
|
108
|
+
|---|---|---|---|
|
|
109
|
+
| `401` | [`StandardErrorResponse`](../models/StandardErrorResponse.md) | application/json | Authorization required — missing or invalid Bearer JWT |
|
|
110
|
+
| `500` | [`StandardErrorResponse`](../models/StandardErrorResponse.md) | application/json | Internal server error |
|
|
111
|
+
|
|
112
|
+
## Error examples
|
|
113
|
+
|
|
114
|
+
### 401 — Missing or invalid access token
|
|
115
|
+
|
|
116
|
+
```json
|
|
117
|
+
{
|
|
118
|
+
"error": "Authorization required"
|
|
119
|
+
}
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
### 500 — Unexpected service failure (sanitized example)
|
|
123
|
+
|
|
124
|
+
```json
|
|
125
|
+
{
|
|
126
|
+
"error": "Internal server error"
|
|
127
|
+
}
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
## NodeJS / TypeScript implementation
|
|
131
|
+
|
|
132
|
+
```ts
|
|
133
|
+
import { HCSDK } from "@healthcloudai/hc-sdk";
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
```ts
|
|
137
|
+
const patientId = "<PATIENT_ID>";
|
|
138
|
+
|
|
139
|
+
const questionnaireUrl = "<QUESTIONNAIRE_URL>";
|
|
140
|
+
|
|
141
|
+
const result = await ehr.listQuestionnaireResponses(patientId, questionnaireUrl);
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
## cURL
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
curl -X GET \
|
|
148
|
+
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
|
|
149
|
+
'https://dev-api-ehr.health.cloud/patients/%3CPATIENT_ID%3E/questionnaire-responses?questionnaire_url=%3CQUESTIONNAIRE_URL%3E'
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
## Notes
|
|
153
|
+
|
|
154
|
+
None.
|
|
155
|
+
|
|
156
|
+
## Prepared Test Console scenario
|
|
157
|
+
|
|
158
|
+
No canonical scenario is currently associated.
|
|
159
|
+
|
|
160
|
+
## Real response
|
|
161
|
+
|
|
162
|
+
No approved real integration response is currently published. Unapproved candidates are never rendered as examples.
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
# List a patient's social history
|
|
2
|
+
|
|
3
|
+
Operation ID: `ehr.listSocialHistory`
|
|
4
|
+
|
|
5
|
+
List social-history Observations for a patient (e.g. smoking status, alcohol use).
|
|
6
|
+
|
|
7
|
+
## Public method
|
|
8
|
+
|
|
9
|
+
`listSocialHistory`
|
|
10
|
+
|
|
11
|
+
Signature: `ehr.listSocialHistory(patientId)`
|
|
12
|
+
|
|
13
|
+
Return type: `Promise<ListSocialHistoryResponse>`
|
|
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}/social-history`
|
|
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` | [`ListSocialHistoryResponse`](../models/ListSocialHistoryResponse.md) | application/json | Successful Response |
|
|
54
|
+
|
|
55
|
+
## Success response examples
|
|
56
|
+
|
|
57
|
+
### 200
|
|
58
|
+
|
|
59
|
+
```json
|
|
60
|
+
{
|
|
61
|
+
"patient_id": "patient-example-001",
|
|
62
|
+
"social_history": [],
|
|
63
|
+
"total": 0
|
|
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.listSocialHistory(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/social-history'
|
|
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.
|