@healthcloudai/hc-sdk 3.9.0 → 3.10.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 +16 -3
- package/dist/index.d.cts +18 -5
- package/dist/index.d.ts +18 -5
- package/dist/index.js +16 -3
- package/docs/docs-manifest.json +1 -1
- package/docs/models/GetHealthRecordResponse.md +1 -1
- package/docs/models/ListObservationsResponse.md +1 -1
- package/package.json +4 -1
package/dist/index.cjs
CHANGED
|
@@ -710,7 +710,11 @@ var EhrClient = class extends BaseServiceClient {
|
|
|
710
710
|
query: resourceType ? { resource_type: resourceType } : void 0
|
|
711
711
|
});
|
|
712
712
|
}
|
|
713
|
-
/**
|
|
713
|
+
/**
|
|
714
|
+
* List a patient's observations. Vital-sign observations are excluded by
|
|
715
|
+
* default (use {@link listVitals} for those); pass category "vital-signs"
|
|
716
|
+
* explicitly to include them here.
|
|
717
|
+
*/
|
|
714
718
|
listObservations(patientId, category) {
|
|
715
719
|
return this.send("GET", "/patients/{patient_id}/observations", {
|
|
716
720
|
pathParams: { patient_id: patientId },
|
|
@@ -730,7 +734,13 @@ var EhrClient = class extends BaseServiceClient {
|
|
|
730
734
|
query: questionnaireUrl ? { questionnaire_url: questionnaireUrl } : void 0
|
|
731
735
|
});
|
|
732
736
|
}
|
|
733
|
-
/**
|
|
737
|
+
/**
|
|
738
|
+
* Get a patient's consolidated health record. The record carries its mapped
|
|
739
|
+
* domain sections (social/functional/gyn/perinatal history, encounters,
|
|
740
|
+
* vitals, diagnostics, …) but no raw `observations` bucket — list general
|
|
741
|
+
* observations with {@link listObservations} (vital signs excluded) and
|
|
742
|
+
* vital signs with {@link listVitals}.
|
|
743
|
+
*/
|
|
734
744
|
getHealthRecord(patientId) {
|
|
735
745
|
return this.send("GET", "/patients/{patient_id}/record", {
|
|
736
746
|
pathParams: { patient_id: patientId }
|
|
@@ -742,7 +752,10 @@ var EhrClient = class extends BaseServiceClient {
|
|
|
742
752
|
pathParams: { patient_id: patientId }
|
|
743
753
|
});
|
|
744
754
|
}
|
|
745
|
-
/**
|
|
755
|
+
/**
|
|
756
|
+
* List a patient's vital signs (the only place vital-sign observations are
|
|
757
|
+
* returned — {@link listObservations} excludes them by default).
|
|
758
|
+
*/
|
|
746
759
|
listVitals(patientId, dateFrom, dateTo, type) {
|
|
747
760
|
const query = dateFrom || dateTo || type ? {
|
|
748
761
|
...dateFrom ? { date_from: dateFrom } : {},
|
package/dist/index.d.cts
CHANGED
|
@@ -37472,7 +37472,7 @@ interface GetHealthRecordResponse {
|
|
|
37472
37472
|
*/
|
|
37473
37473
|
patient_id: string;
|
|
37474
37474
|
/**
|
|
37475
|
-
* Resources grouped by type (conditions, allergies, medications, procedures, immunizations, family_history, consents, social_history, functional_status, gyn_history, perinatal_history,
|
|
37475
|
+
* Resources grouped by type (conditions, allergies, medications, procedures, immunizations, family_history, consents, social_history, functional_status, gyn_history, perinatal_history, encounters, vitals, questionnaire_responses, diagnostics, intake_submissions). Medications includes MedicationRequest and patient-reported MedicationStatement. intake_submissions lists this patient's raw intake submission records (same shape as the patient intake GET endpoint); it is also available individually from that endpoint by submission_id. conditions/allergies/medications/procedures/immunizations/family_history/consents/gyn_history/perinatal_history are serialized domain models (Problem, Allergy, Medication, Procedure, Immunization, FamilyHistoryEntry, AdvanceDirective, GynHistory, PerinatalHistory) — the same shape returned by each resource's own list endpoint where one exists. social_history and functional_status are each a single serialized SocialHistory/FunctionalStatus record (0 or 1 entries), aggregated from that patient's social-history/survey-category Observations; fields never recorded as an Observation (e.g. SocialHistory.gender_identity) stay at their default. The record no longer carries a general observations bucket — list general Observations with GET /patients/{patient_id}/observations (vital signs excluded) and vital signs with GET /patients/{patient_id}/vitals, so observations and vitals never appear twice across the record and its sections. encounters, questionnaire responses, diagnostics, the vitals list, and intake_submissions are serialized service results. A resource type with a failed downstream fetch appears as an empty list, not an error.
|
|
37476
37476
|
* @type {{ [key: string]: Array<{ [key: string]: any; }>; }}
|
|
37477
37477
|
* @memberof GetHealthRecordResponse
|
|
37478
37478
|
*/
|
|
@@ -38845,7 +38845,7 @@ declare function ListMedicationsResponseToJSONTyped(value?: ListMedicationsRespo
|
|
|
38845
38845
|
*/
|
|
38846
38846
|
interface ListObservationsResponse {
|
|
38847
38847
|
/**
|
|
38848
|
-
* Raw FHIR Observation resources matching the optional ?category= filter.
|
|
38848
|
+
* Raw FHIR Observation resources matching the optional ?category= filter. Vital-sign Observations are excluded by default because they are served by GET /patients/{patient_id}/vitals — pass ?category=vital-signs to fetch them here.
|
|
38849
38849
|
* @type {Array<{ [key: string]: any; }>}
|
|
38850
38850
|
* @memberof ListObservationsResponse
|
|
38851
38851
|
*/
|
|
@@ -40308,17 +40308,30 @@ declare class EhrClient extends BaseServiceClient {
|
|
|
40308
40308
|
listImmunizations<TResponse = ListImmunizationsResponse>(patientId: string): Promise<TResponse>;
|
|
40309
40309
|
/** List a patient's medications. */
|
|
40310
40310
|
listMedications<TResponse = ListMedicationsResponse>(patientId: string, resourceType?: string): Promise<TResponse>;
|
|
40311
|
-
/**
|
|
40311
|
+
/**
|
|
40312
|
+
* List a patient's observations. Vital-sign observations are excluded by
|
|
40313
|
+
* default (use {@link listVitals} for those); pass category "vital-signs"
|
|
40314
|
+
* explicitly to include them here.
|
|
40315
|
+
*/
|
|
40312
40316
|
listObservations<TResponse = ListObservationsResponse>(patientId: string, category?: string): Promise<TResponse>;
|
|
40313
40317
|
/** List a patient's procedures. */
|
|
40314
40318
|
listProcedures<TResponse = ListProceduresResponse>(patientId: string): Promise<TResponse>;
|
|
40315
40319
|
/** List a patient's questionnaire responses. */
|
|
40316
40320
|
listQuestionnaireResponses<TResponse = ListQuestionnaireResponsesResponse>(patientId: string, questionnaireUrl?: string): Promise<TResponse>;
|
|
40317
|
-
/**
|
|
40321
|
+
/**
|
|
40322
|
+
* Get a patient's consolidated health record. The record carries its mapped
|
|
40323
|
+
* domain sections (social/functional/gyn/perinatal history, encounters,
|
|
40324
|
+
* vitals, diagnostics, …) but no raw `observations` bucket — list general
|
|
40325
|
+
* observations with {@link listObservations} (vital signs excluded) and
|
|
40326
|
+
* vital signs with {@link listVitals}.
|
|
40327
|
+
*/
|
|
40318
40328
|
getHealthRecord<TResponse = GetHealthRecordResponse>(patientId: string): Promise<TResponse>;
|
|
40319
40329
|
/** List a patient's social history. */
|
|
40320
40330
|
listSocialHistory<TResponse = ListSocialHistoryResponse>(patientId: string): Promise<TResponse>;
|
|
40321
|
-
/**
|
|
40331
|
+
/**
|
|
40332
|
+
* List a patient's vital signs (the only place vital-sign observations are
|
|
40333
|
+
* returned — {@link listObservations} excludes them by default).
|
|
40334
|
+
*/
|
|
40322
40335
|
listVitals<TResponse = ListVitalsResponse>(patientId: string, dateFrom?: string, dateTo?: string, type?: string): Promise<TResponse>;
|
|
40323
40336
|
}
|
|
40324
40337
|
|
package/dist/index.d.ts
CHANGED
|
@@ -37472,7 +37472,7 @@ interface GetHealthRecordResponse {
|
|
|
37472
37472
|
*/
|
|
37473
37473
|
patient_id: string;
|
|
37474
37474
|
/**
|
|
37475
|
-
* Resources grouped by type (conditions, allergies, medications, procedures, immunizations, family_history, consents, social_history, functional_status, gyn_history, perinatal_history,
|
|
37475
|
+
* Resources grouped by type (conditions, allergies, medications, procedures, immunizations, family_history, consents, social_history, functional_status, gyn_history, perinatal_history, encounters, vitals, questionnaire_responses, diagnostics, intake_submissions). Medications includes MedicationRequest and patient-reported MedicationStatement. intake_submissions lists this patient's raw intake submission records (same shape as the patient intake GET endpoint); it is also available individually from that endpoint by submission_id. conditions/allergies/medications/procedures/immunizations/family_history/consents/gyn_history/perinatal_history are serialized domain models (Problem, Allergy, Medication, Procedure, Immunization, FamilyHistoryEntry, AdvanceDirective, GynHistory, PerinatalHistory) — the same shape returned by each resource's own list endpoint where one exists. social_history and functional_status are each a single serialized SocialHistory/FunctionalStatus record (0 or 1 entries), aggregated from that patient's social-history/survey-category Observations; fields never recorded as an Observation (e.g. SocialHistory.gender_identity) stay at their default. The record no longer carries a general observations bucket — list general Observations with GET /patients/{patient_id}/observations (vital signs excluded) and vital signs with GET /patients/{patient_id}/vitals, so observations and vitals never appear twice across the record and its sections. encounters, questionnaire responses, diagnostics, the vitals list, and intake_submissions are serialized service results. A resource type with a failed downstream fetch appears as an empty list, not an error.
|
|
37476
37476
|
* @type {{ [key: string]: Array<{ [key: string]: any; }>; }}
|
|
37477
37477
|
* @memberof GetHealthRecordResponse
|
|
37478
37478
|
*/
|
|
@@ -38845,7 +38845,7 @@ declare function ListMedicationsResponseToJSONTyped(value?: ListMedicationsRespo
|
|
|
38845
38845
|
*/
|
|
38846
38846
|
interface ListObservationsResponse {
|
|
38847
38847
|
/**
|
|
38848
|
-
* Raw FHIR Observation resources matching the optional ?category= filter.
|
|
38848
|
+
* Raw FHIR Observation resources matching the optional ?category= filter. Vital-sign Observations are excluded by default because they are served by GET /patients/{patient_id}/vitals — pass ?category=vital-signs to fetch them here.
|
|
38849
38849
|
* @type {Array<{ [key: string]: any; }>}
|
|
38850
38850
|
* @memberof ListObservationsResponse
|
|
38851
38851
|
*/
|
|
@@ -40308,17 +40308,30 @@ declare class EhrClient extends BaseServiceClient {
|
|
|
40308
40308
|
listImmunizations<TResponse = ListImmunizationsResponse>(patientId: string): Promise<TResponse>;
|
|
40309
40309
|
/** List a patient's medications. */
|
|
40310
40310
|
listMedications<TResponse = ListMedicationsResponse>(patientId: string, resourceType?: string): Promise<TResponse>;
|
|
40311
|
-
/**
|
|
40311
|
+
/**
|
|
40312
|
+
* List a patient's observations. Vital-sign observations are excluded by
|
|
40313
|
+
* default (use {@link listVitals} for those); pass category "vital-signs"
|
|
40314
|
+
* explicitly to include them here.
|
|
40315
|
+
*/
|
|
40312
40316
|
listObservations<TResponse = ListObservationsResponse>(patientId: string, category?: string): Promise<TResponse>;
|
|
40313
40317
|
/** List a patient's procedures. */
|
|
40314
40318
|
listProcedures<TResponse = ListProceduresResponse>(patientId: string): Promise<TResponse>;
|
|
40315
40319
|
/** List a patient's questionnaire responses. */
|
|
40316
40320
|
listQuestionnaireResponses<TResponse = ListQuestionnaireResponsesResponse>(patientId: string, questionnaireUrl?: string): Promise<TResponse>;
|
|
40317
|
-
/**
|
|
40321
|
+
/**
|
|
40322
|
+
* Get a patient's consolidated health record. The record carries its mapped
|
|
40323
|
+
* domain sections (social/functional/gyn/perinatal history, encounters,
|
|
40324
|
+
* vitals, diagnostics, …) but no raw `observations` bucket — list general
|
|
40325
|
+
* observations with {@link listObservations} (vital signs excluded) and
|
|
40326
|
+
* vital signs with {@link listVitals}.
|
|
40327
|
+
*/
|
|
40318
40328
|
getHealthRecord<TResponse = GetHealthRecordResponse>(patientId: string): Promise<TResponse>;
|
|
40319
40329
|
/** List a patient's social history. */
|
|
40320
40330
|
listSocialHistory<TResponse = ListSocialHistoryResponse>(patientId: string): Promise<TResponse>;
|
|
40321
|
-
/**
|
|
40331
|
+
/**
|
|
40332
|
+
* List a patient's vital signs (the only place vital-sign observations are
|
|
40333
|
+
* returned — {@link listObservations} excludes them by default).
|
|
40334
|
+
*/
|
|
40322
40335
|
listVitals<TResponse = ListVitalsResponse>(patientId: string, dateFrom?: string, dateTo?: string, type?: string): Promise<TResponse>;
|
|
40323
40336
|
}
|
|
40324
40337
|
|
package/dist/index.js
CHANGED
|
@@ -635,7 +635,11 @@ var EhrClient = class extends BaseServiceClient {
|
|
|
635
635
|
query: resourceType ? { resource_type: resourceType } : void 0
|
|
636
636
|
});
|
|
637
637
|
}
|
|
638
|
-
/**
|
|
638
|
+
/**
|
|
639
|
+
* List a patient's observations. Vital-sign observations are excluded by
|
|
640
|
+
* default (use {@link listVitals} for those); pass category "vital-signs"
|
|
641
|
+
* explicitly to include them here.
|
|
642
|
+
*/
|
|
639
643
|
listObservations(patientId, category) {
|
|
640
644
|
return this.send("GET", "/patients/{patient_id}/observations", {
|
|
641
645
|
pathParams: { patient_id: patientId },
|
|
@@ -655,7 +659,13 @@ var EhrClient = class extends BaseServiceClient {
|
|
|
655
659
|
query: questionnaireUrl ? { questionnaire_url: questionnaireUrl } : void 0
|
|
656
660
|
});
|
|
657
661
|
}
|
|
658
|
-
/**
|
|
662
|
+
/**
|
|
663
|
+
* Get a patient's consolidated health record. The record carries its mapped
|
|
664
|
+
* domain sections (social/functional/gyn/perinatal history, encounters,
|
|
665
|
+
* vitals, diagnostics, …) but no raw `observations` bucket — list general
|
|
666
|
+
* observations with {@link listObservations} (vital signs excluded) and
|
|
667
|
+
* vital signs with {@link listVitals}.
|
|
668
|
+
*/
|
|
659
669
|
getHealthRecord(patientId) {
|
|
660
670
|
return this.send("GET", "/patients/{patient_id}/record", {
|
|
661
671
|
pathParams: { patient_id: patientId }
|
|
@@ -667,7 +677,10 @@ var EhrClient = class extends BaseServiceClient {
|
|
|
667
677
|
pathParams: { patient_id: patientId }
|
|
668
678
|
});
|
|
669
679
|
}
|
|
670
|
-
/**
|
|
680
|
+
/**
|
|
681
|
+
* List a patient's vital signs (the only place vital-sign observations are
|
|
682
|
+
* returned — {@link listObservations} excludes them by default).
|
|
683
|
+
*/
|
|
671
684
|
listVitals(patientId, dateFrom, dateTo, type) {
|
|
672
685
|
const query = dateFrom || dateTo || type ? {
|
|
673
686
|
...dateFrom ? { date_from: dateFrom } : {},
|
package/docs/docs-manifest.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"docsDataContentDigest": "sha256:
|
|
2
|
+
"docsDataContentDigest": "sha256:b0be17d679cc774ef551c27f8b531000c7f3313da6bb14b1db71707188c22b0c",
|
|
3
3
|
"generatedFiles": [
|
|
4
4
|
"authentication.md",
|
|
5
5
|
"clients/AmsClient.md",
|
|
@@ -11,7 +11,7 @@ Type: `object`
|
|
|
11
11
|
| Field | Type | Required | Format | Allowed values | Default | Nullable | Description |
|
|
12
12
|
|---|---|---:|---|---|---|---:|---|
|
|
13
13
|
| `patient_id` | `string` | Yes | | | | No | Echoes the {patient_id} path parameter. |
|
|
14
|
-
| `resources` | `object` | Yes | | | | No | Resources grouped by type (conditions, allergies, medications, procedures, immunizations, family_history, consents, social_history, functional_status, gyn_history, perinatal_history,
|
|
14
|
+
| `resources` | `object` | Yes | | | | No | Resources grouped by type (conditions, allergies, medications, procedures, immunizations, family_history, consents, social_history, functional_status, gyn_history, perinatal_history, encounters, vitals, questionnaire_responses, diagnostics, intake_submissions). Medications includes MedicationRequest and patient-reported MedicationStatement. intake_submissions lists this patient's raw intake submission records (same shape as the patient intake GET endpoint); it is also available individually from that endpoint by submission_id. conditions/allergies/medications/procedures/immunizations/family_history/consents/gyn_history/perinatal_history are serialized domain models (Problem, Allergy, Medication, Procedure, Immunization, FamilyHistoryEntry, AdvanceDirective, GynHistory, PerinatalHistory) — the same shape returned by each resource's own list endpoint where one exists. social_history and functional_status are each a single serialized SocialHistory/FunctionalStatus record (0 or 1 entries), aggregated from that patient's social-history/survey-category Observations; fields never recorded as an Observation (e.g. SocialHistory.gender_identity) stay at their default. The record no longer carries a general observations bucket — list general Observations with GET /patients/{patient_id}/observations (vital signs excluded) and vital signs with GET /patients/{patient_id}/vitals, so observations and vitals never appear twice across the record and its sections. encounters, questionnaire responses, diagnostics, the vitals list, and intake_submissions are serialized service results. A resource type with a failed downstream fetch appears as an empty list, not an error. |
|
|
15
15
|
| `totals` | `object` | Yes | | | | No | Count of records per resource type key in `resources`. |
|
|
16
16
|
|
|
17
17
|
## Example
|
|
@@ -10,7 +10,7 @@ Type: `object`
|
|
|
10
10
|
|
|
11
11
|
| Field | Type | Required | Format | Allowed values | Default | Nullable | Description |
|
|
12
12
|
|---|---|---:|---|---|---|---:|---|
|
|
13
|
-
| `observations` | `array` | Yes | | | | No | Raw FHIR Observation resources matching the optional ?category= filter. |
|
|
13
|
+
| `observations` | `array` | Yes | | | | No | Raw FHIR Observation resources matching the optional ?category= filter. Vital-sign Observations are excluded by default because they are served by GET /patients/{patient_id}/vitals — pass ?category=vital-signs to fetch them here. |
|
|
14
14
|
| `patient_id` | `string` | Yes | | | | No | Echoes the {patient_id} path parameter. |
|
|
15
15
|
| `total` | `integer` | Yes | | | | No | Number of observations in this response. |
|
|
16
16
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@healthcloudai/hc-sdk",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.10.0",
|
|
4
4
|
"description": "All-in-one HealthCloud SDK with typed platform APIs and secure connector clients.",
|
|
5
5
|
"author": "Healthcheck Systems Inc",
|
|
6
6
|
"license": "MIT",
|
|
@@ -66,5 +66,8 @@
|
|
|
66
66
|
},
|
|
67
67
|
"engines": {
|
|
68
68
|
"node": ">=18"
|
|
69
|
+
},
|
|
70
|
+
"overrides": {
|
|
71
|
+
"source-map-js": "^1.2.2"
|
|
69
72
|
}
|
|
70
73
|
}
|