@healthcloudai/hc-sdk 3.10.0 → 3.11.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.js CHANGED
@@ -616,7 +616,7 @@ var EhrClient = class extends BaseServiceClient {
616
616
  pathParams: { patient_id: patientId }
617
617
  });
618
618
  }
619
- /** List a patient's functional-status observations. */
619
+ /** List a patient's functional-status observations as serialized ClinicalObservation domain models (never raw FHIR). */
620
620
  listFunctionalStatus(patientId) {
621
621
  return this.send("GET", "/patients/{patient_id}/functional-status", {
622
622
  pathParams: { patient_id: patientId }
@@ -636,8 +636,9 @@ var EhrClient = class extends BaseServiceClient {
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"
639
+ * List a patient's observations as serialized ClinicalObservation domain
640
+ * models (never raw FHIR). Vital-sign observations are excluded by default
641
+ * (use {@link listVitals} for those); pass category "vital-signs"
641
642
  * explicitly to include them here.
642
643
  */
643
644
  listObservations(patientId, category) {
@@ -664,22 +665,25 @@ var EhrClient = class extends BaseServiceClient {
664
665
  * domain sections (social/functional/gyn/perinatal history, encounters,
665
666
  * vitals, diagnostics, …) but no raw `observations` bucket — list general
666
667
  * observations with {@link listObservations} (vital signs excluded) and
667
- * vital signs with {@link listVitals}.
668
+ * vital signs with {@link listVitals}. The vitals section is the full
669
+ * history serialized as VitalReading domain models (never raw FHIR).
668
670
  */
669
671
  getHealthRecord(patientId) {
670
672
  return this.send("GET", "/patients/{patient_id}/record", {
671
673
  pathParams: { patient_id: patientId }
672
674
  });
673
675
  }
674
- /** List a patient's social history. */
676
+ /** List a patient's social history as serialized ClinicalObservation domain models (never raw FHIR). */
675
677
  listSocialHistory(patientId) {
676
678
  return this.send("GET", "/patients/{patient_id}/social-history", {
677
679
  pathParams: { patient_id: patientId }
678
680
  });
679
681
  }
680
682
  /**
681
- * List a patient's vital signs (the only place vital-sign observations are
682
- * returned — {@link listObservations} excludes them by default).
683
+ * List a patient's vital signs as serialized VitalReading domain models
684
+ * (full history — never raw FHIR; blood-pressure panels carry systolic
685
+ * and diastolic). This is the only place vital-sign observations are
686
+ * returned — {@link listObservations} excludes them by default.
683
687
  */
684
688
  listVitals(patientId, dateFrom, dateTo, type) {
685
689
  const query = dateFrom || dateTo || type ? {
@@ -1,5 +1,5 @@
1
1
  {
2
- "docsDataContentDigest": "sha256:b0be17d679cc774ef551c27f8b531000c7f3313da6bb14b1db71707188c22b0c",
2
+ "docsDataContentDigest": "sha256:6e7792f233e63fa5217b47b397dab0b95e12f5f5bef8f4b9b2e62e2da274b0da",
3
3
  "generatedFiles": [
4
4
  "authentication.md",
5
5
  "clients/AmsClient.md",
@@ -443,6 +443,7 @@
443
443
  "models/CheckEncounterResponse.md",
444
444
  "models/CheckInEncounterRequest.md",
445
445
  "models/CheckInEncounterResponse.md",
446
+ "models/ClinicalObservation.md",
446
447
  "models/CmsGetCountyFipsRequest.md",
447
448
  "models/CmsSearchHealthPlansRequest.md",
448
449
  "models/CmsSearchHealthPlansResponse.md",
@@ -1265,6 +1266,7 @@
1265
1266
  "models/NppesSearchProvidersResponse.md",
1266
1267
  "models/NppesVerifyProviderRequest.md",
1267
1268
  "models/NppesVerifyProviderResponse.md",
1269
+ "models/ObservationComponent.md",
1268
1270
  "models/ObservationStatus.md",
1269
1271
  "models/OnboardEncounterPayload.md",
1270
1272
  "models/OnboardEncounterStepResult.md",
@@ -1820,6 +1822,7 @@
1820
1822
  "models/VerifyOtpResponse.md",
1821
1823
  "models/VisionFaceCompareRequest.md",
1822
1824
  "models/VisionFaceCompareResponse.md",
1825
+ "models/VitalReading.md",
1823
1826
  "models/VitalsRecordRequest.md",
1824
1827
  "models/VitalsStatus.md",
1825
1828
  "models/WhoopActivityIdMappingResponse.md",
@@ -3106,7 +3109,7 @@
3106
3109
  "operations/vitals.recordVitals.md"
3107
3110
  ],
3108
3111
  "language": "nodejs",
3109
- "modelCount": 2024,
3112
+ "modelCount": 2027,
3110
3113
  "operationCount": 1025,
3111
3114
  "schemaVersion": 1
3112
3115
  }
@@ -0,0 +1,44 @@
1
+ # ClinicalObservation
2
+
3
+ Model ID: `ClinicalObservation`
4
+
5
+ A single FHIR Observation mapped into a domain model.
6
+
7
+ All clinically relevant data on the FHIR resource is carried over:
8
+ category, code, status, effective time, every value[x] variant, panel
9
+ components, interpretation, body site, method, notes and device — so
10
+ mapping never loses clinical content, it only sheds raw FHIR scaffolding
11
+ (resourceType, meta, subject, extensions, identifiers...).
12
+
13
+ Type: `object`
14
+
15
+ ## Fields
16
+
17
+ | Field | Type | Required | Format | Allowed values | Default | Nullable | Description |
18
+ |---|---|---:|---|---|---|---:|---|
19
+ | `body_site` | `string|null` | No | | | `null` | Yes | Body site of the observation, optional. |
20
+ | `category` | `string|null` | No | | | `null` | Yes | Observation category code (e.g. social-history, survey, laboratory, activity). |
21
+ | `code` | `string|null` | No | | | `null` | Yes | Primary code identifying what was observed (e.g. LOINC). |
22
+ | `code_system` | `string|null` | No | | | `null` | Yes | Code system of the primary code, optional. |
23
+ | `components` | array of [`ObservationComponent`](./ObservationComponent.md) | No | | | | No | Panel components (e.g. blood pressure systolic/diastolic), each mapped like the observation itself. |
24
+ | `device` | `string|null` | No | | | `null` | Yes | Device used to take the measurement (HC vitals-device-type extension), optional. |
25
+ | `display` | `string|null` | No | | | `null` | Yes | Human-readable name of what was observed. |
26
+ | `effective_datetime` | `string|null` | No | | | `null` | Yes | ISO 8601 datetime the observation was effective. |
27
+ | `interpretation` | `string|null` | No | | | `null` | Yes | Clinical interpretation flag (e.g. H, L, HH, POS). |
28
+ | `method` | `string|null` | No | | | `null` | Yes | Method by which the observation was made, optional. |
29
+ | `notes` | `array` | No | | | | No | Free-text notes attached to the observation. |
30
+ | `observation_id` | `string|null` | No | | | `null` | Yes | FHIR Observation resource ID. |
31
+ | `status` | `string|null` | No | | | `null` | Yes | Observation lifecycle status. |
32
+ | `value_boolean` | `boolean|null` | No | | | `null` | Yes | Boolean result value, when applicable. |
33
+ | `value_code` | `string|null` | No | | | `null` | Yes | Coded form of the value unit, optional. |
34
+ | `value_codeable_concept` | `object|null` | No | | | `null` | Yes | Coded result value, when applicable. |
35
+ | `value_integer` | `integer|null` | No | | | `null` | Yes | Integer result value, when applicable. |
36
+ | `value_quantity` | `number|null` | No | | | `null` | Yes | Numeric result, when the observation is quantitative. |
37
+ | `value_range` | `object|null` | No | | | `null` | Yes | Range result value, when applicable. |
38
+ | `value_string` | `string|null` | No | | | `null` | Yes | Free-text result value, when not quantitative. |
39
+ | `value_system` | `string|null` | No | | | `null` | Yes | Code system of the value unit (UCUM), optional. |
40
+ | `value_unit` | `string|null` | No | | | `null` | Yes | Unit of measure for value_quantity, optional. |
41
+
42
+ ## Example
43
+
44
+ None declared in canonical OpenAPI.
@@ -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, 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. |
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. vitals is the full vital-sign history, each reading serialized as a VitalReading domain model (code, value, unit, effective time, blood-pressure panel components surface as systolic/diastolic, interpretation, body site, method, device, notes) — never raw FHIR resources. The record carries no raw 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, 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
@@ -2,7 +2,7 @@
2
2
 
3
3
  Model ID: `ListFunctionalStatusResponse`
4
4
 
5
- Response for GET /patients/{patient_id}/functional-status. Contains raw FHIR Observation resources.
5
+ Response for GET /patients/{patient_id}/functional-status. Contains serialized domain models mapped from FHIR Observations.
6
6
 
7
7
  Type: `object`
8
8
 
@@ -10,7 +10,7 @@ Type: `object`
10
10
 
11
11
  | Field | Type | Required | Format | Allowed values | Default | Nullable | Description |
12
12
  |---|---|---:|---|---|---|---:|---|
13
- | `functional_status` | `array` | Yes | | | | No | Raw FHIR Observation resources with category survey or functional-status. |
13
+ | `functional_status` | `array` | Yes | | | | No | Functional-status observations (category survey or functional-status), serialized as ClinicalObservation domain models — never raw FHIR resources. |
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
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Model ID: `ListObservationsResponse`
4
4
 
5
- Response for GET /patients/{patient_id}/observations. Contains raw FHIR Observation resources.
5
+ Response for GET /patients/{patient_id}/observations. Contains serialized domain models mapped from FHIR Observations.
6
6
 
7
7
  Type: `object`
8
8
 
@@ -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. 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. |
13
+ | `observations` | `array` | Yes | | | | No | Observations serialized as ClinicalObservation domain models (category, code, display, status, effective time, every value[x] variant, panel components, interpretation, body site, method, device, notes) — never raw FHIR 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
 
@@ -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 | |
14
- | `social_history` | `array` | Yes | | | | No | |
14
+ | `social_history` | array of [`ClinicalObservation`](./ClinicalObservation.md) | Yes | | | | No | |
15
15
  | `total` | `integer` | Yes | | | | No | |
16
16
 
17
17
  ## Example
@@ -12,7 +12,7 @@ Type: `object`
12
12
  |---|---|---:|---|---|---|---:|---|
13
13
  | `patient_id` | `string` | Yes | | | | No | |
14
14
  | `total` | `integer` | Yes | | | | No | |
15
- | `vitals` | `array` | Yes | | | | No | |
15
+ | `vitals` | array of [`VitalReading`](./VitalReading.md) | Yes | | | | No | |
16
16
 
17
17
  ## Example
18
18
 
@@ -0,0 +1,23 @@
1
+ # ObservationComponent
2
+
3
+ Model ID: `ObservationComponent`
4
+
5
+ One component of a multi-part Observation (e.g. a blood-pressure panel).
6
+
7
+ Type: `object`
8
+
9
+ ## Fields
10
+
11
+ | Field | Type | Required | Format | Allowed values | Default | Nullable | Description |
12
+ |---|---|---:|---|---|---|---:|---|
13
+ | `code` | `string|null` | No | | | `null` | Yes | Component code (e.g. LOINC 8480-6 systolic). |
14
+ | `code_system` | `string|null` | No | | | `null` | Yes | Code system of the component code, optional. |
15
+ | `display` | `string|null` | No | | | `null` | Yes | Human-readable name of the component, optional. |
16
+ | `value_codeable_concept` | `object|null` | No | | | `null` | Yes | Coded component value, when applicable. |
17
+ | `value_quantity` | `number|null` | No | | | `null` | Yes | Numeric component value, when quantitative. |
18
+ | `value_string` | `string|null` | No | | | `null` | Yes | Free-text component value, when not quantitative. |
19
+ | `value_unit` | `string|null` | No | | | `null` | Yes | Unit of measure for value_quantity, optional. |
20
+
21
+ ## Example
22
+
23
+ None declared in canonical OpenAPI.
@@ -0,0 +1,44 @@
1
+ # VitalReading
2
+
3
+ Model ID: `VitalReading`
4
+
5
+ One FHIR vital-sign Observation mapped into a domain model.
6
+
7
+ Every clinically relevant field on the FHIR resource is carried over —
8
+ code, value, unit, effective time, panel components (with systolic and
9
+ diastolic extracted from blood-pressure panels), interpretation, body
10
+ site, method, device and notes — so no data is lost, only the raw FHIR
11
+ scaffolding (resourceType, meta, subject, extensions...) is shed.
12
+ Used by GET /patients/{id}/vitals and the record's vitals section.
13
+
14
+ Type: `object`
15
+
16
+ ## Fields
17
+
18
+ | Field | Type | Required | Format | Allowed values | Default | Nullable | Description |
19
+ |---|---|---:|---|---|---|---:|---|
20
+ | `body_site` | `string|null` | No | | | `null` | Yes | Body site of the reading, optional. |
21
+ | `category` | `string|null` | No | | | `null` | Yes | Observation category code (vital-signs or activity). |
22
+ | `components` | array of [`ObservationComponent`](./ObservationComponent.md) | No | | | | No | Panel components (e.g. SpO2 panel), each mapped like the reading itself. |
23
+ | `device` | `string|null` | No | | | `null` | Yes | Device used to take the reading (HC vitals-device-type extension), optional. |
24
+ | `diastolic` | `number|null` | No | | | `null` | Yes | Diastolic blood pressure in mmHg, extracted from the 8462-4 component of a blood-pressure panel. |
25
+ | `display` | `string|null` | No | | | `null` | Yes | Human-readable name of the vital sign. |
26
+ | `effective_datetime` | `string|null` | No | | | `null` | Yes | ISO 8601 datetime the reading was taken. |
27
+ | `interpretation` | `string|null` | No | | | `null` | Yes | Clinical interpretation flag (e.g. H, L, HH). |
28
+ | `loinc_code` | `string|null` | No | | | `null` | Yes | LOINC code identifying the vital sign (e.g. 85354-9 blood pressure panel, 8310-5 body temperature). |
29
+ | `method` | `string|null` | No | | | `null` | Yes | Method by which the reading was made, optional. |
30
+ | `notes` | `array` | No | | | | No | Free-text notes attached to the reading. |
31
+ | `observation_id` | `string|null` | No | | | `null` | Yes | FHIR Observation resource ID. |
32
+ | `status` | `string|null` | No | | | `null` | Yes | Observation lifecycle status. |
33
+ | `systolic` | `number|null` | No | | | `null` | Yes | Systolic blood pressure in mmHg, extracted from the 8480-6 component of a blood-pressure panel. |
34
+ | `value_code` | `string|null` | No | | | `null` | Yes | Coded form of the value unit, optional. |
35
+ | `value_codeable_concept` | `object|null` | No | | | `null` | Yes | Coded reading, when applicable. |
36
+ | `value_integer` | `integer|null` | No | | | `null` | Yes | Integer reading, when applicable. |
37
+ | `value_quantity` | `number|null` | No | | | `null` | Yes | Numeric reading (e.g. 72 for heart rate), when quantitative. |
38
+ | `value_string` | `string|null` | No | | | `null` | Yes | Free-text reading, when not quantitative. |
39
+ | `value_system` | `string|null` | No | | | `null` | Yes | Code system of the value unit (UCUM), optional. |
40
+ | `value_unit` | `string|null` | No | | | `null` | Yes | Unit of measure for value_quantity (e.g. /min), optional. |
41
+
42
+ ## Example
43
+
44
+ None declared in canonical OpenAPI.
@@ -393,6 +393,7 @@
393
393
  - [CheckEncounterResponse](CheckEncounterResponse.md)
394
394
  - [CheckInEncounterRequest](CheckInEncounterRequest.md)
395
395
  - [CheckInEncounterResponse](CheckInEncounterResponse.md)
396
+ - [ClinicalObservation](ClinicalObservation.md)
396
397
  - [CMSCounty](CMSCounty.md)
397
398
  - [CmsGetCountyFipsRequest](CmsGetCountyFipsRequest.md)
398
399
  - [CmsSearchHealthPlansRequest](CmsSearchHealthPlansRequest.md)
@@ -1256,6 +1257,7 @@
1256
1257
  - [NppesSearchProvidersResponse](NppesSearchProvidersResponse.md)
1257
1258
  - [NppesVerifyProviderRequest](NppesVerifyProviderRequest.md)
1258
1259
  - [NppesVerifyProviderResponse](NppesVerifyProviderResponse.md)
1260
+ - [ObservationComponent](ObservationComponent.md)
1259
1261
  - [ObservationStatus](ObservationStatus.md)
1260
1262
  - [OnboardEncounterPayload](OnboardEncounterPayload.md)
1261
1263
  - [OnboardEncounterStepResult](OnboardEncounterStepResult.md)
@@ -1892,6 +1894,7 @@
1892
1894
  - [VerifyOtpResponse](VerifyOtpResponse.md)
1893
1895
  - [VisionFaceCompareRequest](VisionFaceCompareRequest.md)
1894
1896
  - [VisionFaceCompareResponse](VisionFaceCompareResponse.md)
1897
+ - [VitalReading](VitalReading.md)
1895
1898
  - [vitals.ConnectResponse](vitals.ConnectResponse.md)
1896
1899
  - [VitalsRecordRequest](VitalsRecordRequest.md)
1897
1900
  - [VitalsStatus](VitalsStatus.md)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@healthcloudai/hc-sdk",
3
- "version": "3.10.0",
3
+ "version": "3.11.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",