@metriport/shared 0.29.0 → 0.30.0-alpha.1

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 (207) hide show
  1. package/dist/common/sql.d.ts +17 -0
  2. package/dist/common/sql.d.ts.map +1 -0
  3. package/dist/common/sql.js +3 -0
  4. package/dist/common/sql.js.map +1 -0
  5. package/dist/domain/cohort.d.ts +4 -4
  6. package/dist/domain/cohort.d.ts.map +1 -1
  7. package/dist/domain/cohort.js +7 -3
  8. package/dist/domain/cohort.js.map +1 -1
  9. package/dist/domain/contact/__tests__/phone.test.js +4 -0
  10. package/dist/domain/contact/__tests__/phone.test.js.map +1 -1
  11. package/dist/domain/cql-engine/transform.d.ts +2 -2
  12. package/dist/domain/db.d.ts +8 -0
  13. package/dist/domain/db.d.ts.map +1 -1
  14. package/dist/domain/db.js +1 -0
  15. package/dist/domain/db.js.map +1 -1
  16. package/dist/domain/network-query/__tests__/source.test.d.ts +2 -0
  17. package/dist/domain/network-query/__tests__/source.test.d.ts.map +1 -0
  18. package/dist/domain/network-query/__tests__/source.test.js +450 -0
  19. package/dist/domain/network-query/__tests__/source.test.js.map +1 -0
  20. package/dist/domain/network-query/index.d.ts +3 -0
  21. package/dist/domain/network-query/index.d.ts.map +1 -0
  22. package/dist/domain/network-query/index.js +19 -0
  23. package/dist/domain/network-query/index.js.map +1 -0
  24. package/dist/domain/network-query/query.d.ts +18 -3
  25. package/dist/domain/network-query/query.d.ts.map +1 -1
  26. package/dist/domain/network-query/source.d.ts +309 -19
  27. package/dist/domain/network-query/source.d.ts.map +1 -1
  28. package/dist/domain/network-query/source.js +257 -4
  29. package/dist/domain/network-query/source.js.map +1 -1
  30. package/dist/domain/organization.d.ts +3 -3
  31. package/dist/domain/organization.js +1 -1
  32. package/dist/domain/organization.js.map +1 -1
  33. package/dist/domain/patient/patient-monitoring/discharge-requery.d.ts +132 -0
  34. package/dist/domain/patient/patient-monitoring/discharge-requery.d.ts.map +1 -1
  35. package/dist/domain/patient/patient-monitoring/discharge-requery.js +10 -1
  36. package/dist/domain/patient/patient-monitoring/discharge-requery.js.map +1 -1
  37. package/dist/domain/patient/patient-monitoring/utils.d.ts +31 -0
  38. package/dist/domain/patient/patient-monitoring/utils.d.ts.map +1 -1
  39. package/dist/domain/patient/patient-monitoring/utils.js +68 -7
  40. package/dist/domain/patient/patient-monitoring/utils.js.map +1 -1
  41. package/dist/domain/roster/patient-roster.d.ts +5 -1
  42. package/dist/domain/roster/patient-roster.d.ts.map +1 -1
  43. package/dist/domain/tcm-encounter.d.ts +5 -2
  44. package/dist/domain/tcm-encounter.d.ts.map +1 -1
  45. package/dist/domain/tcm-encounter.js +1 -0
  46. package/dist/domain/tcm-encounter.js.map +1 -1
  47. package/dist/error/shared.js +1 -1
  48. package/dist/error/shared.js.map +1 -1
  49. package/dist/external/ehr/practicefusion/allergy-data-map.d.ts +34 -0
  50. package/dist/external/ehr/practicefusion/allergy-data-map.d.ts.map +1 -0
  51. package/dist/external/ehr/practicefusion/allergy-data-map.js +2612 -0
  52. package/dist/external/ehr/practicefusion/allergy-data-map.js.map +1 -0
  53. package/dist/external/ehr/practicefusion/index.d.ts +3 -0
  54. package/dist/external/ehr/practicefusion/index.d.ts.map +1 -0
  55. package/dist/external/ehr/practicefusion/index.js +19 -0
  56. package/dist/external/ehr/practicefusion/index.js.map +1 -0
  57. package/dist/external/ehr/practicefusion/shared.d.ts +18 -0
  58. package/dist/external/ehr/practicefusion/shared.d.ts.map +1 -0
  59. package/dist/external/ehr/practicefusion/shared.js +66 -0
  60. package/dist/external/ehr/practicefusion/shared.js.map +1 -0
  61. package/dist/external/ihe/constants.d.ts +11 -0
  62. package/dist/external/ihe/constants.d.ts.map +1 -1
  63. package/dist/external/ihe/constants.js +65 -1
  64. package/dist/external/ihe/constants.js.map +1 -1
  65. package/dist/external/ihe/index.d.ts +3 -0
  66. package/dist/external/ihe/index.d.ts.map +1 -0
  67. package/dist/external/ihe/index.js +19 -0
  68. package/dist/external/ihe/index.js.map +1 -0
  69. package/dist/external/ihe/shared.d.ts +8 -0
  70. package/dist/external/ihe/shared.d.ts.map +1 -0
  71. package/dist/external/ihe/shared.js +25 -0
  72. package/dist/external/ihe/shared.js.map +1 -0
  73. package/dist/external/index.d.ts +1 -0
  74. package/dist/external/index.d.ts.map +1 -1
  75. package/dist/external/index.js +1 -0
  76. package/dist/external/index.js.map +1 -1
  77. package/dist/index.d.ts +3 -3
  78. package/dist/index.d.ts.map +1 -1
  79. package/dist/index.js +3 -3
  80. package/dist/index.js.map +1 -1
  81. package/dist/interface/external/ehr/athenahealth/cx-mapping.d.ts +5 -1
  82. package/dist/interface/external/ehr/athenahealth/cx-mapping.d.ts.map +1 -1
  83. package/dist/interface/external/ehr/athenahealth/cx-mapping.js +2 -1
  84. package/dist/interface/external/ehr/athenahealth/cx-mapping.js.map +1 -1
  85. package/dist/interface/external/ehr/canvas/cx-mapping.d.ts +6 -2
  86. package/dist/interface/external/ehr/canvas/cx-mapping.d.ts.map +1 -1
  87. package/dist/interface/external/ehr/canvas/cx-mapping.js +2 -1
  88. package/dist/interface/external/ehr/canvas/cx-mapping.js.map +1 -1
  89. package/dist/interface/external/ehr/eclinicalworks/cx-mapping.d.ts +465 -0
  90. package/dist/interface/external/ehr/eclinicalworks/cx-mapping.d.ts.map +1 -0
  91. package/dist/interface/external/ehr/eclinicalworks/cx-mapping.js +10 -0
  92. package/dist/interface/external/ehr/eclinicalworks/cx-mapping.js.map +1 -0
  93. package/dist/interface/external/ehr/elation/cx-mapping.d.ts +5 -1
  94. package/dist/interface/external/ehr/elation/cx-mapping.d.ts.map +1 -1
  95. package/dist/interface/external/ehr/elation/cx-mapping.js +2 -1
  96. package/dist/interface/external/ehr/elation/cx-mapping.js.map +1 -1
  97. package/dist/interface/external/ehr/embed/jwt-token.d.ts +2 -2
  98. package/dist/interface/external/ehr/healthie/cx-mapping.d.ts +5 -1
  99. package/dist/interface/external/ehr/healthie/cx-mapping.d.ts.map +1 -1
  100. package/dist/interface/external/ehr/healthie/cx-mapping.js +2 -1
  101. package/dist/interface/external/ehr/healthie/cx-mapping.js.map +1 -1
  102. package/dist/interface/external/ehr/healthie/medication.d.ts +8 -8
  103. package/dist/interface/external/ehr/practicefusion/allergy.d.ts +16 -0
  104. package/dist/interface/external/ehr/practicefusion/allergy.d.ts.map +1 -0
  105. package/dist/interface/external/ehr/practicefusion/allergy.js +39 -0
  106. package/dist/interface/external/ehr/practicefusion/allergy.js.map +1 -0
  107. package/dist/interface/external/ehr/practicefusion/appointment.d.ts +137 -0
  108. package/dist/interface/external/ehr/practicefusion/appointment.d.ts.map +1 -0
  109. package/dist/interface/external/ehr/practicefusion/appointment.js +29 -0
  110. package/dist/interface/external/ehr/practicefusion/appointment.js.map +1 -0
  111. package/dist/interface/external/ehr/practicefusion/condition.d.ts +17 -0
  112. package/dist/interface/external/ehr/practicefusion/condition.d.ts.map +1 -0
  113. package/dist/interface/external/ehr/practicefusion/condition.js +13 -0
  114. package/dist/interface/external/ehr/practicefusion/condition.js.map +1 -0
  115. package/dist/interface/external/ehr/practicefusion/cx-mapping.d.ts +472 -0
  116. package/dist/interface/external/ehr/practicefusion/cx-mapping.d.ts.map +1 -0
  117. package/dist/interface/external/ehr/practicefusion/cx-mapping.js +13 -0
  118. package/dist/interface/external/ehr/practicefusion/cx-mapping.js.map +1 -0
  119. package/dist/interface/external/ehr/practicefusion/fhir-resources.d.ts +8 -0
  120. package/dist/interface/external/ehr/practicefusion/fhir-resources.d.ts.map +1 -0
  121. package/dist/interface/external/ehr/practicefusion/fhir-resources.js +3 -0
  122. package/dist/interface/external/ehr/practicefusion/fhir-resources.js.map +1 -0
  123. package/dist/interface/external/ehr/practicefusion/index.d.ts +2 -0
  124. package/dist/interface/external/ehr/practicefusion/index.d.ts.map +1 -1
  125. package/dist/interface/external/ehr/practicefusion/index.js +2 -0
  126. package/dist/interface/external/ehr/practicefusion/index.js.map +1 -1
  127. package/dist/interface/external/ehr/practicefusion/jwt-token.d.ts +15 -3
  128. package/dist/interface/external/ehr/practicefusion/jwt-token.d.ts.map +1 -1
  129. package/dist/interface/external/ehr/practicefusion/jwt-token.js +8 -2
  130. package/dist/interface/external/ehr/practicefusion/jwt-token.js.map +1 -1
  131. package/dist/interface/external/ehr/practicefusion/medication.d.ts +17 -0
  132. package/dist/interface/external/ehr/practicefusion/medication.d.ts.map +1 -0
  133. package/dist/interface/external/ehr/practicefusion/medication.js +13 -0
  134. package/dist/interface/external/ehr/practicefusion/medication.js.map +1 -0
  135. package/dist/interface/external/ehr/practicefusion/refresh-token.d.ts +19 -0
  136. package/dist/interface/external/ehr/practicefusion/refresh-token.d.ts.map +1 -0
  137. package/dist/interface/external/ehr/practicefusion/refresh-token.js +11 -0
  138. package/dist/interface/external/ehr/practicefusion/refresh-token.js.map +1 -0
  139. package/dist/interface/external/ehr/practicefusion/write-back.d.ts +47 -0
  140. package/dist/interface/external/ehr/practicefusion/write-back.d.ts.map +1 -0
  141. package/dist/interface/external/ehr/practicefusion/write-back.js +29 -0
  142. package/dist/interface/external/ehr/practicefusion/write-back.js.map +1 -0
  143. package/dist/interface/external/ehr/salesforce/cx-mapping.d.ts +465 -0
  144. package/dist/interface/external/ehr/salesforce/cx-mapping.d.ts.map +1 -0
  145. package/dist/interface/external/ehr/salesforce/cx-mapping.js +10 -0
  146. package/dist/interface/external/ehr/salesforce/cx-mapping.js.map +1 -0
  147. package/dist/interface/external/ehr/shared.d.ts +8 -0
  148. package/dist/interface/external/ehr/shared.d.ts.map +1 -1
  149. package/dist/interface/external/ehr/shared.js +4 -1
  150. package/dist/interface/external/ehr/shared.js.map +1 -1
  151. package/dist/interface/external/ehr/source.d.ts +2 -0
  152. package/dist/interface/external/ehr/source.d.ts.map +1 -1
  153. package/dist/interface/external/ehr/source.js +6 -1
  154. package/dist/interface/external/ehr/source.js.map +1 -1
  155. package/dist/interface/external/index.d.ts +1 -0
  156. package/dist/interface/external/index.d.ts.map +1 -1
  157. package/dist/interface/external/index.js +1 -0
  158. package/dist/interface/external/index.js.map +1 -1
  159. package/dist/interface/external/surescripts/index.d.ts +2 -0
  160. package/dist/interface/external/surescripts/index.d.ts.map +1 -1
  161. package/dist/interface/external/surescripts/index.js +2 -0
  162. package/dist/interface/external/surescripts/index.js.map +1 -1
  163. package/dist/interface/internal/cohort.d.ts +1000 -0
  164. package/dist/interface/internal/cohort.d.ts.map +1 -0
  165. package/dist/interface/internal/cohort.js +62 -0
  166. package/dist/interface/internal/cohort.js.map +1 -0
  167. package/dist/interface/internal/document-query.d.ts +31 -0
  168. package/dist/interface/internal/document-query.d.ts.map +1 -0
  169. package/dist/interface/internal/document-query.js +21 -0
  170. package/dist/interface/internal/document-query.js.map +1 -0
  171. package/dist/interface/internal/index.d.ts +2 -0
  172. package/dist/interface/internal/index.d.ts.map +1 -1
  173. package/dist/interface/internal/index.js +2 -0
  174. package/dist/interface/internal/index.js.map +1 -1
  175. package/dist/medical/fhir/constants.d.ts +1 -0
  176. package/dist/medical/fhir/constants.d.ts.map +1 -1
  177. package/dist/medical/fhir/constants.js +2 -1
  178. package/dist/medical/fhir/constants.js.map +1 -1
  179. package/dist/medical/webhook/webhook-request.d.ts +683 -2
  180. package/dist/medical/webhook/webhook-request.d.ts.map +1 -1
  181. package/dist/medical/webhook/webhook-request.js +57 -2
  182. package/dist/medical/webhook/webhook-request.js.map +1 -1
  183. package/dist/net/axios.d.ts +3 -0
  184. package/dist/net/axios.d.ts.map +1 -0
  185. package/dist/net/axios.js +21 -0
  186. package/dist/net/axios.js.map +1 -0
  187. package/dist/net/http.d.ts +25 -0
  188. package/dist/net/http.d.ts.map +1 -0
  189. package/dist/net/http.js +76 -0
  190. package/dist/net/http.js.map +1 -0
  191. package/dist/net/index.d.ts +6 -0
  192. package/dist/net/index.d.ts.map +1 -0
  193. package/dist/net/index.js +22 -0
  194. package/dist/net/index.js.map +1 -0
  195. package/dist/net/retry.d.ts +1 -0
  196. package/dist/net/retry.d.ts.map +1 -1
  197. package/dist/net/retry.js +8 -1
  198. package/dist/net/retry.js.map +1 -1
  199. package/dist/util/duration.d.ts +1 -0
  200. package/dist/util/duration.d.ts.map +1 -1
  201. package/dist/util/duration.js +15 -1
  202. package/dist/util/duration.js.map +1 -1
  203. package/dist/util/zod.d.ts +2 -0
  204. package/dist/util/zod.d.ts.map +1 -1
  205. package/dist/util/zod.js +10 -1
  206. package/dist/util/zod.js.map +1 -1
  207. package/package.json +6 -2
@@ -14,9 +14,17 @@ declare const hl7NotificationWebhookTypeSchema: z.ZodEnum<["patient.admit", "pat
14
14
  export type Hl7WebhookTypeSchemaType = z.infer<typeof hl7NotificationWebhookTypeSchema>;
15
15
  export declare const bulkPatientImportWebhookTypeSchema: z.ZodLiteral<"medical.bulk-patient-create">;
16
16
  export type BulkPatientImportWebhookType = z.infer<typeof bulkPatientImportWebhookTypeSchema>;
17
- export declare const mapiWebhookTypeSchema: z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"medical.consolidated-data">, z.ZodLiteral<"medical.consolidated-data">]>, z.ZodLiteral<"medical.document-download">]>, z.ZodLiteral<"medical.document-conversion">]>, z.ZodLiteral<"medical.document-bulk-download-urls">]>, z.ZodEnum<["patient.admit", "patient.discharge", "patient.transfer"]>]>, z.ZodLiteral<"medical.bulk-patient-create">]>;
17
+ export declare const networkQueryHieWebhookTypeSchema: z.ZodLiteral<"network-query.hie">;
18
+ export type NetworkQueryHieWebhookType = z.infer<typeof networkQueryHieWebhookTypeSchema>;
19
+ export declare const networkQueryPharmacyWebhookTypeSchema: z.ZodLiteral<"network-query.pharmacy">;
20
+ export type NetworkQueryPharmacyWebhookType = z.infer<typeof networkQueryPharmacyWebhookTypeSchema>;
21
+ export declare const networkQueryLabWebhookTypeSchema: z.ZodLiteral<"network-query.lab">;
22
+ export type NetworkQueryLabWebhookType = z.infer<typeof networkQueryLabWebhookTypeSchema>;
23
+ export declare const networkQueryWebhookTypeSchema: z.ZodUnion<[z.ZodLiteral<"network-query.hie">, z.ZodLiteral<"network-query.pharmacy">, z.ZodLiteral<"network-query.lab">]>;
24
+ export type NetworkQueryWebhookType = z.infer<typeof networkQueryWebhookTypeSchema>;
25
+ export declare const mapiWebhookTypeSchema: z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"medical.consolidated-data">, z.ZodLiteral<"medical.consolidated-data">]>, z.ZodLiteral<"medical.document-download">]>, z.ZodLiteral<"medical.document-conversion">]>, z.ZodLiteral<"medical.document-bulk-download-urls">]>, z.ZodEnum<["patient.admit", "patient.discharge", "patient.transfer"]>]>, z.ZodLiteral<"medical.bulk-patient-create">]>, z.ZodUnion<[z.ZodLiteral<"network-query.hie">, z.ZodLiteral<"network-query.pharmacy">, z.ZodLiteral<"network-query.lab">]>]>;
18
26
  export type MAPIWebhookType = z.infer<typeof mapiWebhookTypeSchema>;
19
- export declare const webhookTypeSchema: z.ZodUnion<[z.ZodLiteral<"ping">, z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"medical.consolidated-data">, z.ZodLiteral<"medical.consolidated-data">]>, z.ZodLiteral<"medical.document-download">]>, z.ZodLiteral<"medical.document-conversion">]>, z.ZodLiteral<"medical.document-bulk-download-urls">]>, z.ZodEnum<["patient.admit", "patient.discharge", "patient.transfer"]>]>, z.ZodLiteral<"medical.bulk-patient-create">]>]>;
27
+ export declare const webhookTypeSchema: z.ZodUnion<[z.ZodLiteral<"ping">, z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"medical.consolidated-data">, z.ZodLiteral<"medical.consolidated-data">]>, z.ZodLiteral<"medical.document-download">]>, z.ZodLiteral<"medical.document-conversion">]>, z.ZodLiteral<"medical.document-bulk-download-urls">]>, z.ZodEnum<["patient.admit", "patient.discharge", "patient.transfer"]>]>, z.ZodLiteral<"medical.bulk-patient-create">]>, z.ZodUnion<[z.ZodLiteral<"network-query.hie">, z.ZodLiteral<"network-query.pharmacy">, z.ZodLiteral<"network-query.lab">]>]>]>;
20
28
  export type WebhookType = z.infer<typeof webhookTypeSchema>;
21
29
  export declare const webhookRequestStatus: readonly ["processing", "success", "failure"];
22
30
  export type WebhookRequestStatus = (typeof webhookRequestStatus)[number];
@@ -1054,6 +1062,366 @@ export declare const bulkPatientImportWebhookRequestSchema: z.ZodObject<{
1054
1062
  };
1055
1063
  }>;
1056
1064
  export type BulkPatientImportWebhookRequest = z.infer<typeof bulkPatientImportWebhookRequestSchema>;
1065
+ export declare const networkQuerySourceTypeSchema: z.ZodEnum<["hie", "pharmacy", "lab"]>;
1066
+ export type NetworkQuerySourceType = z.infer<typeof networkQuerySourceTypeSchema>;
1067
+ export declare const networkQueryWebhookPayloadSchema: z.ZodObject<{
1068
+ patientId: z.ZodString;
1069
+ externalId: z.ZodOptional<z.ZodString>;
1070
+ consolidatedDataUrl: z.ZodString;
1071
+ source: z.ZodObject<{
1072
+ type: z.ZodEnum<["hie", "pharmacy", "lab"]>;
1073
+ source: z.ZodOptional<z.ZodString>;
1074
+ status: z.ZodEnum<["completed", "failed"]>;
1075
+ completedAt: z.ZodEffects<z.ZodString, string, string>;
1076
+ }, "strip", z.ZodTypeAny, {
1077
+ type: "pharmacy" | "hie" | "lab";
1078
+ status: "completed" | "failed";
1079
+ completedAt: string;
1080
+ source?: string | undefined;
1081
+ }, {
1082
+ type: "pharmacy" | "hie" | "lab";
1083
+ status: "completed" | "failed";
1084
+ completedAt: string;
1085
+ source?: string | undefined;
1086
+ }>;
1087
+ }, "strip", z.ZodTypeAny, {
1088
+ patientId: string;
1089
+ source: {
1090
+ type: "pharmacy" | "hie" | "lab";
1091
+ status: "completed" | "failed";
1092
+ completedAt: string;
1093
+ source?: string | undefined;
1094
+ };
1095
+ consolidatedDataUrl: string;
1096
+ externalId?: string | undefined;
1097
+ }, {
1098
+ patientId: string;
1099
+ source: {
1100
+ type: "pharmacy" | "hie" | "lab";
1101
+ status: "completed" | "failed";
1102
+ completedAt: string;
1103
+ source?: string | undefined;
1104
+ };
1105
+ consolidatedDataUrl: string;
1106
+ externalId?: string | undefined;
1107
+ }>;
1108
+ export type NetworkQueryWebhookPayload = z.infer<typeof networkQueryWebhookPayloadSchema>;
1109
+ export declare const networkQueryHieWebhookRequestSchema: z.ZodObject<{
1110
+ meta: z.ZodObject<z.objectUtil.extendShape<{
1111
+ messageId: z.ZodString;
1112
+ requestId: z.ZodOptional<z.ZodString>;
1113
+ when: z.ZodEffects<z.ZodString, string, string>;
1114
+ /**
1115
+ * The metadata sent by the customer when they triggered the operation that resulted in this webhook.
1116
+ */
1117
+ data: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
1118
+ }, {
1119
+ type: z.ZodLiteral<"network-query.hie">;
1120
+ }>, "strip", z.ZodTypeAny, {
1121
+ type: "network-query.hie";
1122
+ messageId: string;
1123
+ when: string;
1124
+ requestId?: string | undefined;
1125
+ data?: unknown;
1126
+ }, {
1127
+ type: "network-query.hie";
1128
+ messageId: string;
1129
+ when: string;
1130
+ requestId?: string | undefined;
1131
+ data?: unknown;
1132
+ }>;
1133
+ payload: z.ZodObject<{
1134
+ patientId: z.ZodString;
1135
+ externalId: z.ZodOptional<z.ZodString>;
1136
+ consolidatedDataUrl: z.ZodString;
1137
+ source: z.ZodObject<{
1138
+ type: z.ZodEnum<["hie", "pharmacy", "lab"]>;
1139
+ source: z.ZodOptional<z.ZodString>;
1140
+ status: z.ZodEnum<["completed", "failed"]>;
1141
+ completedAt: z.ZodEffects<z.ZodString, string, string>;
1142
+ }, "strip", z.ZodTypeAny, {
1143
+ type: "pharmacy" | "hie" | "lab";
1144
+ status: "completed" | "failed";
1145
+ completedAt: string;
1146
+ source?: string | undefined;
1147
+ }, {
1148
+ type: "pharmacy" | "hie" | "lab";
1149
+ status: "completed" | "failed";
1150
+ completedAt: string;
1151
+ source?: string | undefined;
1152
+ }>;
1153
+ }, "strip", z.ZodTypeAny, {
1154
+ patientId: string;
1155
+ source: {
1156
+ type: "pharmacy" | "hie" | "lab";
1157
+ status: "completed" | "failed";
1158
+ completedAt: string;
1159
+ source?: string | undefined;
1160
+ };
1161
+ consolidatedDataUrl: string;
1162
+ externalId?: string | undefined;
1163
+ }, {
1164
+ patientId: string;
1165
+ source: {
1166
+ type: "pharmacy" | "hie" | "lab";
1167
+ status: "completed" | "failed";
1168
+ completedAt: string;
1169
+ source?: string | undefined;
1170
+ };
1171
+ consolidatedDataUrl: string;
1172
+ externalId?: string | undefined;
1173
+ }>;
1174
+ }, "strip", z.ZodTypeAny, {
1175
+ meta: {
1176
+ type: "network-query.hie";
1177
+ messageId: string;
1178
+ when: string;
1179
+ requestId?: string | undefined;
1180
+ data?: unknown;
1181
+ };
1182
+ payload: {
1183
+ patientId: string;
1184
+ source: {
1185
+ type: "pharmacy" | "hie" | "lab";
1186
+ status: "completed" | "failed";
1187
+ completedAt: string;
1188
+ source?: string | undefined;
1189
+ };
1190
+ consolidatedDataUrl: string;
1191
+ externalId?: string | undefined;
1192
+ };
1193
+ }, {
1194
+ meta: {
1195
+ type: "network-query.hie";
1196
+ messageId: string;
1197
+ when: string;
1198
+ requestId?: string | undefined;
1199
+ data?: unknown;
1200
+ };
1201
+ payload: {
1202
+ patientId: string;
1203
+ source: {
1204
+ type: "pharmacy" | "hie" | "lab";
1205
+ status: "completed" | "failed";
1206
+ completedAt: string;
1207
+ source?: string | undefined;
1208
+ };
1209
+ consolidatedDataUrl: string;
1210
+ externalId?: string | undefined;
1211
+ };
1212
+ }>;
1213
+ export type NetworkQueryHieWebhookRequest = z.infer<typeof networkQueryHieWebhookRequestSchema>;
1214
+ export declare const networkQueryPharmacyWebhookRequestSchema: z.ZodObject<{
1215
+ meta: z.ZodObject<z.objectUtil.extendShape<{
1216
+ messageId: z.ZodString;
1217
+ requestId: z.ZodOptional<z.ZodString>;
1218
+ when: z.ZodEffects<z.ZodString, string, string>;
1219
+ /**
1220
+ * The metadata sent by the customer when they triggered the operation that resulted in this webhook.
1221
+ */
1222
+ data: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
1223
+ }, {
1224
+ type: z.ZodLiteral<"network-query.pharmacy">;
1225
+ }>, "strip", z.ZodTypeAny, {
1226
+ type: "network-query.pharmacy";
1227
+ messageId: string;
1228
+ when: string;
1229
+ requestId?: string | undefined;
1230
+ data?: unknown;
1231
+ }, {
1232
+ type: "network-query.pharmacy";
1233
+ messageId: string;
1234
+ when: string;
1235
+ requestId?: string | undefined;
1236
+ data?: unknown;
1237
+ }>;
1238
+ payload: z.ZodObject<{
1239
+ patientId: z.ZodString;
1240
+ externalId: z.ZodOptional<z.ZodString>;
1241
+ consolidatedDataUrl: z.ZodString;
1242
+ source: z.ZodObject<{
1243
+ type: z.ZodEnum<["hie", "pharmacy", "lab"]>;
1244
+ source: z.ZodOptional<z.ZodString>;
1245
+ status: z.ZodEnum<["completed", "failed"]>;
1246
+ completedAt: z.ZodEffects<z.ZodString, string, string>;
1247
+ }, "strip", z.ZodTypeAny, {
1248
+ type: "pharmacy" | "hie" | "lab";
1249
+ status: "completed" | "failed";
1250
+ completedAt: string;
1251
+ source?: string | undefined;
1252
+ }, {
1253
+ type: "pharmacy" | "hie" | "lab";
1254
+ status: "completed" | "failed";
1255
+ completedAt: string;
1256
+ source?: string | undefined;
1257
+ }>;
1258
+ }, "strip", z.ZodTypeAny, {
1259
+ patientId: string;
1260
+ source: {
1261
+ type: "pharmacy" | "hie" | "lab";
1262
+ status: "completed" | "failed";
1263
+ completedAt: string;
1264
+ source?: string | undefined;
1265
+ };
1266
+ consolidatedDataUrl: string;
1267
+ externalId?: string | undefined;
1268
+ }, {
1269
+ patientId: string;
1270
+ source: {
1271
+ type: "pharmacy" | "hie" | "lab";
1272
+ status: "completed" | "failed";
1273
+ completedAt: string;
1274
+ source?: string | undefined;
1275
+ };
1276
+ consolidatedDataUrl: string;
1277
+ externalId?: string | undefined;
1278
+ }>;
1279
+ }, "strip", z.ZodTypeAny, {
1280
+ meta: {
1281
+ type: "network-query.pharmacy";
1282
+ messageId: string;
1283
+ when: string;
1284
+ requestId?: string | undefined;
1285
+ data?: unknown;
1286
+ };
1287
+ payload: {
1288
+ patientId: string;
1289
+ source: {
1290
+ type: "pharmacy" | "hie" | "lab";
1291
+ status: "completed" | "failed";
1292
+ completedAt: string;
1293
+ source?: string | undefined;
1294
+ };
1295
+ consolidatedDataUrl: string;
1296
+ externalId?: string | undefined;
1297
+ };
1298
+ }, {
1299
+ meta: {
1300
+ type: "network-query.pharmacy";
1301
+ messageId: string;
1302
+ when: string;
1303
+ requestId?: string | undefined;
1304
+ data?: unknown;
1305
+ };
1306
+ payload: {
1307
+ patientId: string;
1308
+ source: {
1309
+ type: "pharmacy" | "hie" | "lab";
1310
+ status: "completed" | "failed";
1311
+ completedAt: string;
1312
+ source?: string | undefined;
1313
+ };
1314
+ consolidatedDataUrl: string;
1315
+ externalId?: string | undefined;
1316
+ };
1317
+ }>;
1318
+ export type NetworkQueryPharmacyWebhookRequest = z.infer<typeof networkQueryPharmacyWebhookRequestSchema>;
1319
+ export declare const networkQueryLabWebhookRequestSchema: z.ZodObject<{
1320
+ meta: z.ZodObject<z.objectUtil.extendShape<{
1321
+ messageId: z.ZodString;
1322
+ requestId: z.ZodOptional<z.ZodString>;
1323
+ when: z.ZodEffects<z.ZodString, string, string>;
1324
+ /**
1325
+ * The metadata sent by the customer when they triggered the operation that resulted in this webhook.
1326
+ */
1327
+ data: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
1328
+ }, {
1329
+ type: z.ZodLiteral<"network-query.lab">;
1330
+ }>, "strip", z.ZodTypeAny, {
1331
+ type: "network-query.lab";
1332
+ messageId: string;
1333
+ when: string;
1334
+ requestId?: string | undefined;
1335
+ data?: unknown;
1336
+ }, {
1337
+ type: "network-query.lab";
1338
+ messageId: string;
1339
+ when: string;
1340
+ requestId?: string | undefined;
1341
+ data?: unknown;
1342
+ }>;
1343
+ payload: z.ZodObject<{
1344
+ patientId: z.ZodString;
1345
+ externalId: z.ZodOptional<z.ZodString>;
1346
+ consolidatedDataUrl: z.ZodString;
1347
+ source: z.ZodObject<{
1348
+ type: z.ZodEnum<["hie", "pharmacy", "lab"]>;
1349
+ source: z.ZodOptional<z.ZodString>;
1350
+ status: z.ZodEnum<["completed", "failed"]>;
1351
+ completedAt: z.ZodEffects<z.ZodString, string, string>;
1352
+ }, "strip", z.ZodTypeAny, {
1353
+ type: "pharmacy" | "hie" | "lab";
1354
+ status: "completed" | "failed";
1355
+ completedAt: string;
1356
+ source?: string | undefined;
1357
+ }, {
1358
+ type: "pharmacy" | "hie" | "lab";
1359
+ status: "completed" | "failed";
1360
+ completedAt: string;
1361
+ source?: string | undefined;
1362
+ }>;
1363
+ }, "strip", z.ZodTypeAny, {
1364
+ patientId: string;
1365
+ source: {
1366
+ type: "pharmacy" | "hie" | "lab";
1367
+ status: "completed" | "failed";
1368
+ completedAt: string;
1369
+ source?: string | undefined;
1370
+ };
1371
+ consolidatedDataUrl: string;
1372
+ externalId?: string | undefined;
1373
+ }, {
1374
+ patientId: string;
1375
+ source: {
1376
+ type: "pharmacy" | "hie" | "lab";
1377
+ status: "completed" | "failed";
1378
+ completedAt: string;
1379
+ source?: string | undefined;
1380
+ };
1381
+ consolidatedDataUrl: string;
1382
+ externalId?: string | undefined;
1383
+ }>;
1384
+ }, "strip", z.ZodTypeAny, {
1385
+ meta: {
1386
+ type: "network-query.lab";
1387
+ messageId: string;
1388
+ when: string;
1389
+ requestId?: string | undefined;
1390
+ data?: unknown;
1391
+ };
1392
+ payload: {
1393
+ patientId: string;
1394
+ source: {
1395
+ type: "pharmacy" | "hie" | "lab";
1396
+ status: "completed" | "failed";
1397
+ completedAt: string;
1398
+ source?: string | undefined;
1399
+ };
1400
+ consolidatedDataUrl: string;
1401
+ externalId?: string | undefined;
1402
+ };
1403
+ }, {
1404
+ meta: {
1405
+ type: "network-query.lab";
1406
+ messageId: string;
1407
+ when: string;
1408
+ requestId?: string | undefined;
1409
+ data?: unknown;
1410
+ };
1411
+ payload: {
1412
+ patientId: string;
1413
+ source: {
1414
+ type: "pharmacy" | "hie" | "lab";
1415
+ status: "completed" | "failed";
1416
+ completedAt: string;
1417
+ source?: string | undefined;
1418
+ };
1419
+ consolidatedDataUrl: string;
1420
+ externalId?: string | undefined;
1421
+ };
1422
+ }>;
1423
+ export type NetworkQueryLabWebhookRequest = z.infer<typeof networkQueryLabWebhookRequestSchema>;
1424
+ export type NetworkQueryWebhookRequest = NetworkQueryHieWebhookRequest | NetworkQueryPharmacyWebhookRequest | NetworkQueryLabWebhookRequest;
1057
1425
  export declare const patientAdmitWebhookPayloadSchema: z.ZodObject<{
1058
1426
  url: z.ZodString;
1059
1427
  patientId: z.ZodString;
@@ -2197,6 +2565,315 @@ export declare const webhookRequestSchema: z.ZodUnion<[z.ZodObject<{
2197
2565
  requestId: string;
2198
2566
  result?: string | null | undefined;
2199
2567
  };
2568
+ }>, z.ZodObject<{
2569
+ meta: z.ZodObject<z.objectUtil.extendShape<{
2570
+ messageId: z.ZodString;
2571
+ requestId: z.ZodOptional<z.ZodString>;
2572
+ when: z.ZodEffects<z.ZodString, string, string>;
2573
+ /**
2574
+ * The metadata sent by the customer when they triggered the operation that resulted in this webhook.
2575
+ */
2576
+ data: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
2577
+ }, {
2578
+ type: z.ZodLiteral<"network-query.hie">;
2579
+ }>, "strip", z.ZodTypeAny, {
2580
+ type: "network-query.hie";
2581
+ messageId: string;
2582
+ when: string;
2583
+ requestId?: string | undefined;
2584
+ data?: unknown;
2585
+ }, {
2586
+ type: "network-query.hie";
2587
+ messageId: string;
2588
+ when: string;
2589
+ requestId?: string | undefined;
2590
+ data?: unknown;
2591
+ }>;
2592
+ payload: z.ZodObject<{
2593
+ patientId: z.ZodString;
2594
+ externalId: z.ZodOptional<z.ZodString>;
2595
+ consolidatedDataUrl: z.ZodString;
2596
+ source: z.ZodObject<{
2597
+ type: z.ZodEnum<["hie", "pharmacy", "lab"]>;
2598
+ source: z.ZodOptional<z.ZodString>;
2599
+ status: z.ZodEnum<["completed", "failed"]>;
2600
+ completedAt: z.ZodEffects<z.ZodString, string, string>;
2601
+ }, "strip", z.ZodTypeAny, {
2602
+ type: "pharmacy" | "hie" | "lab";
2603
+ status: "completed" | "failed";
2604
+ completedAt: string;
2605
+ source?: string | undefined;
2606
+ }, {
2607
+ type: "pharmacy" | "hie" | "lab";
2608
+ status: "completed" | "failed";
2609
+ completedAt: string;
2610
+ source?: string | undefined;
2611
+ }>;
2612
+ }, "strip", z.ZodTypeAny, {
2613
+ patientId: string;
2614
+ source: {
2615
+ type: "pharmacy" | "hie" | "lab";
2616
+ status: "completed" | "failed";
2617
+ completedAt: string;
2618
+ source?: string | undefined;
2619
+ };
2620
+ consolidatedDataUrl: string;
2621
+ externalId?: string | undefined;
2622
+ }, {
2623
+ patientId: string;
2624
+ source: {
2625
+ type: "pharmacy" | "hie" | "lab";
2626
+ status: "completed" | "failed";
2627
+ completedAt: string;
2628
+ source?: string | undefined;
2629
+ };
2630
+ consolidatedDataUrl: string;
2631
+ externalId?: string | undefined;
2632
+ }>;
2633
+ }, "strip", z.ZodTypeAny, {
2634
+ meta: {
2635
+ type: "network-query.hie";
2636
+ messageId: string;
2637
+ when: string;
2638
+ requestId?: string | undefined;
2639
+ data?: unknown;
2640
+ };
2641
+ payload: {
2642
+ patientId: string;
2643
+ source: {
2644
+ type: "pharmacy" | "hie" | "lab";
2645
+ status: "completed" | "failed";
2646
+ completedAt: string;
2647
+ source?: string | undefined;
2648
+ };
2649
+ consolidatedDataUrl: string;
2650
+ externalId?: string | undefined;
2651
+ };
2652
+ }, {
2653
+ meta: {
2654
+ type: "network-query.hie";
2655
+ messageId: string;
2656
+ when: string;
2657
+ requestId?: string | undefined;
2658
+ data?: unknown;
2659
+ };
2660
+ payload: {
2661
+ patientId: string;
2662
+ source: {
2663
+ type: "pharmacy" | "hie" | "lab";
2664
+ status: "completed" | "failed";
2665
+ completedAt: string;
2666
+ source?: string | undefined;
2667
+ };
2668
+ consolidatedDataUrl: string;
2669
+ externalId?: string | undefined;
2670
+ };
2671
+ }>, z.ZodObject<{
2672
+ meta: z.ZodObject<z.objectUtil.extendShape<{
2673
+ messageId: z.ZodString;
2674
+ requestId: z.ZodOptional<z.ZodString>;
2675
+ when: z.ZodEffects<z.ZodString, string, string>;
2676
+ /**
2677
+ * The metadata sent by the customer when they triggered the operation that resulted in this webhook.
2678
+ */
2679
+ data: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
2680
+ }, {
2681
+ type: z.ZodLiteral<"network-query.pharmacy">;
2682
+ }>, "strip", z.ZodTypeAny, {
2683
+ type: "network-query.pharmacy";
2684
+ messageId: string;
2685
+ when: string;
2686
+ requestId?: string | undefined;
2687
+ data?: unknown;
2688
+ }, {
2689
+ type: "network-query.pharmacy";
2690
+ messageId: string;
2691
+ when: string;
2692
+ requestId?: string | undefined;
2693
+ data?: unknown;
2694
+ }>;
2695
+ payload: z.ZodObject<{
2696
+ patientId: z.ZodString;
2697
+ externalId: z.ZodOptional<z.ZodString>;
2698
+ consolidatedDataUrl: z.ZodString;
2699
+ source: z.ZodObject<{
2700
+ type: z.ZodEnum<["hie", "pharmacy", "lab"]>;
2701
+ source: z.ZodOptional<z.ZodString>;
2702
+ status: z.ZodEnum<["completed", "failed"]>;
2703
+ completedAt: z.ZodEffects<z.ZodString, string, string>;
2704
+ }, "strip", z.ZodTypeAny, {
2705
+ type: "pharmacy" | "hie" | "lab";
2706
+ status: "completed" | "failed";
2707
+ completedAt: string;
2708
+ source?: string | undefined;
2709
+ }, {
2710
+ type: "pharmacy" | "hie" | "lab";
2711
+ status: "completed" | "failed";
2712
+ completedAt: string;
2713
+ source?: string | undefined;
2714
+ }>;
2715
+ }, "strip", z.ZodTypeAny, {
2716
+ patientId: string;
2717
+ source: {
2718
+ type: "pharmacy" | "hie" | "lab";
2719
+ status: "completed" | "failed";
2720
+ completedAt: string;
2721
+ source?: string | undefined;
2722
+ };
2723
+ consolidatedDataUrl: string;
2724
+ externalId?: string | undefined;
2725
+ }, {
2726
+ patientId: string;
2727
+ source: {
2728
+ type: "pharmacy" | "hie" | "lab";
2729
+ status: "completed" | "failed";
2730
+ completedAt: string;
2731
+ source?: string | undefined;
2732
+ };
2733
+ consolidatedDataUrl: string;
2734
+ externalId?: string | undefined;
2735
+ }>;
2736
+ }, "strip", z.ZodTypeAny, {
2737
+ meta: {
2738
+ type: "network-query.pharmacy";
2739
+ messageId: string;
2740
+ when: string;
2741
+ requestId?: string | undefined;
2742
+ data?: unknown;
2743
+ };
2744
+ payload: {
2745
+ patientId: string;
2746
+ source: {
2747
+ type: "pharmacy" | "hie" | "lab";
2748
+ status: "completed" | "failed";
2749
+ completedAt: string;
2750
+ source?: string | undefined;
2751
+ };
2752
+ consolidatedDataUrl: string;
2753
+ externalId?: string | undefined;
2754
+ };
2755
+ }, {
2756
+ meta: {
2757
+ type: "network-query.pharmacy";
2758
+ messageId: string;
2759
+ when: string;
2760
+ requestId?: string | undefined;
2761
+ data?: unknown;
2762
+ };
2763
+ payload: {
2764
+ patientId: string;
2765
+ source: {
2766
+ type: "pharmacy" | "hie" | "lab";
2767
+ status: "completed" | "failed";
2768
+ completedAt: string;
2769
+ source?: string | undefined;
2770
+ };
2771
+ consolidatedDataUrl: string;
2772
+ externalId?: string | undefined;
2773
+ };
2774
+ }>, z.ZodObject<{
2775
+ meta: z.ZodObject<z.objectUtil.extendShape<{
2776
+ messageId: z.ZodString;
2777
+ requestId: z.ZodOptional<z.ZodString>;
2778
+ when: z.ZodEffects<z.ZodString, string, string>;
2779
+ /**
2780
+ * The metadata sent by the customer when they triggered the operation that resulted in this webhook.
2781
+ */
2782
+ data: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
2783
+ }, {
2784
+ type: z.ZodLiteral<"network-query.lab">;
2785
+ }>, "strip", z.ZodTypeAny, {
2786
+ type: "network-query.lab";
2787
+ messageId: string;
2788
+ when: string;
2789
+ requestId?: string | undefined;
2790
+ data?: unknown;
2791
+ }, {
2792
+ type: "network-query.lab";
2793
+ messageId: string;
2794
+ when: string;
2795
+ requestId?: string | undefined;
2796
+ data?: unknown;
2797
+ }>;
2798
+ payload: z.ZodObject<{
2799
+ patientId: z.ZodString;
2800
+ externalId: z.ZodOptional<z.ZodString>;
2801
+ consolidatedDataUrl: z.ZodString;
2802
+ source: z.ZodObject<{
2803
+ type: z.ZodEnum<["hie", "pharmacy", "lab"]>;
2804
+ source: z.ZodOptional<z.ZodString>;
2805
+ status: z.ZodEnum<["completed", "failed"]>;
2806
+ completedAt: z.ZodEffects<z.ZodString, string, string>;
2807
+ }, "strip", z.ZodTypeAny, {
2808
+ type: "pharmacy" | "hie" | "lab";
2809
+ status: "completed" | "failed";
2810
+ completedAt: string;
2811
+ source?: string | undefined;
2812
+ }, {
2813
+ type: "pharmacy" | "hie" | "lab";
2814
+ status: "completed" | "failed";
2815
+ completedAt: string;
2816
+ source?: string | undefined;
2817
+ }>;
2818
+ }, "strip", z.ZodTypeAny, {
2819
+ patientId: string;
2820
+ source: {
2821
+ type: "pharmacy" | "hie" | "lab";
2822
+ status: "completed" | "failed";
2823
+ completedAt: string;
2824
+ source?: string | undefined;
2825
+ };
2826
+ consolidatedDataUrl: string;
2827
+ externalId?: string | undefined;
2828
+ }, {
2829
+ patientId: string;
2830
+ source: {
2831
+ type: "pharmacy" | "hie" | "lab";
2832
+ status: "completed" | "failed";
2833
+ completedAt: string;
2834
+ source?: string | undefined;
2835
+ };
2836
+ consolidatedDataUrl: string;
2837
+ externalId?: string | undefined;
2838
+ }>;
2839
+ }, "strip", z.ZodTypeAny, {
2840
+ meta: {
2841
+ type: "network-query.lab";
2842
+ messageId: string;
2843
+ when: string;
2844
+ requestId?: string | undefined;
2845
+ data?: unknown;
2846
+ };
2847
+ payload: {
2848
+ patientId: string;
2849
+ source: {
2850
+ type: "pharmacy" | "hie" | "lab";
2851
+ status: "completed" | "failed";
2852
+ completedAt: string;
2853
+ source?: string | undefined;
2854
+ };
2855
+ consolidatedDataUrl: string;
2856
+ externalId?: string | undefined;
2857
+ };
2858
+ }, {
2859
+ meta: {
2860
+ type: "network-query.lab";
2861
+ messageId: string;
2862
+ when: string;
2863
+ requestId?: string | undefined;
2864
+ data?: unknown;
2865
+ };
2866
+ payload: {
2867
+ patientId: string;
2868
+ source: {
2869
+ type: "pharmacy" | "hie" | "lab";
2870
+ status: "completed" | "failed";
2871
+ completedAt: string;
2872
+ source?: string | undefined;
2873
+ };
2874
+ consolidatedDataUrl: string;
2875
+ externalId?: string | undefined;
2876
+ };
2200
2877
  }>, z.ZodObject<{
2201
2878
  meta: z.ZodObject<z.objectUtil.extendShape<{
2202
2879
  messageId: z.ZodString;
@@ -2539,5 +3216,9 @@ export declare function isBulkPatientImportWebhookRequest(whRequest: WebhookRequ
2539
3216
  export declare function isPatientAdmitWebhookRequest(whRequest: WebhookRequest): whRequest is PatientAdmitWebhookRequest;
2540
3217
  export declare function isPatientTransferWebhookRequest(whRequest: WebhookRequest): whRequest is PatientTransferWebhookRequest;
2541
3218
  export declare function isPatientDischargeWebhookRequest(whRequest: WebhookRequest): whRequest is PatientDischargeWebhookRequest;
3219
+ export declare function isNetworkQueryHieWebhookRequest(whRequest: WebhookRequest): whRequest is NetworkQueryHieWebhookRequest;
3220
+ export declare function isNetworkQueryPharmacyWebhookRequest(whRequest: WebhookRequest): whRequest is NetworkQueryPharmacyWebhookRequest;
3221
+ export declare function isNetworkQueryLabWebhookRequest(whRequest: WebhookRequest): whRequest is NetworkQueryLabWebhookRequest;
3222
+ export declare function isNetworkQueryWebhookRequest(whRequest: WebhookRequest): whRequest is NetworkQueryWebhookRequest;
2542
3223
  export {};
2543
3224
  //# sourceMappingURL=webhook-request.d.ts.map