@natch-the-storage/heathershaw-platform-types 1.6.0 → 1.6.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 +23 -15
- package/build/validators.js +56 -56
- package/package.json +1 -1
package/build/validators.d.ts
CHANGED
|
@@ -303,9 +303,7 @@ export interface EScriptCreate {
|
|
|
303
303
|
export interface PaperScriptCreate {
|
|
304
304
|
patientRecordId: number;
|
|
305
305
|
uploaded: string;
|
|
306
|
-
|
|
307
|
-
contentType: string;
|
|
308
|
-
folder: string;
|
|
306
|
+
fileKey: string;
|
|
309
307
|
}
|
|
310
308
|
export declare const CompoundDirectAnimalId: {
|
|
311
309
|
readonly dog: {
|
|
@@ -406,24 +404,34 @@ export declare const CompoundDirectAnimalId: {
|
|
|
406
404
|
};
|
|
407
405
|
};
|
|
408
406
|
export declare const AnimalSpeciesKeys: [keyof typeof CompoundDirectAnimalId, ...(keyof typeof CompoundDirectAnimalId)[]];
|
|
407
|
+
export interface CDScriptProperties {
|
|
408
|
+
propertyId: number;
|
|
409
|
+
code: string;
|
|
410
|
+
type: string;
|
|
411
|
+
}
|
|
409
412
|
export interface CDScript {
|
|
410
413
|
draftScriptId: number;
|
|
411
|
-
stockId: number | null;
|
|
412
414
|
name: string;
|
|
413
|
-
comment: string;
|
|
414
|
-
isReorderable: boolean;
|
|
415
|
-
hasCurrentOrder: boolean;
|
|
416
|
-
isOrderConfirmed: boolean;
|
|
417
|
-
personId: number;
|
|
418
|
-
customerId: number;
|
|
419
415
|
price: number;
|
|
420
|
-
repeatsTotal: number;
|
|
421
|
-
repeatsLeft: number;
|
|
422
|
-
supplyNumber: number;
|
|
423
|
-
owing: boolean;
|
|
424
|
-
deferred: boolean;
|
|
425
416
|
quantity: number;
|
|
417
|
+
originalScript: {
|
|
418
|
+
draftScriptId: number;
|
|
419
|
+
};
|
|
420
|
+
dosageForm: {
|
|
421
|
+
unit?: string;
|
|
422
|
+
};
|
|
423
|
+
scriptInfo: {
|
|
424
|
+
patient: {
|
|
425
|
+
customerId: number;
|
|
426
|
+
};
|
|
427
|
+
instructions: string;
|
|
428
|
+
expiryDate: string;
|
|
429
|
+
repeatsTotal: number;
|
|
430
|
+
repeatsLeft: number;
|
|
431
|
+
supplyNumber: number;
|
|
432
|
+
};
|
|
426
433
|
itemCount: number;
|
|
434
|
+
properties?: CDScriptProperties;
|
|
427
435
|
}
|
|
428
436
|
export interface CDCustomerCreate {
|
|
429
437
|
firstName: string;
|
package/build/validators.js
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
// ─── Enum value arrays ──────────────────────────────────────────────────────────
|
|
2
2
|
export const paperScriptReminderStatusValues = [
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
'PENDING',
|
|
4
|
+
'RECEIVED',
|
|
5
|
+
'ESCALATED',
|
|
6
6
|
];
|
|
7
|
-
export const quoteStatusValues = [
|
|
8
|
-
export const paymentModeAtOrderValues = [
|
|
7
|
+
export const quoteStatusValues = ['PENDING', 'PROCESSING', 'RESOLVED'];
|
|
8
|
+
export const paymentModeAtOrderValues = ['INVOICE', 'POS'];
|
|
9
9
|
export const paymentStatusValues = [
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
'AWAITING_PAYMENT',
|
|
11
|
+
'PAID',
|
|
12
|
+
'PENDING_INVOICE',
|
|
13
13
|
];
|
|
14
|
-
export const productCategoryValues = [
|
|
14
|
+
export const productCategoryValues = ['TODO1', 'TODO2', 'TODO3'];
|
|
15
15
|
export const repeatStorageValues = [
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
'HEATHERSHAWS',
|
|
17
|
+
'PHARMACY',
|
|
18
|
+
'PATIENT',
|
|
19
19
|
];
|
|
20
|
-
export const scriptTypeValues = [
|
|
21
|
-
export const shippingTypeValues = [
|
|
20
|
+
export const scriptTypeValues = ['eRx', 'PAPER'];
|
|
21
|
+
export const shippingTypeValues = ['STANDARD', 'COLD_CHAIN'];
|
|
22
22
|
export const hazardTagsValues = [
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
'Hazardous',
|
|
24
|
+
'Cytotoxic',
|
|
25
|
+
'High-Risk',
|
|
26
26
|
];
|
|
27
27
|
// ─── Compound Direct ────────────────────────────────────────────────────────────
|
|
28
28
|
export const CompoundDirectAnimalId = {
|
|
@@ -54,96 +54,96 @@ export const CompoundDirectAnimalId = {
|
|
|
54
54
|
export const AnimalSpeciesKeys = Object.keys(CompoundDirectAnimalId);
|
|
55
55
|
export const ApiRoutes = {
|
|
56
56
|
orders: {
|
|
57
|
-
list:
|
|
57
|
+
list: '/api/orders',
|
|
58
58
|
get: (id) => `/api/orders/${id}`,
|
|
59
|
-
create:
|
|
60
|
-
update:
|
|
59
|
+
create: '/api/orders',
|
|
60
|
+
update: '/api/orders',
|
|
61
61
|
delete: (id) => `/api/orders/${id}`,
|
|
62
62
|
},
|
|
63
63
|
patientRecords: {
|
|
64
|
-
list:
|
|
65
|
-
get: (id, type) =>
|
|
64
|
+
list: '/api/patient-records',
|
|
65
|
+
get: (id, type) => '/api/patient-records' + `${type ? '?' + type + '=' + id : ''}`,
|
|
66
66
|
getByUser: (userId) => `/api/patient-records/user/${userId}`,
|
|
67
|
-
create:
|
|
68
|
-
update:
|
|
67
|
+
create: '/api/patient-records',
|
|
68
|
+
update: '/api/patient-records',
|
|
69
69
|
delete: (id) => `/api/patient-records/${id}`,
|
|
70
70
|
},
|
|
71
71
|
scripts: {
|
|
72
|
-
list:
|
|
72
|
+
list: '/api/scripts',
|
|
73
73
|
get: (id) => `/api/scripts/${id}`,
|
|
74
|
-
createEscript:
|
|
75
|
-
createPaperScript:
|
|
76
|
-
update:
|
|
74
|
+
createEscript: '/api/scripts/escripts',
|
|
75
|
+
createPaperScript: '/api/scripts/paper-scripts',
|
|
76
|
+
update: '/api/scripts',
|
|
77
77
|
delete: (id) => `/api/scripts/${id}`,
|
|
78
78
|
},
|
|
79
79
|
products: {
|
|
80
|
-
list:
|
|
80
|
+
list: '/api/products',
|
|
81
81
|
get: (id) => `/api/products/${id}`,
|
|
82
|
-
create:
|
|
83
|
-
update:
|
|
82
|
+
create: '/api/products',
|
|
83
|
+
update: '/api/products',
|
|
84
84
|
delete: (id) => `/api/products/${id}`,
|
|
85
85
|
},
|
|
86
86
|
quotes: {
|
|
87
|
-
list:
|
|
87
|
+
list: '/api/quotes',
|
|
88
88
|
get: (id) => `/api/quotes/${id}`,
|
|
89
|
-
create:
|
|
90
|
-
update:
|
|
89
|
+
create: '/api/quotes',
|
|
90
|
+
update: '/api/quotes',
|
|
91
91
|
delete: (id) => `/api/quotes/${id}`,
|
|
92
92
|
},
|
|
93
93
|
paperScriptReminders: {
|
|
94
|
-
list:
|
|
94
|
+
list: '/api/paper-script-reminders',
|
|
95
95
|
get: (id) => `/api/paper-script-reminders/${id}`,
|
|
96
|
-
create:
|
|
97
|
-
update:
|
|
96
|
+
create: '/api/paper-script-reminders',
|
|
97
|
+
update: '/api/paper-script-reminders',
|
|
98
98
|
delete: (id) => `/api/paper-script-reminders/${id}`,
|
|
99
99
|
},
|
|
100
100
|
repeatReminders: {
|
|
101
|
-
list:
|
|
101
|
+
list: '/api/reminders/repeats',
|
|
102
102
|
get: (id) => `/api/reminders/repeats/${id}`,
|
|
103
103
|
history: (id) => `/api/reminders/repeats/${id}/history`,
|
|
104
|
-
create:
|
|
105
|
-
update:
|
|
104
|
+
create: '/api/reminders/repeats',
|
|
105
|
+
update: '/api/reminders/repeats',
|
|
106
106
|
delete: (id) => `/api/reminders/repeats/${id}`,
|
|
107
107
|
},
|
|
108
108
|
priceMatches: {
|
|
109
|
-
list:
|
|
109
|
+
list: '/api/price-matches',
|
|
110
110
|
get: (id) => `/api/price-matches/${id}`,
|
|
111
|
-
create:
|
|
112
|
-
update:
|
|
111
|
+
create: '/api/price-matches',
|
|
112
|
+
update: '/api/price-matches',
|
|
113
113
|
delete: (id) => `/api/price-matches/${id}`,
|
|
114
114
|
},
|
|
115
115
|
directUserProfiles: {
|
|
116
|
-
list:
|
|
116
|
+
list: '/api/profiles/direct-users',
|
|
117
117
|
get: (id) => `/api/profiles/direct-users/${id}`,
|
|
118
118
|
getByUser: (userId) => `/api/profiles/direct-users/user/${userId}`,
|
|
119
|
-
create:
|
|
119
|
+
create: '/api/profiles/direct-users',
|
|
120
120
|
onboard: (userId) => `/api/profiles/direct-users/${userId}`,
|
|
121
|
-
update:
|
|
121
|
+
update: '/api/profiles/direct-users',
|
|
122
122
|
delete: (id) => `/api/profiles/direct-users/${id}`,
|
|
123
123
|
},
|
|
124
124
|
partnerPharmacyProfiles: {
|
|
125
|
-
list:
|
|
125
|
+
list: '/api/profiles/partner-pharmacies',
|
|
126
126
|
get: (id) => `/api/profiles/partner-pharmacies/${id}`,
|
|
127
127
|
getByUser: (userId) => `/api/profiles/partner-pharmacies/user/${userId}`,
|
|
128
|
-
create:
|
|
129
|
-
update:
|
|
128
|
+
create: '/api/profiles/partner-pharmacies',
|
|
129
|
+
update: '/api/profiles/partner-pharmacies',
|
|
130
130
|
delete: (id) => `/api/profiles/partner-pharmacies/${id}`,
|
|
131
131
|
},
|
|
132
132
|
users: {
|
|
133
133
|
data: (userId) => `/api/users/data/${userId}`,
|
|
134
134
|
},
|
|
135
135
|
uploads: {
|
|
136
|
-
presign:
|
|
137
|
-
delete:
|
|
136
|
+
presign: '/api/uploads/presign',
|
|
137
|
+
delete: '/api/uploads',
|
|
138
138
|
},
|
|
139
139
|
sms: {
|
|
140
|
-
twilioStatus:
|
|
141
|
-
send:
|
|
140
|
+
twilioStatus: '/api/webhooks/twilio/status',
|
|
141
|
+
send: '/api/reminders/sms',
|
|
142
142
|
},
|
|
143
143
|
email: {},
|
|
144
144
|
compoundDirect: {
|
|
145
145
|
searchCustomers: ({ name, dateOfBirth, email, phone }) => `/api/compound-direct/customers?name=${name}&dateOfBirth=${dateOfBirth}&email=${email}&phone=${phone}`,
|
|
146
|
-
createCustomer:
|
|
147
|
-
getDraftScripts:
|
|
148
|
-
}
|
|
146
|
+
createCustomer: '/api/compound-direct/customer',
|
|
147
|
+
getDraftScripts: '/api/compound-direct/draft-scripts/customers',
|
|
148
|
+
},
|
|
149
149
|
};
|