@natch-the-storage/heathershaw-platform-types 1.9.0 → 1.9.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/build/validators.d.ts +36 -59
- package/build/validators.js +10 -15
- package/package.json +1 -1
package/build/validators.d.ts
CHANGED
|
@@ -2,20 +2,16 @@ export declare const paperScriptReminderStatusValues: readonly ["PENDING", "RECE
|
|
|
2
2
|
export declare const quoteStatusValues: readonly ["PENDING", "PROCESSING", "RESOLVED"];
|
|
3
3
|
export declare const paymentModeAtOrderValues: readonly ["INVOICE", "POS"];
|
|
4
4
|
export declare const paymentStatusValues: readonly ["AWAITING_PAYMENT", "PAID", "PENDING_INVOICE"];
|
|
5
|
-
export declare const productCategoryValues: readonly ["TODO1", "TODO2", "TODO3"];
|
|
6
5
|
export declare const repeatStorageValues: readonly ["HEATHERSHAWS", "PHARMACY", "PATIENT"];
|
|
7
6
|
export declare const scriptTypeValues: readonly ["eRx", "PAPER"];
|
|
8
7
|
export declare const shippingTypeValues: readonly ["STANDARD", "COLD_CHAIN"];
|
|
9
|
-
export declare const hazardTagsValues: readonly ["Hazardous", "Cytotoxic", "High-Risk"];
|
|
10
8
|
export type PaperScriptReminderStatus = (typeof paperScriptReminderStatusValues)[number];
|
|
11
9
|
export type QuoteStatus = (typeof quoteStatusValues)[number];
|
|
12
10
|
export type PaymentModeAtOrder = (typeof paymentModeAtOrderValues)[number];
|
|
13
11
|
export type PaymentStatus = (typeof paymentStatusValues)[number];
|
|
14
|
-
export type ProductCategory = (typeof productCategoryValues)[number];
|
|
15
12
|
export type RepeatStorage = (typeof repeatStorageValues)[number];
|
|
16
13
|
export type ScriptType = (typeof scriptTypeValues)[number];
|
|
17
14
|
export type ShippingType = (typeof shippingTypeValues)[number];
|
|
18
|
-
export type HazardTag = (typeof hazardTagsValues)[number];
|
|
19
15
|
export interface Address {
|
|
20
16
|
street: string;
|
|
21
17
|
suburb: string;
|
|
@@ -38,6 +34,7 @@ export interface HealthInfo {
|
|
|
38
34
|
export interface ScriptSelect {
|
|
39
35
|
id: number;
|
|
40
36
|
patientRecordId: number;
|
|
37
|
+
partnerPharmacyProfileId?: number;
|
|
41
38
|
uploaded: string;
|
|
42
39
|
processed: boolean;
|
|
43
40
|
token?: string | null;
|
|
@@ -53,12 +50,11 @@ export interface LineItem {
|
|
|
53
50
|
adverseSymptomsStatus?: string;
|
|
54
51
|
adverseSymptoms?: string;
|
|
55
52
|
scriptType: string;
|
|
53
|
+
scriptDetails?: {
|
|
54
|
+
token?: string;
|
|
55
|
+
fileKey?: string;
|
|
56
|
+
};
|
|
56
57
|
paperScriptReceived: boolean;
|
|
57
|
-
patientCharged?: string;
|
|
58
|
-
overage?: string;
|
|
59
|
-
tierFee?: string;
|
|
60
|
-
billToPharmacy?: string;
|
|
61
|
-
invoicePrice?: string;
|
|
62
58
|
otherScriptProperties: {
|
|
63
59
|
for: {
|
|
64
60
|
customerId: number;
|
|
@@ -143,6 +139,11 @@ export interface Order {
|
|
|
143
139
|
consellingNotes?: string;
|
|
144
140
|
counselledStatus?: string;
|
|
145
141
|
confirmationSentAt?: Date;
|
|
142
|
+
patientCharged?: number;
|
|
143
|
+
overage?: number;
|
|
144
|
+
tierFee?: number;
|
|
145
|
+
billToPharmacy?: number;
|
|
146
|
+
invoicePrice?: number;
|
|
146
147
|
hubspotContactId?: string;
|
|
147
148
|
created: string;
|
|
148
149
|
}
|
|
@@ -172,6 +173,11 @@ export interface OrderCreate {
|
|
|
172
173
|
consellingNotes?: string;
|
|
173
174
|
counselledStatus?: string;
|
|
174
175
|
confirmationSentAt?: Date;
|
|
176
|
+
patientCharged?: number;
|
|
177
|
+
overage?: number;
|
|
178
|
+
tierFee?: number;
|
|
179
|
+
billToPharmacy?: number;
|
|
180
|
+
invoicePrice?: number;
|
|
175
181
|
hubspotContactId?: string;
|
|
176
182
|
}
|
|
177
183
|
export interface PaperScriptReminder {
|
|
@@ -199,15 +205,15 @@ export interface PartnerPharmacyProfile {
|
|
|
199
205
|
id: number;
|
|
200
206
|
userId?: string;
|
|
201
207
|
abn?: string;
|
|
202
|
-
pharmacyName
|
|
203
|
-
contactName
|
|
204
|
-
invoiceEmail
|
|
205
|
-
discountTier
|
|
206
|
-
paymentMode
|
|
208
|
+
pharmacyName: string;
|
|
209
|
+
contactName: string;
|
|
210
|
+
invoiceEmail: string;
|
|
211
|
+
discountTier: number;
|
|
212
|
+
paymentMode: PaymentModeAtOrder;
|
|
207
213
|
remindersEnabled?: boolean;
|
|
208
|
-
priceMatches?:
|
|
214
|
+
priceMatches?: PriceMatch[];
|
|
209
215
|
addresses?: Address[];
|
|
210
|
-
orders?:
|
|
216
|
+
orders?: Order[];
|
|
211
217
|
xeroContactId?: string | null;
|
|
212
218
|
}
|
|
213
219
|
export interface PartnerPharmacyProfileCreate {
|
|
@@ -216,12 +222,12 @@ export interface PartnerPharmacyProfileCreate {
|
|
|
216
222
|
pharmacyName: string;
|
|
217
223
|
contactName: string;
|
|
218
224
|
invoiceEmail: string;
|
|
219
|
-
discountTier:
|
|
225
|
+
discountTier: number;
|
|
220
226
|
paymentMode: PaymentModeAtOrder;
|
|
221
227
|
remindersEnabled?: boolean;
|
|
222
|
-
priceMatches?:
|
|
228
|
+
priceMatches?: PriceMatch[];
|
|
223
229
|
addresses?: Address[];
|
|
224
|
-
orders?:
|
|
230
|
+
orders?: Order[];
|
|
225
231
|
xeroContactId?: string | null;
|
|
226
232
|
}
|
|
227
233
|
export interface PartnerPharmacyProfileReportData {
|
|
@@ -269,39 +275,14 @@ export interface PatientRecordCreate {
|
|
|
269
275
|
export interface PriceMatch {
|
|
270
276
|
id: number;
|
|
271
277
|
partnerPharmacyProfileId?: number;
|
|
272
|
-
|
|
273
|
-
overridePrice
|
|
278
|
+
itemId: number;
|
|
279
|
+
overridePrice: string;
|
|
274
280
|
}
|
|
275
281
|
export interface PriceMatchCreate {
|
|
276
282
|
partnerPharmacyProfileId: number;
|
|
277
|
-
|
|
283
|
+
itemId: number;
|
|
278
284
|
overridePrice: string;
|
|
279
285
|
}
|
|
280
|
-
export interface Product {
|
|
281
|
-
id: number;
|
|
282
|
-
name?: string;
|
|
283
|
-
imageKey?: string | null;
|
|
284
|
-
abbreviations?: string[] | null;
|
|
285
|
-
category?: ProductCategory;
|
|
286
|
-
rrp?: string;
|
|
287
|
-
hazardTags?: HazardTag[] | null;
|
|
288
|
-
compoundDirectId?: string | null;
|
|
289
|
-
requiresFridge?: boolean;
|
|
290
|
-
flavours?: string[] | null;
|
|
291
|
-
requiresS8Medicare?: boolean;
|
|
292
|
-
}
|
|
293
|
-
export interface ProductCreate {
|
|
294
|
-
name: string;
|
|
295
|
-
category: ProductCategory;
|
|
296
|
-
rrp: string;
|
|
297
|
-
imageKey?: string | null;
|
|
298
|
-
abbreviations?: string[] | null;
|
|
299
|
-
hazardTags?: HazardTag[] | null;
|
|
300
|
-
compoundDirectId?: string | null;
|
|
301
|
-
requiresFridge?: boolean;
|
|
302
|
-
flavours?: string[] | null;
|
|
303
|
-
requiresS8Medicare?: boolean;
|
|
304
|
-
}
|
|
305
286
|
export interface Quote {
|
|
306
287
|
id: number;
|
|
307
288
|
status: QuoteStatus;
|
|
@@ -351,6 +332,7 @@ export interface RepeatReminderCreate {
|
|
|
351
332
|
export interface Script {
|
|
352
333
|
id: number;
|
|
353
334
|
patientRecordId: number;
|
|
335
|
+
partnerPharmacyProfileId?: number;
|
|
354
336
|
uploaded: string;
|
|
355
337
|
processed: boolean;
|
|
356
338
|
token?: string | null;
|
|
@@ -358,12 +340,12 @@ export interface Script {
|
|
|
358
340
|
}
|
|
359
341
|
export interface EScriptCreate {
|
|
360
342
|
patientRecordId: number;
|
|
361
|
-
|
|
343
|
+
partnerPharmacyProfileId?: number;
|
|
362
344
|
token: string;
|
|
363
345
|
}
|
|
364
346
|
export interface PaperScriptCreate {
|
|
365
347
|
patientRecordId: number;
|
|
366
|
-
|
|
348
|
+
partnerPharmacyProfileId?: number;
|
|
367
349
|
fileKey: string;
|
|
368
350
|
}
|
|
369
351
|
export interface Cart {
|
|
@@ -374,7 +356,6 @@ export interface Cart {
|
|
|
374
356
|
updatedAt: Date;
|
|
375
357
|
}
|
|
376
358
|
export interface CartUpdate {
|
|
377
|
-
id: number;
|
|
378
359
|
directUserProfileId?: number;
|
|
379
360
|
partnerPharmacyProfileId?: number;
|
|
380
361
|
items: LineItem[];
|
|
@@ -645,19 +626,15 @@ export declare const ApiRoutes: {
|
|
|
645
626
|
};
|
|
646
627
|
scripts: {
|
|
647
628
|
list: string;
|
|
648
|
-
get: (id: number
|
|
629
|
+
get: (id: number, filters?: {
|
|
630
|
+
partnerPharmacyProfileId?: number;
|
|
631
|
+
patientRecordId?: number;
|
|
632
|
+
}) => string;
|
|
649
633
|
createEscript: string;
|
|
650
634
|
createPaperScript: string;
|
|
651
635
|
update: string;
|
|
652
636
|
delete: (id: number) => string;
|
|
653
637
|
};
|
|
654
|
-
products: {
|
|
655
|
-
list: string;
|
|
656
|
-
get: (id: number) => string;
|
|
657
|
-
create: string;
|
|
658
|
-
update: string;
|
|
659
|
-
delete: (id: number) => string;
|
|
660
|
-
};
|
|
661
638
|
quotes: {
|
|
662
639
|
list: string;
|
|
663
640
|
get: (id: number) => string;
|
|
@@ -728,7 +705,7 @@ export declare const ApiRoutes: {
|
|
|
728
705
|
deleteByPartnerPharmacy: (id: number) => string;
|
|
729
706
|
};
|
|
730
707
|
compoundDirect: {
|
|
731
|
-
searchCustomers:
|
|
708
|
+
searchCustomers: string;
|
|
732
709
|
createCustomer: string;
|
|
733
710
|
getDraftScripts: string;
|
|
734
711
|
getDraftScriptById: (id: number) => string;
|
package/build/validators.js
CHANGED
|
@@ -11,7 +11,6 @@ export const paymentStatusValues = [
|
|
|
11
11
|
'PAID',
|
|
12
12
|
'PENDING_INVOICE',
|
|
13
13
|
];
|
|
14
|
-
export const productCategoryValues = ['TODO1', 'TODO2', 'TODO3'];
|
|
15
14
|
export const repeatStorageValues = [
|
|
16
15
|
'HEATHERSHAWS',
|
|
17
16
|
'PHARMACY',
|
|
@@ -19,11 +18,6 @@ export const repeatStorageValues = [
|
|
|
19
18
|
];
|
|
20
19
|
export const scriptTypeValues = ['eRx', 'PAPER'];
|
|
21
20
|
export const shippingTypeValues = ['STANDARD', 'COLD_CHAIN'];
|
|
22
|
-
export const hazardTagsValues = [
|
|
23
|
-
'Hazardous',
|
|
24
|
-
'Cytotoxic',
|
|
25
|
-
'High-Risk',
|
|
26
|
-
];
|
|
27
21
|
// ─── Compound Direct ────────────────────────────────────────────────────────────
|
|
28
22
|
export const CompoundDirectAnimalId = {
|
|
29
23
|
dog: { id: 1, name: 'Dog' },
|
|
@@ -108,19 +102,20 @@ export const ApiRoutes = {
|
|
|
108
102
|
},
|
|
109
103
|
scripts: {
|
|
110
104
|
list: '/api/scripts',
|
|
111
|
-
get: (id) =>
|
|
105
|
+
get: (id, filters) => {
|
|
106
|
+
const params = new URLSearchParams();
|
|
107
|
+
if (filters?.partnerPharmacyProfileId)
|
|
108
|
+
params.set('partnerPharmacyProfileId', String(filters.partnerPharmacyProfileId));
|
|
109
|
+
if (filters?.patientRecordId)
|
|
110
|
+
params.set('patientRecordId', String(filters.patientRecordId));
|
|
111
|
+
const query = params.toString();
|
|
112
|
+
return `/api/scripts/${id}${query ? `?${query}` : ''}`;
|
|
113
|
+
},
|
|
112
114
|
createEscript: '/api/scripts/escripts',
|
|
113
115
|
createPaperScript: '/api/scripts/paper-scripts',
|
|
114
116
|
update: '/api/scripts',
|
|
115
117
|
delete: (id) => `/api/scripts/${id}`,
|
|
116
118
|
},
|
|
117
|
-
products: {
|
|
118
|
-
list: '/api/products',
|
|
119
|
-
get: (id) => `/api/products/${id}`,
|
|
120
|
-
create: '/api/products',
|
|
121
|
-
update: '/api/products',
|
|
122
|
-
delete: (id) => `/api/products/${id}`,
|
|
123
|
-
},
|
|
124
119
|
quotes: {
|
|
125
120
|
list: '/api/quotes',
|
|
126
121
|
get: (id) => `/api/quotes/${id}`,
|
|
@@ -191,7 +186,7 @@ export const ApiRoutes = {
|
|
|
191
186
|
deleteByPartnerPharmacy: (id) => `/api/carts/partner-pharmacies/${id}`,
|
|
192
187
|
},
|
|
193
188
|
compoundDirect: {
|
|
194
|
-
searchCustomers:
|
|
189
|
+
searchCustomers: '/api/compound-direct/customers',
|
|
195
190
|
createCustomer: '/api/compound-direct/customer',
|
|
196
191
|
getDraftScripts: '/api/compound-direct/draft-scripts',
|
|
197
192
|
getDraftScriptById: (id) => `/api/compound-direct/draft-scripts/${id}`,
|