@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,643 @@
1
+ /**
2
+ * The public shapes: records, inputs, changes and candidates, in network-api's names and nesting so the
3
+ * schema's docs map one-to-one. Declared here — not the generated GraphQL types, which stay internal — so
4
+ * a schema change stops at map.ts instead of reaching callers.
5
+ */
6
+ export type Sex = "FEMALE" | "MALE" | "UNKNOWN";
7
+ export type MedicationStatus = "ACTIVE" | "HISTORICAL" | "UNKNOWN";
8
+ /** SIGNED: the signature matches the content. INVALIDATED_SIGN: the content changed after signing. */
9
+ export type SigningState = "UNSIGNED" | "SIGNED" | "INVALIDATED_SIGN";
10
+ export type OrderStatus = "DRAFT" | "SUBMITTED" | "CANCELED";
11
+ export interface Address {
12
+ street1: string | null;
13
+ street2: string | null;
14
+ city: string | null;
15
+ state: string | null;
16
+ postalCode: string | null;
17
+ country?: string | null;
18
+ }
19
+ export interface Pharmacy {
20
+ id: string;
21
+ name: string;
22
+ logo: string | null;
23
+ phone: string | null;
24
+ /** Local opening hours, with the pharmacy's IANA timezone. null when unknown. */
25
+ hours: PharmacyHours[] | null;
26
+ /** At the server's current time; null when hours are unknown. */
27
+ isOpen: boolean | null;
28
+ nextEvents: {
29
+ open: PharmacyEvent;
30
+ close: PharmacyEvent;
31
+ } | null;
32
+ address: Address | null;
33
+ latitude: number | null;
34
+ longitude: number | null;
35
+ fulfillmentType: ("MAIL_ORDER" | "PICK_UP")[] | null;
36
+ offers: PharmacyOffer[];
37
+ }
38
+ export interface PharmacyHours {
39
+ openFrom: string;
40
+ openUntil: string;
41
+ dayOfWeek: "SUNDAY" | "MONDAY" | "TUESDAY" | "WEDNESDAY" | "THURSDAY" | "FRIDAY" | "SATURDAY";
42
+ is24Hr: boolean;
43
+ timezone: string;
44
+ }
45
+ /** Serialized instants; a 24-hour pharmacy has no next opening or closing instant. */
46
+ export type PharmacyEvent = {
47
+ type: "open" | "close";
48
+ datetime: string;
49
+ } | {
50
+ type: "24hr";
51
+ };
52
+ export interface Organization {
53
+ id: string;
54
+ name: string;
55
+ /** null when unattached or when the customer couldn't be read. */
56
+ customer: {
57
+ id: string;
58
+ name: string;
59
+ } | null;
60
+ settings: {
61
+ brandColor: string;
62
+ /** As stored: may be a URL or a legacy asset name. */
63
+ brandLogo: string | null;
64
+ priorAuthorizationExceptionMessage: string | null;
65
+ patientUx: {
66
+ enablePatientRerouting: boolean;
67
+ enableAutomatedOps: boolean;
68
+ };
69
+ } | null;
70
+ }
71
+ /**
72
+ * One price one source quotes for one prescription at one pharmacy. A source that prices a two-drug order
73
+ * reports two of these, so nothing here is a per-pharmacy total — totals are the caller's to compute.
74
+ */
75
+ export interface PharmacyOffer {
76
+ source: string;
77
+ prescriptionId: string;
78
+ /** null when the source quotes placement and badges but no amount. */
79
+ priceType: OfferPriceType | null;
80
+ isPromoted: boolean;
81
+ attributeTags: OfferAttributeTag[];
82
+ price: OfferPrice | null;
83
+ deliveryEstimate: OfferDeliveryEstimate | null;
84
+ /**
85
+ * What the patient presents at the counter for this offer's price. Empty whenever `redemptionState` isn't
86
+ * `SETTLED`, and also when a settled offer needs nothing presented — read the state before treating an
87
+ * empty list as "nothing to present".
88
+ */
89
+ redemptionMethods: RedemptionMethod[];
90
+ redemptionState: RedemptionState;
91
+ }
92
+ /** `MEMBERSHIP` and `INSURANCE` are conditional — the API doesn't know whether the patient qualifies. */
93
+ export type OfferPriceType = "CASH" | "INSURANCE" | "MEMBERSHIP";
94
+ export interface OfferAttributeTag {
95
+ kind: string;
96
+ label: string;
97
+ }
98
+ /** One prescription's price from one source. */
99
+ export interface OfferPrice {
100
+ /** What the patient pays, promotions already applied — use it for display, sorting and totals. */
101
+ amount: number | null;
102
+ /** Undiscounted, for comparison. null when the source gives none. */
103
+ retailAmount: number | null;
104
+ /** `baseAmount - amountSaved` is the promoted price; `amount` already reflects it. */
105
+ promotions: {
106
+ type: string | null;
107
+ baseAmount: number | null;
108
+ amountSaved: number | null;
109
+ }[];
110
+ }
111
+ export interface OfferDeliveryEstimate {
112
+ deliveryPromise: string;
113
+ deliveryPromiseRangeStart: string | null;
114
+ deliveryPromiseRangeEnd: string | null;
115
+ }
116
+ /**
117
+ * Describes the generation attempt, not whether the patient ends up with a usable card.
118
+ *
119
+ * `SETTLED`: every attempt finished; `redemptionMethods` holds whatever succeeded, empty when none did.
120
+ * `PENDING`: nothing generated yet and one still may be — a pharmacy search prices a discount-card source
121
+ * before the order routes there, and the card is minted on routing.
122
+ * `SKIPPED`: nothing was attempted and none is coming — this source mints nothing.
123
+ */
124
+ export type RedemptionState = "SETTLED" | "PENDING" | "SKIPPED";
125
+ /** One member today — a PharmacyBenefitCard for the patient's own insurance is the expected second. */
126
+ export type RedemptionMethod = PharmacyDiscountCard;
127
+ /** A cash discount card — a GoodRx or RxSense coupon, read out at the counter or claimed on `externalUrl`. */
128
+ export interface PharmacyDiscountCard {
129
+ type: "discountCard";
130
+ id: string;
131
+ /** The prescription this card covers, matching its offer's own `prescriptionId`. */
132
+ prescriptionId: string;
133
+ /** Bank Identification Number — the 6-digit PBM routing identifier. */
134
+ bin: string;
135
+ /** Processor Control Number — secondary routing qualifier alongside BIN. */
136
+ pcn: string;
137
+ group: string;
138
+ memberId: string;
139
+ /** Claim this before pickup for a promo price. null when the counter fields work alone. */
140
+ externalUrl: string | null;
141
+ }
142
+ /** An order's offers, split by whether they depend on the pharmacy it's routed to. */
143
+ export interface OrderOffers {
144
+ /** null until a pharmacy is chosen; `[]` when one is chosen but no offer applies. */
145
+ atPharmacy: PharmacyOffer[] | null;
146
+ }
147
+ /** Exactly one location field. network-api currently rejects `text`; use an address or coordinates. */
148
+ export interface LocationInput {
149
+ address?: Partial<Address>;
150
+ latLong?: {
151
+ latitude: string;
152
+ longitude: string;
153
+ radiusMiles?: number;
154
+ };
155
+ text?: string;
156
+ }
157
+ export interface PharmacyReferenceInput {
158
+ id?: string;
159
+ name?: string;
160
+ near?: LocationInput;
161
+ openAt?: string;
162
+ fulfillmentType?: "MAIL_ORDER" | "PICK_UP";
163
+ }
164
+ export type OrderRerouteReasonType = "CLOSER_LOCATION" | "PHARMACY_CLOSED" | "OUT_OF_STOCK" | "FILL_TIME_TOO_SLOW" | "INSURANCE_NOT_ACCEPTED" | "PRICE_TOO_HIGH" | "WRONG_PHARMACY_SELECTED" | "OTHER";
165
+ /** `note` is required when `type` is `OTHER`. */
166
+ export interface OrderRerouteReasonInput {
167
+ type: OrderRerouteReasonType;
168
+ note?: string;
169
+ }
170
+ /**
171
+ * Resolve a pharmacy, or unassign it with `none: true`; not both. `reason` goes only with `pharmacy`, when a
172
+ * submitted order moves from its pharmacy to another.
173
+ */
174
+ export interface OrderPharmacyInput {
175
+ pharmacy?: PharmacyReferenceInput;
176
+ none?: boolean;
177
+ reason?: OrderRerouteReasonInput;
178
+ }
179
+ export interface Diagnosis {
180
+ id: string;
181
+ name: string | null;
182
+ icd10Code: string | null;
183
+ }
184
+ /**
185
+ * A patient. Each list (allergies, medications, diagnoses, benefits) is `null` when nothing is recorded, and
186
+ * `[]` when "none" is. network-api reads a recorded "none" back for allergies (NKDA) only; for the others `[]`
187
+ * comes only from the live Patient that recorded it.
188
+ */
189
+ export interface PatientRecord {
190
+ id: string;
191
+ demographic: {
192
+ name: {
193
+ first: string | null;
194
+ middle: string | null;
195
+ last: string | null;
196
+ };
197
+ dateOfBirth: string | null;
198
+ sex: Sex | null;
199
+ gender: string | null;
200
+ } | null;
201
+ contact: {
202
+ email: string | null;
203
+ phone: string | null;
204
+ address: Address | null;
205
+ } | null;
206
+ benefits: {
207
+ id: string;
208
+ bin: string;
209
+ pcn: string | null;
210
+ groupId: string | null;
211
+ memberId: string;
212
+ }[] | null;
213
+ preferredPharmacy: Pharmacy | null;
214
+ clinical: {
215
+ allergies: {
216
+ id: string;
217
+ name: string;
218
+ rxNormId: string | null;
219
+ }[] | null;
220
+ medications: {
221
+ id: string;
222
+ name: string;
223
+ rxNormId: string | null;
224
+ status: MedicationStatus;
225
+ }[] | null;
226
+ diagnoses: Diagnosis[] | null;
227
+ notes: string | null;
228
+ } | null;
229
+ }
230
+ export interface ScreeningAlert {
231
+ severity: "MINOR" | "MODERATE" | "MAJOR";
232
+ type: "ALLERGEN" | "CONDITION" | "DRUG";
233
+ description: string;
234
+ involvedEntities: {
235
+ id: string;
236
+ name: string;
237
+ }[];
238
+ }
239
+ /**
240
+ * A drug as network-api's catalog describes it, in parts: the drug (`brandName` — the product's own name:
241
+ * "Lisinopril", "Lipitor", "Zepbound KwikPen"), its `form`, `route` and `strength`. The medication fields are
242
+ * null for equipment and compounds; what's filled also depends on where it came from (noted on each).
243
+ */
244
+ export interface Treatment {
245
+ id: string;
246
+ /**
247
+ * On a lookup's option, the product ("Lisinopril Oral Tablet 10 MG"); on a prescription, often just the
248
+ * drug ("Lisinopril") — the product is then `prescribableName`.
249
+ */
250
+ name: string;
251
+ /** The product's full name, on a prescription. null on a lookup's options (their `name` is it). */
252
+ prescribableName: string | null;
253
+ rxNormId: string | null;
254
+ ndc: string | null;
255
+ upc: string | null;
256
+ /** null for a template's stand-in, not a catalog entry. */
257
+ entityKind: "MEDICATION" | "MEDICAL_EQUIPMENT" | "COMPOUND" | "SUBSTANCE" | null;
258
+ /** The product's name: a brand ("Lipitor", "Adderall XR") or, for a generic, the drug ("Lisinopril"). */
259
+ brandName: string | null;
260
+ /** Its ingredients ("Atorvastatin Calcium", "Amphetamine-Dextroamphetamine"). */
261
+ genericName: string | null;
262
+ /** "Tablet", "Suspension Reconstituted", "Solution Pen-injector". */
263
+ form: string | null;
264
+ /** "Oral", "Subcutaneous". */
265
+ route: string | null;
266
+ /** "10 MG", "125 MG/5ML", "10-12.5 MG". */
267
+ strength: string | null;
268
+ /** "RX" or "OTC". */
269
+ medicationType: string | null;
270
+ /** DEA schedule: "II" … "V", or "UNCONTROLLED". Only on a lookup's options (null on a prescription). */
271
+ schedule: string | null;
272
+ /**
273
+ * Its catalog templates, then recommended ones (the units it's dispensed in, each as a template that sets only
274
+ * `dispense.unit`). Only on a lookup's options (null on a prescription: load a draft's with `loadTemplates()`).
275
+ */
276
+ templates: PrescriptionTemplate[] | null;
277
+ }
278
+ export interface PrescriptionRecord {
279
+ id: string;
280
+ /** Assigned prescriber, not necessarily the signer. null when unassigned or unreadable. */
281
+ prescriber: {
282
+ id: string;
283
+ name: {
284
+ first: string | null;
285
+ middle: string | null;
286
+ last: string | null;
287
+ };
288
+ } | null;
289
+ /** On its latest order; null for a draft or until sent to a pharmacy. */
290
+ fulfillment: PrescriptionFulfillment | null;
291
+ templateId: string | null;
292
+ patient: {
293
+ id: string;
294
+ } | null;
295
+ treatment: Treatment;
296
+ instructions: string | null;
297
+ dispense: {
298
+ quantity: number | null;
299
+ unit: string | null;
300
+ daysSupply: number | null;
301
+ refillsAllowed: number | null;
302
+ dispenseAsWritten: boolean | null;
303
+ } | null;
304
+ clinical: {
305
+ diagnoses: Diagnosis[];
306
+ notes: string | null;
307
+ } | null;
308
+ screeningAlerts: ScreeningAlert[];
309
+ /** `contentHash` is what a signature is bound to: the content the prescriber reviewed. */
310
+ signing: {
311
+ state: SigningState;
312
+ contentHash: string;
313
+ message: string | null;
314
+ signedAt: string | null;
315
+ };
316
+ }
317
+ /** Who wrote a template: the prescriber (their own catalog), their organization, or Photon (recommended). */
318
+ export type TemplateSource = "PERSONAL_CATALOG" | "ORG_CATALOG" | "RECOMMENDED";
319
+ /**
320
+ * What choosing a template fills in on a prescription. Any field can be null: a template sets only what it knows
321
+ * (a recommended sig sets the instructions and maybe a unit; a recommended unit sets only `dispense.unit`).
322
+ */
323
+ export interface PrescriptionTemplate {
324
+ /** The catalog template's id — the `templateId` a prescription takes. null for a recommended one. */
325
+ id: string | null;
326
+ source: TemplateSource;
327
+ name: string | null;
328
+ instructions: string | null;
329
+ dispense: PrescriptionRecord["dispense"];
330
+ }
331
+ export interface PrescriptionFulfillment {
332
+ state: "CREATED" | "SENT" | "RECEIVED" | "PROCESSING" | "READY" | "PICKED_UP" | "DELIVERED" | "CANCELED" | null;
333
+ pharmacyEstimatedReadyAt: string | null;
334
+ /** Unresolved problems only. */
335
+ exceptions: {
336
+ id: string;
337
+ type: "BACKORDERED" | "OOS" | "PA_REQUIRED" | "REFILL_TOO_SOON" | "HIGH_COPAY" | "NOT_COVERED" | "OTC" | "MEDICAL_DEVICE" | "RX_CLARIFICATION";
338
+ message: string | null;
339
+ createdAt: string;
340
+ }[];
341
+ }
342
+ export type OrderFulfillmentState = "CREATED" | "SENT" | "RECEIVED" | "PROCESSING" | "FILLING" | "READY" | "PICKED_UP" | "SHIPPED" | "DELIVERED" | "CANCELED";
343
+ export type OrderRoutingSelector = "AUTO" | "PATIENT" | "PROVIDER" | "STAFF" | "ADMIN" | "SUPPORT" | "MED_OPS" | "BPO" | "UNKNOWN";
344
+ export interface OrderRoutingHistoryEntry {
345
+ pharmacy: Pharmacy;
346
+ selector: OrderRoutingSelector;
347
+ reason: string | null;
348
+ createdAt: string;
349
+ }
350
+ /** Based on the order's state only; does not include organization settings. */
351
+ export interface OrderRoutability {
352
+ allowed: boolean;
353
+ /** Why rerouting is blocked; null when allowed. */
354
+ reason: string | null;
355
+ }
356
+ export interface OrderFulfillment {
357
+ /** null until the pharmacy has reported a state. */
358
+ state: OrderFulfillmentState | null;
359
+ /** Oldest first; empty until the order is first routed. */
360
+ history: OrderRoutingHistoryEntry[];
361
+ /** null when routability couldn't be determined. */
362
+ routability: OrderRoutability | null;
363
+ /** Open problems with the order; empty once resolved. */
364
+ exceptions: {
365
+ id: string;
366
+ type: string;
367
+ message: string | null;
368
+ createdAt: string;
369
+ }[];
370
+ }
371
+ export interface OrderRecord {
372
+ id: string;
373
+ state: OrderStatus;
374
+ /** null when absent or when the organization couldn't be read. */
375
+ organization: Organization | null;
376
+ /** null when network-api couldn't read the patient (an upstream failure on that field). */
377
+ patient: PatientRecord | null;
378
+ prescriptions: PrescriptionRecord[];
379
+ /**
380
+ * Its prescriptions screened together — with what each prescription's own alerts don't cover, the
381
+ * interactions between them. `[]` until the order has a record (or when it couldn't be screened).
382
+ */
383
+ screeningAlerts: ScreeningAlert[];
384
+ /** null: the patient chooses. */
385
+ pharmacy: Pharmacy | null;
386
+ /** Pricing and promotion offers for this order. */
387
+ offers: OrderOffers;
388
+ /** null for a draft, or when fulfillment couldn't be read. */
389
+ fulfillment: OrderFulfillment | null;
390
+ }
391
+ type Patch<T> = {
392
+ add?: T[];
393
+ remove?: T[];
394
+ none?: boolean;
395
+ };
396
+ export interface PatientInput {
397
+ /** In a sync, the patient it is (the server syncs the fields to them). Without it, the server finds or creates. */
398
+ id?: string;
399
+ demographic?: {
400
+ name?: {
401
+ first?: string;
402
+ last?: string;
403
+ };
404
+ dateOfBirth?: string;
405
+ sex?: Sex;
406
+ gender?: string;
407
+ };
408
+ contact?: {
409
+ email?: string;
410
+ phone?: string;
411
+ address?: Partial<Omit<Address, "country">> & {
412
+ country?: string;
413
+ };
414
+ };
415
+ benefits?: Patch<{
416
+ id?: string;
417
+ bin?: string;
418
+ pcn?: string;
419
+ groupId?: string;
420
+ memberId?: string;
421
+ }> & {
422
+ update?: {
423
+ id: string;
424
+ bin?: string;
425
+ pcn?: string;
426
+ groupId?: string;
427
+ memberId?: string;
428
+ }[];
429
+ };
430
+ preferredPharmacy?: PharmacyReferenceInput;
431
+ /** Needs the patient's id (network-api matches on demographics and contact only). */
432
+ clinical?: {
433
+ allergies?: Patch<{
434
+ id?: string;
435
+ name?: string;
436
+ rxNormId?: string;
437
+ }>;
438
+ medications?: Patch<{
439
+ id?: string;
440
+ name?: string;
441
+ rxNormId?: string;
442
+ status: MedicationStatus;
443
+ }>;
444
+ diagnoses?: Patch<{
445
+ id?: string;
446
+ name?: string;
447
+ icd10Code?: string;
448
+ }>;
449
+ notes?: string;
450
+ };
451
+ }
452
+ export interface PrescriptionEdits {
453
+ /**
454
+ * Your system's id for it (scoped to your organization). network-api keeps it but doesn't return it; an
455
+ * order can take a prescription by it (`prescriptions: { add: [{ externalId }] }`).
456
+ */
457
+ externalId?: string;
458
+ /** A drug by id (resolved) or name (the server resolves it, or offers choices). */
459
+ treatment?: {
460
+ id?: string;
461
+ name?: string;
462
+ rxNormId?: string;
463
+ ndc?: string;
464
+ };
465
+ templateId?: string;
466
+ /** The sig. */
467
+ instructions?: string;
468
+ dispense?: {
469
+ quantity?: number;
470
+ unit?: string;
471
+ daysSupply?: number;
472
+ refillsAllowed?: number;
473
+ dispenseAsWritten?: boolean;
474
+ };
475
+ clinical?: {
476
+ diagnoses?: Patch<{
477
+ id?: string;
478
+ name?: string;
479
+ icd10Code?: string;
480
+ }>;
481
+ notes?: string;
482
+ };
483
+ }
484
+ export interface PrescriptionInput extends PrescriptionEdits {
485
+ /**
486
+ * In a sync, the prescription it is (the fields go to it, until signed). Without it: no patient, a drug
487
+ * lookup — the choices come back in `changes`, nothing is created; a patient and a resolved drug, created
488
+ * (or their in-progress one continued).
489
+ */
490
+ id?: string;
491
+ patient?: {
492
+ id: string;
493
+ };
494
+ }
495
+ export interface OrderInput {
496
+ /**
497
+ * In a sync, the order it is (prescriptions go on or off it). Without it: the patient's draft order, or a new
498
+ * one. (network-api takes prescription ids; a template line is the live order's to create.)
499
+ */
500
+ id?: string;
501
+ patient?: {
502
+ id: string;
503
+ };
504
+ /** Matching can assign a resolved pharmacy; ambiguous matches return options in `changes`. */
505
+ pharmacy?: OrderPharmacyInput;
506
+ /**
507
+ * Existing prescriptions by id or by your system's id (`{ externalId }`: the server finds it as it goes on —
508
+ * the order needs its patient for that), or new lines — from a template (`{ templateId }`) or for a drug by its
509
+ * id (`{ treatment: { id: "med_…" } }`). A new line is the live order's to create (network-api takes ids).
510
+ */
511
+ prescriptions?: {
512
+ add?: ({
513
+ id: string;
514
+ } | {
515
+ externalId: string;
516
+ } | {
517
+ templateId: string;
518
+ } | {
519
+ treatment: {
520
+ id: string;
521
+ };
522
+ })[];
523
+ remove?: {
524
+ id: string;
525
+ }[];
526
+ };
527
+ }
528
+ export interface ChangeOption {
529
+ displayName: string;
530
+ reason: string | null;
531
+ /**
532
+ * Where the pick goes in the input, from its root ("treatment", "clinical.allergies.add.0.id"). null when
533
+ * the option calls a different operation instead. See withChoice().
534
+ */
535
+ path: string | null;
536
+ /** What goes there: an id, or an object such as `{ id }` — already parsed. */
537
+ value: unknown;
538
+ /** The record this option picks, when it picks one. */
539
+ id: string | null;
540
+ /** The drug this option picks — its parts, so nothing reads them out of `displayName`. null for other options. */
541
+ treatment: Treatment | null;
542
+ /** The pharmacy this option picks, including any offers priced for the order. null for other options. */
543
+ pharmacy: Pharmacy | null;
544
+ operation: string;
545
+ /** Why and how confidently it matched — empty when there's nothing to explain (e.g. an exact id). */
546
+ matchReasons: {
547
+ type: string;
548
+ label: string;
549
+ confidence: "HIGH" | "MEDIUM" | "LOW" | null;
550
+ /** Magnitude, e.g. pharmacy distance; keep the server's units. */
551
+ value: {
552
+ displayValue: string;
553
+ value: number;
554
+ unit: string;
555
+ } | null;
556
+ }[];
557
+ }
558
+ export interface Change {
559
+ key: string;
560
+ label: string;
561
+ status: "APPLIED" | "REJECTED" | "AMBIGUOUS";
562
+ severity: "INFO" | "ADVISORY" | "BLOCKING";
563
+ /** The server's words. Show them; never parse them. */
564
+ reason: string | null;
565
+ category: string | null;
566
+ operation: "ADDED" | "MODIFIED" | "REMOVED";
567
+ options: ChangeOption[];
568
+ /** The resolved choice, including its pharmacy and offers even when applied immediately. */
569
+ after: ChangeOption | null;
570
+ /** For a lookup: the text the server tried to resolve. */
571
+ inputText: string | null;
572
+ /** For a lookup: the record the server resolved that text to, when it says so (a declared match). */
573
+ resolvedId: string | null;
574
+ }
575
+ /** What a call wrote (`applied`) and what it didn't, why, and the choices offered (`unapplied`). */
576
+ export interface Changes {
577
+ applied: Change[];
578
+ unapplied: Change[];
579
+ }
580
+ export interface PatientCandidate {
581
+ id: string;
582
+ firstName: string;
583
+ lastName: string | null;
584
+ dateOfBirth: string | null;
585
+ }
586
+ export interface PrescriptionCandidate {
587
+ id: string;
588
+ instructions: string | null;
589
+ dispense: PrescriptionRecord["dispense"];
590
+ }
591
+ export interface OrderCandidate {
592
+ id: string;
593
+ /** null: no pharmacy yet (the patient chooses). */
594
+ pharmacy: Pharmacy | null;
595
+ prescriptions: PrescriptionRecord[];
596
+ }
597
+ export interface OrdersInput {
598
+ filter?: {
599
+ /** Only this order; no results when it doesn't exist in the caller's scope. */
600
+ id?: string;
601
+ patient?: {
602
+ id?: string;
603
+ name?: {
604
+ first?: string;
605
+ last?: string;
606
+ };
607
+ dateOfBirth?: string;
608
+ sex?: Sex;
609
+ email?: string;
610
+ phone?: string;
611
+ };
612
+ state?: OrderStatus;
613
+ };
614
+ /** Newest first; the server defaults to 25 and caps at 100. */
615
+ limit?: number;
616
+ /** Omit to skip pharmacy search; {} reads marketplace choices. */
617
+ routablePharmacies?: {
618
+ pharmacy?: PharmacyReferenceInput;
619
+ page?: {
620
+ limit?: number;
621
+ offset?: number;
622
+ };
623
+ };
624
+ }
625
+ export interface ChoicePage {
626
+ options: ChangeOption[];
627
+ /** Sponsored additions do not count toward this total. */
628
+ totalCount: number;
629
+ nextOffset: number | null;
630
+ }
631
+ /** A read-only snapshot; it does not open or update the instance's live objects. */
632
+ export interface ListedOrder extends OrderRecord {
633
+ /** null when not requested or when the field couldn't be read. */
634
+ routablePharmacies: ChoicePage | null;
635
+ }
636
+ export interface OrdersResult {
637
+ orders: ListedOrder[];
638
+ /** Ambiguous patient filter: choose a patient and repeat the read with their id. */
639
+ candidates: PatientCandidate[];
640
+ reason: string | null;
641
+ }
642
+ export {};
643
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/photon/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,MAAM,MAAM,GAAG,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,CAAC;AAChD,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG,YAAY,GAAG,SAAS,CAAC;AACnE,sGAAsG;AACtG,MAAM,MAAM,YAAY,GAAG,UAAU,GAAG,QAAQ,GAAG,kBAAkB,CAAC;AACtE,MAAM,M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AC,EAAE,MAAM,CAAA;aAAE,CAAC;YACzC,WAAW,CAAC,EAAE,MAAM,CAAC;YACrB,GAAG,CAAC,EAAE,GAAG,CAAC;YACV,KAAK,CAAC,EAAE,MAAM,CAAC;YACf,KAAK,CAAC,EAAE,MAAM,CAAC;SAChB,CAAC;QACF,KAAK,CAAC,EAAE,WAAW,CAAC;KACrB,CAAC;IACF,+DAA+D;IAC/D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kEAAkE;IAClE,kBAAkB,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,sBAAsB,CAAC;QAAC,IAAI,CAAC,EAAE;YAAE,KAAK,CAAC,EAAE,MAAM,CAAC;YAAC,MAAM,CAAC,EAAE,MAAM,CAAA;SAAE,CAAA;KAAE,CAAC;CACxG;AAED,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,0DAA0D;IAC1D,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAED,oFAAoF;AACpF,MAAM,WAAW,WAAY,SAAQ,WAAW;IAC9C,kEAAkE;IAClE,kBAAkB,EAAE,UAAU,GAAG,IAAI,CAAC;CACvC;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,WAAW,EAAE,CAAC;IACtB,oFAAoF;IACpF,UAAU,EAAE,gBAAgB,EAAE,CAAC;IAC/B,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * The public shapes: records, inputs, changes and candidates, in network-api's names and nesting so the
3
+ * schema's docs map one-to-one. Declared here — not the generated GraphQL types, which stay internal — so
4
+ * a schema change stops at map.ts instead of reaching callers.
5
+ */
6
+ export {};
7
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/photon/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}