@metriport/shared 0.27.2 → 0.28.0

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 (185) hide show
  1. package/dist/core/src/domain/document-query.d.ts +25 -0
  2. package/dist/core/src/domain/document-query.d.ts.map +1 -0
  3. package/dist/core/src/domain/document-query.js +27 -0
  4. package/dist/core/src/domain/document-query.js.map +1 -0
  5. package/dist/domain/cohort.d.ts +16 -34
  6. package/dist/domain/cohort.d.ts.map +1 -1
  7. package/dist/domain/cohort.js +5 -18
  8. package/dist/domain/cohort.js.map +1 -1
  9. package/dist/domain/network/network-query.d.ts +30 -0
  10. package/dist/domain/network/network-query.d.ts.map +1 -0
  11. package/dist/domain/network/network-query.js +8 -0
  12. package/dist/domain/network/network-query.js.map +1 -0
  13. package/dist/domain/network-query/network-query.d.ts +31 -0
  14. package/dist/domain/network-query/network-query.d.ts.map +1 -0
  15. package/dist/domain/network-query/network-query.js +9 -0
  16. package/dist/domain/network-query/network-query.js.map +1 -0
  17. package/dist/domain/network-query/query.d.ts +52 -0
  18. package/dist/domain/network-query/query.d.ts.map +1 -0
  19. package/dist/domain/network-query/query.js +19 -0
  20. package/dist/domain/network-query/query.js.map +1 -0
  21. package/dist/domain/network-query/source.d.ts +35 -0
  22. package/dist/domain/network-query/source.d.ts.map +1 -0
  23. package/dist/domain/network-query/source.js +15 -0
  24. package/dist/domain/network-query/source.js.map +1 -0
  25. package/dist/domain/network-qyert/network-query.d.ts +31 -0
  26. package/dist/domain/network-qyert/network-query.d.ts.map +1 -0
  27. package/dist/domain/network-qyert/network-query.js +9 -0
  28. package/dist/domain/network-qyert/network-query.js.map +1 -0
  29. package/dist/domain/roster/patient-roster.d.ts +16 -0
  30. package/dist/domain/roster/patient-roster.d.ts.map +1 -0
  31. package/dist/domain/roster/patient-roster.js +3 -0
  32. package/dist/domain/roster/patient-roster.js.map +1 -0
  33. package/dist/domain/roster/roster-status.d.ts +16 -0
  34. package/dist/domain/roster/roster-status.d.ts.map +1 -0
  35. package/dist/domain/roster/roster-status.js +49 -0
  36. package/dist/domain/roster/roster-status.js.map +1 -0
  37. package/dist/domain/roster/roster.d.ts +39 -0
  38. package/dist/domain/roster/roster.d.ts.map +1 -0
  39. package/dist/domain/roster/roster.js +3 -0
  40. package/dist/domain/roster/roster.js.map +1 -0
  41. package/dist/domain/tcm-encounter.d.ts +4 -4
  42. package/dist/interface/external/ehr/athenahealth/cx-mapping.d.ts +19 -0
  43. package/dist/interface/external/ehr/athenahealth/cx-mapping.d.ts.map +1 -1
  44. package/dist/interface/external/ehr/athenahealth/family-history.d.ts +85 -82
  45. package/dist/interface/external/ehr/athenahealth/family-history.d.ts.map +1 -1
  46. package/dist/interface/external/ehr/athenahealth/family-history.js +7 -9
  47. package/dist/interface/external/ehr/athenahealth/family-history.js.map +1 -1
  48. package/dist/interface/external/ehr/canvas/cx-mapping.d.ts +28 -2
  49. package/dist/interface/external/ehr/canvas/cx-mapping.d.ts.map +1 -1
  50. package/dist/interface/external/ehr/canvas/cx-mapping.js +6 -1
  51. package/dist/interface/external/ehr/canvas/cx-mapping.js.map +1 -1
  52. package/dist/interface/external/ehr/elation/cx-mapping.d.ts +23 -4
  53. package/dist/interface/external/ehr/elation/cx-mapping.d.ts.map +1 -1
  54. package/dist/interface/external/ehr/healthie/allergy.d.ts +105 -0
  55. package/dist/interface/external/ehr/healthie/allergy.d.ts.map +1 -1
  56. package/dist/interface/external/ehr/healthie/allergy.js +8 -1
  57. package/dist/interface/external/ehr/healthie/allergy.js.map +1 -1
  58. package/dist/interface/external/ehr/healthie/condition.d.ts +135 -0
  59. package/dist/interface/external/ehr/healthie/condition.d.ts.map +1 -1
  60. package/dist/interface/external/ehr/healthie/condition.js +21 -1
  61. package/dist/interface/external/ehr/healthie/condition.js.map +1 -1
  62. package/dist/interface/external/ehr/healthie/cx-mapping.d.ts +23 -4
  63. package/dist/interface/external/ehr/healthie/cx-mapping.d.ts.map +1 -1
  64. package/dist/interface/external/ehr/healthie/medication.d.ts +80 -0
  65. package/dist/interface/external/ehr/healthie/medication.d.ts.map +1 -1
  66. package/dist/interface/external/ehr/healthie/medication.js +15 -1
  67. package/dist/interface/external/ehr/healthie/medication.js.map +1 -1
  68. package/dist/interface/external/ehr/shared.d.ts +32 -0
  69. package/dist/interface/external/ehr/shared.d.ts.map +1 -1
  70. package/dist/interface/external/ehr/shared.js +5 -0
  71. package/dist/interface/external/ehr/shared.js.map +1 -1
  72. package/dist/interface/external/quest/fhir.d.ts +22 -0
  73. package/dist/interface/external/quest/fhir.d.ts.map +1 -0
  74. package/dist/interface/external/quest/fhir.js +9 -0
  75. package/dist/interface/external/quest/fhir.js.map +1 -0
  76. package/dist/interface/external/quest/file.d.ts +7 -0
  77. package/dist/interface/external/quest/file.d.ts.map +1 -0
  78. package/dist/interface/external/quest/file.js +3 -0
  79. package/dist/interface/external/quest/file.js.map +1 -0
  80. package/dist/interface/external/quest/roster.d.ts +21 -0
  81. package/dist/interface/external/quest/roster.d.ts.map +1 -0
  82. package/dist/interface/external/quest/roster.js +39 -0
  83. package/dist/interface/external/quest/roster.js.map +1 -0
  84. package/dist/interface/external/surescripts/roster.d.ts +12 -0
  85. package/dist/interface/external/surescripts/roster.d.ts.map +1 -0
  86. package/dist/interface/external/surescripts/roster.js +29 -0
  87. package/dist/interface/external/surescripts/roster.js.map +1 -0
  88. package/dist/interface/external/surescripts/source.d.ts +2 -0
  89. package/dist/interface/external/surescripts/source.d.ts.map +1 -0
  90. package/dist/interface/external/surescripts/source.js +5 -0
  91. package/dist/interface/external/surescripts/source.js.map +1 -0
  92. package/dist/medical/fhir/constants.d.ts +1 -0
  93. package/dist/medical/fhir/constants.d.ts.map +1 -1
  94. package/dist/medical/fhir/constants.js +2 -1
  95. package/dist/medical/fhir/constants.js.map +1 -1
  96. package/dist/medical/webhook/webhook-request.d.ts +32 -32
  97. package/dist/net/retry.d.ts +3 -0
  98. package/dist/net/retry.d.ts.map +1 -1
  99. package/dist/net/retry.js +3 -0
  100. package/dist/net/retry.js.map +1 -1
  101. package/dist/shared/src/domain/network/network-query.d.ts +30 -0
  102. package/dist/shared/src/domain/network/network-query.d.ts.map +1 -0
  103. package/dist/shared/src/domain/network/network-query.js +8 -0
  104. package/dist/shared/src/domain/network/network-query.js.map +1 -0
  105. package/dist/shared/src/domain/network-query/network-query.d.ts +30 -0
  106. package/dist/shared/src/domain/network-query/network-query.d.ts.map +1 -0
  107. package/dist/shared/src/domain/network-query/network-query.js +8 -0
  108. package/dist/shared/src/domain/network-query/network-query.js.map +1 -0
  109. package/dist/shared/src/domain/network-qyert/network-query.d.ts +30 -0
  110. package/dist/shared/src/domain/network-qyert/network-query.d.ts.map +1 -0
  111. package/dist/shared/src/domain/network-qyert/network-query.js +8 -0
  112. package/dist/shared/src/domain/network-qyert/network-query.js.map +1 -0
  113. package/package.json +2 -2
  114. package/dist/domain/patient/patient-import.d.ts +0 -131
  115. package/dist/domain/patient/patient-import.d.ts.map +0 -1
  116. package/dist/domain/patient/patient-import.js +0 -32
  117. package/dist/domain/patient/patient-import.js.map +0 -1
  118. package/dist/interface/external/athenahealth/appointment.d.ts +0 -63
  119. package/dist/interface/external/athenahealth/appointment.d.ts.map +0 -1
  120. package/dist/interface/external/athenahealth/appointment.js +0 -18
  121. package/dist/interface/external/athenahealth/appointment.js.map +0 -1
  122. package/dist/interface/external/athenahealth/cx-mapping.d.ts +0 -10
  123. package/dist/interface/external/athenahealth/cx-mapping.d.ts.map +0 -1
  124. package/dist/interface/external/athenahealth/cx-mapping.js +0 -8
  125. package/dist/interface/external/athenahealth/cx-mapping.js.map +0 -1
  126. package/dist/interface/external/athenahealth/department.d.ts +0 -28
  127. package/dist/interface/external/athenahealth/department.d.ts.map +0 -1
  128. package/dist/interface/external/athenahealth/department.js +0 -11
  129. package/dist/interface/external/athenahealth/department.js.map +0 -1
  130. package/dist/interface/external/athenahealth/index.d.ts +0 -9
  131. package/dist/interface/external/athenahealth/index.d.ts.map +0 -1
  132. package/dist/interface/external/athenahealth/index.js +0 -25
  133. package/dist/interface/external/athenahealth/index.js.map +0 -1
  134. package/dist/interface/external/athenahealth/jwt-token.d.ts +0 -34
  135. package/dist/interface/external/athenahealth/jwt-token.d.ts.map +0 -1
  136. package/dist/interface/external/athenahealth/jwt-token.js +0 -18
  137. package/dist/interface/external/athenahealth/jwt-token.js.map +0 -1
  138. package/dist/interface/external/athenahealth/medication.d.ts +0 -50
  139. package/dist/interface/external/athenahealth/medication.d.ts.map +0 -1
  140. package/dist/interface/external/athenahealth/medication.js +0 -19
  141. package/dist/interface/external/athenahealth/medication.js.map +0 -1
  142. package/dist/interface/external/athenahealth/problem.d.ts +0 -27
  143. package/dist/interface/external/athenahealth/problem.d.ts.map +0 -1
  144. package/dist/interface/external/athenahealth/problem.js +0 -14
  145. package/dist/interface/external/athenahealth/problem.js.map +0 -1
  146. package/dist/interface/external/athenahealth/subscription.d.ts +0 -20
  147. package/dist/interface/external/athenahealth/subscription.d.ts.map +0 -1
  148. package/dist/interface/external/athenahealth/subscription.js +0 -11
  149. package/dist/interface/external/athenahealth/subscription.js.map +0 -1
  150. package/dist/interface/external/athenahealth/vitals.d.ts +0 -82
  151. package/dist/interface/external/athenahealth/vitals.d.ts.map +0 -1
  152. package/dist/interface/external/athenahealth/vitals.js +0 -15
  153. package/dist/interface/external/athenahealth/vitals.js.map +0 -1
  154. package/dist/interface/external/canvas/appointment.d.ts +0 -68
  155. package/dist/interface/external/canvas/appointment.d.ts.map +0 -1
  156. package/dist/interface/external/canvas/appointment.js +0 -15
  157. package/dist/interface/external/canvas/appointment.js.map +0 -1
  158. package/dist/interface/external/canvas/index.d.ts +0 -3
  159. package/dist/interface/external/canvas/index.d.ts.map +0 -1
  160. package/dist/interface/external/canvas/index.js +0 -19
  161. package/dist/interface/external/canvas/index.js.map +0 -1
  162. package/dist/interface/external/canvas/jwt-token.d.ts +0 -31
  163. package/dist/interface/external/canvas/jwt-token.d.ts.map +0 -1
  164. package/dist/interface/external/canvas/jwt-token.js +0 -17
  165. package/dist/interface/external/canvas/jwt-token.js.map +0 -1
  166. package/dist/interface/external/elation/appointment.d.ts +0 -68
  167. package/dist/interface/external/elation/appointment.d.ts.map +0 -1
  168. package/dist/interface/external/elation/appointment.js +0 -15
  169. package/dist/interface/external/elation/appointment.js.map +0 -1
  170. package/dist/interface/external/elation/index.d.ts +0 -4
  171. package/dist/interface/external/elation/index.d.ts.map +0 -1
  172. package/dist/interface/external/elation/index.js +0 -20
  173. package/dist/interface/external/elation/index.js.map +0 -1
  174. package/dist/interface/external/elation/jwt-token.d.ts +0 -20
  175. package/dist/interface/external/elation/jwt-token.d.ts.map +0 -1
  176. package/dist/interface/external/elation/jwt-token.js +0 -13
  177. package/dist/interface/external/elation/jwt-token.js.map +0 -1
  178. package/dist/interface/external/elation/patient.d.ts +0 -96
  179. package/dist/interface/external/elation/patient.d.ts.map +0 -1
  180. package/dist/interface/external/elation/patient.js +0 -33
  181. package/dist/interface/external/elation/patient.js.map +0 -1
  182. package/dist/interface/external/shared/ehr/patient.d.ts +0 -250
  183. package/dist/interface/external/shared/ehr/patient.d.ts.map +0 -1
  184. package/dist/interface/external/shared/ehr/patient.js +0 -35
  185. package/dist/interface/external/shared/ehr/patient.js.map +0 -1
@@ -0,0 +1,25 @@
1
+ export declare const documentQueryStatus: readonly ["processing", "completed", "failed"];
2
+ export type DocumentQueryStatus = (typeof documentQueryStatus)[number];
3
+ export type Progress = {
4
+ status: DocumentQueryStatus;
5
+ total?: number;
6
+ successful?: number;
7
+ errors?: number;
8
+ webhookSent?: boolean;
9
+ };
10
+ export type ProgressIntKeys = keyof Omit<Progress, "status">;
11
+ export declare const progressTypes: readonly ["convert", "download"];
12
+ export type ProgressType = (typeof progressTypes)[number];
13
+ export type DocumentQueryProgress = Partial<Record<ProgressType, Progress> & {
14
+ requestId: string;
15
+ startedAt: Date;
16
+ triggerConsolidated: boolean;
17
+ forceDownload: boolean;
18
+ }>;
19
+ export declare const convertResult: readonly ["success", "failed"];
20
+ export type ConvertResult = (typeof convertResult)[number];
21
+ export declare function getStatusFromProgress(progress: Pick<Progress, "errors" | "successful" | "total">): DocumentQueryStatus;
22
+ export declare function isProcessingStatus(status?: DocumentQueryStatus | undefined): boolean;
23
+ export declare function isFinalStatus(status?: DocumentQueryStatus | undefined): boolean;
24
+ export declare function isProcessing(progress?: Progress | undefined): boolean;
25
+ //# sourceMappingURL=document-query.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"document-query.d.ts","sourceRoot":"","sources":["../../../../../core/src/domain/document-query.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB,gDAAiD,CAAC;AAClF,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEvE,MAAM,MAAM,QAAQ,GAAG;IACrB,MAAM,EAAE,mBAAmB,CAAC;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,MAAM,IAAI,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;AAE7D,eAAO,MAAM,aAAa,kCAAmC,CAAC;AAC9D,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;AAE1D,MAAM,MAAM,qBAAqB,GAAG,OAAO,CACzC,MAAM,CAAC,YAAY,EAAE,QAAQ,CAAC,GAAG;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,IAAI,CAAC;IAChB,mBAAmB,EAAE,OAAO,CAAC;IAC7B,aAAa,EAAE,OAAO,CAAC;CACxB,CACF,CAAC;AAEF,eAAO,MAAM,aAAa,gCAAiC,CAAC;AAC5D,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;AAE3D,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,QAAQ,GAAG,YAAY,GAAG,OAAO,CAAC,GAC1D,mBAAmB,CAIrB;AAED,wBAAgB,kBAAkB,CAAC,MAAM,CAAC,EAAE,mBAAmB,GAAG,SAAS,WAG1E;AACD,wBAAgB,aAAa,CAAC,MAAM,CAAC,EAAE,mBAAmB,GAAG,SAAS,WAErE;AAED,wBAAgB,YAAY,CAAC,QAAQ,CAAC,EAAE,QAAQ,GAAG,SAAS,WAE3D"}
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isProcessing = exports.isFinalStatus = exports.isProcessingStatus = exports.getStatusFromProgress = exports.convertResult = exports.progressTypes = exports.documentQueryStatus = void 0;
4
+ exports.documentQueryStatus = ["processing", "completed", "failed"];
5
+ exports.progressTypes = ["convert", "download"];
6
+ exports.convertResult = ["success", "failed"];
7
+ function getStatusFromProgress(progress) {
8
+ const { successful, errors, total } = progress;
9
+ const isConversionCompleted = (successful ?? 0) + (errors ?? 0) >= (total ?? 0);
10
+ return isConversionCompleted ? "completed" : "processing";
11
+ }
12
+ exports.getStatusFromProgress = getStatusFromProgress;
13
+ function isProcessingStatus(status) {
14
+ if (!status)
15
+ return false;
16
+ return status === "processing";
17
+ }
18
+ exports.isProcessingStatus = isProcessingStatus;
19
+ function isFinalStatus(status) {
20
+ return !isProcessingStatus(status);
21
+ }
22
+ exports.isFinalStatus = isFinalStatus;
23
+ function isProcessing(progress) {
24
+ return isProcessingStatus(progress?.status);
25
+ }
26
+ exports.isProcessing = isProcessing;
27
+ //# sourceMappingURL=document-query.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"document-query.js","sourceRoot":"","sources":["../../../../../core/src/domain/document-query.ts"],"names":[],"mappings":";;;AAAa,QAAA,mBAAmB,GAAG,CAAC,YAAY,EAAE,WAAW,EAAE,QAAQ,CAAU,CAAC;AAarE,QAAA,aAAa,GAAG,CAAC,SAAS,EAAE,UAAU,CAAU,CAAC;AAYjD,QAAA,aAAa,GAAG,CAAC,SAAS,EAAE,QAAQ,CAAU,CAAC;AAG5D,SAAgB,qBAAqB,CACnC,QAA2D;IAE3D,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,QAAQ,CAAC;IAC/C,MAAM,qBAAqB,GAAG,CAAC,UAAU,IAAI,CAAC,CAAC,GAAG,CAAC,MAAM,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC;IAChF,OAAO,qBAAqB,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,YAAY,CAAC;AAC5D,CAAC;AAND,sDAMC;AAED,SAAgB,kBAAkB,CAAC,MAAwC;IACzE,IAAI,CAAC,MAAM;QAAE,OAAO,KAAK,CAAC;IAC1B,OAAO,MAAM,KAAK,YAAY,CAAC;AACjC,CAAC;AAHD,gDAGC;AACD,SAAgB,aAAa,CAAC,MAAwC;IACpE,OAAO,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC;AACrC,CAAC;AAFD,sCAEC;AAED,SAAgB,YAAY,CAAC,QAA+B;IAC1D,OAAO,kBAAkB,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;AAC9C,CAAC;AAFD,oCAEC"}
@@ -1,27 +1,16 @@
1
1
  import { DeepPartial } from "../common/merge-settings";
2
2
  import { BaseDomain } from "./base-domain";
3
3
  import { BaseDTO } from "./baseDto";
4
- /**
5
- *
6
- * WARNING IF UPDATING THIS FILE, YOU MUST UPDATE THE ROUTE SCHEMAS FILES TOO
7
- *
8
- * WARNING IF UPDATING THIS FILE, YOU MUST UPDATE THE ROUTE SCHEMAS FILES TOO
9
- *
10
- * WARNING IF UPDATING THIS FILE, YOU MUST UPDATE THE ROUTE SCHEMAS FILES TOO
11
- *
12
- * See @metriport/api/src/routes/medical/schemas/cohort.ts
13
- *
14
- */
15
4
  export declare const COHORT_COLORS: readonly ["red", "green", "blue", "yellow", "purple", "orange", "pink", "brown", "gray", "black", "white"];
16
5
  export declare const COHORT_FREQUENCIES: readonly ["monthly", "biweekly", "weekly"];
17
6
  export declare const DEFAULT_COLOR = "white";
18
7
  export declare const DEFAULT_FREQUENCY = "monthly";
19
8
  export declare const DEFAULT_SCHEDULE: Schedule;
20
- export declare const DEFAULT_SCHEDULE_HIE: Schedule;
21
9
  export declare const DEFAULT_NOTIFICATION: Notification;
22
10
  export declare const DEFAULT_NOTIFICATION_SCHEDULE: NotificationSchedule;
23
11
  export declare const DEFAULT_MONITORING: MonitoringSettings;
24
- export declare const DEFAULT_SETTINGS: SettingsWithoutOverrides;
12
+ export declare const DEFAULT_OVERRIDES: Overrides;
13
+ export declare const DEFAULT_SETTINGS: Settings;
25
14
  export type CohortColors = (typeof COHORT_COLORS)[number];
26
15
  export type CohortFrequency = (typeof COHORT_FREQUENCIES)[number];
27
16
  export type Schedule = {
@@ -44,6 +33,7 @@ export type MonitoringSettings = {
44
33
  pharmacy: NotificationSchedule;
45
34
  laboratory: Notification;
46
35
  };
36
+ export type AllOptionalMonitoringSettings = DeepPartial<MonitoringSettings>;
47
37
  export type Overrides = Record<string, boolean> | undefined;
48
38
  export type Settings = {
49
39
  monitoring: MonitoringSettings;
@@ -52,9 +42,8 @@ export type Settings = {
52
42
  export type SettingsWithoutOverrides = {
53
43
  monitoring: MonitoringSettings;
54
44
  };
55
- export type AllOptionalMonitoringSchema = DeepPartial<MonitoringSettings>;
45
+ export type AllOptionalSettings = DeepPartial<Settings>;
56
46
  export type AllOptionalSettingsWithoutOverrides = DeepPartial<SettingsWithoutOverrides>;
57
- export type AllOptionalSettingsWithOverrides = DeepPartial<Settings>;
58
47
  export type Cohort = BaseDomain & {
59
48
  name: string;
60
49
  color: CohortColors;
@@ -62,42 +51,35 @@ export type Cohort = BaseDomain & {
62
51
  settings: Settings;
63
52
  cxId: string;
64
53
  };
65
- export type CohortWithOverrides = Omit<Cohort, "id" | "cxId" | "createdAt" | "updatedAt" | "eTag">;
66
- type CohortWithoutOverrides = Omit<CohortWithOverrides, "settings"> & {
67
- settings: SettingsWithoutOverrides;
68
- };
69
- export type CohortCreateRequest = Pick<Cohort, "name"> & Partial<Pick<Cohort, "description" | "color">> & {
70
- settings?: SettingsWithoutOverrides;
54
+ export type CohortWithSize = Cohort & {
55
+ size: number;
71
56
  };
72
- export type CohortCreateCmd = CohortCreateRequest & {
57
+ export type CohortCreateCmd = Pick<Cohort, "name"> & Partial<Pick<Cohort, "description" | "color" | "settings">> & {
73
58
  cxId: string;
74
59
  };
75
- export type CohortUpdateRequestWithoutOverrides = Partial<Omit<CohortWithoutOverrides, "settings">> & {
76
- settings?: AllOptionalSettingsWithoutOverrides;
77
- eTag?: string;
78
- };
79
- export type CohortUpdateCmd = Omit<CohortUpdateRequestWithoutOverrides, "settings"> & {
60
+ export type CohortUpdateCmd = Partial<Pick<Cohort, "name" | "description" | "color">> & {
80
61
  id: string;
81
62
  cxId: string;
82
63
  eTag?: string;
83
- settings?: AllOptionalSettingsWithOverrides;
64
+ settings?: AllOptionalSettings;
84
65
  };
66
+ export type CohortUpdateRequestWithoutSettings = Omit<CohortUpdateCmd, "cxId" | "settings">;
85
67
  export type CohortResponse = BaseDTO & {
86
68
  name: string;
87
69
  description: string;
88
70
  color: CohortColors;
71
+ settings: Settings;
72
+ };
73
+ export type CohortResponseWithoutOverrides = Omit<CohortResponse, "settings"> & {
89
74
  settings: SettingsWithoutOverrides;
90
75
  };
91
76
  export type CohortWithSizeResponse = CohortResponse & {
92
77
  size: number;
93
78
  };
94
- export type CohortWithSize = Cohort & {
95
- size: number;
79
+ export type CohortWithSizeResponseWithoutOverrides = Omit<CohortWithSizeResponse, "settings"> & {
80
+ settings: SettingsWithoutOverrides;
96
81
  };
97
- export declare function responseDtoFromCohort(cohort: CohortWithOverrides & {
98
- eTag: string;
99
- id: string;
100
- }): CohortResponse;
82
+ export declare function responseDtoFromCohort(cohort: Cohort): CohortResponseWithoutOverrides;
101
83
  export declare const cohortPatientMaxPageSize = 100;
102
84
  export declare function normalizeCohortName(name: string): string;
103
85
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"cohort.d.ts","sourceRoot":"","sources":["../../src/domain/cohort.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAa,MAAM,WAAW,CAAC;AAE/C;;;;;;;;;;GAUG;AAEH,eAAO,MAAM,aAAa,4GAYhB,CAAC;AAEX,eAAO,MAAM,kBAAkB,4CAA6C,CAAC;AAE7E,eAAO,MAAM,aAAa,UAAU,CAAC;AAErC,eAAO,MAAM,iBAAiB,YAAY,CAAC;AAC3C,eAAO,MAAM,gBAAgB,EAAE,QAG9B,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,QAGlC,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,YAElC,CAAC;AAEF,eAAO,MAAM,6BAA6B,EAAE,oBAG3C,CAAC;AAMF,eAAO,MAAM,kBAAkB,EAAE,kBAKhC,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,wBAE9B,CAAC;AAGF,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;AAC1D,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC;AAClE,MAAM,MAAM,QAAQ,GAAG;IACrB,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,eAAe,CAAC;CAC5B,CAAC;AACF,MAAM,MAAM,oBAAoB,GAAG;IACjC,aAAa,EAAE,OAAO,CAAC;IACvB,QAAQ,EAAE,QAAQ,CAAC;CACpB,CAAC;AAEF,KAAK,YAAY,GAAG;IAClB,aAAa,EAAE,OAAO,CAAC;CACxB,CAA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AM,CAAC;IACd,QAAQ,CAAC,EAAE,mBAAmB,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,kCAAkC,GAAG,IAAI,CAAC,eAAe,EAAE,MAAM,GAAG,UAAU,CAAC,CAAC;AAE5F,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,YAAY,CAAC;IACpB,QAAQ,EAAE,QAAQ,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,8BAA8B,GAAG,IAAI,CAAC,cAAc,EAAE,UAAU,CAAC,GAAG;IAC9E,QAAQ,EAAE,wBAAwB,CAAC;CACpC,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG,cAAc,GAAG;IACpD,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,sCAAsC,GAAG,IAAI,CAAC,sBAAsB,EAAE,UAAU,CAAC,GAAG;IAC9F,QAAQ,EAAE,wBAAwB,CAAC;CACpC,CAAC;AAEF,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,MAAM,GAAG,8BAA8B,CAWpF;AAED,eAAO,MAAM,wBAAwB,MAAM,CAAC;AAE5C,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAMxD"}
@@ -1,20 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.normalizeCohortName = exports.cohortPatientMaxPageSize = exports.responseDtoFromCohort = exports.DEFAULT_SETTINGS = exports.DEFAULT_MONITORING = exports.DEFAULT_NOTIFICATION_SCHEDULE = exports.DEFAULT_NOTIFICATION = exports.DEFAULT_SCHEDULE_HIE = exports.DEFAULT_SCHEDULE = exports.DEFAULT_FREQUENCY = exports.DEFAULT_COLOR = exports.COHORT_FREQUENCIES = exports.COHORT_COLORS = void 0;
3
+ exports.normalizeCohortName = exports.cohortPatientMaxPageSize = exports.responseDtoFromCohort = exports.DEFAULT_SETTINGS = exports.DEFAULT_OVERRIDES = exports.DEFAULT_MONITORING = exports.DEFAULT_NOTIFICATION_SCHEDULE = exports.DEFAULT_NOTIFICATION = exports.DEFAULT_SCHEDULE = exports.DEFAULT_FREQUENCY = exports.DEFAULT_COLOR = exports.COHORT_FREQUENCIES = exports.COHORT_COLORS = void 0;
4
4
  const lodash_1 = require("lodash");
5
5
  const bad_request_1 = require("../error/bad-request");
6
6
  const baseDto_1 = require("./baseDto");
7
- /**
8
- *
9
- * WARNING IF UPDATING THIS FILE, YOU MUST UPDATE THE ROUTE SCHEMAS FILES TOO
10
- *
11
- * WARNING IF UPDATING THIS FILE, YOU MUST UPDATE THE ROUTE SCHEMAS FILES TOO
12
- *
13
- * WARNING IF UPDATING THIS FILE, YOU MUST UPDATE THE ROUTE SCHEMAS FILES TOO
14
- *
15
- * See @metriport/api/src/routes/medical/schemas/cohort.ts
16
- *
17
- */
18
7
  exports.COHORT_COLORS = [
19
8
  "red",
20
9
  "green",
@@ -35,15 +24,11 @@ exports.DEFAULT_SCHEDULE = {
35
24
  enabled: false,
36
25
  frequency: exports.DEFAULT_FREQUENCY,
37
26
  };
38
- exports.DEFAULT_SCHEDULE_HIE = {
39
- enabled: false,
40
- frequency: exports.DEFAULT_FREQUENCY,
41
- };
42
27
  exports.DEFAULT_NOTIFICATION = {
43
28
  notifications: false,
44
29
  };
45
30
  exports.DEFAULT_NOTIFICATION_SCHEDULE = {
46
- notifications: exports.DEFAULT_NOTIFICATION.notifications,
31
+ ...exports.DEFAULT_NOTIFICATION,
47
32
  schedule: exports.DEFAULT_SCHEDULE,
48
33
  };
49
34
  const DEFAULT_ADT = {
@@ -51,12 +36,14 @@ const DEFAULT_ADT = {
51
36
  };
52
37
  exports.DEFAULT_MONITORING = {
53
38
  adt: (0, lodash_1.cloneDeep)(DEFAULT_ADT),
54
- hie: (0, lodash_1.cloneDeep)(exports.DEFAULT_SCHEDULE_HIE),
39
+ hie: (0, lodash_1.cloneDeep)(exports.DEFAULT_SCHEDULE),
55
40
  pharmacy: (0, lodash_1.cloneDeep)(exports.DEFAULT_NOTIFICATION_SCHEDULE),
56
41
  laboratory: (0, lodash_1.cloneDeep)(exports.DEFAULT_NOTIFICATION),
57
42
  };
43
+ exports.DEFAULT_OVERRIDES = {};
58
44
  exports.DEFAULT_SETTINGS = {
59
45
  monitoring: exports.DEFAULT_MONITORING,
46
+ overrides: exports.DEFAULT_OVERRIDES,
60
47
  };
61
48
  function responseDtoFromCohort(cohort) {
62
49
  //eslint-disable-next-line @typescript-eslint/no-unused-vars
@@ -1 +1 @@
1
- {"version":3,"file":"cohort.js","sourceRoot":"","sources":["../../src/domain/cohort.ts"],"names":[],"mappings":";;;AAAA,mCAAmC;AACnC,sDAAuD;AAGvD,uCAA+C;AAE/C;;;;;;;;;;GAUG;AAEU,QAAA,aAAa,GAAG;IAC3B,KAAK;IACL,OAAO;IACP,MAAM;IACN,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,MAAM;IACN,OAAO;IACP,MAAM;IACN,OAAO;IACP,OAAO;CACC,CAAC;AAEE,QAAA,kBAAkB,GAAG,CAAC,SAAS,EAAE,UAAU,EAAE,QAAQ,CAAU,CAAC;AAEhE,QAAA,aAAa,GAAG,OAAO,CAAC;AAExB,QAAA,iBAAiB,GAAG,SAAS,CAAC;AAC9B,QAAA,gBAAgB,GAAa;IACxC,OAAO,EAAE,KAAK;IACd,SAAS,EAAE,yBAAiB;CAC7B,CAAC;AAEW,QAAA,oBAAoB,GAAa;IAC5C,OAAO,EAAE,KAAK;IACd,SAAS,EAAE,yBAAiB;CAC7B,CAAC;AAEW,QAAA,oBAAoB,GAAiB;IAChD,aAAa,EAAE,KAAK;CACrB,CAAC;AAEW,QAAA,6BAA6B,GAAyB;IACjE,aAAa,EAAE,4BAAoB,CAAC,aAAa;IACjD,QAAQ,EAAE,wBAAgB;CAC3B,CAAC;AAEF,MAAM,WAAW,GAAc;IAC7B,OAAO,EAAE,KAAK;CACf,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,IAAI,EAAE,MAAM,CAAC,IAAI;QACjB,KAAK,EAAE,MAAM,CAAC,KAAK;QACnB,WAAW,EAAE,MAAM,CAAC,WAAW;QAC/B,QAAQ,EAAE,wBAAwB;KACnC,CAAC;AACJ,CAAC;AAXD,sDAWC;AACD,0BAA0B;AACb,QAAA,wBAAwB,GAAG,GAAG,CAAC;AAE5C,SAAgB,mBAAmB,CAAC,IAAY;IAC9C,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;IAC5B,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE;QACxB,MAAM,IAAI,6BAAe,CAAC,6BAA6B,CAAC,CAAC;KAC1D;IACD,OAAO,OAAO,CAAC;AACjB,CAAC;AAND,kDAMC"}
@@ -0,0 +1,30 @@
1
+ import { DocumentQueryStatus } from "./document-query";
2
+ export type NetworkQueryParams = {
3
+ cxId: string;
4
+ facilityId: string;
5
+ patientId: string;
6
+ requestId?: string;
7
+ };
8
+ export type NetworkQueryProgress = {
9
+ networks: SourceQueryProgress[];
10
+ };
11
+ export declare const hieSource = "hie";
12
+ export declare const pharmacySource = "pharmacy";
13
+ export declare const laboratorySource = "laboratory";
14
+ export declare const networkSources: readonly ["hie", "pharmacy", "laboratory"];
15
+ export type NetworkSource = (typeof networkSources)[number];
16
+ export type SourceQueryProgress = {
17
+ type: NetworkSource;
18
+ source?: string;
19
+ status: DocumentQueryStatus;
20
+ startedAt?: Date;
21
+ requestId?: string;
22
+ documents?: {
23
+ downloadInProgress: number;
24
+ downloaded: number;
25
+ converted: number;
26
+ failed: number;
27
+ total: number;
28
+ };
29
+ };
30
+ //# sourceMappingURL=network-query.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"network-query.d.ts","sourceRoot":"","sources":["../../../src/domain/network/network-query.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAEvD,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,QAAQ,EAAE,mBAAmB,EAAE,CAAC;CACjC,CAAC;AAEF,eAAO,MAAM,SAAS,QAAQ,CAAC;AAC/B,eAAO,MAAM,cAAc,aAAa,CAAC;AACzC,eAAO,MAAM,gBAAgB,eAAe,CAAC;AAC7C,eAAO,MAAM,cAAc,4CAAyD,CAAC;AACrF,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;AAE5D,MAAM,MAAM,mBAAmB,GAAG;IAChC,IAAI,EAAE,aAAa,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,mBAAmB,CAAC;IAC5B,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE;QACV,kBAAkB,EAAE,MAAM,CAAC;QAC3B,UAAU,EAAE,MAAM,CAAC;QACnB,SAAS,EAAE,MAAM,CAAC;QAClB,MAAM,EAAE,MAAM,CAAC;QACf,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;CACH,CAAC"}
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.networkSources = exports.laboratorySource = exports.pharmacySource = exports.hieSource = void 0;
4
+ exports.hieSource = "hie";
5
+ exports.pharmacySource = "pharmacy";
6
+ exports.laboratorySource = "laboratory";
7
+ exports.networkSources = [exports.hieSource, exports.pharmacySource, exports.laboratorySource];
8
+ //# sourceMappingURL=network-query.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"network-query.js","sourceRoot":"","sources":["../../../src/domain/network/network-query.ts"],"names":[],"mappings":";;;AAaa,QAAA,SAAS,GAAG,KAAK,CAAC;AAClB,QAAA,cAAc,GAAG,UAAU,CAAC;AAC5B,QAAA,gBAAgB,GAAG,YAAY,CAAC;AAChC,QAAA,cAAc,GAAG,CAAC,iBAAS,EAAE,sBAAc,EAAE,wBAAgB,CAAU,CAAC"}
@@ -0,0 +1,31 @@
1
+ export declare const sourceQueryStatus: readonly ["processing", "completed", "failed"];
2
+ export type SourceQueryStatus = (typeof sourceQueryStatus)[number];
3
+ export type NetworkQueryParams = {
4
+ cxId: string;
5
+ facilityId: string;
6
+ patientId: string;
7
+ requestId?: string;
8
+ };
9
+ export type NetworkQueryProgress = {
10
+ networks: SourceQueryStatus[];
11
+ };
12
+ export declare const hieSource = "hie";
13
+ export declare const pharmacySource = "pharmacy";
14
+ export declare const laboratorySource = "laboratory";
15
+ export declare const networkSources: readonly ["hie", "pharmacy", "laboratory"];
16
+ export type NetworkSource = (typeof networkSources)[number];
17
+ export type SourceQueryProgress = {
18
+ type: NetworkSource;
19
+ source?: string;
20
+ status: SourceQueryStatus;
21
+ startedAt?: Date;
22
+ requestId?: string;
23
+ documents?: {
24
+ downloadInProgress: number;
25
+ downloaded: number;
26
+ converted: number;
27
+ failed: number;
28
+ total: number;
29
+ };
30
+ };
31
+ //# sourceMappingURL=network-query.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"network-query.d.ts","sourceRoot":"","sources":["../../../src/domain/network-query/network-query.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB,gDAAiD,CAAC;AAChF,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEnE,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,QAAQ,EAAE,iBAAiB,EAAE,CAAC;CAC/B,CAAC;AAEF,eAAO,MAAM,SAAS,QAAQ,CAAC;AAC/B,eAAO,MAAM,cAAc,aAAa,CAAC;AACzC,eAAO,MAAM,gBAAgB,eAAe,CAAC;AAC7C,eAAO,MAAM,cAAc,4CAAyD,CAAC;AACrF,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;AAE5D,MAAM,MAAM,mBAAmB,GAAG;IAChC,IAAI,EAAE,aAAa,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,iBAAiB,CAAC;IAC1B,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE;QACV,kBAAkB,EAAE,MAAM,CAAC;QAC3B,UAAU,EAAE,MAAM,CAAC;QACnB,SAAS,EAAE,MAAM,CAAC;QAClB,MAAM,EAAE,MAAM,CAAC;QACf,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;CACH,CAAC"}
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.networkSources = exports.laboratorySource = exports.pharmacySource = exports.hieSource = exports.sourceQueryStatus = void 0;
4
+ exports.sourceQueryStatus = ["processing", "completed", "failed"];
5
+ exports.hieSource = "hie";
6
+ exports.pharmacySource = "pharmacy";
7
+ exports.laboratorySource = "laboratory";
8
+ exports.networkSources = [exports.hieSource, exports.pharmacySource, exports.laboratorySource];
9
+ //# sourceMappingURL=network-query.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"network-query.js","sourceRoot":"","sources":["../../../src/domain/network-query/network-query.ts"],"names":[],"mappings":";;;AAAa,QAAA,iBAAiB,GAAG,CAAC,YAAY,EAAE,WAAW,EAAE,QAAQ,CAAU,CAAC;AAcnE,QAAA,SAAS,GAAG,KAAK,CAAC;AAClB,QAAA,cAAc,GAAG,UAAU,CAAC;AAC5B,QAAA,gBAAgB,GAAG,YAAY,CAAC;AAChC,QAAA,cAAc,GAAG,CAAC,iBAAS,EAAE,sBAAc,EAAE,wBAAgB,CAAU,CAAC"}
@@ -0,0 +1,52 @@
1
+ import { z } from "zod";
2
+ import { NetworkSource } from "./source";
3
+ export declare const networkQueryBodySchema: z.ZodObject<{
4
+ sources: z.ZodArray<z.ZodEnum<["hie", "pharmacy", "laboratory"]>, "many">;
5
+ override: z.ZodOptional<z.ZodBoolean>;
6
+ commonwell: z.ZodOptional<z.ZodBoolean>;
7
+ carequality: z.ZodOptional<z.ZodBoolean>;
8
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
9
+ }, "strip", z.ZodTypeAny, {
10
+ sources: ("pharmacy" | "hie" | "laboratory")[];
11
+ override?: boolean | undefined;
12
+ commonwell?: boolean | undefined;
13
+ carequality?: boolean | undefined;
14
+ metadata?: Record<string, string> | undefined;
15
+ }, {
16
+ sources: ("pharmacy" | "hie" | "laboratory")[];
17
+ override?: boolean | undefined;
18
+ commonwell?: boolean | undefined;
19
+ carequality?: boolean | undefined;
20
+ metadata?: Record<string, string> | undefined;
21
+ }>;
22
+ export declare const networkQueryParamsSchema: z.ZodObject<{
23
+ cxId: z.ZodString;
24
+ facilityId: z.ZodString;
25
+ patientId: z.ZodString;
26
+ requestId: z.ZodOptional<z.ZodString>;
27
+ }, "strip", z.ZodTypeAny, {
28
+ cxId: string;
29
+ patientId: string;
30
+ facilityId: string;
31
+ requestId?: string | undefined;
32
+ }, {
33
+ cxId: string;
34
+ patientId: string;
35
+ facilityId: string;
36
+ requestId?: string | undefined;
37
+ }>;
38
+ export type NetworkQueryCmd = {
39
+ cxId: string;
40
+ facilityId: string;
41
+ patientId: string;
42
+ sources: NetworkSource[];
43
+ override?: boolean;
44
+ commonwell?: boolean;
45
+ carequality?: boolean;
46
+ metadata?: Record<string, string>;
47
+ };
48
+ export type NetworkQueryStatusCmd = {
49
+ cxId: string;
50
+ patientId: string;
51
+ };
52
+ //# sourceMappingURL=query.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../../src/domain/network-query/query.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,aAAa,EAAuB,MAAM,UAAU,CAAC;AAE9D,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;EAMjC,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;EAKnC,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,aAAa,EAAE,CAAC;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACnC,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC"}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.networkQueryParamsSchema = exports.networkQueryBodySchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const source_1 = require("./source");
6
+ exports.networkQueryBodySchema = zod_1.z.object({
7
+ sources: zod_1.z.array(source_1.networkSourceSchema).min(1),
8
+ override: zod_1.z.boolean().optional(),
9
+ commonwell: zod_1.z.boolean().optional(),
10
+ carequality: zod_1.z.boolean().optional(),
11
+ metadata: zod_1.z.record(zod_1.z.string().min(1).max(40), zod_1.z.string().max(500)).optional(),
12
+ });
13
+ exports.networkQueryParamsSchema = zod_1.z.object({
14
+ cxId: zod_1.z.string(),
15
+ facilityId: zod_1.z.string(),
16
+ patientId: zod_1.z.string(),
17
+ requestId: zod_1.z.string().optional(),
18
+ });
19
+ //# sourceMappingURL=query.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query.js","sourceRoot":"","sources":["../../../src/domain/network-query/query.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,qCAA8D;AAEjD,QAAA,sBAAsB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC7C,OAAO,EAAE,OAAC,CAAC,KAAK,CAAC,4BAAmB,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IAC5C,QAAQ,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IAChC,UAAU,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IAClC,WAAW,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IACnC,QAAQ,EAAE,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,QAAQ,EAAE;CAC9E,CAAC,CAAC;AAEU,QAAA,wBAAwB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC/C,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;IAChB,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE;IACtB,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE;IACrB,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACjC,CAAC,CAAC"}
@@ -0,0 +1,35 @@
1
+ import { z } from "zod";
2
+ import { NetworkQueryCmd, NetworkQueryStatusCmd } from "./query";
3
+ export declare const hieSource = "hie";
4
+ export declare const pharmacySource = "pharmacy";
5
+ export declare const laboratorySource = "laboratory";
6
+ export declare const networkSources: readonly ["hie", "pharmacy", "laboratory"];
7
+ export declare const networkSourceSchema: z.ZodEnum<["hie", "pharmacy", "laboratory"]>;
8
+ export type NetworkSource = (typeof networkSources)[number];
9
+ export declare function isNetworkSource(source: string): source is NetworkSource;
10
+ export declare const sourceQueryStatus: readonly ["processing", "completed", "failed"];
11
+ export type SourceQueryStatus = (typeof sourceQueryStatus)[number];
12
+ export type SourceQueryCmd = Omit<NetworkQueryCmd, "sources"> & {
13
+ source: NetworkSource;
14
+ };
15
+ export type SourceQueryStatusCmd = NetworkQueryStatusCmd & {
16
+ source: NetworkSource;
17
+ };
18
+ export interface SourceQueryProgress {
19
+ type: NetworkSource;
20
+ source?: string;
21
+ status: SourceQueryStatus;
22
+ startedAt?: Date;
23
+ requestId?: string;
24
+ documents?: {
25
+ downloadInProgress: number;
26
+ downloaded: number;
27
+ converted: number;
28
+ failed: number;
29
+ total: number;
30
+ };
31
+ }
32
+ export interface NetworkQueryProgress {
33
+ sources: SourceQueryProgress[];
34
+ }
35
+ //# sourceMappingURL=source.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"source.d.ts","sourceRoot":"","sources":["../../../src/domain/network-query/source.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAEjE,eAAO,MAAM,SAAS,QAAQ,CAAC;AAC/B,eAAO,MAAM,cAAc,aAAa,CAAC;AACzC,eAAO,MAAM,gBAAgB,eAAe,CAAC;AAC7C,eAAO,MAAM,cAAc,4CAAyD,CAAC;AACrF,eAAO,MAAM,mBAAmB,8CAAyB,CAAC;AAC1D,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;AAE5D,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,IAAI,aAAa,CAEvE;AAED,eAAO,MAAM,iBAAiB,gDAAiD,CAAC;AAChF,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEnE,MAAM,MAAM,cAAc,GAAG,IAAI,CAAC,eAAe,EAAE,SAAS,CAAC,GAAG;IAAE,MAAM,EAAE,aAAa,CAAA;CAAE,CAAC;AAC1F,MAAM,MAAM,oBAAoB,GAAG,qBAAqB,GAAG;IAAE,MAAM,EAAE,aAAa,CAAA;CAAE,CAAC;AAErF,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,aAAa,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,iBAAiB,CAAC;IAC1B,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE;QACV,kBAAkB,EAAE,MAAM,CAAC;QAC3B,UAAU,EAAE,MAAM,CAAC;QACnB,SAAS,EAAE,MAAM,CAAC;QAClB,MAAM,EAAE,MAAM,CAAC;QACf,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;CACH;AAED,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,mBAAmB,EAAE,CAAC;CAChC"}
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.sourceQueryStatus = exports.isNetworkSource = exports.networkSourceSchema = exports.networkSources = exports.laboratorySource = exports.pharmacySource = exports.hieSource = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.hieSource = "hie";
6
+ exports.pharmacySource = "pharmacy";
7
+ exports.laboratorySource = "laboratory";
8
+ exports.networkSources = [exports.hieSource, exports.pharmacySource, exports.laboratorySource];
9
+ exports.networkSourceSchema = zod_1.z.enum(exports.networkSources);
10
+ function isNetworkSource(source) {
11
+ return exports.networkSourceSchema.safeParse(source).success;
12
+ }
13
+ exports.isNetworkSource = isNetworkSource;
14
+ exports.sourceQueryStatus = ["processing", "completed", "failed"];
15
+ //# sourceMappingURL=source.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"source.js","sourceRoot":"","sources":["../../../src/domain/network-query/source.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAGX,QAAA,SAAS,GAAG,KAAK,CAAC;AAClB,QAAA,cAAc,GAAG,UAAU,CAAC;AAC5B,QAAA,gBAAgB,GAAG,YAAY,CAAC;AAChC,QAAA,cAAc,GAAG,CAAC,iBAAS,EAAE,sBAAc,EAAE,wBAAgB,CAAU,CAAC;AACxE,QAAA,mBAAmB,GAAG,OAAC,CAAC,IAAI,CAAC,sBAAc,CAAC,CAAC;AAG1D,SAAgB,eAAe,CAAC,MAAc;IAC5C,OAAO,2BAAmB,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC;AACvD,CAAC;AAFD,0CAEC;AAEY,QAAA,iBAAiB,GAAG,CAAC,YAAY,EAAE,WAAW,EAAE,QAAQ,CAAU,CAAC"}
@@ -0,0 +1,31 @@
1
+ export declare const sourceQueryStatus: readonly ["processing", "completed", "failed"];
2
+ export type SourceQueryStatus = (typeof sourceQueryStatus)[number];
3
+ export type NetworkQueryParams = {
4
+ cxId: string;
5
+ facilityId: string;
6
+ patientId: string;
7
+ requestId?: string;
8
+ };
9
+ export type NetworkQueryProgress = {
10
+ networks: SourceQueryStatus[];
11
+ };
12
+ export declare const hieSource = "hie";
13
+ export declare const pharmacySource = "pharmacy";
14
+ export declare const laboratorySource = "laboratory";
15
+ export declare const networkSources: readonly ["hie", "pharmacy", "laboratory"];
16
+ export type NetworkSource = (typeof networkSources)[number];
17
+ export type SourceQueryProgress = {
18
+ type: NetworkSource;
19
+ source?: string;
20
+ status: SourceQueryStatus;
21
+ startedAt?: Date;
22
+ requestId?: string;
23
+ documents?: {
24
+ downloadInProgress: number;
25
+ downloaded: number;
26
+ converted: number;
27
+ failed: number;
28
+ total: number;
29
+ };
30
+ };
31
+ //# sourceMappingURL=network-query.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"network-query.d.ts","sourceRoot":"","sources":["../../../src/domain/network-qyert/network-query.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB,gDAAiD,CAAC;AAChF,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEnE,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,QAAQ,EAAE,iBAAiB,EAAE,CAAC;CAC/B,CAAC;AAEF,eAAO,MAAM,SAAS,QAAQ,CAAC;AAC/B,eAAO,MAAM,cAAc,aAAa,CAAC;AACzC,eAAO,MAAM,gBAAgB,eAAe,CAAC;AAC7C,eAAO,MAAM,cAAc,4CAAyD,CAAC;AACrF,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;AAE5D,MAAM,MAAM,mBAAmB,GAAG;IAChC,IAAI,EAAE,aAAa,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,iBAAiB,CAAC;IAC1B,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE;QACV,kBAAkB,EAAE,MAAM,CAAC;QAC3B,UAAU,EAAE,MAAM,CAAC;QACnB,SAAS,EAAE,MAAM,CAAC;QAClB,MAAM,EAAE,MAAM,CAAC;QACf,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;CACH,CAAC"}
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.networkSources = exports.laboratorySource = exports.pharmacySource = exports.hieSource = exports.sourceQueryStatus = void 0;
4
+ exports.sourceQueryStatus = ["processing", "completed", "failed"];
5
+ exports.hieSource = "hie";
6
+ exports.pharmacySource = "pharmacy";
7
+ exports.laboratorySource = "laboratory";
8
+ exports.networkSources = [exports.hieSource, exports.pharmacySource, exports.laboratorySource];
9
+ //# sourceMappingURL=network-query.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"network-query.js","sourceRoot":"","sources":["../../../src/domain/network-qyert/network-query.ts"],"names":[],"mappings":";;;AAAa,QAAA,iBAAiB,GAAG,CAAC,YAAY,EAAE,WAAW,EAAE,QAAQ,CAAU,CAAC;AAcnE,QAAA,SAAS,GAAG,KAAK,CAAC;AAClB,QAAA,cAAc,GAAG,UAAU,CAAC;AAC5B,QAAA,gBAAgB,GAAG,YAAY,CAAC;AAChC,QAAA,cAAc,GAAG,CAAC,iBAAS,EAAE,sBAAc,EAAE,wBAAgB,CAAU,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { CreateRosterCmd, GetRosterCmd, ListRostersCmd } from "./roster";
2
+ export type PatientRoster = {
3
+ id: string;
4
+ patientId: string;
5
+ rosterId: string;
6
+ };
7
+ export type AssignOrRemovePatientsToRosterCmd = Pick<GetRosterCmd, "rosterId" | "cxId"> & {
8
+ patientIds?: string[];
9
+ allPatients?: boolean;
10
+ overrideClose?: boolean;
11
+ };
12
+ export type AssignPatientsAndCreateRosterCmd = Omit<AssignOrRemovePatientsToRosterCmd, "rosterId"> & Omit<CreateRosterCmd, "cxId" | "status">;
13
+ export type ListRostersForPatientCmd = ListRostersCmd & {
14
+ patientId: string;
15
+ };
16
+ //# sourceMappingURL=patient-roster.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"patient-roster.d.ts","sourceRoot":"","sources":["../../../src/domain/roster/patient-roster.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAEzE,MAAM,MAAM,aAAa,GAAG;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,iCAAiC,GAAG,IAAI,CAAC,YAAY,EAAE,UAAU,GAAG,MAAM,CAAC,GAAG;IACxF,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,gCAAgC,GAAG,IAAI,CAAC,iCAAiC,EAAE,UAAU,CAAC,GAChG,IAAI,CAAC,eAAe,EAAE,MAAM,GAAG,QAAQ,CAAC,CAAC;AAE3C,MAAM,MAAM,wBAAwB,GAAG,cAAc,GAAG;IACtD,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=patient-roster.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"patient-roster.js","sourceRoot":"","sources":["../../../src/domain/roster/patient-roster.ts"],"names":[],"mappings":""}
@@ -0,0 +1,16 @@
1
+ export declare const rosterStatus: readonly ["open", "closed"];
2
+ export type RosterStatus = (typeof rosterStatus)[number];
3
+ export declare function isValidRosterStatus(status: string): status is RosterStatus;
4
+ export declare const rosterInitialStatus: RosterStatus;
5
+ export declare function isRosterOpen(status: RosterStatus): boolean;
6
+ export declare function isRosterClosed(status: RosterStatus): boolean;
7
+ /**
8
+ * Validates that a new status is valid based on the current status.
9
+ *
10
+ * @param currentStatus - The current status of the roster.
11
+ * @param newStatus - The new status to validate.
12
+ * @returns The validated new status.
13
+ * @throws BadRequestError if the new status is not valid.
14
+ */
15
+ export declare function validateNewRosterStatus(currentStatus: RosterStatus, newStatus: RosterStatus): RosterStatus;
16
+ //# sourceMappingURL=roster-status.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"roster-status.d.ts","sourceRoot":"","sources":["../../../src/domain/roster/roster-status.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY,6BAA8B,CAAC;AACxD,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC;AAEzD,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,IAAI,YAAY,CAE1E;AAED,eAAO,MAAM,mBAAmB,EAAE,YAAqB,CAAC;AAExD,wBAAgB,YAAY,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAE1D;AAED,wBAAgB,cAAc,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAE5D;AAED;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CACrC,aAAa,EAAE,YAAY,EAC3B,SAAS,EAAE,YAAY,GACtB,YAAY,CA4Bd"}