@ovok/core 0.4.49-rc.3 → 0.4.49-rc.5

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 (421) hide show
  1. package/README.md +23 -666
  2. package/dist/client/ai-fhir/methods/AIFhirResources.d.ts +3 -1
  3. package/dist/client/ai-fhir/methods/AIFhirResources.js +3 -1
  4. package/dist/client/ai-fhir/types/AIFhirPlan.d.ts +8 -0
  5. package/dist/client/ai-fhir/types/AIFhirPlanRequest.d.ts +8 -0
  6. package/dist/client/ai-fhir/types/AIFhirRequest.d.ts +5 -0
  7. package/dist/client/ai-fhir/types/AIFhirResponse.d.ts +6 -0
  8. package/dist/client/auth/errors.d.ts +15 -2
  9. package/dist/client/auth/errors.js +12 -2
  10. package/dist/client/auth/methods/appleLogin.d.ts +1 -0
  11. package/dist/client/auth/methods/appleLogin.js +1 -0
  12. package/dist/client/auth/methods/changePassword.d.ts +1 -0
  13. package/dist/client/auth/methods/changePassword.js +1 -0
  14. package/dist/client/auth/methods/googleLogin.d.ts +1 -0
  15. package/dist/client/auth/methods/googleLogin.js +1 -0
  16. package/dist/client/auth/methods/login.d.ts +6 -0
  17. package/dist/client/auth/methods/login.js +6 -0
  18. package/dist/client/auth/methods/register.d.ts +5 -0
  19. package/dist/client/auth/methods/register.js +5 -0
  20. package/dist/client/auth/methods/registerPractitioner.d.ts +5 -0
  21. package/dist/client/auth/methods/registerPractitioner.js +5 -0
  22. package/dist/client/auth/methods/reloadSession.d.ts +3 -0
  23. package/dist/client/auth/methods/requestDeleteUser.d.ts +4 -5
  24. package/dist/client/auth/methods/requestDeleteUser.js +4 -5
  25. package/dist/client/auth/methods/setPasswordFromReset.d.ts +1 -0
  26. package/dist/client/auth/methods/setPasswordFromReset.js +1 -0
  27. package/dist/client/auth/session-fetch.d.ts +11 -0
  28. package/dist/client/auth/types/Account.d.ts +8 -1
  29. package/dist/client/auth/types/AppleLoginBody.d.ts +16 -0
  30. package/dist/client/auth/types/AppleLoginBody.js +5 -0
  31. package/dist/client/auth/types/AuthResponse.d.ts +12 -0
  32. package/dist/client/auth/types/ChangePasswordBody.d.ts +7 -0
  33. package/dist/client/auth/types/ChangePasswordResponse.d.ts +5 -0
  34. package/dist/client/auth/types/CompletePasswordResetBody.d.ts +8 -0
  35. package/dist/client/auth/types/GoogleLoginBody.d.ts +5 -0
  36. package/dist/client/auth/types/LoginBody.d.ts +15 -1
  37. package/dist/client/auth/types/LoginError.d.ts +21 -2
  38. package/dist/client/auth/types/LoginError.js +8 -2
  39. package/dist/client/auth/types/LoginResponse.d.ts +8 -1
  40. package/dist/client/auth/types/RegisterBody.d.ts +12 -0
  41. package/dist/client/auth/types/RegisterPractitionerBody.d.ts +5 -0
  42. package/dist/client/auth/types/RegisterResponse.d.ts +7 -0
  43. package/dist/client/auth/types/RequestDeleteUserBody.d.ts +7 -7
  44. package/dist/client/auth/types/RequestDeleteUserResponse.d.ts +14 -0
  45. package/dist/client/auth/types/ResetPasswordBody.d.ts +5 -0
  46. package/dist/client/auth/types/Session.d.ts +14 -2
  47. package/dist/client/change-history/methods.d.ts +6 -0
  48. package/dist/client/change-history/methods.js +6 -0
  49. package/dist/client/change-history/types.d.ts +82 -0
  50. package/dist/client/chat/ai/methods/createAiSession.d.ts +6 -0
  51. package/dist/client/chat/ai/methods/createAiSession.js +6 -0
  52. package/dist/client/chat/ai/types/CreateAiSessionResponse.d.ts +17 -0
  53. package/dist/client/chat/ai/types/SessionMessagesResponse.d.ts +9 -0
  54. package/dist/client/cms/locale.d.ts +12 -2
  55. package/dist/client/cms/locale.js +9 -2
  56. package/dist/client/cms/methods.d.ts +6 -2
  57. package/dist/client/cms/methods.js +7 -3
  58. package/dist/client/cms/types.d.ts +44 -4
  59. package/dist/client/consent/methods.d.ts +16 -0
  60. package/dist/client/consent/methods.js +16 -0
  61. package/dist/client/consent/types.d.ts +53 -1
  62. package/dist/client/consent/types.js +10 -1
  63. package/dist/client/email/methods.d.ts +3 -0
  64. package/dist/client/email/methods.js +3 -0
  65. package/dist/client/email/types.d.ts +33 -0
  66. package/dist/client/errors/field-errors.d.ts +3 -0
  67. package/dist/client/errors/field-errors.js +3 -0
  68. package/dist/client/errors/ovok-error-utils.d.ts +6 -0
  69. package/dist/client/errors/ovok-error-utils.js +6 -0
  70. package/dist/client/errors/ovok-error.d.ts +36 -4
  71. package/dist/client/errors/ovok-error.js +15 -4
  72. package/dist/client/errors/rate-limit-error.d.ts +11 -2
  73. package/dist/client/errors/rate-limit-error.js +10 -2
  74. package/dist/client/errors/sign-in-required-error.d.ts +5 -2
  75. package/dist/client/errors/sign-in-required-error.js +5 -2
  76. package/dist/client/experience/methods.d.ts +38 -0
  77. package/dist/client/experience/methods.js +35 -0
  78. package/dist/client/experience/types.d.ts +316 -0
  79. package/dist/client/experience/types.js +1 -0
  80. package/dist/client/invites/methods.d.ts +27 -9
  81. package/dist/client/invites/methods.js +27 -9
  82. package/dist/client/invites/parse-accept-invite-link.d.ts +3 -1
  83. package/dist/client/invites/parse-accept-invite-link.js +3 -1
  84. package/dist/client/invites/types.d.ts +55 -0
  85. package/dist/client/invites/types.js +12 -0
  86. package/dist/client/notifications/methods.d.ts +15 -0
  87. package/dist/client/notifications/methods.js +15 -0
  88. package/dist/client/notifications/types.d.ts +249 -2
  89. package/dist/client/observation/bundle-entry-status.d.ts +3 -0
  90. package/dist/client/observation/bundle-entry-status.js +13 -0
  91. package/dist/client/observation/fhir-systems.d.ts +7 -0
  92. package/dist/client/observation/fhir-systems.js +8 -1
  93. package/dist/client/observation/methods/generateObservationBodiesByMeasurement.d.ts +3 -0
  94. package/dist/client/observation/methods/generateObservationBodiesByMeasurement.js +10 -65
  95. package/dist/client/observation/methods/getLatestObservationsByCodes.d.ts +3 -0
  96. package/dist/client/observation/methods/getLatestObservationsByCodes.js +3 -0
  97. package/dist/client/observation/methods/observationsToMeasurements.d.ts +23 -1
  98. package/dist/client/observation/methods/observationsToMeasurements.js +72 -12
  99. package/dist/client/observation/methods/saveMeasurement.d.ts +3 -1
  100. package/dist/client/observation/methods/saveMeasurement.js +3 -1
  101. package/dist/client/observation/observation-bundle-utils.d.ts +11 -7
  102. package/dist/client/observation/observation-bundle-utils.js +61 -71
  103. package/dist/client/observation/observation-coding.d.ts +12 -0
  104. package/dist/client/observation/observation-coding.js +69 -0
  105. package/dist/client/observation/observation-groups.d.ts +12 -0
  106. package/dist/client/observation/observation-groups.js +51 -0
  107. package/dist/client/observation/reading-group-backfill.d.ts +13 -0
  108. package/dist/client/observation/reading-group-backfill.js +79 -0
  109. package/dist/client/observation/reading-group.d.ts +14 -0
  110. package/dist/client/observation/reading-group.js +85 -0
  111. package/dist/client/observation/series.d.ts +28 -5
  112. package/dist/client/observation/series.js +16 -6
  113. package/dist/client/observation/services/base-observation-service.d.ts +1 -1
  114. package/dist/client/observation/services/base-observation-service.js +6 -12
  115. package/dist/client/observation/services/blood-pressure.d.ts +2 -0
  116. package/dist/client/observation/services/blood-pressure.js +9 -5
  117. package/dist/client/observation/services/component-observation-services.js +2 -2
  118. package/dist/client/observation/services/creator.d.ts +5 -0
  119. package/dist/client/observation/services/creator.js +5 -0
  120. package/dist/client/observation/services/ecg-observation-fragments.d.ts +4 -0
  121. package/dist/client/observation/services/ecg-observation-fragments.js +30 -37
  122. package/dist/client/observation/services/ecg.d.ts +3 -1
  123. package/dist/client/observation/services/ecg.js +19 -19
  124. package/dist/client/observation/services/uric-acid-service.js +2 -13
  125. package/dist/client/observation/services/urine-analyte-values.d.ts +4 -0
  126. package/dist/client/observation/services/urine-analyte-values.js +27 -0
  127. package/dist/client/observation/types/GetLatestObservationsByCodeParams.d.ts +10 -0
  128. package/dist/client/observation/types/MeasurementTypeKey.d.ts +26 -0
  129. package/dist/client/observation/types/MeasurementTypeKey.js +26 -0
  130. package/dist/client/observation/types/ObservationCode.d.ts +64 -1
  131. package/dist/client/observation/types/ObservationCode.js +64 -1
  132. package/dist/client/observation/types/UrineAnalytes.d.ts +29 -0
  133. package/dist/client/observation/types/UrineAnalytes.js +18 -9
  134. package/dist/client/observation/types/generate-measurement/Sample.d.ts +33 -0
  135. package/dist/client/observation/types/generate-observation-body/GenerateObservationBodyParams.d.ts +9 -0
  136. package/dist/client/observation/types/measurement/BabySleepMeasurement.d.ts +3 -0
  137. package/dist/client/observation/types/measurement/BloodGlucoseMeasurement.d.ts +7 -0
  138. package/dist/client/observation/types/measurement/BloodPressureMeasurement.d.ts +10 -0
  139. package/dist/client/observation/types/measurement/BloodPressureStates.d.ts +10 -0
  140. package/dist/client/observation/types/measurement/BloodPressureStates.js +10 -0
  141. package/dist/client/observation/types/measurement/BodyTemperatureMeasurement.d.ts +7 -0
  142. package/dist/client/observation/types/measurement/BodyWeightMeasurmement.d.ts +8 -0
  143. package/dist/client/observation/types/measurement/EcgDiagnosticFlag.d.ts +18 -0
  144. package/dist/client/observation/types/measurement/EcgDiagnosticFlag.js +18 -0
  145. package/dist/client/observation/types/measurement/EcgMeasurement.d.ts +9 -0
  146. package/dist/client/observation/types/measurement/HeartRateMeasurement.d.ts +7 -0
  147. package/dist/client/observation/types/measurement/HeartRateVariabilityMeasurement.d.ts +7 -0
  148. package/dist/client/observation/types/measurement/LipidPanelMeasurement.d.ts +12 -0
  149. package/dist/client/observation/types/measurement/Measurement.d.ts +9 -0
  150. package/dist/client/observation/types/measurement/MeasurementDevice.d.ts +10 -0
  151. package/dist/client/observation/types/measurement/MeasurementSeries.d.ts +2 -0
  152. package/dist/client/observation/types/measurement/PulseOximeterMeasurement.d.ts +10 -0
  153. package/dist/client/observation/types/measurement/RespiratoryRateMeasurement.d.ts +7 -0
  154. package/dist/client/observation/types/measurement/RespiratoryTherapyMeasurement.d.ts +3 -0
  155. package/dist/client/observation/types/measurement/RestingHeartRateMeasurement.d.ts +7 -0
  156. package/dist/client/observation/types/measurement/SpirometryMeasurement.d.ts +23 -0
  157. package/dist/client/observation/types/measurement/StepCountMeasurement.d.ts +9 -0
  158. package/dist/client/observation/types/measurement/UrineAnalyzeMeasurement.d.ts +29 -0
  159. package/dist/client/observation/types/measurement/Vo2MaxMeasurement.d.ts +7 -0
  160. package/dist/client/observation/types/measurement/WalkingHeartRateAverageMeasurement.d.ts +7 -0
  161. package/dist/client/observation/types/service/MeasurementField.d.ts +5 -1
  162. package/dist/client/observation/utils/getDeviceObject.js +15 -32
  163. package/dist/client/observation/utils/getObservationValueDisplay.d.ts +2 -0
  164. package/dist/client/offline/offline-measurement-queue.d.ts +56 -1
  165. package/dist/client/offline/offline-measurement-queue.js +23 -8
  166. package/dist/client/offline/shared-measurement-queue.d.ts +16 -1
  167. package/dist/client/offline/shared-measurement-queue.js +3 -1
  168. package/dist/client/ovok-client.d.ts +28 -6
  169. package/dist/client/ovok-client.js +19 -11
  170. package/dist/client/patient/methods.d.ts +21 -0
  171. package/dist/client/patient/methods.js +21 -0
  172. package/dist/client/patient/types.d.ts +131 -0
  173. package/dist/client/patient-sharing/methods.d.ts +18 -0
  174. package/dist/client/patient-sharing/methods.js +18 -0
  175. package/dist/client/patient-sharing/types.d.ts +89 -1
  176. package/dist/client/platform/methods.d.ts +22 -0
  177. package/dist/client/platform/methods.js +20 -0
  178. package/dist/client/platform/types.d.ts +194 -1
  179. package/dist/client/platform/types.js +24 -0
  180. package/dist/client/questionnaire-response/methods/createQuestionnaireResponseWithObservations.d.ts +3 -0
  181. package/dist/client/questionnaire-response/methods/createQuestionnaireResponseWithObservations.js +3 -0
  182. package/dist/client/questionnaire-response/methods/extractQuestionnaireObservations.d.ts +3 -0
  183. package/dist/client/questionnaire-response/methods/extractQuestionnaireObservations.js +3 -0
  184. package/dist/client/questionnaire-response/methods/populateQuestionnaire.d.ts +3 -0
  185. package/dist/client/questionnaire-response/methods/populateQuestionnaire.js +3 -0
  186. package/dist/client/questionnaire-response/methods/submitQuestionnaireResponse.d.ts +3 -0
  187. package/dist/client/questionnaire-response/methods/submitQuestionnaireResponse.js +3 -0
  188. package/dist/client/questionnaire-response/types.d.ts +6 -0
  189. package/dist/client/signals/errors.d.ts +13 -2
  190. package/dist/client/signals/errors.js +9 -2
  191. package/dist/client/signals/methods.d.ts +9 -0
  192. package/dist/client/signals/methods.js +9 -0
  193. package/dist/client/signals/types.d.ts +31 -0
  194. package/dist/client/slim/methods.d.ts +268 -21
  195. package/dist/client/slim/methods.js +264 -21
  196. package/dist/client/slim/paging.d.ts +22 -2
  197. package/dist/client/slim/paging.js +6 -2
  198. package/dist/client/slim/types.d.ts +920 -1
  199. package/dist/client/storage.d.ts +15 -1
  200. package/dist/client/storage.js +7 -1
  201. package/dist/client/wearables/methods.d.ts +24 -0
  202. package/dist/client/wearables/methods.js +24 -0
  203. package/dist/client/wearables/types.d.ts +74 -0
  204. package/dist/conformance/api-requirements.d.ts +31 -5
  205. package/dist/conformance/api-requirements.js +47 -10
  206. package/dist/conformance/capability-requirements.d.ts +4 -26
  207. package/dist/conformance/capability-requirements.js +5 -27
  208. package/dist/conformance/capability.d.ts +9 -1
  209. package/dist/conformance/capability.js +3 -1
  210. package/dist/hooks/account-hooks.d.ts +35 -0
  211. package/dist/hooks/account-hooks.js +33 -0
  212. package/dist/hooks/api-hooks.d.ts +74 -4
  213. package/dist/hooks/api-hooks.js +56 -4
  214. package/dist/hooks/cms-hooks.d.ts +9 -3
  215. package/dist/hooks/cms-hooks.js +9 -3
  216. package/dist/hooks/email-hooks.d.ts +3 -0
  217. package/dist/hooks/email-hooks.js +3 -0
  218. package/dist/hooks/experience-hooks.d.ts +26 -0
  219. package/dist/hooks/experience-hooks.js +24 -0
  220. package/dist/hooks/index.d.ts +18 -0
  221. package/dist/hooks/index.js +18 -0
  222. package/dist/hooks/invites-hooks.d.ts +21 -2
  223. package/dist/hooks/invites-hooks.js +21 -2
  224. package/dist/hooks/notification-ack-hooks.d.ts +6 -2
  225. package/dist/hooks/notification-ack-hooks.js +6 -2
  226. package/dist/hooks/notification-hooks.d.ts +27 -3
  227. package/dist/hooks/notification-hooks.js +27 -3
  228. package/dist/hooks/notification-note-hooks.d.ts +41 -0
  229. package/dist/hooks/notification-note-hooks.js +33 -0
  230. package/dist/hooks/observation-hooks.d.ts +30 -0
  231. package/dist/hooks/observation-hooks.js +26 -3
  232. package/dist/hooks/patient-hooks.d.ts +53 -0
  233. package/dist/hooks/patient-hooks.js +48 -0
  234. package/dist/hooks/patient-sharing-hooks.d.ts +18 -0
  235. package/dist/hooks/patient-sharing-hooks.js +18 -0
  236. package/dist/hooks/platform-hooks.d.ts +32 -0
  237. package/dist/hooks/platform-hooks.js +23 -0
  238. package/dist/hooks/poll-hooks.d.ts +17 -1
  239. package/dist/hooks/poll-hooks.js +3 -1
  240. package/dist/hooks/signals-hooks.d.ts +3 -0
  241. package/dist/hooks/signals-hooks.js +3 -0
  242. package/dist/hooks/wearables-hooks.d.ts +23 -0
  243. package/dist/hooks/wearables-hooks.js +21 -0
  244. package/dist/index.d.ts +1 -965
  245. package/dist/index.js +1 -71
  246. package/dist/next/auth/saved-accounts-store.d.ts +10 -0
  247. package/dist/next/auth/session.d.ts +17 -0
  248. package/dist/next/auth/user-session.d.ts +5 -0
  249. package/dist/next/config/ovok-config.d.ts +45 -0
  250. package/dist/next/errors/ovok-account-error.d.ts +14 -1
  251. package/dist/next/errors/ovok-account-error.js +8 -1
  252. package/dist/next/errors/ovok-errors.d.ts +88 -0
  253. package/dist/next/errors/ovok-errors.js +67 -0
  254. package/dist/next/http/http-client.d.ts +5 -0
  255. package/dist/next/http/transmit.d.ts +7 -0
  256. package/dist/next/http/url.d.ts +10 -0
  257. package/dist/next/ovok.d.ts +31 -1
  258. package/dist/next/ovok.js +5 -1
  259. package/dist/next/paging/page.d.ts +13 -1
  260. package/dist/next/react/context.d.ts +7 -0
  261. package/dist/next/react/context.js +7 -0
  262. package/dist/next/react/index.d.ts +24 -0
  263. package/dist/next/react/index.js +18 -0
  264. package/dist/next/react/query-hooks.d.ts +69 -0
  265. package/dist/next/react/query-hooks.js +31 -0
  266. package/dist/next/resources/accounts/accounts-resource.d.ts +6 -0
  267. package/dist/next/resources/accounts/accounts-resource.js +6 -0
  268. package/dist/next/resources/ai/ai-chat-resource.d.ts +7 -0
  269. package/dist/next/resources/ai/ai-chat-resource.js +5 -0
  270. package/dist/next/resources/ai/ai-resource.d.ts +13 -0
  271. package/dist/next/resources/ai/ai-resource.js +6 -0
  272. package/dist/next/resources/ai/chat-messages-resource.d.ts +7 -0
  273. package/dist/next/resources/ai/chat-messages-resource.js +7 -0
  274. package/dist/next/resources/ai/chat-sessions-resource.d.ts +14 -0
  275. package/dist/next/resources/ai/chat-sessions-resource.js +8 -0
  276. package/dist/next/resources/auth/auth-sessions-resource.d.ts +6 -1
  277. package/dist/next/resources/auth/auth-sessions-resource.js +6 -1
  278. package/dist/next/resources/auth/registration.d.ts +18 -1
  279. package/dist/next/resources/auth/social-login.d.ts +12 -0
  280. package/dist/next/resources/auth-resource.d.ts +54 -1
  281. package/dist/next/resources/auth-resource.js +23 -0
  282. package/dist/next/resources/bots/bots-resource.d.ts +15 -0
  283. package/dist/next/resources/bots/bots-resource.js +5 -0
  284. package/dist/next/resources/cms/cms-delivery.d.ts +14 -2
  285. package/dist/next/resources/cms/cms-documents-resource.d.ts +7 -1
  286. package/dist/next/resources/cms/cms-documents-resource.js +7 -1
  287. package/dist/next/resources/cms/cms-resource.d.ts +7 -0
  288. package/dist/next/resources/cms/cms-resource.js +5 -0
  289. package/dist/next/resources/cms/release-notes-resource.d.ts +6 -0
  290. package/dist/next/resources/cms/release-notes-resource.js +6 -0
  291. package/dist/next/resources/consent/consent-resource.d.ts +22 -0
  292. package/dist/next/resources/consent/consent-resource.js +20 -0
  293. package/dist/next/resources/content/content-resource.d.ts +18 -0
  294. package/dist/next/resources/content/content-resource.js +12 -0
  295. package/dist/next/resources/documents/documents-resource.d.ts +24 -0
  296. package/dist/next/resources/documents/documents-resource.js +10 -0
  297. package/dist/next/resources/email/email-resource.d.ts +6 -0
  298. package/dist/next/resources/email/email-resource.js +5 -0
  299. package/dist/next/resources/email/email-templates-resource.d.ts +6 -0
  300. package/dist/next/resources/email/email-templates-resource.js +6 -0
  301. package/dist/next/resources/fhir-resource.d.ts +36 -0
  302. package/dist/next/resources/fhir-resource.js +21 -0
  303. package/dist/next/resources/health-resource.d.ts +16 -0
  304. package/dist/next/resources/health-resource.js +5 -0
  305. package/dist/next/resources/invites/invite-flow-resource.d.ts +7 -1
  306. package/dist/next/resources/invites/invite-flow-resource.js +7 -1
  307. package/dist/next/resources/invites/invites-resource.d.ts +15 -0
  308. package/dist/next/resources/invites/invites-resource.js +5 -0
  309. package/dist/next/resources/localization/i18next-resource.d.ts +6 -0
  310. package/dist/next/resources/localization/i18next-resource.js +6 -0
  311. package/dist/next/resources/localization/locales-resource.d.ts +7 -0
  312. package/dist/next/resources/localization/locales-resource.js +7 -0
  313. package/dist/next/resources/localization/localizations-resource.d.ts +17 -0
  314. package/dist/next/resources/localization/localizations-resource.js +9 -0
  315. package/dist/next/resources/measurements/measurements-resource.d.ts +64 -3
  316. package/dist/next/resources/measurements/measurements-resource.js +45 -6
  317. package/dist/next/resources/measurements/observation-builder.d.ts +6 -1
  318. package/dist/next/resources/measurements/observation-builder.js +16 -7
  319. package/dist/next/resources/measurements/offline-measurement-queue-types.d.ts +32 -0
  320. package/dist/next/resources/measurements/save-error.js +3 -4
  321. package/dist/next/resources/patient/fhir-records.d.ts +19 -1
  322. package/dist/next/resources/patient/fhir-records.js +19 -1
  323. package/dist/next/resources/patient/patient-resource.d.ts +15 -0
  324. package/dist/next/resources/patient/patient-resource.js +6 -0
  325. package/dist/next/resources/projects/project-features-resource.d.ts +7 -0
  326. package/dist/next/resources/projects/project-features-resource.js +7 -0
  327. package/dist/next/resources/projects/project-members-resource.d.ts +19 -0
  328. package/dist/next/resources/projects/project-members-resource.js +9 -0
  329. package/dist/next/resources/projects/project-settings-resource.d.ts +8 -0
  330. package/dist/next/resources/projects/project-settings-resource.js +8 -0
  331. package/dist/next/resources/projects/projects-resource.d.ts +15 -0
  332. package/dist/next/resources/projects/projects-resource.js +5 -0
  333. package/dist/next/resources/questionnaires/questionnaires-resource.d.ts +13 -0
  334. package/dist/next/resources/questionnaires/questionnaires-resource.js +13 -0
  335. package/dist/next/resources/realtime/realtime-resource.d.ts +11 -0
  336. package/dist/next/resources/realtime/realtime-resource.js +11 -0
  337. package/dist/next/resources/realtime/realtime-socket.js +12 -5
  338. package/dist/next/resources/realtime/realtime-types.d.ts +19 -1
  339. package/dist/next/resources/session/saved-accounts-resource.d.ts +16 -0
  340. package/dist/next/resources/session/saved-accounts-resource.js +16 -0
  341. package/dist/next/resources/session/session-resource.d.ts +8 -0
  342. package/dist/next/resources/session/session-resource.js +7 -0
  343. package/dist/next/resources/sharing/sharing-invites-resource.d.ts +7 -0
  344. package/dist/next/resources/sharing/sharing-invites-resource.js +7 -0
  345. package/dist/next/resources/sharing/sharing-resource.d.ts +8 -0
  346. package/dist/next/resources/sharing/sharing-resource.js +5 -0
  347. package/dist/next/resources/sharing/sharing-settings-resource.d.ts +7 -0
  348. package/dist/next/resources/sharing/sharing-settings-resource.js +7 -0
  349. package/dist/next/resources/sharing/sharing-shares-resource.d.ts +7 -0
  350. package/dist/next/resources/sharing/sharing-shares-resource.js +7 -0
  351. package/dist/next/resources/signals/signals-gateway-resource.d.ts +15 -0
  352. package/dist/next/resources/signals/signals-gateway-resource.js +6 -0
  353. package/dist/next/resources/signals/signals-resource.d.ts +7 -0
  354. package/dist/next/resources/signals/signals-resource.js +5 -0
  355. package/dist/next/resources/signals/undeliverable-resource.d.ts +35 -0
  356. package/dist/next/resources/signals/undeliverable-resource.js +6 -0
  357. package/dist/next/resources/slim/slim-alarms-resource.d.ts +7 -0
  358. package/dist/next/resources/slim/slim-alarms-resource.js +7 -0
  359. package/dist/next/resources/slim/slim-change-history-resource.d.ts +6 -0
  360. package/dist/next/resources/slim/slim-change-history-resource.js +6 -0
  361. package/dist/next/resources/slim/slim-child-projects-resource.d.ts +21 -0
  362. package/dist/next/resources/slim/slim-child-projects-resource.js +8 -0
  363. package/dist/next/resources/slim/slim-devices-resource.d.ts +31 -0
  364. package/dist/next/resources/slim/slim-devices-resource.js +16 -0
  365. package/dist/next/resources/slim/slim-exports-resource.d.ts +6 -0
  366. package/dist/next/resources/slim/slim-exports-resource.js +6 -0
  367. package/dist/next/resources/slim/slim-locations-resource.d.ts +9 -0
  368. package/dist/next/resources/slim/slim-locations-resource.js +9 -0
  369. package/dist/next/resources/slim/slim-medical-notifications-resource.d.ts +6 -0
  370. package/dist/next/resources/slim/slim-medical-notifications-resource.js +6 -0
  371. package/dist/next/resources/slim/slim-notification-notes-resource.d.ts +10 -0
  372. package/dist/next/resources/slim/slim-notification-notes-resource.js +10 -0
  373. package/dist/next/resources/slim/slim-notifications-resource.d.ts +10 -0
  374. package/dist/next/resources/slim/slim-notifications-resource.js +6 -0
  375. package/dist/next/resources/slim/slim-organizations-resource.d.ts +9 -0
  376. package/dist/next/resources/slim/slim-organizations-resource.js +9 -0
  377. package/dist/next/resources/slim/slim-out-of-bed-resource.d.ts +12 -0
  378. package/dist/next/resources/slim/slim-out-of-bed-resource.js +7 -0
  379. package/dist/next/resources/slim/slim-patient-thresholds-resource.d.ts +6 -0
  380. package/dist/next/resources/slim/slim-patient-thresholds-resource.js +6 -0
  381. package/dist/next/resources/slim/slim-patients-resource.d.ts +11 -0
  382. package/dist/next/resources/slim/slim-patients-resource.js +10 -0
  383. package/dist/next/resources/slim/slim-policies-resource.d.ts +10 -0
  384. package/dist/next/resources/slim/slim-policies-resource.js +10 -0
  385. package/dist/next/resources/slim/slim-practitioners-resource.d.ts +6 -0
  386. package/dist/next/resources/slim/slim-practitioners-resource.js +6 -0
  387. package/dist/next/resources/slim/slim-projects-resource.d.ts +12 -0
  388. package/dist/next/resources/slim/slim-projects-resource.js +11 -0
  389. package/dist/next/resources/slim/slim-queries.d.ts +51 -0
  390. package/dist/next/resources/slim/slim-resource.d.ts +21 -0
  391. package/dist/next/resources/slim/slim-resource.js +6 -0
  392. package/dist/next/resources/slim/slim-sleep-resource.d.ts +6 -0
  393. package/dist/next/resources/slim/slim-sleep-resource.js +6 -0
  394. package/dist/next/resources/slim/slim-thresholds-resource.d.ts +5 -0
  395. package/dist/next/resources/slim/slim-thresholds-resource.js +5 -0
  396. package/dist/next/resources/slim/slim-trends-resource.d.ts +6 -0
  397. package/dist/next/resources/slim/slim-trends-resource.js +6 -0
  398. package/dist/next/resources/slim/slim-users-resource.d.ts +12 -0
  399. package/dist/next/resources/slim/slim-users-resource.js +6 -0
  400. package/dist/next/resources/slim/slim-zones-resource.d.ts +8 -0
  401. package/dist/next/resources/slim/slim-zones-resource.js +8 -0
  402. package/dist/next/resources/video-calls/video-call-access-resource.d.ts +13 -0
  403. package/dist/next/resources/video-calls/video-call-access-resource.js +8 -0
  404. package/dist/next/resources/video-calls/video-call-appointments-resource.d.ts +8 -0
  405. package/dist/next/resources/video-calls/video-call-appointments-resource.js +8 -0
  406. package/dist/next/resources/video-calls/video-call-emails-resource.d.ts +8 -0
  407. package/dist/next/resources/video-calls/video-call-emails-resource.js +8 -0
  408. package/dist/next/resources/video-calls/video-calls-resource.d.ts +14 -0
  409. package/dist/next/resources/video-calls/video-calls-resource.js +6 -0
  410. package/dist/next/resources/wearables/wearable-connections-resource.d.ts +8 -0
  411. package/dist/next/resources/wearables/wearable-connections-resource.js +8 -0
  412. package/dist/next/resources/wearables/wearable-providers-resource.d.ts +10 -0
  413. package/dist/next/resources/wearables/wearable-providers-resource.js +10 -0
  414. package/dist/next/resources/wearables/wearables-resource.d.ts +7 -0
  415. package/dist/next/resources/wearables/wearables-resource.js +5 -0
  416. package/dist/next/storage/ovok-storage.d.ts +16 -0
  417. package/dist/next/storage/ovok-storage.js +8 -0
  418. package/dist/types/ValidationError.d.ts +9 -0
  419. package/dist/utils/patch/getPatchOperationType.d.ts +3 -0
  420. package/dist/utils/patch/getPatchOperationType.js +3 -0
  421. package/package.json +52 -13
@@ -3,8 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.EcgService = void 0;
4
4
  const MeasurementTypes_1 = require("../../../types/MeasurementTypes");
5
5
  const fhir_systems_1 = require("../fhir-systems");
6
+ const observation_coding_1 = require("../observation-coding");
6
7
  const base_observation_service_1 = require("./base-observation-service");
7
8
  const ecg_observation_fragments_1 = require("./ecg-observation-fragments");
9
+ const measurement_time_1 = require("./measurement-time");
8
10
  class EcgService extends base_observation_service_1.BaseObservationService {
9
11
  constructor() {
10
12
  super(...arguments);
@@ -35,29 +37,18 @@ class EcgService extends base_observation_service_1.BaseObservationService {
35
37
  const heartRate = castedMeasurement.heartRate;
36
38
  const diagramPoints = castedMeasurement.diagramPoints;
37
39
  if (diagramPoints === null || diagramPoints === void 0 ? void 0 : diagramPoints.length) {
38
- const duration = castedMeasurement.duration;
39
- const period = typeof duration === "number" && Number.isFinite(duration) && duration > 0
40
- ? (duration * 1000) / diagramPoints.length
41
- : 1;
42
40
  values.push({
43
41
  valueSampledData: {
44
- origin: { value: 0, unit: "mV" },
45
- period,
42
+ origin: { value: 0, unit: "mV", system: fhir_systems_1.UCUM_SYSTEM, code: "mV" },
43
+ period: (0, ecg_observation_fragments_1.ecgSamplePeriodMs)(castedMeasurement),
46
44
  dimensions: 1,
47
- data: diagramPoints.join(" "),
45
+ data: (0, ecg_observation_fragments_1.sampledDataOf)(diagramPoints),
48
46
  },
49
47
  });
50
48
  }
51
49
  if (typeof heartRate === "number") {
52
50
  const fixedValue = heartRate.toFixed(this.observationMetadata[1].toFixed);
53
- values.push({
54
- valueQuantity: {
55
- value: Number(fixedValue),
56
- unit: "bpm",
57
- code: MeasurementTypes_1.ObservationCode.ECG_HEART_RATE,
58
- system: fhir_systems_1.LOINC_SYSTEM,
59
- },
60
- });
51
+ values.push({ valueQuantity: (0, observation_coding_1.ucumQuantity)(Number(fixedValue), "bpm") });
61
52
  }
62
53
  return values;
63
54
  }
@@ -68,9 +59,10 @@ class EcgService extends base_observation_service_1.BaseObservationService {
68
59
  }
69
60
  getAdditionalProperties(measurement) {
70
61
  const castedMeasurement = this.getCastedMeasurement(measurement);
62
+ const effectiveDateTime = (0, measurement_time_1.recordedAtOrNow)(castedMeasurement).toISOString();
71
63
  const additionalProperties = [
72
64
  {
73
- effectiveDateTime: new Date().toISOString(),
65
+ effectiveDateTime,
74
66
  interpretation: [
75
67
  {
76
68
  text: castedMeasurement.diagnosticResult,
@@ -96,12 +88,20 @@ class EcgService extends base_observation_service_1.BaseObservationService {
96
88
  },
97
89
  ],
98
90
  },
99
- {
100
- effectiveDateTime: new Date().toISOString(),
101
- },
91
+ { effectiveDateTime },
102
92
  ];
103
93
  return additionalProperties;
104
94
  }
95
+ /** The waveform is coded in the ISO/IEEE 11073 nomenclature, not LOINC. */
96
+ getObservationCodes() {
97
+ return super.getObservationCodes().map((concept) => {
98
+ var _a;
99
+ return ({
100
+ ...concept,
101
+ coding: (_a = concept.coding) === null || _a === void 0 ? void 0 : _a.map((coding) => coding.code === MeasurementTypes_1.ObservationCode.ECG ? { ...coding, system: fhir_systems_1.MDC_SYSTEM } : coding),
102
+ });
103
+ });
104
+ }
105
105
  getMeasurementDisplay(measurement) {
106
106
  const castedMeasurement = this.getCastedMeasurement(measurement);
107
107
  return castedMeasurement.diagnosticResult || "Unknown";
@@ -1,11 +1,11 @@
1
1
  "use strict";
2
- /* eslint-disable max-lines */
3
2
  Object.defineProperty(exports, "__esModule", { value: true });
4
3
  exports.UricAcidService = void 0;
5
4
  const MeasurementTypes_1 = require("../../../types/MeasurementTypes");
6
5
  const fhir_systems_1 = require("../fhir-systems");
7
6
  const base_observation_service_1 = require("./base-observation-service");
8
7
  const measurement_time_1 = require("./measurement-time");
8
+ const urine_analyte_values_1 = require("./urine-analyte-values");
9
9
  class UricAcidService extends base_observation_service_1.BaseObservationService {
10
10
  constructor() {
11
11
  super(...arguments);
@@ -83,18 +83,7 @@ class UricAcidService extends base_observation_service_1.BaseObservationService
83
83
  ],
84
84
  text: analyte.display,
85
85
  },
86
- value: {
87
- valueQuantity: {
88
- value,
89
- ...(analyte.unit ? { unit: analyte.unit } : {}),
90
- ...(analyte.unitCode
91
- ? {
92
- code: analyte.unitCode,
93
- system: fhir_systems_1.UCUM_SYSTEM,
94
- }
95
- : {}),
96
- },
97
- },
86
+ value: (0, urine_analyte_values_1.analyteValue)(analyte, value),
98
87
  additionalProperties: {
99
88
  effectiveDateTime,
100
89
  },
@@ -0,0 +1,4 @@
1
+ import { UrineAnalyteDefinition } from "../../../types/MeasurementTypes";
2
+ import { ObservationValue } from "../types/generate-observation-body/ObservationValue";
3
+ /** A strip analyte's value: coded positive or negative for a presence test, else a quantity. */
4
+ export declare const analyteValue: (analyte: UrineAnalyteDefinition, value: number) => ObservationValue;
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.analyteValue = void 0;
4
+ const MeasurementTypes_1 = require("../../../types/MeasurementTypes");
5
+ const fhir_systems_1 = require("../fhir-systems");
6
+ const presenceValue = (value) => {
7
+ const positive = value > 0;
8
+ return {
9
+ valueCodeableConcept: {
10
+ coding: [{
11
+ system: MeasurementTypes_1.UrinePresenceCoding.system,
12
+ code: positive ? MeasurementTypes_1.UrinePresenceCoding.positive : MeasurementTypes_1.UrinePresenceCoding.negative,
13
+ display: positive ? "Positive" : "Negative",
14
+ }],
15
+ },
16
+ };
17
+ };
18
+ const analyteQuantity = (analyte, value) => ({
19
+ valueQuantity: {
20
+ value,
21
+ ...(analyte.unit ? { unit: analyte.unit } : {}),
22
+ ...(analyte.unitCode ? { code: analyte.unitCode, system: fhir_systems_1.UCUM_SYSTEM } : {}),
23
+ },
24
+ });
25
+ /** A strip analyte's value: coded positive or negative for a presence test, else a quantity. */
26
+ const analyteValue = (analyte, value) => analyte.presence ? presenceValue(value) : analyteQuantity(analyte, value);
27
+ exports.analyteValue = analyteValue;
@@ -1,9 +1,19 @@
1
+ /**
2
+ * Parameters of `getLatestObservationsByCodes`: either the signed-in user (`me`) or a patient.
3
+ *
4
+ * @category measurements
5
+ */
1
6
  export type GetLatestObservationsByCodeParams = {
7
+ /** Observation codes to fetch the latest of. */
2
8
  codes: string[];
9
+ /** Only observations on or after this date. */
3
10
  date?: string;
4
11
  } & ({
12
+ /** Read the signed-in user's observations. */
5
13
  me: true;
6
14
  } | {
15
+ /** Read a patient's observations. */
7
16
  me: false;
17
+ /** ID of the patient. */
8
18
  patientId: string;
9
19
  });
@@ -1,25 +1,51 @@
1
+ /**
2
+ * Identifies the kind of a measurement; the value is the measurement type slug.
3
+ *
4
+ * @category measurements
5
+ */
1
6
  export declare enum MeasurementTypeKey {
7
+ /** Symptom questionnaire answers. */
2
8
  symptomQuestionnaire = "symptom-questionnaire",
9
+ /** Blood glucose reading. */
3
10
  bloodGlucose = "blood-glucose",
11
+ /** Blood pressure reading. */
4
12
  bloodPressure = "blood-pressure",
13
+ /** Electrocardiogram recording. */
5
14
  ecg = "ecg",
15
+ /** Pulse oximeter reading (SpO2 and pulse rate). */
6
16
  bloodOxygenPulseRate = "blood-oxygen-pulse-rate",
17
+ /** Body weight. */
7
18
  bodyWeight = "body-weight",
19
+ /** Body temperature. */
8
20
  temperature = "body-temperature",
21
+ /** Cosinuss multi-parameter sensor reading. */
9
22
  cosinussMultiParam = "cosinuss-multi-param",
23
+ /** Urine test strip analysis. */
10
24
  urineAnalysis = "urine-analysis",
11
25
  /** @deprecated Use urineAnalysis. */
12
26
  uricAcid = "uric-acid",
27
+ /** Heart rate. */
13
28
  heartRate = "heart-rate",
29
+ /** Heart rate variability. */
14
30
  heartRateVariability = "heart-rate-variability",
31
+ /** Respiratory rate. */
15
32
  respiratoryRate = "respiratory-rate",
33
+ /** VO2 max estimate. */
16
34
  vo2Max = "vo2-max",
35
+ /** Uploaded photo. */
17
36
  photoUpload = "photo-upload",
37
+ /** Spirometry panel. */
18
38
  spirometryPanel = "spirometry-panel",
39
+ /** Step count over a period. */
19
40
  stepCount = "step-count",
41
+ /** Resting heart rate. */
20
42
  restingHeartRate = "resting-heart-rate",
43
+ /** Average heart rate while walking. */
21
44
  walkingHeartRateAverage = "walking-heart-rate-average",
45
+ /** Lipid panel (cholesterol and triglycerides). */
22
46
  lipidPanel = "lipid-panel",
47
+ /** Respiratory therapy session. */
23
48
  respiratoryTherapy = "respiratory-therapy",
49
+ /** Baby sleep data. */
24
50
  babySleep = "baby-sleep"
25
51
  }
@@ -1,29 +1,55 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.MeasurementTypeKey = void 0;
4
+ /**
5
+ * Identifies the kind of a measurement; the value is the measurement type slug.
6
+ *
7
+ * @category measurements
8
+ */
4
9
  var MeasurementTypeKey;
5
10
  (function (MeasurementTypeKey) {
11
+ /** Symptom questionnaire answers. */
6
12
  MeasurementTypeKey["symptomQuestionnaire"] = "symptom-questionnaire";
13
+ /** Blood glucose reading. */
7
14
  MeasurementTypeKey["bloodGlucose"] = "blood-glucose";
15
+ /** Blood pressure reading. */
8
16
  MeasurementTypeKey["bloodPressure"] = "blood-pressure";
17
+ /** Electrocardiogram recording. */
9
18
  MeasurementTypeKey["ecg"] = "ecg";
19
+ /** Pulse oximeter reading (SpO2 and pulse rate). */
10
20
  MeasurementTypeKey["bloodOxygenPulseRate"] = "blood-oxygen-pulse-rate";
21
+ /** Body weight. */
11
22
  MeasurementTypeKey["bodyWeight"] = "body-weight";
23
+ /** Body temperature. */
12
24
  MeasurementTypeKey["temperature"] = "body-temperature";
25
+ /** Cosinuss multi-parameter sensor reading. */
13
26
  MeasurementTypeKey["cosinussMultiParam"] = "cosinuss-multi-param";
27
+ /** Urine test strip analysis. */
14
28
  MeasurementTypeKey["urineAnalysis"] = "urine-analysis";
15
29
  /** @deprecated Use urineAnalysis. */
16
30
  MeasurementTypeKey["uricAcid"] = "uric-acid";
31
+ /** Heart rate. */
17
32
  MeasurementTypeKey["heartRate"] = "heart-rate";
33
+ /** Heart rate variability. */
18
34
  MeasurementTypeKey["heartRateVariability"] = "heart-rate-variability";
35
+ /** Respiratory rate. */
19
36
  MeasurementTypeKey["respiratoryRate"] = "respiratory-rate";
37
+ /** VO2 max estimate. */
20
38
  MeasurementTypeKey["vo2Max"] = "vo2-max";
39
+ /** Uploaded photo. */
21
40
  MeasurementTypeKey["photoUpload"] = "photo-upload";
41
+ /** Spirometry panel. */
22
42
  MeasurementTypeKey["spirometryPanel"] = "spirometry-panel";
43
+ /** Step count over a period. */
23
44
  MeasurementTypeKey["stepCount"] = "step-count";
45
+ /** Resting heart rate. */
24
46
  MeasurementTypeKey["restingHeartRate"] = "resting-heart-rate";
47
+ /** Average heart rate while walking. */
25
48
  MeasurementTypeKey["walkingHeartRateAverage"] = "walking-heart-rate-average";
49
+ /** Lipid panel (cholesterol and triglycerides). */
26
50
  MeasurementTypeKey["lipidPanel"] = "lipid-panel";
51
+ /** Respiratory therapy session. */
27
52
  MeasurementTypeKey["respiratoryTherapy"] = "respiratory-therapy";
53
+ /** Baby sleep data. */
28
54
  MeasurementTypeKey["babySleep"] = "baby-sleep";
29
55
  })(MeasurementTypeKey || (exports.MeasurementTypeKey = MeasurementTypeKey = {}));
@@ -1,59 +1,122 @@
1
+ /**
2
+ * LOINC (or Ovok) codes that identify observation types.
3
+ *
4
+ * @category measurements
5
+ */
1
6
  export declare enum ObservationCode {
7
+ /** Heart rate measured with a blood pressure panel. */
2
8
  BLOOD_PRESSURE_HEART_RATE = "8885-6",
9
+ /** Blood glucose. */
3
10
  BLOOD_GLUCOSE = "2340-8",
11
+ /** Ketones. */
4
12
  KETONE = "33903-6",
13
+ /** Symptom. */
5
14
  SYMPTOM = "45853-9",
15
+ /** Cholesterol. */
6
16
  CHOLESTEROL = "12183-0",
17
+ /** Uric acid. */
7
18
  URIC_ACID = "25548-9",
19
+ /** Lactate. */
8
20
  LACTATE = "32693-4",
21
+ /** Heart rate from an ECG. */
9
22
  ECG_HEART_RATE = "8886-4",
23
+ /** Heart rate. */
10
24
  HEART_RATE = "8867-4",
25
+ /** Heart rate measured with a pulse oximeter. */
11
26
  OXYGEN_SATURATION_HEART_RATE = "8889-8",
27
+ /** Diastolic blood pressure. */
12
28
  DIASTOLIC_BLOOD_PRESSURE = "8462-4",
29
+ /** Systolic blood pressure. */
13
30
  SYSTOLIC_BLOOD_PRESSURE = "8480-6",
31
+ /** Mean blood pressure. */
14
32
  MEAN_BLOOD_PRESSURE = "8478-0",
33
+ /** Oxygen saturation (SpO2). */
15
34
  OXYGEN_SATURATION = "2708-6",
35
+ /** Oxygen saturation waveform. */
16
36
  OXYGEN_SATURATION_GRAPH = "2708",
37
+ /** Body temperature. */
17
38
  BODY_TEMPERATURE = "8310-5",
39
+ /** ECG waveform. */
18
40
  ECG = "131328",
41
+ /** Respiratory rate. */
19
42
  RESPIRATORY_RATE = "9279-1",
43
+ /** Spirometry panel. */
20
44
  SPIROMETRY_PANEL = "62639-0",
45
+ /** Heart rate variability. */
21
46
  HEART_RATE_VARIABILITY = "80404-7",
47
+ /** VO2 max. */
22
48
  VO2_MAX = "60842-2",
49
+ /** Mood. */
23
50
  MOOD = "52497-5",
51
+ /** Body height. */
24
52
  BODY_HEIGHT = "8302-2",
53
+ /** Body weight. */
25
54
  BODY_WEIGHT = "29463-7",
55
+ /** Gratitude. */
26
56
  GRATITUDE = "91262-6",
57
+ /** Step count. */
27
58
  STEPS = "41950-7",
59
+ /** Pain level. */
28
60
  PAIN = "94085-8",
61
+ /** Fatigue level. */
29
62
  FATIGUE = "94085-9",
63
+ /** Sleep quality. */
30
64
  SLEEP_QUALITY = "94086-1",
65
+ /** Stress level. */
31
66
  STRESS_LEVEL = "94086-2",
67
+ /** Muscle soreness. */
32
68
  MUSCLE_SORENESS = "94086-3",
69
+ /** Burned calories. */
33
70
  BURNED_CALORIES = "41981-2",
71
+ /** Photographic image. */
34
72
  PHOTOGRAPHIC_IMAGE = "72170-4",
73
+ /** PhenX respiratory questionnaire. */
35
74
  PHENX_RESPIRATORY = "62628-3",
75
+ /** Resting heart rate. */
36
76
  RESTING_HEART_RATE = "40443-4",
77
+ /** Average heart rate while walking. */
37
78
  WALKING_HEART_RATE_AVERAGE = "40442-6",
79
+ /** Lipid panel. */
38
80
  LIPID_PANEL = "100898-6",
81
+ /** Total cholesterol, mass concentration. */
39
82
  TOTAL_CHOLESTEROL_MASS = "2093-3",
83
+ /** Total cholesterol, molar concentration. */
40
84
  TOTAL_CHOLESTEROL_MOLAR = "14647-2",
85
+ /** HDL cholesterol, mass concentration. */
41
86
  HDL_CHOLESTEROL_MASS = "2085-9",
87
+ /** HDL cholesterol, molar concentration. */
42
88
  HDL_CHOLESTEROL_MOLAR = "14646-4",
89
+ /** LDL cholesterol, mass concentration. */
43
90
  LDL_CHOLESTEROL_MASS = "13457-7",
91
+ /** LDL cholesterol, molar concentration. */
44
92
  LDL_CHOLESTEROL_MOLAR = "39469-2",
93
+ /** Triglycerides, mass concentration. */
45
94
  TRIGLYCERIDES_MASS = "2571-8",
95
+ /** Triglycerides, molar concentration. */
46
96
  TRIGLYCERIDES_MOLAR = "14927-8",
97
+ /** Ratio of total to HDL cholesterol. */
47
98
  TOTAL_CHOLESTEROL_HDL_RATIO = "9830-1",
99
+ /** Respiratory therapy session (Ovok code). */
48
100
  RESPIRATORY_THERAPY = "respiratory-therapy",
101
+ /** Baby sleep (Ovok code). */
49
102
  BABY_SLEEP = "baby-sleep"
50
103
  }
51
- /** SNOMED CT concepts used to represent the result of a blood-pressure rhythm check. */
104
+ /**
105
+ * SNOMED CT concepts used to represent the result of a blood-pressure rhythm check.
106
+ *
107
+ * @category measurements
108
+ */
52
109
  export declare const PulseRhythmCoding: {
110
+ /** Coding system URI (SNOMED CT). */
53
111
  readonly system: "http://snomed.info/sct";
112
+ /** Code of the rhythm observation. */
54
113
  readonly observation: "364095004";
114
+ /** Regular rhythm. */
55
115
  readonly regular: "271636001";
116
+ /** Irregular rhythm. */
56
117
  readonly irregular: "61086009";
118
+ /** Irregularly irregular rhythm. */
57
119
  readonly irregularlyIrregular: "271637005";
120
+ /** Regularly irregular rhythm. */
58
121
  readonly regularlyIrregular: "271638000";
59
122
  };
@@ -1,63 +1,126 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PulseRhythmCoding = exports.ObservationCode = void 0;
4
+ /**
5
+ * LOINC (or Ovok) codes that identify observation types.
6
+ *
7
+ * @category measurements
8
+ */
4
9
  var ObservationCode;
5
10
  (function (ObservationCode) {
11
+ /** Heart rate measured with a blood pressure panel. */
6
12
  ObservationCode["BLOOD_PRESSURE_HEART_RATE"] = "8885-6";
13
+ /** Blood glucose. */
7
14
  ObservationCode["BLOOD_GLUCOSE"] = "2340-8";
15
+ /** Ketones. */
8
16
  ObservationCode["KETONE"] = "33903-6";
17
+ /** Symptom. */
9
18
  ObservationCode["SYMPTOM"] = "45853-9";
19
+ /** Cholesterol. */
10
20
  ObservationCode["CHOLESTEROL"] = "12183-0";
21
+ /** Uric acid. */
11
22
  ObservationCode["URIC_ACID"] = "25548-9";
23
+ /** Lactate. */
12
24
  ObservationCode["LACTATE"] = "32693-4";
25
+ /** Heart rate from an ECG. */
13
26
  ObservationCode["ECG_HEART_RATE"] = "8886-4";
27
+ /** Heart rate. */
14
28
  ObservationCode["HEART_RATE"] = "8867-4";
29
+ /** Heart rate measured with a pulse oximeter. */
15
30
  ObservationCode["OXYGEN_SATURATION_HEART_RATE"] = "8889-8";
31
+ /** Diastolic blood pressure. */
16
32
  ObservationCode["DIASTOLIC_BLOOD_PRESSURE"] = "8462-4";
33
+ /** Systolic blood pressure. */
17
34
  ObservationCode["SYSTOLIC_BLOOD_PRESSURE"] = "8480-6";
35
+ /** Mean blood pressure. */
18
36
  ObservationCode["MEAN_BLOOD_PRESSURE"] = "8478-0";
37
+ /** Oxygen saturation (SpO2). */
19
38
  ObservationCode["OXYGEN_SATURATION"] = "2708-6";
39
+ /** Oxygen saturation waveform. */
20
40
  ObservationCode["OXYGEN_SATURATION_GRAPH"] = "2708";
41
+ /** Body temperature. */
21
42
  ObservationCode["BODY_TEMPERATURE"] = "8310-5";
43
+ /** ECG waveform. */
22
44
  ObservationCode["ECG"] = "131328";
45
+ /** Respiratory rate. */
23
46
  ObservationCode["RESPIRATORY_RATE"] = "9279-1";
47
+ /** Spirometry panel. */
24
48
  ObservationCode["SPIROMETRY_PANEL"] = "62639-0";
49
+ /** Heart rate variability. */
25
50
  ObservationCode["HEART_RATE_VARIABILITY"] = "80404-7";
51
+ /** VO2 max. */
26
52
  ObservationCode["VO2_MAX"] = "60842-2";
53
+ /** Mood. */
27
54
  ObservationCode["MOOD"] = "52497-5";
55
+ /** Body height. */
28
56
  ObservationCode["BODY_HEIGHT"] = "8302-2";
57
+ /** Body weight. */
29
58
  ObservationCode["BODY_WEIGHT"] = "29463-7";
59
+ /** Gratitude. */
30
60
  ObservationCode["GRATITUDE"] = "91262-6";
61
+ /** Step count. */
31
62
  ObservationCode["STEPS"] = "41950-7";
63
+ /** Pain level. */
32
64
  ObservationCode["PAIN"] = "94085-8";
65
+ /** Fatigue level. */
33
66
  ObservationCode["FATIGUE"] = "94085-9";
67
+ /** Sleep quality. */
34
68
  ObservationCode["SLEEP_QUALITY"] = "94086-1";
69
+ /** Stress level. */
35
70
  ObservationCode["STRESS_LEVEL"] = "94086-2";
71
+ /** Muscle soreness. */
36
72
  ObservationCode["MUSCLE_SORENESS"] = "94086-3";
73
+ /** Burned calories. */
37
74
  ObservationCode["BURNED_CALORIES"] = "41981-2";
75
+ /** Photographic image. */
38
76
  ObservationCode["PHOTOGRAPHIC_IMAGE"] = "72170-4";
77
+ /** PhenX respiratory questionnaire. */
39
78
  ObservationCode["PHENX_RESPIRATORY"] = "62628-3";
79
+ /** Resting heart rate. */
40
80
  ObservationCode["RESTING_HEART_RATE"] = "40443-4";
81
+ /** Average heart rate while walking. */
41
82
  ObservationCode["WALKING_HEART_RATE_AVERAGE"] = "40442-6";
83
+ /** Lipid panel. */
42
84
  ObservationCode["LIPID_PANEL"] = "100898-6";
85
+ /** Total cholesterol, mass concentration. */
43
86
  ObservationCode["TOTAL_CHOLESTEROL_MASS"] = "2093-3";
87
+ /** Total cholesterol, molar concentration. */
44
88
  ObservationCode["TOTAL_CHOLESTEROL_MOLAR"] = "14647-2";
89
+ /** HDL cholesterol, mass concentration. */
45
90
  ObservationCode["HDL_CHOLESTEROL_MASS"] = "2085-9";
91
+ /** HDL cholesterol, molar concentration. */
46
92
  ObservationCode["HDL_CHOLESTEROL_MOLAR"] = "14646-4";
93
+ /** LDL cholesterol, mass concentration. */
47
94
  ObservationCode["LDL_CHOLESTEROL_MASS"] = "13457-7";
95
+ /** LDL cholesterol, molar concentration. */
48
96
  ObservationCode["LDL_CHOLESTEROL_MOLAR"] = "39469-2";
97
+ /** Triglycerides, mass concentration. */
49
98
  ObservationCode["TRIGLYCERIDES_MASS"] = "2571-8";
99
+ /** Triglycerides, molar concentration. */
50
100
  ObservationCode["TRIGLYCERIDES_MOLAR"] = "14927-8";
101
+ /** Ratio of total to HDL cholesterol. */
51
102
  ObservationCode["TOTAL_CHOLESTEROL_HDL_RATIO"] = "9830-1";
103
+ /** Respiratory therapy session (Ovok code). */
52
104
  ObservationCode["RESPIRATORY_THERAPY"] = "respiratory-therapy";
105
+ /** Baby sleep (Ovok code). */
53
106
  ObservationCode["BABY_SLEEP"] = "baby-sleep";
54
107
  })(ObservationCode || (exports.ObservationCode = ObservationCode = {}));
55
- /** SNOMED CT concepts used to represent the result of a blood-pressure rhythm check. */
108
+ /**
109
+ * SNOMED CT concepts used to represent the result of a blood-pressure rhythm check.
110
+ *
111
+ * @category measurements
112
+ */
56
113
  exports.PulseRhythmCoding = {
114
+ /** Coding system URI (SNOMED CT). */
57
115
  system: "http://snomed.info/sct",
116
+ /** Code of the rhythm observation. */
58
117
  observation: "364095004",
118
+ /** Regular rhythm. */
59
119
  regular: "271636001",
120
+ /** Irregular rhythm. */
60
121
  irregular: "61086009",
122
+ /** Irregularly irregular rhythm. */
61
123
  irregularlyIrregular: "271637005",
124
+ /** Regularly irregular rhythm. */
62
125
  regularlyIrregular: "271638000",
63
126
  };
@@ -1,16 +1,45 @@
1
+ /**
2
+ * Short key of a urine test strip analyte.
3
+ *
4
+ * @category measurements
5
+ */
1
6
  export type UrineAnalyteKey = "uro" | "bil" | "ket" | "glu" | "pro" | "ph" | "bld" | "nit" | "leu" | "sg" | "vc" | "mal" | "cr" | "uca";
7
+ /**
8
+ * Mapping of an analyte key to its LOINC code and display name.
9
+ *
10
+ * @category measurements
11
+ */
2
12
  export type UrineAnalyteDefinition = {
13
+ /** Analyte key. */
3
14
  key: UrineAnalyteKey;
15
+ /** LOINC code of the analyte. */
4
16
  code: string;
17
+ /** Display name of the analyte. */
5
18
  display: string;
6
19
  /** Human-readable UCUM display unit, when the analyte has one. */
7
20
  unit?: string;
8
21
  /** UCUM code sent in Observation.valueQuantity.code. */
9
22
  unitCode?: string;
23
+ /** A presence test, saved as a positive or negative coded value instead of a quantity. */
24
+ presence?: boolean;
25
+ };
26
+ /**
27
+ * SNOMED CT results of a urine presence test such as nitrite.
28
+ *
29
+ * @category measurements
30
+ */
31
+ export declare const UrinePresenceCoding: {
32
+ /** Coding system URI (SNOMED CT). */
33
+ readonly system: "http://snomed.info/sct";
34
+ /** Positive. */
35
+ readonly positive: "10828004";
36
+ /** Negative. */
37
+ readonly negative: "260385009";
10
38
  };
11
39
  /**
12
40
  * LOINC mappings for the analytes returned by Contec's BC401 strips.
13
41
  * These are exported so Native declarations and consuming apps can describe
14
42
  * the same analytes without maintaining a second, drifting table.
43
+ * @category measurements
15
44
  */
16
45
  export declare const URINE_ANALYTE_DEFINITIONS: readonly UrineAnalyteDefinition[];
@@ -1,10 +1,24 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.URINE_ANALYTE_DEFINITIONS = void 0;
3
+ exports.URINE_ANALYTE_DEFINITIONS = exports.UrinePresenceCoding = void 0;
4
+ /**
5
+ * SNOMED CT results of a urine presence test such as nitrite.
6
+ *
7
+ * @category measurements
8
+ */
9
+ exports.UrinePresenceCoding = {
10
+ /** Coding system URI (SNOMED CT). */
11
+ system: "http://snomed.info/sct",
12
+ /** Positive. */
13
+ positive: "10828004",
14
+ /** Negative. */
15
+ negative: "260385009",
16
+ };
4
17
  /**
5
18
  * LOINC mappings for the analytes returned by Contec's BC401 strips.
6
19
  * These are exported so Native declarations and consuming apps can describe
7
20
  * the same analytes without maintaining a second, drifting table.
21
+ * @category measurements
8
22
  */
9
23
  exports.URINE_ANALYTE_DEFINITIONS = [
10
24
  {
@@ -49,13 +63,8 @@ exports.URINE_ANALYTE_DEFINITIONS = [
49
63
  unit: "mg/dL",
50
64
  unitCode: "mg/dL",
51
65
  },
52
- { key: "ph", code: "50560-2", display: "Urine pH" },
53
- {
54
- key: "nit",
55
- code: "50558-6",
56
- display: "Nitrite",
57
- unit: "qualitative",
58
- },
66
+ { key: "ph", code: "50560-2", display: "Urine pH", unit: "[pH]", unitCode: "[pH]" },
67
+ { key: "nit", code: "50558-6", display: "Nitrite", presence: true },
59
68
  {
60
69
  key: "leu",
61
70
  code: "60026-2",
@@ -63,7 +72,7 @@ exports.URINE_ANALYTE_DEFINITIONS = [
63
72
  unit: "WBC/µL",
64
73
  unitCode: "/uL",
65
74
  },
66
- { key: "sg", code: "53326-5", display: "Specific gravity" },
75
+ { key: "sg", code: "53326-5", display: "Specific gravity", unitCode: "1" },
67
76
  {
68
77
  key: "vc",
69
78
  code: "5768-7",