@ovok/core 0.4.49-rc.1 → 0.4.49-rc.2
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/README.md +27 -79
- package/dist/client/observation/measurement-fields.d.ts +1 -1
- package/dist/client/observation/methods/observationsToMeasurements.d.ts +1 -1
- package/dist/client/observation/methods/observationsToMeasurements.js +59 -59
- package/dist/client/observation/services/base-observation-service.d.ts +1 -1
- package/dist/client/observation/services/blood-oxygen.d.ts +1 -1
- package/dist/client/observation/services/blood-oxygen.js +7 -7
- package/dist/client/observation/services/blood-pressure.d.ts +1 -1
- package/dist/client/observation/services/blood-pressure.js +16 -16
- package/dist/client/observation/services/component-observation-services.d.ts +1 -1
- package/dist/client/observation/services/component-observation-services.js +3 -3
- package/dist/client/observation/services/creator.d.ts +1 -1
- package/dist/client/observation/services/creator.js +10 -10
- package/dist/client/observation/services/ecg-observation-fragments.d.ts +1 -1
- package/dist/client/observation/services/ecg.d.ts +1 -1
- package/dist/client/observation/services/ecg.js +10 -10
- package/dist/client/observation/services/lipid-panel.d.ts +1 -1
- package/dist/client/observation/services/lipid-panel.js +13 -13
- package/dist/client/observation/services/single-value-services.d.ts +1 -1
- package/dist/client/observation/services/single-value-services.js +19 -19
- package/dist/client/observation/services/step-count.d.ts +1 -1
- package/dist/client/observation/services/step-count.js +5 -5
- package/dist/client/observation/services/uric-acid-service.d.ts +1 -1
- package/dist/client/observation/services/uric-acid-service.js +7 -7
- package/dist/client/offline/offline-measurement-queue.d.ts +1 -2
- package/dist/client/signals/methods.d.ts +2 -23
- package/dist/client/signals/methods.js +10 -93
- package/dist/client/signals/types.d.ts +6 -132
- package/dist/client/wearables/types.d.ts +5 -0
- package/dist/conformance/api-requirements.js +2 -9
- package/dist/conformance/capability-requirements.js +1 -1
- package/dist/hooks/index.d.ts +1 -1
- package/dist/hooks/index.js +1 -9
- package/dist/hooks/notification-invalidation.d.ts +0 -7
- package/dist/hooks/signals-hooks.d.ts +2 -23
- package/dist/hooks/signals-hooks.js +1 -15
- package/dist/next/auth/access-token.d.ts +9 -0
- package/dist/next/auth/access-token.js +18 -0
- package/dist/next/auth/client-credentials.d.ts +16 -0
- package/dist/next/auth/client-credentials.js +40 -0
- package/dist/next/auth/credentials.d.ts +5 -0
- package/dist/next/auth/credentials.js +7 -0
- package/dist/next/auth/saved-accounts-store.d.ts +26 -0
- package/dist/next/auth/saved-accounts-store.js +93 -0
- package/dist/next/auth/session-store.d.ts +12 -0
- package/dist/next/auth/session-store.js +33 -0
- package/dist/next/auth/session.d.ts +28 -0
- package/dist/next/auth/session.js +27 -0
- package/dist/next/auth/token-endpoint.d.ts +12 -0
- package/dist/next/auth/token-endpoint.js +28 -0
- package/dist/next/auth/user-session.d.ts +39 -0
- package/dist/next/auth/user-session.js +183 -0
- package/dist/next/config/ovok-config.d.ts +42 -0
- package/dist/next/config/ovok-config.js +2 -0
- package/dist/next/config/settings.d.ts +6 -0
- package/dist/next/config/settings.js +74 -0
- package/dist/next/errors/error-from-response.d.ts +2 -0
- package/dist/next/errors/error-from-response.js +35 -0
- package/dist/next/errors/ovok-account-error.d.ts +5 -0
- package/dist/next/errors/ovok-account-error.js +13 -0
- package/dist/next/errors/ovok-errors.d.ts +42 -0
- package/dist/next/errors/ovok-errors.js +74 -0
- package/dist/next/http/http-client.d.ts +36 -0
- package/dist/next/http/http-client.js +116 -0
- package/dist/next/http/retry-after.d.ts +1 -0
- package/dist/next/http/retry-after.js +16 -0
- package/dist/next/http/retry-policy.d.ts +13 -0
- package/dist/next/http/retry-policy.js +27 -0
- package/dist/next/http/transmit.d.ts +14 -0
- package/dist/next/http/transmit.js +57 -0
- package/dist/next/http/url.d.ts +6 -0
- package/dist/next/http/url.js +22 -0
- package/dist/next/index.d.ts +77 -0
- package/dist/next/index.js +35 -0
- package/dist/next/ovok.d.ts +56 -0
- package/dist/next/ovok.js +86 -0
- package/dist/next/paging/bundle-page.d.ts +4 -0
- package/dist/next/paging/bundle-page.js +25 -0
- package/dist/next/paging/cursor-pages.d.ts +7 -0
- package/dist/next/paging/cursor-pages.js +14 -0
- package/dist/next/paging/numbered-pages.d.ts +15 -0
- package/dist/next/paging/numbered-pages.js +20 -0
- package/dist/next/paging/page.d.ts +12 -0
- package/dist/next/paging/page.js +17 -0
- package/dist/next/react/context.d.ts +4 -0
- package/dist/{hooks/signals-alert-item-hooks.js → next/react/context.js} +10 -26
- package/dist/next/react/index.d.ts +14 -0
- package/dist/next/react/index.js +68 -0
- package/dist/next/react/query-hooks.d.ts +31 -0
- package/dist/next/react/query-hooks.js +160 -0
- package/dist/next/resources/accounts/accounts-resource.d.ts +8 -0
- package/dist/next/resources/accounts/accounts-resource.js +13 -0
- package/dist/next/resources/ai/ai-chat-resource.d.ts +8 -0
- package/dist/next/resources/ai/ai-chat-resource.js +12 -0
- package/dist/next/resources/ai/ai-resource.d.ts +16 -0
- package/dist/next/resources/ai/ai-resource.js +19 -0
- package/dist/next/resources/ai/chat-messages-resource.d.ts +9 -0
- package/dist/next/resources/ai/chat-messages-resource.js +18 -0
- package/dist/next/resources/ai/chat-sessions-resource.d.ts +14 -0
- package/dist/next/resources/ai/chat-sessions-resource.js +23 -0
- package/dist/next/resources/auth/auth-sessions-resource.d.ts +13 -0
- package/dist/next/resources/auth/auth-sessions-resource.js +25 -0
- package/dist/next/resources/auth/registration.d.ts +35 -0
- package/dist/next/resources/auth/registration.js +24 -0
- package/dist/next/resources/auth/social-login.d.ts +8 -0
- package/dist/next/resources/auth/social-login.js +7 -0
- package/dist/next/resources/auth-resource.d.ts +63 -0
- package/dist/next/resources/auth-resource.js +119 -0
- package/dist/next/resources/bots/bots-resource.d.ts +10 -0
- package/dist/next/resources/bots/bots-resource.js +15 -0
- package/dist/next/resources/cms/cms-delivery.d.ts +22 -0
- package/dist/next/resources/cms/cms-delivery.js +36 -0
- package/dist/next/resources/cms/cms-documents-resource.d.ts +11 -0
- package/dist/next/resources/cms/cms-documents-resource.js +17 -0
- package/dist/next/resources/cms/cms-resource.d.ts +17 -0
- package/dist/next/resources/cms/cms-resource.js +38 -0
- package/dist/next/resources/cms/payload-pages.d.ts +6 -0
- package/dist/next/resources/cms/payload-pages.js +15 -0
- package/dist/next/resources/cms/release-notes-resource.d.ts +10 -0
- package/dist/next/resources/cms/release-notes-resource.js +15 -0
- package/dist/next/resources/cms/translation-tree.d.ts +3 -0
- package/dist/next/resources/cms/translation-tree.js +45 -0
- package/dist/next/resources/consent/consent-resource.d.ts +23 -0
- package/dist/next/resources/consent/consent-resource.js +43 -0
- package/dist/next/resources/content/content-resource.d.ts +19 -0
- package/dist/next/resources/content/content-resource.js +41 -0
- package/dist/next/resources/documents/documents-resource.d.ts +26 -0
- package/dist/next/resources/documents/documents-resource.js +41 -0
- package/dist/next/resources/email/email-resource.d.ts +6 -0
- package/dist/next/resources/email/email-resource.js +10 -0
- package/dist/next/resources/email/email-templates-resource.d.ts +8 -0
- package/dist/next/resources/email/email-templates-resource.js +13 -0
- package/dist/next/resources/fhir-resource.d.ts +28 -0
- package/dist/next/resources/fhir-resource.js +64 -0
- package/dist/next/resources/health-resource.d.ts +17 -0
- package/dist/next/resources/health-resource.js +14 -0
- package/dist/next/resources/invites/invite-flow-resource.d.ts +12 -0
- package/dist/next/resources/invites/invite-flow-resource.js +19 -0
- package/dist/next/resources/invites/invites-resource.d.ts +22 -0
- package/dist/next/resources/invites/invites-resource.js +29 -0
- package/dist/next/resources/localization/i18next-resource.d.ts +10 -0
- package/dist/next/resources/localization/i18next-resource.js +18 -0
- package/dist/next/resources/localization/locales-resource.d.ts +9 -0
- package/dist/next/resources/localization/locales-resource.js +16 -0
- package/dist/next/resources/localization/localizations-resource.d.ts +17 -0
- package/dist/next/resources/localization/localizations-resource.js +27 -0
- package/dist/next/resources/measurements/measurements-resource.d.ts +58 -0
- package/dist/next/resources/measurements/measurements-resource.js +98 -0
- package/dist/next/resources/measurements/observation-builder.d.ts +5 -0
- package/dist/next/resources/measurements/observation-builder.js +57 -0
- package/dist/next/resources/measurements/offline-measurement-queue-types.d.ts +22 -0
- package/dist/next/resources/measurements/offline-measurement-queue-types.js +2 -0
- package/dist/next/resources/measurements/offline-measurement-queue.d.ts +25 -0
- package/dist/next/resources/measurements/offline-measurement-queue.js +154 -0
- package/dist/next/resources/measurements/save-error.d.ts +5 -0
- package/dist/next/resources/measurements/save-error.js +18 -0
- package/dist/next/resources/measurements/signed-in-account.d.ts +11 -0
- package/dist/next/resources/measurements/signed-in-account.js +26 -0
- package/dist/next/resources/patient/fhir-records.d.ts +19 -0
- package/dist/next/resources/patient/fhir-records.js +33 -0
- package/dist/next/resources/patient/patient-resource.d.ts +21 -0
- package/dist/next/resources/patient/patient-resource.js +38 -0
- package/dist/next/resources/projects/project-features-resource.d.ts +9 -0
- package/dist/next/resources/projects/project-features-resource.js +17 -0
- package/dist/next/resources/projects/project-members-resource.d.ts +19 -0
- package/dist/next/resources/projects/project-members-resource.js +25 -0
- package/dist/next/resources/projects/project-settings-resource.d.ts +10 -0
- package/dist/next/resources/projects/project-settings-resource.js +21 -0
- package/dist/next/resources/projects/projects-resource.d.ts +20 -0
- package/dist/next/resources/projects/projects-resource.js +21 -0
- package/dist/next/resources/questionnaires/questionnaires-resource.d.ts +18 -0
- package/dist/next/resources/questionnaires/questionnaires-resource.js +36 -0
- package/dist/next/resources/realtime/realtime-binding.d.ts +7 -0
- package/dist/next/resources/realtime/realtime-binding.js +44 -0
- package/dist/next/resources/realtime/realtime-connection.d.ts +38 -0
- package/dist/next/resources/realtime/realtime-connection.js +167 -0
- package/dist/next/resources/realtime/realtime-resource.d.ts +13 -0
- package/dist/next/resources/realtime/realtime-resource.js +39 -0
- package/dist/next/resources/realtime/realtime-socket.d.ts +23 -0
- package/dist/next/resources/realtime/realtime-socket.js +152 -0
- package/dist/next/resources/realtime/realtime-types.d.ts +6 -0
- package/dist/next/resources/realtime/realtime-types.js +2 -0
- package/dist/next/resources/session/saved-accounts-resource.d.ts +13 -0
- package/dist/next/resources/session/saved-accounts-resource.js +44 -0
- package/dist/next/resources/session/session-resource.d.ts +12 -0
- package/dist/next/resources/session/session-resource.js +19 -0
- package/dist/next/resources/sharing/sharing-invites-resource.d.ts +9 -0
- package/dist/next/resources/sharing/sharing-invites-resource.js +17 -0
- package/dist/next/resources/sharing/sharing-resource.d.ts +10 -0
- package/dist/next/resources/sharing/sharing-resource.js +14 -0
- package/dist/next/resources/sharing/sharing-settings-resource.d.ts +9 -0
- package/dist/next/resources/sharing/sharing-settings-resource.js +16 -0
- package/dist/next/resources/sharing/sharing-shares-resource.d.ts +9 -0
- package/dist/next/resources/sharing/sharing-shares-resource.js +27 -0
- package/dist/next/resources/signals/signals-gateway-resource.d.ts +14 -0
- package/dist/next/resources/signals/signals-gateway-resource.js +44 -0
- package/dist/next/resources/signals/signals-resource.d.ts +13 -0
- package/dist/next/resources/signals/signals-resource.js +19 -0
- package/dist/next/resources/signals/undeliverable-resource.d.ts +26 -0
- package/dist/next/resources/signals/undeliverable-resource.js +18 -0
- package/dist/next/resources/slim/live-reads.d.ts +13 -0
- package/dist/next/resources/slim/live-reads.js +87 -0
- package/dist/next/resources/slim/slim-alarms-resource.d.ts +13 -0
- package/dist/next/resources/slim/slim-alarms-resource.js +25 -0
- package/dist/next/resources/slim/slim-change-history-resource.d.ts +9 -0
- package/dist/next/resources/slim/slim-change-history-resource.js +19 -0
- package/dist/next/resources/slim/slim-child-projects-resource.d.ts +17 -0
- package/dist/next/resources/slim/slim-child-projects-resource.js +22 -0
- package/dist/next/resources/slim/slim-devices-resource.d.ts +29 -0
- package/dist/next/resources/slim/slim-devices-resource.js +81 -0
- package/dist/next/resources/slim/slim-exports-resource.d.ts +8 -0
- package/dist/next/resources/slim/slim-exports-resource.js +14 -0
- package/dist/next/resources/slim/slim-locations-resource.d.ts +14 -0
- package/dist/next/resources/slim/slim-locations-resource.js +30 -0
- package/dist/next/resources/slim/slim-medical-notifications-resource.d.ts +18 -0
- package/dist/next/resources/slim/slim-medical-notifications-resource.js +46 -0
- package/dist/next/resources/slim/slim-notification-notes-resource.d.ts +12 -0
- package/dist/next/resources/slim/slim-notification-notes-resource.js +34 -0
- package/dist/next/resources/slim/slim-notifications-resource.d.ts +19 -0
- package/dist/next/resources/slim/slim-notifications-resource.js +26 -0
- package/dist/next/resources/slim/slim-organizations-resource.d.ts +11 -0
- package/dist/next/resources/slim/slim-organizations-resource.js +25 -0
- package/dist/next/resources/slim/slim-out-of-bed-resource.d.ts +13 -0
- package/dist/next/resources/slim/slim-out-of-bed-resource.js +20 -0
- package/dist/next/resources/slim/slim-paths.d.ts +6 -0
- package/dist/next/resources/slim/slim-paths.js +9 -0
- package/dist/next/resources/slim/slim-patient-thresholds-resource.d.ts +10 -0
- package/dist/next/resources/slim/slim-patient-thresholds-resource.js +20 -0
- package/dist/next/resources/slim/slim-patients-resource.d.ts +20 -0
- package/dist/next/resources/slim/slim-patients-resource.js +39 -0
- package/dist/next/resources/slim/slim-policies-resource.d.ts +12 -0
- package/dist/next/resources/slim/slim-policies-resource.js +29 -0
- package/dist/next/resources/slim/slim-practitioners-resource.d.ts +8 -0
- package/dist/next/resources/slim/slim-practitioners-resource.js +14 -0
- package/dist/next/resources/slim/slim-projects-resource.d.ts +16 -0
- package/dist/next/resources/slim/slim-projects-resource.js +35 -0
- package/dist/next/resources/slim/slim-queries.d.ts +34 -0
- package/dist/next/resources/slim/slim-queries.js +2 -0
- package/dist/next/resources/slim/slim-resource.d.ts +39 -0
- package/dist/next/resources/slim/slim-resource.js +44 -0
- package/dist/next/resources/slim/slim-sleep-resource.d.ts +9 -0
- package/dist/next/resources/slim/slim-sleep-resource.js +15 -0
- package/dist/next/resources/slim/slim-thresholds-resource.d.ts +11 -0
- package/dist/next/resources/slim/slim-thresholds-resource.js +18 -0
- package/dist/next/resources/slim/slim-trends-resource.d.ts +11 -0
- package/dist/next/resources/slim/slim-trends-resource.js +19 -0
- package/dist/next/resources/slim/slim-users-resource.d.ts +11 -0
- package/dist/next/resources/slim/slim-users-resource.js +15 -0
- package/dist/next/resources/slim/slim-zones-resource.d.ts +12 -0
- package/dist/next/resources/slim/slim-zones-resource.js +24 -0
- package/dist/next/resources/video-calls/video-call-access-resource.d.ts +11 -0
- package/dist/next/resources/video-calls/video-call-access-resource.js +19 -0
- package/dist/next/resources/video-calls/video-call-appointments-resource.d.ts +10 -0
- package/dist/next/resources/video-calls/video-call-appointments-resource.js +21 -0
- package/dist/next/resources/video-calls/video-call-emails-resource.d.ts +10 -0
- package/dist/next/resources/video-calls/video-call-emails-resource.js +19 -0
- package/dist/next/resources/video-calls/video-calls-resource.d.ts +14 -0
- package/dist/next/resources/video-calls/video-calls-resource.js +20 -0
- package/dist/next/resources/wearables/wearable-connections-resource.d.ts +12 -0
- package/dist/next/resources/wearables/wearable-connections-resource.js +25 -0
- package/dist/next/resources/wearables/wearable-providers-resource.d.ts +12 -0
- package/dist/next/resources/wearables/wearable-providers-resource.js +27 -0
- package/dist/next/resources/wearables/wearables-resource.d.ts +8 -0
- package/dist/next/resources/wearables/wearables-resource.js +14 -0
- package/dist/next/storage/ovok-storage.d.ts +11 -0
- package/dist/next/storage/ovok-storage.js +19 -0
- package/dist/types/MeasurementTypes.d.ts +5 -0
- package/dist/types/MeasurementTypes.js +21 -0
- package/dist/types/index.d.ts +1 -5
- package/dist/types/index.js +1 -5
- package/next/index.d.ts +1 -0
- package/next/index.js +3 -0
- package/next/react/index.d.ts +1 -0
- package/next/react/index.js +1 -0
- package/package.json +14 -2
- package/dist/hooks/signals-alert-hooks.d.ts +0 -22
- package/dist/hooks/signals-alert-hooks.js +0 -166
- package/dist/hooks/signals-alert-item-hooks.d.ts +0 -19
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ObservationServiceCreator = void 0;
|
|
4
|
-
const
|
|
4
|
+
const MeasurementTypes_1 = require("../../../types/MeasurementTypes");
|
|
5
5
|
const blood_oxygen_1 = require("./blood-oxygen");
|
|
6
6
|
const blood_pressure_1 = require("./blood-pressure");
|
|
7
7
|
const component_observation_services_1 = require("./component-observation-services");
|
|
@@ -15,15 +15,15 @@ class ObservationServiceCreator {
|
|
|
15
15
|
const uricAcid = new uric_acid_service_1.UricAcidService();
|
|
16
16
|
this.services = new Map([
|
|
17
17
|
...(0, single_value_services_1.singleValueObservationServices)(),
|
|
18
|
-
[
|
|
19
|
-
[
|
|
20
|
-
[
|
|
21
|
-
[
|
|
22
|
-
[
|
|
23
|
-
[
|
|
24
|
-
[
|
|
25
|
-
[
|
|
26
|
-
[
|
|
18
|
+
[MeasurementTypes_1.MeasurementTypeKey.bloodPressure, new blood_pressure_1.BloodPressureService()],
|
|
19
|
+
[MeasurementTypes_1.MeasurementTypeKey.bloodOxygenPulseRate, new blood_oxygen_1.BloodOxygenService()],
|
|
20
|
+
[MeasurementTypes_1.MeasurementTypeKey.ecg, new ecg_1.EcgService()],
|
|
21
|
+
[MeasurementTypes_1.MeasurementTypeKey.stepCount, new step_count_1.StepCountService()],
|
|
22
|
+
[MeasurementTypes_1.MeasurementTypeKey.urineAnalysis, uricAcid],
|
|
23
|
+
[MeasurementTypes_1.MeasurementTypeKey.uricAcid, uricAcid],
|
|
24
|
+
[MeasurementTypes_1.MeasurementTypeKey.lipidPanel, new lipid_panel_1.LipidPanelService()],
|
|
25
|
+
[MeasurementTypes_1.MeasurementTypeKey.respiratoryTherapy, (0, component_observation_services_1.respiratoryTherapyService)()],
|
|
26
|
+
[MeasurementTypes_1.MeasurementTypeKey.babySleep, (0, component_observation_services_1.babySleepService)()],
|
|
27
27
|
]);
|
|
28
28
|
}
|
|
29
29
|
static getInstance() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { CodeableConcept } from "@medplum/fhirtypes";
|
|
2
|
-
import { EcgMeasurement } from "../../../types";
|
|
2
|
+
import { EcgMeasurement } from "../../../types/MeasurementTypes";
|
|
3
3
|
import { ObservationFragment } from "../types/generate-observation-body/ObservationFragment";
|
|
4
4
|
export declare const generateEcgObservationFragments: (measurement: EcgMeasurement, observationCodes: CodeableConcept[]) => ObservationFragment[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Observation } from "@medplum/fhirtypes";
|
|
2
|
-
import { EcgMeasurement, Measurement, MeasurementTypeKey } from "../../../types";
|
|
2
|
+
import { EcgMeasurement, Measurement, MeasurementTypeKey } from "../../../types/MeasurementTypes";
|
|
3
3
|
import { ObservationFragment } from "../types/generate-observation-body/ObservationFragment";
|
|
4
4
|
import { ObservationValue } from "../types/generate-observation-body/ObservationValue";
|
|
5
5
|
import { ObservationMetadata } from "../types/service/ObservationMetadata";
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.EcgService = void 0;
|
|
4
|
-
const
|
|
4
|
+
const MeasurementTypes_1 = require("../../../types/MeasurementTypes");
|
|
5
5
|
const fhir_systems_1 = require("../fhir-systems");
|
|
6
6
|
const base_observation_service_1 = require("./base-observation-service");
|
|
7
7
|
const ecg_observation_fragments_1 = require("./ecg-observation-fragments");
|
|
8
8
|
class EcgService extends base_observation_service_1.BaseObservationService {
|
|
9
9
|
constructor() {
|
|
10
10
|
super(...arguments);
|
|
11
|
-
this.measurementTypeKey =
|
|
11
|
+
this.measurementTypeKey = MeasurementTypes_1.MeasurementTypeKey.ecg;
|
|
12
12
|
this.measurementTypeName = "ECG";
|
|
13
13
|
this.observationMetadata = [
|
|
14
14
|
{
|
|
15
|
-
primaryCode:
|
|
15
|
+
primaryCode: MeasurementTypes_1.ObservationCode.ECG,
|
|
16
16
|
additionalCodes: [],
|
|
17
17
|
display: "ECG",
|
|
18
18
|
unit: "mV",
|
|
@@ -20,8 +20,8 @@ class EcgService extends base_observation_service_1.BaseObservationService {
|
|
|
20
20
|
toFixed: 0,
|
|
21
21
|
},
|
|
22
22
|
{
|
|
23
|
-
primaryCode:
|
|
24
|
-
additionalCodes: [
|
|
23
|
+
primaryCode: MeasurementTypes_1.ObservationCode.ECG_HEART_RATE,
|
|
24
|
+
additionalCodes: [MeasurementTypes_1.ObservationCode.HEART_RATE],
|
|
25
25
|
display: "ECG Heart Rate",
|
|
26
26
|
unit: "bpm",
|
|
27
27
|
valueKey: "heartRate",
|
|
@@ -54,7 +54,7 @@ class EcgService extends base_observation_service_1.BaseObservationService {
|
|
|
54
54
|
valueQuantity: {
|
|
55
55
|
value: Number(fixedValue),
|
|
56
56
|
unit: "bpm",
|
|
57
|
-
code:
|
|
57
|
+
code: MeasurementTypes_1.ObservationCode.ECG_HEART_RATE,
|
|
58
58
|
system: fhir_systems_1.LOINC_SYSTEM,
|
|
59
59
|
},
|
|
60
60
|
});
|
|
@@ -112,14 +112,14 @@ class EcgService extends base_observation_service_1.BaseObservationService {
|
|
|
112
112
|
}
|
|
113
113
|
convertSamplesToMeasurement() {
|
|
114
114
|
return {
|
|
115
|
-
diagnosticResult:
|
|
116
|
-
measurementTypeKey:
|
|
115
|
+
diagnosticResult: MeasurementTypes_1.EcgDiagnosticFlag.REGULAR,
|
|
116
|
+
measurementTypeKey: MeasurementTypes_1.MeasurementTypeKey.ecg,
|
|
117
117
|
};
|
|
118
118
|
}
|
|
119
119
|
convertRecordToMeasurement() {
|
|
120
120
|
return {
|
|
121
|
-
diagnosticResult:
|
|
122
|
-
measurementTypeKey:
|
|
121
|
+
diagnosticResult: MeasurementTypes_1.EcgDiagnosticFlag.REGULAR,
|
|
122
|
+
measurementTypeKey: MeasurementTypes_1.MeasurementTypeKey.ecg,
|
|
123
123
|
};
|
|
124
124
|
}
|
|
125
125
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Observation } from "@medplum/fhirtypes";
|
|
2
|
-
import { LipidPanelMeasurement, Measurement, MeasurementTypeKey, ObservationCode } from "../../../types";
|
|
2
|
+
import { LipidPanelMeasurement, Measurement, MeasurementTypeKey, ObservationCode } from "../../../types/MeasurementTypes";
|
|
3
3
|
import { RecordResult, RecordType } from "../types/generate-measurement/HealthConnectTypes";
|
|
4
4
|
import { Sample } from "../types/generate-measurement/Sample";
|
|
5
5
|
import { ObservationFragment } from "../types/generate-observation-body/ObservationFragment";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.LipidPanelService = void 0;
|
|
4
|
-
const
|
|
4
|
+
const MeasurementTypes_1 = require("../../../types/MeasurementTypes");
|
|
5
5
|
const fhir_systems_1 = require("../fhir-systems");
|
|
6
6
|
const base_observation_service_1 = require("./base-observation-service");
|
|
7
7
|
const measurement_time_1 = require("./measurement-time");
|
|
@@ -9,37 +9,37 @@ const COMPONENTS = [
|
|
|
9
9
|
{
|
|
10
10
|
key: "totalCholesterol",
|
|
11
11
|
display: "Total cholesterol",
|
|
12
|
-
massCode:
|
|
13
|
-
molarCode:
|
|
12
|
+
massCode: MeasurementTypes_1.ObservationCode.TOTAL_CHOLESTEROL_MASS,
|
|
13
|
+
molarCode: MeasurementTypes_1.ObservationCode.TOTAL_CHOLESTEROL_MOLAR,
|
|
14
14
|
},
|
|
15
15
|
{
|
|
16
16
|
key: "hdlCholesterol",
|
|
17
17
|
display: "HDL cholesterol",
|
|
18
|
-
massCode:
|
|
19
|
-
molarCode:
|
|
18
|
+
massCode: MeasurementTypes_1.ObservationCode.HDL_CHOLESTEROL_MASS,
|
|
19
|
+
molarCode: MeasurementTypes_1.ObservationCode.HDL_CHOLESTEROL_MOLAR,
|
|
20
20
|
},
|
|
21
21
|
{
|
|
22
22
|
key: "ldlCholesterol",
|
|
23
23
|
display: "LDL cholesterol",
|
|
24
|
-
massCode:
|
|
25
|
-
molarCode:
|
|
24
|
+
massCode: MeasurementTypes_1.ObservationCode.LDL_CHOLESTEROL_MASS,
|
|
25
|
+
molarCode: MeasurementTypes_1.ObservationCode.LDL_CHOLESTEROL_MOLAR,
|
|
26
26
|
},
|
|
27
27
|
{
|
|
28
28
|
key: "triglycerides",
|
|
29
29
|
display: "Triglycerides",
|
|
30
|
-
massCode:
|
|
31
|
-
molarCode:
|
|
30
|
+
massCode: MeasurementTypes_1.ObservationCode.TRIGLYCERIDES_MASS,
|
|
31
|
+
molarCode: MeasurementTypes_1.ObservationCode.TRIGLYCERIDES_MOLAR,
|
|
32
32
|
},
|
|
33
33
|
{
|
|
34
34
|
key: "totalCholesterolHdlRatio",
|
|
35
35
|
display: "Total cholesterol/HDL ratio",
|
|
36
|
-
massCode:
|
|
36
|
+
massCode: MeasurementTypes_1.ObservationCode.TOTAL_CHOLESTEROL_HDL_RATIO,
|
|
37
37
|
},
|
|
38
38
|
];
|
|
39
39
|
class LipidPanelService extends base_observation_service_1.BaseObservationService {
|
|
40
40
|
constructor() {
|
|
41
41
|
super(...arguments);
|
|
42
|
-
this.measurementTypeKey =
|
|
42
|
+
this.measurementTypeKey = MeasurementTypes_1.MeasurementTypeKey.lipidPanel;
|
|
43
43
|
this.measurementTypeName = "lipid panel";
|
|
44
44
|
this.observationMetadata = [];
|
|
45
45
|
}
|
|
@@ -74,7 +74,7 @@ class LipidPanelService extends base_observation_service_1.BaseObservationServic
|
|
|
74
74
|
return [{
|
|
75
75
|
code: {
|
|
76
76
|
coding: [{
|
|
77
|
-
code:
|
|
77
|
+
code: MeasurementTypes_1.ObservationCode.LIPID_PANEL,
|
|
78
78
|
display: "Lipid panel - Serum or Plasma",
|
|
79
79
|
system: fhir_systems_1.LOINC_SYSTEM,
|
|
80
80
|
}],
|
|
@@ -88,7 +88,7 @@ class LipidPanelService extends base_observation_service_1.BaseObservationServic
|
|
|
88
88
|
getObservationCodes() {
|
|
89
89
|
return [{
|
|
90
90
|
coding: [{
|
|
91
|
-
code:
|
|
91
|
+
code: MeasurementTypes_1.ObservationCode.LIPID_PANEL,
|
|
92
92
|
display: "Lipid panel - Serum or Plasma",
|
|
93
93
|
system: fhir_systems_1.LOINC_SYSTEM,
|
|
94
94
|
}],
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MeasurementTypeKey } from "../../../types";
|
|
1
|
+
import { MeasurementTypeKey } from "../../../types/MeasurementTypes";
|
|
2
2
|
import { RecordResult, RecordType } from "../types/generate-measurement/HealthConnectTypes";
|
|
3
3
|
import { Sample } from "../types/generate-measurement/Sample";
|
|
4
4
|
import { Measurement } from "../types/measurement/Measurement";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.singleValueFields = exports.singleValueObservationServices = void 0;
|
|
4
|
-
const
|
|
4
|
+
const MeasurementTypes_1 = require("../../../types/MeasurementTypes");
|
|
5
5
|
const base_observation_service_1 = require("./base-observation-service");
|
|
6
6
|
/** An observation with one value: what varies per measurement is data, not code. */
|
|
7
7
|
class SingleValueObservationService extends base_observation_service_1.BaseObservationService {
|
|
@@ -30,62 +30,62 @@ class SingleValueObservationService extends base_observation_service_1.BaseObser
|
|
|
30
30
|
}
|
|
31
31
|
const specs = [
|
|
32
32
|
{
|
|
33
|
-
measurementTypeKey:
|
|
33
|
+
measurementTypeKey: MeasurementTypes_1.MeasurementTypeKey.bloodGlucose,
|
|
34
34
|
measurementTypeName: "blood glucose",
|
|
35
|
-
metadata: { primaryCode:
|
|
35
|
+
metadata: { primaryCode: MeasurementTypes_1.ObservationCode.BLOOD_GLUCOSE, display: "Blood Glucose", unit: "mg/dL", valueKey: "bloodGlucose", toFixed: 1 },
|
|
36
36
|
fromRecord: (record) => record.level.inMilligramsPerDeciliter,
|
|
37
37
|
},
|
|
38
38
|
{
|
|
39
|
-
measurementTypeKey:
|
|
39
|
+
measurementTypeKey: MeasurementTypes_1.MeasurementTypeKey.temperature,
|
|
40
40
|
measurementTypeName: "body temperature",
|
|
41
|
-
metadata: { primaryCode:
|
|
41
|
+
metadata: { primaryCode: MeasurementTypes_1.ObservationCode.BODY_TEMPERATURE, display: "Body Temperature", unit: "°C", valueKey: "bodyTemp", toFixed: 2 },
|
|
42
42
|
fromRecord: (record) => record.temperature.inCelsius,
|
|
43
43
|
},
|
|
44
44
|
{
|
|
45
|
-
measurementTypeKey:
|
|
45
|
+
measurementTypeKey: MeasurementTypes_1.MeasurementTypeKey.bodyWeight,
|
|
46
46
|
measurementTypeName: "body weight",
|
|
47
|
-
metadata: { primaryCode:
|
|
47
|
+
metadata: { primaryCode: MeasurementTypes_1.ObservationCode.BODY_WEIGHT, display: "Body Weight", unit: "kg", valueKey: "bodyWeight", toFixed: 2 },
|
|
48
48
|
fromRecord: (record) => record.weight.inKilograms,
|
|
49
49
|
},
|
|
50
50
|
{
|
|
51
|
-
measurementTypeKey:
|
|
51
|
+
measurementTypeKey: MeasurementTypes_1.MeasurementTypeKey.heartRateVariability,
|
|
52
52
|
measurementTypeName: "heart rate variability",
|
|
53
|
-
metadata: { primaryCode:
|
|
53
|
+
metadata: { primaryCode: MeasurementTypes_1.ObservationCode.HEART_RATE_VARIABILITY, display: "Heart Rate Variability", unit: "ms", valueKey: "heartRateVariability", toFixed: 1 },
|
|
54
54
|
sampleType: "HKQuantityTypeIdentifierHeartRateVariabilitySDNN",
|
|
55
55
|
fromRecord: (record) => record.heartRateVariabilityMillis,
|
|
56
56
|
},
|
|
57
57
|
{
|
|
58
|
-
measurementTypeKey:
|
|
58
|
+
measurementTypeKey: MeasurementTypes_1.MeasurementTypeKey.heartRate,
|
|
59
59
|
measurementTypeName: "heart rate",
|
|
60
|
-
metadata: { primaryCode:
|
|
60
|
+
metadata: { primaryCode: MeasurementTypes_1.ObservationCode.HEART_RATE, display: "Heart Rate", unit: "bpm", valueKey: "heartRate", toFixed: 0 },
|
|
61
61
|
sampleType: "HKQuantityTypeIdentifierHeartRate",
|
|
62
62
|
fromRecord: (record) => { var _a, _b; return (_b = (_a = record.samples) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.beatsPerMinute; },
|
|
63
63
|
},
|
|
64
64
|
{
|
|
65
|
-
measurementTypeKey:
|
|
65
|
+
measurementTypeKey: MeasurementTypes_1.MeasurementTypeKey.respiratoryRate,
|
|
66
66
|
measurementTypeName: "respiratory rate",
|
|
67
|
-
metadata: { primaryCode:
|
|
67
|
+
metadata: { primaryCode: MeasurementTypes_1.ObservationCode.RESPIRATORY_RATE, display: "Respiratory Rate", unit: "breaths/min", valueKey: "respiratoryRate", toFixed: 1 },
|
|
68
68
|
sampleType: "HKQuantityTypeIdentifierRespiratoryRate",
|
|
69
69
|
fromRecord: (record) => record.rate,
|
|
70
70
|
},
|
|
71
71
|
{
|
|
72
|
-
measurementTypeKey:
|
|
72
|
+
measurementTypeKey: MeasurementTypes_1.MeasurementTypeKey.restingHeartRate,
|
|
73
73
|
measurementTypeName: "resting heart rate",
|
|
74
|
-
metadata: { primaryCode:
|
|
74
|
+
metadata: { primaryCode: MeasurementTypes_1.ObservationCode.RESTING_HEART_RATE, display: "Resting Heart Rate", unit: "bpm", valueKey: "restingHeartRate", toFixed: 0 },
|
|
75
75
|
sampleType: "HKQuantityTypeIdentifierRestingHeartRate",
|
|
76
76
|
fromRecord: (record) => record.beatsPerMinute,
|
|
77
77
|
},
|
|
78
78
|
{
|
|
79
|
-
measurementTypeKey:
|
|
79
|
+
measurementTypeKey: MeasurementTypes_1.MeasurementTypeKey.vo2Max,
|
|
80
80
|
measurementTypeName: "VO2 max",
|
|
81
|
-
metadata: { primaryCode:
|
|
81
|
+
metadata: { primaryCode: MeasurementTypes_1.ObservationCode.VO2_MAX, display: "VO2 Max", unit: "mL/kg/min", valueKey: "vo2Max", toFixed: 1 },
|
|
82
82
|
sampleType: "HKQuantityTypeIdentifierVO2Max",
|
|
83
83
|
fromRecord: (record) => record.vo2MillilitersPerMinuteKilogram,
|
|
84
84
|
},
|
|
85
85
|
{
|
|
86
|
-
measurementTypeKey:
|
|
86
|
+
measurementTypeKey: MeasurementTypes_1.MeasurementTypeKey.walkingHeartRateAverage,
|
|
87
87
|
measurementTypeName: "walking heart rate average",
|
|
88
|
-
metadata: { primaryCode:
|
|
88
|
+
metadata: { primaryCode: MeasurementTypes_1.ObservationCode.WALKING_HEART_RATE_AVERAGE, display: "Walking Heart Rate Average", unit: "bpm", valueKey: "walkingHeartRateAverage", toFixed: 0 },
|
|
89
89
|
sampleType: "HKQuantityTypeIdentifierWalkingHeartRateAverage",
|
|
90
90
|
// Health Connect has no walking-heart-rate-average record.
|
|
91
91
|
fromRecord: () => 0,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Observation } from "@medplum/fhirtypes";
|
|
2
|
-
import { Measurement, MeasurementTypeKey } from "../../../types";
|
|
2
|
+
import { Measurement, MeasurementTypeKey } from "../../../types/MeasurementTypes";
|
|
3
3
|
import { RecordResult, RecordType } from "../types/generate-measurement/HealthConnectTypes";
|
|
4
4
|
import { Sample } from "../types/generate-measurement/Sample";
|
|
5
5
|
import { StepCountMeasurement } from "../types/measurement/StepCountMeasurement";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.StepCountService = void 0;
|
|
4
|
-
const
|
|
4
|
+
const MeasurementTypes_1 = require("../../../types/MeasurementTypes");
|
|
5
5
|
const base_observation_service_1 = require("./base-observation-service");
|
|
6
6
|
class StepCountService extends base_observation_service_1.BaseObservationService {
|
|
7
7
|
constructor() {
|
|
8
8
|
super(...arguments);
|
|
9
|
-
this.measurementTypeKey =
|
|
9
|
+
this.measurementTypeKey = MeasurementTypes_1.MeasurementTypeKey.stepCount;
|
|
10
10
|
this.measurementTypeName = "step count";
|
|
11
11
|
this.observationMetadata = [
|
|
12
12
|
{
|
|
13
|
-
primaryCode:
|
|
13
|
+
primaryCode: MeasurementTypes_1.ObservationCode.STEPS,
|
|
14
14
|
additionalCodes: [],
|
|
15
15
|
display: "Step Count",
|
|
16
16
|
unit: "steps",
|
|
@@ -41,14 +41,14 @@ class StepCountService extends base_observation_service_1.BaseObservationService
|
|
|
41
41
|
convertSamplesToMeasurement(samples) {
|
|
42
42
|
return {
|
|
43
43
|
stepCount: samples[0].quantity,
|
|
44
|
-
measurementTypeKey:
|
|
44
|
+
measurementTypeKey: MeasurementTypes_1.MeasurementTypeKey.stepCount,
|
|
45
45
|
};
|
|
46
46
|
}
|
|
47
47
|
convertRecordToMeasurement(record) {
|
|
48
48
|
const stepCountRecord = record;
|
|
49
49
|
return {
|
|
50
50
|
stepCount: stepCountRecord.count,
|
|
51
|
-
measurementTypeKey:
|
|
51
|
+
measurementTypeKey: MeasurementTypes_1.MeasurementTypeKey.stepCount,
|
|
52
52
|
};
|
|
53
53
|
}
|
|
54
54
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Observation } from "@medplum/fhirtypes";
|
|
2
|
-
import { Measurement, MeasurementTypeKey, Sample, UrineAnalyzeMeasurement } from "../../../types";
|
|
2
|
+
import { Measurement, MeasurementTypeKey, Sample, UrineAnalyzeMeasurement } from "../../../types/MeasurementTypes";
|
|
3
3
|
import { RecordResult, RecordType } from "../types/generate-measurement/HealthConnectTypes";
|
|
4
4
|
import { ObservationFragment } from "../types/generate-observation-body/ObservationFragment";
|
|
5
5
|
import { ObservationValue } from "../types/generate-observation-body/ObservationValue";
|
|
@@ -2,18 +2,18 @@
|
|
|
2
2
|
/* eslint-disable max-lines */
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.UricAcidService = void 0;
|
|
5
|
-
const
|
|
5
|
+
const MeasurementTypes_1 = require("../../../types/MeasurementTypes");
|
|
6
6
|
const fhir_systems_1 = require("../fhir-systems");
|
|
7
7
|
const base_observation_service_1 = require("./base-observation-service");
|
|
8
8
|
const measurement_time_1 = require("./measurement-time");
|
|
9
9
|
class UricAcidService extends base_observation_service_1.BaseObservationService {
|
|
10
10
|
constructor() {
|
|
11
11
|
super(...arguments);
|
|
12
|
-
this.measurementTypeKey =
|
|
12
|
+
this.measurementTypeKey = MeasurementTypes_1.MeasurementTypeKey.uricAcid;
|
|
13
13
|
this.measurementTypeName = "uric acid";
|
|
14
14
|
this.observationMetadata = [
|
|
15
15
|
{
|
|
16
|
-
primaryCode:
|
|
16
|
+
primaryCode: MeasurementTypes_1.ObservationCode.URIC_ACID,
|
|
17
17
|
additionalCodes: [],
|
|
18
18
|
display: "URINE",
|
|
19
19
|
unit: "problems",
|
|
@@ -23,8 +23,8 @@ class UricAcidService extends base_observation_service_1.BaseObservationService
|
|
|
23
23
|
];
|
|
24
24
|
}
|
|
25
25
|
getCastedMeasurement(measurement) {
|
|
26
|
-
if (measurement.measurementTypeKey !==
|
|
27
|
-
measurement.measurementTypeKey !==
|
|
26
|
+
if (measurement.measurementTypeKey !== MeasurementTypes_1.MeasurementTypeKey.urineAnalysis &&
|
|
27
|
+
measurement.measurementTypeKey !== MeasurementTypes_1.MeasurementTypeKey.uricAcid) {
|
|
28
28
|
throw new Error("Measurement is not a uric acid measurement");
|
|
29
29
|
}
|
|
30
30
|
return measurement;
|
|
@@ -37,7 +37,7 @@ class UricAcidService extends base_observation_service_1.BaseObservationService
|
|
|
37
37
|
valueQuantity: {
|
|
38
38
|
value: problemCount,
|
|
39
39
|
unit: "problems",
|
|
40
|
-
code:
|
|
40
|
+
code: MeasurementTypes_1.ObservationCode.URIC_ACID,
|
|
41
41
|
system: fhir_systems_1.LOINC_SYSTEM,
|
|
42
42
|
},
|
|
43
43
|
});
|
|
@@ -66,7 +66,7 @@ class UricAcidService extends base_observation_service_1.BaseObservationService
|
|
|
66
66
|
generateObservationFragments(measurement) {
|
|
67
67
|
const castedMeasurement = this.getCastedMeasurement(measurement);
|
|
68
68
|
const effectiveDateTime = (0, measurement_time_1.recordedAtOrNow)(castedMeasurement).toISOString();
|
|
69
|
-
return
|
|
69
|
+
return MeasurementTypes_1.URINE_ANALYTE_DEFINITIONS.flatMap((analyte) => {
|
|
70
70
|
const value = castedMeasurement[analyte.key];
|
|
71
71
|
if (value === undefined || value === null || !Number.isFinite(value)) {
|
|
72
72
|
return [];
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { IClientStorage } from "@medplum/core";
|
|
2
1
|
import { Bundle, BundleEntry, Observation } from "@medplum/fhirtypes";
|
|
3
|
-
import type { MedplumRequestOptions } from "@medplum/core";
|
|
2
|
+
import type { IClientStorage, MedplumRequestOptions } from "@medplum/core";
|
|
4
3
|
export declare const OFFLINE_MEASUREMENT_QUEUE_STORAGE_KEY = "ovok.core.offline-measurements";
|
|
5
4
|
declare const IDENTIFIER_SYSTEM = "https://api.ovok.com/fhir/StructureDefinition/offline-measurement-id";
|
|
6
5
|
export type OfflineMeasurementQueueOptions = {
|
|
@@ -1,22 +1,15 @@
|
|
|
1
|
+
import type { NotificationNote, NotificationNotes, UpdateNotificationNote } from "../notifications/types";
|
|
1
2
|
import type { MedplumRequestOptions } from "@medplum/core";
|
|
2
|
-
import { NotificationNote, NotificationNotes, UpdateNotificationNote } from "../notifications/types";
|
|
3
3
|
import { OvokClient } from "../ovok-client";
|
|
4
|
-
import { EnableSignalsResponse,
|
|
4
|
+
import { EnableSignalsResponse, RepushUnconfirmedLimitsResult, UnconfirmedLimits } from "./types";
|
|
5
5
|
/**
|
|
6
6
|
* Enables Signals for an existing patient. The operation is idempotent; retry after 409 or 503.
|
|
7
7
|
* Observations saved through Ovok are forwarded by the backend, so callers should not submit
|
|
8
8
|
* the same readings to Signals separately.
|
|
9
9
|
*/
|
|
10
10
|
export declare function enableSignalsForPatient(this: OvokClient, patientId: string, requestOptions?: MedplumRequestOptions): Promise<EnableSignalsResponse>;
|
|
11
|
-
export declare function getSignalsThresholds(this: OvokClient, patientId: string, requestOptions?: MedplumRequestOptions): Promise<SignalsThresholds>;
|
|
12
11
|
export declare function listUnconfirmedLimits(this: OvokClient, requestOptions?: MedplumRequestOptions): Promise<UnconfirmedLimits>;
|
|
13
12
|
export declare function repushUnconfirmedLimits(this: OvokClient, requestOptions?: MedplumRequestOptions): Promise<RepushUnconfirmedLimitsResult>;
|
|
14
|
-
export declare function setSignalsThreshold(this: OvokClient, patientId: string, code: string, body: SetSignalsThresholdBody, requestOptions?: MedplumRequestOptions): Promise<SignalsThreshold>;
|
|
15
|
-
export declare function removeSignalsThreshold(this: OvokClient, patientId: string, code: string, reason: string, requestOptions?: MedplumRequestOptions): Promise<void>;
|
|
16
|
-
export declare function serializeSignalsAlertsQuery(query?: SignalsAlertsQuery | SignalsRawAlertsQuery, keys?: readonly string[]): string;
|
|
17
|
-
export declare function listSignalsAlerts(this: OvokClient, query?: SignalsAlertsQuery, requestOptions?: MedplumRequestOptions): Promise<SignalsAlertsPage>;
|
|
18
|
-
export declare function getSignalsAlert(this: OvokClient, episodeId: string, requestOptions?: MedplumRequestOptions): Promise<SignalsAlert>;
|
|
19
|
-
export declare function acknowledgeSignalsAlert(this: OvokClient, episodeId: string, requestOptions?: MedplumRequestOptions): Promise<SignalsAlert>;
|
|
20
13
|
export declare function listSignalsAlertNotes(this: OvokClient, episodeId: string, requestOptions?: MedplumRequestOptions): Promise<NotificationNotes>;
|
|
21
14
|
export declare function createSignalsAlertNote(this: OvokClient, episodeId: string, body: {
|
|
22
15
|
text: string;
|
|
@@ -28,17 +21,3 @@ export declare function createSignalsRawAlertNote(this: OvokClient, alertId: str
|
|
|
28
21
|
export declare function updateSignalsNote(this: OvokClient, noteId: string, body: UpdateNotificationNote, requestOptions?: MedplumRequestOptions): Promise<NotificationNote>;
|
|
29
22
|
export declare function patchSignalsNote(this: OvokClient, noteId: string, body: UpdateNotificationNote, requestOptions?: MedplumRequestOptions): Promise<NotificationNote>;
|
|
30
23
|
export declare function deleteSignalsNote(this: OvokClient, noteId: string, requestOptions?: MedplumRequestOptions): Promise<void>;
|
|
31
|
-
/**
|
|
32
|
-
* The project's individual Signals alerts, not episodes: works whether or not the project's
|
|
33
|
-
* `episodicAlerts` is on. `acknowledged: false` lists what is still open for the practitioner.
|
|
34
|
-
*/
|
|
35
|
-
export declare function listSignalsRawAlerts(this: OvokClient, query?: SignalsRawAlertsQuery, requestOptions?: MedplumRequestOptions): Promise<SignalsRawAlertsPage>;
|
|
36
|
-
export declare function getSignalsRawAlert(this: OvokClient, alertId: string, requestOptions?: MedplumRequestOptions): Promise<SignalsRawAlert>;
|
|
37
|
-
/**
|
|
38
|
-
* Acknowledges one alert: it resolves, and `acknowledgedAt` and `acknowledgedActor` record when
|
|
39
|
-
* and by whom. Idempotent: an acknowledged alert keeps its first acknowledgement. Needs
|
|
40
|
-
* `signals_alerts:update` and update access to the resident.
|
|
41
|
-
*/
|
|
42
|
-
export declare function acknowledgeSignalsRawAlert(this: OvokClient, alertId: string, requestOptions?: MedplumRequestOptions): Promise<SignalsRawAlert>;
|
|
43
|
-
export declare function getSignalsSettings(this: OvokClient, requestOptions?: MedplumRequestOptions): Promise<SignalsSettingsResponse>;
|
|
44
|
-
export declare function updateSignalsSettings(this: OvokClient, patch: SignalsSettingsPatch, reason?: string | null, requestOptions?: MedplumRequestOptions): Promise<SignalsSettingsResponse>;
|
|
@@ -1,15 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.enableSignalsForPatient = enableSignalsForPatient;
|
|
4
|
-
exports.getSignalsThresholds = getSignalsThresholds;
|
|
5
4
|
exports.listUnconfirmedLimits = listUnconfirmedLimits;
|
|
6
5
|
exports.repushUnconfirmedLimits = repushUnconfirmedLimits;
|
|
7
|
-
exports.setSignalsThreshold = setSignalsThreshold;
|
|
8
|
-
exports.removeSignalsThreshold = removeSignalsThreshold;
|
|
9
|
-
exports.serializeSignalsAlertsQuery = serializeSignalsAlertsQuery;
|
|
10
|
-
exports.listSignalsAlerts = listSignalsAlerts;
|
|
11
|
-
exports.getSignalsAlert = getSignalsAlert;
|
|
12
|
-
exports.acknowledgeSignalsAlert = acknowledgeSignalsAlert;
|
|
13
6
|
exports.listSignalsAlertNotes = listSignalsAlertNotes;
|
|
14
7
|
exports.createSignalsAlertNote = createSignalsAlertNote;
|
|
15
8
|
exports.listSignalsRawAlertNotes = listSignalsRawAlertNotes;
|
|
@@ -17,11 +10,6 @@ exports.createSignalsRawAlertNote = createSignalsRawAlertNote;
|
|
|
17
10
|
exports.updateSignalsNote = updateSignalsNote;
|
|
18
11
|
exports.patchSignalsNote = patchSignalsNote;
|
|
19
12
|
exports.deleteSignalsNote = deleteSignalsNote;
|
|
20
|
-
exports.listSignalsRawAlerts = listSignalsRawAlerts;
|
|
21
|
-
exports.getSignalsRawAlert = getSignalsRawAlert;
|
|
22
|
-
exports.acknowledgeSignalsRawAlert = acknowledgeSignalsRawAlert;
|
|
23
|
-
exports.getSignalsSettings = getSignalsSettings;
|
|
24
|
-
exports.updateSignalsSettings = updateSignalsSettings;
|
|
25
13
|
const request_options_1 = require("../request-options");
|
|
26
14
|
/**
|
|
27
15
|
* Enables Signals for an existing patient. The operation is idempotent; retry after 409 or 503.
|
|
@@ -31,101 +19,30 @@ const request_options_1 = require("../request-options");
|
|
|
31
19
|
function enableSignalsForPatient(patientId, requestOptions) {
|
|
32
20
|
return this.post(`/fhir/Patient/${encodeURIComponent(patientId)}/$enable-signals`, undefined, undefined, requestOptions);
|
|
33
21
|
}
|
|
34
|
-
function getSignalsThresholds(patientId, requestOptions) {
|
|
35
|
-
return this.get(`/v1/signals/patients/${encodeURIComponent(patientId)}/thresholds`, ...(0, request_options_1.optionalArg)(requestOptions));
|
|
36
|
-
}
|
|
37
22
|
function listUnconfirmedLimits(requestOptions) {
|
|
38
|
-
return this.get("/signals/config/
|
|
23
|
+
return this.get("/signals/config/undeliverable", ...(0, request_options_1.optionalArg)(requestOptions));
|
|
39
24
|
}
|
|
40
25
|
function repushUnconfirmedLimits(requestOptions) {
|
|
41
|
-
return this.post("/signals/config/
|
|
42
|
-
}
|
|
43
|
-
function setSignalsThreshold(patientId, code, body, requestOptions) {
|
|
44
|
-
return this.put(`/v1/signals/patients/${encodeURIComponent(patientId)}/thresholds/${encodeURIComponent(code)}`, body, undefined, requestOptions);
|
|
45
|
-
}
|
|
46
|
-
function removeSignalsThreshold(patientId, code, reason, requestOptions) {
|
|
47
|
-
return this.delete(`/v1/signals/patients/${encodeURIComponent(patientId)}/thresholds/${encodeURIComponent(code)}?reason=${encodeURIComponent(reason)}`, ...(0, request_options_1.optionalArg)(requestOptions));
|
|
48
|
-
}
|
|
49
|
-
// Each route's own filters, in the order they are sent: a key outside the list is never sent, so
|
|
50
|
-
// a wider object passed as an episode query can't turn into a refused request.
|
|
51
|
-
const EPISODE_QUERY_KEYS = ["status", "since", "acknowledged", "codes", "limit", "cursor"];
|
|
52
|
-
const RAW_ALERT_QUERY_KEYS = [
|
|
53
|
-
"status",
|
|
54
|
-
"patientId",
|
|
55
|
-
"since",
|
|
56
|
-
"until",
|
|
57
|
-
"acknowledged",
|
|
58
|
-
"codes",
|
|
59
|
-
"limit",
|
|
60
|
-
"cursor",
|
|
61
|
-
];
|
|
62
|
-
function serializeSignalsAlertsQuery(query = {}, keys = EPISODE_QUERY_KEYS) {
|
|
63
|
-
const values = query;
|
|
64
|
-
return keys
|
|
65
|
-
.filter((key) => values[key] !== undefined)
|
|
66
|
-
.map((key) => {
|
|
67
|
-
const value = values[key];
|
|
68
|
-
const text = Array.isArray(value) ? value.join(",") : String(value);
|
|
69
|
-
return `${encodeURIComponent(key)}=${encodeURIComponent(text)}`;
|
|
70
|
-
})
|
|
71
|
-
.join("&");
|
|
72
|
-
}
|
|
73
|
-
function listSignalsAlerts(query = {}, requestOptions) {
|
|
74
|
-
const serialized = serializeSignalsAlertsQuery(query);
|
|
75
|
-
return this.get(`/v1/signals/alerts${serialized ? `?${serialized}` : ""}`, { cache: "reload", ...requestOptions });
|
|
76
|
-
}
|
|
77
|
-
function getSignalsAlert(episodeId, requestOptions) {
|
|
78
|
-
return this.get(`/v1/signals/alerts/${encodeURIComponent(episodeId)}`, { cache: "reload", ...requestOptions });
|
|
79
|
-
}
|
|
80
|
-
function acknowledgeSignalsAlert(episodeId, requestOptions) {
|
|
81
|
-
return this.post(`/v1/signals/alerts/${encodeURIComponent(episodeId)}/ack`, undefined, undefined, requestOptions);
|
|
26
|
+
return this.post("/signals/config/undeliverable/repair", {}, undefined, requestOptions);
|
|
82
27
|
}
|
|
83
28
|
function listSignalsAlertNotes(episodeId, requestOptions) {
|
|
84
|
-
return this.
|
|
29
|
+
return this.listNotificationNotes("alarm", episodeId, requestOptions);
|
|
85
30
|
}
|
|
86
31
|
function createSignalsAlertNote(episodeId, body, requestOptions) {
|
|
87
|
-
return this.
|
|
32
|
+
return this.createNotificationNote({ kind: "alarm", id: episodeId, text: body.text }, requestOptions);
|
|
88
33
|
}
|
|
89
34
|
function listSignalsRawAlertNotes(alertId, requestOptions) {
|
|
90
|
-
return this.
|
|
35
|
+
return this.listNotificationNotes("alert", alertId, requestOptions);
|
|
91
36
|
}
|
|
92
37
|
function createSignalsRawAlertNote(alertId, body, requestOptions) {
|
|
93
|
-
return this.
|
|
38
|
+
return this.createNotificationNote({ kind: "alert", id: alertId, text: body.text }, requestOptions);
|
|
94
39
|
}
|
|
95
40
|
function updateSignalsNote(noteId, body, requestOptions) {
|
|
96
|
-
return this.
|
|
41
|
+
return this.updateNotificationNote(noteId, body, requestOptions);
|
|
97
42
|
}
|
|
98
43
|
function patchSignalsNote(noteId, body, requestOptions) {
|
|
99
|
-
return this.
|
|
100
|
-
}
|
|
101
|
-
async function deleteSignalsNote(noteId, requestOptions) {
|
|
102
|
-
await this.delete(`/v1/signals/notes/${encodeURIComponent(noteId)}`, ...(0, request_options_1.optionalArg)(requestOptions));
|
|
103
|
-
}
|
|
104
|
-
/**
|
|
105
|
-
* The project's individual Signals alerts, not episodes: works whether or not the project's
|
|
106
|
-
* `episodicAlerts` is on. `acknowledged: false` lists what is still open for the practitioner.
|
|
107
|
-
*/
|
|
108
|
-
function listSignalsRawAlerts(query = {}, requestOptions) {
|
|
109
|
-
const serialized = serializeSignalsAlertsQuery(query, RAW_ALERT_QUERY_KEYS);
|
|
110
|
-
return this.get(`/v1/signals/raw-alerts${serialized ? `?${serialized}` : ""}`, { cache: "reload", ...requestOptions });
|
|
111
|
-
}
|
|
112
|
-
function getSignalsRawAlert(alertId, requestOptions) {
|
|
113
|
-
return this.get(`/v1/signals/raw-alerts/${encodeURIComponent(alertId)}`, { cache: "reload", ...requestOptions });
|
|
114
|
-
}
|
|
115
|
-
/**
|
|
116
|
-
* Acknowledges one alert: it resolves, and `acknowledgedAt` and `acknowledgedActor` record when
|
|
117
|
-
* and by whom. Idempotent: an acknowledged alert keeps its first acknowledgement. Needs
|
|
118
|
-
* `signals_alerts:update` and update access to the resident.
|
|
119
|
-
*/
|
|
120
|
-
function acknowledgeSignalsRawAlert(alertId, requestOptions) {
|
|
121
|
-
return this.post(`/v1/signals/raw-alerts/${encodeURIComponent(alertId)}/ack`, undefined, undefined, requestOptions);
|
|
122
|
-
}
|
|
123
|
-
function getSignalsSettings(requestOptions) {
|
|
124
|
-
return this.get("/v1/signals/settings", ...(0, request_options_1.optionalArg)(requestOptions));
|
|
44
|
+
return this.patchNotificationNote(noteId, body, requestOptions);
|
|
125
45
|
}
|
|
126
|
-
function
|
|
127
|
-
return this.
|
|
128
|
-
...patch,
|
|
129
|
-
...(reason !== undefined ? { reason } : {}),
|
|
130
|
-
}, ...(0, request_options_1.optionalArg)(requestOptions));
|
|
46
|
+
function deleteSignalsNote(noteId, requestOptions) {
|
|
47
|
+
return this.deleteNotificationNote(noteId, requestOptions);
|
|
131
48
|
}
|