@natch-the-storage/heathershaw-platform-types 1.9.3 → 1.9.4
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 +7 -5
- package/build/validators.js +3 -2
- package/package.json +1 -1
package/build/validators.d.ts
CHANGED
|
@@ -350,6 +350,10 @@ export interface PaperScriptCreate {
|
|
|
350
350
|
partnerPharmacyProfileId?: number;
|
|
351
351
|
fileKey: string;
|
|
352
352
|
}
|
|
353
|
+
export interface getScriptsQuery {
|
|
354
|
+
patientRecordId?: number;
|
|
355
|
+
partnerPharmacyProfileId?: number;
|
|
356
|
+
}
|
|
353
357
|
export interface Cart {
|
|
354
358
|
id: number;
|
|
355
359
|
directUserProfileId?: number;
|
|
@@ -546,7 +550,7 @@ export interface CDCustomerCreate {
|
|
|
546
550
|
animalOwnerName?: string;
|
|
547
551
|
}
|
|
548
552
|
export interface CDCustomerSearch {
|
|
549
|
-
|
|
553
|
+
query: string;
|
|
550
554
|
dobStartDate: string;
|
|
551
555
|
dobEndDate: string;
|
|
552
556
|
}
|
|
@@ -629,10 +633,8 @@ export declare const ApiRoutes: {
|
|
|
629
633
|
};
|
|
630
634
|
scripts: {
|
|
631
635
|
list: string;
|
|
632
|
-
get: (
|
|
633
|
-
|
|
634
|
-
patientRecordId?: number;
|
|
635
|
-
}) => string;
|
|
636
|
+
get: (filters?: getScriptsQuery) => string;
|
|
637
|
+
getById: (id: number) => string;
|
|
636
638
|
createEscript: string;
|
|
637
639
|
createPaperScript: string;
|
|
638
640
|
update: string;
|
package/build/validators.js
CHANGED
|
@@ -102,15 +102,16 @@ export const ApiRoutes = {
|
|
|
102
102
|
},
|
|
103
103
|
scripts: {
|
|
104
104
|
list: '/api/scripts',
|
|
105
|
-
get: (
|
|
105
|
+
get: (filters) => {
|
|
106
106
|
const params = new URLSearchParams();
|
|
107
107
|
if (filters?.partnerPharmacyProfileId)
|
|
108
108
|
params.set('partnerPharmacyProfileId', String(filters.partnerPharmacyProfileId));
|
|
109
109
|
if (filters?.patientRecordId)
|
|
110
110
|
params.set('patientRecordId', String(filters.patientRecordId));
|
|
111
111
|
const query = params.toString();
|
|
112
|
-
return `/api/scripts/${
|
|
112
|
+
return `/api/scripts/${query ? `?${query}` : ''}`;
|
|
113
113
|
},
|
|
114
|
+
getById: (id) => `/api/scripts/${id}`,
|
|
114
115
|
createEscript: '/api/scripts/escripts',
|
|
115
116
|
createPaperScript: '/api/scripts/paper-scripts',
|
|
116
117
|
update: '/api/scripts',
|