@natch-the-storage/heathershaw-platform-types 1.3.4 → 1.4.0

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.
@@ -91,7 +91,12 @@ export interface DirectUserProfile {
91
91
  remindersEnabled?: boolean;
92
92
  scriptSubmissions?: ScriptSelect[];
93
93
  }
94
- export type DirectUserProfileCreate = Omit<DirectUserProfile, "id">;
94
+ export interface DirectUserProfileCreate {
95
+ userId: string;
96
+ compoundDirectId?: string | null;
97
+ remindersEnabled?: boolean;
98
+ scriptSubmissions?: ScriptSelect[];
99
+ }
95
100
  export interface Order {
96
101
  id: number;
97
102
  partnerPharmacyProfileId?: number | null;
@@ -110,7 +115,23 @@ export interface Order {
110
115
  hubspotContactId?: string | null;
111
116
  createdByUserId?: string | null;
112
117
  }
113
- export type OrderCreate = Omit<Order, "id">;
118
+ export interface OrderCreate {
119
+ paymentModeAtOrder: PaymentModeAtOrder;
120
+ paymentStatus: PaymentStatus;
121
+ scriptType: ScriptType;
122
+ shippingType: ShippingType;
123
+ shippingFee: string;
124
+ partnerPharmacyProfileId?: number | null;
125
+ patientRecordId?: number | null;
126
+ completed?: boolean;
127
+ paperScriptReceived?: boolean;
128
+ lineItems?: unknown;
129
+ orderChangeNotes?: string | null;
130
+ counsellingRequired?: boolean;
131
+ confirmationSentAt?: Date | null;
132
+ hubspotContactId?: string | null;
133
+ createdByUserId?: string | null;
134
+ }
114
135
  export interface PaperScriptReminder {
115
136
  id: number;
116
137
  orderId?: number;
@@ -122,7 +143,16 @@ export interface PaperScriptReminder {
122
143
  received?: boolean;
123
144
  lastSentAt?: string | null;
124
145
  }
125
- export type PaperScriptReminderCreate = Omit<PaperScriptReminder, "id">;
146
+ export interface PaperScriptReminderCreate {
147
+ orderId: number;
148
+ partnerPharmacyProfileId: number;
149
+ status: PaperScriptReminderStatus;
150
+ remindersSent: number;
151
+ escalationEmail: string;
152
+ received: boolean;
153
+ reminderIntervalDays?: number;
154
+ lastSentAt?: string | null;
155
+ }
126
156
  export interface PartnerPharmacyProfile {
127
157
  id: number;
128
158
  userId?: string;
@@ -137,9 +167,18 @@ export interface PartnerPharmacyProfile {
137
167
  orders?: unknown;
138
168
  xeroContactId?: string | null;
139
169
  }
140
- export type PartnerPharmacyProfileCreate = Omit<PartnerPharmacyProfile, "id">;
141
- export interface GetPatientRecordsQuery extends GetAll {
142
- partner_pharmacy_profile_id?: number;
170
+ export interface PartnerPharmacyProfileCreate {
171
+ userId: string;
172
+ abn: string;
173
+ contactName: string;
174
+ invoiceEmail: string;
175
+ discountTier: string;
176
+ paymentMode: PaymentModeAtOrder;
177
+ remindersEnabled?: boolean;
178
+ priceMatches?: unknown;
179
+ dispatchAddress?: Address;
180
+ orders?: unknown;
181
+ xeroContactId?: string | null;
143
182
  }
144
183
  export interface PatientRecord {
145
184
  id: number;
@@ -156,22 +195,46 @@ export interface PatientRecord {
156
195
  reminderEnabled?: boolean;
157
196
  scripts?: ScriptSelect[];
158
197
  orderHistory?: OrderSelect[];
198
+ relationship?: string | null;
199
+ }
200
+ export interface PatientRecordCreate {
201
+ firstName: string;
202
+ lastName: string;
203
+ dateOfBirth: string;
204
+ phone: string;
205
+ partnerPharmacyProfileId?: number | null;
206
+ directUserProfileId?: number | null;
207
+ userId?: string | null;
208
+ medicareNumber?: string | null;
209
+ address?: Address;
210
+ healthInfo?: HealthInfo;
211
+ reminderEnabled?: boolean;
212
+ scripts?: ScriptSelect[];
213
+ orderHistory?: OrderSelect[];
214
+ relationship?: string | null;
159
215
  }
160
- export type PatientRecordCreate = Omit<PatientRecord, "id">;
161
216
  export interface Prescriber {
162
217
  id: number;
163
218
  name?: string;
164
219
  email?: string;
165
220
  phone?: string;
166
221
  }
167
- export type PrescriberCreate = Omit<Prescriber, "id">;
222
+ export interface PrescriberCreate {
223
+ name: string;
224
+ email: string;
225
+ phone: string;
226
+ }
168
227
  export interface PriceMatch {
169
228
  id: number;
170
229
  partnerPharmacyProfileId?: number;
171
230
  productId?: number;
172
231
  overridePrice?: string;
173
232
  }
174
- export type PriceMatchCreate = Omit<PriceMatch, "id">;
233
+ export interface PriceMatchCreate {
234
+ partnerPharmacyProfileId: number;
235
+ productId: number;
236
+ overridePrice: string;
237
+ }
175
238
  export interface Product {
176
239
  id: number;
177
240
  name?: string;
@@ -185,7 +248,18 @@ export interface Product {
185
248
  flavours?: string[] | null;
186
249
  requiresS8Medicare?: boolean;
187
250
  }
188
- export type ProductCreate = Omit<Product, "id">;
251
+ export interface ProductCreate {
252
+ name: string;
253
+ category: ProductCategory;
254
+ rrp: string;
255
+ imageKey?: string | null;
256
+ abbreviations?: string[] | null;
257
+ hazardTags?: HazardTag[] | null;
258
+ compoundDirectId?: string | null;
259
+ requiresFridge?: boolean;
260
+ flavours?: string[] | null;
261
+ requiresS8Medicare?: boolean;
262
+ }
189
263
  export interface Quote {
190
264
  id: number;
191
265
  status?: QuoteStatus;
@@ -196,7 +270,15 @@ export interface Quote {
196
270
  quantity?: number;
197
271
  patientContext?: string;
198
272
  }
199
- export type QuoteCreate = Omit<Quote, "id">;
273
+ export interface QuoteCreate {
274
+ partnerPharmacyProfileId: number;
275
+ name: string;
276
+ strength: string;
277
+ form: string;
278
+ quantity: number;
279
+ patientContext: string;
280
+ status?: QuoteStatus;
281
+ }
200
282
  export interface RepeatReminder {
201
283
  id: number;
202
284
  orderId?: number;
@@ -209,7 +291,17 @@ export interface RepeatReminder {
209
291
  patientSmsSent?: boolean;
210
292
  enabled?: boolean;
211
293
  }
212
- export type RepeatReminderCreate = Omit<RepeatReminder, "id">;
294
+ export interface RepeatReminderCreate {
295
+ orderId: number;
296
+ patientRecordId: number;
297
+ daysSupply: number;
298
+ dispatchedAt: Date;
299
+ reminderDueAt: Date;
300
+ reminderOffsetDays?: number;
301
+ pharmacyReminderSent?: boolean;
302
+ patientSmsSent?: boolean;
303
+ enabled?: boolean;
304
+ }
213
305
  export interface Script {
214
306
  id: number;
215
307
  prescriberId?: number;
@@ -223,7 +315,18 @@ export interface Script {
223
315
  compoundDirectId?: string | null;
224
316
  imageKey?: string | null;
225
317
  }
226
- export type ScriptCreate = Omit<Script, "id">;
318
+ export interface ScriptCreate {
319
+ prescriberId: number;
320
+ patientRecordId: number;
321
+ productId: number;
322
+ dateIssued: string;
323
+ daysSupply: number;
324
+ repeatStorage: RepeatStorage;
325
+ processed?: boolean;
326
+ repeatsRemaining?: number;
327
+ compoundDirectId?: string | null;
328
+ imageKey?: string | null;
329
+ }
227
330
  export declare const apiRoutes: {
228
331
  orders: {
229
332
  list: string;
@@ -233,7 +336,7 @@ export declare const apiRoutes: {
233
336
  delete: (id: number) => string;
234
337
  };
235
338
  patientRecords: {
236
- list: (type?: "partner" | "direct") => string;
339
+ list: string;
237
340
  get: (id?: number, type?: "partner" | "direct") => string;
238
341
  getByUser: (userId: string) => string;
239
342
  create: string;
@@ -33,8 +33,8 @@ export const apiRoutes = {
33
33
  delete: (id) => `/api/orders/${id}`,
34
34
  },
35
35
  patientRecords: {
36
- list: (type) => type ? `/api/patient-records/${type}` : "/api/patient-records",
37
- get: (id, type) => `/api/patient-records${type ? "?" + type + "=" + id : ""}`,
36
+ list: "/api/patient-records",
37
+ get: (id, type) => "/api/patient-records" + `${type ? "?" + type + "=" + id : ""}`,
38
38
  getByUser: (userId) => `/api/patient-records/user/${userId}`,
39
39
  create: "/api/patient-records",
40
40
  update: "/api/patient-records",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@natch-the-storage/heathershaw-platform-types",
3
- "version": "1.3.4",
3
+ "version": "1.4.0",
4
4
  "description": "Interfaces and routes to use on the client",
5
5
  "license": "ISC",
6
6
  "author": "Natch Surana",