@photonhealth/client 0.0.0-stage → 2.0.0-rc.2

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 (218) hide show
  1. package/LICENSE +15 -0
  2. package/README.md +234 -2
  3. package/dist/analytics/lifecycleEvents.d.ts +29 -0
  4. package/dist/analytics/lifecycleEvents.d.ts.map +1 -0
  5. package/dist/analytics/lifecycleEvents.js +72 -0
  6. package/dist/analytics/lifecycleEvents.js.map +1 -0
  7. package/dist/api/changes/applyOption.d.ts +41 -0
  8. package/dist/api/changes/applyOption.d.ts.map +1 -0
  9. package/dist/api/changes/applyOption.js +76 -0
  10. package/dist/api/changes/applyOption.js.map +1 -0
  11. package/dist/api/changes/classifyChanges.d.ts +9 -0
  12. package/dist/api/changes/classifyChanges.d.ts.map +1 -0
  13. package/dist/api/changes/classifyChanges.js +2 -0
  14. package/dist/api/changes/classifyChanges.js.map +1 -0
  15. package/dist/api/changes/index.d.ts +3 -0
  16. package/dist/api/changes/index.d.ts.map +1 -0
  17. package/dist/api/changes/index.js +3 -0
  18. package/dist/api/changes/index.js.map +1 -0
  19. package/dist/api/client.d.ts +48 -0
  20. package/dist/api/client.d.ts.map +1 -0
  21. package/dist/api/client.js +91 -0
  22. package/dist/api/client.js.map +1 -0
  23. package/dist/api/health.d.ts +4 -0
  24. package/dist/api/health.d.ts.map +1 -0
  25. package/dist/api/health.js +6 -0
  26. package/dist/api/health.js.map +1 -0
  27. package/dist/api/index.d.ts +24 -0
  28. package/dist/api/index.d.ts.map +1 -0
  29. package/dist/api/index.js +23 -0
  30. package/dist/api/index.js.map +1 -0
  31. package/dist/api/me.d.ts +37 -0
  32. package/dist/api/me.d.ts.map +1 -0
  33. package/dist/api/me.js +6 -0
  34. package/dist/api/me.js.map +1 -0
  35. package/dist/api/order.d.ts +33 -0
  36. package/dist/api/order.d.ts.map +1 -0
  37. package/dist/api/order.js +33 -0
  38. package/dist/api/order.js.map +1 -0
  39. package/dist/api/orders.d.ts +1047 -0
  40. package/dist/api/orders.d.ts.map +1 -0
  41. package/dist/api/orders.js +7 -0
  42. package/dist/api/orders.js.map +1 -0
  43. package/dist/api/patient.d.ts +36 -0
  44. package/dist/api/patient.d.ts.map +1 -0
  45. package/dist/api/patient.js +33 -0
  46. package/dist/api/patient.js.map +1 -0
  47. package/dist/api/prescription.d.ts +37 -0
  48. package/dist/api/prescription.d.ts.map +1 -0
  49. package/dist/api/prescription.js +39 -0
  50. package/dist/api/prescription.js.map +1 -0
  51. package/dist/api/results.d.ts +30 -0
  52. package/dist/api/results.d.ts.map +1 -0
  53. package/dist/api/results.js +26 -0
  54. package/dist/api/results.js.map +1 -0
  55. package/dist/gql/gql.d.ts +29 -0
  56. package/dist/gql/gql.d.ts.map +1 -0
  57. package/dist/gql/gql.js +15 -0
  58. package/dist/gql/gql.js.map +1 -0
  59. package/dist/gql/graphql.d.ts +18618 -0
  60. package/dist/gql/graphql.d.ts.map +1 -0
  61. package/dist/gql/graphql.js +6579 -0
  62. package/dist/gql/graphql.js.map +1 -0
  63. package/dist/gql/index.d.ts +2 -0
  64. package/dist/gql/index.d.ts.map +1 -0
  65. package/dist/gql/index.js +3 -0
  66. package/dist/gql/index.js.map +1 -0
  67. package/dist/index.d.ts +15 -0
  68. package/dist/index.d.ts.map +1 -0
  69. package/dist/index.js +15 -0
  70. package/dist/index.js.map +1 -0
  71. package/dist/meta/version.d.ts +2 -0
  72. package/dist/meta/version.d.ts.map +1 -0
  73. package/dist/meta/version.js +2 -0
  74. package/dist/meta/version.js.map +1 -0
  75. package/dist/photon/analytics.d.ts +39 -0
  76. package/dist/photon/analytics.d.ts.map +1 -0
  77. package/dist/photon/analytics.js +91 -0
  78. package/dist/photon/analytics.js.map +1 -0
  79. package/dist/photon/auth.d.ts +52 -0
  80. package/dist/photon/auth.d.ts.map +1 -0
  81. package/dist/photon/auth.js +30 -0
  82. package/dist/photon/auth.js.map +1 -0
  83. package/dist/photon/choices.d.ts +44 -0
  84. package/dist/photon/choices.d.ts.map +1 -0
  85. package/dist/photon/choices.js +58 -0
  86. package/dist/photon/choices.js.map +1 -0
  87. package/dist/photon/context.d.ts +29 -0
  88. package/dist/photon/context.d.ts.map +1 -0
  89. package/dist/photon/context.js +2 -0
  90. package/dist/photon/context.js.map +1 -0
  91. package/dist/photon/environments.d.ts +27 -0
  92. package/dist/photon/environments.d.ts.map +1 -0
  93. package/dist/photon/environments.js +27 -0
  94. package/dist/photon/environments.js.map +1 -0
  95. package/dist/photon/errors.d.ts +26 -0
  96. package/dist/photon/errors.d.ts.map +1 -0
  97. package/dist/photon/errors.js +42 -0
  98. package/dist/photon/errors.js.map +1 -0
  99. package/dist/photon/index.d.ts +26 -0
  100. package/dist/photon/index.d.ts.map +1 -0
  101. package/dist/photon/index.js +12 -0
  102. package/dist/photon/index.js.map +1 -0
  103. package/dist/photon/inputs.d.ts +7 -0
  104. package/dist/photon/inputs.d.ts.map +1 -0
  105. package/dist/photon/inputs.js +25 -0
  106. package/dist/photon/inputs.js.map +1 -0
  107. package/dist/photon/links.d.ts +68 -0
  108. package/dist/photon/links.d.ts.map +1 -0
  109. package/dist/photon/links.js +187 -0
  110. package/dist/photon/links.js.map +1 -0
  111. package/dist/photon/live.d.ts +62 -0
  112. package/dist/photon/live.d.ts.map +1 -0
  113. package/dist/photon/live.js +107 -0
  114. package/dist/photon/live.js.map +1 -0
  115. package/dist/photon/machine.d.ts +28 -0
  116. package/dist/photon/machine.d.ts.map +1 -0
  117. package/dist/photon/machine.js +53 -0
  118. package/dist/photon/machine.js.map +1 -0
  119. package/dist/photon/map.d.ts +14 -0
  120. package/dist/photon/map.d.ts.map +1 -0
  121. package/dist/photon/map.js +311 -0
  122. package/dist/photon/map.js.map +1 -0
  123. package/dist/photon/order.d.ts +168 -0
  124. package/dist/photon/order.d.ts.map +1 -0
  125. package/dist/photon/order.js +558 -0
  126. package/dist/photon/order.js.map +1 -0
  127. package/dist/photon/orders.d.ts +5 -0
  128. package/dist/photon/orders.d.ts.map +1 -0
  129. package/dist/photon/orders.js +39 -0
  130. package/dist/photon/orders.js.map +1 -0
  131. package/dist/photon/patient.d.ts +80 -0
  132. package/dist/photon/patient.d.ts.map +1 -0
  133. package/dist/photon/patient.js +347 -0
  134. package/dist/photon/patient.js.map +1 -0
  135. package/dist/photon/photon.d.ts +188 -0
  136. package/dist/photon/photon.d.ts.map +1 -0
  137. package/dist/photon/photon.js +395 -0
  138. package/dist/photon/photon.js.map +1 -0
  139. package/dist/photon/prescription.d.ts +145 -0
  140. package/dist/photon/prescription.d.ts.map +1 -0
  141. package/dist/photon/prescription.js +418 -0
  142. package/dist/photon/prescription.js.map +1 -0
  143. package/dist/photon/session.d.ts +89 -0
  144. package/dist/photon/session.d.ts.map +1 -0
  145. package/dist/photon/session.js +352 -0
  146. package/dist/photon/session.js.map +1 -0
  147. package/dist/photon/types.d.ts +643 -0
  148. package/dist/photon/types.d.ts.map +1 -0
  149. package/dist/photon/types.js +7 -0
  150. package/dist/photon/types.js.map +1 -0
  151. package/dist/test-utils/msw.d.ts +23 -0
  152. package/dist/test-utils/msw.d.ts.map +1 -0
  153. package/dist/test-utils/msw.js +51 -0
  154. package/dist/test-utils/msw.js.map +1 -0
  155. package/dist/testing/fakeNetworkApiClient.d.ts +39 -0
  156. package/dist/testing/fakeNetworkApiClient.d.ts.map +1 -0
  157. package/dist/testing/fakeNetworkApiClient.js +56 -0
  158. package/dist/testing/fakeNetworkApiClient.js.map +1 -0
  159. package/dist/testing/fixtures.d.ts +1098 -0
  160. package/dist/testing/fixtures.d.ts.map +1 -0
  161. package/dist/testing/fixtures.js +200 -0
  162. package/dist/testing/fixtures.js.map +1 -0
  163. package/dist/testing.d.ts +11 -0
  164. package/dist/testing.d.ts.map +1 -0
  165. package/dist/testing.js +10 -0
  166. package/dist/testing.js.map +1 -0
  167. package/package.json +67 -4
  168. package/src/analytics/lifecycleEvents.test.ts +417 -0
  169. package/src/analytics/lifecycleEvents.ts +155 -0
  170. package/src/api/changes/applyOption.ts +103 -0
  171. package/src/api/changes/classifyChanges.ts +10 -0
  172. package/src/api/changes/index.ts +2 -0
  173. package/src/api/client.ts +149 -0
  174. package/src/api/health.ts +7 -0
  175. package/src/api/index.ts +24 -0
  176. package/src/api/me.ts +7 -0
  177. package/src/api/order.ts +64 -0
  178. package/src/api/orders.ts +8 -0
  179. package/src/api/patient.ts +67 -0
  180. package/src/api/prescription.ts +86 -0
  181. package/src/api/results.ts +45 -0
  182. package/src/gql/gql.ts +68 -0
  183. package/src/gql/graphql.ts +9027 -0
  184. package/src/gql/index.ts +2 -0
  185. package/src/index.ts +14 -0
  186. package/src/meta/version.test.ts +10 -0
  187. package/src/meta/version.ts +1 -0
  188. package/src/operations/fragments.graphql +497 -0
  189. package/src/operations/health.graphql +4 -0
  190. package/src/operations/me.graphql +38 -0
  191. package/src/operations/order.graphql +42 -0
  192. package/src/operations/orders.graphql +35 -0
  193. package/src/operations/patient.graphql +62 -0
  194. package/src/operations/prescription.graphql +90 -0
  195. package/src/photon/analytics.ts +129 -0
  196. package/src/photon/auth.ts +69 -0
  197. package/src/photon/choices.ts +79 -0
  198. package/src/photon/context.ts +30 -0
  199. package/src/photon/environments.ts +49 -0
  200. package/src/photon/errors.ts +56 -0
  201. package/src/photon/index.ts +49 -0
  202. package/src/photon/inputs.ts +24 -0
  203. package/src/photon/links.ts +197 -0
  204. package/src/photon/live.ts +135 -0
  205. package/src/photon/machine.ts +90 -0
  206. package/src/photon/map.ts +371 -0
  207. package/src/photon/order.test.ts +142 -0
  208. package/src/photon/order.ts +661 -0
  209. package/src/photon/orders.ts +42 -0
  210. package/src/photon/patient.ts +386 -0
  211. package/src/photon/photon.ts +646 -0
  212. package/src/photon/prescription.ts +506 -0
  213. package/src/photon/session.ts +454 -0
  214. package/src/photon/types.ts +583 -0
  215. package/src/test-utils/msw.ts +72 -0
  216. package/src/testing/fakeNetworkApiClient.ts +56 -0
  217. package/src/testing/fixtures.ts +233 -0
  218. package/src/testing.ts +25 -0
@@ -0,0 +1,1047 @@
1
+ import type { NetworkClient, OperationVariables } from "./client.ts";
2
+ import { type OrdersQueryVariables } from "../gql/graphql.ts";
3
+ /** The read-only Orders query. It never routes an order, including a lone pharmacy match. */
4
+ export declare function orders(client: NetworkClient, input: OperationVariables<OrdersQueryVariables>): Promise<{
5
+ __typename: "AmbiguousPatientMatch";
6
+ reason: string;
7
+ candidates: Array<{
8
+ __typename: "PatientCandidate";
9
+ id: string;
10
+ firstName: string;
11
+ lastName: string | null;
12
+ dateOfBirth: string | null;
13
+ }>;
14
+ } | {
15
+ __typename: "OrdersPayload";
16
+ orders: Array<{
17
+ __typename: "Order";
18
+ id: string;
19
+ state: import("./index.ts").OrderState;
20
+ routablePharmacies?: {
21
+ __typename: "ChoicePage";
22
+ totalCount: number;
23
+ nextOffset: number | null;
24
+ options: Array<{
25
+ __typename: "Choice";
26
+ displayName: string;
27
+ reason: string | null;
28
+ operation: string;
29
+ argument: string | null;
30
+ value: string | null;
31
+ matchReasons: Array<{
32
+ __typename: "MatchReason";
33
+ type: import("./index.ts").MatchReasonType;
34
+ label: string;
35
+ confidence: import("./index.ts").ConfidenceLevel | null;
36
+ value: {
37
+ __typename: "QuantityValue";
38
+ displayValue: string;
39
+ value: number;
40
+ unit: string;
41
+ } | null;
42
+ }>;
43
+ entity: {
44
+ __typename: "Allergy";
45
+ } | {
46
+ __typename: "Diagnosis";
47
+ } | {
48
+ __typename: "MedicationCandidate";
49
+ } | {
50
+ __typename: "PatientCandidate";
51
+ } | {
52
+ __typename: "Pharmacy";
53
+ id: string;
54
+ name: string;
55
+ logo: string | null;
56
+ phone: string | null;
57
+ isOpen: boolean | null;
58
+ latitude: number | null;
59
+ longitude: number | null;
60
+ fulfillmentType: Array<import("./index.ts").FulfillmentType> | null;
61
+ hours: Array<{
62
+ __typename: "PharmacyHours";
63
+ openFrom: string;
64
+ openUntil: string;
65
+ dayOfWeek: import("./index.ts").DayOfWeek;
66
+ is24Hr: boolean;
67
+ timezone: string;
68
+ }> | null;
69
+ nextEvents: {
70
+ __typename: "PharmacyEvents";
71
+ open: {
72
+ __typename: "PharmacyCloseEvent";
73
+ type: string;
74
+ datetime: string;
75
+ } | {
76
+ __typename: "PharmacyOpen24HrEvent";
77
+ type: string;
78
+ } | {
79
+ __typename: "PharmacyOpenEvent";
80
+ type: string;
81
+ datetime: string;
82
+ };
83
+ close: {
84
+ __typename: "PharmacyCloseEvent";
85
+ type: string;
86
+ datetime: string;
87
+ } | {
88
+ __typename: "PharmacyOpen24HrEvent";
89
+ type: string;
90
+ } | {
91
+ __typename: "PharmacyOpenEvent";
92
+ type: string;
93
+ datetime: string;
94
+ };
95
+ } | null;
96
+ address: {
97
+ __typename: "PharmacyAddress";
98
+ street1: string | null;
99
+ street2: string | null;
100
+ city: string | null;
101
+ state: string | null;
102
+ postalCode: string | null;
103
+ } | null;
104
+ offers: Array<{
105
+ __typename: "PharmacyOffer";
106
+ source: string;
107
+ prescriptionId: string;
108
+ priceType: import("./index.ts").OfferPriceType | null;
109
+ isPromoted: boolean;
110
+ redemptionState: import("./index.ts").RedemptionState;
111
+ attributeTags: Array<{
112
+ __typename: "OfferAttributeTag";
113
+ kind: string;
114
+ label: string;
115
+ }>;
116
+ price: {
117
+ __typename: "OfferPrice";
118
+ amount: number | null;
119
+ retailAmount: number | null;
120
+ promotions: Array<{
121
+ __typename: "OfferPromotion";
122
+ type: string | null;
123
+ baseAmount: number | null;
124
+ amountSaved: number | null;
125
+ }>;
126
+ } | null;
127
+ deliveryEstimate: {
128
+ __typename: "OfferDeliveryEstimate";
129
+ deliveryPromise: string;
130
+ deliveryPromiseRangeStart: string | null;
131
+ deliveryPromiseRangeEnd: string | null;
132
+ } | null;
133
+ redemptionMethods: Array<{
134
+ __typename: "PharmacyDiscountCard";
135
+ id: string;
136
+ prescriptionId: string;
137
+ bin: string;
138
+ pcn: string;
139
+ group: string;
140
+ memberId: string;
141
+ externalUrl: string | null;
142
+ }>;
143
+ }>;
144
+ } | {
145
+ __typename: "Prescription";
146
+ } | {
147
+ __typename: "Treatment";
148
+ id: string;
149
+ name: string;
150
+ rxNormId: string | null;
151
+ ndc: string | null;
152
+ upc: string | null;
153
+ entityKind: import("./index.ts").CatalogEntityKind | null;
154
+ prescribableName: string | null;
155
+ brandName: string | null;
156
+ genericName: string | null;
157
+ form: string | null;
158
+ route: string | null;
159
+ strength: string | null;
160
+ medicationType: string | null;
161
+ schedule: string | null;
162
+ templates: Array<{
163
+ __typename: "PrescriptionTemplate";
164
+ id: string | null;
165
+ source: import("./index.ts").TemplateSource;
166
+ name: string | null;
167
+ instructions: string | null;
168
+ dispense: {
169
+ __typename: "Dispense";
170
+ quantity: number | null;
171
+ unit: string | null;
172
+ daysSupply: number | null;
173
+ refillsAllowed: number | null;
174
+ dispenseAsWritten: boolean | null;
175
+ } | null;
176
+ }> | null;
177
+ } | null;
178
+ }>;
179
+ } | null;
180
+ offers: {
181
+ __typename: "OrderOffers";
182
+ atPharmacy: Array<{
183
+ __typename: "PharmacyOffer";
184
+ source: string;
185
+ prescriptionId: string;
186
+ priceType: import("./index.ts").OfferPriceType | null;
187
+ isPromoted: boolean;
188
+ redemptionState: import("./index.ts").RedemptionState;
189
+ attributeTags: Array<{
190
+ __typename: "OfferAttributeTag";
191
+ kind: string;
192
+ label: string;
193
+ }>;
194
+ price: {
195
+ __typename: "OfferPrice";
196
+ amount: number | null;
197
+ retailAmount: number | null;
198
+ promotions: Array<{
199
+ __typename: "OfferPromotion";
200
+ type: string | null;
201
+ baseAmount: number | null;
202
+ amountSaved: number | null;
203
+ }>;
204
+ } | null;
205
+ deliveryEstimate: {
206
+ __typename: "OfferDeliveryEstimate";
207
+ deliveryPromise: string;
208
+ deliveryPromiseRangeStart: string | null;
209
+ deliveryPromiseRangeEnd: string | null;
210
+ } | null;
211
+ redemptionMethods: Array<{
212
+ __typename: "PharmacyDiscountCard";
213
+ id: string;
214
+ prescriptionId: string;
215
+ bin: string;
216
+ pcn: string;
217
+ group: string;
218
+ memberId: string;
219
+ externalUrl: string | null;
220
+ }>;
221
+ }> | null;
222
+ };
223
+ organization: {
224
+ __typename: "OperationError";
225
+ } | {
226
+ __typename: "Organization";
227
+ id: string;
228
+ name: string;
229
+ customer: {
230
+ __typename: "Customer";
231
+ id: string;
232
+ name: string;
233
+ } | {
234
+ __typename: "OperationError";
235
+ } | null;
236
+ settings: {
237
+ __typename: "OrganizationSettings";
238
+ brandColor: string;
239
+ brandLogo: string | null;
240
+ priorAuthorizationExceptionMessage: string | null;
241
+ patientUx: {
242
+ __typename: "OrganizationPatientUxSettings";
243
+ enablePatientRerouting: boolean;
244
+ enableAutomatedOps: boolean;
245
+ };
246
+ } | null;
247
+ } | null;
248
+ patient: {
249
+ __typename: "OperationError";
250
+ type: import("./index.ts").OperationErrorType;
251
+ code: string;
252
+ message: string;
253
+ requiredPermission: string | null;
254
+ service: string | null;
255
+ retryable: boolean;
256
+ } | {
257
+ __typename: "Patient";
258
+ id: string;
259
+ demographic: {
260
+ __typename: "PatientDemographic";
261
+ dateOfBirth: string | null;
262
+ sex: import("./index.ts").Sex | null;
263
+ gender: string | null;
264
+ name: {
265
+ __typename: "HumanName";
266
+ first: string | null;
267
+ middle: string | null;
268
+ last: string | null;
269
+ };
270
+ } | null;
271
+ contact: {
272
+ __typename: "PatientContact";
273
+ email: string | null;
274
+ phone: string | null;
275
+ address: {
276
+ __typename: "PatientAddress";
277
+ street1: string | null;
278
+ street2: string | null;
279
+ city: string | null;
280
+ state: string | null;
281
+ postalCode: string | null;
282
+ country: string | null;
283
+ } | null;
284
+ } | null;
285
+ benefits: {
286
+ __typename: "BenefitList";
287
+ status: import("./index.ts").ListDocumentationStatus | null;
288
+ entries: Array<{
289
+ __typename: "Benefit";
290
+ id: string;
291
+ bin: string;
292
+ pcn: string | null;
293
+ groupId: string | null;
294
+ memberId: string;
295
+ }>;
296
+ };
297
+ preferredPharmacy: {
298
+ __typename: "Pharmacy";
299
+ id: string;
300
+ name: string;
301
+ logo: string | null;
302
+ phone: string | null;
303
+ isOpen: boolean | null;
304
+ latitude: number | null;
305
+ longitude: number | null;
306
+ fulfillmentType: Array<import("./index.ts").FulfillmentType> | null;
307
+ hours: Array<{
308
+ __typename: "PharmacyHours";
309
+ openFrom: string;
310
+ openUntil: string;
311
+ dayOfWeek: import("./index.ts").DayOfWeek;
312
+ is24Hr: boolean;
313
+ timezone: string;
314
+ }> | null;
315
+ nextEvents: {
316
+ __typename: "PharmacyEvents";
317
+ open: {
318
+ __typename: "PharmacyCloseEvent";
319
+ type: string;
320
+ datetime: string;
321
+ } | {
322
+ __typename: "PharmacyOpen24HrEvent";
323
+ type: string;
324
+ } | {
325
+ __typename: "PharmacyOpenEvent";
326
+ type: string;
327
+ datetime: string;
328
+ };
329
+ close: {
330
+ __typename: "PharmacyCloseEvent";
331
+ type: string;
332
+ datetime: string;
333
+ } | {
334
+ __typename: "PharmacyOpen24HrEvent";
335
+ type: string;
336
+ } | {
337
+ __typename: "PharmacyOpenEvent";
338
+ type: string;
339
+ datetime: string;
340
+ };
341
+ } | null;
342
+ address: {
343
+ __typename: "PharmacyAddress";
344
+ street1: string | null;
345
+ street2: string | null;
346
+ city: string | null;
347
+ state: string | null;
348
+ postalCode: string | null;
349
+ } | null;
350
+ offers: Array<{
351
+ __typename: "PharmacyOffer";
352
+ source: string;
353
+ prescriptionId: string;
354
+ priceType: import("./index.ts").OfferPriceType | null;
355
+ isPromoted: boolean;
356
+ redemptionState: import("./index.ts").RedemptionState;
357
+ attributeTags: Array<{
358
+ __typename: "OfferAttributeTag";
359
+ kind: string;
360
+ label: string;
361
+ }>;
362
+ price: {
363
+ __typename: "OfferPrice";
364
+ amount: number | null;
365
+ retailAmount: number | null;
366
+ promotions: Array<{
367
+ __typename: "OfferPromotion";
368
+ type: string | null;
369
+ baseAmount: number | null;
370
+ amountSaved: number | null;
371
+ }>;
372
+ } | null;
373
+ deliveryEstimate: {
374
+ __typename: "OfferDeliveryEstimate";
375
+ deliveryPromise: string;
376
+ deliveryPromiseRangeStart: string | null;
377
+ deliveryPromiseRangeEnd: string | null;
378
+ } | null;
379
+ redemptionMethods: Array<{
380
+ __typename: "PharmacyDiscountCard";
381
+ id: string;
382
+ prescriptionId: string;
383
+ bin: string;
384
+ pcn: string;
385
+ group: string;
386
+ memberId: string;
387
+ externalUrl: string | null;
388
+ }>;
389
+ }>;
390
+ } | null;
391
+ clinical: {
392
+ __typename: "PatientClinical";
393
+ notes: string | null;
394
+ allergies: {
395
+ __typename: "AllergyList";
396
+ status: import("./index.ts").ListDocumentationStatus;
397
+ entries: Array<{
398
+ __typename: "Allergy";
399
+ id: string;
400
+ name: string;
401
+ rxNormId: string | null;
402
+ }>;
403
+ };
404
+ medications: {
405
+ __typename: "MedicationHistoryList";
406
+ status: import("./index.ts").ListDocumentationStatus | null;
407
+ entries: Array<{
408
+ __typename: "MedicationHistoryEntry";
409
+ id: string;
410
+ name: string;
411
+ rxNormId: string | null;
412
+ status: import("./index.ts").MedicationHistoryStatus;
413
+ }>;
414
+ };
415
+ diagnoses: {
416
+ __typename: "DiagnosisList";
417
+ status: import("./index.ts").ListDocumentationStatus | null;
418
+ entries: Array<{
419
+ __typename: "Diagnosis";
420
+ id: string;
421
+ name: string | null;
422
+ icd10Code: string | null;
423
+ }>;
424
+ };
425
+ } | null;
426
+ } | null;
427
+ prescriptions: Array<{
428
+ __typename: "Prescription";
429
+ id: string;
430
+ templateId: string | null;
431
+ instructions: string | null;
432
+ prescriber: {
433
+ __typename: "Prescriber";
434
+ id: string;
435
+ name: {
436
+ __typename: "HumanName";
437
+ first: string | null;
438
+ middle: string | null;
439
+ last: string | null;
440
+ };
441
+ } | null;
442
+ fulfillment: {
443
+ __typename: "PrescriptionFulfillment";
444
+ state: import("./index.ts").PrescriptionFulfillmentState | null;
445
+ pharmacyEstimatedReadyAt: string | null;
446
+ exceptions: Array<{
447
+ __typename: "PrescriptionFulfillmentException";
448
+ id: string;
449
+ type: import("./index.ts").PrescriptionFulfillmentExceptionType;
450
+ message: string | null;
451
+ createdAt: string;
452
+ }>;
453
+ } | null;
454
+ patient: {
455
+ __typename: "PatientReference";
456
+ id: string;
457
+ } | null;
458
+ treatment: {
459
+ __typename: "Treatment";
460
+ id: string;
461
+ name: string;
462
+ rxNormId: string | null;
463
+ ndc: string | null;
464
+ upc: string | null;
465
+ entityKind: import("./index.ts").CatalogEntityKind | null;
466
+ prescribableName: string | null;
467
+ brandName: string | null;
468
+ genericName: string | null;
469
+ form: string | null;
470
+ route: string | null;
471
+ strength: string | null;
472
+ medicationType: string | null;
473
+ schedule: string | null;
474
+ };
475
+ dispense: {
476
+ __typename: "Dispense";
477
+ quantity: number | null;
478
+ unit: string | null;
479
+ daysSupply: number | null;
480
+ refillsAllowed: number | null;
481
+ dispenseAsWritten: boolean | null;
482
+ } | null;
483
+ clinical: {
484
+ __typename: "PrescriptionClinical";
485
+ notes: string | null;
486
+ diagnoses: Array<{
487
+ __typename: "Diagnosis";
488
+ id: string;
489
+ name: string | null;
490
+ icd10Code: string | null;
491
+ }>;
492
+ } | null;
493
+ screeningAlerts: Array<{
494
+ __typename: "ScreeningAlert";
495
+ severity: import("./index.ts").ScreeningSeverity;
496
+ type: import("./index.ts").ScreeningAlertType;
497
+ description: string;
498
+ category: import("./index.ts").ChangeCategory;
499
+ involvedEntities: Array<{
500
+ __typename: "InvolvedEntity";
501
+ id: string;
502
+ name: string;
503
+ }>;
504
+ options: Array<{
505
+ __typename: "Choice";
506
+ displayName: string;
507
+ reason: string | null;
508
+ operation: string;
509
+ argument: string | null;
510
+ value: string | null;
511
+ matchReasons: Array<{
512
+ __typename: "MatchReason";
513
+ type: import("./index.ts").MatchReasonType;
514
+ label: string;
515
+ confidence: import("./index.ts").ConfidenceLevel | null;
516
+ value: {
517
+ __typename: "QuantityValue";
518
+ displayValue: string;
519
+ value: number;
520
+ unit: string;
521
+ } | null;
522
+ }>;
523
+ entity: {
524
+ __typename: "Allergy";
525
+ } | {
526
+ __typename: "Diagnosis";
527
+ } | {
528
+ __typename: "MedicationCandidate";
529
+ } | {
530
+ __typename: "PatientCandidate";
531
+ } | {
532
+ __typename: "Pharmacy";
533
+ id: string;
534
+ name: string;
535
+ logo: string | null;
536
+ phone: string | null;
537
+ isOpen: boolean | null;
538
+ latitude: number | null;
539
+ longitude: number | null;
540
+ fulfillmentType: Array<import("./index.ts").FulfillmentType> | null;
541
+ hours: Array<{
542
+ __typename: "PharmacyHours";
543
+ openFrom: string;
544
+ openUntil: string;
545
+ dayOfWeek: import("./index.ts").DayOfWeek;
546
+ is24Hr: boolean;
547
+ timezone: string;
548
+ }> | null;
549
+ nextEvents: {
550
+ __typename: "PharmacyEvents";
551
+ open: {
552
+ __typename: "PharmacyCloseEvent";
553
+ type: string;
554
+ datetime: string;
555
+ } | {
556
+ __typename: "PharmacyOpen24HrEvent";
557
+ type: string;
558
+ } | {
559
+ __typename: "PharmacyOpenEvent";
560
+ type: string;
561
+ datetime: string;
562
+ };
563
+ close: {
564
+ __typename: "PharmacyCloseEvent";
565
+ type: string;
566
+ datetime: string;
567
+ } | {
568
+ __typename: "PharmacyOpen24HrEvent";
569
+ type: string;
570
+ } | {
571
+ __typename: "PharmacyOpenEvent";
572
+ type: string;
573
+ datetime: string;
574
+ };
575
+ } | null;
576
+ address: {
577
+ __typename: "PharmacyAddress";
578
+ street1: string | null;
579
+ street2: string | null;
580
+ city: string | null;
581
+ state: string | null;
582
+ postalCode: string | null;
583
+ } | null;
584
+ offers: Array<{
585
+ __typename: "PharmacyOffer";
586
+ source: string;
587
+ prescriptionId: string;
588
+ priceType: import("./index.ts").OfferPriceType | null;
589
+ isPromoted: boolean;
590
+ redemptionState: import("./index.ts").RedemptionState;
591
+ attributeTags: Array<{
592
+ __typename: "OfferAttributeTag";
593
+ kind: string;
594
+ label: string;
595
+ }>;
596
+ price: {
597
+ __typename: "OfferPrice";
598
+ amount: number | null;
599
+ retailAmount: number | null;
600
+ promotions: Array<{
601
+ __typename: "OfferPromotion";
602
+ type: string | null;
603
+ baseAmount: number | null;
604
+ amountSaved: number | null;
605
+ }>;
606
+ } | null;
607
+ deliveryEstimate: {
608
+ __typename: "OfferDeliveryEstimate";
609
+ deliveryPromise: string;
610
+ deliveryPromiseRangeStart: string | null;
611
+ deliveryPromiseRangeEnd: string | null;
612
+ } | null;
613
+ redemptionMethods: Array<{
614
+ __typename: "PharmacyDiscountCard";
615
+ id: string;
616
+ prescriptionId: string;
617
+ bin: string;
618
+ pcn: string;
619
+ group: string;
620
+ memberId: string;
621
+ externalUrl: string | null;
622
+ }>;
623
+ }>;
624
+ } | {
625
+ __typename: "Prescription";
626
+ } | {
627
+ __typename: "Treatment";
628
+ id: string;
629
+ name: string;
630
+ rxNormId: string | null;
631
+ ndc: string | null;
632
+ upc: string | null;
633
+ entityKind: import("./index.ts").CatalogEntityKind | null;
634
+ prescribableName: string | null;
635
+ brandName: string | null;
636
+ genericName: string | null;
637
+ form: string | null;
638
+ route: string | null;
639
+ strength: string | null;
640
+ medicationType: string | null;
641
+ schedule: string | null;
642
+ templates: Array<{
643
+ __typename: "PrescriptionTemplate";
644
+ id: string | null;
645
+ source: import("./index.ts").TemplateSource;
646
+ name: string | null;
647
+ instructions: string | null;
648
+ dispense: {
649
+ __typename: "Dispense";
650
+ quantity: number | null;
651
+ unit: string | null;
652
+ daysSupply: number | null;
653
+ refillsAllowed: number | null;
654
+ dispenseAsWritten: boolean | null;
655
+ } | null;
656
+ }> | null;
657
+ } | null;
658
+ }> | null;
659
+ }> | null;
660
+ signing: {
661
+ __typename: "PrescriptionSigningDetails";
662
+ state: import("./index.ts").PrescriptionSigningState;
663
+ contentHash: string;
664
+ message: string | null;
665
+ signedAt: string | null;
666
+ };
667
+ }>;
668
+ screeningAlerts: Array<{
669
+ __typename: "ScreeningAlert";
670
+ severity: import("./index.ts").ScreeningSeverity;
671
+ type: import("./index.ts").ScreeningAlertType;
672
+ description: string;
673
+ category: import("./index.ts").ChangeCategory;
674
+ involvedEntities: Array<{
675
+ __typename: "InvolvedEntity";
676
+ id: string;
677
+ name: string;
678
+ }>;
679
+ options: Array<{
680
+ __typename: "Choice";
681
+ displayName: string;
682
+ reason: string | null;
683
+ operation: string;
684
+ argument: string | null;
685
+ value: string | null;
686
+ matchReasons: Array<{
687
+ __typename: "MatchReason";
688
+ type: import("./index.ts").MatchReasonType;
689
+ label: string;
690
+ confidence: import("./index.ts").ConfidenceLevel | null;
691
+ value: {
692
+ __typename: "QuantityValue";
693
+ displayValue: string;
694
+ value: number;
695
+ unit: string;
696
+ } | null;
697
+ }>;
698
+ entity: {
699
+ __typename: "Allergy";
700
+ } | {
701
+ __typename: "Diagnosis";
702
+ } | {
703
+ __typename: "MedicationCandidate";
704
+ } | {
705
+ __typename: "PatientCandidate";
706
+ } | {
707
+ __typename: "Pharmacy";
708
+ id: string;
709
+ name: string;
710
+ logo: string | null;
711
+ phone: string | null;
712
+ isOpen: boolean | null;
713
+ latitude: number | null;
714
+ longitude: number | null;
715
+ fulfillmentType: Array<import("./index.ts").FulfillmentType> | null;
716
+ hours: Array<{
717
+ __typename: "PharmacyHours";
718
+ openFrom: string;
719
+ openUntil: string;
720
+ dayOfWeek: import("./index.ts").DayOfWeek;
721
+ is24Hr: boolean;
722
+ timezone: string;
723
+ }> | null;
724
+ nextEvents: {
725
+ __typename: "PharmacyEvents";
726
+ open: {
727
+ __typename: "PharmacyCloseEvent";
728
+ type: string;
729
+ datetime: string;
730
+ } | {
731
+ __typename: "PharmacyOpen24HrEvent";
732
+ type: string;
733
+ } | {
734
+ __typename: "PharmacyOpenEvent";
735
+ type: string;
736
+ datetime: string;
737
+ };
738
+ close: {
739
+ __typename: "PharmacyCloseEvent";
740
+ type: string;
741
+ datetime: string;
742
+ } | {
743
+ __typename: "PharmacyOpen24HrEvent";
744
+ type: string;
745
+ } | {
746
+ __typename: "PharmacyOpenEvent";
747
+ type: string;
748
+ datetime: string;
749
+ };
750
+ } | null;
751
+ address: {
752
+ __typename: "PharmacyAddress";
753
+ street1: string | null;
754
+ street2: string | null;
755
+ city: string | null;
756
+ state: string | null;
757
+ postalCode: string | null;
758
+ } | null;
759
+ offers: Array<{
760
+ __typename: "PharmacyOffer";
761
+ source: string;
762
+ prescriptionId: string;
763
+ priceType: import("./index.ts").OfferPriceType | null;
764
+ isPromoted: boolean;
765
+ redemptionState: import("./index.ts").RedemptionState;
766
+ attributeTags: Array<{
767
+ __typename: "OfferAttributeTag";
768
+ kind: string;
769
+ label: string;
770
+ }>;
771
+ price: {
772
+ __typename: "OfferPrice";
773
+ amount: number | null;
774
+ retailAmount: number | null;
775
+ promotions: Array<{
776
+ __typename: "OfferPromotion";
777
+ type: string | null;
778
+ baseAmount: number | null;
779
+ amountSaved: number | null;
780
+ }>;
781
+ } | null;
782
+ deliveryEstimate: {
783
+ __typename: "OfferDeliveryEstimate";
784
+ deliveryPromise: string;
785
+ deliveryPromiseRangeStart: string | null;
786
+ deliveryPromiseRangeEnd: string | null;
787
+ } | null;
788
+ redemptionMethods: Array<{
789
+ __typename: "PharmacyDiscountCard";
790
+ id: string;
791
+ prescriptionId: string;
792
+ bin: string;
793
+ pcn: string;
794
+ group: string;
795
+ memberId: string;
796
+ externalUrl: string | null;
797
+ }>;
798
+ }>;
799
+ } | {
800
+ __typename: "Prescription";
801
+ } | {
802
+ __typename: "Treatment";
803
+ id: string;
804
+ name: string;
805
+ rxNormId: string | null;
806
+ ndc: string | null;
807
+ upc: string | null;
808
+ entityKind: import("./index.ts").CatalogEntityKind | null;
809
+ prescribableName: string | null;
810
+ brandName: string | null;
811
+ genericName: string | null;
812
+ form: string | null;
813
+ route: string | null;
814
+ strength: string | null;
815
+ medicationType: string | null;
816
+ schedule: string | null;
817
+ templates: Array<{
818
+ __typename: "PrescriptionTemplate";
819
+ id: string | null;
820
+ source: import("./index.ts").TemplateSource;
821
+ name: string | null;
822
+ instructions: string | null;
823
+ dispense: {
824
+ __typename: "Dispense";
825
+ quantity: number | null;
826
+ unit: string | null;
827
+ daysSupply: number | null;
828
+ refillsAllowed: number | null;
829
+ dispenseAsWritten: boolean | null;
830
+ } | null;
831
+ }> | null;
832
+ } | null;
833
+ }> | null;
834
+ }> | null;
835
+ pharmacy: {
836
+ __typename: "Pharmacy";
837
+ id: string;
838
+ name: string;
839
+ logo: string | null;
840
+ phone: string | null;
841
+ isOpen: boolean | null;
842
+ latitude: number | null;
843
+ longitude: number | null;
844
+ fulfillmentType: Array<import("./index.ts").FulfillmentType> | null;
845
+ hours: Array<{
846
+ __typename: "PharmacyHours";
847
+ openFrom: string;
848
+ openUntil: string;
849
+ dayOfWeek: import("./index.ts").DayOfWeek;
850
+ is24Hr: boolean;
851
+ timezone: string;
852
+ }> | null;
853
+ nextEvents: {
854
+ __typename: "PharmacyEvents";
855
+ open: {
856
+ __typename: "PharmacyCloseEvent";
857
+ type: string;
858
+ datetime: string;
859
+ } | {
860
+ __typename: "PharmacyOpen24HrEvent";
861
+ type: string;
862
+ } | {
863
+ __typename: "PharmacyOpenEvent";
864
+ type: string;
865
+ datetime: string;
866
+ };
867
+ close: {
868
+ __typename: "PharmacyCloseEvent";
869
+ type: string;
870
+ datetime: string;
871
+ } | {
872
+ __typename: "PharmacyOpen24HrEvent";
873
+ type: string;
874
+ } | {
875
+ __typename: "PharmacyOpenEvent";
876
+ type: string;
877
+ datetime: string;
878
+ };
879
+ } | null;
880
+ address: {
881
+ __typename: "PharmacyAddress";
882
+ street1: string | null;
883
+ street2: string | null;
884
+ city: string | null;
885
+ state: string | null;
886
+ postalCode: string | null;
887
+ } | null;
888
+ offers: Array<{
889
+ __typename: "PharmacyOffer";
890
+ source: string;
891
+ prescriptionId: string;
892
+ priceType: import("./index.ts").OfferPriceType | null;
893
+ isPromoted: boolean;
894
+ redemptionState: import("./index.ts").RedemptionState;
895
+ attributeTags: Array<{
896
+ __typename: "OfferAttributeTag";
897
+ kind: string;
898
+ label: string;
899
+ }>;
900
+ price: {
901
+ __typename: "OfferPrice";
902
+ amount: number | null;
903
+ retailAmount: number | null;
904
+ promotions: Array<{
905
+ __typename: "OfferPromotion";
906
+ type: string | null;
907
+ baseAmount: number | null;
908
+ amountSaved: number | null;
909
+ }>;
910
+ } | null;
911
+ deliveryEstimate: {
912
+ __typename: "OfferDeliveryEstimate";
913
+ deliveryPromise: string;
914
+ deliveryPromiseRangeStart: string | null;
915
+ deliveryPromiseRangeEnd: string | null;
916
+ } | null;
917
+ redemptionMethods: Array<{
918
+ __typename: "PharmacyDiscountCard";
919
+ id: string;
920
+ prescriptionId: string;
921
+ bin: string;
922
+ pcn: string;
923
+ group: string;
924
+ memberId: string;
925
+ externalUrl: string | null;
926
+ }>;
927
+ }>;
928
+ } | null;
929
+ fulfillment: {
930
+ __typename: "OrderFulfillment";
931
+ state: import("./index.ts").OrderFulfillmentState | null;
932
+ history: Array<{
933
+ __typename: "OrderRoutingHistoryEntry";
934
+ selector: import("./index.ts").OrderRoutingSelector;
935
+ reason: string | null;
936
+ createdAt: string;
937
+ pharmacy: {
938
+ __typename: "Pharmacy";
939
+ id: string;
940
+ name: string;
941
+ logo: string | null;
942
+ phone: string | null;
943
+ isOpen: boolean | null;
944
+ latitude: number | null;
945
+ longitude: number | null;
946
+ fulfillmentType: Array<import("./index.ts").FulfillmentType> | null;
947
+ hours: Array<{
948
+ __typename: "PharmacyHours";
949
+ openFrom: string;
950
+ openUntil: string;
951
+ dayOfWeek: import("./index.ts").DayOfWeek;
952
+ is24Hr: boolean;
953
+ timezone: string;
954
+ }> | null;
955
+ nextEvents: {
956
+ __typename: "PharmacyEvents";
957
+ open: {
958
+ __typename: "PharmacyCloseEvent";
959
+ type: string;
960
+ datetime: string;
961
+ } | {
962
+ __typename: "PharmacyOpen24HrEvent";
963
+ type: string;
964
+ } | {
965
+ __typename: "PharmacyOpenEvent";
966
+ type: string;
967
+ datetime: string;
968
+ };
969
+ close: {
970
+ __typename: "PharmacyCloseEvent";
971
+ type: string;
972
+ datetime: string;
973
+ } | {
974
+ __typename: "PharmacyOpen24HrEvent";
975
+ type: string;
976
+ } | {
977
+ __typename: "PharmacyOpenEvent";
978
+ type: string;
979
+ datetime: string;
980
+ };
981
+ } | null;
982
+ address: {
983
+ __typename: "PharmacyAddress";
984
+ street1: string | null;
985
+ street2: string | null;
986
+ city: string | null;
987
+ state: string | null;
988
+ postalCode: string | null;
989
+ } | null;
990
+ offers: Array<{
991
+ __typename: "PharmacyOffer";
992
+ source: string;
993
+ prescriptionId: string;
994
+ priceType: import("./index.ts").OfferPriceType | null;
995
+ isPromoted: boolean;
996
+ redemptionState: import("./index.ts").RedemptionState;
997
+ attributeTags: Array<{
998
+ __typename: "OfferAttributeTag";
999
+ kind: string;
1000
+ label: string;
1001
+ }>;
1002
+ price: {
1003
+ __typename: "OfferPrice";
1004
+ amount: number | null;
1005
+ retailAmount: number | null;
1006
+ promotions: Array<{
1007
+ __typename: "OfferPromotion";
1008
+ type: string | null;
1009
+ baseAmount: number | null;
1010
+ amountSaved: number | null;
1011
+ }>;
1012
+ } | null;
1013
+ deliveryEstimate: {
1014
+ __typename: "OfferDeliveryEstimate";
1015
+ deliveryPromise: string;
1016
+ deliveryPromiseRangeStart: string | null;
1017
+ deliveryPromiseRangeEnd: string | null;
1018
+ } | null;
1019
+ redemptionMethods: Array<{
1020
+ __typename: "PharmacyDiscountCard";
1021
+ id: string;
1022
+ prescriptionId: string;
1023
+ bin: string;
1024
+ pcn: string;
1025
+ group: string;
1026
+ memberId: string;
1027
+ externalUrl: string | null;
1028
+ }>;
1029
+ }>;
1030
+ };
1031
+ }>;
1032
+ routability: {
1033
+ __typename: "OrderRoutability";
1034
+ allowed: boolean;
1035
+ reason: string | null;
1036
+ } | null;
1037
+ exceptions: Array<{
1038
+ __typename: "OrderException";
1039
+ id: string;
1040
+ type: import("./index.ts").OrderExceptionType;
1041
+ message: string | null;
1042
+ createdAt: string;
1043
+ }>;
1044
+ } | null;
1045
+ }>;
1046
+ }>;
1047
+ //# sourceMappingURL=orders.d.ts.map