@ovok/native 1.16.1-dev.2207 → 1.16.1-dev.2209

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 (49) hide show
  1. package/lib/commonjs/modules/data-sync/index.js +8 -0
  2. package/lib/commonjs/modules/data-sync/index.js.map +1 -1
  3. package/lib/commonjs/modules/data-sync/services/apple-health-medication-repository.js +105 -0
  4. package/lib/commonjs/modules/data-sync/services/apple-health-medication-repository.js.map +1 -0
  5. package/lib/commonjs/modules/data-sync/services/apple-health-medication-resources.js +91 -0
  6. package/lib/commonjs/modules/data-sync/services/apple-health-medication-resources.js.map +1 -0
  7. package/lib/commonjs/modules/data-sync/services/apple-health-medication-sync.js +111 -0
  8. package/lib/commonjs/modules/data-sync/services/apple-health-medication-sync.js.map +1 -0
  9. package/lib/commonjs/modules/data-sync/utils/fhir-systems.js +3 -1
  10. package/lib/commonjs/modules/data-sync/utils/fhir-systems.js.map +1 -1
  11. package/lib/commonjs/modules/data-sync/utils/health-data-catalog.js +30 -21
  12. package/lib/commonjs/modules/data-sync/utils/health-data-catalog.js.map +1 -1
  13. package/lib/module/modules/data-sync/index.js +1 -0
  14. package/lib/module/modules/data-sync/index.js.map +1 -1
  15. package/lib/module/modules/data-sync/services/apple-health-medication-repository.js +99 -0
  16. package/lib/module/modules/data-sync/services/apple-health-medication-repository.js.map +1 -0
  17. package/lib/module/modules/data-sync/services/apple-health-medication-resources.js +82 -0
  18. package/lib/module/modules/data-sync/services/apple-health-medication-resources.js.map +1 -0
  19. package/lib/module/modules/data-sync/services/apple-health-medication-sync.js +107 -0
  20. package/lib/module/modules/data-sync/services/apple-health-medication-sync.js.map +1 -0
  21. package/lib/module/modules/data-sync/utils/fhir-systems.js +3 -1
  22. package/lib/module/modules/data-sync/utils/fhir-systems.js.map +1 -1
  23. package/lib/module/modules/data-sync/utils/health-data-catalog.js +31 -22
  24. package/lib/module/modules/data-sync/utils/health-data-catalog.js.map +1 -1
  25. package/lib/typescript/commonjs/src/modules/data-sync/index.d.ts +2 -0
  26. package/lib/typescript/commonjs/src/modules/data-sync/index.d.ts.map +1 -1
  27. package/lib/typescript/commonjs/src/modules/data-sync/services/apple-health-medication-repository.d.ts +10 -0
  28. package/lib/typescript/commonjs/src/modules/data-sync/services/apple-health-medication-repository.d.ts.map +1 -0
  29. package/lib/typescript/commonjs/src/modules/data-sync/services/apple-health-medication-resources.d.ts +13 -0
  30. package/lib/typescript/commonjs/src/modules/data-sync/services/apple-health-medication-resources.d.ts.map +1 -0
  31. package/lib/typescript/commonjs/src/modules/data-sync/services/apple-health-medication-sync.d.ts +30 -0
  32. package/lib/typescript/commonjs/src/modules/data-sync/services/apple-health-medication-sync.d.ts.map +1 -0
  33. package/lib/typescript/commonjs/src/modules/data-sync/utils/fhir-systems.d.ts +3 -1
  34. package/lib/typescript/commonjs/src/modules/data-sync/utils/fhir-systems.d.ts.map +1 -1
  35. package/lib/typescript/commonjs/src/modules/data-sync/utils/health-data-catalog.d.ts +1 -1
  36. package/lib/typescript/commonjs/src/modules/data-sync/utils/health-data-catalog.d.ts.map +1 -1
  37. package/lib/typescript/module/src/modules/data-sync/index.d.ts +2 -0
  38. package/lib/typescript/module/src/modules/data-sync/index.d.ts.map +1 -1
  39. package/lib/typescript/module/src/modules/data-sync/services/apple-health-medication-repository.d.ts +10 -0
  40. package/lib/typescript/module/src/modules/data-sync/services/apple-health-medication-repository.d.ts.map +1 -0
  41. package/lib/typescript/module/src/modules/data-sync/services/apple-health-medication-resources.d.ts +13 -0
  42. package/lib/typescript/module/src/modules/data-sync/services/apple-health-medication-resources.d.ts.map +1 -0
  43. package/lib/typescript/module/src/modules/data-sync/services/apple-health-medication-sync.d.ts +30 -0
  44. package/lib/typescript/module/src/modules/data-sync/services/apple-health-medication-sync.d.ts.map +1 -0
  45. package/lib/typescript/module/src/modules/data-sync/utils/fhir-systems.d.ts +3 -1
  46. package/lib/typescript/module/src/modules/data-sync/utils/fhir-systems.d.ts.map +1 -1
  47. package/lib/typescript/module/src/modules/data-sync/utils/health-data-catalog.d.ts +1 -1
  48. package/lib/typescript/module/src/modules/data-sync/utils/health-data-catalog.d.ts.map +1 -1
  49. package/package.json +1 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apple-health-medication-sync.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/data-sync/services/apple-health-medication-sync.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAuB5C,mEAAmE;AACnE,KAAK,gCAAgC,GAAG;IAEtC,0FAA0F;IAC1F,MAAM,EAAE,IAAI,CAAC;IAEb,iEAAiE;IACjE,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,yEAAyE;AACzE,KAAK,+BAA+B,GAChC;IAEE,oEAAoE;IACpE,MAAM,EAAE,WAAW,CAAC;IAEpB,2DAA2D;IAC3D,WAAW,EAAE,MAAM,CAAC;IAEpB,6DAA6D;IAC7D,UAAU,EAAE,MAAM,CAAC;CACpB,GACD;IAEE,uEAAuE;IACvE,MAAM,EAAE,aAAa,CAAC;IAEtB,8CAA8C;IAC9C,MAAM,EAAE,UAAU,GAAG,iBAAiB,CAAC;CACxC,CAAC;AAwFN;;;GAGG;AACH,QAAA,MAAM,0BAA0B,GAC9B,SAAS,gCAAgC,KACxC,OAAO,CAAC,+BAA+B,CAsFzC,CAAC;AAEF,OAAO,EAAE,0BAA0B,EAAE,CAAC;AACtC,YAAY,EACV,gCAAgC,EAChC,+BAA+B,GAChC,CAAC"}
@@ -4,5 +4,7 @@ declare const OBSERVATION_SYNC_PROVIDER_SYSTEM = "https://api.ovok.com/fhir/Stru
4
4
  declare const OBSERVATION_SYNC_ID_SYSTEM = "https://api.ovok.com/fhir/StructureDefinition/observation-sync-id";
5
5
  /** The source record an imported observation came from, which is all a deletion reports. */
6
6
  declare const OBSERVATION_SYNC_RECORD_SYSTEM = "https://api.ovok.com/fhir/StructureDefinition/observation-sync-record";
7
- export { LOINC_SYSTEM, OBSERVATION_SYNC_ID_SYSTEM, OBSERVATION_SYNC_PROVIDER_SYSTEM, OBSERVATION_SYNC_RECORD_SYSTEM, UCUM_SYSTEM, };
7
+ declare const APPLE_HEALTH_MEDICATION_CONCEPT_SYSTEM = "https://api.ovok.com/fhir/StructureDefinition/healthkit-medication-concept-id";
8
+ declare const APPLE_HEALTH_MEDICATION_DOSE_EVENT_SYSTEM = "https://api.ovok.com/fhir/StructureDefinition/healthkit-medication-dose-event-id";
9
+ export { LOINC_SYSTEM, OBSERVATION_SYNC_ID_SYSTEM, OBSERVATION_SYNC_PROVIDER_SYSTEM, OBSERVATION_SYNC_RECORD_SYSTEM, APPLE_HEALTH_MEDICATION_CONCEPT_SYSTEM, APPLE_HEALTH_MEDICATION_DOSE_EVENT_SYSTEM, UCUM_SYSTEM, };
8
10
  //# sourceMappingURL=fhir-systems.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"fhir-systems.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/data-sync/utils/fhir-systems.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,YAAY,qBAAqB,CAAC;AACxC,QAAA,MAAM,WAAW,8BAA8B,CAAC;AAEhD,QAAA,MAAM,gCAAgC,4EACqC,CAAC;AAE5E,QAAA,MAAM,0BAA0B,sEACqC,CAAC;AAEtE,4FAA4F;AAC5F,QAAA,MAAM,8BAA8B,0EACqC,CAAC;AAE1E,OAAO,EACL,YAAY,EACZ,0BAA0B,EAC1B,gCAAgC,EAChC,8BAA8B,EAC9B,WAAW,GACZ,CAAC"}
1
+ {"version":3,"file":"fhir-systems.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/data-sync/utils/fhir-systems.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,YAAY,qBAAqB,CAAC;AACxC,QAAA,MAAM,WAAW,8BAA8B,CAAC;AAEhD,QAAA,MAAM,gCAAgC,4EACqC,CAAC;AAE5E,QAAA,MAAM,0BAA0B,sEACqC,CAAC;AAEtE,4FAA4F;AAC5F,QAAA,MAAM,8BAA8B,0EACqC,CAAC;AAE1E,QAAA,MAAM,sCAAsC,kFACqC,CAAC;AAElF,QAAA,MAAM,yCAAyC,qFACqC,CAAC;AAErF,OAAO,EACL,YAAY,EACZ,0BAA0B,EAC1B,gCAAgC,EAChC,8BAA8B,EAC9B,sCAAsC,EACtC,yCAAyC,EACzC,WAAW,GACZ,CAAC"}
@@ -16,7 +16,7 @@ export type HealthDataCatalogEntry = {
16
16
  readPermission: string;
17
17
  readStrategy: string;
18
18
  timeSemantics?: string;
19
- fhirResource: "Observation" | "Patient" | "FHIR resource";
19
+ fhirResource: "Observation" | "Patient" | "MedicationStatement" | "MedicationAdministration" | "FHIR resource";
20
20
  sourceCodeSystem: string;
21
21
  platformDocumentationUrl?: string;
22
22
  unit: string;
@@ -1 +1 @@
1
- {"version":3,"file":"health-data-catalog.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/data-sync/utils/health-data-catalog.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAU/D,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAiC3D,KAAK,YAAY,GAAG;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,QAAQ,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,SAAS,cAAc,EAAE,CAAC;CAClC,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC,QAAQ,EAAE,cAAc,GAAG,gBAAgB,CAAC;IAC5C,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EACD,eAAe,GACf,UAAU,GACV,QAAQ,GACR,QAAQ,GACR,gBAAgB,GAChB,UAAU,CAAC;IACf,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,aAAa,GAAG,SAAS,GAAG,eAAe,CAAC;IAC1D,gBAAgB,EAAE,MAAM,CAAC;IACzB,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAq1BF,sFAAsF;AACtF,QAAA,MAAM,mBAAmB,EAAE,SAAS,sBAAsB,EAYtD,CAAC;AAEL,yEAAyE;AACzE,QAAA,MAAM,mBAAmB,GACvB,UAAU,cAAc,EACxB,YAAY,MAAM,EAClB,MAAM,cAAc,KACnB;IAED,0BAA0B;IAC1B,IAAI,EAAE,MAAM,CAAC;IAEb,iCAAiC;IACjC,MAAM,EAAE,MAAM,CAAC;IAEf,mDAAmD;IACnD,OAAO,CAAC,EAAE,MAAM,CAAC;CA2BlB,CAAC;AAEF,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,CAAC"}
1
+ {"version":3,"file":"health-data-catalog.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/data-sync/utils/health-data-catalog.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAU/D,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAqC3D,KAAK,YAAY,GAAG;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,QAAQ,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,SAAS,cAAc,EAAE,CAAC;CAClC,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC,QAAQ,EAAE,cAAc,GAAG,gBAAgB,CAAC;IAC5C,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EACD,eAAe,GACf,UAAU,GACV,QAAQ,GACR,QAAQ,GACR,gBAAgB,GAChB,UAAU,CAAC;IACf,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,EACR,aAAa,GACb,SAAS,GACT,qBAAqB,GACrB,0BAA0B,GAC1B,eAAe,CAAC;IACpB,gBAAgB,EAAE,MAAM,CAAC;IACzB,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AA+1BF,sFAAsF;AACtF,QAAA,MAAM,mBAAmB,EAAE,SAAS,sBAAsB,EAYtD,CAAC;AAEL,yEAAyE;AACzE,QAAA,MAAM,mBAAmB,GACvB,UAAU,cAAc,EACxB,YAAY,MAAM,EAClB,MAAM,cAAc,KACnB;IAED,0BAA0B;IAC1B,IAAI,EAAE,MAAM,CAAC;IAEb,iCAAiC;IACjC,MAAM,EAAE,MAAM,CAAC;IAEf,mDAAmD;IACnD,OAAO,CAAC,EAAE,MAAM,CAAC;CA2BlB,CAAC;AAEF,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,CAAC"}
@@ -14,6 +14,8 @@ export * from "./types/health-authorization-status";
14
14
  export * from "./types/health-sync-keys";
15
15
  export * from "./types/health-sync-batch-error";
16
16
  export * from "./hooks/use-health-import";
17
+ export { syncAppleHealthMedications } from "./services/apple-health-medication-sync";
18
+ export type { AppleHealthMedicationSyncOptions, AppleHealthMedicationSyncResult, } from "./services/apple-health-medication-sync";
17
19
  export { HEALTH_DATA_CATALOG, getHealthDataCoding } from "./utils/health-data-catalog";
18
20
  export { HealthAuthorizationContext, useHealthAuthorization, } from "./contexts/health-authorization-context";
19
21
  export type { HealthAuthorizationValue } from "./contexts/health-authorization-context";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/data-sync/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,cAAc,wBAAwB,CAAC;AACvC,cAAc,iCAAiC,CAAC;AAChD,cAAc,oDAAoD,CAAC;AACnE,cAAc,uBAAuB,CAAC;AACtC,cAAc,mCAAmC,CAAC;AAClD,cAAc,qCAAqC,CAAC;AACpD,cAAc,0BAA0B,CAAC;AACzC,cAAc,iCAAiC,CAAC;AAChD,cAAc,2BAA2B,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AACvF,OAAO,EACL,0BAA0B,EAC1B,sBAAsB,GACvB,MAAM,yCAAyC,CAAC;AACjD,YAAY,EAAE,wBAAwB,EAAE,MAAM,yCAAyC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/data-sync/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,cAAc,wBAAwB,CAAC;AACvC,cAAc,iCAAiC,CAAC;AAChD,cAAc,oDAAoD,CAAC;AACnE,cAAc,uBAAuB,CAAC;AACtC,cAAc,mCAAmC,CAAC;AAClD,cAAc,qCAAqC,CAAC;AACpD,cAAc,0BAA0B,CAAC;AACzC,cAAc,iCAAiC,CAAC;AAChD,cAAc,2BAA2B,CAAC;AAC1C,OAAO,EAAE,0BAA0B,EAAE,MAAM,yCAAyC,CAAC;AACrF,YAAY,EACV,gCAAgC,EAChC,+BAA+B,GAChC,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AACvF,OAAO,EACL,0BAA0B,EAC1B,sBAAsB,GACvB,MAAM,yCAAyC,CAAC;AACjD,YAAY,EAAE,wBAAwB,EAAE,MAAM,yCAAyC,CAAC"}
@@ -0,0 +1,10 @@
1
+ import type { Ovok } from "../../next/ovok";
2
+ import type { UserAnnotatedMedication } from "@kingstinct/react-native-healthkit";
3
+ import type { MedicationStatement } from "@medplum/fhirtypes";
4
+ import { type MedicationDoseEvent } from "./apple-health-medication-resources";
5
+ import { StorageManager } from "./managers/storage-manager";
6
+ declare const upsertAppleHealthMedicationStatement: (client: Ovok, storage: StorageManager, patientId: string, medication: UserAnnotatedMedication) => Promise<void>;
7
+ declare const upsertAppleHealthMedicationDoseEvent: (client: Ovok, storage: StorageManager, patientId: string, event: MedicationDoseEvent, medicationCodes: Map<string, MedicationStatement["medicationCodeableConcept"]>) => Promise<boolean>;
8
+ declare const deleteAppleHealthMedicationDoseEvent: (client: Ovok, storage: StorageManager, patientId: string, eventUuid: string) => Promise<boolean>;
9
+ export { deleteAppleHealthMedicationDoseEvent, upsertAppleHealthMedicationDoseEvent, upsertAppleHealthMedicationStatement, };
10
+ //# sourceMappingURL=apple-health-medication-repository.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apple-health-medication-repository.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/data-sync/services/apple-health-medication-repository.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAC;AAClF,OAAO,KAAK,EAEV,mBAAmB,EACpB,MAAM,oBAAoB,CAAC;AAQ5B,OAAO,EAOL,KAAK,mBAAmB,EACzB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAqB5D,QAAA,MAAM,oCAAoC,GACxC,QAAQ,IAAI,EACZ,SAAS,cAAc,EACvB,WAAW,MAAM,EACjB,YAAY,uBAAuB,KAClC,OAAO,CAAC,IAAI,CAyBd,CAAC;AA4CF,QAAA,MAAM,oCAAoC,GACxC,QAAQ,IAAI,EACZ,SAAS,cAAc,EACvB,WAAW,MAAM,EACjB,OAAO,mBAAmB,EAC1B,iBAAiB,GAAG,CAAC,MAAM,EAAE,mBAAmB,CAAC,2BAA2B,CAAC,CAAC,KAC7E,OAAO,CAAC,OAAO,CA8DjB,CAAC;AAEF,QAAA,MAAM,oCAAoC,GACxC,QAAQ,IAAI,EACZ,SAAS,cAAc,EACvB,WAAW,MAAM,EACjB,WAAW,MAAM,KAChB,OAAO,CAAC,OAAO,CAgBjB,CAAC;AAEF,OAAO,EACL,oCAAoC,EACpC,oCAAoC,EACpC,oCAAoC,GACrC,CAAC"}
@@ -0,0 +1,13 @@
1
+ import type { MedicationDoseEventsWithAnchorResponseTyped, UserAnnotatedMedication } from "@kingstinct/react-native-healthkit";
2
+ import type { MedicationAdministration, MedicationStatement } from "@medplum/fhirtypes";
3
+ type MedicationDoseEvent = MedicationDoseEventsWithAnchorResponseTyped["samples"][number];
4
+ declare const medicationCode: (medication: UserAnnotatedMedication) => MedicationStatement["medicationCodeableConcept"];
5
+ declare const medicationStatementResource: (patientId: string, medication: UserAnnotatedMedication) => MedicationStatement;
6
+ declare const medicationAdministrationResource: (event: MedicationDoseEvent, patientId: string, medicationCodes: Map<string, MedicationStatement["medicationCodeableConcept"]>) => MedicationAdministration;
7
+ declare const isNotLoggedMedicationDoseEvent: (event: MedicationDoseEvent) => boolean;
8
+ declare const isImportableMedicationDoseEvent: (event: MedicationDoseEvent) => boolean;
9
+ declare const conditionalCreate: (patientId: string, identifierSystem: string, identifierValue: string) => string;
10
+ declare const assertPatientSubject: (resource: MedicationAdministration | MedicationStatement, patientId: string) => void;
11
+ export { assertPatientSubject, conditionalCreate, isImportableMedicationDoseEvent, isNotLoggedMedicationDoseEvent, medicationCode, medicationAdministrationResource, medicationStatementResource, };
12
+ export type { MedicationDoseEvent };
13
+ //# sourceMappingURL=apple-health-medication-resources.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apple-health-medication-resources.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/data-sync/services/apple-health-medication-resources.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,2CAA2C,EAC3C,uBAAuB,EACxB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,KAAK,EACV,wBAAwB,EACxB,mBAAmB,EACpB,MAAM,oBAAoB,CAAC;AAc5B,KAAK,mBAAmB,GACtB,2CAA2C,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC;AAEjE,QAAA,MAAM,cAAc,GAClB,YAAY,uBAAuB,KAClC,mBAAmB,CAAC,2BAA2B,CAUhD,CAAC;AAiBH,QAAA,MAAM,2BAA2B,GAC/B,WAAW,MAAM,EACjB,YAAY,uBAAuB,KAClC,mBAWD,CAAC;AAEH,QAAA,MAAM,gCAAgC,GACpC,OAAO,mBAAmB,EAC1B,WAAW,MAAM,EACjB,iBAAiB,GAAG,CAAC,MAAM,EAAE,mBAAmB,CAAC,2BAA2B,CAAC,CAAC,KAC7E,wBAsCF,CAAC;AAEF,QAAA,MAAM,8BAA8B,GAAI,OAAO,mBAAmB,KAAG,OACjB,CAAC;AAErD,QAAA,MAAM,+BAA+B,GAAI,OAAO,mBAAmB,KAAG,OAEpB,CAAC;AAEnD,QAAA,MAAM,iBAAiB,GACrB,WAAW,MAAM,EACjB,kBAAkB,MAAM,EACxB,iBAAiB,MAAM,KACtB,MAC+I,CAAC;AAEnJ,QAAA,MAAM,oBAAoB,GACxB,UAAU,wBAAwB,GAAG,mBAAmB,EACxD,WAAW,MAAM,KAChB,IAIF,CAAC;AAEF,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,+BAA+B,EAC/B,8BAA8B,EAC9B,cAAc,EACd,gCAAgC,EAChC,2BAA2B,GAC5B,CAAC;AACF,YAAY,EAAE,mBAAmB,EAAE,CAAC"}
@@ -0,0 +1,30 @@
1
+ import type { Ovok } from "../../next/ovok";
2
+ /** Options for importing medications into one patient's record. */
3
+ type AppleHealthMedicationSyncOptions = {
4
+ /** Authenticated next client used to read the active session and write FHIR resources. */
5
+ client: Ovok;
6
+ /** Patient ID that must match the active next-client session. */
7
+ patientId: string;
8
+ };
9
+ /** Outcome and counts from an Apple Health medication import attempt. */
10
+ type AppleHealthMedicationSyncResult = {
11
+ /** The medication list and available dose events were processed. */
12
+ status: "completed";
13
+ /** Number of medication concepts returned by HealthKit. */
14
+ medications: number;
15
+ /** Number of dose events imported, retracted, or deleted. */
16
+ doseEvents: number;
17
+ } | {
18
+ /** The current platform or operating system cannot run this import. */
19
+ status: "unsupported";
20
+ /** Why the platform cannot run the import. */
21
+ reason: "ios-only" | "requires-ios-26";
22
+ };
23
+ /**
24
+ * Imports the signed-in patient's Apple Health medication list and logged doses.
25
+ * Requires iOS 26 and an iOS app built with Xcode 26 or later.
26
+ */
27
+ declare const syncAppleHealthMedications: (options: AppleHealthMedicationSyncOptions) => Promise<AppleHealthMedicationSyncResult>;
28
+ export { syncAppleHealthMedications };
29
+ export type { AppleHealthMedicationSyncOptions, AppleHealthMedicationSyncResult, };
30
+ //# sourceMappingURL=apple-health-medication-sync.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apple-health-medication-sync.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/data-sync/services/apple-health-medication-sync.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAuB5C,mEAAmE;AACnE,KAAK,gCAAgC,GAAG;IAEtC,0FAA0F;IAC1F,MAAM,EAAE,IAAI,CAAC;IAEb,iEAAiE;IACjE,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,yEAAyE;AACzE,KAAK,+BAA+B,GAChC;IAEE,oEAAoE;IACpE,MAAM,EAAE,WAAW,CAAC;IAEpB,2DAA2D;IAC3D,WAAW,EAAE,MAAM,CAAC;IAEpB,6DAA6D;IAC7D,UAAU,EAAE,MAAM,CAAC;CACpB,GACD;IAEE,uEAAuE;IACvE,MAAM,EAAE,aAAa,CAAC;IAEtB,8CAA8C;IAC9C,MAAM,EAAE,UAAU,GAAG,iBAAiB,CAAC;CACxC,CAAC;AAwFN;;;GAGG;AACH,QAAA,MAAM,0BAA0B,GAC9B,SAAS,gCAAgC,KACxC,OAAO,CAAC,+BAA+B,CAsFzC,CAAC;AAEF,OAAO,EAAE,0BAA0B,EAAE,CAAC;AACtC,YAAY,EACV,gCAAgC,EAChC,+BAA+B,GAChC,CAAC"}
@@ -4,5 +4,7 @@ declare const OBSERVATION_SYNC_PROVIDER_SYSTEM = "https://api.ovok.com/fhir/Stru
4
4
  declare const OBSERVATION_SYNC_ID_SYSTEM = "https://api.ovok.com/fhir/StructureDefinition/observation-sync-id";
5
5
  /** The source record an imported observation came from, which is all a deletion reports. */
6
6
  declare const OBSERVATION_SYNC_RECORD_SYSTEM = "https://api.ovok.com/fhir/StructureDefinition/observation-sync-record";
7
- export { LOINC_SYSTEM, OBSERVATION_SYNC_ID_SYSTEM, OBSERVATION_SYNC_PROVIDER_SYSTEM, OBSERVATION_SYNC_RECORD_SYSTEM, UCUM_SYSTEM, };
7
+ declare const APPLE_HEALTH_MEDICATION_CONCEPT_SYSTEM = "https://api.ovok.com/fhir/StructureDefinition/healthkit-medication-concept-id";
8
+ declare const APPLE_HEALTH_MEDICATION_DOSE_EVENT_SYSTEM = "https://api.ovok.com/fhir/StructureDefinition/healthkit-medication-dose-event-id";
9
+ export { LOINC_SYSTEM, OBSERVATION_SYNC_ID_SYSTEM, OBSERVATION_SYNC_PROVIDER_SYSTEM, OBSERVATION_SYNC_RECORD_SYSTEM, APPLE_HEALTH_MEDICATION_CONCEPT_SYSTEM, APPLE_HEALTH_MEDICATION_DOSE_EVENT_SYSTEM, UCUM_SYSTEM, };
8
10
  //# sourceMappingURL=fhir-systems.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"fhir-systems.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/data-sync/utils/fhir-systems.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,YAAY,qBAAqB,CAAC;AACxC,QAAA,MAAM,WAAW,8BAA8B,CAAC;AAEhD,QAAA,MAAM,gCAAgC,4EACqC,CAAC;AAE5E,QAAA,MAAM,0BAA0B,sEACqC,CAAC;AAEtE,4FAA4F;AAC5F,QAAA,MAAM,8BAA8B,0EACqC,CAAC;AAE1E,OAAO,EACL,YAAY,EACZ,0BAA0B,EAC1B,gCAAgC,EAChC,8BAA8B,EAC9B,WAAW,GACZ,CAAC"}
1
+ {"version":3,"file":"fhir-systems.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/data-sync/utils/fhir-systems.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,YAAY,qBAAqB,CAAC;AACxC,QAAA,MAAM,WAAW,8BAA8B,CAAC;AAEhD,QAAA,MAAM,gCAAgC,4EACqC,CAAC;AAE5E,QAAA,MAAM,0BAA0B,sEACqC,CAAC;AAEtE,4FAA4F;AAC5F,QAAA,MAAM,8BAA8B,0EACqC,CAAC;AAE1E,QAAA,MAAM,sCAAsC,kFACqC,CAAC;AAElF,QAAA,MAAM,yCAAyC,qFACqC,CAAC;AAErF,OAAO,EACL,YAAY,EACZ,0BAA0B,EAC1B,gCAAgC,EAChC,8BAA8B,EAC9B,sCAAsC,EACtC,yCAAyC,EACzC,WAAW,GACZ,CAAC"}
@@ -16,7 +16,7 @@ export type HealthDataCatalogEntry = {
16
16
  readPermission: string;
17
17
  readStrategy: string;
18
18
  timeSemantics?: string;
19
- fhirResource: "Observation" | "Patient" | "FHIR resource";
19
+ fhirResource: "Observation" | "Patient" | "MedicationStatement" | "MedicationAdministration" | "FHIR resource";
20
20
  sourceCodeSystem: string;
21
21
  platformDocumentationUrl?: string;
22
22
  unit: string;
@@ -1 +1 @@
1
- {"version":3,"file":"health-data-catalog.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/data-sync/utils/health-data-catalog.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAU/D,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAiC3D,KAAK,YAAY,GAAG;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,QAAQ,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,SAAS,cAAc,EAAE,CAAC;CAClC,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC,QAAQ,EAAE,cAAc,GAAG,gBAAgB,CAAC;IAC5C,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EACD,eAAe,GACf,UAAU,GACV,QAAQ,GACR,QAAQ,GACR,gBAAgB,GAChB,UAAU,CAAC;IACf,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,aAAa,GAAG,SAAS,GAAG,eAAe,CAAC;IAC1D,gBAAgB,EAAE,MAAM,CAAC;IACzB,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAq1BF,sFAAsF;AACtF,QAAA,MAAM,mBAAmB,EAAE,SAAS,sBAAsB,EAYtD,CAAC;AAEL,yEAAyE;AACzE,QAAA,MAAM,mBAAmB,GACvB,UAAU,cAAc,EACxB,YAAY,MAAM,EAClB,MAAM,cAAc,KACnB;IAED,0BAA0B;IAC1B,IAAI,EAAE,MAAM,CAAC;IAEb,iCAAiC;IACjC,MAAM,EAAE,MAAM,CAAC;IAEf,mDAAmD;IACnD,OAAO,CAAC,EAAE,MAAM,CAAC;CA2BlB,CAAC;AAEF,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,CAAC"}
1
+ {"version":3,"file":"health-data-catalog.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/data-sync/utils/health-data-catalog.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAU/D,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAqC3D,KAAK,YAAY,GAAG;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,QAAQ,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,SAAS,cAAc,EAAE,CAAC;CAClC,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC,QAAQ,EAAE,cAAc,GAAG,gBAAgB,CAAC;IAC5C,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EACD,eAAe,GACf,UAAU,GACV,QAAQ,GACR,QAAQ,GACR,gBAAgB,GAChB,UAAU,CAAC;IACf,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,EACR,aAAa,GACb,SAAS,GACT,qBAAqB,GACrB,0BAA0B,GAC1B,eAAe,CAAC;IACpB,gBAAgB,EAAE,MAAM,CAAC;IACzB,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AA+1BF,sFAAsF;AACtF,QAAA,MAAM,mBAAmB,EAAE,SAAS,sBAAsB,EAYtD,CAAC;AAEL,yEAAyE;AACzE,QAAA,MAAM,mBAAmB,GACvB,UAAU,cAAc,EACxB,YAAY,MAAM,EAClB,MAAM,cAAc,KACnB;IAED,0BAA0B;IAC1B,IAAI,EAAE,MAAM,CAAC;IAEb,iCAAiC;IACjC,MAAM,EAAE,MAAM,CAAC;IAEf,mDAAmD;IACnD,OAAO,CAAC,EAAE,MAAM,CAAC;CA2BlB,CAAC;AAEF,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ovok/native",
3
- "version": "1.16.1-dev.2207+6ecb2f7",
3
+ "version": "1.16.1-dev.2209+6207a8f",
4
4
  "description": "React native component sdk for OVOK",
5
5
  "source": "./src/index.tsx",
6
6
  "main": "./lib/commonjs/index.js",