@ovok/core 0.2.47
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 +40 -0
- package/dist/client/ai-fhir/methods/AIFhirResources.d.ts +14 -0
- package/dist/client/ai-fhir/methods/AIFhirResources.js +16 -0
- package/dist/client/ai-fhir/methods/index.d.ts +1 -0
- package/dist/client/ai-fhir/methods/index.js +17 -0
- package/dist/client/ai-fhir/types/AIFhirPlan.d.ts +6 -0
- package/dist/client/ai-fhir/types/AIFhirPlan.js +2 -0
- package/dist/client/ai-fhir/types/AIFhirPlanRequest.d.ts +5 -0
- package/dist/client/ai-fhir/types/AIFhirPlanRequest.js +2 -0
- package/dist/client/ai-fhir/types/AIFhirRequest.d.ts +7 -0
- package/dist/client/ai-fhir/types/AIFhirRequest.js +2 -0
- package/dist/client/ai-fhir/types/AIFhirResponse.d.ts +18 -0
- package/dist/client/ai-fhir/types/AIFhirResponse.js +2 -0
- package/dist/client/ai-fhir/types/index.d.ts +4 -0
- package/dist/client/ai-fhir/types/index.js +20 -0
- package/dist/client/auth/methods/appleLogin.d.ts +4 -0
- package/dist/client/auth/methods/appleLogin.js +11 -0
- package/dist/client/auth/methods/changePassword.d.ts +4 -0
- package/dist/client/auth/methods/changePassword.js +6 -0
- package/dist/client/auth/methods/googleLogin.d.ts +4 -0
- package/dist/client/auth/methods/googleLogin.js +11 -0
- package/dist/client/auth/methods/index.d.ts +8 -0
- package/dist/client/auth/methods/index.js +24 -0
- package/dist/client/auth/methods/login.d.ts +4 -0
- package/dist/client/auth/methods/login.js +38 -0
- package/dist/client/auth/methods/refetchProfile.d.ts +2 -0
- package/dist/client/auth/methods/refetchProfile.js +9 -0
- package/dist/client/auth/methods/register.d.ts +4 -0
- package/dist/client/auth/methods/register.js +15 -0
- package/dist/client/auth/methods/requestDeleteUser.d.ts +11 -0
- package/dist/client/auth/methods/requestDeleteUser.js +13 -0
- package/dist/client/auth/methods/resetPassword.d.ts +13 -0
- package/dist/client/auth/methods/resetPassword.js +19 -0
- package/dist/client/auth/types/AppleLoginBody.d.ts +68 -0
- package/dist/client/auth/types/AppleLoginBody.js +17 -0
- package/dist/client/auth/types/AuthResponse.d.ts +15 -0
- package/dist/client/auth/types/AuthResponse.js +2 -0
- package/dist/client/auth/types/ChangePasswordBody.d.ts +5 -0
- package/dist/client/auth/types/ChangePasswordBody.js +2 -0
- package/dist/client/auth/types/GoogleLoginBody.d.ts +26 -0
- package/dist/client/auth/types/GoogleLoginBody.js +2 -0
- package/dist/client/auth/types/LoginBody.d.ts +26 -0
- package/dist/client/auth/types/LoginBody.js +2 -0
- package/dist/client/auth/types/RegisterBody.d.ts +8 -0
- package/dist/client/auth/types/RegisterBody.js +2 -0
- package/dist/client/auth/types/RequestDeleteUserBody.d.ts +11 -0
- package/dist/client/auth/types/RequestDeleteUserBody.js +2 -0
- package/dist/client/auth/types/RequestDeleteUserResponse.d.ts +12 -0
- package/dist/client/auth/types/RequestDeleteUserResponse.js +2 -0
- package/dist/client/auth/types/ResetPasswordBody.d.ts +14 -0
- package/dist/client/auth/types/ResetPasswordBody.js +2 -0
- package/dist/client/auth/types/StartLoginResponse.d.ts +34 -0
- package/dist/client/auth/types/StartLoginResponse.js +2 -0
- package/dist/client/bot/methods/executeBot.d.ts +10 -0
- package/dist/client/bot/methods/executeBot.js +14 -0
- package/dist/client/bot/methods/index.d.ts +1 -0
- package/dist/client/bot/methods/index.js +17 -0
- package/dist/client/chat/ai/methods/createAiSession.d.ts +4 -0
- package/dist/client/chat/ai/methods/createAiSession.js +17 -0
- package/dist/client/chat/ai/methods/index.d.ts +1 -0
- package/dist/client/chat/ai/methods/index.js +17 -0
- package/dist/client/chat/ai/types/CreateAiSessionProps.d.ts +51 -0
- package/dist/client/chat/ai/types/CreateAiSessionProps.js +2 -0
- package/dist/client/chat/ai/types/CreateAiSessionResponse.d.ts +21 -0
- package/dist/client/chat/ai/types/CreateAiSessionResponse.js +2 -0
- package/dist/client/chat/ai/types/SessionMessagesResponse.d.ts +9 -0
- package/dist/client/chat/ai/types/SessionMessagesResponse.js +2 -0
- package/dist/client/observation/methods/generateObservationBodiesByMeasurement.d.ts +4 -0
- package/dist/client/observation/methods/generateObservationBodiesByMeasurement.js +40 -0
- package/dist/client/observation/methods/getLatestObservationsByCodes.d.ts +4 -0
- package/dist/client/observation/methods/getLatestObservationsByCodes.js +19 -0
- package/dist/client/observation/methods/index.d.ts +2 -0
- package/dist/client/observation/methods/index.js +18 -0
- package/dist/client/observation/services/base-observation-service.d.ts +22 -0
- package/dist/client/observation/services/base-observation-service.js +70 -0
- package/dist/client/observation/services/blood-glucose.d.ts +12 -0
- package/dist/client/observation/services/blood-glucose.js +36 -0
- package/dist/client/observation/services/blood-oxygen.d.ts +14 -0
- package/dist/client/observation/services/blood-oxygen.js +57 -0
- package/dist/client/observation/services/blood-pressure.d.ts +15 -0
- package/dist/client/observation/services/blood-pressure.js +72 -0
- package/dist/client/observation/services/body-temperature.d.ts +13 -0
- package/dist/client/observation/services/body-temperature.js +36 -0
- package/dist/client/observation/services/body-weight.d.ts +13 -0
- package/dist/client/observation/services/body-weight.js +36 -0
- package/dist/client/observation/services/creator.d.ts +10 -0
- package/dist/client/observation/services/creator.js +54 -0
- package/dist/client/observation/services/ecg.d.ts +16 -0
- package/dist/client/observation/services/ecg.js +110 -0
- package/dist/client/observation/services/heart-rate-variability.d.ts +13 -0
- package/dist/client/observation/services/heart-rate-variability.js +38 -0
- package/dist/client/observation/services/heart-rate.d.ts +13 -0
- package/dist/client/observation/services/heart-rate.js +39 -0
- package/dist/client/observation/services/index.d.ts +1 -0
- package/dist/client/observation/services/index.js +17 -0
- package/dist/client/observation/services/respiratory-rate.d.ts +13 -0
- package/dist/client/observation/services/respiratory-rate.js +38 -0
- package/dist/client/observation/services/resting-heart-rate.d.ts +13 -0
- package/dist/client/observation/services/resting-heart-rate.js +38 -0
- package/dist/client/observation/services/step-count.d.ts +15 -0
- package/dist/client/observation/services/step-count.js +55 -0
- package/dist/client/observation/services/uric-acid-service.d.ts +21 -0
- package/dist/client/observation/services/uric-acid-service.js +120 -0
- package/dist/client/observation/services/vo2-max.d.ts +13 -0
- package/dist/client/observation/services/vo2-max.js +38 -0
- package/dist/client/observation/services/walking-heart-rate-average.d.ts +12 -0
- package/dist/client/observation/services/walking-heart-rate-average.js +38 -0
- package/dist/client/observation/types/GetLatestObservationsByCodeParams.d.ts +9 -0
- package/dist/client/observation/types/GetLatestObservationsByCodeParams.js +2 -0
- package/dist/client/observation/types/IObservationService.d.ts +15 -0
- package/dist/client/observation/types/IObservationService.js +2 -0
- package/dist/client/observation/types/MeasurementTypeKey.d.ts +20 -0
- package/dist/client/observation/types/MeasurementTypeKey.js +24 -0
- package/dist/client/observation/types/ObservationCode.d.ts +37 -0
- package/dist/client/observation/types/ObservationCode.js +41 -0
- package/dist/client/observation/types/generate-measurement/HealthConnectTypes.d.ts +641 -0
- package/dist/client/observation/types/generate-measurement/HealthConnectTypes.js +45 -0
- package/dist/client/observation/types/generate-measurement/Sample.d.ts +32 -0
- package/dist/client/observation/types/generate-measurement/Sample.js +2 -0
- package/dist/client/observation/types/generate-observation-body/BodyWeightValueParams.d.ts +1 -0
- package/dist/client/observation/types/generate-observation-body/BodyWeightValueParams.js +2 -0
- package/dist/client/observation/types/generate-observation-body/GenerateObservationBodyParams.d.ts +7 -0
- package/dist/client/observation/types/generate-observation-body/GenerateObservationBodyParams.js +2 -0
- package/dist/client/observation/types/generate-observation-body/ObservationValue.d.ts +14 -0
- package/dist/client/observation/types/generate-observation-body/ObservationValue.js +2 -0
- package/dist/client/observation/types/measurement/BloodGlucoseMeasurement.d.ts +6 -0
- package/dist/client/observation/types/measurement/BloodGlucoseMeasurement.js +2 -0
- package/dist/client/observation/types/measurement/BloodPressureMeasurement.d.ts +10 -0
- package/dist/client/observation/types/measurement/BloodPressureMeasurement.js +2 -0
- package/dist/client/observation/types/measurement/BloodPressureStates.d.ts +7 -0
- package/dist/client/observation/types/measurement/BloodPressureStates.js +11 -0
- package/dist/client/observation/types/measurement/BodyTemperatureMeasurement.d.ts +6 -0
- package/dist/client/observation/types/measurement/BodyTemperatureMeasurement.js +2 -0
- package/dist/client/observation/types/measurement/BodyWeightMeasurmement.d.ts +7 -0
- package/dist/client/observation/types/measurement/BodyWeightMeasurmement.js +2 -0
- package/dist/client/observation/types/measurement/EcgDiagnosticFlag.d.ts +15 -0
- package/dist/client/observation/types/measurement/EcgDiagnosticFlag.js +19 -0
- package/dist/client/observation/types/measurement/EcgMeasurement.d.ts +13 -0
- package/dist/client/observation/types/measurement/EcgMeasurement.js +2 -0
- package/dist/client/observation/types/measurement/HeartRateMeasurement.d.ts +6 -0
- package/dist/client/observation/types/measurement/HeartRateMeasurement.js +2 -0
- package/dist/client/observation/types/measurement/HeartRateVariabilityMeasurement.d.ts +6 -0
- package/dist/client/observation/types/measurement/HeartRateVariabilityMeasurement.js +2 -0
- package/dist/client/observation/types/measurement/Measurement.d.ts +4 -0
- package/dist/client/observation/types/measurement/Measurement.js +2 -0
- package/dist/client/observation/types/measurement/MeasurementDevice.d.ts +7 -0
- package/dist/client/observation/types/measurement/MeasurementDevice.js +2 -0
- package/dist/client/observation/types/measurement/PulseOximeterMeasurement.d.ts +9 -0
- package/dist/client/observation/types/measurement/PulseOximeterMeasurement.js +2 -0
- package/dist/client/observation/types/measurement/RespiratoryRateMeasurement.d.ts +6 -0
- package/dist/client/observation/types/measurement/RespiratoryRateMeasurement.js +2 -0
- package/dist/client/observation/types/measurement/RestingHeartRateMeasurement.d.ts +6 -0
- package/dist/client/observation/types/measurement/RestingHeartRateMeasurement.js +2 -0
- package/dist/client/observation/types/measurement/SpirometryMeasurement.d.ts +21 -0
- package/dist/client/observation/types/measurement/SpirometryMeasurement.js +2 -0
- package/dist/client/observation/types/measurement/StepCountMeasurement.d.ts +8 -0
- package/dist/client/observation/types/measurement/StepCountMeasurement.js +2 -0
- package/dist/client/observation/types/measurement/UrineAnalyzeMeasurement.d.ts +23 -0
- package/dist/client/observation/types/measurement/UrineAnalyzeMeasurement.js +2 -0
- package/dist/client/observation/types/measurement/Vo2MaxMeasurement.d.ts +6 -0
- package/dist/client/observation/types/measurement/Vo2MaxMeasurement.js +2 -0
- package/dist/client/observation/types/measurement/WalkingHeartRateAverageMeasurement.d.ts +6 -0
- package/dist/client/observation/types/measurement/WalkingHeartRateAverageMeasurement.js +2 -0
- package/dist/client/observation/types/measurement/index.d.ts +11 -0
- package/dist/client/observation/types/measurement/index.js +27 -0
- package/dist/client/observation/types/service/ObservationMetadata.d.ts +8 -0
- package/dist/client/observation/types/service/ObservationMetadata.js +2 -0
- package/dist/client/observation/utils/getDeviceObject.d.ts +3 -0
- package/dist/client/observation/utils/getDeviceObject.js +34 -0
- package/dist/client/observation/utils/getObservationValueDisplay.d.ts +15 -0
- package/dist/client/observation/utils/getObservationValueDisplay.js +25 -0
- package/dist/client/observation/utils/index.d.ts +1 -0
- package/dist/client/observation/utils/index.js +17 -0
- package/dist/client/ovok-client.d.ts +35 -0
- package/dist/client/ovok-client.js +85 -0
- package/dist/client/questionnaire-response/methods/createQuestionnaireResponseWithObservations.d.ts +3 -0
- package/dist/client/questionnaire-response/methods/createQuestionnaireResponseWithObservations.js +28 -0
- package/dist/client/questionnaire-response/methods/index.d.ts +1 -0
- package/dist/client/questionnaire-response/methods/index.js +17 -0
- package/dist/hooks/index.d.ts +7 -0
- package/dist/hooks/index.js +58 -0
- package/dist/index.d.ts +666 -0
- package/dist/index.js +49 -0
- package/dist/types/ValidationError.d.ts +6 -0
- package/dist/types/ValidationError.js +2 -0
- package/dist/types/index.d.ts +17 -0
- package/dist/types/index.js +38 -0
- package/dist/utils/auth/exchange-code.d.ts +14 -0
- package/dist/utils/auth/exchange-code.js +17 -0
- package/dist/utils/auth/generate-code-challenge-and-verifier.d.ts +6 -0
- package/dist/utils/auth/generate-code-challenge-and-verifier.js +45 -0
- package/dist/utils/auth/handle-tenant-code.d.ts +6 -0
- package/dist/utils/auth/handle-tenant-code.js +21 -0
- package/dist/utils/auth/sha256.d.ts +8 -0
- package/dist/utils/auth/sha256.js +300 -0
- package/dist/utils/auth/start-login.d.ts +10 -0
- package/dist/utils/auth/start-login.js +19 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.js +18 -0
- package/dist/utils/patch/getPatchOperationType.d.ts +2 -0
- package/dist/utils/patch/getPatchOperationType.js +16 -0
- package/package.json +83 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export interface Sample {
|
|
2
|
+
device?: HKDevice | undefined;
|
|
3
|
+
quantity: number;
|
|
4
|
+
endDate: string;
|
|
5
|
+
startDate: string;
|
|
6
|
+
unit: string;
|
|
7
|
+
sourceRevision: {
|
|
8
|
+
operatingSystemVersion: string;
|
|
9
|
+
version: string;
|
|
10
|
+
productType: string;
|
|
11
|
+
source: {
|
|
12
|
+
bundleIdentifier: string;
|
|
13
|
+
name: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
uuid: string;
|
|
17
|
+
quantityType: string;
|
|
18
|
+
metadata: {
|
|
19
|
+
[key: string]: number | string;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
type HKDevice = {
|
|
23
|
+
readonly name: string;
|
|
24
|
+
readonly firmwareVersion: string | null;
|
|
25
|
+
readonly hardwareVersion: string;
|
|
26
|
+
readonly localIdentifier: string | null;
|
|
27
|
+
readonly manufacturer: string;
|
|
28
|
+
readonly model: string;
|
|
29
|
+
readonly softwareVersion: string;
|
|
30
|
+
readonly udiDeviceIdentifier: string | null;
|
|
31
|
+
};
|
|
32
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type BodyWeightValueParams = number;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { CodeableConcept, Period, Quantity, Range, Ratio, SampledData } from "@medplum/fhirtypes";
|
|
2
|
+
export type ObservationValue = {
|
|
3
|
+
valueQuantity: Quantity;
|
|
4
|
+
} | {
|
|
5
|
+
valueCodeableConcept: CodeableConcept;
|
|
6
|
+
} | {
|
|
7
|
+
valuePeriod: Period;
|
|
8
|
+
} | {
|
|
9
|
+
valueRange: Range;
|
|
10
|
+
} | {
|
|
11
|
+
valueRatio: Ratio;
|
|
12
|
+
} | {
|
|
13
|
+
valueSampledData: SampledData;
|
|
14
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { MeasurementTypeKey } from "../MeasurementTypeKey";
|
|
2
|
+
import { BloodPressureStates } from "./BloodPressureStates";
|
|
3
|
+
import { Measurement } from "./Measurement";
|
|
4
|
+
export type BloodPressureMeasurement = Measurement & {
|
|
5
|
+
measurementTypeKey: MeasurementTypeKey.bloodPressure;
|
|
6
|
+
diastolic?: number;
|
|
7
|
+
systolic?: number;
|
|
8
|
+
heartRate?: number;
|
|
9
|
+
status?: BloodPressureStates;
|
|
10
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BloodPressureStates = void 0;
|
|
4
|
+
var BloodPressureStates;
|
|
5
|
+
(function (BloodPressureStates) {
|
|
6
|
+
BloodPressureStates["REGULAR"] = "Regular";
|
|
7
|
+
BloodPressureStates["LOOSE_SLEEVE"] = "The sleeve is loose. Unable to analyze.";
|
|
8
|
+
BloodPressureStates["DISTURB_DETECTED"] = "Disturb Detected.";
|
|
9
|
+
BloodPressureStates["WEAK_SIGNAL"] = "Weak Signal.";
|
|
10
|
+
BloodPressureStates["DEVICE_ERROR"] = "Unknown device error.";
|
|
11
|
+
})(BloodPressureStates || (exports.BloodPressureStates = BloodPressureStates = {}));
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare enum EcgDiagnosticFlag {
|
|
2
|
+
REGULAR = "Regular",
|
|
3
|
+
POOR_WAVEFORM = "Poor Waveform",
|
|
4
|
+
LEAD_OFF = "Lead Off",
|
|
5
|
+
HIGH_HR = "High HR",
|
|
6
|
+
LOW_HR = "Low HR",
|
|
7
|
+
RR_IRREGULAR = "Irregular RR",
|
|
8
|
+
PVC = "PVC",
|
|
9
|
+
CARDIAC_ARREST = "Cardiac Arrest",
|
|
10
|
+
ATRIAL_FIBRILLATION = "AFIB",
|
|
11
|
+
QRS_WIDE = "QRS Wide",
|
|
12
|
+
QTC_LONG = "QRS Long",
|
|
13
|
+
QTC_SHORT = "QRS Short",
|
|
14
|
+
ERROR = "ERROR"
|
|
15
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EcgDiagnosticFlag = void 0;
|
|
4
|
+
var EcgDiagnosticFlag;
|
|
5
|
+
(function (EcgDiagnosticFlag) {
|
|
6
|
+
EcgDiagnosticFlag["REGULAR"] = "Regular";
|
|
7
|
+
EcgDiagnosticFlag["POOR_WAVEFORM"] = "Poor Waveform";
|
|
8
|
+
EcgDiagnosticFlag["LEAD_OFF"] = "Lead Off";
|
|
9
|
+
EcgDiagnosticFlag["HIGH_HR"] = "High HR";
|
|
10
|
+
EcgDiagnosticFlag["LOW_HR"] = "Low HR";
|
|
11
|
+
EcgDiagnosticFlag["RR_IRREGULAR"] = "Irregular RR";
|
|
12
|
+
EcgDiagnosticFlag["PVC"] = "PVC";
|
|
13
|
+
EcgDiagnosticFlag["CARDIAC_ARREST"] = "Cardiac Arrest";
|
|
14
|
+
EcgDiagnosticFlag["ATRIAL_FIBRILLATION"] = "AFIB";
|
|
15
|
+
EcgDiagnosticFlag["QRS_WIDE"] = "QRS Wide";
|
|
16
|
+
EcgDiagnosticFlag["QTC_LONG"] = "QRS Long";
|
|
17
|
+
EcgDiagnosticFlag["QTC_SHORT"] = "QRS Short";
|
|
18
|
+
EcgDiagnosticFlag["ERROR"] = "ERROR";
|
|
19
|
+
})(EcgDiagnosticFlag || (exports.EcgDiagnosticFlag = EcgDiagnosticFlag = {}));
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { MeasurementTypeKey } from "../MeasurementTypeKey";
|
|
2
|
+
import { EcgDiagnosticFlag } from "./EcgDiagnosticFlag";
|
|
3
|
+
import { Measurement } from "./Measurement";
|
|
4
|
+
export type EcgMeasurement = Measurement & {
|
|
5
|
+
measurementTypeKey: MeasurementTypeKey.ecg;
|
|
6
|
+
heartRate?: number;
|
|
7
|
+
diagramPoints?: number[];
|
|
8
|
+
diagnosticResult?: EcgDiagnosticFlag;
|
|
9
|
+
/**
|
|
10
|
+
* Duration of the ECG in seconds
|
|
11
|
+
*/
|
|
12
|
+
duration?: number;
|
|
13
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { MeasurementTypeKey } from "../MeasurementTypeKey";
|
|
2
|
+
import { Measurement } from "./Measurement";
|
|
3
|
+
export type HeartRateVariabilityMeasurement = Measurement & {
|
|
4
|
+
measurementTypeKey: MeasurementTypeKey.heartRateVariability;
|
|
5
|
+
heartRateVariability?: number;
|
|
6
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { MeasurementTypeKey } from "../MeasurementTypeKey";
|
|
2
|
+
import { Measurement } from "./Measurement";
|
|
3
|
+
export type PulseOximeterMeasurement = Measurement & {
|
|
4
|
+
measurementTypeKey: MeasurementTypeKey.bloodOxygenPulseRate;
|
|
5
|
+
pulseRate?: number;
|
|
6
|
+
rrInterval?: number;
|
|
7
|
+
bloodOxygen?: number;
|
|
8
|
+
perfusionIndex?: number;
|
|
9
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { CodeableConcept } from "@medplum/fhirtypes";
|
|
2
|
+
import { Measurement } from "./Measurement";
|
|
3
|
+
export type SpirometryMeasurement = Measurement & {
|
|
4
|
+
fvc?: string;
|
|
5
|
+
fev1?: string;
|
|
6
|
+
"fev0.5"?: string;
|
|
7
|
+
"fev1/fvc"?: string;
|
|
8
|
+
pef?: string;
|
|
9
|
+
fef25?: string;
|
|
10
|
+
fef50?: string;
|
|
11
|
+
fef75?: string;
|
|
12
|
+
fef2575?: string;
|
|
13
|
+
spirometryValues: SpirometerValue[];
|
|
14
|
+
};
|
|
15
|
+
type SpirometerValue = {
|
|
16
|
+
code: CodeableConcept;
|
|
17
|
+
value?: {
|
|
18
|
+
string: string;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { MeasurementTypeKey } from "../MeasurementTypeKey";
|
|
2
|
+
import { Measurement } from "./Measurement";
|
|
3
|
+
export type StepCountMeasurement = Measurement & {
|
|
4
|
+
measurementTypeKey: MeasurementTypeKey.stepCount;
|
|
5
|
+
stepCount?: number;
|
|
6
|
+
start?: Date;
|
|
7
|
+
end?: Date;
|
|
8
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { CodeableConcept } from "@medplum/fhirtypes";
|
|
2
|
+
import { Measurement } from "./Measurement";
|
|
3
|
+
export type UrineAnalyzeMeasurement = Measurement & {
|
|
4
|
+
uro?: number;
|
|
5
|
+
bil?: number;
|
|
6
|
+
ket?: number;
|
|
7
|
+
glu?: number;
|
|
8
|
+
pro?: number;
|
|
9
|
+
ph?: number;
|
|
10
|
+
bld?: number;
|
|
11
|
+
nit?: number;
|
|
12
|
+
leu?: number;
|
|
13
|
+
sg?: number;
|
|
14
|
+
vc?: number;
|
|
15
|
+
urineValues: UrineAnalysisValue[];
|
|
16
|
+
};
|
|
17
|
+
type UrineAnalysisValue = {
|
|
18
|
+
code: CodeableConcept;
|
|
19
|
+
value?: {
|
|
20
|
+
string: string;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { MeasurementTypeKey } from "../MeasurementTypeKey";
|
|
2
|
+
import { Measurement } from "./Measurement";
|
|
3
|
+
export type WalkingHeartRateAverageMeasurement = Measurement & {
|
|
4
|
+
measurementTypeKey: MeasurementTypeKey.walkingHeartRateAverage;
|
|
5
|
+
walkingHeartRateAverage?: number;
|
|
6
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export * from "./Measurement";
|
|
2
|
+
export * from "./BodyWeightMeasurmement";
|
|
3
|
+
export * from "./BloodPressureMeasurement";
|
|
4
|
+
export * from "./BloodGlucoseMeasurement";
|
|
5
|
+
export * from "./PulseOximeterMeasurement";
|
|
6
|
+
export * from "./EcgDiagnosticFlag";
|
|
7
|
+
export * from "./BodyTemperatureMeasurement";
|
|
8
|
+
export * from "./UrineAnalyzeMeasurement";
|
|
9
|
+
export * from "./EcgMeasurement";
|
|
10
|
+
export * from "./SpirometryMeasurement";
|
|
11
|
+
export * from "./StepCountMeasurement";
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./Measurement"), exports);
|
|
18
|
+
__exportStar(require("./BodyWeightMeasurmement"), exports);
|
|
19
|
+
__exportStar(require("./BloodPressureMeasurement"), exports);
|
|
20
|
+
__exportStar(require("./BloodGlucoseMeasurement"), exports);
|
|
21
|
+
__exportStar(require("./PulseOximeterMeasurement"), exports);
|
|
22
|
+
__exportStar(require("./EcgDiagnosticFlag"), exports);
|
|
23
|
+
__exportStar(require("./BodyTemperatureMeasurement"), exports);
|
|
24
|
+
__exportStar(require("./UrineAnalyzeMeasurement"), exports);
|
|
25
|
+
__exportStar(require("./EcgMeasurement"), exports);
|
|
26
|
+
__exportStar(require("./SpirometryMeasurement"), exports);
|
|
27
|
+
__exportStar(require("./StepCountMeasurement"), exports);
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getDeviceObject = void 0;
|
|
4
|
+
const getDeviceObject = (measurementDevice) => {
|
|
5
|
+
var _a, _b;
|
|
6
|
+
if (!measurementDevice) {
|
|
7
|
+
return {
|
|
8
|
+
identifier: {
|
|
9
|
+
value: "-1",
|
|
10
|
+
},
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
return {
|
|
14
|
+
identifier: {
|
|
15
|
+
value: (_a = measurementDevice.id) !== null && _a !== void 0 ? _a : "-1",
|
|
16
|
+
},
|
|
17
|
+
display: (_b = measurementDevice.name) !== null && _b !== void 0 ? _b : "no-name",
|
|
18
|
+
extension: [
|
|
19
|
+
{
|
|
20
|
+
url: "http://ovok.com/fhir/StructureDefinition/device-local-name",
|
|
21
|
+
valueString: measurementDevice.localName || "no-local-name",
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
url: "http://ovok.com/fhir/StructureDefinition/device-manufacturer-data",
|
|
25
|
+
valueString: measurementDevice.manufacturerData || "no-manufacturer-data",
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
url: "http://ovok.com/fhir/StructureDefinition/device-serial-number",
|
|
29
|
+
valueString: measurementDevice.sn || "no-serial-number",
|
|
30
|
+
},
|
|
31
|
+
],
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
exports.getDeviceObject = getDeviceObject;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Observation } from "@medplum/fhirtypes";
|
|
2
|
+
declare const fields: readonly ["valueQuantity", "valueString", "valueBoolean", "valueInteger", "valueDateTime", "valueTime"];
|
|
3
|
+
type Field = (typeof fields)[number];
|
|
4
|
+
type Value = Observation[Field];
|
|
5
|
+
/**
|
|
6
|
+
* Retrieves the value from a FHIR Observation resource.
|
|
7
|
+
* Checks for valueQuantity, valueString, and other value fields.
|
|
8
|
+
* @param observation The FHIR Observation resource.
|
|
9
|
+
* @returns An object containing the field name and its value or null if none exist.
|
|
10
|
+
*/
|
|
11
|
+
export declare function getObservationValueDisplay(observation: Observation): {
|
|
12
|
+
field: Field;
|
|
13
|
+
value: Value;
|
|
14
|
+
} | null;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getObservationValueDisplay = getObservationValueDisplay;
|
|
4
|
+
const fields = [
|
|
5
|
+
"valueQuantity",
|
|
6
|
+
"valueString",
|
|
7
|
+
"valueBoolean",
|
|
8
|
+
"valueInteger",
|
|
9
|
+
"valueDateTime",
|
|
10
|
+
"valueTime",
|
|
11
|
+
];
|
|
12
|
+
/**
|
|
13
|
+
* Retrieves the value from a FHIR Observation resource.
|
|
14
|
+
* Checks for valueQuantity, valueString, and other value fields.
|
|
15
|
+
* @param observation The FHIR Observation resource.
|
|
16
|
+
* @returns An object containing the field name and its value or null if none exist.
|
|
17
|
+
*/
|
|
18
|
+
function getObservationValueDisplay(observation) {
|
|
19
|
+
for (const field of fields) {
|
|
20
|
+
if (observation[field] !== undefined) {
|
|
21
|
+
return { field, value: observation[field] };
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
return null; // No value found
|
|
25
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./getObservationValueDisplay";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./getObservationValueDisplay"), exports);
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { IClientStorage, MedplumClient, MedplumClientOptions, SubscriptionManager } from "@medplum/core";
|
|
2
|
+
import * as aiFhirMethods from "./ai-fhir/methods";
|
|
3
|
+
import * as authMethods from "./auth/methods";
|
|
4
|
+
import * as botMethods from "./bot/methods";
|
|
5
|
+
import * as aiMethods from "./chat/ai/methods";
|
|
6
|
+
import * as observationMethods from "./observation/methods";
|
|
7
|
+
import * as questionnaireResponseMethods from "./questionnaire-response/methods";
|
|
8
|
+
export declare class OvokClient extends MedplumClient {
|
|
9
|
+
protected socialLoginClientId: string;
|
|
10
|
+
clientStorage: IClientStorage | undefined;
|
|
11
|
+
/**
|
|
12
|
+
* @param config - The configuration for the client.
|
|
13
|
+
* @param config.socialLoginClientId - The social login client id to use for the client.
|
|
14
|
+
*/
|
|
15
|
+
constructor(config: MedplumClientOptions & {
|
|
16
|
+
socialLoginClientId?: string;
|
|
17
|
+
});
|
|
18
|
+
private bindMethods;
|
|
19
|
+
/**
|
|
20
|
+
* Gets the `SubscriptionManager` for WebSocket subscriptions.
|
|
21
|
+
*
|
|
22
|
+
* @category Subscriptions
|
|
23
|
+
* @returns the `SubscriptionManager` for this client.
|
|
24
|
+
*/
|
|
25
|
+
getSubscriptionManager(): SubscriptionManager;
|
|
26
|
+
}
|
|
27
|
+
type Methods = typeof authMethods & typeof observationMethods & typeof questionnaireResponseMethods & typeof aiMethods & typeof aiFhirMethods & typeof botMethods;
|
|
28
|
+
type Omitted<T> = Omit<T, "executeBot">;
|
|
29
|
+
declare module "./ovok-client" {
|
|
30
|
+
interface OvokClient extends Omitted<Methods> {
|
|
31
|
+
executeBot: typeof botMethods.executeBot;
|
|
32
|
+
clientStorage: IClientStorage | undefined;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
export {};
|