@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.
Files changed (202) hide show
  1. package/README.md +40 -0
  2. package/dist/client/ai-fhir/methods/AIFhirResources.d.ts +14 -0
  3. package/dist/client/ai-fhir/methods/AIFhirResources.js +16 -0
  4. package/dist/client/ai-fhir/methods/index.d.ts +1 -0
  5. package/dist/client/ai-fhir/methods/index.js +17 -0
  6. package/dist/client/ai-fhir/types/AIFhirPlan.d.ts +6 -0
  7. package/dist/client/ai-fhir/types/AIFhirPlan.js +2 -0
  8. package/dist/client/ai-fhir/types/AIFhirPlanRequest.d.ts +5 -0
  9. package/dist/client/ai-fhir/types/AIFhirPlanRequest.js +2 -0
  10. package/dist/client/ai-fhir/types/AIFhirRequest.d.ts +7 -0
  11. package/dist/client/ai-fhir/types/AIFhirRequest.js +2 -0
  12. package/dist/client/ai-fhir/types/AIFhirResponse.d.ts +18 -0
  13. package/dist/client/ai-fhir/types/AIFhirResponse.js +2 -0
  14. package/dist/client/ai-fhir/types/index.d.ts +4 -0
  15. package/dist/client/ai-fhir/types/index.js +20 -0
  16. package/dist/client/auth/methods/appleLogin.d.ts +4 -0
  17. package/dist/client/auth/methods/appleLogin.js +11 -0
  18. package/dist/client/auth/methods/changePassword.d.ts +4 -0
  19. package/dist/client/auth/methods/changePassword.js +6 -0
  20. package/dist/client/auth/methods/googleLogin.d.ts +4 -0
  21. package/dist/client/auth/methods/googleLogin.js +11 -0
  22. package/dist/client/auth/methods/index.d.ts +8 -0
  23. package/dist/client/auth/methods/index.js +24 -0
  24. package/dist/client/auth/methods/login.d.ts +4 -0
  25. package/dist/client/auth/methods/login.js +38 -0
  26. package/dist/client/auth/methods/refetchProfile.d.ts +2 -0
  27. package/dist/client/auth/methods/refetchProfile.js +9 -0
  28. package/dist/client/auth/methods/register.d.ts +4 -0
  29. package/dist/client/auth/methods/register.js +15 -0
  30. package/dist/client/auth/methods/requestDeleteUser.d.ts +11 -0
  31. package/dist/client/auth/methods/requestDeleteUser.js +13 -0
  32. package/dist/client/auth/methods/resetPassword.d.ts +13 -0
  33. package/dist/client/auth/methods/resetPassword.js +19 -0
  34. package/dist/client/auth/types/AppleLoginBody.d.ts +68 -0
  35. package/dist/client/auth/types/AppleLoginBody.js +17 -0
  36. package/dist/client/auth/types/AuthResponse.d.ts +15 -0
  37. package/dist/client/auth/types/AuthResponse.js +2 -0
  38. package/dist/client/auth/types/ChangePasswordBody.d.ts +5 -0
  39. package/dist/client/auth/types/ChangePasswordBody.js +2 -0
  40. package/dist/client/auth/types/GoogleLoginBody.d.ts +26 -0
  41. package/dist/client/auth/types/GoogleLoginBody.js +2 -0
  42. package/dist/client/auth/types/LoginBody.d.ts +26 -0
  43. package/dist/client/auth/types/LoginBody.js +2 -0
  44. package/dist/client/auth/types/RegisterBody.d.ts +8 -0
  45. package/dist/client/auth/types/RegisterBody.js +2 -0
  46. package/dist/client/auth/types/RequestDeleteUserBody.d.ts +11 -0
  47. package/dist/client/auth/types/RequestDeleteUserBody.js +2 -0
  48. package/dist/client/auth/types/RequestDeleteUserResponse.d.ts +12 -0
  49. package/dist/client/auth/types/RequestDeleteUserResponse.js +2 -0
  50. package/dist/client/auth/types/ResetPasswordBody.d.ts +14 -0
  51. package/dist/client/auth/types/ResetPasswordBody.js +2 -0
  52. package/dist/client/auth/types/StartLoginResponse.d.ts +34 -0
  53. package/dist/client/auth/types/StartLoginResponse.js +2 -0
  54. package/dist/client/bot/methods/executeBot.d.ts +10 -0
  55. package/dist/client/bot/methods/executeBot.js +14 -0
  56. package/dist/client/bot/methods/index.d.ts +1 -0
  57. package/dist/client/bot/methods/index.js +17 -0
  58. package/dist/client/chat/ai/methods/createAiSession.d.ts +4 -0
  59. package/dist/client/chat/ai/methods/createAiSession.js +17 -0
  60. package/dist/client/chat/ai/methods/index.d.ts +1 -0
  61. package/dist/client/chat/ai/methods/index.js +17 -0
  62. package/dist/client/chat/ai/types/CreateAiSessionProps.d.ts +51 -0
  63. package/dist/client/chat/ai/types/CreateAiSessionProps.js +2 -0
  64. package/dist/client/chat/ai/types/CreateAiSessionResponse.d.ts +21 -0
  65. package/dist/client/chat/ai/types/CreateAiSessionResponse.js +2 -0
  66. package/dist/client/chat/ai/types/SessionMessagesResponse.d.ts +9 -0
  67. package/dist/client/chat/ai/types/SessionMessagesResponse.js +2 -0
  68. package/dist/client/observation/methods/generateObservationBodiesByMeasurement.d.ts +4 -0
  69. package/dist/client/observation/methods/generateObservationBodiesByMeasurement.js +40 -0
  70. package/dist/client/observation/methods/getLatestObservationsByCodes.d.ts +4 -0
  71. package/dist/client/observation/methods/getLatestObservationsByCodes.js +19 -0
  72. package/dist/client/observation/methods/index.d.ts +2 -0
  73. package/dist/client/observation/methods/index.js +18 -0
  74. package/dist/client/observation/services/base-observation-service.d.ts +22 -0
  75. package/dist/client/observation/services/base-observation-service.js +70 -0
  76. package/dist/client/observation/services/blood-glucose.d.ts +12 -0
  77. package/dist/client/observation/services/blood-glucose.js +36 -0
  78. package/dist/client/observation/services/blood-oxygen.d.ts +14 -0
  79. package/dist/client/observation/services/blood-oxygen.js +57 -0
  80. package/dist/client/observation/services/blood-pressure.d.ts +15 -0
  81. package/dist/client/observation/services/blood-pressure.js +72 -0
  82. package/dist/client/observation/services/body-temperature.d.ts +13 -0
  83. package/dist/client/observation/services/body-temperature.js +36 -0
  84. package/dist/client/observation/services/body-weight.d.ts +13 -0
  85. package/dist/client/observation/services/body-weight.js +36 -0
  86. package/dist/client/observation/services/creator.d.ts +10 -0
  87. package/dist/client/observation/services/creator.js +54 -0
  88. package/dist/client/observation/services/ecg.d.ts +16 -0
  89. package/dist/client/observation/services/ecg.js +110 -0
  90. package/dist/client/observation/services/heart-rate-variability.d.ts +13 -0
  91. package/dist/client/observation/services/heart-rate-variability.js +38 -0
  92. package/dist/client/observation/services/heart-rate.d.ts +13 -0
  93. package/dist/client/observation/services/heart-rate.js +39 -0
  94. package/dist/client/observation/services/index.d.ts +1 -0
  95. package/dist/client/observation/services/index.js +17 -0
  96. package/dist/client/observation/services/respiratory-rate.d.ts +13 -0
  97. package/dist/client/observation/services/respiratory-rate.js +38 -0
  98. package/dist/client/observation/services/resting-heart-rate.d.ts +13 -0
  99. package/dist/client/observation/services/resting-heart-rate.js +38 -0
  100. package/dist/client/observation/services/step-count.d.ts +15 -0
  101. package/dist/client/observation/services/step-count.js +55 -0
  102. package/dist/client/observation/services/uric-acid-service.d.ts +21 -0
  103. package/dist/client/observation/services/uric-acid-service.js +120 -0
  104. package/dist/client/observation/services/vo2-max.d.ts +13 -0
  105. package/dist/client/observation/services/vo2-max.js +38 -0
  106. package/dist/client/observation/services/walking-heart-rate-average.d.ts +12 -0
  107. package/dist/client/observation/services/walking-heart-rate-average.js +38 -0
  108. package/dist/client/observation/types/GetLatestObservationsByCodeParams.d.ts +9 -0
  109. package/dist/client/observation/types/GetLatestObservationsByCodeParams.js +2 -0
  110. package/dist/client/observation/types/IObservationService.d.ts +15 -0
  111. package/dist/client/observation/types/IObservationService.js +2 -0
  112. package/dist/client/observation/types/MeasurementTypeKey.d.ts +20 -0
  113. package/dist/client/observation/types/MeasurementTypeKey.js +24 -0
  114. package/dist/client/observation/types/ObservationCode.d.ts +37 -0
  115. package/dist/client/observation/types/ObservationCode.js +41 -0
  116. package/dist/client/observation/types/generate-measurement/HealthConnectTypes.d.ts +641 -0
  117. package/dist/client/observation/types/generate-measurement/HealthConnectTypes.js +45 -0
  118. package/dist/client/observation/types/generate-measurement/Sample.d.ts +32 -0
  119. package/dist/client/observation/types/generate-measurement/Sample.js +2 -0
  120. package/dist/client/observation/types/generate-observation-body/BodyWeightValueParams.d.ts +1 -0
  121. package/dist/client/observation/types/generate-observation-body/BodyWeightValueParams.js +2 -0
  122. package/dist/client/observation/types/generate-observation-body/GenerateObservationBodyParams.d.ts +7 -0
  123. package/dist/client/observation/types/generate-observation-body/GenerateObservationBodyParams.js +2 -0
  124. package/dist/client/observation/types/generate-observation-body/ObservationValue.d.ts +14 -0
  125. package/dist/client/observation/types/generate-observation-body/ObservationValue.js +2 -0
  126. package/dist/client/observation/types/measurement/BloodGlucoseMeasurement.d.ts +6 -0
  127. package/dist/client/observation/types/measurement/BloodGlucoseMeasurement.js +2 -0
  128. package/dist/client/observation/types/measurement/BloodPressureMeasurement.d.ts +10 -0
  129. package/dist/client/observation/types/measurement/BloodPressureMeasurement.js +2 -0
  130. package/dist/client/observation/types/measurement/BloodPressureStates.d.ts +7 -0
  131. package/dist/client/observation/types/measurement/BloodPressureStates.js +11 -0
  132. package/dist/client/observation/types/measurement/BodyTemperatureMeasurement.d.ts +6 -0
  133. package/dist/client/observation/types/measurement/BodyTemperatureMeasurement.js +2 -0
  134. package/dist/client/observation/types/measurement/BodyWeightMeasurmement.d.ts +7 -0
  135. package/dist/client/observation/types/measurement/BodyWeightMeasurmement.js +2 -0
  136. package/dist/client/observation/types/measurement/EcgDiagnosticFlag.d.ts +15 -0
  137. package/dist/client/observation/types/measurement/EcgDiagnosticFlag.js +19 -0
  138. package/dist/client/observation/types/measurement/EcgMeasurement.d.ts +13 -0
  139. package/dist/client/observation/types/measurement/EcgMeasurement.js +2 -0
  140. package/dist/client/observation/types/measurement/HeartRateMeasurement.d.ts +6 -0
  141. package/dist/client/observation/types/measurement/HeartRateMeasurement.js +2 -0
  142. package/dist/client/observation/types/measurement/HeartRateVariabilityMeasurement.d.ts +6 -0
  143. package/dist/client/observation/types/measurement/HeartRateVariabilityMeasurement.js +2 -0
  144. package/dist/client/observation/types/measurement/Measurement.d.ts +4 -0
  145. package/dist/client/observation/types/measurement/Measurement.js +2 -0
  146. package/dist/client/observation/types/measurement/MeasurementDevice.d.ts +7 -0
  147. package/dist/client/observation/types/measurement/MeasurementDevice.js +2 -0
  148. package/dist/client/observation/types/measurement/PulseOximeterMeasurement.d.ts +9 -0
  149. package/dist/client/observation/types/measurement/PulseOximeterMeasurement.js +2 -0
  150. package/dist/client/observation/types/measurement/RespiratoryRateMeasurement.d.ts +6 -0
  151. package/dist/client/observation/types/measurement/RespiratoryRateMeasurement.js +2 -0
  152. package/dist/client/observation/types/measurement/RestingHeartRateMeasurement.d.ts +6 -0
  153. package/dist/client/observation/types/measurement/RestingHeartRateMeasurement.js +2 -0
  154. package/dist/client/observation/types/measurement/SpirometryMeasurement.d.ts +21 -0
  155. package/dist/client/observation/types/measurement/SpirometryMeasurement.js +2 -0
  156. package/dist/client/observation/types/measurement/StepCountMeasurement.d.ts +8 -0
  157. package/dist/client/observation/types/measurement/StepCountMeasurement.js +2 -0
  158. package/dist/client/observation/types/measurement/UrineAnalyzeMeasurement.d.ts +23 -0
  159. package/dist/client/observation/types/measurement/UrineAnalyzeMeasurement.js +2 -0
  160. package/dist/client/observation/types/measurement/Vo2MaxMeasurement.d.ts +6 -0
  161. package/dist/client/observation/types/measurement/Vo2MaxMeasurement.js +2 -0
  162. package/dist/client/observation/types/measurement/WalkingHeartRateAverageMeasurement.d.ts +6 -0
  163. package/dist/client/observation/types/measurement/WalkingHeartRateAverageMeasurement.js +2 -0
  164. package/dist/client/observation/types/measurement/index.d.ts +11 -0
  165. package/dist/client/observation/types/measurement/index.js +27 -0
  166. package/dist/client/observation/types/service/ObservationMetadata.d.ts +8 -0
  167. package/dist/client/observation/types/service/ObservationMetadata.js +2 -0
  168. package/dist/client/observation/utils/getDeviceObject.d.ts +3 -0
  169. package/dist/client/observation/utils/getDeviceObject.js +34 -0
  170. package/dist/client/observation/utils/getObservationValueDisplay.d.ts +15 -0
  171. package/dist/client/observation/utils/getObservationValueDisplay.js +25 -0
  172. package/dist/client/observation/utils/index.d.ts +1 -0
  173. package/dist/client/observation/utils/index.js +17 -0
  174. package/dist/client/ovok-client.d.ts +35 -0
  175. package/dist/client/ovok-client.js +85 -0
  176. package/dist/client/questionnaire-response/methods/createQuestionnaireResponseWithObservations.d.ts +3 -0
  177. package/dist/client/questionnaire-response/methods/createQuestionnaireResponseWithObservations.js +28 -0
  178. package/dist/client/questionnaire-response/methods/index.d.ts +1 -0
  179. package/dist/client/questionnaire-response/methods/index.js +17 -0
  180. package/dist/hooks/index.d.ts +7 -0
  181. package/dist/hooks/index.js +58 -0
  182. package/dist/index.d.ts +666 -0
  183. package/dist/index.js +49 -0
  184. package/dist/types/ValidationError.d.ts +6 -0
  185. package/dist/types/ValidationError.js +2 -0
  186. package/dist/types/index.d.ts +17 -0
  187. package/dist/types/index.js +38 -0
  188. package/dist/utils/auth/exchange-code.d.ts +14 -0
  189. package/dist/utils/auth/exchange-code.js +17 -0
  190. package/dist/utils/auth/generate-code-challenge-and-verifier.d.ts +6 -0
  191. package/dist/utils/auth/generate-code-challenge-and-verifier.js +45 -0
  192. package/dist/utils/auth/handle-tenant-code.d.ts +6 -0
  193. package/dist/utils/auth/handle-tenant-code.js +21 -0
  194. package/dist/utils/auth/sha256.d.ts +8 -0
  195. package/dist/utils/auth/sha256.js +300 -0
  196. package/dist/utils/auth/start-login.d.ts +10 -0
  197. package/dist/utils/auth/start-login.js +19 -0
  198. package/dist/utils/index.d.ts +2 -0
  199. package/dist/utils/index.js +18 -0
  200. package/dist/utils/patch/getPatchOperationType.d.ts +2 -0
  201. package/dist/utils/patch/getPatchOperationType.js +16 -0
  202. 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,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export type BodyWeightValueParams = number;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,7 @@
1
+ import { Measurement } from "../../../../types";
2
+ import { MeasurementDevice } from "../measurement/MeasurementDevice";
3
+ export type GenerateObservationBodyParams = {
4
+ device?: MeasurementDevice;
5
+ patientId?: string;
6
+ measurement: Measurement;
7
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,6 @@
1
+ import { MeasurementTypeKey } from "../MeasurementTypeKey";
2
+ import { Measurement } from "./Measurement";
3
+ export type BloodGlucoseMeasurement = Measurement & {
4
+ measurementTypeKey: MeasurementTypeKey.bloodGlucose;
5
+ bloodGlucose?: number;
6
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,7 @@
1
+ export declare enum BloodPressureStates {
2
+ REGULAR = "Regular",
3
+ LOOSE_SLEEVE = "The sleeve is loose. Unable to analyze.",
4
+ DISTURB_DETECTED = "Disturb Detected.",
5
+ WEAK_SIGNAL = "Weak Signal.",
6
+ DEVICE_ERROR = "Unknown device error."
7
+ }
@@ -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,6 @@
1
+ import { MeasurementTypeKey } from "../MeasurementTypeKey";
2
+ import { Measurement } from "./Measurement";
3
+ export type BodyTemperatureMeasurement = Measurement & {
4
+ measurementTypeKey: MeasurementTypeKey.temperature;
5
+ bodyTemp?: number;
6
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,7 @@
1
+ import { MeasurementTypeKey } from "../MeasurementTypeKey";
2
+ import { Measurement } from "./Measurement";
3
+ export type BodyWeightMeasurement = Measurement & {
4
+ measurementTypeKey: MeasurementTypeKey.bodyWeight;
5
+ bodyWeight?: number;
6
+ timestamp?: number;
7
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,6 @@
1
+ import { MeasurementTypeKey } from "../MeasurementTypeKey";
2
+ import { Measurement } from "./Measurement";
3
+ export type HeartRateMeasurement = Measurement & {
4
+ measurementTypeKey: MeasurementTypeKey.heartRate;
5
+ heartRate?: number;
6
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ import { MeasurementTypeKey } from "../MeasurementTypeKey";
2
+ export type Measurement = {
3
+ measurementTypeKey: MeasurementTypeKey;
4
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,7 @@
1
+ export type MeasurementDevice = {
2
+ name: string;
3
+ localName: string;
4
+ manufacturerData: string;
5
+ sn: string;
6
+ id: string;
7
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,6 @@
1
+ import { MeasurementTypeKey } from "../MeasurementTypeKey";
2
+ import { Measurement } from "./Measurement";
3
+ export type RespiratoryRateMeasurement = Measurement & {
4
+ measurementTypeKey: MeasurementTypeKey.respiratoryRate;
5
+ respiratoryRate?: number;
6
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,6 @@
1
+ import { MeasurementTypeKey } from "../MeasurementTypeKey";
2
+ import { Measurement } from "./Measurement";
3
+ export type RestingHeartRateMeasurement = Measurement & {
4
+ measurementTypeKey: MeasurementTypeKey.restingHeartRate;
5
+ restingHeartRate?: number;
6
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,6 @@
1
+ import { MeasurementTypeKey } from "../MeasurementTypeKey";
2
+ import { Measurement } from "./Measurement";
3
+ export type Vo2MaxMeasurement = Measurement & {
4
+ measurementTypeKey: MeasurementTypeKey.vo2Max;
5
+ vo2Max?: number;
6
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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,8 @@
1
+ export type ObservationMetadata<T> = {
2
+ primaryCode: string;
3
+ additionalCodes: string[];
4
+ display: string;
5
+ unit: string;
6
+ valueKey: keyof T;
7
+ toFixed: number;
8
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,3 @@
1
+ import { Observation } from "@medplum/fhirtypes";
2
+ import { MeasurementDevice } from "../types/measurement/MeasurementDevice";
3
+ export declare const getDeviceObject: (measurementDevice: MeasurementDevice | undefined) => Observation["device"];
@@ -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 {};