@photonhealth/client 2.0.0-rc.1 → 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.
- package/README.md +150 -5
- package/dist/analytics/lifecycleEvents.d.ts +29 -0
- package/dist/analytics/lifecycleEvents.d.ts.map +1 -0
- package/dist/analytics/lifecycleEvents.js +72 -0
- package/dist/analytics/lifecycleEvents.js.map +1 -0
- package/dist/api/client.d.ts +6 -1
- package/dist/api/client.d.ts.map +1 -1
- package/dist/api/client.js +47 -33
- package/dist/api/client.js.map +1 -1
- package/dist/api/index.d.ts +2 -0
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js +2 -0
- package/dist/api/index.js.map +1 -1
- package/dist/api/me.d.ts +37 -0
- package/dist/api/me.d.ts.map +1 -0
- package/dist/api/me.js +6 -0
- package/dist/api/me.js.map +1 -0
- package/dist/api/orders.d.ts +1047 -0
- package/dist/api/orders.d.ts.map +1 -0
- package/dist/api/orders.js +7 -0
- package/dist/api/orders.js.map +1 -0
- package/dist/api/patient.d.ts +5 -2
- package/dist/api/patient.d.ts.map +1 -1
- package/dist/api/patient.js +1 -1
- package/dist/api/patient.js.map +1 -1
- package/dist/api/prescription.d.ts +7 -1
- package/dist/api/prescription.d.ts.map +1 -1
- package/dist/api/prescription.js +10 -1
- package/dist/api/prescription.js.map +1 -1
- package/dist/gql/gql.d.ts +11 -3
- package/dist/gql/gql.d.ts.map +1 -1
- package/dist/gql/gql.js +5 -3
- package/dist/gql/gql.js.map +1 -1
- package/dist/gql/graphql.d.ts +10507 -1563
- package/dist/gql/graphql.d.ts.map +1 -1
- package/dist/gql/graphql.js +2984 -435
- package/dist/gql/graphql.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/meta/version.d.ts +2 -0
- package/dist/meta/version.d.ts.map +1 -0
- package/dist/meta/version.js +2 -0
- package/dist/meta/version.js.map +1 -0
- package/dist/photon/analytics.d.ts +39 -0
- package/dist/photon/analytics.d.ts.map +1 -0
- package/dist/photon/analytics.js +91 -0
- package/dist/photon/analytics.js.map +1 -0
- package/dist/photon/auth.d.ts +9 -5
- package/dist/photon/auth.d.ts.map +1 -1
- package/dist/photon/auth.js +2 -6
- package/dist/photon/auth.js.map +1 -1
- package/dist/photon/choices.d.ts +1 -1
- package/dist/photon/choices.js +2 -2
- package/dist/photon/choices.js.map +1 -1
- package/dist/photon/environments.d.ts +2 -1
- package/dist/photon/environments.d.ts.map +1 -1
- package/dist/photon/environments.js +2 -1
- package/dist/photon/environments.js.map +1 -1
- package/dist/photon/index.d.ts +6 -3
- package/dist/photon/index.d.ts.map +1 -1
- package/dist/photon/index.js +2 -1
- package/dist/photon/index.js.map +1 -1
- package/dist/photon/machine.d.ts +28 -0
- package/dist/photon/machine.d.ts.map +1 -0
- package/dist/photon/machine.js +53 -0
- package/dist/photon/machine.js.map +1 -0
- package/dist/photon/map.d.ts +6 -2
- package/dist/photon/map.d.ts.map +1 -1
- package/dist/photon/map.js +133 -33
- package/dist/photon/map.js.map +1 -1
- package/dist/photon/order.d.ts +21 -1
- package/dist/photon/order.d.ts.map +1 -1
- package/dist/photon/order.js +79 -12
- package/dist/photon/order.js.map +1 -1
- package/dist/photon/orders.d.ts +5 -0
- package/dist/photon/orders.d.ts.map +1 -0
- package/dist/photon/orders.js +39 -0
- package/dist/photon/orders.js.map +1 -0
- package/dist/photon/patient.d.ts +8 -6
- package/dist/photon/patient.d.ts.map +1 -1
- package/dist/photon/patient.js +61 -30
- package/dist/photon/patient.js.map +1 -1
- package/dist/photon/photon.d.ts +39 -1
- package/dist/photon/photon.d.ts.map +1 -1
- package/dist/photon/photon.js +85 -5
- package/dist/photon/photon.js.map +1 -1
- package/dist/photon/prescription.d.ts +17 -4
- package/dist/photon/prescription.d.ts.map +1 -1
- package/dist/photon/prescription.js +48 -11
- package/dist/photon/prescription.js.map +1 -1
- package/dist/photon/session.d.ts +15 -10
- package/dist/photon/session.d.ts.map +1 -1
- package/dist/photon/session.js +5 -3
- package/dist/photon/session.js.map +1 -1
- package/dist/photon/types.d.ts +278 -46
- package/dist/photon/types.d.ts.map +1 -1
- package/dist/test-utils/msw.d.ts +2 -2
- package/dist/test-utils/msw.d.ts.map +1 -1
- package/dist/test-utils/msw.js +5 -5
- package/dist/test-utils/msw.js.map +1 -1
- package/dist/testing/{scriptedClient.d.ts → fakeNetworkApiClient.d.ts} +5 -4
- package/dist/testing/fakeNetworkApiClient.d.ts.map +1 -0
- package/dist/testing/{scriptedClient.js → fakeNetworkApiClient.js} +8 -4
- package/dist/testing/fakeNetworkApiClient.js.map +1 -0
- package/dist/testing/fixtures.d.ts +1047 -0
- package/dist/testing/fixtures.d.ts.map +1 -1
- package/dist/testing/fixtures.js +47 -13
- package/dist/testing/fixtures.js.map +1 -1
- package/dist/testing.d.ts +4 -4
- package/dist/testing.d.ts.map +1 -1
- package/dist/testing.js +4 -4
- package/dist/testing.js.map +1 -1
- package/package.json +2 -2
- package/src/analytics/lifecycleEvents.test.ts +417 -0
- package/src/analytics/lifecycleEvents.ts +155 -0
- package/src/api/client.ts +71 -46
- package/src/api/index.ts +2 -0
- package/src/api/me.ts +7 -0
- package/src/api/orders.ts +8 -0
- package/src/api/patient.ts +11 -2
- package/src/api/prescription.ts +18 -0
- package/src/gql/gql.ts +21 -9
- package/src/gql/graphql.ts +4280 -597
- package/src/index.ts +1 -1
- package/src/meta/version.test.ts +10 -0
- package/src/meta/version.ts +1 -0
- package/src/operations/fragments.graphql +166 -20
- package/src/operations/me.graphql +38 -0
- package/src/operations/orders.graphql +35 -0
- package/src/operations/patient.graphql +29 -3
- package/src/operations/prescription.graphql +20 -0
- package/src/photon/analytics.ts +129 -0
- package/src/photon/auth.ts +9 -10
- package/src/photon/choices.ts +2 -2
- package/src/photon/environments.ts +3 -1
- package/src/photon/index.ts +16 -2
- package/src/photon/machine.ts +90 -0
- package/src/photon/map.ts +151 -35
- package/src/photon/order.test.ts +142 -0
- package/src/photon/order.ts +92 -12
- package/src/photon/orders.ts +42 -0
- package/src/photon/patient.ts +73 -33
- package/src/photon/photon.ts +139 -6
- package/src/photon/prescription.ts +71 -12
- package/src/photon/session.ts +18 -9
- package/src/photon/types.ts +280 -26
- package/src/test-utils/msw.ts +16 -5
- package/src/testing/{scriptedClient.ts → fakeNetworkApiClient.ts} +8 -4
- package/src/testing/fixtures.ts +55 -13
- package/src/testing.ts +6 -3
- package/dist/testing/scriptedClient.d.ts.map +0 -1
- package/dist/testing/scriptedClient.js.map +0 -1
package/src/photon/types.ts
CHANGED
|
@@ -24,6 +24,13 @@ export interface Address {
|
|
|
24
24
|
export interface Pharmacy {
|
|
25
25
|
id: string;
|
|
26
26
|
name: string;
|
|
27
|
+
logo: string | null;
|
|
28
|
+
phone: string | null;
|
|
29
|
+
/** Local opening hours, with the pharmacy's IANA timezone. null when unknown. */
|
|
30
|
+
hours: PharmacyHours[] | null;
|
|
31
|
+
/** At the server's current time; null when hours are unknown. */
|
|
32
|
+
isOpen: boolean | null;
|
|
33
|
+
nextEvents: { open: PharmacyEvent; close: PharmacyEvent } | null;
|
|
27
34
|
address: Address | null;
|
|
28
35
|
latitude: number | null;
|
|
29
36
|
longitude: number | null;
|
|
@@ -31,22 +38,110 @@ export interface Pharmacy {
|
|
|
31
38
|
offers: PharmacyOffer[];
|
|
32
39
|
}
|
|
33
40
|
|
|
41
|
+
export interface PharmacyHours {
|
|
42
|
+
openFrom: string;
|
|
43
|
+
openUntil: string;
|
|
44
|
+
dayOfWeek: "SUNDAY" | "MONDAY" | "TUESDAY" | "WEDNESDAY" | "THURSDAY" | "FRIDAY" | "SATURDAY";
|
|
45
|
+
is24Hr: boolean;
|
|
46
|
+
timezone: string;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/** Serialized instants; a 24-hour pharmacy has no next opening or closing instant. */
|
|
50
|
+
export type PharmacyEvent = { type: "open" | "close"; datetime: string } | { 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: { id: string; name: string } | null;
|
|
57
|
+
settings: {
|
|
58
|
+
brandColor: string;
|
|
59
|
+
/** As stored: may be a URL or a legacy asset name. */
|
|
60
|
+
brandLogo: string | null;
|
|
61
|
+
priorAuthorizationExceptionMessage: string | null;
|
|
62
|
+
patientUx: { enablePatientRerouting: boolean; enableAutomatedOps: boolean };
|
|
63
|
+
} | null;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* One price one source quotes for one prescription at one pharmacy. A source that prices a two-drug order
|
|
68
|
+
* reports two of these, so nothing here is a per-pharmacy total — totals are the caller's to compute.
|
|
69
|
+
*/
|
|
34
70
|
export interface PharmacyOffer {
|
|
35
71
|
source: string;
|
|
72
|
+
prescriptionId: string;
|
|
73
|
+
/** null when the source quotes placement and badges but no amount. */
|
|
74
|
+
priceType: OfferPriceType | null;
|
|
36
75
|
isPromoted: boolean;
|
|
37
|
-
attributeTags:
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
76
|
+
attributeTags: OfferAttributeTag[];
|
|
77
|
+
price: OfferPrice | null;
|
|
78
|
+
deliveryEstimate: OfferDeliveryEstimate | null;
|
|
79
|
+
/**
|
|
80
|
+
* What the patient presents at the counter for this offer's price. Empty whenever `redemptionState` isn't
|
|
81
|
+
* `SETTLED`, and also when a settled offer needs nothing presented — read the state before treating an
|
|
82
|
+
* empty list as "nothing to present".
|
|
83
|
+
*/
|
|
84
|
+
redemptionMethods: RedemptionMethod[];
|
|
85
|
+
redemptionState: RedemptionState;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/** `MEMBERSHIP` and `INSURANCE` are conditional — the API doesn't know whether the patient qualifies. */
|
|
89
|
+
export type OfferPriceType = "CASH" | "INSURANCE" | "MEMBERSHIP";
|
|
90
|
+
|
|
91
|
+
export interface OfferAttributeTag {
|
|
92
|
+
kind: string;
|
|
93
|
+
label: string;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/** One prescription's price from one source. */
|
|
97
|
+
export interface OfferPrice {
|
|
98
|
+
/** What the patient pays, promotions already applied — use it for display, sorting and totals. */
|
|
99
|
+
amount: number | null;
|
|
100
|
+
/** Undiscounted, for comparison. null when the source gives none. */
|
|
101
|
+
retailAmount: number | null;
|
|
102
|
+
/** `baseAmount - amountSaved` is the promoted price; `amount` already reflects it. */
|
|
103
|
+
promotions: { type: string | null; baseAmount: number | null; amountSaved: number | null }[];
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export interface OfferDeliveryEstimate {
|
|
107
|
+
deliveryPromise: string;
|
|
108
|
+
deliveryPromiseRangeStart: string | null;
|
|
109
|
+
deliveryPromiseRangeEnd: string | null;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Describes the generation attempt, not whether the patient ends up with a usable card.
|
|
114
|
+
*
|
|
115
|
+
* `SETTLED`: every attempt finished; `redemptionMethods` holds whatever succeeded, empty when none did.
|
|
116
|
+
* `PENDING`: nothing generated yet and one still may be — a pharmacy search prices a discount-card source
|
|
117
|
+
* before the order routes there, and the card is minted on routing.
|
|
118
|
+
* `SKIPPED`: nothing was attempted and none is coming — this source mints nothing.
|
|
119
|
+
*/
|
|
120
|
+
export type RedemptionState = "SETTLED" | "PENDING" | "SKIPPED";
|
|
121
|
+
|
|
122
|
+
/** One member today — a PharmacyBenefitCard for the patient's own insurance is the expected second. */
|
|
123
|
+
export type RedemptionMethod = PharmacyDiscountCard;
|
|
124
|
+
|
|
125
|
+
/** A cash discount card — a GoodRx or RxSense coupon, read out at the counter or claimed on `externalUrl`. */
|
|
126
|
+
export interface PharmacyDiscountCard {
|
|
127
|
+
type: "discountCard";
|
|
128
|
+
id: string;
|
|
129
|
+
/** The prescription this card covers, matching its offer's own `prescriptionId`. */
|
|
130
|
+
prescriptionId: string;
|
|
131
|
+
/** Bank Identification Number — the 6-digit PBM routing identifier. */
|
|
132
|
+
bin: string;
|
|
133
|
+
/** Processor Control Number — secondary routing qualifier alongside BIN. */
|
|
134
|
+
pcn: string;
|
|
135
|
+
group: string;
|
|
136
|
+
memberId: string;
|
|
137
|
+
/** Claim this before pickup for a promo price. null when the counter fields work alone. */
|
|
138
|
+
externalUrl: string | null;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/** An order's offers, split by whether they depend on the pharmacy it's routed to. */
|
|
142
|
+
export interface OrderOffers {
|
|
143
|
+
/** null until a pharmacy is chosen; `[]` when one is chosen but no offer applies. */
|
|
144
|
+
atPharmacy: PharmacyOffer[] | null;
|
|
50
145
|
}
|
|
51
146
|
|
|
52
147
|
/** Exactly one location field. network-api currently rejects `text`; use an address or coordinates. */
|
|
@@ -64,10 +159,30 @@ export interface PharmacyReferenceInput {
|
|
|
64
159
|
fulfillmentType?: "MAIL_ORDER" | "PICK_UP";
|
|
65
160
|
}
|
|
66
161
|
|
|
67
|
-
|
|
162
|
+
export type OrderRerouteReasonType =
|
|
163
|
+
| "CLOSER_LOCATION"
|
|
164
|
+
| "PHARMACY_CLOSED"
|
|
165
|
+
| "OUT_OF_STOCK"
|
|
166
|
+
| "FILL_TIME_TOO_SLOW"
|
|
167
|
+
| "INSURANCE_NOT_ACCEPTED"
|
|
168
|
+
| "PRICE_TOO_HIGH"
|
|
169
|
+
| "WRONG_PHARMACY_SELECTED"
|
|
170
|
+
| "OTHER";
|
|
171
|
+
|
|
172
|
+
/** `note` is required when `type` is `OTHER`. */
|
|
173
|
+
export interface OrderRerouteReasonInput {
|
|
174
|
+
type: OrderRerouteReasonType;
|
|
175
|
+
note?: string;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* Resolve a pharmacy, or unassign it with `none: true`; not both. `reason` goes only with `pharmacy`, when a
|
|
180
|
+
* submitted order moves from its pharmacy to another.
|
|
181
|
+
*/
|
|
68
182
|
export interface OrderPharmacyInput {
|
|
69
183
|
pharmacy?: PharmacyReferenceInput;
|
|
70
184
|
none?: boolean;
|
|
185
|
+
reason?: OrderRerouteReasonInput;
|
|
71
186
|
}
|
|
72
187
|
|
|
73
188
|
export interface Diagnosis {
|
|
@@ -79,7 +194,7 @@ export interface Diagnosis {
|
|
|
79
194
|
/**
|
|
80
195
|
* A patient. Each list (allergies, medications, diagnoses, benefits) is `null` when nothing is recorded, and
|
|
81
196
|
* `[]` when "none" is. network-api reads a recorded "none" back for allergies (NKDA) only; for the others `[]`
|
|
82
|
-
* comes only from the live Patient that recorded it
|
|
197
|
+
* comes only from the live Patient that recorded it.
|
|
83
198
|
*/
|
|
84
199
|
export interface PatientRecord {
|
|
85
200
|
id: string;
|
|
@@ -88,12 +203,14 @@ export interface PatientRecord {
|
|
|
88
203
|
dateOfBirth: string | null;
|
|
89
204
|
sex: Sex | null;
|
|
90
205
|
gender: string | null;
|
|
206
|
+
} | null;
|
|
207
|
+
contact: {
|
|
91
208
|
email: string | null;
|
|
92
209
|
phone: string | null;
|
|
93
210
|
address: Address | null;
|
|
94
|
-
benefits: { id: string; bin: string; pcn: string | null; groupId: string | null; memberId: string }[] | null;
|
|
95
|
-
preferredPharmacy: Pharmacy | null;
|
|
96
211
|
} | null;
|
|
212
|
+
benefits: { id: string; bin: string; pcn: string | null; groupId: string | null; memberId: string }[] | null;
|
|
213
|
+
preferredPharmacy: Pharmacy | null;
|
|
97
214
|
clinical: {
|
|
98
215
|
allergies: { id: string; name: string; rxNormId: string | null }[] | null;
|
|
99
216
|
medications: { id: string; name: string; rxNormId: string | null; status: MedicationStatus }[] | null;
|
|
@@ -143,14 +260,18 @@ export interface Treatment {
|
|
|
143
260
|
/** DEA schedule: "II" … "V", or "UNCONTROLLED". Only on a lookup's options (null on a prescription). */
|
|
144
261
|
schedule: string | null;
|
|
145
262
|
/**
|
|
146
|
-
*
|
|
147
|
-
* Only on a lookup's options (null on a prescription).
|
|
263
|
+
* Its catalog templates, then recommended ones (the units it's dispensed in, each as a template that sets only
|
|
264
|
+
* `dispense.unit`). Only on a lookup's options (null on a prescription: load a draft's with `loadTemplates()`).
|
|
148
265
|
*/
|
|
149
|
-
|
|
266
|
+
templates: PrescriptionTemplate[] | null;
|
|
150
267
|
}
|
|
151
268
|
|
|
152
269
|
export interface PrescriptionRecord {
|
|
153
270
|
id: string;
|
|
271
|
+
/** Assigned prescriber, not necessarily the signer. null when unassigned or unreadable. */
|
|
272
|
+
prescriber: { id: string; name: { first: string | null; middle: string | null; last: string | null } } | null;
|
|
273
|
+
/** On its latest order; null for a draft or until sent to a pharmacy. */
|
|
274
|
+
fulfillment: PrescriptionFulfillment | null;
|
|
154
275
|
templateId: string | null;
|
|
155
276
|
patient: { id: string } | null;
|
|
156
277
|
treatment: Treatment;
|
|
@@ -168,9 +289,88 @@ export interface PrescriptionRecord {
|
|
|
168
289
|
signing: { state: SigningState; contentHash: string; message: string | null; signedAt: string | null };
|
|
169
290
|
}
|
|
170
291
|
|
|
292
|
+
/** Who wrote a template: the prescriber (their own catalog), their organization, or Photon (recommended). */
|
|
293
|
+
export type TemplateSource = "PERSONAL_CATALOG" | "ORG_CATALOG" | "RECOMMENDED";
|
|
294
|
+
|
|
295
|
+
/**
|
|
296
|
+
* What choosing a template fills in on a prescription. Any field can be null: a template sets only what it knows
|
|
297
|
+
* (a recommended sig sets the instructions and maybe a unit; a recommended unit sets only `dispense.unit`).
|
|
298
|
+
*/
|
|
299
|
+
export interface PrescriptionTemplate {
|
|
300
|
+
/** The catalog template's id — the `templateId` a prescription takes. null for a recommended one. */
|
|
301
|
+
id: string | null;
|
|
302
|
+
source: TemplateSource;
|
|
303
|
+
name: string | null;
|
|
304
|
+
instructions: string | null;
|
|
305
|
+
dispense: PrescriptionRecord["dispense"];
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
export interface PrescriptionFulfillment {
|
|
309
|
+
state: "CREATED" | "SENT" | "RECEIVED" | "PROCESSING" | "READY" | "PICKED_UP" | "DELIVERED" | "CANCELED" | null;
|
|
310
|
+
pharmacyEstimatedReadyAt: string | null;
|
|
311
|
+
/** Unresolved problems only. */
|
|
312
|
+
exceptions: {
|
|
313
|
+
id: string;
|
|
314
|
+
type:
|
|
315
|
+
| "BACKORDERED"
|
|
316
|
+
| "OOS"
|
|
317
|
+
| "PA_REQUIRED"
|
|
318
|
+
| "REFILL_TOO_SOON"
|
|
319
|
+
| "HIGH_COPAY"
|
|
320
|
+
| "NOT_COVERED"
|
|
321
|
+
| "OTC"
|
|
322
|
+
| "MEDICAL_DEVICE"
|
|
323
|
+
| "RX_CLARIFICATION";
|
|
324
|
+
message: string | null;
|
|
325
|
+
createdAt: string;
|
|
326
|
+
}[];
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
export type OrderFulfillmentState =
|
|
330
|
+
| "CREATED"
|
|
331
|
+
| "SENT"
|
|
332
|
+
| "RECEIVED"
|
|
333
|
+
| "PROCESSING"
|
|
334
|
+
| "FILLING"
|
|
335
|
+
| "READY"
|
|
336
|
+
| "PICKED_UP"
|
|
337
|
+
| "SHIPPED"
|
|
338
|
+
| "DELIVERED"
|
|
339
|
+
| "CANCELED";
|
|
340
|
+
|
|
341
|
+
export type OrderRoutingSelector =
|
|
342
|
+
"AUTO" | "PATIENT" | "PROVIDER" | "STAFF" | "ADMIN" | "SUPPORT" | "MED_OPS" | "BPO" | "UNKNOWN";
|
|
343
|
+
|
|
344
|
+
export interface OrderRoutingHistoryEntry {
|
|
345
|
+
pharmacy: Pharmacy;
|
|
346
|
+
selector: OrderRoutingSelector;
|
|
347
|
+
reason: string | null;
|
|
348
|
+
createdAt: string;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
/** Based on the order's state only; does not include organization settings. */
|
|
352
|
+
export interface OrderRoutability {
|
|
353
|
+
allowed: boolean;
|
|
354
|
+
/** Why rerouting is blocked; null when allowed. */
|
|
355
|
+
reason: string | null;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
export interface OrderFulfillment {
|
|
359
|
+
/** null until the pharmacy has reported a state. */
|
|
360
|
+
state: OrderFulfillmentState | null;
|
|
361
|
+
/** Oldest first; empty until the order is first routed. */
|
|
362
|
+
history: OrderRoutingHistoryEntry[];
|
|
363
|
+
/** null when routability couldn't be determined. */
|
|
364
|
+
routability: OrderRoutability | null;
|
|
365
|
+
/** Open problems with the order; empty once resolved. */
|
|
366
|
+
exceptions: { id: string; type: string; message: string | null; createdAt: string }[];
|
|
367
|
+
}
|
|
368
|
+
|
|
171
369
|
export interface OrderRecord {
|
|
172
370
|
id: string;
|
|
173
371
|
state: OrderStatus;
|
|
372
|
+
/** null when absent or when the organization couldn't be read. */
|
|
373
|
+
organization: Organization | null;
|
|
174
374
|
/** null when network-api couldn't read the patient (an upstream failure on that field). */
|
|
175
375
|
patient: PatientRecord | null;
|
|
176
376
|
prescriptions: PrescriptionRecord[];
|
|
@@ -181,7 +381,10 @@ export interface OrderRecord {
|
|
|
181
381
|
screeningAlerts: ScreeningAlert[];
|
|
182
382
|
/** null: the patient chooses. */
|
|
183
383
|
pharmacy: Pharmacy | null;
|
|
184
|
-
|
|
384
|
+
/** Pricing and promotion offers for this order. */
|
|
385
|
+
offers: OrderOffers;
|
|
386
|
+
/** null for a draft, or when fulfillment couldn't be read. */
|
|
387
|
+
fulfillment: OrderFulfillment | null;
|
|
185
388
|
}
|
|
186
389
|
|
|
187
390
|
// ---- Inputs (what you send; the server decides what it means) ----
|
|
@@ -196,14 +399,17 @@ export interface PatientInput {
|
|
|
196
399
|
dateOfBirth?: string;
|
|
197
400
|
sex?: Sex;
|
|
198
401
|
gender?: string;
|
|
402
|
+
};
|
|
403
|
+
contact?: {
|
|
199
404
|
email?: string;
|
|
200
405
|
phone?: string;
|
|
201
406
|
address?: Partial<Omit<Address, "country">> & { country?: string };
|
|
202
|
-
benefits?: Patch<{ id?: string; bin?: string; pcn?: string; groupId?: string; memberId?: string }> & {
|
|
203
|
-
update?: { id: string; bin?: string; pcn?: string; groupId?: string; memberId?: string }[];
|
|
204
|
-
};
|
|
205
407
|
};
|
|
206
|
-
|
|
408
|
+
benefits?: Patch<{ id?: string; bin?: string; pcn?: string; groupId?: string; memberId?: string }> & {
|
|
409
|
+
update?: { id: string; bin?: string; pcn?: string; groupId?: string; memberId?: string }[];
|
|
410
|
+
};
|
|
411
|
+
preferredPharmacy?: PharmacyReferenceInput;
|
|
412
|
+
/** Needs the patient's id (network-api matches on demographics and contact only). */
|
|
207
413
|
clinical?: {
|
|
208
414
|
allergies?: Patch<{ id?: string; name?: string; rxNormId?: string }>;
|
|
209
415
|
medications?: Patch<{ id?: string; name?: string; rxNormId?: string; status: MedicationStatus }>;
|
|
@@ -283,7 +489,13 @@ export interface ChangeOption {
|
|
|
283
489
|
pharmacy: Pharmacy | null;
|
|
284
490
|
operation: string;
|
|
285
491
|
/** Why and how confidently it matched — empty when there's nothing to explain (e.g. an exact id). */
|
|
286
|
-
matchReasons: {
|
|
492
|
+
matchReasons: {
|
|
493
|
+
type: string;
|
|
494
|
+
label: string;
|
|
495
|
+
confidence: "HIGH" | "MEDIUM" | "LOW" | null;
|
|
496
|
+
/** Magnitude, e.g. pharmacy distance; keep the server's units. */
|
|
497
|
+
value: { displayValue: string; value: number; unit: string } | null;
|
|
498
|
+
}[];
|
|
287
499
|
}
|
|
288
500
|
|
|
289
501
|
export interface Change {
|
|
@@ -296,6 +508,8 @@ export interface Change {
|
|
|
296
508
|
category: string | null;
|
|
297
509
|
operation: "ADDED" | "MODIFIED" | "REMOVED";
|
|
298
510
|
options: ChangeOption[];
|
|
511
|
+
/** The resolved choice, including its pharmacy and offers even when applied immediately. */
|
|
512
|
+
after: ChangeOption | null;
|
|
299
513
|
/** For a lookup: the text the server tried to resolve. */
|
|
300
514
|
inputText: string | null;
|
|
301
515
|
/** For a lookup: the record the server resolved that text to, when it says so (a declared match). */
|
|
@@ -327,3 +541,43 @@ export interface OrderCandidate {
|
|
|
327
541
|
pharmacy: Pharmacy | null;
|
|
328
542
|
prescriptions: PrescriptionRecord[];
|
|
329
543
|
}
|
|
544
|
+
|
|
545
|
+
export interface OrdersInput {
|
|
546
|
+
filter?: {
|
|
547
|
+
/** Only this order; no results when it doesn't exist in the caller's scope. */
|
|
548
|
+
id?: string;
|
|
549
|
+
patient?: {
|
|
550
|
+
id?: string;
|
|
551
|
+
name?: { first?: string; last?: string };
|
|
552
|
+
dateOfBirth?: string;
|
|
553
|
+
sex?: Sex;
|
|
554
|
+
email?: string;
|
|
555
|
+
phone?: string;
|
|
556
|
+
};
|
|
557
|
+
state?: OrderStatus;
|
|
558
|
+
};
|
|
559
|
+
/** Newest first; the server defaults to 25 and caps at 100. */
|
|
560
|
+
limit?: number;
|
|
561
|
+
/** Omit to skip pharmacy search; {} reads marketplace choices. */
|
|
562
|
+
routablePharmacies?: { pharmacy?: PharmacyReferenceInput; page?: { limit?: number; offset?: number } };
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
export interface ChoicePage {
|
|
566
|
+
options: ChangeOption[];
|
|
567
|
+
/** Sponsored additions do not count toward this total. */
|
|
568
|
+
totalCount: number;
|
|
569
|
+
nextOffset: number | null;
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
/** A read-only snapshot; it does not open or update the instance's live objects. */
|
|
573
|
+
export interface ListedOrder extends OrderRecord {
|
|
574
|
+
/** null when not requested or when the field couldn't be read. */
|
|
575
|
+
routablePharmacies: ChoicePage | null;
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
export interface OrdersResult {
|
|
579
|
+
orders: ListedOrder[];
|
|
580
|
+
/** Ambiguous patient filter: choose a patient and repeat the read with their id. */
|
|
581
|
+
candidates: PatientCandidate[];
|
|
582
|
+
reason: string | null;
|
|
583
|
+
}
|
package/src/test-utils/msw.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* For tests only: network-api mocked at the fetch level with MSW (https://mswjs.io), for tests that run a real
|
|
3
|
-
* page or a real `photon()` instance — Playwright, a browser, Node — where `
|
|
3
|
+
* page or a real `photon()` instance — Playwright, a browser, Node — where `fakeNetworkApiClient` can't be swapped in.
|
|
4
4
|
*
|
|
5
|
-
* Scripted the same way as `
|
|
5
|
+
* Scripted the same way as `fakeNetworkApiClient`: answers keyed by intent (`LookupPrescription`, `SubmitOrder`, …) or
|
|
6
6
|
* operation name, each returning the GraphQL `data` (build it with `payload` and the fixtures).
|
|
7
7
|
*
|
|
8
8
|
* const { handlers, calls } = photonHandlers({ SyncPatient: () => noMatch() });
|
|
@@ -12,10 +12,21 @@
|
|
|
12
12
|
*/
|
|
13
13
|
import { http, HttpResponse } from "msw";
|
|
14
14
|
import { environmentUrls, type PhotonEnvironment } from "../photon/environments.ts";
|
|
15
|
-
import { intentOf } from "../testing/
|
|
15
|
+
import { intentOf } from "../testing/fakeNetworkApiClient.ts";
|
|
16
16
|
|
|
17
|
-
export { payload, intentOf } from "../testing/
|
|
18
|
-
export {
|
|
17
|
+
export { payload, intentOf } from "../testing/fakeNetworkApiClient.ts";
|
|
18
|
+
export {
|
|
19
|
+
change,
|
|
20
|
+
treatment,
|
|
21
|
+
rx,
|
|
22
|
+
alert,
|
|
23
|
+
patient,
|
|
24
|
+
order,
|
|
25
|
+
listedOrder,
|
|
26
|
+
orders,
|
|
27
|
+
noMatch,
|
|
28
|
+
ambiguous,
|
|
29
|
+
} from "../testing/fixtures.ts";
|
|
19
30
|
|
|
20
31
|
/** What each call answers: its GraphQL `data`. Keyed by intent, or by operation name. */
|
|
21
32
|
export type Responses = Record<string, (vars: any) => unknown>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { operationNameOf, type NetworkClient } from "../api/client.ts";
|
|
2
|
+
import type { Change } from "../api/changes/index.ts";
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* What a call means, from its operation + variables — the way network-api reads it.
|
|
@@ -25,20 +26,23 @@ export function intentOf(op: string, vars: any): string {
|
|
|
25
26
|
* A NetworkClient that answers each call from a script keyed by intent (or plain operation
|
|
26
27
|
* name), and records the calls. `names()` lists intents; `calls[i].op` is the real operation.
|
|
27
28
|
*/
|
|
28
|
-
export function
|
|
29
|
+
export function fakeNetworkApiClient(responses: Record<string, (vars: any, signal?: AbortSignal) => unknown>) {
|
|
29
30
|
const calls: { name: string; op: string; vars: any; signal?: AbortSignal }[] = [];
|
|
31
|
+
const reads = new Set<(typeof calls)[number]>();
|
|
30
32
|
const client: NetworkClient = {
|
|
31
33
|
execute: (async (doc: any, vars: any, options?: { signal?: AbortSignal }) => {
|
|
32
34
|
const op = operationNameOf(doc);
|
|
33
35
|
const name = intentOf(op, vars);
|
|
34
|
-
|
|
36
|
+
const call = { name, op, vars, signal: options?.signal };
|
|
37
|
+
calls.push(call);
|
|
38
|
+
if (/^\s*query\b/.test(doc.toString())) reads.add(call);
|
|
35
39
|
const respond = responses[name] ?? responses[op];
|
|
36
40
|
if (!respond) throw new Error(`unexpected operation ${name} (${op})`);
|
|
37
41
|
return respond(vars, options?.signal) as never;
|
|
38
42
|
}) as NetworkClient["execute"],
|
|
39
43
|
};
|
|
40
44
|
/** The calls that change something — without reads (e.g. the GetPrescription after every Rx save). */
|
|
41
|
-
const writes = () => calls.filter((c) => !c.op.startsWith("Get"));
|
|
45
|
+
const writes = () => calls.filter((c) => !c.op.startsWith("Get") && !reads.has(c));
|
|
42
46
|
return { client, calls, writes, names: () => calls.map((c) => c.name) };
|
|
43
47
|
}
|
|
44
48
|
|
|
@@ -46,7 +50,7 @@ export const payload = (
|
|
|
46
50
|
key: "patient" | "prescription" | "order",
|
|
47
51
|
typename: string,
|
|
48
52
|
entity: unknown,
|
|
49
|
-
changes = { changes: [] },
|
|
53
|
+
changes: { changes: Change[] } = { changes: [] },
|
|
50
54
|
) => ({
|
|
51
55
|
[key]: { __typename: typename, [key]: entity, ...changes },
|
|
52
56
|
});
|
package/src/testing/fixtures.ts
CHANGED
|
@@ -2,8 +2,9 @@ import type { Change } from "../api/changes/index.ts";
|
|
|
2
2
|
import type { Order } from "../api/order.ts";
|
|
3
3
|
import type { Patient } from "../api/patient.ts";
|
|
4
4
|
import type { Prescription } from "../api/prescription.ts";
|
|
5
|
+
import type { OrdersQuery } from "../gql/graphql.ts";
|
|
5
6
|
|
|
6
|
-
// Hand-written until M0 captures real boson responses
|
|
7
|
+
// Hand-written until M0 captures real boson responses.
|
|
7
8
|
|
|
8
9
|
export const change = (overrides: Partial<Change> = {}): Change => ({
|
|
9
10
|
__typename: "Change",
|
|
@@ -42,16 +43,30 @@ type PharmacyOffer = Pharmacy["offers"][number];
|
|
|
42
43
|
export const pharmacyOffer = (overrides: Partial<PharmacyOffer> = {}): PharmacyOffer => ({
|
|
43
44
|
__typename: "PharmacyOffer",
|
|
44
45
|
source: "goodrx",
|
|
46
|
+
prescriptionId: "rx_1",
|
|
47
|
+
priceType: "CASH",
|
|
45
48
|
isPromoted: false,
|
|
46
49
|
attributeTags: [],
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
50
|
+
price: { __typename: "OfferPrice", amount: 12, retailAmount: 20, promotions: [] },
|
|
51
|
+
deliveryEstimate: null,
|
|
52
|
+
// A discount-card source priced this pharmacy but hasn't been routed to, so the card isn't minted yet.
|
|
53
|
+
redemptionState: "PENDING",
|
|
54
|
+
redemptionMethods: [],
|
|
55
|
+
...overrides,
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
type PharmacyDiscountCard = Extract<PharmacyOffer["redemptionMethods"][number], { __typename: "PharmacyDiscountCard" }>;
|
|
59
|
+
|
|
60
|
+
/** A minted coupon, as an offer's redemption method. Pair it with `redemptionState: "SETTLED"`. */
|
|
61
|
+
export const discountCard = (overrides: Partial<PharmacyDiscountCard> = {}): PharmacyDiscountCard => ({
|
|
62
|
+
__typename: "PharmacyDiscountCard",
|
|
63
|
+
id: "dcrd_1",
|
|
64
|
+
prescriptionId: "rx_1",
|
|
65
|
+
bin: "017449",
|
|
66
|
+
pcn: "GRX",
|
|
67
|
+
group: "GR1234",
|
|
68
|
+
memberId: "M00000001",
|
|
69
|
+
externalUrl: null,
|
|
55
70
|
...overrides,
|
|
56
71
|
});
|
|
57
72
|
|
|
@@ -59,6 +74,11 @@ export const pharmacy = (overrides: Partial<Pharmacy> = {}): Pharmacy => ({
|
|
|
59
74
|
__typename: "Pharmacy",
|
|
60
75
|
id: "phr_1",
|
|
61
76
|
name: "CVS Pharmacy",
|
|
77
|
+
logo: null,
|
|
78
|
+
phone: null,
|
|
79
|
+
hours: null,
|
|
80
|
+
isOpen: null,
|
|
81
|
+
nextEvents: null,
|
|
62
82
|
address: {
|
|
63
83
|
__typename: "PharmacyAddress",
|
|
64
84
|
street1: "123 Main St",
|
|
@@ -91,13 +111,14 @@ export const treatment = (overrides: Partial<Treatment> = {}): Treatment => ({
|
|
|
91
111
|
strength: null,
|
|
92
112
|
medicationType: null,
|
|
93
113
|
schedule: null,
|
|
94
|
-
recommendedDispenseUnits: null,
|
|
95
114
|
...overrides,
|
|
96
115
|
});
|
|
97
116
|
|
|
98
117
|
export const rx = (overrides: Partial<Prescription> = {}): Prescription => ({
|
|
99
118
|
__typename: "Prescription",
|
|
100
119
|
id: "rx_1",
|
|
120
|
+
prescriber: null,
|
|
121
|
+
fulfillment: null,
|
|
101
122
|
templateId: null,
|
|
102
123
|
patient: { __typename: "PatientReference", id: "pat_1" },
|
|
103
124
|
treatment: treatment(),
|
|
@@ -136,6 +157,9 @@ export const patient = (overrides: Partial<Patient> = {}): Patient => ({
|
|
|
136
157
|
dateOfBirth: "1990-01-01",
|
|
137
158
|
sex: null,
|
|
138
159
|
gender: null,
|
|
160
|
+
},
|
|
161
|
+
contact: {
|
|
162
|
+
__typename: "PatientContact",
|
|
139
163
|
email: null,
|
|
140
164
|
phone: null,
|
|
141
165
|
address: {
|
|
@@ -147,9 +171,9 @@ export const patient = (overrides: Partial<Patient> = {}): Patient => ({
|
|
|
147
171
|
postalCode: "10001",
|
|
148
172
|
country: "US",
|
|
149
173
|
},
|
|
150
|
-
benefits: { __typename: "BenefitList", status: null, entries: [] },
|
|
151
|
-
preferredPharmacy: null,
|
|
152
174
|
},
|
|
175
|
+
benefits: { __typename: "BenefitList", status: null, entries: [] },
|
|
176
|
+
preferredPharmacy: null,
|
|
153
177
|
clinical: {
|
|
154
178
|
__typename: "PatientClinical",
|
|
155
179
|
allergies: { __typename: "AllergyList", status: "NOT_DOCUMENTED", entries: [] },
|
|
@@ -166,13 +190,31 @@ export const order = (overrides: Partial<Order> = {}): Order =>
|
|
|
166
190
|
__typename: "Order",
|
|
167
191
|
id: "ord_1",
|
|
168
192
|
state: "DRAFT",
|
|
193
|
+
organization: null,
|
|
169
194
|
patient: patient(),
|
|
170
195
|
prescriptions: [rx()],
|
|
196
|
+
screeningAlerts: [],
|
|
171
197
|
pharmacy: null,
|
|
172
|
-
|
|
198
|
+
fulfillment: null,
|
|
199
|
+
// No pharmacy, so nothing is priced yet.
|
|
200
|
+
offers: { __typename: "OrderOffers", atPharmacy: null },
|
|
173
201
|
...overrides,
|
|
174
202
|
}) as Order;
|
|
175
203
|
|
|
204
|
+
type ListedOrder = Extract<OrdersQuery["orders"], { __typename: "OrdersPayload" }>["orders"][number];
|
|
205
|
+
|
|
206
|
+
/** A query snapshot; pharmacy choices are requested separately from the record. */
|
|
207
|
+
export const listedOrder = (overrides: Partial<ListedOrder> = {}): ListedOrder => ({
|
|
208
|
+
...order(),
|
|
209
|
+
routablePharmacies: null,
|
|
210
|
+
...overrides,
|
|
211
|
+
});
|
|
212
|
+
|
|
213
|
+
/** Orders query response, including an empty result when passed []. */
|
|
214
|
+
export const orders = (records: ListedOrder[] = [listedOrder()]) => ({
|
|
215
|
+
orders: { __typename: "OrdersPayload" as const, orders: records },
|
|
216
|
+
});
|
|
217
|
+
|
|
176
218
|
/** A patient query nobody matches: no record, and nothing the server still asks for. */
|
|
177
219
|
export const noMatch = () => ({
|
|
178
220
|
patient: { __typename: "PatientPayload", patient: null, changes: [] },
|
package/src/testing.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* For tests only — a host's or ours: a photon instance over a
|
|
3
|
-
* payloads and records to script it with. Not the app's API:
|
|
2
|
+
* For tests only — a host's or ours: a photon instance over a fake network-api client, with network-api's
|
|
3
|
+
* payloads and records to script it with. Not the app's API: keep app
|
|
4
4
|
* code off it.
|
|
5
5
|
*/
|
|
6
6
|
export { photonOver, clientOf } from "./photon/photon.ts";
|
|
7
7
|
export { NetworkTransportError } from "./api/client.ts";
|
|
8
8
|
export type { NetworkClient } from "./api/index.ts";
|
|
9
|
-
export { intentOf,
|
|
9
|
+
export { intentOf, fakeNetworkApiClient, payload } from "./testing/fakeNetworkApiClient.ts";
|
|
10
10
|
export {
|
|
11
11
|
change,
|
|
12
12
|
choice,
|
|
@@ -15,8 +15,11 @@ export {
|
|
|
15
15
|
alert,
|
|
16
16
|
patient,
|
|
17
17
|
order,
|
|
18
|
+
listedOrder,
|
|
19
|
+
orders,
|
|
18
20
|
pharmacy,
|
|
19
21
|
pharmacyOffer,
|
|
22
|
+
discountCard,
|
|
20
23
|
noMatch,
|
|
21
24
|
ambiguous,
|
|
22
25
|
} from "./testing/fixtures.ts";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"scriptedClient.d.ts","sourceRoot":"","sources":["../../src/testing/scriptedClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEvE;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,GAAG,MAAM,CAYtD;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,G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