@blackcode_sa/metaestetics-api 1.7.47 → 1.8.1
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/dist/admin/index.d.mts +1815 -1667
- package/dist/admin/index.d.ts +1815 -1667
- package/dist/admin/index.js +6993 -6535
- package/dist/admin/index.mjs +6991 -6532
- package/dist/backoffice/index.d.mts +1418 -1418
- package/dist/backoffice/index.d.ts +1418 -1418
- package/dist/backoffice/index.js +1464 -1454
- package/dist/backoffice/index.mjs +1509 -1499
- package/dist/index.d.mts +16217 -14582
- package/dist/index.d.ts +16217 -14582
- package/dist/index.js +11419 -13806
- package/dist/index.mjs +12081 -14593
- package/package.json +5 -5
- package/src/admin/aggregation/appointment/index.ts +1 -0
- package/src/admin/aggregation/clinic/index.ts +1 -0
- package/src/admin/aggregation/forms/index.ts +1 -0
- package/src/admin/aggregation/index.ts +8 -0
- package/src/admin/aggregation/patient/index.ts +1 -0
- package/src/admin/aggregation/practitioner/index.ts +1 -0
- package/src/admin/aggregation/practitioner-invite/index.ts +1 -0
- package/src/admin/aggregation/procedure/index.ts +1 -0
- package/src/admin/aggregation/reviews/index.ts +1 -0
- package/src/admin/booking/index.ts +1 -1
- package/src/admin/calendar/index.ts +1 -0
- package/src/admin/documentation-templates/index.ts +1 -0
- package/src/admin/free-consultation/index.ts +1 -0
- package/src/admin/index.ts +23 -118
- package/src/admin/mailing/appointment/index.ts +1 -0
- package/src/admin/mailing/index.ts +1 -2
- package/src/admin/mailing/practitionerInvite/index.ts +1 -0
- package/src/admin/notifications/index.ts +1 -0
- package/src/admin/requirements/index.ts +1 -0
- package/src/admin/users/index.ts +1 -0
- package/src/admin/users/user-profile.admin.ts +1 -0
- package/src/backoffice/constants/index.ts +1 -0
- package/src/backoffice/errors/index.ts +1 -0
- package/src/backoffice/index.ts +5 -14
- package/src/backoffice/services/index.ts +7 -0
- package/src/backoffice/validations/index.ts +1 -0
- package/src/index.backup.ts +407 -0
- package/src/index.ts +5 -406
- package/src/services/PATIENTAUTH.MD +197 -0
- package/src/services/__tests__/auth/auth.setup.ts +2 -2
- package/src/services/__tests__/auth.service.test.ts +1 -1
- package/src/services/__tests__/user.service.test.ts +1 -1
- package/src/services/appointment/index.ts +1 -2
- package/src/services/{auth.service.ts → auth/auth.service.ts} +36 -22
- package/src/services/{auth.v2.service.ts → auth/auth.v2.service.ts} +17 -17
- package/src/services/auth/index.ts +2 -16
- package/src/services/calendar/calendar-refactored.service.ts +1 -1
- package/src/services/calendar/index.ts +5 -0
- package/src/services/clinic/index.ts +4 -0
- package/src/services/index.ts +12 -0
- package/src/services/media/index.ts +1 -0
- package/src/services/notifications/index.ts +1 -0
- package/src/services/patient/README.md +48 -0
- package/src/services/patient/To-Do.md +43 -0
- package/src/services/patient/index.ts +2 -0
- package/src/services/patient/patient.service.ts +289 -34
- package/src/services/patient/utils/index.ts +9 -0
- package/src/services/patient/utils/medical.utils.ts +114 -157
- package/src/services/patient/utils/profile.utils.ts +9 -0
- package/src/services/patient/utils/sensitive.utils.ts +79 -14
- package/src/services/patient/utils/token.utils.ts +211 -0
- package/src/services/practitioner/index.ts +1 -0
- package/src/services/procedure/index.ts +1 -0
- package/src/services/reviews/index.ts +1 -0
- package/src/services/user/index.ts +1 -0
- package/src/services/{user.service.ts → user/user.service.ts} +61 -12
- package/src/services/{user.v2.service.ts → user/user.v2.service.ts} +12 -12
- package/src/types/index.ts +42 -42
- package/src/types/patient/index.ts +33 -6
- package/src/types/patient/token.types.ts +61 -0
- package/src/types/user/index.ts +38 -0
- package/src/utils/index.ts +1 -0
- package/src/validations/calendar.schema.ts +6 -45
- package/src/validations/documentation-templates/index.ts +1 -0
- package/src/validations/documentation-templates.schema.ts +1 -1
- package/src/validations/index.ts +20 -0
- package/src/validations/patient/token.schema.ts +29 -0
- package/src/validations/patient.schema.ts +23 -6
- package/src/validations/profile-info.schema.ts +1 -1
- package/src/validations/schemas.ts +24 -24
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
1
|
import { Auth } from 'firebase/auth';
|
|
3
|
-
import { Firestore,
|
|
2
|
+
import { Firestore, QueryDocumentSnapshot, Timestamp } from 'firebase/firestore';
|
|
4
3
|
import { FirebaseApp } from 'firebase/app';
|
|
5
4
|
import { FirebaseStorage } from 'firebase/storage';
|
|
5
|
+
import { z } from 'zod';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Brend proizvoda ili opreme
|
|
@@ -28,6 +28,56 @@ interface Brand {
|
|
|
28
28
|
description?: string;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
+
declare class BaseService {
|
|
32
|
+
protected db: Firestore;
|
|
33
|
+
protected auth: Auth;
|
|
34
|
+
protected app: FirebaseApp;
|
|
35
|
+
protected storage: FirebaseStorage;
|
|
36
|
+
constructor(db: Firestore, auth: Auth, app: FirebaseApp);
|
|
37
|
+
/**
|
|
38
|
+
* Generiše jedinstveni ID za dokumente
|
|
39
|
+
* Format: xxxxxxxxxxxx-timestamp
|
|
40
|
+
* Gde je x random karakter (broj ili slovo)
|
|
41
|
+
*/
|
|
42
|
+
protected generateId(): string;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
declare class BrandService extends BaseService {
|
|
46
|
+
/**
|
|
47
|
+
* Gets reference to brands collection
|
|
48
|
+
*/
|
|
49
|
+
private getBrandsRef;
|
|
50
|
+
/**
|
|
51
|
+
* Creates a new brand
|
|
52
|
+
*/
|
|
53
|
+
create(brand: Omit<Brand, "id" | "createdAt" | "updatedAt">): Promise<{
|
|
54
|
+
createdAt: Date;
|
|
55
|
+
updatedAt: Date;
|
|
56
|
+
name: string;
|
|
57
|
+
manufacturer: string;
|
|
58
|
+
isActive: boolean;
|
|
59
|
+
website?: string | undefined;
|
|
60
|
+
description?: string | undefined;
|
|
61
|
+
id: string;
|
|
62
|
+
}>;
|
|
63
|
+
/**
|
|
64
|
+
* Gets all active brands
|
|
65
|
+
*/
|
|
66
|
+
getAll(): Promise<Brand[]>;
|
|
67
|
+
/**
|
|
68
|
+
* Updates a brand
|
|
69
|
+
*/
|
|
70
|
+
update(brandId: string, brand: Partial<Omit<Brand, "id" | "createdAt">>): Promise<Brand | null>;
|
|
71
|
+
/**
|
|
72
|
+
* Soft deletes a brand
|
|
73
|
+
*/
|
|
74
|
+
delete(brandId: string): Promise<void>;
|
|
75
|
+
/**
|
|
76
|
+
* Gets a brand by ID
|
|
77
|
+
*/
|
|
78
|
+
getById(brandId: string): Promise<Brand | null>;
|
|
79
|
+
}
|
|
80
|
+
|
|
31
81
|
/**
|
|
32
82
|
* Familije procedura u sistemu
|
|
33
83
|
* Predstavlja najviši nivo hijerarhije i deli procedure na estetske i hirurške
|
|
@@ -74,393 +124,127 @@ interface Category {
|
|
|
74
124
|
}
|
|
75
125
|
|
|
76
126
|
/**
|
|
77
|
-
*
|
|
78
|
-
*
|
|
127
|
+
* Servis za upravljanje kategorijama procedura.
|
|
128
|
+
* Kategorije su prvi nivo organizacije nakon procedure family (aesthetics/surgery).
|
|
79
129
|
*
|
|
80
|
-
* @
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
* @property composition - Product composition
|
|
89
|
-
* @property indications - List of indications for use
|
|
90
|
-
* @property contraindications - List of contraindications
|
|
91
|
-
* @property isActive - Whether the product is active in the system
|
|
92
|
-
* @property createdAt - Creation date
|
|
93
|
-
* @property updatedAt - Last update date
|
|
94
|
-
*/
|
|
95
|
-
interface Product {
|
|
96
|
-
id?: string;
|
|
97
|
-
name: string;
|
|
98
|
-
brandId: string;
|
|
99
|
-
brandName: string;
|
|
100
|
-
technologyId: string;
|
|
101
|
-
technologyName: string;
|
|
102
|
-
createdAt: Date;
|
|
103
|
-
updatedAt: Date;
|
|
104
|
-
isActive: boolean;
|
|
105
|
-
description?: string;
|
|
106
|
-
technicalDetails?: string;
|
|
107
|
-
warnings?: string[];
|
|
108
|
-
dosage?: string;
|
|
109
|
-
composition?: string;
|
|
110
|
-
indications?: string[];
|
|
111
|
-
contraindications?: string[];
|
|
112
|
-
}
|
|
113
|
-
/**
|
|
114
|
-
* Interface for the ProductService class
|
|
130
|
+
* @example
|
|
131
|
+
* const categoryService = new CategoryService();
|
|
132
|
+
*
|
|
133
|
+
* // Kreiranje nove kategorije
|
|
134
|
+
* const category = await categoryService.create({
|
|
135
|
+
* name: "Injectables",
|
|
136
|
+
* family: ProcedureFamily.AESTHETICS
|
|
137
|
+
* });
|
|
115
138
|
*/
|
|
116
|
-
|
|
139
|
+
declare class CategoryService extends BaseService {
|
|
117
140
|
/**
|
|
118
|
-
*
|
|
119
|
-
* @param technologyId - ID of the technology this product is used with
|
|
120
|
-
* @param brandId - ID of the brand that manufactures this product
|
|
121
|
-
* @param product - Product data
|
|
141
|
+
* Referenca na Firestore kolekciju kategorija
|
|
122
142
|
*/
|
|
123
|
-
|
|
143
|
+
private get categoriesRef();
|
|
124
144
|
/**
|
|
125
|
-
*
|
|
126
|
-
* @param
|
|
145
|
+
* Kreira novu kategoriju u sistemu
|
|
146
|
+
* @param category - Podaci za novu kategoriju
|
|
147
|
+
* @returns Kreirana kategorija sa generisanim ID-em
|
|
127
148
|
*/
|
|
128
|
-
|
|
149
|
+
create(category: Omit<Category, "id" | "createdAt" | "updatedAt">): Promise<{
|
|
150
|
+
createdAt: Date;
|
|
151
|
+
updatedAt: Date;
|
|
152
|
+
name: string;
|
|
153
|
+
isActive: boolean;
|
|
154
|
+
description: string;
|
|
155
|
+
family: ProcedureFamily;
|
|
156
|
+
id: string;
|
|
157
|
+
}>;
|
|
129
158
|
/**
|
|
130
|
-
*
|
|
131
|
-
* @
|
|
159
|
+
* Vraća sve aktivne kategorije
|
|
160
|
+
* @returns Lista aktivnih kategorija
|
|
132
161
|
*/
|
|
133
|
-
|
|
162
|
+
getAll(): Promise<Category[]>;
|
|
134
163
|
/**
|
|
135
|
-
*
|
|
136
|
-
* @param
|
|
137
|
-
* @
|
|
138
|
-
* @param product - Updated product data
|
|
164
|
+
* Vraća sve aktivne kategorije za određenu familiju procedura
|
|
165
|
+
* @param family - Familija procedura (aesthetics/surgery)
|
|
166
|
+
* @returns Lista kategorija koje pripadaju traženoj familiji
|
|
139
167
|
*/
|
|
140
|
-
|
|
168
|
+
getAllByFamily(family: ProcedureFamily): Promise<Category[]>;
|
|
141
169
|
/**
|
|
142
|
-
*
|
|
143
|
-
* @param
|
|
144
|
-
* @param
|
|
170
|
+
* Ažurira postojeću kategoriju
|
|
171
|
+
* @param id - ID kategorije koja se ažurira
|
|
172
|
+
* @param category - Novi podaci za kategoriju
|
|
173
|
+
* @returns Ažurirana kategorija
|
|
145
174
|
*/
|
|
146
|
-
|
|
175
|
+
update(id: string, category: Partial<Omit<Category, "id" | "createdAt">>): Promise<Category | null>;
|
|
147
176
|
/**
|
|
148
|
-
*
|
|
149
|
-
* @param
|
|
150
|
-
* @param productId - ID of the product
|
|
177
|
+
* Soft delete kategorije (postavlja isActive na false)
|
|
178
|
+
* @param id - ID kategorije koja se briše
|
|
151
179
|
*/
|
|
152
|
-
|
|
180
|
+
delete(id: string): Promise<void>;
|
|
181
|
+
/**
|
|
182
|
+
* Vraća kategoriju po ID-u
|
|
183
|
+
* @param id - ID tražene kategorije
|
|
184
|
+
* @returns Kategorija ili null ako ne postoji
|
|
185
|
+
*/
|
|
186
|
+
getById(id: string): Promise<Category | null>;
|
|
153
187
|
}
|
|
154
188
|
|
|
155
189
|
/**
|
|
156
|
-
*
|
|
190
|
+
* Enum for element types in documentation templates
|
|
157
191
|
*/
|
|
158
|
-
declare enum
|
|
159
|
-
|
|
160
|
-
|
|
192
|
+
declare enum DocumentElementType {
|
|
193
|
+
HEADING = "heading",
|
|
194
|
+
PARAGRAPH = "paragraph",
|
|
195
|
+
LIST = "list",
|
|
196
|
+
DYNAMIC_TEXT = "dynamic_text",
|
|
197
|
+
BINARY_CHOICE = "binary_choice",
|
|
198
|
+
MULTIPLE_CHOICE = "multiple_choice",
|
|
199
|
+
SINGLE_CHOICE = "single_choice",
|
|
200
|
+
RATING_SCALE = "rating_scale",
|
|
201
|
+
TEXT_INPUT = "text_input",
|
|
202
|
+
DATE_PICKER = "date_picker",
|
|
203
|
+
SIGNATURE = "signature",
|
|
204
|
+
DITIGAL_SIGNATURE = "digital_signature",
|
|
205
|
+
FILE_UPLOAD = "file_upload"
|
|
161
206
|
}
|
|
162
207
|
/**
|
|
163
|
-
*
|
|
208
|
+
* Enum for list types
|
|
164
209
|
*/
|
|
165
|
-
declare enum
|
|
166
|
-
|
|
167
|
-
|
|
210
|
+
declare enum ListType {
|
|
211
|
+
ORDERED = "ordered",
|
|
212
|
+
UNORDERED = "unordered"
|
|
168
213
|
}
|
|
169
214
|
/**
|
|
170
|
-
*
|
|
215
|
+
* Enum for heading levels
|
|
171
216
|
*/
|
|
172
|
-
|
|
217
|
+
declare enum HeadingLevel {
|
|
218
|
+
H1 = "h1",
|
|
219
|
+
H2 = "h2",
|
|
220
|
+
H3 = "h3",
|
|
221
|
+
H4 = "h4",
|
|
222
|
+
H5 = "h5",
|
|
223
|
+
H6 = "h6"
|
|
224
|
+
}
|
|
173
225
|
/**
|
|
174
|
-
*
|
|
175
|
-
* @property duration - Trajanje u odabranoj jedinici vremena
|
|
176
|
-
* @property unit - Jedinica vremena (sati ili dani)
|
|
177
|
-
* @property notifyAt - Lista trenutaka kada treba poslati obaveštenje (u istoj jedinici)
|
|
226
|
+
* Enum for dynamic variable placeholders
|
|
178
227
|
*/
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
228
|
+
declare enum DynamicVariable {
|
|
229
|
+
PATIENT_NAME = "$[PATIENT_NAME]",
|
|
230
|
+
DOCTOR_NAME = "$[DOCTOR_NAME]",
|
|
231
|
+
CLINIC_NAME = "$[CLINIC_NAME]",
|
|
232
|
+
PATIENT_BIRTHDAY = "$[PATIENT_BIRTHDAY]",
|
|
233
|
+
APPOINTMENT_DATE = "$[APPOINTMENT_DATE]",
|
|
234
|
+
CURRENT_DATE = "$[CURRENT_DATE]",
|
|
235
|
+
PROCEDURE_NAME = "$[PROCEDURE_NAME]",
|
|
236
|
+
PROCEDURE_DESCRIPTION = "$[PROCEDURE_DESCRIPTION]",
|
|
237
|
+
PROCEDURE_COST = "$[PROCEDURE_COST]",
|
|
238
|
+
PROCEDURE_DURATION = "$[PROCEDURE_DURATION]",
|
|
239
|
+
PROCEDURE_RISK = "$[PROCEDURE_RISK]"
|
|
183
240
|
}
|
|
184
241
|
/**
|
|
185
|
-
*
|
|
186
|
-
* Može biti zahtev pre procedure (pre) ili posle procedure (post)
|
|
187
|
-
*
|
|
188
|
-
* @property id - Jedinstveni identifikator zahteva
|
|
189
|
-
* @property type - Tip zahteva (pre/post)
|
|
190
|
-
* @property name - Naziv zahteva
|
|
191
|
-
* @property description - Detaljan opis zahteva
|
|
192
|
-
* @property timeframe - Vremenski okvir za zahtev
|
|
193
|
-
* @property importance - Nivo važnosti zahteva
|
|
194
|
-
* @property isActive - Da li je zahtev aktivan u sistemu
|
|
195
|
-
* @property createdAt - Datum kreiranja
|
|
196
|
-
* @property updatedAt - Datum poslednjeg ažuriranja
|
|
242
|
+
* Base interface for all document elements
|
|
197
243
|
*/
|
|
198
|
-
interface
|
|
244
|
+
interface BaseDocumentElement {
|
|
199
245
|
id: string;
|
|
200
|
-
type:
|
|
201
|
-
|
|
202
|
-
description: string;
|
|
203
|
-
timeframe: TimeFrame;
|
|
204
|
-
importance: RequirementImportance;
|
|
205
|
-
isActive: boolean;
|
|
206
|
-
createdAt: Date;
|
|
207
|
-
updatedAt: Date;
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
/**
|
|
211
|
-
* Podkategorija procedura
|
|
212
|
-
* Podkategorije su drugi nivo hijerarhije i pripadaju određenoj kategoriji
|
|
213
|
-
* One grupišu slične tehnologije u okviru kategorije
|
|
214
|
-
*
|
|
215
|
-
* @property id - Jedinstveni identifikator podkategorije
|
|
216
|
-
* @property name - Naziv podkategorije
|
|
217
|
-
* @property description - Detaljan opis podkategorije i njene namene
|
|
218
|
-
* @property categoryId - ID kategorije kojoj podkategorija pripada
|
|
219
|
-
* @property isActive - Da li je podkategorija aktivna u sistemu
|
|
220
|
-
* @property createdAt - Datum kreiranja
|
|
221
|
-
* @property updatedAt - Datum poslednjeg ažuriranja
|
|
222
|
-
*/
|
|
223
|
-
interface Subcategory {
|
|
224
|
-
/** Jedinstveni identifikator podkategorije (automatski generisan od strane Firestore) */
|
|
225
|
-
id?: string;
|
|
226
|
-
/** Naziv podkategorije */
|
|
227
|
-
name: string;
|
|
228
|
-
/** Detaljniji opis podkategorije */
|
|
229
|
-
description?: string;
|
|
230
|
-
/** ID kategorije kojoj podkategorija pripada */
|
|
231
|
-
categoryId: string;
|
|
232
|
-
/** Flag koji označava da li je podkategorija aktivna */
|
|
233
|
-
isActive: boolean;
|
|
234
|
-
/** Datum kreiranja podkategorije */
|
|
235
|
-
createdAt: Date;
|
|
236
|
-
/** Datum poslednjeg ažuriranja podkategorije */
|
|
237
|
-
updatedAt: Date;
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
/**
|
|
241
|
-
* Blokirajući uslovi koji mogu sprečiti proceduru
|
|
242
|
-
* Ovi uslovi predstavljaju apsolutne kontraindikacije koje onemogućavaju izvođenje procedure
|
|
243
|
-
*/
|
|
244
|
-
declare enum BlockingCondition {
|
|
245
|
-
PREGNANCY = "pregnancy",
|
|
246
|
-
BREASTFEEDING = "breastfeeding",
|
|
247
|
-
ACTIVE_INFECTION = "active_infection",
|
|
248
|
-
SKIN_CONDITION = "skin_condition",
|
|
249
|
-
AUTOIMMUNE_DISEASE = "autoimmune_disease",
|
|
250
|
-
BLOOD_THINNERS = "blood_thinners",
|
|
251
|
-
RECENT_SURGERY = "recent_surgery",
|
|
252
|
-
DIABETES = "diabetes",
|
|
253
|
-
HEART_CONDITION = "heart_condition",
|
|
254
|
-
HIGH_BLOOD_PRESSURE = "high_blood_pressure",
|
|
255
|
-
KELOID_SCARRING = "keloid_scarring",
|
|
256
|
-
METAL_IMPLANTS = "metal_implants",
|
|
257
|
-
PACEMAKER = "pacemaker",
|
|
258
|
-
CANCER = "cancer",
|
|
259
|
-
EPILEPSY = "epilepsy"
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
/**
|
|
263
|
-
* Kontraindikacije koje mogu uticati na proceduru
|
|
264
|
-
* Ovi uslovi predstavljaju relativne kontraindikacije koje zahtevaju posebnu pažnju
|
|
265
|
-
*/
|
|
266
|
-
declare enum Contraindication {
|
|
267
|
-
SENSITIVE_SKIN = "sensitive_skin",
|
|
268
|
-
RECENT_TANNING = "recent_tanning",
|
|
269
|
-
RECENT_BOTOX = "recent_botox",
|
|
270
|
-
RECENT_FILLERS = "recent_fillers",
|
|
271
|
-
SKIN_ALLERGIES = "skin_allergies",
|
|
272
|
-
MEDICATIONS = "medications",
|
|
273
|
-
RECENT_CHEMICAL_PEEL = "recent_chemical_peel",
|
|
274
|
-
RECENT_LASER = "recent_laser",
|
|
275
|
-
SKIN_INFLAMMATION = "skin_inflammation",
|
|
276
|
-
OPEN_WOUNDS = "open_wounds",
|
|
277
|
-
HERPES_SIMPLEX = "herpes_simplex",
|
|
278
|
-
COLD_SORES = "cold_sores"
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
/**
|
|
282
|
-
* Benefiti koji se mogu očekivati od procedure
|
|
283
|
-
* Lista mogućih pozitivnih efekata i rezultata tretmana
|
|
284
|
-
*/
|
|
285
|
-
declare enum TreatmentBenefit {
|
|
286
|
-
WRINKLE_REDUCTION = "wrinkle_reduction",
|
|
287
|
-
SKIN_TIGHTENING = "skin_tightening",
|
|
288
|
-
COLLAGEN_PRODUCTION = "collagen_production",
|
|
289
|
-
ACNE_REDUCTION = "acne_reduction",
|
|
290
|
-
SCAR_REDUCTION = "scar_reduction",
|
|
291
|
-
PIGMENTATION_IMPROVEMENT = "pigmentation_improvement",
|
|
292
|
-
HAIR_REMOVAL = "hair_removal",
|
|
293
|
-
MUSCLE_TONING = "muscle_toning",
|
|
294
|
-
FAT_REDUCTION = "fat_reduction",
|
|
295
|
-
CELLULITE_REDUCTION = "cellulite_reduction",
|
|
296
|
-
SKIN_REJUVENATION = "skin_rejuvenation",
|
|
297
|
-
PORE_REDUCTION = "pore_reduction",
|
|
298
|
-
TEXTURE_IMPROVEMENT = "texture_improvement",
|
|
299
|
-
HYDRATION_BOOST = "hydration_boost",
|
|
300
|
-
CIRCULATION_IMPROVEMENT = "circulation_improvement"
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
/**
|
|
304
|
-
* Nivoi sertifikacije medicinskog osoblja, poređani od najnižeg do najvišeg
|
|
305
|
-
*/
|
|
306
|
-
declare enum CertificationLevel {
|
|
307
|
-
AESTHETICIAN = "aesthetician",// Osnovni estetičar
|
|
308
|
-
NURSE_ASSISTANT = "nurse_assistant",// Medicinski tehničar
|
|
309
|
-
NURSE = "nurse",// Medicinska sestra
|
|
310
|
-
NURSE_PRACTITIONER = "nurse_practitioner",// Viša medicinska sestra
|
|
311
|
-
PHYSICIAN_ASSISTANT = "physician_assistant",// Lekar asistent
|
|
312
|
-
DOCTOR = "doctor",// Doktor medicine
|
|
313
|
-
SPECIALIST = "specialist",// Specijalista
|
|
314
|
-
PLASTIC_SURGEON = "plastic_surgeon"
|
|
315
|
-
}
|
|
316
|
-
/**
|
|
317
|
-
* Dodatne specijalizacije potrebne za određene procedure
|
|
318
|
-
*/
|
|
319
|
-
declare enum CertificationSpecialty {
|
|
320
|
-
LASER = "laser",// Sertifikat za laserske tretmane
|
|
321
|
-
INJECTABLES = "injectables",// Sertifikat za injekcione tretmane
|
|
322
|
-
CHEMICAL_PEELS = "chemical_peels",// Sertifikat za hemijske pilinge
|
|
323
|
-
MICRODERMABRASION = "microdermabrasion",// Sertifikat za mikrodermoabraziju
|
|
324
|
-
BODY_CONTOURING = "body_contouring",// Sertifikat za konturiranje tela
|
|
325
|
-
SKIN_CARE = "skin_care",// Sertifikat za negu kože
|
|
326
|
-
WOUND_CARE = "wound_care",// Sertifikat za tretman rana
|
|
327
|
-
ANESTHESIA = "anesthesia"
|
|
328
|
-
}
|
|
329
|
-
/**
|
|
330
|
-
* Zahtevi sertifikacije za izvođenje procedura
|
|
331
|
-
*/
|
|
332
|
-
interface CertificationRequirement {
|
|
333
|
-
/** Minimalni nivo sertifikacije potreban za proceduru */
|
|
334
|
-
minimumLevel: CertificationLevel;
|
|
335
|
-
/** Dodatne specijalizacije potrebne za proceduru */
|
|
336
|
-
requiredSpecialties?: CertificationSpecialty[];
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
/**
|
|
340
|
-
* Reference to a documentation template with metadata
|
|
341
|
-
* @property templateId - ID of the documentation template
|
|
342
|
-
* @property isUserForm - Whether this template is filled by users
|
|
343
|
-
* @property isRequired - Whether this template is required
|
|
344
|
-
* @property sortingOrder - The display order of this template
|
|
345
|
-
*/
|
|
346
|
-
interface TechnologyDocumentationTemplate {
|
|
347
|
-
templateId: string;
|
|
348
|
-
isUserForm: boolean;
|
|
349
|
-
isRequired: boolean;
|
|
350
|
-
sortingOrder: number;
|
|
351
|
-
}
|
|
352
|
-
/**
|
|
353
|
-
* Zahtevi koji su povezani sa tehnologijom
|
|
354
|
-
* @property pre - Lista zahteva koji se moraju ispuniti pre procedure
|
|
355
|
-
* @property post - Lista zahteva koji se moraju ispuniti posle procedure
|
|
356
|
-
*/
|
|
357
|
-
interface TechnologyRequirements {
|
|
358
|
-
pre: Requirement[];
|
|
359
|
-
post: Requirement[];
|
|
360
|
-
}
|
|
361
|
-
/**
|
|
362
|
-
* Technology used in medical procedures
|
|
363
|
-
* Technologies are now a top-level collection that reference their full path in the hierarchy
|
|
364
|
-
* through family, category, and subcategory IDs
|
|
365
|
-
*
|
|
366
|
-
* @property id - Unique identifier of the technology
|
|
367
|
-
* @property name - Name of the technology
|
|
368
|
-
* @property description - Detailed description of the technology and its application
|
|
369
|
-
* @property family - The procedure family this technology belongs to (aesthetics/surgery)
|
|
370
|
-
* @property categoryId - ID of the category this technology belongs to
|
|
371
|
-
* @property subcategoryId - ID of the subcategory this technology belongs to
|
|
372
|
-
* @property technicalDetails - Technical specifications and details
|
|
373
|
-
* @property requirements - List of pre and post procedure requirements
|
|
374
|
-
* @property blockingConditions - List of conditions that prevent the procedure
|
|
375
|
-
* @property contraindications - List of conditions requiring special attention
|
|
376
|
-
* @property benefits - List of expected benefits from the procedure
|
|
377
|
-
* @property certificationRequirement - Required certification level and specialties
|
|
378
|
-
* @property documentationTemplates - List of documentation template references
|
|
379
|
-
* @property isActive - Whether the technology is active in the system
|
|
380
|
-
* @property createdAt - Creation date
|
|
381
|
-
* @property updatedAt - Last update date
|
|
382
|
-
*/
|
|
383
|
-
interface Technology {
|
|
384
|
-
id?: string;
|
|
385
|
-
name: string;
|
|
386
|
-
description: string;
|
|
387
|
-
family: ProcedureFamily;
|
|
388
|
-
categoryId: string;
|
|
389
|
-
subcategoryId: string;
|
|
390
|
-
technicalDetails?: string;
|
|
391
|
-
requirements: {
|
|
392
|
-
pre: Requirement[];
|
|
393
|
-
post: Requirement[];
|
|
394
|
-
};
|
|
395
|
-
blockingConditions: BlockingCondition[];
|
|
396
|
-
contraindications: Contraindication[];
|
|
397
|
-
benefits: TreatmentBenefit[];
|
|
398
|
-
certificationRequirement: CertificationRequirement;
|
|
399
|
-
documentationTemplates?: TechnologyDocumentationTemplate[];
|
|
400
|
-
isActive: boolean;
|
|
401
|
-
createdAt: Date;
|
|
402
|
-
updatedAt: Date;
|
|
403
|
-
}
|
|
404
|
-
|
|
405
|
-
/**
|
|
406
|
-
* Enum for element types in documentation templates
|
|
407
|
-
*/
|
|
408
|
-
declare enum DocumentElementType {
|
|
409
|
-
HEADING = "heading",
|
|
410
|
-
PARAGRAPH = "paragraph",
|
|
411
|
-
LIST = "list",
|
|
412
|
-
DYNAMIC_TEXT = "dynamic_text",
|
|
413
|
-
BINARY_CHOICE = "binary_choice",
|
|
414
|
-
MULTIPLE_CHOICE = "multiple_choice",
|
|
415
|
-
SINGLE_CHOICE = "single_choice",
|
|
416
|
-
RATING_SCALE = "rating_scale",
|
|
417
|
-
TEXT_INPUT = "text_input",
|
|
418
|
-
DATE_PICKER = "date_picker",
|
|
419
|
-
SIGNATURE = "signature",
|
|
420
|
-
DITIGAL_SIGNATURE = "digital_signature",
|
|
421
|
-
FILE_UPLOAD = "file_upload"
|
|
422
|
-
}
|
|
423
|
-
/**
|
|
424
|
-
* Enum for list types
|
|
425
|
-
*/
|
|
426
|
-
declare enum ListType {
|
|
427
|
-
ORDERED = "ordered",
|
|
428
|
-
UNORDERED = "unordered"
|
|
429
|
-
}
|
|
430
|
-
/**
|
|
431
|
-
* Enum for heading levels
|
|
432
|
-
*/
|
|
433
|
-
declare enum HeadingLevel {
|
|
434
|
-
H1 = "h1",
|
|
435
|
-
H2 = "h2",
|
|
436
|
-
H3 = "h3",
|
|
437
|
-
H4 = "h4",
|
|
438
|
-
H5 = "h5",
|
|
439
|
-
H6 = "h6"
|
|
440
|
-
}
|
|
441
|
-
/**
|
|
442
|
-
* Enum for dynamic variable placeholders
|
|
443
|
-
*/
|
|
444
|
-
declare enum DynamicVariable {
|
|
445
|
-
PATIENT_NAME = "$[PATIENT_NAME]",
|
|
446
|
-
DOCTOR_NAME = "$[DOCTOR_NAME]",
|
|
447
|
-
CLINIC_NAME = "$[CLINIC_NAME]",
|
|
448
|
-
PATIENT_BIRTHDAY = "$[PATIENT_BIRTHDAY]",
|
|
449
|
-
APPOINTMENT_DATE = "$[APPOINTMENT_DATE]",
|
|
450
|
-
CURRENT_DATE = "$[CURRENT_DATE]",
|
|
451
|
-
PROCEDURE_NAME = "$[PROCEDURE_NAME]",
|
|
452
|
-
PROCEDURE_DESCRIPTION = "$[PROCEDURE_DESCRIPTION]",
|
|
453
|
-
PROCEDURE_COST = "$[PROCEDURE_COST]",
|
|
454
|
-
PROCEDURE_DURATION = "$[PROCEDURE_DURATION]",
|
|
455
|
-
PROCEDURE_RISK = "$[PROCEDURE_RISK]"
|
|
456
|
-
}
|
|
457
|
-
/**
|
|
458
|
-
* Base interface for all document elements
|
|
459
|
-
*/
|
|
460
|
-
interface BaseDocumentElement {
|
|
461
|
-
id: string;
|
|
462
|
-
type: DocumentElementType;
|
|
463
|
-
required?: boolean;
|
|
246
|
+
type: DocumentElementType;
|
|
247
|
+
required?: boolean;
|
|
464
248
|
}
|
|
465
249
|
/**
|
|
466
250
|
* Interface for heading element
|
|
@@ -614,118 +398,1046 @@ interface UpdateDocumentTemplateData {
|
|
|
614
398
|
}
|
|
615
399
|
|
|
616
400
|
/**
|
|
617
|
-
*
|
|
618
|
-
* Svaka nova tehnologija će imati ove vrednosti ako se ne specificira drugačije
|
|
619
|
-
*/
|
|
620
|
-
declare const DEFAULT_CERTIFICATION_REQUIREMENT: CertificationRequirement;
|
|
621
|
-
|
|
622
|
-
/**
|
|
623
|
-
* Bazna klasa za greške u backoffice sistemu
|
|
401
|
+
* Service for managing documentation templates in the backoffice
|
|
624
402
|
*/
|
|
625
|
-
declare class
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
403
|
+
declare class DocumentationTemplateService {
|
|
404
|
+
private apiService;
|
|
405
|
+
/**
|
|
406
|
+
* Constructor for DocumentationTemplateService
|
|
407
|
+
* @param db - Firestore instance
|
|
408
|
+
* @param auth - Firebase Auth instance
|
|
409
|
+
* @param app - Firebase App instance
|
|
410
|
+
*/
|
|
411
|
+
constructor(db: Firestore, auth: Auth, app: FirebaseApp);
|
|
412
|
+
/**
|
|
413
|
+
* Create a new document template
|
|
414
|
+
* @param data - Template data
|
|
415
|
+
* @param userId - ID of the user creating the template
|
|
416
|
+
* @returns The created template
|
|
417
|
+
*/
|
|
418
|
+
createTemplate(data: CreateDocumentTemplateData, userId: string): Promise<DocumentTemplate>;
|
|
419
|
+
/**
|
|
420
|
+
* Get a document template by ID
|
|
421
|
+
* @param templateId - ID of the template to retrieve
|
|
422
|
+
* @param version - Optional version number to retrieve (defaults to latest version)
|
|
423
|
+
* @returns The template or null if not found
|
|
424
|
+
*/
|
|
425
|
+
getTemplateById(templateId: string, version?: number): Promise<DocumentTemplate | null>;
|
|
426
|
+
/**
|
|
427
|
+
* Update an existing document template
|
|
428
|
+
* @param templateId - ID of the template to update
|
|
429
|
+
* @param data - Updated template data
|
|
430
|
+
* @returns The updated template
|
|
431
|
+
*/
|
|
432
|
+
updateTemplate(templateId: string, data: UpdateDocumentTemplateData): Promise<DocumentTemplate>;
|
|
433
|
+
/**
|
|
434
|
+
* Delete a document template
|
|
435
|
+
* @param templateId - ID of the template to delete
|
|
436
|
+
*/
|
|
437
|
+
deleteTemplate(templateId: string): Promise<void>;
|
|
438
|
+
/**
|
|
439
|
+
* Get all active templates
|
|
440
|
+
* @param pageSize - Number of templates to retrieve
|
|
441
|
+
* @param lastDoc - Last document from previous page for pagination
|
|
442
|
+
* @returns Array of templates and the last document for pagination
|
|
443
|
+
*/
|
|
444
|
+
getActiveTemplates(pageSize?: number, lastDoc?: QueryDocumentSnapshot<DocumentTemplate>): Promise<{
|
|
445
|
+
templates: DocumentTemplate[];
|
|
446
|
+
lastDoc: QueryDocumentSnapshot<DocumentTemplate> | null;
|
|
447
|
+
}>;
|
|
448
|
+
/**
|
|
449
|
+
* Get templates by tags
|
|
450
|
+
* @param tags - Tags to filter by
|
|
451
|
+
* @param pageSize - Number of templates to retrieve
|
|
452
|
+
* @param lastDoc - Last document from previous page for pagination
|
|
453
|
+
* @returns Array of templates and the last document for pagination
|
|
454
|
+
*/
|
|
455
|
+
getTemplatesByTags(tags: string[], pageSize?: number, lastDoc?: QueryDocumentSnapshot<DocumentTemplate>): Promise<{
|
|
456
|
+
templates: DocumentTemplate[];
|
|
457
|
+
lastDoc: QueryDocumentSnapshot<DocumentTemplate> | null;
|
|
458
|
+
}>;
|
|
459
|
+
/**
|
|
460
|
+
* Get templates created by a specific user
|
|
461
|
+
* @param userId - ID of the user who created the templates
|
|
462
|
+
* @param pageSize - Number of templates to retrieve
|
|
463
|
+
* @param lastDoc - Last document from previous page for pagination
|
|
464
|
+
* @returns Array of templates and the last document for pagination
|
|
465
|
+
*/
|
|
466
|
+
getTemplatesByCreator(userId: string, pageSize?: number, lastDoc?: QueryDocumentSnapshot<DocumentTemplate>): Promise<{
|
|
467
|
+
templates: DocumentTemplate[];
|
|
468
|
+
lastDoc: QueryDocumentSnapshot<DocumentTemplate> | null;
|
|
469
|
+
}>;
|
|
470
|
+
/**
|
|
471
|
+
* Get a specific version of a template
|
|
472
|
+
* @param templateId - ID of the template
|
|
473
|
+
* @param versionNumber - Version number to retrieve
|
|
474
|
+
* @returns The template version or null if not found
|
|
475
|
+
*/
|
|
476
|
+
getTemplateVersion(templateId: string, versionNumber: number): Promise<DocumentTemplate | null>;
|
|
477
|
+
/**
|
|
478
|
+
* Get all versions of a template
|
|
479
|
+
* @param templateId - ID of the template
|
|
480
|
+
* @returns Array of template versions
|
|
481
|
+
*/
|
|
482
|
+
getTemplateVersions(templateId: string): Promise<DocumentTemplate[]>;
|
|
639
483
|
}
|
|
484
|
+
|
|
640
485
|
/**
|
|
641
|
-
*
|
|
486
|
+
* Product used in procedures
|
|
487
|
+
* Can be consumables, equipment, or any other product needed for performing procedures
|
|
488
|
+
*
|
|
489
|
+
* @property id - Unique identifier of the product
|
|
490
|
+
* @property name - Name of the product
|
|
491
|
+
* @property description - Detailed description of the product and its purpose
|
|
492
|
+
* @property brandId - ID of the brand that manufactures this product
|
|
493
|
+
* @property technologyId - ID of the technology this product is used with
|
|
494
|
+
* @property technicalDetails - Technical details and specifications
|
|
495
|
+
* @property warnings - List of warnings related to product use
|
|
496
|
+
* @property dosage - Dosage information (if applicable)
|
|
497
|
+
* @property composition - Product composition
|
|
498
|
+
* @property indications - List of indications for use
|
|
499
|
+
* @property contraindications - List of contraindications
|
|
500
|
+
* @property isActive - Whether the product is active in the system
|
|
501
|
+
* @property createdAt - Creation date
|
|
502
|
+
* @property updatedAt - Last update date
|
|
642
503
|
*/
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
504
|
+
interface Product {
|
|
505
|
+
id?: string;
|
|
506
|
+
name: string;
|
|
507
|
+
brandId: string;
|
|
508
|
+
brandName: string;
|
|
509
|
+
technologyId: string;
|
|
510
|
+
technologyName: string;
|
|
511
|
+
createdAt: Date;
|
|
512
|
+
updatedAt: Date;
|
|
513
|
+
isActive: boolean;
|
|
514
|
+
description?: string;
|
|
515
|
+
technicalDetails?: string;
|
|
516
|
+
warnings?: string[];
|
|
517
|
+
dosage?: string;
|
|
518
|
+
composition?: string;
|
|
519
|
+
indications?: string[];
|
|
520
|
+
contraindications?: string[];
|
|
651
521
|
}
|
|
652
522
|
/**
|
|
653
|
-
*
|
|
523
|
+
* Interface for the ProductService class
|
|
654
524
|
*/
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
525
|
+
interface IProductService {
|
|
526
|
+
/**
|
|
527
|
+
* Creates a new product
|
|
528
|
+
* @param technologyId - ID of the technology this product is used with
|
|
529
|
+
* @param brandId - ID of the brand that manufactures this product
|
|
530
|
+
* @param product - Product data
|
|
531
|
+
*/
|
|
532
|
+
create(technologyId: string, brandId: string, product: Omit<Product, "id" | "createdAt" | "updatedAt" | "brandId" | "technologyId">): Promise<Product>;
|
|
533
|
+
/**
|
|
534
|
+
* Gets all products for a technology
|
|
535
|
+
* @param technologyId - ID of the technology
|
|
536
|
+
*/
|
|
537
|
+
getAllByTechnology(technologyId: string): Promise<Product[]>;
|
|
538
|
+
/**
|
|
539
|
+
* Gets all products for a brand
|
|
540
|
+
* @param brandId - ID of the brand
|
|
541
|
+
*/
|
|
542
|
+
getAllByBrand(brandId: string): Promise<Product[]>;
|
|
543
|
+
/**
|
|
544
|
+
* Updates a product
|
|
545
|
+
* @param technologyId - ID of the technology
|
|
546
|
+
* @param productId - ID of the product to update
|
|
547
|
+
* @param product - Updated product data
|
|
548
|
+
*/
|
|
549
|
+
update(technologyId: string, productId: string, product: Partial<Omit<Product, "id" | "createdAt" | "brandId" | "technologyId">>): Promise<Product | null>;
|
|
550
|
+
/**
|
|
551
|
+
* Deletes a product (soft delete)
|
|
552
|
+
* @param technologyId - ID of the technology
|
|
553
|
+
* @param productId - ID of the product to delete
|
|
554
|
+
*/
|
|
555
|
+
delete(technologyId: string, productId: string): Promise<void>;
|
|
556
|
+
/**
|
|
557
|
+
* Gets a product by ID
|
|
558
|
+
* @param technologyId - ID of the technology
|
|
559
|
+
* @param productId - ID of the product
|
|
560
|
+
*/
|
|
561
|
+
getById(technologyId: string, productId: string): Promise<Product | null>;
|
|
660
562
|
}
|
|
661
|
-
|
|
662
|
-
|
|
563
|
+
|
|
564
|
+
declare class ProductService extends BaseService implements IProductService {
|
|
565
|
+
/**
|
|
566
|
+
* Gets reference to products collection under a technology
|
|
567
|
+
* @param technologyId - ID of the technology
|
|
568
|
+
* @returns Firestore collection reference
|
|
569
|
+
*/
|
|
570
|
+
private getProductsRef;
|
|
571
|
+
/**
|
|
572
|
+
* Creates a new product under technology
|
|
573
|
+
*/
|
|
574
|
+
create(technologyId: string, brandId: string, product: Omit<Product, "id" | "createdAt" | "updatedAt" | "brandId" | "technologyId">): Promise<Product>;
|
|
575
|
+
/**
|
|
576
|
+
* Gets all products for a technology
|
|
577
|
+
*/
|
|
578
|
+
getAllByTechnology(technologyId: string): Promise<Product[]>;
|
|
579
|
+
/**
|
|
580
|
+
* Gets all products for a brand by filtering through all technologies
|
|
581
|
+
*/
|
|
582
|
+
getAllByBrand(brandId: string): Promise<Product[]>;
|
|
583
|
+
/**
|
|
584
|
+
* Updates a product
|
|
585
|
+
*/
|
|
586
|
+
update(technologyId: string, productId: string, product: Partial<Omit<Product, "id" | "createdAt" | "brandId" | "technologyId">>): Promise<Product | null>;
|
|
587
|
+
/**
|
|
588
|
+
* Soft deletes a product
|
|
589
|
+
*/
|
|
590
|
+
delete(technologyId: string, productId: string): Promise<void>;
|
|
591
|
+
/**
|
|
592
|
+
* Gets a product by ID
|
|
593
|
+
*/
|
|
594
|
+
getById(technologyId: string, productId: string): Promise<Product | null>;
|
|
663
595
|
}
|
|
596
|
+
|
|
664
597
|
/**
|
|
665
|
-
*
|
|
598
|
+
* Jedinica mere za vremenski period
|
|
666
599
|
*/
|
|
667
|
-
declare
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
declare class RequirementNotFoundError extends RequirementError {
|
|
671
|
-
constructor(id: string);
|
|
672
|
-
}
|
|
673
|
-
declare class InvalidRequirementDataError extends RequirementError {
|
|
674
|
-
constructor(message: string);
|
|
675
|
-
}
|
|
676
|
-
declare class InvalidTimeframeError extends RequirementError {
|
|
677
|
-
constructor(message: string);
|
|
600
|
+
declare enum TimeUnit {
|
|
601
|
+
HOURS = "hours",
|
|
602
|
+
DAYS = "days"
|
|
678
603
|
}
|
|
679
604
|
/**
|
|
680
|
-
*
|
|
605
|
+
* Tip zahteva - da li se odnosi na period pre ili posle procedure
|
|
681
606
|
*/
|
|
682
|
-
declare
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
declare class InvalidHierarchyError extends RelationshipError {
|
|
686
|
-
constructor(message: string);
|
|
607
|
+
declare enum RequirementType {
|
|
608
|
+
PRE = "pre",
|
|
609
|
+
POST = "post"
|
|
687
610
|
}
|
|
688
|
-
|
|
689
|
-
|
|
611
|
+
/**
|
|
612
|
+
* Nivo važnosti zahteva
|
|
613
|
+
*/
|
|
614
|
+
type RequirementImportance = "low" | "medium" | "high";
|
|
615
|
+
/**
|
|
616
|
+
* Vremenski okvir za zahtev
|
|
617
|
+
* @property duration - Trajanje u odabranoj jedinici vremena
|
|
618
|
+
* @property unit - Jedinica vremena (sati ili dani)
|
|
619
|
+
* @property notifyAt - Lista trenutaka kada treba poslati obaveštenje (u istoj jedinici)
|
|
620
|
+
*/
|
|
621
|
+
interface TimeFrame {
|
|
622
|
+
duration: number;
|
|
623
|
+
unit: TimeUnit;
|
|
624
|
+
notifyAt: number[];
|
|
690
625
|
}
|
|
691
|
-
|
|
692
|
-
|
|
626
|
+
/**
|
|
627
|
+
* Zahtev koji se može povezati sa tehnologijom
|
|
628
|
+
* Može biti zahtev pre procedure (pre) ili posle procedure (post)
|
|
629
|
+
*
|
|
630
|
+
* @property id - Jedinstveni identifikator zahteva
|
|
631
|
+
* @property type - Tip zahteva (pre/post)
|
|
632
|
+
* @property name - Naziv zahteva
|
|
633
|
+
* @property description - Detaljan opis zahteva
|
|
634
|
+
* @property timeframe - Vremenski okvir za zahtev
|
|
635
|
+
* @property importance - Nivo važnosti zahteva
|
|
636
|
+
* @property isActive - Da li je zahtev aktivan u sistemu
|
|
637
|
+
* @property createdAt - Datum kreiranja
|
|
638
|
+
* @property updatedAt - Datum poslednjeg ažuriranja
|
|
639
|
+
*/
|
|
640
|
+
interface Requirement {
|
|
641
|
+
id: string;
|
|
642
|
+
type: RequirementType;
|
|
643
|
+
name: string;
|
|
644
|
+
description: string;
|
|
645
|
+
timeframe: TimeFrame;
|
|
646
|
+
importance: RequirementImportance;
|
|
647
|
+
isActive: boolean;
|
|
648
|
+
createdAt: Date;
|
|
649
|
+
updatedAt: Date;
|
|
693
650
|
}
|
|
694
|
-
|
|
695
|
-
|
|
651
|
+
|
|
652
|
+
/**
|
|
653
|
+
* Servis za upravljanje globalnim zahtevima.
|
|
654
|
+
* Zahtevi se mogu kreirati globalno i zatim povezati sa različitim tehnologijama.
|
|
655
|
+
* Ovo omogućava ponovno korišćenje istih zahteva za različite tehnologije.
|
|
656
|
+
*
|
|
657
|
+
* @example
|
|
658
|
+
* const requirementService = new RequirementService();
|
|
659
|
+
*
|
|
660
|
+
* // Kreiranje globalnog zahteva
|
|
661
|
+
* const requirement = await requirementService.create({
|
|
662
|
+
* type: "pre",
|
|
663
|
+
* name: "Stay Hydrated",
|
|
664
|
+
* description: "Drink plenty of water",
|
|
665
|
+
* timeframe: {
|
|
666
|
+
* duration: 2,
|
|
667
|
+
* unit: "hours",
|
|
668
|
+
* notifyAt: [2, 1]
|
|
669
|
+
* },
|
|
670
|
+
* importance: "high"
|
|
671
|
+
* });
|
|
672
|
+
*/
|
|
673
|
+
declare class RequirementService extends BaseService {
|
|
674
|
+
/**
|
|
675
|
+
* Referenca na Firestore kolekciju zahteva
|
|
676
|
+
*/
|
|
677
|
+
private get requirementsRef();
|
|
678
|
+
/**
|
|
679
|
+
* Kreira novi globalni zahtev
|
|
680
|
+
* @param requirement - Podaci za novi zahtev
|
|
681
|
+
* @returns Kreirani zahtev sa generisanim ID-em
|
|
682
|
+
*/
|
|
683
|
+
create(requirement: Omit<Requirement, "id" | "createdAt" | "updatedAt">): Promise<{
|
|
684
|
+
createdAt: Date;
|
|
685
|
+
updatedAt: Date;
|
|
686
|
+
name: string;
|
|
687
|
+
isActive: boolean;
|
|
688
|
+
description: string;
|
|
689
|
+
type: RequirementType;
|
|
690
|
+
timeframe: TimeFrame;
|
|
691
|
+
importance: RequirementImportance;
|
|
692
|
+
id: string;
|
|
693
|
+
}>;
|
|
694
|
+
/**
|
|
695
|
+
* Vraća sve aktivne zahteve
|
|
696
|
+
* @returns Lista aktivnih zahteva
|
|
697
|
+
*/
|
|
698
|
+
getAll(): Promise<Requirement[]>;
|
|
699
|
+
/**
|
|
700
|
+
* Vraća sve aktivne zahteve određenog tipa
|
|
701
|
+
* @param type - Tip zahteva (pre/post)
|
|
702
|
+
* @returns Lista zahteva određenog tipa
|
|
703
|
+
*/
|
|
704
|
+
getAllByType(type: RequirementType): Promise<Requirement[]>;
|
|
705
|
+
/**
|
|
706
|
+
* Ažurira postojeći zahtev
|
|
707
|
+
* @param id - ID zahteva koji se ažurira
|
|
708
|
+
* @param requirement - Novi podaci za zahtev
|
|
709
|
+
* @returns Ažurirani zahtev
|
|
710
|
+
*/
|
|
711
|
+
update(id: string, requirement: Partial<Omit<Requirement, "id" | "createdAt">>): Promise<Requirement | null>;
|
|
712
|
+
/**
|
|
713
|
+
* Soft delete zahteva (postavlja isActive na false)
|
|
714
|
+
* @param id - ID zahteva koji se briše
|
|
715
|
+
*/
|
|
716
|
+
delete(id: string): Promise<void>;
|
|
717
|
+
/**
|
|
718
|
+
* Vraća zahtev po ID-u
|
|
719
|
+
* @param id - ID traženog zahteva
|
|
720
|
+
* @returns Zahtev ili null ako ne postoji
|
|
721
|
+
*/
|
|
722
|
+
getById(id: string): Promise<Requirement | null>;
|
|
696
723
|
}
|
|
697
|
-
|
|
698
|
-
|
|
724
|
+
|
|
725
|
+
/**
|
|
726
|
+
* Podkategorija procedura
|
|
727
|
+
* Podkategorije su drugi nivo hijerarhije i pripadaju određenoj kategoriji
|
|
728
|
+
* One grupišu slične tehnologije u okviru kategorije
|
|
729
|
+
*
|
|
730
|
+
* @property id - Jedinstveni identifikator podkategorije
|
|
731
|
+
* @property name - Naziv podkategorije
|
|
732
|
+
* @property description - Detaljan opis podkategorije i njene namene
|
|
733
|
+
* @property categoryId - ID kategorije kojoj podkategorija pripada
|
|
734
|
+
* @property isActive - Da li je podkategorija aktivna u sistemu
|
|
735
|
+
* @property createdAt - Datum kreiranja
|
|
736
|
+
* @property updatedAt - Datum poslednjeg ažuriranja
|
|
737
|
+
*/
|
|
738
|
+
interface Subcategory {
|
|
739
|
+
/** Jedinstveni identifikator podkategorije (automatski generisan od strane Firestore) */
|
|
740
|
+
id?: string;
|
|
741
|
+
/** Naziv podkategorije */
|
|
742
|
+
name: string;
|
|
743
|
+
/** Detaljniji opis podkategorije */
|
|
744
|
+
description?: string;
|
|
745
|
+
/** ID kategorije kojoj podkategorija pripada */
|
|
746
|
+
categoryId: string;
|
|
747
|
+
/** Flag koji označava da li je podkategorija aktivna */
|
|
748
|
+
isActive: boolean;
|
|
749
|
+
/** Datum kreiranja podkategorije */
|
|
750
|
+
createdAt: Date;
|
|
751
|
+
/** Datum poslednjeg ažuriranja podkategorije */
|
|
752
|
+
updatedAt: Date;
|
|
699
753
|
}
|
|
700
|
-
|
|
701
|
-
|
|
754
|
+
|
|
755
|
+
/**
|
|
756
|
+
* Servis za upravljanje podkategorijama procedura.
|
|
757
|
+
* Podkategorije su drugi nivo organizacije i pripadaju određenoj kategoriji.
|
|
758
|
+
*
|
|
759
|
+
* @example
|
|
760
|
+
* const subcategoryService = new SubcategoryService();
|
|
761
|
+
*
|
|
762
|
+
* // Kreiranje nove podkategorije
|
|
763
|
+
* const subcategory = await subcategoryService.create(categoryId, {
|
|
764
|
+
* name: "Anti-Wrinkle",
|
|
765
|
+
* description: "Treatments targeting facial wrinkles"
|
|
766
|
+
* });
|
|
767
|
+
*/
|
|
768
|
+
declare class SubcategoryService extends BaseService {
|
|
769
|
+
/**
|
|
770
|
+
* Vraća referencu na Firestore kolekciju podkategorija za određenu kategoriju
|
|
771
|
+
* @param categoryId - ID roditeljske kategorije
|
|
772
|
+
*/
|
|
773
|
+
private getSubcategoriesRef;
|
|
774
|
+
/**
|
|
775
|
+
* Kreira novu podkategoriju u okviru kategorije
|
|
776
|
+
* @param categoryId - ID kategorije kojoj će pripadati nova podkategorija
|
|
777
|
+
* @param subcategory - Podaci za novu podkategoriju
|
|
778
|
+
* @returns Kreirana podkategorija sa generisanim ID-em
|
|
779
|
+
*/
|
|
780
|
+
create(categoryId: string, subcategory: Omit<Subcategory, "id" | "createdAt" | "updatedAt">): Promise<{
|
|
781
|
+
createdAt: Date;
|
|
782
|
+
updatedAt: Date;
|
|
783
|
+
name: string;
|
|
784
|
+
isActive: boolean;
|
|
785
|
+
description?: string | undefined;
|
|
786
|
+
categoryId: string;
|
|
787
|
+
id: string;
|
|
788
|
+
}>;
|
|
789
|
+
/**
|
|
790
|
+
* Vraća sve aktivne podkategorije za određenu kategoriju
|
|
791
|
+
* @param categoryId - ID kategorije čije podkategorije tražimo
|
|
792
|
+
* @returns Lista aktivnih podkategorija
|
|
793
|
+
*/
|
|
794
|
+
getAllByCategoryId(categoryId: string): Promise<Subcategory[]>;
|
|
795
|
+
/**
|
|
796
|
+
* Ažurira postojeću podkategoriju
|
|
797
|
+
* @param categoryId - ID kategorije kojoj pripada podkategorija
|
|
798
|
+
* @param subcategoryId - ID podkategorije koja se ažurira
|
|
799
|
+
* @param subcategory - Novi podaci za podkategoriju
|
|
800
|
+
* @returns Ažurirana podkategorija
|
|
801
|
+
*/
|
|
802
|
+
update(categoryId: string, subcategoryId: string, subcategory: Partial<Omit<Subcategory, "id" | "createdAt" | "categoryId">>): Promise<Subcategory | null>;
|
|
803
|
+
/**
|
|
804
|
+
* Soft delete podkategorije (postavlja isActive na false)
|
|
805
|
+
* @param categoryId - ID kategorije kojoj pripada podkategorija
|
|
806
|
+
* @param subcategoryId - ID podkategorije koja se briše
|
|
807
|
+
*/
|
|
808
|
+
delete(categoryId: string, subcategoryId: string): Promise<void>;
|
|
809
|
+
/**
|
|
810
|
+
* Vraća podkategoriju po ID-u
|
|
811
|
+
* @param categoryId - ID kategorije kojoj pripada podkategorija
|
|
812
|
+
* @param subcategoryId - ID tražene podkategorije
|
|
813
|
+
* @returns Podkategorija ili null ako ne postoji
|
|
814
|
+
*/
|
|
815
|
+
getById(categoryId: string, subcategoryId: string): Promise<Subcategory | null>;
|
|
702
816
|
}
|
|
703
|
-
|
|
704
|
-
|
|
817
|
+
|
|
818
|
+
/**
|
|
819
|
+
* Blokirajući uslovi koji mogu sprečiti proceduru
|
|
820
|
+
* Ovi uslovi predstavljaju apsolutne kontraindikacije koje onemogućavaju izvođenje procedure
|
|
821
|
+
*/
|
|
822
|
+
declare enum BlockingCondition {
|
|
823
|
+
PREGNANCY = "pregnancy",
|
|
824
|
+
BREASTFEEDING = "breastfeeding",
|
|
825
|
+
ACTIVE_INFECTION = "active_infection",
|
|
826
|
+
SKIN_CONDITION = "skin_condition",
|
|
827
|
+
AUTOIMMUNE_DISEASE = "autoimmune_disease",
|
|
828
|
+
BLOOD_THINNERS = "blood_thinners",
|
|
829
|
+
RECENT_SURGERY = "recent_surgery",
|
|
830
|
+
DIABETES = "diabetes",
|
|
831
|
+
HEART_CONDITION = "heart_condition",
|
|
832
|
+
HIGH_BLOOD_PRESSURE = "high_blood_pressure",
|
|
833
|
+
KELOID_SCARRING = "keloid_scarring",
|
|
834
|
+
METAL_IMPLANTS = "metal_implants",
|
|
835
|
+
PACEMAKER = "pacemaker",
|
|
836
|
+
CANCER = "cancer",
|
|
837
|
+
EPILEPSY = "epilepsy"
|
|
705
838
|
}
|
|
706
|
-
|
|
707
|
-
|
|
839
|
+
|
|
840
|
+
/**
|
|
841
|
+
* Kontraindikacije koje mogu uticati na proceduru
|
|
842
|
+
* Ovi uslovi predstavljaju relativne kontraindikacije koje zahtevaju posebnu pažnju
|
|
843
|
+
*/
|
|
844
|
+
declare enum Contraindication {
|
|
845
|
+
SENSITIVE_SKIN = "sensitive_skin",
|
|
846
|
+
RECENT_TANNING = "recent_tanning",
|
|
847
|
+
RECENT_BOTOX = "recent_botox",
|
|
848
|
+
RECENT_FILLERS = "recent_fillers",
|
|
849
|
+
SKIN_ALLERGIES = "skin_allergies",
|
|
850
|
+
MEDICATIONS = "medications",
|
|
851
|
+
RECENT_CHEMICAL_PEEL = "recent_chemical_peel",
|
|
852
|
+
RECENT_LASER = "recent_laser",
|
|
853
|
+
SKIN_INFLAMMATION = "skin_inflammation",
|
|
854
|
+
OPEN_WOUNDS = "open_wounds",
|
|
855
|
+
HERPES_SIMPLEX = "herpes_simplex",
|
|
856
|
+
COLD_SORES = "cold_sores"
|
|
708
857
|
}
|
|
709
858
|
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
859
|
+
/**
|
|
860
|
+
* Benefiti koji se mogu očekivati od procedure
|
|
861
|
+
* Lista mogućih pozitivnih efekata i rezultata tretmana
|
|
862
|
+
*/
|
|
863
|
+
declare enum TreatmentBenefit {
|
|
864
|
+
WRINKLE_REDUCTION = "wrinkle_reduction",
|
|
865
|
+
SKIN_TIGHTENING = "skin_tightening",
|
|
866
|
+
COLLAGEN_PRODUCTION = "collagen_production",
|
|
867
|
+
ACNE_REDUCTION = "acne_reduction",
|
|
868
|
+
SCAR_REDUCTION = "scar_reduction",
|
|
869
|
+
PIGMENTATION_IMPROVEMENT = "pigmentation_improvement",
|
|
870
|
+
HAIR_REMOVAL = "hair_removal",
|
|
871
|
+
MUSCLE_TONING = "muscle_toning",
|
|
872
|
+
FAT_REDUCTION = "fat_reduction",
|
|
873
|
+
CELLULITE_REDUCTION = "cellulite_reduction",
|
|
874
|
+
SKIN_REJUVENATION = "skin_rejuvenation",
|
|
875
|
+
PORE_REDUCTION = "pore_reduction",
|
|
876
|
+
TEXTURE_IMPROVEMENT = "texture_improvement",
|
|
877
|
+
HYDRATION_BOOST = "hydration_boost",
|
|
878
|
+
CIRCULATION_IMPROVEMENT = "circulation_improvement"
|
|
879
|
+
}
|
|
880
|
+
|
|
881
|
+
/**
|
|
882
|
+
* Nivoi sertifikacije medicinskog osoblja, poređani od najnižeg do najvišeg
|
|
883
|
+
*/
|
|
884
|
+
declare enum CertificationLevel {
|
|
885
|
+
AESTHETICIAN = "aesthetician",// Osnovni estetičar
|
|
886
|
+
NURSE_ASSISTANT = "nurse_assistant",// Medicinski tehničar
|
|
887
|
+
NURSE = "nurse",// Medicinska sestra
|
|
888
|
+
NURSE_PRACTITIONER = "nurse_practitioner",// Viša medicinska sestra
|
|
889
|
+
PHYSICIAN_ASSISTANT = "physician_assistant",// Lekar asistent
|
|
890
|
+
DOCTOR = "doctor",// Doktor medicine
|
|
891
|
+
SPECIALIST = "specialist",// Specijalista
|
|
892
|
+
PLASTIC_SURGEON = "plastic_surgeon"
|
|
893
|
+
}
|
|
894
|
+
/**
|
|
895
|
+
* Dodatne specijalizacije potrebne za određene procedure
|
|
896
|
+
*/
|
|
897
|
+
declare enum CertificationSpecialty {
|
|
898
|
+
LASER = "laser",// Sertifikat za laserske tretmane
|
|
899
|
+
INJECTABLES = "injectables",// Sertifikat za injekcione tretmane
|
|
900
|
+
CHEMICAL_PEELS = "chemical_peels",// Sertifikat za hemijske pilinge
|
|
901
|
+
MICRODERMABRASION = "microdermabrasion",// Sertifikat za mikrodermoabraziju
|
|
902
|
+
BODY_CONTOURING = "body_contouring",// Sertifikat za konturiranje tela
|
|
903
|
+
SKIN_CARE = "skin_care",// Sertifikat za negu kože
|
|
904
|
+
WOUND_CARE = "wound_care",// Sertifikat za tretman rana
|
|
905
|
+
ANESTHESIA = "anesthesia"
|
|
906
|
+
}
|
|
907
|
+
/**
|
|
908
|
+
* Zahtevi sertifikacije za izvođenje procedura
|
|
909
|
+
*/
|
|
910
|
+
interface CertificationRequirement {
|
|
911
|
+
/** Minimalni nivo sertifikacije potreban za proceduru */
|
|
912
|
+
minimumLevel: CertificationLevel;
|
|
913
|
+
/** Dodatne specijalizacije potrebne za proceduru */
|
|
914
|
+
requiredSpecialties?: CertificationSpecialty[];
|
|
915
|
+
}
|
|
916
|
+
|
|
917
|
+
/**
|
|
918
|
+
* Reference to a documentation template with metadata
|
|
919
|
+
* @property templateId - ID of the documentation template
|
|
920
|
+
* @property isUserForm - Whether this template is filled by users
|
|
921
|
+
* @property isRequired - Whether this template is required
|
|
922
|
+
* @property sortingOrder - The display order of this template
|
|
923
|
+
*/
|
|
924
|
+
interface TechnologyDocumentationTemplate {
|
|
925
|
+
templateId: string;
|
|
926
|
+
isUserForm: boolean;
|
|
927
|
+
isRequired: boolean;
|
|
928
|
+
sortingOrder: number;
|
|
929
|
+
}
|
|
930
|
+
/**
|
|
931
|
+
* Zahtevi koji su povezani sa tehnologijom
|
|
932
|
+
* @property pre - Lista zahteva koji se moraju ispuniti pre procedure
|
|
933
|
+
* @property post - Lista zahteva koji se moraju ispuniti posle procedure
|
|
934
|
+
*/
|
|
935
|
+
interface TechnologyRequirements {
|
|
936
|
+
pre: Requirement[];
|
|
937
|
+
post: Requirement[];
|
|
938
|
+
}
|
|
939
|
+
/**
|
|
940
|
+
* Technology used in medical procedures
|
|
941
|
+
* Technologies are now a top-level collection that reference their full path in the hierarchy
|
|
942
|
+
* through family, category, and subcategory IDs
|
|
943
|
+
*
|
|
944
|
+
* @property id - Unique identifier of the technology
|
|
945
|
+
* @property name - Name of the technology
|
|
946
|
+
* @property description - Detailed description of the technology and its application
|
|
947
|
+
* @property family - The procedure family this technology belongs to (aesthetics/surgery)
|
|
948
|
+
* @property categoryId - ID of the category this technology belongs to
|
|
949
|
+
* @property subcategoryId - ID of the subcategory this technology belongs to
|
|
950
|
+
* @property technicalDetails - Technical specifications and details
|
|
951
|
+
* @property requirements - List of pre and post procedure requirements
|
|
952
|
+
* @property blockingConditions - List of conditions that prevent the procedure
|
|
953
|
+
* @property contraindications - List of conditions requiring special attention
|
|
954
|
+
* @property benefits - List of expected benefits from the procedure
|
|
955
|
+
* @property certificationRequirement - Required certification level and specialties
|
|
956
|
+
* @property documentationTemplates - List of documentation template references
|
|
957
|
+
* @property isActive - Whether the technology is active in the system
|
|
958
|
+
* @property createdAt - Creation date
|
|
959
|
+
* @property updatedAt - Last update date
|
|
960
|
+
*/
|
|
961
|
+
interface Technology {
|
|
962
|
+
id?: string;
|
|
963
|
+
name: string;
|
|
964
|
+
description: string;
|
|
965
|
+
family: ProcedureFamily;
|
|
966
|
+
categoryId: string;
|
|
967
|
+
subcategoryId: string;
|
|
968
|
+
technicalDetails?: string;
|
|
969
|
+
requirements: {
|
|
970
|
+
pre: Requirement[];
|
|
971
|
+
post: Requirement[];
|
|
972
|
+
};
|
|
973
|
+
blockingConditions: BlockingCondition[];
|
|
974
|
+
contraindications: Contraindication[];
|
|
975
|
+
benefits: TreatmentBenefit[];
|
|
976
|
+
certificationRequirement: CertificationRequirement;
|
|
977
|
+
documentationTemplates?: TechnologyDocumentationTemplate[];
|
|
978
|
+
isActive: boolean;
|
|
979
|
+
createdAt: Date;
|
|
980
|
+
updatedAt: Date;
|
|
981
|
+
}
|
|
982
|
+
|
|
983
|
+
/**
|
|
984
|
+
* Condensed practitioner review information
|
|
985
|
+
* @description Used for aggregated data attached to practitioner documents
|
|
986
|
+
*/
|
|
987
|
+
interface PractitionerReviewInfo {
|
|
988
|
+
totalReviews: number;
|
|
989
|
+
averageRating: number;
|
|
990
|
+
knowledgeAndExpertise: number;
|
|
991
|
+
communicationSkills: number;
|
|
992
|
+
bedSideManner: number;
|
|
993
|
+
thoroughness: number;
|
|
994
|
+
trustworthiness: number;
|
|
995
|
+
recommendationPercentage: number;
|
|
996
|
+
}
|
|
997
|
+
|
|
998
|
+
declare enum PricingMeasure {
|
|
999
|
+
PER_ML = "per_ml",
|
|
1000
|
+
PER_ZONE = "per_zone",
|
|
1001
|
+
PER_AREA = "per_area",
|
|
1002
|
+
PER_SESSION = "per_session",
|
|
1003
|
+
PER_TREATMENT = "per_treatment",
|
|
1004
|
+
PER_PACKAGE = "per_package"
|
|
1005
|
+
}
|
|
1006
|
+
declare enum Currency {
|
|
1007
|
+
EUR = "EUR",
|
|
1008
|
+
USD = "USD",
|
|
1009
|
+
GBP = "GBP",
|
|
1010
|
+
CHF = "CHF",
|
|
1011
|
+
AUD = "AUD"
|
|
1012
|
+
}
|
|
1013
|
+
|
|
1014
|
+
/**
|
|
1015
|
+
* Type that allows a field to be either a URL string or a File object
|
|
1016
|
+
*/
|
|
1017
|
+
type MediaResource = string | File | Blob;
|
|
1018
|
+
|
|
1019
|
+
/**
|
|
1020
|
+
* Aggregated summary information for a procedure.
|
|
1021
|
+
* Used in arrays within Clinic and Practitioner documents for quick display.
|
|
1022
|
+
*/
|
|
1023
|
+
interface ProcedureSummaryInfo {
|
|
1024
|
+
id: string;
|
|
1025
|
+
name: string;
|
|
1026
|
+
description?: string;
|
|
1027
|
+
photo?: string;
|
|
1028
|
+
family: ProcedureFamily;
|
|
1029
|
+
categoryName: string;
|
|
1030
|
+
subcategoryName: string;
|
|
1031
|
+
technologyName: string;
|
|
1032
|
+
brandName?: string;
|
|
1033
|
+
productName?: string;
|
|
1034
|
+
price: number;
|
|
1035
|
+
pricingMeasure: PricingMeasure;
|
|
1036
|
+
currency: Currency;
|
|
1037
|
+
duration: number;
|
|
1038
|
+
clinicId: string;
|
|
1039
|
+
clinicName: string;
|
|
1040
|
+
practitionerId: string;
|
|
1041
|
+
practitionerName: string;
|
|
1042
|
+
}
|
|
1043
|
+
|
|
1044
|
+
/**
|
|
1045
|
+
* Interface for clinic contact information
|
|
1046
|
+
*/
|
|
1047
|
+
interface ClinicContactInfo {
|
|
1048
|
+
email: string;
|
|
1049
|
+
phoneNumber: string;
|
|
1050
|
+
alternativePhoneNumber?: string | null;
|
|
1051
|
+
website?: string | null;
|
|
1052
|
+
}
|
|
1053
|
+
/**
|
|
1054
|
+
* Interface for clinic location
|
|
1055
|
+
*/
|
|
1056
|
+
interface ClinicLocation {
|
|
1057
|
+
address: string;
|
|
1058
|
+
city: string;
|
|
1059
|
+
country: string;
|
|
1060
|
+
postalCode: string;
|
|
1061
|
+
latitude: number;
|
|
1062
|
+
longitude: number;
|
|
1063
|
+
geohash?: string | null;
|
|
1064
|
+
}
|
|
1065
|
+
|
|
1066
|
+
/**
|
|
1067
|
+
* Interface for clinic profile information
|
|
1068
|
+
*/
|
|
1069
|
+
interface ClinicInfo {
|
|
1070
|
+
id: string;
|
|
1071
|
+
featuredPhoto: string;
|
|
1072
|
+
name: string;
|
|
1073
|
+
description?: string | null;
|
|
1074
|
+
location: ClinicLocation;
|
|
1075
|
+
contactInfo: ClinicContactInfo;
|
|
1076
|
+
}
|
|
1077
|
+
|
|
1078
|
+
/**
|
|
1079
|
+
* Osnovne informacije o zdravstvenom radniku
|
|
1080
|
+
*/
|
|
1081
|
+
interface PractitionerBasicInfo {
|
|
1082
|
+
firstName: string;
|
|
1083
|
+
lastName: string;
|
|
1084
|
+
title: string;
|
|
1085
|
+
email: string;
|
|
1086
|
+
phoneNumber: string | null;
|
|
1087
|
+
dateOfBirth: Timestamp | Date | null;
|
|
1088
|
+
gender: "male" | "female" | "other";
|
|
1089
|
+
profileImageUrl?: MediaResource | null;
|
|
1090
|
+
bio?: string;
|
|
1091
|
+
languages: string[];
|
|
1092
|
+
}
|
|
1093
|
+
/**
|
|
1094
|
+
* Sertifikacija zdravstvenog radnika
|
|
1095
|
+
*/
|
|
1096
|
+
interface PractitionerCertification {
|
|
1097
|
+
level: CertificationLevel;
|
|
1098
|
+
specialties: CertificationSpecialty[];
|
|
1099
|
+
licenseNumber: string;
|
|
1100
|
+
issuingAuthority: string;
|
|
1101
|
+
issueDate: Timestamp | Date;
|
|
1102
|
+
expiryDate?: Timestamp | Date | null;
|
|
1103
|
+
verificationStatus: "pending" | "verified" | "rejected";
|
|
1104
|
+
}
|
|
1105
|
+
/**
|
|
1106
|
+
* Interfejs za radno vreme zdravstvenog radnika u klinici
|
|
1107
|
+
*/
|
|
1108
|
+
interface PractitionerClinicWorkingHours {
|
|
1109
|
+
clinicId: string;
|
|
1110
|
+
workingHours: {
|
|
1111
|
+
monday: {
|
|
1112
|
+
start: string;
|
|
1113
|
+
end: string;
|
|
1114
|
+
} | null;
|
|
1115
|
+
tuesday: {
|
|
1116
|
+
start: string;
|
|
1117
|
+
end: string;
|
|
1118
|
+
} | null;
|
|
1119
|
+
wednesday: {
|
|
1120
|
+
start: string;
|
|
1121
|
+
end: string;
|
|
1122
|
+
} | null;
|
|
1123
|
+
thursday: {
|
|
1124
|
+
start: string;
|
|
1125
|
+
end: string;
|
|
1126
|
+
} | null;
|
|
1127
|
+
friday: {
|
|
1128
|
+
start: string;
|
|
1129
|
+
end: string;
|
|
1130
|
+
} | null;
|
|
1131
|
+
saturday: {
|
|
1132
|
+
start: string;
|
|
1133
|
+
end: string;
|
|
1134
|
+
} | null;
|
|
1135
|
+
sunday: {
|
|
1136
|
+
start: string;
|
|
1137
|
+
end: string;
|
|
1138
|
+
} | null;
|
|
1139
|
+
};
|
|
1140
|
+
isActive: boolean;
|
|
1141
|
+
createdAt: Timestamp | Date;
|
|
1142
|
+
updatedAt: Timestamp | Date;
|
|
1143
|
+
}
|
|
1144
|
+
/**
|
|
1145
|
+
* Status of practitioner profile
|
|
1146
|
+
*/
|
|
1147
|
+
declare enum PractitionerStatus {
|
|
1148
|
+
DRAFT = "draft",
|
|
1149
|
+
ACTIVE = "active"
|
|
1150
|
+
}
|
|
1151
|
+
/**
|
|
1152
|
+
* Interfejs za zdravstvenog radnika
|
|
1153
|
+
*/
|
|
1154
|
+
interface Practitioner {
|
|
1155
|
+
id: string;
|
|
1156
|
+
userRef: string;
|
|
1157
|
+
basicInfo: PractitionerBasicInfo;
|
|
1158
|
+
certification: PractitionerCertification;
|
|
1159
|
+
clinics: string[];
|
|
1160
|
+
clinicWorkingHours: PractitionerClinicWorkingHours[];
|
|
1161
|
+
clinicsInfo: ClinicInfo[];
|
|
1162
|
+
procedures: string[];
|
|
1163
|
+
freeConsultations?: Record<string, string> | null;
|
|
1164
|
+
proceduresInfo: ProcedureSummaryInfo[];
|
|
1165
|
+
reviewInfo: PractitionerReviewInfo;
|
|
1166
|
+
isActive: boolean;
|
|
1167
|
+
isVerified: boolean;
|
|
1168
|
+
status: PractitionerStatus;
|
|
1169
|
+
createdAt: Timestamp;
|
|
1170
|
+
updatedAt: Timestamp;
|
|
1171
|
+
}
|
|
1172
|
+
|
|
1173
|
+
/**
|
|
1174
|
+
* Servis za upravljanje tehnologijama i njihovim zahtevima.
|
|
1175
|
+
* Tehnologije su sada top-level kolekcija koja referencira svoju putanju u hijerarhiji
|
|
1176
|
+
* kroz family, categoryId i subcategoryId.
|
|
1177
|
+
*
|
|
1178
|
+
* @example
|
|
1179
|
+
* const technologyService = new TechnologyService();
|
|
1180
|
+
*
|
|
1181
|
+
* // Kreiranje nove tehnologije
|
|
1182
|
+
* const technology = await technologyService.create({
|
|
1183
|
+
* name: "Botulinum Toxin",
|
|
1184
|
+
* description: "Neurotoxin injections for wrinkle reduction",
|
|
1185
|
+
* family: ProcedureFamily.AESTHETICS,
|
|
1186
|
+
* categoryId: "category123",
|
|
1187
|
+
* subcategoryId: "subcategory456"
|
|
1188
|
+
* });
|
|
1189
|
+
*
|
|
1190
|
+
* // Dodavanje zahteva
|
|
1191
|
+
* await technologyService.addRequirement(technology.id, {
|
|
1192
|
+
* type: "pre",
|
|
1193
|
+
* name: "Stay Hydrated",
|
|
1194
|
+
* description: "Drink plenty of water"
|
|
1195
|
+
* });
|
|
1196
|
+
*/
|
|
1197
|
+
declare class TechnologyService extends BaseService {
|
|
1198
|
+
/**
|
|
1199
|
+
* Vraća referencu na Firestore kolekciju tehnologija
|
|
1200
|
+
*/
|
|
1201
|
+
private getTechnologiesRef;
|
|
1202
|
+
/**
|
|
1203
|
+
* Kreira novu tehnologiju
|
|
1204
|
+
* @param technology - Podaci za novu tehnologiju
|
|
1205
|
+
* @returns Kreirana tehnologija sa generisanim ID-em
|
|
1206
|
+
*/
|
|
1207
|
+
create(technology: Omit<Technology, "id" | "createdAt" | "updatedAt">): Promise<{
|
|
1208
|
+
createdAt: Date;
|
|
1209
|
+
updatedAt: Date;
|
|
1210
|
+
name: string;
|
|
1211
|
+
isActive: boolean;
|
|
1212
|
+
description: string;
|
|
1213
|
+
family: ProcedureFamily;
|
|
1214
|
+
technicalDetails?: string | undefined;
|
|
1215
|
+
contraindications: Contraindication[];
|
|
1216
|
+
blockingConditions: BlockingCondition[];
|
|
1217
|
+
categoryId: string;
|
|
1218
|
+
subcategoryId: string;
|
|
1219
|
+
requirements: {
|
|
1220
|
+
pre: Requirement[];
|
|
1221
|
+
post: Requirement[];
|
|
1222
|
+
};
|
|
1223
|
+
benefits: TreatmentBenefit[];
|
|
1224
|
+
certificationRequirement: CertificationRequirement;
|
|
1225
|
+
documentationTemplates?: TechnologyDocumentationTemplate[] | undefined;
|
|
1226
|
+
id: string;
|
|
1227
|
+
}>;
|
|
1228
|
+
/**
|
|
1229
|
+
* Vraća sve aktivne tehnologije
|
|
1230
|
+
* @returns Lista aktivnih tehnologija
|
|
1231
|
+
*/
|
|
1232
|
+
getAll(): Promise<Technology[]>;
|
|
1233
|
+
/**
|
|
1234
|
+
* Vraća sve aktivne tehnologije za određenu familiju
|
|
1235
|
+
* @param family - Familija procedura
|
|
1236
|
+
* @returns Lista aktivnih tehnologija
|
|
1237
|
+
*/
|
|
1238
|
+
getAllByFamily(family: ProcedureFamily): Promise<Technology[]>;
|
|
1239
|
+
/**
|
|
1240
|
+
* Vraća sve aktivne tehnologije za određenu kategoriju
|
|
1241
|
+
* @param categoryId - ID kategorije
|
|
1242
|
+
* @returns Lista aktivnih tehnologija
|
|
1243
|
+
*/
|
|
1244
|
+
getAllByCategoryId(categoryId: string): Promise<Technology[]>;
|
|
1245
|
+
/**
|
|
1246
|
+
* Vraća sve aktivne tehnologije za određenu podkategoriju
|
|
1247
|
+
* @param subcategoryId - ID podkategorije
|
|
1248
|
+
* @returns Lista aktivnih tehnologija
|
|
1249
|
+
*/
|
|
1250
|
+
getAllBySubcategoryId(subcategoryId: string): Promise<Technology[]>;
|
|
1251
|
+
/**
|
|
1252
|
+
* Ažurira postojeću tehnologiju
|
|
1253
|
+
* @param technologyId - ID tehnologije
|
|
1254
|
+
* @param technology - Novi podaci za tehnologiju
|
|
1255
|
+
* @returns Ažurirana tehnologija
|
|
1256
|
+
*/
|
|
1257
|
+
update(technologyId: string, technology: Partial<Omit<Technology, "id" | "createdAt" | "family" | "categoryId" | "subcategoryId">>): Promise<Technology | null>;
|
|
1258
|
+
/**
|
|
1259
|
+
* Soft delete tehnologije (postavlja isActive na false)
|
|
1260
|
+
* @param technologyId - ID tehnologije koja se briše
|
|
1261
|
+
*/
|
|
1262
|
+
delete(technologyId: string): Promise<void>;
|
|
1263
|
+
/**
|
|
1264
|
+
* Vraća tehnologiju po ID-u
|
|
1265
|
+
* @param technologyId - ID tražene tehnologije
|
|
1266
|
+
* @returns Tehnologija ili null ako ne postoji
|
|
1267
|
+
*/
|
|
1268
|
+
getById(technologyId: string): Promise<Technology | null>;
|
|
1269
|
+
/**
|
|
1270
|
+
* Dodaje novi zahtev tehnologiji
|
|
1271
|
+
* @param technologyId - ID tehnologije
|
|
1272
|
+
* @param requirement - Zahtev koji se dodaje
|
|
1273
|
+
* @returns Ažurirana tehnologija sa novim zahtevom
|
|
1274
|
+
*/
|
|
1275
|
+
addRequirement(technologyId: string, requirement: Requirement): Promise<Technology | null>;
|
|
1276
|
+
/**
|
|
1277
|
+
* Uklanja zahtev iz tehnologije
|
|
1278
|
+
* @param technologyId - ID tehnologije
|
|
1279
|
+
* @param requirement - Zahtev koji se uklanja
|
|
1280
|
+
* @returns Ažurirana tehnologija bez uklonjenog zahteva
|
|
1281
|
+
*/
|
|
1282
|
+
removeRequirement(technologyId: string, requirement: Requirement): Promise<Technology | null>;
|
|
1283
|
+
/**
|
|
1284
|
+
* Vraća sve zahteve za tehnologiju
|
|
1285
|
+
* @param technologyId - ID tehnologije
|
|
1286
|
+
* @param type - Opcioni filter za tip zahteva (pre/post)
|
|
1287
|
+
* @returns Lista zahteva
|
|
1288
|
+
*/
|
|
1289
|
+
getRequirements(technologyId: string, type?: RequirementType): Promise<Requirement[]>;
|
|
1290
|
+
/**
|
|
1291
|
+
* Ažurira postojeći zahtev
|
|
1292
|
+
* @param technologyId - ID tehnologije
|
|
1293
|
+
* @param oldRequirement - Stari zahtev koji se menja
|
|
1294
|
+
* @param newRequirement - Novi zahtev koji zamenjuje stari
|
|
1295
|
+
* @returns Ažurirana tehnologija
|
|
1296
|
+
*/
|
|
1297
|
+
updateRequirement(technologyId: string, oldRequirement: Requirement, newRequirement: Requirement): Promise<Technology | null>;
|
|
1298
|
+
/**
|
|
1299
|
+
* Dodaje blokirajući uslov tehnologiji
|
|
1300
|
+
* @param technologyId - ID tehnologije
|
|
1301
|
+
* @param condition - Blokirajući uslov koji se dodaje
|
|
1302
|
+
* @returns Ažurirana tehnologija
|
|
1303
|
+
*/
|
|
1304
|
+
addBlockingCondition(technologyId: string, condition: BlockingCondition): Promise<Technology | null>;
|
|
1305
|
+
/**
|
|
1306
|
+
* Uklanja blokirajući uslov iz tehnologije
|
|
1307
|
+
* @param technologyId - ID tehnologije
|
|
1308
|
+
* @param condition - Blokirajući uslov koji se uklanja
|
|
1309
|
+
* @returns Ažurirana tehnologija
|
|
1310
|
+
*/
|
|
1311
|
+
removeBlockingCondition(technologyId: string, condition: BlockingCondition): Promise<Technology | null>;
|
|
1312
|
+
/**
|
|
1313
|
+
* Dodaje kontraindikaciju tehnologiji
|
|
1314
|
+
* @param technologyId - ID tehnologije
|
|
1315
|
+
* @param contraindication - Kontraindikacija koja se dodaje
|
|
1316
|
+
* @returns Ažurirana tehnologija
|
|
1317
|
+
*/
|
|
1318
|
+
addContraindication(technologyId: string, contraindication: Contraindication): Promise<Technology | null>;
|
|
1319
|
+
/**
|
|
1320
|
+
* Uklanja kontraindikaciju iz tehnologije
|
|
1321
|
+
* @param technologyId - ID tehnologije
|
|
1322
|
+
* @param contraindication - Kontraindikacija koja se uklanja
|
|
1323
|
+
* @returns Ažurirana tehnologija
|
|
1324
|
+
*/
|
|
1325
|
+
removeContraindication(technologyId: string, contraindication: Contraindication): Promise<Technology | null>;
|
|
1326
|
+
/**
|
|
1327
|
+
* Dodaje benefit tehnologiji
|
|
1328
|
+
* @param technologyId - ID tehnologije
|
|
1329
|
+
* @param benefit - Benefit koji se dodaje
|
|
1330
|
+
* @returns Ažurirana tehnologija
|
|
1331
|
+
*/
|
|
1332
|
+
addBenefit(technologyId: string, benefit: TreatmentBenefit): Promise<Technology | null>;
|
|
1333
|
+
/**
|
|
1334
|
+
* Uklanja benefit iz tehnologije
|
|
1335
|
+
* @param technologyId - ID tehnologije
|
|
1336
|
+
* @param benefit - Benefit koji se uklanja
|
|
1337
|
+
* @returns Ažurirana tehnologija
|
|
1338
|
+
*/
|
|
1339
|
+
removeBenefit(technologyId: string, benefit: TreatmentBenefit): Promise<Technology | null>;
|
|
1340
|
+
/**
|
|
1341
|
+
* Vraća sve blokirajuće uslove za tehnologiju
|
|
1342
|
+
* @param technologyId - ID tehnologije
|
|
1343
|
+
* @returns Lista blokirajućih uslova
|
|
1344
|
+
*/
|
|
1345
|
+
getBlockingConditions(technologyId: string): Promise<BlockingCondition[]>;
|
|
1346
|
+
/**
|
|
1347
|
+
* Vraća sve kontraindikacije za tehnologiju
|
|
1348
|
+
* @param technologyId - ID tehnologije
|
|
1349
|
+
* @returns Lista kontraindikacija
|
|
1350
|
+
*/
|
|
1351
|
+
getContraindications(technologyId: string): Promise<Contraindication[]>;
|
|
1352
|
+
/**
|
|
1353
|
+
* Vraća sve benefite za tehnologiju
|
|
1354
|
+
* @param technologyId - ID tehnologije
|
|
1355
|
+
* @returns Lista benefita
|
|
1356
|
+
*/
|
|
1357
|
+
getBenefits(technologyId: string): Promise<TreatmentBenefit[]>;
|
|
1358
|
+
/**
|
|
1359
|
+
* Ažurira zahteve sertifikacije za tehnologiju
|
|
1360
|
+
* @param technologyId - ID tehnologije
|
|
1361
|
+
* @param certificationRequirement - Novi zahtevi sertifikacije
|
|
1362
|
+
* @returns Ažurirana tehnologija
|
|
1363
|
+
*/
|
|
1364
|
+
updateCertificationRequirement(technologyId: string, certificationRequirement: CertificationRequirement): Promise<Technology | null>;
|
|
1365
|
+
/**
|
|
1366
|
+
* Vraća zahteve sertifikacije za tehnologiju
|
|
1367
|
+
* @param technologyId - ID tehnologije
|
|
1368
|
+
* @returns Zahtevi sertifikacije ili null ako tehnologija ne postoji
|
|
1369
|
+
*/
|
|
1370
|
+
getCertificationRequirement(technologyId: string): Promise<CertificationRequirement | null>;
|
|
1371
|
+
/**
|
|
1372
|
+
* Proverava da li doktor ima odgovarajuću sertifikaciju za izvođenje tehnologije
|
|
1373
|
+
*
|
|
1374
|
+
* @param requiredCertification - Zahtevana sertifikacija za tehnologiju
|
|
1375
|
+
* @param practitionerCertification - Sertifikacija zdravstvenog radnika
|
|
1376
|
+
* @returns true ako zdravstveni radnik ima odgovarajuću sertifikaciju, false ako nema
|
|
1377
|
+
*
|
|
1378
|
+
* @example
|
|
1379
|
+
* const isValid = technologyService.validateCertification(
|
|
1380
|
+
* {
|
|
1381
|
+
* minimumLevel: CertificationLevel.DOCTOR,
|
|
1382
|
+
* requiredSpecialties: [CertificationSpecialty.INJECTABLES]
|
|
1383
|
+
* },
|
|
1384
|
+
* {
|
|
1385
|
+
* level: CertificationLevel.SPECIALIST,
|
|
1386
|
+
* specialties: [CertificationSpecialty.INJECTABLES, CertificationSpecialty.LASER]
|
|
1387
|
+
* }
|
|
1388
|
+
* );
|
|
1389
|
+
*/
|
|
1390
|
+
validateCertification(requiredCertification: CertificationRequirement, practitionerCertification: PractitionerCertification): boolean;
|
|
1391
|
+
/**
|
|
1392
|
+
* Vraća sve tehnologije koje je zdravstveni radnik sertifikovan da izvodi
|
|
1393
|
+
* zajedno sa listama dozvoljenih familija, kategorija i podkategorija
|
|
1394
|
+
*
|
|
1395
|
+
* @param practitioner - Profil zdravstvenog radnika
|
|
1396
|
+
* @returns Objekat koji sadrži:
|
|
1397
|
+
* - technologies: Lista tehnologija koje zdravstveni radnik može da izvodi
|
|
1398
|
+
* - families: Lista familija procedura koje zdravstveni radnik može da izvodi
|
|
1399
|
+
* - categories: Lista ID-eva kategorija koje zdravstveni radnik može da izvodi
|
|
1400
|
+
* - subcategories: Lista ID-eva podkategorija koje zdravstveni radnik može da izvodi
|
|
1401
|
+
*
|
|
1402
|
+
* @example
|
|
1403
|
+
* const practitioner = {
|
|
1404
|
+
* certification: {
|
|
1405
|
+
* level: CertificationLevel.DOCTOR,
|
|
1406
|
+
* specialties: [CertificationSpecialty.INJECTABLES]
|
|
1407
|
+
* }
|
|
1408
|
+
* };
|
|
1409
|
+
* const allowedTechnologies = await technologyService.getAllowedTechnologies(practitioner);
|
|
1410
|
+
* console.log(allowedTechnologies.families); // [ProcedureFamily.AESTHETICS]
|
|
1411
|
+
* console.log(allowedTechnologies.categories); // ["category1", "category2"]
|
|
1412
|
+
* console.log(allowedTechnologies.subcategories); // ["subcategory1", "subcategory2"]
|
|
1413
|
+
*/
|
|
1414
|
+
getAllowedTechnologies(practitioner: Practitioner): Promise<{
|
|
1415
|
+
technologies: Technology[];
|
|
1416
|
+
families: ProcedureFamily[];
|
|
1417
|
+
categories: string[];
|
|
1418
|
+
subcategories: string[];
|
|
1419
|
+
}>;
|
|
1420
|
+
}
|
|
1421
|
+
|
|
1422
|
+
declare const documentElementSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z.objectUtil.extendShape<{
|
|
1423
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1424
|
+
type: z.ZodNativeEnum<typeof DocumentElementType>;
|
|
1425
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
1426
|
+
}, {
|
|
1427
|
+
type: z.ZodLiteral<DocumentElementType.HEADING>;
|
|
1428
|
+
text: z.ZodString;
|
|
1429
|
+
level: z.ZodNativeEnum<typeof HeadingLevel>;
|
|
1430
|
+
}>, "strip", z.ZodTypeAny, {
|
|
1431
|
+
type: DocumentElementType.HEADING;
|
|
1432
|
+
text: string;
|
|
1433
|
+
level: HeadingLevel;
|
|
1434
|
+
id?: string | undefined;
|
|
1435
|
+
required?: boolean | undefined;
|
|
1436
|
+
}, {
|
|
1437
|
+
type: DocumentElementType.HEADING;
|
|
1438
|
+
text: string;
|
|
1439
|
+
level: HeadingLevel;
|
|
1440
|
+
id?: string | undefined;
|
|
729
1441
|
required?: boolean | undefined;
|
|
730
1442
|
}>, z.ZodObject<z.objectUtil.extendShape<{
|
|
731
1443
|
id: z.ZodOptional<z.ZodString>;
|
|
@@ -1894,6 +2606,7 @@ declare const updateDocumentTemplateSchema: z.ZodObject<{
|
|
|
1894
2606
|
}, "strip", z.ZodTypeAny, {
|
|
1895
2607
|
isActive?: boolean | undefined;
|
|
1896
2608
|
description?: string | undefined;
|
|
2609
|
+
tags?: string[] | undefined;
|
|
1897
2610
|
title?: string | undefined;
|
|
1898
2611
|
elements?: ({
|
|
1899
2612
|
type: DocumentElementType.HEADING;
|
|
@@ -1965,13 +2678,13 @@ declare const updateDocumentTemplateSchema: z.ZodObject<{
|
|
|
1965
2678
|
allowedFileTypes?: string[] | undefined;
|
|
1966
2679
|
maxFileSizeMB?: number | undefined;
|
|
1967
2680
|
})[] | undefined;
|
|
1968
|
-
tags?: string[] | undefined;
|
|
1969
2681
|
isUserForm?: boolean | undefined;
|
|
1970
2682
|
isRequired?: boolean | undefined;
|
|
1971
2683
|
sortingOrder?: number | undefined;
|
|
1972
2684
|
}, {
|
|
1973
2685
|
isActive?: boolean | undefined;
|
|
1974
2686
|
description?: string | undefined;
|
|
2687
|
+
tags?: string[] | undefined;
|
|
1975
2688
|
title?: string | undefined;
|
|
1976
2689
|
elements?: ({
|
|
1977
2690
|
type: DocumentElementType.HEADING;
|
|
@@ -2043,7 +2756,6 @@ declare const updateDocumentTemplateSchema: z.ZodObject<{
|
|
|
2043
2756
|
allowedFileTypes?: string[] | undefined;
|
|
2044
2757
|
maxFileSizeMB?: number | undefined;
|
|
2045
2758
|
})[] | undefined;
|
|
2046
|
-
tags?: string[] | undefined;
|
|
2047
2759
|
isUserForm?: boolean | undefined;
|
|
2048
2760
|
isRequired?: boolean | undefined;
|
|
2049
2761
|
sortingOrder?: number | undefined;
|
|
@@ -2560,12 +3272,12 @@ declare const timeframeSchema: z.ZodObject<{
|
|
|
2560
3272
|
unit: z.ZodNativeEnum<typeof TimeUnit>;
|
|
2561
3273
|
notifyAt: z.ZodArray<z.ZodNumber, "many">;
|
|
2562
3274
|
}, "strip", z.ZodTypeAny, {
|
|
2563
|
-
duration: number;
|
|
2564
3275
|
unit: TimeUnit;
|
|
3276
|
+
duration: number;
|
|
2565
3277
|
notifyAt: number[];
|
|
2566
3278
|
}, {
|
|
2567
|
-
duration: number;
|
|
2568
3279
|
unit: TimeUnit;
|
|
3280
|
+
duration: number;
|
|
2569
3281
|
notifyAt: number[];
|
|
2570
3282
|
}>;
|
|
2571
3283
|
/**
|
|
@@ -2580,12 +3292,12 @@ declare const requirementSchema: z.ZodObject<{
|
|
|
2580
3292
|
unit: z.ZodNativeEnum<typeof TimeUnit>;
|
|
2581
3293
|
notifyAt: z.ZodArray<z.ZodNumber, "many">;
|
|
2582
3294
|
}, "strip", z.ZodTypeAny, {
|
|
2583
|
-
duration: number;
|
|
2584
3295
|
unit: TimeUnit;
|
|
3296
|
+
duration: number;
|
|
2585
3297
|
notifyAt: number[];
|
|
2586
3298
|
}, {
|
|
2587
|
-
duration: number;
|
|
2588
3299
|
unit: TimeUnit;
|
|
3300
|
+
duration: number;
|
|
2589
3301
|
notifyAt: number[];
|
|
2590
3302
|
}>;
|
|
2591
3303
|
importance: z.ZodEnum<["low", "medium", "high"]>;
|
|
@@ -2596,8 +3308,8 @@ declare const requirementSchema: z.ZodObject<{
|
|
|
2596
3308
|
description: string;
|
|
2597
3309
|
type: RequirementType;
|
|
2598
3310
|
timeframe: {
|
|
2599
|
-
duration: number;
|
|
2600
3311
|
unit: TimeUnit;
|
|
3312
|
+
duration: number;
|
|
2601
3313
|
notifyAt: number[];
|
|
2602
3314
|
};
|
|
2603
3315
|
importance: "low" | "medium" | "high";
|
|
@@ -2606,8 +3318,8 @@ declare const requirementSchema: z.ZodObject<{
|
|
|
2606
3318
|
description: string;
|
|
2607
3319
|
type: RequirementType;
|
|
2608
3320
|
timeframe: {
|
|
2609
|
-
duration: number;
|
|
2610
3321
|
unit: TimeUnit;
|
|
3322
|
+
duration: number;
|
|
2611
3323
|
notifyAt: number[];
|
|
2612
3324
|
};
|
|
2613
3325
|
importance: "low" | "medium" | "high";
|
|
@@ -2626,12 +3338,12 @@ declare const technologyRequirementsSchema: z.ZodObject<{
|
|
|
2626
3338
|
unit: z.ZodNativeEnum<typeof TimeUnit>;
|
|
2627
3339
|
notifyAt: z.ZodArray<z.ZodNumber, "many">;
|
|
2628
3340
|
}, "strip", z.ZodTypeAny, {
|
|
2629
|
-
duration: number;
|
|
2630
3341
|
unit: TimeUnit;
|
|
3342
|
+
duration: number;
|
|
2631
3343
|
notifyAt: number[];
|
|
2632
3344
|
}, {
|
|
2633
|
-
duration: number;
|
|
2634
3345
|
unit: TimeUnit;
|
|
3346
|
+
duration: number;
|
|
2635
3347
|
notifyAt: number[];
|
|
2636
3348
|
}>;
|
|
2637
3349
|
importance: z.ZodEnum<["low", "medium", "high"]>;
|
|
@@ -2642,8 +3354,8 @@ declare const technologyRequirementsSchema: z.ZodObject<{
|
|
|
2642
3354
|
description: string;
|
|
2643
3355
|
type: RequirementType;
|
|
2644
3356
|
timeframe: {
|
|
2645
|
-
duration: number;
|
|
2646
3357
|
unit: TimeUnit;
|
|
3358
|
+
duration: number;
|
|
2647
3359
|
notifyAt: number[];
|
|
2648
3360
|
};
|
|
2649
3361
|
importance: "low" | "medium" | "high";
|
|
@@ -2652,8 +3364,8 @@ declare const technologyRequirementsSchema: z.ZodObject<{
|
|
|
2652
3364
|
description: string;
|
|
2653
3365
|
type: RequirementType;
|
|
2654
3366
|
timeframe: {
|
|
2655
|
-
duration: number;
|
|
2656
3367
|
unit: TimeUnit;
|
|
3368
|
+
duration: number;
|
|
2657
3369
|
notifyAt: number[];
|
|
2658
3370
|
};
|
|
2659
3371
|
importance: "low" | "medium" | "high";
|
|
@@ -2668,12 +3380,12 @@ declare const technologyRequirementsSchema: z.ZodObject<{
|
|
|
2668
3380
|
unit: z.ZodNativeEnum<typeof TimeUnit>;
|
|
2669
3381
|
notifyAt: z.ZodArray<z.ZodNumber, "many">;
|
|
2670
3382
|
}, "strip", z.ZodTypeAny, {
|
|
2671
|
-
duration: number;
|
|
2672
3383
|
unit: TimeUnit;
|
|
3384
|
+
duration: number;
|
|
2673
3385
|
notifyAt: number[];
|
|
2674
3386
|
}, {
|
|
2675
|
-
duration: number;
|
|
2676
3387
|
unit: TimeUnit;
|
|
3388
|
+
duration: number;
|
|
2677
3389
|
notifyAt: number[];
|
|
2678
3390
|
}>;
|
|
2679
3391
|
importance: z.ZodEnum<["low", "medium", "high"]>;
|
|
@@ -2684,8 +3396,8 @@ declare const technologyRequirementsSchema: z.ZodObject<{
|
|
|
2684
3396
|
description: string;
|
|
2685
3397
|
type: RequirementType;
|
|
2686
3398
|
timeframe: {
|
|
2687
|
-
duration: number;
|
|
2688
3399
|
unit: TimeUnit;
|
|
3400
|
+
duration: number;
|
|
2689
3401
|
notifyAt: number[];
|
|
2690
3402
|
};
|
|
2691
3403
|
importance: "low" | "medium" | "high";
|
|
@@ -2694,8 +3406,8 @@ declare const technologyRequirementsSchema: z.ZodObject<{
|
|
|
2694
3406
|
description: string;
|
|
2695
3407
|
type: RequirementType;
|
|
2696
3408
|
timeframe: {
|
|
2697
|
-
duration: number;
|
|
2698
3409
|
unit: TimeUnit;
|
|
3410
|
+
duration: number;
|
|
2699
3411
|
notifyAt: number[];
|
|
2700
3412
|
};
|
|
2701
3413
|
importance: "low" | "medium" | "high";
|
|
@@ -2708,8 +3420,8 @@ declare const technologyRequirementsSchema: z.ZodObject<{
|
|
|
2708
3420
|
description: string;
|
|
2709
3421
|
type: RequirementType;
|
|
2710
3422
|
timeframe: {
|
|
2711
|
-
duration: number;
|
|
2712
3423
|
unit: TimeUnit;
|
|
3424
|
+
duration: number;
|
|
2713
3425
|
notifyAt: number[];
|
|
2714
3426
|
};
|
|
2715
3427
|
importance: "low" | "medium" | "high";
|
|
@@ -2720,8 +3432,8 @@ declare const technologyRequirementsSchema: z.ZodObject<{
|
|
|
2720
3432
|
description: string;
|
|
2721
3433
|
type: RequirementType;
|
|
2722
3434
|
timeframe: {
|
|
2723
|
-
duration: number;
|
|
2724
3435
|
unit: TimeUnit;
|
|
3436
|
+
duration: number;
|
|
2725
3437
|
notifyAt: number[];
|
|
2726
3438
|
};
|
|
2727
3439
|
importance: "low" | "medium" | "high";
|
|
@@ -2732,8 +3444,8 @@ declare const technologyRequirementsSchema: z.ZodObject<{
|
|
|
2732
3444
|
description: string;
|
|
2733
3445
|
type: RequirementType;
|
|
2734
3446
|
timeframe: {
|
|
2735
|
-
duration: number;
|
|
2736
3447
|
unit: TimeUnit;
|
|
3448
|
+
duration: number;
|
|
2737
3449
|
notifyAt: number[];
|
|
2738
3450
|
};
|
|
2739
3451
|
importance: "low" | "medium" | "high";
|
|
@@ -2744,8 +3456,8 @@ declare const technologyRequirementsSchema: z.ZodObject<{
|
|
|
2744
3456
|
description: string;
|
|
2745
3457
|
type: RequirementType;
|
|
2746
3458
|
timeframe: {
|
|
2747
|
-
duration: number;
|
|
2748
3459
|
unit: TimeUnit;
|
|
3460
|
+
duration: number;
|
|
2749
3461
|
notifyAt: number[];
|
|
2750
3462
|
};
|
|
2751
3463
|
importance: "low" | "medium" | "high";
|
|
@@ -2772,12 +3484,12 @@ declare const technologySchema: z.ZodObject<{
|
|
|
2772
3484
|
unit: z.ZodNativeEnum<typeof TimeUnit>;
|
|
2773
3485
|
notifyAt: z.ZodArray<z.ZodNumber, "many">;
|
|
2774
3486
|
}, "strip", z.ZodTypeAny, {
|
|
2775
|
-
duration: number;
|
|
2776
3487
|
unit: TimeUnit;
|
|
3488
|
+
duration: number;
|
|
2777
3489
|
notifyAt: number[];
|
|
2778
3490
|
}, {
|
|
2779
|
-
duration: number;
|
|
2780
3491
|
unit: TimeUnit;
|
|
3492
|
+
duration: number;
|
|
2781
3493
|
notifyAt: number[];
|
|
2782
3494
|
}>;
|
|
2783
3495
|
importance: z.ZodEnum<["low", "medium", "high"]>;
|
|
@@ -2788,8 +3500,8 @@ declare const technologySchema: z.ZodObject<{
|
|
|
2788
3500
|
description: string;
|
|
2789
3501
|
type: RequirementType;
|
|
2790
3502
|
timeframe: {
|
|
2791
|
-
duration: number;
|
|
2792
3503
|
unit: TimeUnit;
|
|
3504
|
+
duration: number;
|
|
2793
3505
|
notifyAt: number[];
|
|
2794
3506
|
};
|
|
2795
3507
|
importance: "low" | "medium" | "high";
|
|
@@ -2798,8 +3510,8 @@ declare const technologySchema: z.ZodObject<{
|
|
|
2798
3510
|
description: string;
|
|
2799
3511
|
type: RequirementType;
|
|
2800
3512
|
timeframe: {
|
|
2801
|
-
duration: number;
|
|
2802
3513
|
unit: TimeUnit;
|
|
3514
|
+
duration: number;
|
|
2803
3515
|
notifyAt: number[];
|
|
2804
3516
|
};
|
|
2805
3517
|
importance: "low" | "medium" | "high";
|
|
@@ -2814,12 +3526,12 @@ declare const technologySchema: z.ZodObject<{
|
|
|
2814
3526
|
unit: z.ZodNativeEnum<typeof TimeUnit>;
|
|
2815
3527
|
notifyAt: z.ZodArray<z.ZodNumber, "many">;
|
|
2816
3528
|
}, "strip", z.ZodTypeAny, {
|
|
2817
|
-
duration: number;
|
|
2818
3529
|
unit: TimeUnit;
|
|
3530
|
+
duration: number;
|
|
2819
3531
|
notifyAt: number[];
|
|
2820
3532
|
}, {
|
|
2821
|
-
duration: number;
|
|
2822
3533
|
unit: TimeUnit;
|
|
3534
|
+
duration: number;
|
|
2823
3535
|
notifyAt: number[];
|
|
2824
3536
|
}>;
|
|
2825
3537
|
importance: z.ZodEnum<["low", "medium", "high"]>;
|
|
@@ -2830,8 +3542,8 @@ declare const technologySchema: z.ZodObject<{
|
|
|
2830
3542
|
description: string;
|
|
2831
3543
|
type: RequirementType;
|
|
2832
3544
|
timeframe: {
|
|
2833
|
-
duration: number;
|
|
2834
3545
|
unit: TimeUnit;
|
|
3546
|
+
duration: number;
|
|
2835
3547
|
notifyAt: number[];
|
|
2836
3548
|
};
|
|
2837
3549
|
importance: "low" | "medium" | "high";
|
|
@@ -2840,8 +3552,8 @@ declare const technologySchema: z.ZodObject<{
|
|
|
2840
3552
|
description: string;
|
|
2841
3553
|
type: RequirementType;
|
|
2842
3554
|
timeframe: {
|
|
2843
|
-
duration: number;
|
|
2844
3555
|
unit: TimeUnit;
|
|
3556
|
+
duration: number;
|
|
2845
3557
|
notifyAt: number[];
|
|
2846
3558
|
};
|
|
2847
3559
|
importance: "low" | "medium" | "high";
|
|
@@ -2854,8 +3566,8 @@ declare const technologySchema: z.ZodObject<{
|
|
|
2854
3566
|
description: string;
|
|
2855
3567
|
type: RequirementType;
|
|
2856
3568
|
timeframe: {
|
|
2857
|
-
duration: number;
|
|
2858
3569
|
unit: TimeUnit;
|
|
3570
|
+
duration: number;
|
|
2859
3571
|
notifyAt: number[];
|
|
2860
3572
|
};
|
|
2861
3573
|
importance: "low" | "medium" | "high";
|
|
@@ -2866,8 +3578,8 @@ declare const technologySchema: z.ZodObject<{
|
|
|
2866
3578
|
description: string;
|
|
2867
3579
|
type: RequirementType;
|
|
2868
3580
|
timeframe: {
|
|
2869
|
-
duration: number;
|
|
2870
3581
|
unit: TimeUnit;
|
|
3582
|
+
duration: number;
|
|
2871
3583
|
notifyAt: number[];
|
|
2872
3584
|
};
|
|
2873
3585
|
importance: "low" | "medium" | "high";
|
|
@@ -2878,8 +3590,8 @@ declare const technologySchema: z.ZodObject<{
|
|
|
2878
3590
|
description: string;
|
|
2879
3591
|
type: RequirementType;
|
|
2880
3592
|
timeframe: {
|
|
2881
|
-
duration: number;
|
|
2882
3593
|
unit: TimeUnit;
|
|
3594
|
+
duration: number;
|
|
2883
3595
|
notifyAt: number[];
|
|
2884
3596
|
};
|
|
2885
3597
|
importance: "low" | "medium" | "high";
|
|
@@ -2890,8 +3602,8 @@ declare const technologySchema: z.ZodObject<{
|
|
|
2890
3602
|
description: string;
|
|
2891
3603
|
type: RequirementType;
|
|
2892
3604
|
timeframe: {
|
|
2893
|
-
duration: number;
|
|
2894
3605
|
unit: TimeUnit;
|
|
3606
|
+
duration: number;
|
|
2895
3607
|
notifyAt: number[];
|
|
2896
3608
|
};
|
|
2897
3609
|
importance: "low" | "medium" | "high";
|
|
@@ -3394,8 +4106,9 @@ declare const technologySchema: z.ZodObject<{
|
|
|
3394
4106
|
}, "strip", z.ZodTypeAny, {
|
|
3395
4107
|
name: string;
|
|
3396
4108
|
isActive: boolean;
|
|
3397
|
-
contraindications: Contraindication[];
|
|
3398
4109
|
family: ProcedureFamily;
|
|
4110
|
+
contraindications: Contraindication[];
|
|
4111
|
+
blockingConditions: BlockingCondition[];
|
|
3399
4112
|
categoryId: string;
|
|
3400
4113
|
subcategoryId: string;
|
|
3401
4114
|
requirements: {
|
|
@@ -3405,8 +4118,8 @@ declare const technologySchema: z.ZodObject<{
|
|
|
3405
4118
|
description: string;
|
|
3406
4119
|
type: RequirementType;
|
|
3407
4120
|
timeframe: {
|
|
3408
|
-
duration: number;
|
|
3409
4121
|
unit: TimeUnit;
|
|
4122
|
+
duration: number;
|
|
3410
4123
|
notifyAt: number[];
|
|
3411
4124
|
};
|
|
3412
4125
|
importance: "low" | "medium" | "high";
|
|
@@ -3417,14 +4130,18 @@ declare const technologySchema: z.ZodObject<{
|
|
|
3417
4130
|
description: string;
|
|
3418
4131
|
type: RequirementType;
|
|
3419
4132
|
timeframe: {
|
|
3420
|
-
duration: number;
|
|
3421
4133
|
unit: TimeUnit;
|
|
4134
|
+
duration: number;
|
|
3422
4135
|
notifyAt: number[];
|
|
3423
4136
|
};
|
|
3424
4137
|
importance: "low" | "medium" | "high";
|
|
3425
4138
|
}[];
|
|
3426
4139
|
};
|
|
3427
|
-
|
|
4140
|
+
benefits: TreatmentBenefit[];
|
|
4141
|
+
certificationRequirement: {
|
|
4142
|
+
minimumLevel: CertificationLevel;
|
|
4143
|
+
requiredSpecialties?: CertificationSpecialty[] | undefined;
|
|
4144
|
+
};
|
|
3428
4145
|
documentationTemplates: {
|
|
3429
4146
|
id: string;
|
|
3430
4147
|
createdAt: number;
|
|
@@ -3522,20 +4239,20 @@ declare const technologySchema: z.ZodObject<{
|
|
|
3522
4239
|
description?: string | undefined;
|
|
3523
4240
|
tags?: string[] | undefined;
|
|
3524
4241
|
}[];
|
|
3525
|
-
benefits: TreatmentBenefit[];
|
|
3526
|
-
certificationRequirement: {
|
|
3527
|
-
minimumLevel: CertificationLevel;
|
|
3528
|
-
requiredSpecialties?: CertificationSpecialty[] | undefined;
|
|
3529
|
-
};
|
|
3530
4242
|
description?: string | undefined;
|
|
3531
4243
|
technicalDetails?: string | undefined;
|
|
3532
4244
|
}, {
|
|
3533
4245
|
name: string;
|
|
3534
|
-
contraindications: Contraindication[];
|
|
3535
4246
|
family: ProcedureFamily;
|
|
4247
|
+
contraindications: Contraindication[];
|
|
4248
|
+
blockingConditions: BlockingCondition[];
|
|
3536
4249
|
categoryId: string;
|
|
3537
4250
|
subcategoryId: string;
|
|
3538
|
-
|
|
4251
|
+
benefits: TreatmentBenefit[];
|
|
4252
|
+
certificationRequirement: {
|
|
4253
|
+
minimumLevel: CertificationLevel;
|
|
4254
|
+
requiredSpecialties?: CertificationSpecialty[] | undefined;
|
|
4255
|
+
};
|
|
3539
4256
|
documentationTemplates: {
|
|
3540
4257
|
id: string;
|
|
3541
4258
|
createdAt: number;
|
|
@@ -3633,11 +4350,6 @@ declare const technologySchema: z.ZodObject<{
|
|
|
3633
4350
|
isRequired?: boolean | undefined;
|
|
3634
4351
|
sortingOrder?: number | undefined;
|
|
3635
4352
|
}[];
|
|
3636
|
-
benefits: TreatmentBenefit[];
|
|
3637
|
-
certificationRequirement: {
|
|
3638
|
-
minimumLevel: CertificationLevel;
|
|
3639
|
-
requiredSpecialties?: CertificationSpecialty[] | undefined;
|
|
3640
|
-
};
|
|
3641
4353
|
isActive?: boolean | undefined;
|
|
3642
4354
|
description?: string | undefined;
|
|
3643
4355
|
technicalDetails?: string | undefined;
|
|
@@ -3647,8 +4359,8 @@ declare const technologySchema: z.ZodObject<{
|
|
|
3647
4359
|
description: string;
|
|
3648
4360
|
type: RequirementType;
|
|
3649
4361
|
timeframe: {
|
|
3650
|
-
duration: number;
|
|
3651
4362
|
unit: TimeUnit;
|
|
4363
|
+
duration: number;
|
|
3652
4364
|
notifyAt: number[];
|
|
3653
4365
|
};
|
|
3654
4366
|
importance: "low" | "medium" | "high";
|
|
@@ -3659,8 +4371,8 @@ declare const technologySchema: z.ZodObject<{
|
|
|
3659
4371
|
description: string;
|
|
3660
4372
|
type: RequirementType;
|
|
3661
4373
|
timeframe: {
|
|
3662
|
-
duration: number;
|
|
3663
4374
|
unit: TimeUnit;
|
|
4375
|
+
duration: number;
|
|
3664
4376
|
notifyAt: number[];
|
|
3665
4377
|
};
|
|
3666
4378
|
importance: "low" | "medium" | "high";
|
|
@@ -3758,12 +4470,12 @@ declare const technologyUpdateSchema: z.ZodObject<{
|
|
|
3758
4470
|
unit: z.ZodNativeEnum<typeof TimeUnit>;
|
|
3759
4471
|
notifyAt: z.ZodArray<z.ZodNumber, "many">;
|
|
3760
4472
|
}, "strip", z.ZodTypeAny, {
|
|
3761
|
-
duration: number;
|
|
3762
4473
|
unit: TimeUnit;
|
|
4474
|
+
duration: number;
|
|
3763
4475
|
notifyAt: number[];
|
|
3764
4476
|
}, {
|
|
3765
|
-
duration: number;
|
|
3766
4477
|
unit: TimeUnit;
|
|
4478
|
+
duration: number;
|
|
3767
4479
|
notifyAt: number[];
|
|
3768
4480
|
}>;
|
|
3769
4481
|
importance: z.ZodEnum<["low", "medium", "high"]>;
|
|
@@ -3774,8 +4486,8 @@ declare const technologyUpdateSchema: z.ZodObject<{
|
|
|
3774
4486
|
description: string;
|
|
3775
4487
|
type: RequirementType;
|
|
3776
4488
|
timeframe: {
|
|
3777
|
-
duration: number;
|
|
3778
4489
|
unit: TimeUnit;
|
|
4490
|
+
duration: number;
|
|
3779
4491
|
notifyAt: number[];
|
|
3780
4492
|
};
|
|
3781
4493
|
importance: "low" | "medium" | "high";
|
|
@@ -3784,8 +4496,8 @@ declare const technologyUpdateSchema: z.ZodObject<{
|
|
|
3784
4496
|
description: string;
|
|
3785
4497
|
type: RequirementType;
|
|
3786
4498
|
timeframe: {
|
|
3787
|
-
duration: number;
|
|
3788
4499
|
unit: TimeUnit;
|
|
4500
|
+
duration: number;
|
|
3789
4501
|
notifyAt: number[];
|
|
3790
4502
|
};
|
|
3791
4503
|
importance: "low" | "medium" | "high";
|
|
@@ -3800,12 +4512,12 @@ declare const technologyUpdateSchema: z.ZodObject<{
|
|
|
3800
4512
|
unit: z.ZodNativeEnum<typeof TimeUnit>;
|
|
3801
4513
|
notifyAt: z.ZodArray<z.ZodNumber, "many">;
|
|
3802
4514
|
}, "strip", z.ZodTypeAny, {
|
|
3803
|
-
duration: number;
|
|
3804
4515
|
unit: TimeUnit;
|
|
4516
|
+
duration: number;
|
|
3805
4517
|
notifyAt: number[];
|
|
3806
4518
|
}, {
|
|
3807
|
-
duration: number;
|
|
3808
4519
|
unit: TimeUnit;
|
|
4520
|
+
duration: number;
|
|
3809
4521
|
notifyAt: number[];
|
|
3810
4522
|
}>;
|
|
3811
4523
|
importance: z.ZodEnum<["low", "medium", "high"]>;
|
|
@@ -3816,8 +4528,8 @@ declare const technologyUpdateSchema: z.ZodObject<{
|
|
|
3816
4528
|
description: string;
|
|
3817
4529
|
type: RequirementType;
|
|
3818
4530
|
timeframe: {
|
|
3819
|
-
duration: number;
|
|
3820
4531
|
unit: TimeUnit;
|
|
4532
|
+
duration: number;
|
|
3821
4533
|
notifyAt: number[];
|
|
3822
4534
|
};
|
|
3823
4535
|
importance: "low" | "medium" | "high";
|
|
@@ -3826,8 +4538,8 @@ declare const technologyUpdateSchema: z.ZodObject<{
|
|
|
3826
4538
|
description: string;
|
|
3827
4539
|
type: RequirementType;
|
|
3828
4540
|
timeframe: {
|
|
3829
|
-
duration: number;
|
|
3830
4541
|
unit: TimeUnit;
|
|
4542
|
+
duration: number;
|
|
3831
4543
|
notifyAt: number[];
|
|
3832
4544
|
};
|
|
3833
4545
|
importance: "low" | "medium" | "high";
|
|
@@ -3840,8 +4552,8 @@ declare const technologyUpdateSchema: z.ZodObject<{
|
|
|
3840
4552
|
description: string;
|
|
3841
4553
|
type: RequirementType;
|
|
3842
4554
|
timeframe: {
|
|
3843
|
-
duration: number;
|
|
3844
4555
|
unit: TimeUnit;
|
|
4556
|
+
duration: number;
|
|
3845
4557
|
notifyAt: number[];
|
|
3846
4558
|
};
|
|
3847
4559
|
importance: "low" | "medium" | "high";
|
|
@@ -3852,8 +4564,8 @@ declare const technologyUpdateSchema: z.ZodObject<{
|
|
|
3852
4564
|
description: string;
|
|
3853
4565
|
type: RequirementType;
|
|
3854
4566
|
timeframe: {
|
|
3855
|
-
duration: number;
|
|
3856
4567
|
unit: TimeUnit;
|
|
4568
|
+
duration: number;
|
|
3857
4569
|
notifyAt: number[];
|
|
3858
4570
|
};
|
|
3859
4571
|
importance: "low" | "medium" | "high";
|
|
@@ -3864,8 +4576,8 @@ declare const technologyUpdateSchema: z.ZodObject<{
|
|
|
3864
4576
|
description: string;
|
|
3865
4577
|
type: RequirementType;
|
|
3866
4578
|
timeframe: {
|
|
3867
|
-
duration: number;
|
|
3868
4579
|
unit: TimeUnit;
|
|
4580
|
+
duration: number;
|
|
3869
4581
|
notifyAt: number[];
|
|
3870
4582
|
};
|
|
3871
4583
|
importance: "low" | "medium" | "high";
|
|
@@ -3876,8 +4588,8 @@ declare const technologyUpdateSchema: z.ZodObject<{
|
|
|
3876
4588
|
description: string;
|
|
3877
4589
|
type: RequirementType;
|
|
3878
4590
|
timeframe: {
|
|
3879
|
-
duration: number;
|
|
3880
4591
|
unit: TimeUnit;
|
|
4592
|
+
duration: number;
|
|
3881
4593
|
notifyAt: number[];
|
|
3882
4594
|
};
|
|
3883
4595
|
importance: "low" | "medium" | "high";
|
|
@@ -4381,9 +5093,10 @@ declare const technologyUpdateSchema: z.ZodObject<{
|
|
|
4381
5093
|
name?: string | undefined;
|
|
4382
5094
|
isActive?: boolean | undefined;
|
|
4383
5095
|
description?: string | undefined;
|
|
5096
|
+
family?: ProcedureFamily | undefined;
|
|
4384
5097
|
technicalDetails?: string | undefined;
|
|
4385
5098
|
contraindications?: Contraindication[] | undefined;
|
|
4386
|
-
|
|
5099
|
+
blockingConditions?: BlockingCondition[] | undefined;
|
|
4387
5100
|
categoryId?: string | undefined;
|
|
4388
5101
|
subcategoryId?: string | undefined;
|
|
4389
5102
|
requirements?: {
|
|
@@ -4393,8 +5106,8 @@ declare const technologyUpdateSchema: z.ZodObject<{
|
|
|
4393
5106
|
description: string;
|
|
4394
5107
|
type: RequirementType;
|
|
4395
5108
|
timeframe: {
|
|
4396
|
-
duration: number;
|
|
4397
5109
|
unit: TimeUnit;
|
|
5110
|
+
duration: number;
|
|
4398
5111
|
notifyAt: number[];
|
|
4399
5112
|
};
|
|
4400
5113
|
importance: "low" | "medium" | "high";
|
|
@@ -4405,14 +5118,18 @@ declare const technologyUpdateSchema: z.ZodObject<{
|
|
|
4405
5118
|
description: string;
|
|
4406
5119
|
type: RequirementType;
|
|
4407
5120
|
timeframe: {
|
|
4408
|
-
duration: number;
|
|
4409
5121
|
unit: TimeUnit;
|
|
5122
|
+
duration: number;
|
|
4410
5123
|
notifyAt: number[];
|
|
4411
5124
|
};
|
|
4412
5125
|
importance: "low" | "medium" | "high";
|
|
4413
5126
|
}[];
|
|
4414
5127
|
} | undefined;
|
|
4415
|
-
|
|
5128
|
+
benefits?: TreatmentBenefit[] | undefined;
|
|
5129
|
+
certificationRequirement?: {
|
|
5130
|
+
minimumLevel: CertificationLevel;
|
|
5131
|
+
requiredSpecialties?: CertificationSpecialty[] | undefined;
|
|
5132
|
+
} | undefined;
|
|
4416
5133
|
documentationTemplates?: {
|
|
4417
5134
|
id: string;
|
|
4418
5135
|
createdAt: number;
|
|
@@ -4510,18 +5227,14 @@ declare const technologyUpdateSchema: z.ZodObject<{
|
|
|
4510
5227
|
description?: string | undefined;
|
|
4511
5228
|
tags?: string[] | undefined;
|
|
4512
5229
|
}[] | undefined;
|
|
4513
|
-
benefits?: TreatmentBenefit[] | undefined;
|
|
4514
|
-
certificationRequirement?: {
|
|
4515
|
-
minimumLevel: CertificationLevel;
|
|
4516
|
-
requiredSpecialties?: CertificationSpecialty[] | undefined;
|
|
4517
|
-
} | undefined;
|
|
4518
5230
|
}, {
|
|
4519
5231
|
name?: string | undefined;
|
|
4520
5232
|
isActive?: boolean | undefined;
|
|
4521
5233
|
description?: string | undefined;
|
|
5234
|
+
family?: ProcedureFamily | undefined;
|
|
4522
5235
|
technicalDetails?: string | undefined;
|
|
4523
5236
|
contraindications?: Contraindication[] | undefined;
|
|
4524
|
-
|
|
5237
|
+
blockingConditions?: BlockingCondition[] | undefined;
|
|
4525
5238
|
categoryId?: string | undefined;
|
|
4526
5239
|
subcategoryId?: string | undefined;
|
|
4527
5240
|
requirements?: {
|
|
@@ -4530,8 +5243,8 @@ declare const technologyUpdateSchema: z.ZodObject<{
|
|
|
4530
5243
|
description: string;
|
|
4531
5244
|
type: RequirementType;
|
|
4532
5245
|
timeframe: {
|
|
4533
|
-
duration: number;
|
|
4534
5246
|
unit: TimeUnit;
|
|
5247
|
+
duration: number;
|
|
4535
5248
|
notifyAt: number[];
|
|
4536
5249
|
};
|
|
4537
5250
|
importance: "low" | "medium" | "high";
|
|
@@ -4542,15 +5255,19 @@ declare const technologyUpdateSchema: z.ZodObject<{
|
|
|
4542
5255
|
description: string;
|
|
4543
5256
|
type: RequirementType;
|
|
4544
5257
|
timeframe: {
|
|
4545
|
-
duration: number;
|
|
4546
5258
|
unit: TimeUnit;
|
|
5259
|
+
duration: number;
|
|
4547
5260
|
notifyAt: number[];
|
|
4548
5261
|
};
|
|
4549
5262
|
importance: "low" | "medium" | "high";
|
|
4550
5263
|
isActive?: boolean | undefined;
|
|
4551
5264
|
}[];
|
|
4552
5265
|
} | undefined;
|
|
4553
|
-
|
|
5266
|
+
benefits?: TreatmentBenefit[] | undefined;
|
|
5267
|
+
certificationRequirement?: {
|
|
5268
|
+
minimumLevel: CertificationLevel;
|
|
5269
|
+
requiredSpecialties?: CertificationSpecialty[] | undefined;
|
|
5270
|
+
} | undefined;
|
|
4554
5271
|
documentationTemplates?: {
|
|
4555
5272
|
id: string;
|
|
4556
5273
|
createdAt: number;
|
|
@@ -4567,940 +5284,223 @@ declare const technologyUpdateSchema: z.ZodObject<{
|
|
|
4567
5284
|
type: DocumentElementType.PARAGRAPH;
|
|
4568
5285
|
text: string;
|
|
4569
5286
|
id?: string | undefined;
|
|
4570
|
-
required?: boolean | undefined;
|
|
4571
|
-
} | {
|
|
4572
|
-
type: DocumentElementType.LIST;
|
|
4573
|
-
items: string[];
|
|
4574
|
-
listType: ListType;
|
|
4575
|
-
id?: string | undefined;
|
|
4576
|
-
required?: boolean | undefined;
|
|
4577
|
-
} | {
|
|
4578
|
-
type: DocumentElementType.DYNAMIC_TEXT;
|
|
4579
|
-
text: string;
|
|
4580
|
-
id?: string | undefined;
|
|
4581
|
-
required?: boolean | undefined;
|
|
4582
|
-
} | {
|
|
4583
|
-
type: DocumentElementType.BINARY_CHOICE;
|
|
4584
|
-
question: string;
|
|
4585
|
-
id?: string | undefined;
|
|
4586
|
-
required?: boolean | undefined;
|
|
4587
|
-
defaultValue?: boolean | undefined;
|
|
4588
|
-
} | {
|
|
4589
|
-
type: DocumentElementType.MULTIPLE_CHOICE;
|
|
4590
|
-
question: string;
|
|
4591
|
-
options: string[];
|
|
4592
|
-
id?: string | undefined;
|
|
4593
|
-
required?: boolean | undefined;
|
|
4594
|
-
defaultValues?: string[] | undefined;
|
|
4595
|
-
} | {
|
|
4596
|
-
type: DocumentElementType.SINGLE_CHOICE;
|
|
4597
|
-
question: string;
|
|
4598
|
-
options: string[];
|
|
4599
|
-
id?: string | undefined;
|
|
4600
|
-
required?: boolean | undefined;
|
|
4601
|
-
defaultValue?: string | undefined;
|
|
4602
|
-
} | {
|
|
4603
|
-
type: DocumentElementType.RATING_SCALE;
|
|
4604
|
-
question: string;
|
|
4605
|
-
min: number;
|
|
4606
|
-
max: number;
|
|
4607
|
-
id?: string | undefined;
|
|
4608
|
-
required?: boolean | undefined;
|
|
4609
|
-
defaultValue?: number | undefined;
|
|
4610
|
-
labels?: Record<string, string> | undefined;
|
|
4611
|
-
} | {
|
|
4612
|
-
type: DocumentElementType.TEXT_INPUT;
|
|
4613
|
-
label: string;
|
|
4614
|
-
id?: string | undefined;
|
|
4615
|
-
required?: boolean | undefined;
|
|
4616
|
-
defaultValue?: string | undefined;
|
|
4617
|
-
placeholder?: string | undefined;
|
|
4618
|
-
multiline?: boolean | undefined;
|
|
5287
|
+
required?: boolean | undefined;
|
|
4619
5288
|
} | {
|
|
4620
|
-
type: DocumentElementType.
|
|
4621
|
-
|
|
5289
|
+
type: DocumentElementType.LIST;
|
|
5290
|
+
items: string[];
|
|
5291
|
+
listType: ListType;
|
|
4622
5292
|
id?: string | undefined;
|
|
4623
5293
|
required?: boolean | undefined;
|
|
4624
|
-
defaultValue?: string | undefined;
|
|
4625
5294
|
} | {
|
|
4626
|
-
type: DocumentElementType.
|
|
4627
|
-
|
|
5295
|
+
type: DocumentElementType.DYNAMIC_TEXT;
|
|
5296
|
+
text: string;
|
|
4628
5297
|
id?: string | undefined;
|
|
4629
5298
|
required?: boolean | undefined;
|
|
4630
5299
|
} | {
|
|
4631
|
-
type: DocumentElementType.
|
|
4632
|
-
|
|
5300
|
+
type: DocumentElementType.BINARY_CHOICE;
|
|
5301
|
+
question: string;
|
|
4633
5302
|
id?: string | undefined;
|
|
4634
5303
|
required?: boolean | undefined;
|
|
5304
|
+
defaultValue?: boolean | undefined;
|
|
4635
5305
|
} | {
|
|
4636
|
-
type: DocumentElementType.
|
|
4637
|
-
|
|
5306
|
+
type: DocumentElementType.MULTIPLE_CHOICE;
|
|
5307
|
+
question: string;
|
|
5308
|
+
options: string[];
|
|
4638
5309
|
id?: string | undefined;
|
|
4639
5310
|
required?: boolean | undefined;
|
|
4640
|
-
|
|
4641
|
-
|
|
4642
|
-
|
|
4643
|
-
|
|
4644
|
-
|
|
4645
|
-
|
|
4646
|
-
|
|
4647
|
-
|
|
4648
|
-
|
|
4649
|
-
|
|
4650
|
-
|
|
4651
|
-
|
|
4652
|
-
|
|
4653
|
-
|
|
4654
|
-
|
|
4655
|
-
|
|
4656
|
-
|
|
4657
|
-
|
|
4658
|
-
|
|
4659
|
-
|
|
4660
|
-
|
|
4661
|
-
|
|
4662
|
-
|
|
4663
|
-
|
|
4664
|
-
|
|
4665
|
-
|
|
4666
|
-
|
|
4667
|
-
|
|
4668
|
-
|
|
4669
|
-
|
|
4670
|
-
|
|
4671
|
-
|
|
4672
|
-
|
|
4673
|
-
|
|
4674
|
-
|
|
4675
|
-
|
|
4676
|
-
}
|
|
4677
|
-
|
|
4678
|
-
|
|
4679
|
-
|
|
4680
|
-
|
|
4681
|
-
|
|
4682
|
-
|
|
4683
|
-
|
|
4684
|
-
|
|
4685
|
-
|
|
4686
|
-
|
|
4687
|
-
|
|
4688
|
-
|
|
4689
|
-
|
|
4690
|
-
|
|
4691
|
-
|
|
4692
|
-
|
|
4693
|
-
|
|
4694
|
-
|
|
4695
|
-
|
|
4696
|
-
} | undefined;
|
|
4697
|
-
|
|
4698
|
-
|
|
4699
|
-
|
|
4700
|
-
|
|
4701
|
-
|
|
4702
|
-
|
|
4703
|
-
|
|
4704
|
-
|
|
4705
|
-
|
|
4706
|
-
|
|
4707
|
-
|
|
4708
|
-
|
|
4709
|
-
|
|
4710
|
-
|
|
4711
|
-
|
|
4712
|
-
|
|
4713
|
-
|
|
4714
|
-
|
|
4715
|
-
|
|
4716
|
-
|
|
4717
|
-
|
|
4718
|
-
|
|
4719
|
-
|
|
4720
|
-
|
|
4721
|
-
|
|
4722
|
-
|
|
4723
|
-
|
|
4724
|
-
|
|
4725
|
-
|
|
4726
|
-
|
|
4727
|
-
|
|
4728
|
-
|
|
4729
|
-
|
|
4730
|
-
|
|
4731
|
-
|
|
4732
|
-
|
|
4733
|
-
|
|
4734
|
-
|
|
4735
|
-
|
|
4736
|
-
|
|
4737
|
-
|
|
4738
|
-
|
|
4739
|
-
|
|
4740
|
-
name: string;
|
|
4741
|
-
isActive: boolean;
|
|
4742
|
-
description: string;
|
|
4743
|
-
family: ProcedureFamily;
|
|
4744
|
-
id: string;
|
|
4745
|
-
}>;
|
|
4746
|
-
/**
|
|
4747
|
-
* Vraća sve aktivne kategorije
|
|
4748
|
-
* @returns Lista aktivnih kategorija
|
|
4749
|
-
*/
|
|
4750
|
-
getAll(): Promise<Category[]>;
|
|
4751
|
-
/**
|
|
4752
|
-
* Vraća sve aktivne kategorije za određenu familiju procedura
|
|
4753
|
-
* @param family - Familija procedura (aesthetics/surgery)
|
|
4754
|
-
* @returns Lista kategorija koje pripadaju traženoj familiji
|
|
4755
|
-
*/
|
|
4756
|
-
getAllByFamily(family: ProcedureFamily): Promise<Category[]>;
|
|
4757
|
-
/**
|
|
4758
|
-
* Ažurira postojeću kategoriju
|
|
4759
|
-
* @param id - ID kategorije koja se ažurira
|
|
4760
|
-
* @param category - Novi podaci za kategoriju
|
|
4761
|
-
* @returns Ažurirana kategorija
|
|
4762
|
-
*/
|
|
4763
|
-
update(id: string, category: Partial<Omit<Category, "id" | "createdAt">>): Promise<Category | null>;
|
|
4764
|
-
/**
|
|
4765
|
-
* Soft delete kategorije (postavlja isActive na false)
|
|
4766
|
-
* @param id - ID kategorije koja se briše
|
|
4767
|
-
*/
|
|
4768
|
-
delete(id: string): Promise<void>;
|
|
4769
|
-
/**
|
|
4770
|
-
* Vraća kategoriju po ID-u
|
|
4771
|
-
* @param id - ID tražene kategorije
|
|
4772
|
-
* @returns Kategorija ili null ako ne postoji
|
|
4773
|
-
*/
|
|
4774
|
-
getById(id: string): Promise<Category | null>;
|
|
4775
|
-
}
|
|
4776
|
-
|
|
4777
|
-
/**
|
|
4778
|
-
* Servis za upravljanje podkategorijama procedura.
|
|
4779
|
-
* Podkategorije su drugi nivo organizacije i pripadaju određenoj kategoriji.
|
|
4780
|
-
*
|
|
4781
|
-
* @example
|
|
4782
|
-
* const subcategoryService = new SubcategoryService();
|
|
4783
|
-
*
|
|
4784
|
-
* // Kreiranje nove podkategorije
|
|
4785
|
-
* const subcategory = await subcategoryService.create(categoryId, {
|
|
4786
|
-
* name: "Anti-Wrinkle",
|
|
4787
|
-
* description: "Treatments targeting facial wrinkles"
|
|
4788
|
-
* });
|
|
4789
|
-
*/
|
|
4790
|
-
declare class SubcategoryService extends BaseService {
|
|
4791
|
-
/**
|
|
4792
|
-
* Vraća referencu na Firestore kolekciju podkategorija za određenu kategoriju
|
|
4793
|
-
* @param categoryId - ID roditeljske kategorije
|
|
4794
|
-
*/
|
|
4795
|
-
private getSubcategoriesRef;
|
|
4796
|
-
/**
|
|
4797
|
-
* Kreira novu podkategoriju u okviru kategorije
|
|
4798
|
-
* @param categoryId - ID kategorije kojoj će pripadati nova podkategorija
|
|
4799
|
-
* @param subcategory - Podaci za novu podkategoriju
|
|
4800
|
-
* @returns Kreirana podkategorija sa generisanim ID-em
|
|
4801
|
-
*/
|
|
4802
|
-
create(categoryId: string, subcategory: Omit<Subcategory, "id" | "createdAt" | "updatedAt">): Promise<{
|
|
4803
|
-
createdAt: Date;
|
|
4804
|
-
updatedAt: Date;
|
|
4805
|
-
name: string;
|
|
4806
|
-
isActive: boolean;
|
|
4807
|
-
description?: string | undefined;
|
|
4808
|
-
categoryId: string;
|
|
4809
|
-
id: string;
|
|
4810
|
-
}>;
|
|
4811
|
-
/**
|
|
4812
|
-
* Vraća sve aktivne podkategorije za određenu kategoriju
|
|
4813
|
-
* @param categoryId - ID kategorije čije podkategorije tražimo
|
|
4814
|
-
* @returns Lista aktivnih podkategorija
|
|
4815
|
-
*/
|
|
4816
|
-
getAllByCategoryId(categoryId: string): Promise<Subcategory[]>;
|
|
4817
|
-
/**
|
|
4818
|
-
* Ažurira postojeću podkategoriju
|
|
4819
|
-
* @param categoryId - ID kategorije kojoj pripada podkategorija
|
|
4820
|
-
* @param subcategoryId - ID podkategorije koja se ažurira
|
|
4821
|
-
* @param subcategory - Novi podaci za podkategoriju
|
|
4822
|
-
* @returns Ažurirana podkategorija
|
|
4823
|
-
*/
|
|
4824
|
-
update(categoryId: string, subcategoryId: string, subcategory: Partial<Omit<Subcategory, "id" | "createdAt" | "categoryId">>): Promise<Subcategory | null>;
|
|
4825
|
-
/**
|
|
4826
|
-
* Soft delete podkategorije (postavlja isActive na false)
|
|
4827
|
-
* @param categoryId - ID kategorije kojoj pripada podkategorija
|
|
4828
|
-
* @param subcategoryId - ID podkategorije koja se briše
|
|
4829
|
-
*/
|
|
4830
|
-
delete(categoryId: string, subcategoryId: string): Promise<void>;
|
|
4831
|
-
/**
|
|
4832
|
-
* Vraća podkategoriju po ID-u
|
|
4833
|
-
* @param categoryId - ID kategorije kojoj pripada podkategorija
|
|
4834
|
-
* @param subcategoryId - ID tražene podkategorije
|
|
4835
|
-
* @returns Podkategorija ili null ako ne postoji
|
|
4836
|
-
*/
|
|
4837
|
-
getById(categoryId: string, subcategoryId: string): Promise<Subcategory | null>;
|
|
4838
|
-
}
|
|
4839
|
-
|
|
4840
|
-
/**
|
|
4841
|
-
* Condensed practitioner review information
|
|
4842
|
-
* @description Used for aggregated data attached to practitioner documents
|
|
4843
|
-
*/
|
|
4844
|
-
interface PractitionerReviewInfo {
|
|
4845
|
-
totalReviews: number;
|
|
4846
|
-
averageRating: number;
|
|
4847
|
-
knowledgeAndExpertise: number;
|
|
4848
|
-
communicationSkills: number;
|
|
4849
|
-
bedSideManner: number;
|
|
4850
|
-
thoroughness: number;
|
|
4851
|
-
trustworthiness: number;
|
|
4852
|
-
recommendationPercentage: number;
|
|
4853
|
-
}
|
|
4854
|
-
|
|
4855
|
-
declare enum PricingMeasure {
|
|
4856
|
-
PER_ML = "per_ml",
|
|
4857
|
-
PER_ZONE = "per_zone",
|
|
4858
|
-
PER_AREA = "per_area",
|
|
4859
|
-
PER_SESSION = "per_session",
|
|
4860
|
-
PER_TREATMENT = "per_treatment",
|
|
4861
|
-
PER_PACKAGE = "per_package"
|
|
4862
|
-
}
|
|
4863
|
-
declare enum Currency {
|
|
4864
|
-
EUR = "EUR",
|
|
4865
|
-
USD = "USD",
|
|
4866
|
-
GBP = "GBP",
|
|
4867
|
-
CHF = "CHF",
|
|
4868
|
-
AUD = "AUD"
|
|
4869
|
-
}
|
|
4870
|
-
|
|
4871
|
-
/**
|
|
4872
|
-
* Type that allows a field to be either a URL string or a File object
|
|
4873
|
-
*/
|
|
4874
|
-
type MediaResource = string | File | Blob;
|
|
5311
|
+
defaultValues?: string[] | undefined;
|
|
5312
|
+
} | {
|
|
5313
|
+
type: DocumentElementType.SINGLE_CHOICE;
|
|
5314
|
+
question: string;
|
|
5315
|
+
options: string[];
|
|
5316
|
+
id?: string | undefined;
|
|
5317
|
+
required?: boolean | undefined;
|
|
5318
|
+
defaultValue?: string | undefined;
|
|
5319
|
+
} | {
|
|
5320
|
+
type: DocumentElementType.RATING_SCALE;
|
|
5321
|
+
question: string;
|
|
5322
|
+
min: number;
|
|
5323
|
+
max: number;
|
|
5324
|
+
id?: string | undefined;
|
|
5325
|
+
required?: boolean | undefined;
|
|
5326
|
+
defaultValue?: number | undefined;
|
|
5327
|
+
labels?: Record<string, string> | undefined;
|
|
5328
|
+
} | {
|
|
5329
|
+
type: DocumentElementType.TEXT_INPUT;
|
|
5330
|
+
label: string;
|
|
5331
|
+
id?: string | undefined;
|
|
5332
|
+
required?: boolean | undefined;
|
|
5333
|
+
defaultValue?: string | undefined;
|
|
5334
|
+
placeholder?: string | undefined;
|
|
5335
|
+
multiline?: boolean | undefined;
|
|
5336
|
+
} | {
|
|
5337
|
+
type: DocumentElementType.DATE_PICKER;
|
|
5338
|
+
label: string;
|
|
5339
|
+
id?: string | undefined;
|
|
5340
|
+
required?: boolean | undefined;
|
|
5341
|
+
defaultValue?: string | undefined;
|
|
5342
|
+
} | {
|
|
5343
|
+
type: DocumentElementType.SIGNATURE;
|
|
5344
|
+
label: string;
|
|
5345
|
+
id?: string | undefined;
|
|
5346
|
+
required?: boolean | undefined;
|
|
5347
|
+
} | {
|
|
5348
|
+
type: DocumentElementType.DITIGAL_SIGNATURE;
|
|
5349
|
+
label: string;
|
|
5350
|
+
id?: string | undefined;
|
|
5351
|
+
required?: boolean | undefined;
|
|
5352
|
+
} | {
|
|
5353
|
+
type: DocumentElementType.FILE_UPLOAD;
|
|
5354
|
+
label: string;
|
|
5355
|
+
id?: string | undefined;
|
|
5356
|
+
required?: boolean | undefined;
|
|
5357
|
+
allowedFileTypes?: string[] | undefined;
|
|
5358
|
+
maxFileSizeMB?: number | undefined;
|
|
5359
|
+
})[];
|
|
5360
|
+
createdBy: string;
|
|
5361
|
+
version: number;
|
|
5362
|
+
description?: string | undefined;
|
|
5363
|
+
tags?: string[] | undefined;
|
|
5364
|
+
isUserForm?: boolean | undefined;
|
|
5365
|
+
isRequired?: boolean | undefined;
|
|
5366
|
+
sortingOrder?: number | undefined;
|
|
5367
|
+
}[] | undefined;
|
|
5368
|
+
}>;
|
|
5369
|
+
declare const requirementUpdateSchema: z.ZodObject<{
|
|
5370
|
+
name: z.ZodOptional<z.ZodString>;
|
|
5371
|
+
description: z.ZodOptional<z.ZodString>;
|
|
5372
|
+
type: z.ZodOptional<z.ZodNativeEnum<typeof RequirementType>>;
|
|
5373
|
+
timeframe: z.ZodOptional<z.ZodObject<{
|
|
5374
|
+
duration: z.ZodNumber;
|
|
5375
|
+
unit: z.ZodNativeEnum<typeof TimeUnit>;
|
|
5376
|
+
notifyAt: z.ZodArray<z.ZodNumber, "many">;
|
|
5377
|
+
}, "strip", z.ZodTypeAny, {
|
|
5378
|
+
unit: TimeUnit;
|
|
5379
|
+
duration: number;
|
|
5380
|
+
notifyAt: number[];
|
|
5381
|
+
}, {
|
|
5382
|
+
unit: TimeUnit;
|
|
5383
|
+
duration: number;
|
|
5384
|
+
notifyAt: number[];
|
|
5385
|
+
}>>;
|
|
5386
|
+
importance: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>;
|
|
5387
|
+
isActive: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
5388
|
+
}, "strip", z.ZodTypeAny, {
|
|
5389
|
+
name?: string | undefined;
|
|
5390
|
+
isActive?: boolean | undefined;
|
|
5391
|
+
description?: string | undefined;
|
|
5392
|
+
type?: RequirementType | undefined;
|
|
5393
|
+
timeframe?: {
|
|
5394
|
+
unit: TimeUnit;
|
|
5395
|
+
duration: number;
|
|
5396
|
+
notifyAt: number[];
|
|
5397
|
+
} | undefined;
|
|
5398
|
+
importance?: "low" | "medium" | "high" | undefined;
|
|
5399
|
+
}, {
|
|
5400
|
+
name?: string | undefined;
|
|
5401
|
+
isActive?: boolean | undefined;
|
|
5402
|
+
description?: string | undefined;
|
|
5403
|
+
type?: RequirementType | undefined;
|
|
5404
|
+
timeframe?: {
|
|
5405
|
+
unit: TimeUnit;
|
|
5406
|
+
duration: number;
|
|
5407
|
+
notifyAt: number[];
|
|
5408
|
+
} | undefined;
|
|
5409
|
+
importance?: "low" | "medium" | "high" | undefined;
|
|
5410
|
+
}>;
|
|
4875
5411
|
|
|
4876
5412
|
/**
|
|
4877
|
-
*
|
|
4878
|
-
*
|
|
5413
|
+
* Default vrednosti za sertifikaciju
|
|
5414
|
+
* Svaka nova tehnologija će imati ove vrednosti ako se ne specificira drugačije
|
|
4879
5415
|
*/
|
|
4880
|
-
|
|
4881
|
-
id: string;
|
|
4882
|
-
name: string;
|
|
4883
|
-
description?: string;
|
|
4884
|
-
photo?: string;
|
|
4885
|
-
family: ProcedureFamily;
|
|
4886
|
-
categoryName: string;
|
|
4887
|
-
subcategoryName: string;
|
|
4888
|
-
technologyName: string;
|
|
4889
|
-
brandName?: string;
|
|
4890
|
-
productName?: string;
|
|
4891
|
-
price: number;
|
|
4892
|
-
pricingMeasure: PricingMeasure;
|
|
4893
|
-
currency: Currency;
|
|
4894
|
-
duration: number;
|
|
4895
|
-
clinicId: string;
|
|
4896
|
-
clinicName: string;
|
|
4897
|
-
practitionerId: string;
|
|
4898
|
-
practitionerName: string;
|
|
4899
|
-
}
|
|
5416
|
+
declare const DEFAULT_CERTIFICATION_REQUIREMENT: CertificationRequirement;
|
|
4900
5417
|
|
|
4901
5418
|
/**
|
|
4902
|
-
*
|
|
4903
|
-
*/
|
|
4904
|
-
interface ClinicContactInfo {
|
|
4905
|
-
email: string;
|
|
4906
|
-
phoneNumber: string;
|
|
4907
|
-
alternativePhoneNumber?: string | null;
|
|
4908
|
-
website?: string | null;
|
|
4909
|
-
}
|
|
4910
|
-
/**
|
|
4911
|
-
* Interface for clinic location
|
|
5419
|
+
* Bazna klasa za greške u backoffice sistemu
|
|
4912
5420
|
*/
|
|
4913
|
-
|
|
4914
|
-
|
|
4915
|
-
city: string;
|
|
4916
|
-
country: string;
|
|
4917
|
-
postalCode: string;
|
|
4918
|
-
latitude: number;
|
|
4919
|
-
longitude: number;
|
|
4920
|
-
geohash?: string | null;
|
|
5421
|
+
declare class BackofficeError extends Error {
|
|
5422
|
+
constructor(message: string);
|
|
4921
5423
|
}
|
|
4922
|
-
|
|
4923
5424
|
/**
|
|
4924
|
-
*
|
|
5425
|
+
* Errors related to Category operations
|
|
4925
5426
|
*/
|
|
4926
|
-
|
|
4927
|
-
|
|
4928
|
-
featuredPhoto: string;
|
|
4929
|
-
name: string;
|
|
4930
|
-
description?: string | null;
|
|
4931
|
-
location: ClinicLocation;
|
|
4932
|
-
contactInfo: ClinicContactInfo;
|
|
5427
|
+
declare class CategoryError extends BackofficeError {
|
|
5428
|
+
constructor(message: string);
|
|
4933
5429
|
}
|
|
4934
|
-
|
|
4935
|
-
|
|
4936
|
-
* Osnovne informacije o zdravstvenom radniku
|
|
4937
|
-
*/
|
|
4938
|
-
interface PractitionerBasicInfo {
|
|
4939
|
-
firstName: string;
|
|
4940
|
-
lastName: string;
|
|
4941
|
-
title: string;
|
|
4942
|
-
email: string;
|
|
4943
|
-
phoneNumber: string | null;
|
|
4944
|
-
dateOfBirth: Timestamp | Date | null;
|
|
4945
|
-
gender: "male" | "female" | "other";
|
|
4946
|
-
profileImageUrl?: MediaResource | null;
|
|
4947
|
-
bio?: string;
|
|
4948
|
-
languages: string[];
|
|
5430
|
+
declare class CategoryNotFoundError extends CategoryError {
|
|
5431
|
+
constructor(id: string);
|
|
4949
5432
|
}
|
|
4950
|
-
|
|
4951
|
-
|
|
4952
|
-
*/
|
|
4953
|
-
interface PractitionerCertification {
|
|
4954
|
-
level: CertificationLevel;
|
|
4955
|
-
specialties: CertificationSpecialty[];
|
|
4956
|
-
licenseNumber: string;
|
|
4957
|
-
issuingAuthority: string;
|
|
4958
|
-
issueDate: Timestamp | Date;
|
|
4959
|
-
expiryDate?: Timestamp | Date | null;
|
|
4960
|
-
verificationStatus: "pending" | "verified" | "rejected";
|
|
5433
|
+
declare class InvalidCategoryDataError extends CategoryError {
|
|
5434
|
+
constructor(message: string);
|
|
4961
5435
|
}
|
|
4962
5436
|
/**
|
|
4963
|
-
*
|
|
5437
|
+
* Errors related to Subcategory operations
|
|
4964
5438
|
*/
|
|
4965
|
-
|
|
4966
|
-
|
|
4967
|
-
workingHours: {
|
|
4968
|
-
monday: {
|
|
4969
|
-
start: string;
|
|
4970
|
-
end: string;
|
|
4971
|
-
} | null;
|
|
4972
|
-
tuesday: {
|
|
4973
|
-
start: string;
|
|
4974
|
-
end: string;
|
|
4975
|
-
} | null;
|
|
4976
|
-
wednesday: {
|
|
4977
|
-
start: string;
|
|
4978
|
-
end: string;
|
|
4979
|
-
} | null;
|
|
4980
|
-
thursday: {
|
|
4981
|
-
start: string;
|
|
4982
|
-
end: string;
|
|
4983
|
-
} | null;
|
|
4984
|
-
friday: {
|
|
4985
|
-
start: string;
|
|
4986
|
-
end: string;
|
|
4987
|
-
} | null;
|
|
4988
|
-
saturday: {
|
|
4989
|
-
start: string;
|
|
4990
|
-
end: string;
|
|
4991
|
-
} | null;
|
|
4992
|
-
sunday: {
|
|
4993
|
-
start: string;
|
|
4994
|
-
end: string;
|
|
4995
|
-
} | null;
|
|
4996
|
-
};
|
|
4997
|
-
isActive: boolean;
|
|
4998
|
-
createdAt: Timestamp | Date;
|
|
4999
|
-
updatedAt: Timestamp | Date;
|
|
5439
|
+
declare class SubcategoryError extends BackofficeError {
|
|
5440
|
+
constructor(message: string);
|
|
5000
5441
|
}
|
|
5001
|
-
|
|
5002
|
-
|
|
5003
|
-
*/
|
|
5004
|
-
declare enum PractitionerStatus {
|
|
5005
|
-
DRAFT = "draft",
|
|
5006
|
-
ACTIVE = "active"
|
|
5442
|
+
declare class SubcategoryNotFoundError extends SubcategoryError {
|
|
5443
|
+
constructor(id: string);
|
|
5007
5444
|
}
|
|
5008
|
-
|
|
5009
|
-
|
|
5010
|
-
*/
|
|
5011
|
-
interface Practitioner {
|
|
5012
|
-
id: string;
|
|
5013
|
-
userRef: string;
|
|
5014
|
-
basicInfo: PractitionerBasicInfo;
|
|
5015
|
-
certification: PractitionerCertification;
|
|
5016
|
-
clinics: string[];
|
|
5017
|
-
clinicWorkingHours: PractitionerClinicWorkingHours[];
|
|
5018
|
-
clinicsInfo: ClinicInfo[];
|
|
5019
|
-
procedures: string[];
|
|
5020
|
-
freeConsultations?: Record<string, string> | null;
|
|
5021
|
-
proceduresInfo: ProcedureSummaryInfo[];
|
|
5022
|
-
reviewInfo: PractitionerReviewInfo;
|
|
5023
|
-
isActive: boolean;
|
|
5024
|
-
isVerified: boolean;
|
|
5025
|
-
status: PractitionerStatus;
|
|
5026
|
-
createdAt: Timestamp;
|
|
5027
|
-
updatedAt: Timestamp;
|
|
5445
|
+
declare class InvalidSubcategoryDataError extends SubcategoryError {
|
|
5446
|
+
constructor(message: string);
|
|
5028
5447
|
}
|
|
5029
|
-
|
|
5030
5448
|
/**
|
|
5031
|
-
*
|
|
5032
|
-
* Tehnologije su sada top-level kolekcija koja referencira svoju putanju u hijerarhiji
|
|
5033
|
-
* kroz family, categoryId i subcategoryId.
|
|
5034
|
-
*
|
|
5035
|
-
* @example
|
|
5036
|
-
* const technologyService = new TechnologyService();
|
|
5037
|
-
*
|
|
5038
|
-
* // Kreiranje nove tehnologije
|
|
5039
|
-
* const technology = await technologyService.create({
|
|
5040
|
-
* name: "Botulinum Toxin",
|
|
5041
|
-
* description: "Neurotoxin injections for wrinkle reduction",
|
|
5042
|
-
* family: ProcedureFamily.AESTHETICS,
|
|
5043
|
-
* categoryId: "category123",
|
|
5044
|
-
* subcategoryId: "subcategory456"
|
|
5045
|
-
* });
|
|
5046
|
-
*
|
|
5047
|
-
* // Dodavanje zahteva
|
|
5048
|
-
* await technologyService.addRequirement(technology.id, {
|
|
5049
|
-
* type: "pre",
|
|
5050
|
-
* name: "Stay Hydrated",
|
|
5051
|
-
* description: "Drink plenty of water"
|
|
5052
|
-
* });
|
|
5449
|
+
* Errors related to Technology operations
|
|
5053
5450
|
*/
|
|
5054
|
-
declare class
|
|
5055
|
-
|
|
5056
|
-
|
|
5057
|
-
|
|
5058
|
-
|
|
5059
|
-
|
|
5060
|
-
|
|
5061
|
-
|
|
5062
|
-
* @returns Kreirana tehnologija sa generisanim ID-em
|
|
5063
|
-
*/
|
|
5064
|
-
create(technology: Omit<Technology, "id" | "createdAt" | "updatedAt">): Promise<{
|
|
5065
|
-
createdAt: Date;
|
|
5066
|
-
updatedAt: Date;
|
|
5067
|
-
name: string;
|
|
5068
|
-
isActive: boolean;
|
|
5069
|
-
description: string;
|
|
5070
|
-
technicalDetails?: string | undefined;
|
|
5071
|
-
contraindications: Contraindication[];
|
|
5072
|
-
family: ProcedureFamily;
|
|
5073
|
-
categoryId: string;
|
|
5074
|
-
subcategoryId: string;
|
|
5075
|
-
requirements: {
|
|
5076
|
-
pre: Requirement[];
|
|
5077
|
-
post: Requirement[];
|
|
5078
|
-
};
|
|
5079
|
-
blockingConditions: BlockingCondition[];
|
|
5080
|
-
documentationTemplates?: TechnologyDocumentationTemplate[] | undefined;
|
|
5081
|
-
benefits: TreatmentBenefit[];
|
|
5082
|
-
certificationRequirement: CertificationRequirement;
|
|
5083
|
-
id: string;
|
|
5084
|
-
}>;
|
|
5085
|
-
/**
|
|
5086
|
-
* Vraća sve aktivne tehnologije
|
|
5087
|
-
* @returns Lista aktivnih tehnologija
|
|
5088
|
-
*/
|
|
5089
|
-
getAll(): Promise<Technology[]>;
|
|
5090
|
-
/**
|
|
5091
|
-
* Vraća sve aktivne tehnologije za određenu familiju
|
|
5092
|
-
* @param family - Familija procedura
|
|
5093
|
-
* @returns Lista aktivnih tehnologija
|
|
5094
|
-
*/
|
|
5095
|
-
getAllByFamily(family: ProcedureFamily): Promise<Technology[]>;
|
|
5096
|
-
/**
|
|
5097
|
-
* Vraća sve aktivne tehnologije za određenu kategoriju
|
|
5098
|
-
* @param categoryId - ID kategorije
|
|
5099
|
-
* @returns Lista aktivnih tehnologija
|
|
5100
|
-
*/
|
|
5101
|
-
getAllByCategoryId(categoryId: string): Promise<Technology[]>;
|
|
5102
|
-
/**
|
|
5103
|
-
* Vraća sve aktivne tehnologije za određenu podkategoriju
|
|
5104
|
-
* @param subcategoryId - ID podkategorije
|
|
5105
|
-
* @returns Lista aktivnih tehnologija
|
|
5106
|
-
*/
|
|
5107
|
-
getAllBySubcategoryId(subcategoryId: string): Promise<Technology[]>;
|
|
5108
|
-
/**
|
|
5109
|
-
* Ažurira postojeću tehnologiju
|
|
5110
|
-
* @param technologyId - ID tehnologije
|
|
5111
|
-
* @param technology - Novi podaci za tehnologiju
|
|
5112
|
-
* @returns Ažurirana tehnologija
|
|
5113
|
-
*/
|
|
5114
|
-
update(technologyId: string, technology: Partial<Omit<Technology, "id" | "createdAt" | "family" | "categoryId" | "subcategoryId">>): Promise<Technology | null>;
|
|
5115
|
-
/**
|
|
5116
|
-
* Soft delete tehnologije (postavlja isActive na false)
|
|
5117
|
-
* @param technologyId - ID tehnologije koja se briše
|
|
5118
|
-
*/
|
|
5119
|
-
delete(technologyId: string): Promise<void>;
|
|
5120
|
-
/**
|
|
5121
|
-
* Vraća tehnologiju po ID-u
|
|
5122
|
-
* @param technologyId - ID tražene tehnologije
|
|
5123
|
-
* @returns Tehnologija ili null ako ne postoji
|
|
5124
|
-
*/
|
|
5125
|
-
getById(technologyId: string): Promise<Technology | null>;
|
|
5126
|
-
/**
|
|
5127
|
-
* Dodaje novi zahtev tehnologiji
|
|
5128
|
-
* @param technologyId - ID tehnologije
|
|
5129
|
-
* @param requirement - Zahtev koji se dodaje
|
|
5130
|
-
* @returns Ažurirana tehnologija sa novim zahtevom
|
|
5131
|
-
*/
|
|
5132
|
-
addRequirement(technologyId: string, requirement: Requirement): Promise<Technology | null>;
|
|
5133
|
-
/**
|
|
5134
|
-
* Uklanja zahtev iz tehnologije
|
|
5135
|
-
* @param technologyId - ID tehnologije
|
|
5136
|
-
* @param requirement - Zahtev koji se uklanja
|
|
5137
|
-
* @returns Ažurirana tehnologija bez uklonjenog zahteva
|
|
5138
|
-
*/
|
|
5139
|
-
removeRequirement(technologyId: string, requirement: Requirement): Promise<Technology | null>;
|
|
5140
|
-
/**
|
|
5141
|
-
* Vraća sve zahteve za tehnologiju
|
|
5142
|
-
* @param technologyId - ID tehnologije
|
|
5143
|
-
* @param type - Opcioni filter za tip zahteva (pre/post)
|
|
5144
|
-
* @returns Lista zahteva
|
|
5145
|
-
*/
|
|
5146
|
-
getRequirements(technologyId: string, type?: RequirementType): Promise<Requirement[]>;
|
|
5147
|
-
/**
|
|
5148
|
-
* Ažurira postojeći zahtev
|
|
5149
|
-
* @param technologyId - ID tehnologije
|
|
5150
|
-
* @param oldRequirement - Stari zahtev koji se menja
|
|
5151
|
-
* @param newRequirement - Novi zahtev koji zamenjuje stari
|
|
5152
|
-
* @returns Ažurirana tehnologija
|
|
5153
|
-
*/
|
|
5154
|
-
updateRequirement(technologyId: string, oldRequirement: Requirement, newRequirement: Requirement): Promise<Technology | null>;
|
|
5155
|
-
/**
|
|
5156
|
-
* Dodaje blokirajući uslov tehnologiji
|
|
5157
|
-
* @param technologyId - ID tehnologije
|
|
5158
|
-
* @param condition - Blokirajući uslov koji se dodaje
|
|
5159
|
-
* @returns Ažurirana tehnologija
|
|
5160
|
-
*/
|
|
5161
|
-
addBlockingCondition(technologyId: string, condition: BlockingCondition): Promise<Technology | null>;
|
|
5162
|
-
/**
|
|
5163
|
-
* Uklanja blokirajući uslov iz tehnologije
|
|
5164
|
-
* @param technologyId - ID tehnologije
|
|
5165
|
-
* @param condition - Blokirajući uslov koji se uklanja
|
|
5166
|
-
* @returns Ažurirana tehnologija
|
|
5167
|
-
*/
|
|
5168
|
-
removeBlockingCondition(technologyId: string, condition: BlockingCondition): Promise<Technology | null>;
|
|
5169
|
-
/**
|
|
5170
|
-
* Dodaje kontraindikaciju tehnologiji
|
|
5171
|
-
* @param technologyId - ID tehnologije
|
|
5172
|
-
* @param contraindication - Kontraindikacija koja se dodaje
|
|
5173
|
-
* @returns Ažurirana tehnologija
|
|
5174
|
-
*/
|
|
5175
|
-
addContraindication(technologyId: string, contraindication: Contraindication): Promise<Technology | null>;
|
|
5176
|
-
/**
|
|
5177
|
-
* Uklanja kontraindikaciju iz tehnologije
|
|
5178
|
-
* @param technologyId - ID tehnologije
|
|
5179
|
-
* @param contraindication - Kontraindikacija koja se uklanja
|
|
5180
|
-
* @returns Ažurirana tehnologija
|
|
5181
|
-
*/
|
|
5182
|
-
removeContraindication(technologyId: string, contraindication: Contraindication): Promise<Technology | null>;
|
|
5183
|
-
/**
|
|
5184
|
-
* Dodaje benefit tehnologiji
|
|
5185
|
-
* @param technologyId - ID tehnologije
|
|
5186
|
-
* @param benefit - Benefit koji se dodaje
|
|
5187
|
-
* @returns Ažurirana tehnologija
|
|
5188
|
-
*/
|
|
5189
|
-
addBenefit(technologyId: string, benefit: TreatmentBenefit): Promise<Technology | null>;
|
|
5190
|
-
/**
|
|
5191
|
-
* Uklanja benefit iz tehnologije
|
|
5192
|
-
* @param technologyId - ID tehnologije
|
|
5193
|
-
* @param benefit - Benefit koji se uklanja
|
|
5194
|
-
* @returns Ažurirana tehnologija
|
|
5195
|
-
*/
|
|
5196
|
-
removeBenefit(technologyId: string, benefit: TreatmentBenefit): Promise<Technology | null>;
|
|
5197
|
-
/**
|
|
5198
|
-
* Vraća sve blokirajuće uslove za tehnologiju
|
|
5199
|
-
* @param technologyId - ID tehnologije
|
|
5200
|
-
* @returns Lista blokirajućih uslova
|
|
5201
|
-
*/
|
|
5202
|
-
getBlockingConditions(technologyId: string): Promise<BlockingCondition[]>;
|
|
5203
|
-
/**
|
|
5204
|
-
* Vraća sve kontraindikacije za tehnologiju
|
|
5205
|
-
* @param technologyId - ID tehnologije
|
|
5206
|
-
* @returns Lista kontraindikacija
|
|
5207
|
-
*/
|
|
5208
|
-
getContraindications(technologyId: string): Promise<Contraindication[]>;
|
|
5209
|
-
/**
|
|
5210
|
-
* Vraća sve benefite za tehnologiju
|
|
5211
|
-
* @param technologyId - ID tehnologije
|
|
5212
|
-
* @returns Lista benefita
|
|
5213
|
-
*/
|
|
5214
|
-
getBenefits(technologyId: string): Promise<TreatmentBenefit[]>;
|
|
5215
|
-
/**
|
|
5216
|
-
* Ažurira zahteve sertifikacije za tehnologiju
|
|
5217
|
-
* @param technologyId - ID tehnologije
|
|
5218
|
-
* @param certificationRequirement - Novi zahtevi sertifikacije
|
|
5219
|
-
* @returns Ažurirana tehnologija
|
|
5220
|
-
*/
|
|
5221
|
-
updateCertificationRequirement(technologyId: string, certificationRequirement: CertificationRequirement): Promise<Technology | null>;
|
|
5222
|
-
/**
|
|
5223
|
-
* Vraća zahteve sertifikacije za tehnologiju
|
|
5224
|
-
* @param technologyId - ID tehnologije
|
|
5225
|
-
* @returns Zahtevi sertifikacije ili null ako tehnologija ne postoji
|
|
5226
|
-
*/
|
|
5227
|
-
getCertificationRequirement(technologyId: string): Promise<CertificationRequirement | null>;
|
|
5228
|
-
/**
|
|
5229
|
-
* Proverava da li doktor ima odgovarajuću sertifikaciju za izvođenje tehnologije
|
|
5230
|
-
*
|
|
5231
|
-
* @param requiredCertification - Zahtevana sertifikacija za tehnologiju
|
|
5232
|
-
* @param practitionerCertification - Sertifikacija zdravstvenog radnika
|
|
5233
|
-
* @returns true ako zdravstveni radnik ima odgovarajuću sertifikaciju, false ako nema
|
|
5234
|
-
*
|
|
5235
|
-
* @example
|
|
5236
|
-
* const isValid = technologyService.validateCertification(
|
|
5237
|
-
* {
|
|
5238
|
-
* minimumLevel: CertificationLevel.DOCTOR,
|
|
5239
|
-
* requiredSpecialties: [CertificationSpecialty.INJECTABLES]
|
|
5240
|
-
* },
|
|
5241
|
-
* {
|
|
5242
|
-
* level: CertificationLevel.SPECIALIST,
|
|
5243
|
-
* specialties: [CertificationSpecialty.INJECTABLES, CertificationSpecialty.LASER]
|
|
5244
|
-
* }
|
|
5245
|
-
* );
|
|
5246
|
-
*/
|
|
5247
|
-
validateCertification(requiredCertification: CertificationRequirement, practitionerCertification: PractitionerCertification): boolean;
|
|
5248
|
-
/**
|
|
5249
|
-
* Vraća sve tehnologije koje je zdravstveni radnik sertifikovan da izvodi
|
|
5250
|
-
* zajedno sa listama dozvoljenih familija, kategorija i podkategorija
|
|
5251
|
-
*
|
|
5252
|
-
* @param practitioner - Profil zdravstvenog radnika
|
|
5253
|
-
* @returns Objekat koji sadrži:
|
|
5254
|
-
* - technologies: Lista tehnologija koje zdravstveni radnik može da izvodi
|
|
5255
|
-
* - families: Lista familija procedura koje zdravstveni radnik može da izvodi
|
|
5256
|
-
* - categories: Lista ID-eva kategorija koje zdravstveni radnik može da izvodi
|
|
5257
|
-
* - subcategories: Lista ID-eva podkategorija koje zdravstveni radnik može da izvodi
|
|
5258
|
-
*
|
|
5259
|
-
* @example
|
|
5260
|
-
* const practitioner = {
|
|
5261
|
-
* certification: {
|
|
5262
|
-
* level: CertificationLevel.DOCTOR,
|
|
5263
|
-
* specialties: [CertificationSpecialty.INJECTABLES]
|
|
5264
|
-
* }
|
|
5265
|
-
* };
|
|
5266
|
-
* const allowedTechnologies = await technologyService.getAllowedTechnologies(practitioner);
|
|
5267
|
-
* console.log(allowedTechnologies.families); // [ProcedureFamily.AESTHETICS]
|
|
5268
|
-
* console.log(allowedTechnologies.categories); // ["category1", "category2"]
|
|
5269
|
-
* console.log(allowedTechnologies.subcategories); // ["subcategory1", "subcategory2"]
|
|
5270
|
-
*/
|
|
5271
|
-
getAllowedTechnologies(practitioner: Practitioner): Promise<{
|
|
5272
|
-
technologies: Technology[];
|
|
5273
|
-
families: ProcedureFamily[];
|
|
5274
|
-
categories: string[];
|
|
5275
|
-
subcategories: string[];
|
|
5276
|
-
}>;
|
|
5451
|
+
declare class TechnologyError extends BackofficeError {
|
|
5452
|
+
constructor(message: string);
|
|
5453
|
+
}
|
|
5454
|
+
declare class TechnologyNotFoundError extends TechnologyError {
|
|
5455
|
+
constructor(id: string);
|
|
5456
|
+
}
|
|
5457
|
+
declare class InvalidTechnologyDataError extends TechnologyError {
|
|
5458
|
+
constructor(message: string);
|
|
5277
5459
|
}
|
|
5278
|
-
|
|
5279
5460
|
/**
|
|
5280
|
-
*
|
|
5281
|
-
* Zahtevi se mogu kreirati globalno i zatim povezati sa različitim tehnologijama.
|
|
5282
|
-
* Ovo omogućava ponovno korišćenje istih zahteva za različite tehnologije.
|
|
5283
|
-
*
|
|
5284
|
-
* @example
|
|
5285
|
-
* const requirementService = new RequirementService();
|
|
5286
|
-
*
|
|
5287
|
-
* // Kreiranje globalnog zahteva
|
|
5288
|
-
* const requirement = await requirementService.create({
|
|
5289
|
-
* type: "pre",
|
|
5290
|
-
* name: "Stay Hydrated",
|
|
5291
|
-
* description: "Drink plenty of water",
|
|
5292
|
-
* timeframe: {
|
|
5293
|
-
* duration: 2,
|
|
5294
|
-
* unit: "hours",
|
|
5295
|
-
* notifyAt: [2, 1]
|
|
5296
|
-
* },
|
|
5297
|
-
* importance: "high"
|
|
5298
|
-
* });
|
|
5461
|
+
* Errors related to Requirement operations
|
|
5299
5462
|
*/
|
|
5300
|
-
declare class
|
|
5301
|
-
|
|
5302
|
-
* Referenca na Firestore kolekciju zahteva
|
|
5303
|
-
*/
|
|
5304
|
-
private get requirementsRef();
|
|
5305
|
-
/**
|
|
5306
|
-
* Kreira novi globalni zahtev
|
|
5307
|
-
* @param requirement - Podaci za novi zahtev
|
|
5308
|
-
* @returns Kreirani zahtev sa generisanim ID-em
|
|
5309
|
-
*/
|
|
5310
|
-
create(requirement: Omit<Requirement, "id" | "createdAt" | "updatedAt">): Promise<{
|
|
5311
|
-
createdAt: Date;
|
|
5312
|
-
updatedAt: Date;
|
|
5313
|
-
name: string;
|
|
5314
|
-
isActive: boolean;
|
|
5315
|
-
description: string;
|
|
5316
|
-
type: RequirementType;
|
|
5317
|
-
timeframe: TimeFrame;
|
|
5318
|
-
importance: RequirementImportance;
|
|
5319
|
-
id: string;
|
|
5320
|
-
}>;
|
|
5321
|
-
/**
|
|
5322
|
-
* Vraća sve aktivne zahteve
|
|
5323
|
-
* @returns Lista aktivnih zahteva
|
|
5324
|
-
*/
|
|
5325
|
-
getAll(): Promise<Requirement[]>;
|
|
5326
|
-
/**
|
|
5327
|
-
* Vraća sve aktivne zahteve određenog tipa
|
|
5328
|
-
* @param type - Tip zahteva (pre/post)
|
|
5329
|
-
* @returns Lista zahteva određenog tipa
|
|
5330
|
-
*/
|
|
5331
|
-
getAllByType(type: RequirementType): Promise<Requirement[]>;
|
|
5332
|
-
/**
|
|
5333
|
-
* Ažurira postojeći zahtev
|
|
5334
|
-
* @param id - ID zahteva koji se ažurira
|
|
5335
|
-
* @param requirement - Novi podaci za zahtev
|
|
5336
|
-
* @returns Ažurirani zahtev
|
|
5337
|
-
*/
|
|
5338
|
-
update(id: string, requirement: Partial<Omit<Requirement, "id" | "createdAt">>): Promise<Requirement | null>;
|
|
5339
|
-
/**
|
|
5340
|
-
* Soft delete zahteva (postavlja isActive na false)
|
|
5341
|
-
* @param id - ID zahteva koji se briše
|
|
5342
|
-
*/
|
|
5343
|
-
delete(id: string): Promise<void>;
|
|
5344
|
-
/**
|
|
5345
|
-
* Vraća zahtev po ID-u
|
|
5346
|
-
* @param id - ID traženog zahteva
|
|
5347
|
-
* @returns Zahtev ili null ako ne postoji
|
|
5348
|
-
*/
|
|
5349
|
-
getById(id: string): Promise<Requirement | null>;
|
|
5463
|
+
declare class RequirementError extends BackofficeError {
|
|
5464
|
+
constructor(message: string);
|
|
5350
5465
|
}
|
|
5351
|
-
|
|
5352
|
-
|
|
5353
|
-
/**
|
|
5354
|
-
* Gets reference to brands collection
|
|
5355
|
-
*/
|
|
5356
|
-
private getBrandsRef;
|
|
5357
|
-
/**
|
|
5358
|
-
* Creates a new brand
|
|
5359
|
-
*/
|
|
5360
|
-
create(brand: Omit<Brand, "id" | "createdAt" | "updatedAt">): Promise<{
|
|
5361
|
-
createdAt: Date;
|
|
5362
|
-
updatedAt: Date;
|
|
5363
|
-
name: string;
|
|
5364
|
-
isActive: boolean;
|
|
5365
|
-
description?: string | undefined;
|
|
5366
|
-
manufacturer: string;
|
|
5367
|
-
website?: string | undefined;
|
|
5368
|
-
id: string;
|
|
5369
|
-
}>;
|
|
5370
|
-
/**
|
|
5371
|
-
* Gets all active brands
|
|
5372
|
-
*/
|
|
5373
|
-
getAll(): Promise<Brand[]>;
|
|
5374
|
-
/**
|
|
5375
|
-
* Updates a brand
|
|
5376
|
-
*/
|
|
5377
|
-
update(brandId: string, brand: Partial<Omit<Brand, "id" | "createdAt">>): Promise<Brand | null>;
|
|
5378
|
-
/**
|
|
5379
|
-
* Soft deletes a brand
|
|
5380
|
-
*/
|
|
5381
|
-
delete(brandId: string): Promise<void>;
|
|
5382
|
-
/**
|
|
5383
|
-
* Gets a brand by ID
|
|
5384
|
-
*/
|
|
5385
|
-
getById(brandId: string): Promise<Brand | null>;
|
|
5466
|
+
declare class RequirementNotFoundError extends RequirementError {
|
|
5467
|
+
constructor(id: string);
|
|
5386
5468
|
}
|
|
5387
|
-
|
|
5388
|
-
|
|
5389
|
-
|
|
5390
|
-
|
|
5391
|
-
|
|
5392
|
-
* @returns Firestore collection reference
|
|
5393
|
-
*/
|
|
5394
|
-
private getProductsRef;
|
|
5395
|
-
/**
|
|
5396
|
-
* Creates a new product under technology
|
|
5397
|
-
*/
|
|
5398
|
-
create(technologyId: string, brandId: string, product: Omit<Product, "id" | "createdAt" | "updatedAt" | "brandId" | "technologyId">): Promise<Product>;
|
|
5399
|
-
/**
|
|
5400
|
-
* Gets all products for a technology
|
|
5401
|
-
*/
|
|
5402
|
-
getAllByTechnology(technologyId: string): Promise<Product[]>;
|
|
5403
|
-
/**
|
|
5404
|
-
* Gets all products for a brand by filtering through all technologies
|
|
5405
|
-
*/
|
|
5406
|
-
getAllByBrand(brandId: string): Promise<Product[]>;
|
|
5407
|
-
/**
|
|
5408
|
-
* Updates a product
|
|
5409
|
-
*/
|
|
5410
|
-
update(technologyId: string, productId: string, product: Partial<Omit<Product, "id" | "createdAt" | "brandId" | "technologyId">>): Promise<Product | null>;
|
|
5411
|
-
/**
|
|
5412
|
-
* Soft deletes a product
|
|
5413
|
-
*/
|
|
5414
|
-
delete(technologyId: string, productId: string): Promise<void>;
|
|
5415
|
-
/**
|
|
5416
|
-
* Gets a product by ID
|
|
5417
|
-
*/
|
|
5418
|
-
getById(technologyId: string, productId: string): Promise<Product | null>;
|
|
5469
|
+
declare class InvalidRequirementDataError extends RequirementError {
|
|
5470
|
+
constructor(message: string);
|
|
5471
|
+
}
|
|
5472
|
+
declare class InvalidTimeframeError extends RequirementError {
|
|
5473
|
+
constructor(message: string);
|
|
5419
5474
|
}
|
|
5420
|
-
|
|
5421
5475
|
/**
|
|
5422
|
-
*
|
|
5476
|
+
* Errors related to relationships between entities
|
|
5423
5477
|
*/
|
|
5424
|
-
declare class
|
|
5425
|
-
|
|
5426
|
-
|
|
5427
|
-
|
|
5428
|
-
|
|
5429
|
-
|
|
5430
|
-
|
|
5431
|
-
|
|
5432
|
-
|
|
5433
|
-
|
|
5434
|
-
|
|
5435
|
-
|
|
5436
|
-
|
|
5437
|
-
|
|
5438
|
-
|
|
5439
|
-
|
|
5440
|
-
|
|
5441
|
-
|
|
5442
|
-
|
|
5443
|
-
|
|
5444
|
-
|
|
5445
|
-
|
|
5446
|
-
|
|
5447
|
-
|
|
5448
|
-
|
|
5449
|
-
|
|
5450
|
-
* @param data - Updated template data
|
|
5451
|
-
* @returns The updated template
|
|
5452
|
-
*/
|
|
5453
|
-
updateTemplate(templateId: string, data: UpdateDocumentTemplateData): Promise<DocumentTemplate>;
|
|
5454
|
-
/**
|
|
5455
|
-
* Delete a document template
|
|
5456
|
-
* @param templateId - ID of the template to delete
|
|
5457
|
-
*/
|
|
5458
|
-
deleteTemplate(templateId: string): Promise<void>;
|
|
5459
|
-
/**
|
|
5460
|
-
* Get all active templates
|
|
5461
|
-
* @param pageSize - Number of templates to retrieve
|
|
5462
|
-
* @param lastDoc - Last document from previous page for pagination
|
|
5463
|
-
* @returns Array of templates and the last document for pagination
|
|
5464
|
-
*/
|
|
5465
|
-
getActiveTemplates(pageSize?: number, lastDoc?: QueryDocumentSnapshot<DocumentTemplate>): Promise<{
|
|
5466
|
-
templates: DocumentTemplate[];
|
|
5467
|
-
lastDoc: QueryDocumentSnapshot<DocumentTemplate> | null;
|
|
5468
|
-
}>;
|
|
5469
|
-
/**
|
|
5470
|
-
* Get templates by tags
|
|
5471
|
-
* @param tags - Tags to filter by
|
|
5472
|
-
* @param pageSize - Number of templates to retrieve
|
|
5473
|
-
* @param lastDoc - Last document from previous page for pagination
|
|
5474
|
-
* @returns Array of templates and the last document for pagination
|
|
5475
|
-
*/
|
|
5476
|
-
getTemplatesByTags(tags: string[], pageSize?: number, lastDoc?: QueryDocumentSnapshot<DocumentTemplate>): Promise<{
|
|
5477
|
-
templates: DocumentTemplate[];
|
|
5478
|
-
lastDoc: QueryDocumentSnapshot<DocumentTemplate> | null;
|
|
5479
|
-
}>;
|
|
5480
|
-
/**
|
|
5481
|
-
* Get templates created by a specific user
|
|
5482
|
-
* @param userId - ID of the user who created the templates
|
|
5483
|
-
* @param pageSize - Number of templates to retrieve
|
|
5484
|
-
* @param lastDoc - Last document from previous page for pagination
|
|
5485
|
-
* @returns Array of templates and the last document for pagination
|
|
5486
|
-
*/
|
|
5487
|
-
getTemplatesByCreator(userId: string, pageSize?: number, lastDoc?: QueryDocumentSnapshot<DocumentTemplate>): Promise<{
|
|
5488
|
-
templates: DocumentTemplate[];
|
|
5489
|
-
lastDoc: QueryDocumentSnapshot<DocumentTemplate> | null;
|
|
5490
|
-
}>;
|
|
5491
|
-
/**
|
|
5492
|
-
* Get a specific version of a template
|
|
5493
|
-
* @param templateId - ID of the template
|
|
5494
|
-
* @param versionNumber - Version number to retrieve
|
|
5495
|
-
* @returns The template version or null if not found
|
|
5496
|
-
*/
|
|
5497
|
-
getTemplateVersion(templateId: string, versionNumber: number): Promise<DocumentTemplate | null>;
|
|
5498
|
-
/**
|
|
5499
|
-
* Get all versions of a template
|
|
5500
|
-
* @param templateId - ID of the template
|
|
5501
|
-
* @returns Array of template versions
|
|
5502
|
-
*/
|
|
5503
|
-
getTemplateVersions(templateId: string): Promise<DocumentTemplate[]>;
|
|
5478
|
+
declare class RelationshipError extends BackofficeError {
|
|
5479
|
+
constructor(message: string);
|
|
5480
|
+
}
|
|
5481
|
+
declare class InvalidHierarchyError extends RelationshipError {
|
|
5482
|
+
constructor(message: string);
|
|
5483
|
+
}
|
|
5484
|
+
declare class CircularReferenceError extends RelationshipError {
|
|
5485
|
+
constructor(message: string);
|
|
5486
|
+
}
|
|
5487
|
+
declare class BlockingConditionError extends BackofficeError {
|
|
5488
|
+
constructor(message: string);
|
|
5489
|
+
}
|
|
5490
|
+
declare class InvalidBlockingConditionError extends BlockingConditionError {
|
|
5491
|
+
constructor(condition: string);
|
|
5492
|
+
}
|
|
5493
|
+
declare class ContraindicationError extends BackofficeError {
|
|
5494
|
+
constructor(message: string);
|
|
5495
|
+
}
|
|
5496
|
+
declare class InvalidContraindicationError extends ContraindicationError {
|
|
5497
|
+
constructor(contraindication: string);
|
|
5498
|
+
}
|
|
5499
|
+
declare class TreatmentBenefitError extends BackofficeError {
|
|
5500
|
+
constructor(message: string);
|
|
5501
|
+
}
|
|
5502
|
+
declare class InvalidTreatmentBenefitError extends TreatmentBenefitError {
|
|
5503
|
+
constructor(benefit: string);
|
|
5504
5504
|
}
|
|
5505
5505
|
|
|
5506
5506
|
export { BackofficeError, BlockingCondition, BlockingConditionError, type Brand, BrandService, type Category, CategoryError, CategoryNotFoundError, CategoryService, CertificationLevel, type CertificationRequirement, CertificationSpecialty, CircularReferenceError, Contraindication, ContraindicationError, type CreateDocumentTemplateData, DEFAULT_CERTIFICATION_REQUIREMENT, type DocumentElement, DocumentElementType, type DocumentTemplate, DocumentationTemplateService, DynamicVariable, HeadingLevel, InvalidBlockingConditionError, InvalidCategoryDataError, InvalidContraindicationError, InvalidHierarchyError, InvalidRequirementDataError, InvalidSubcategoryDataError, InvalidTechnologyDataError, InvalidTimeframeError, InvalidTreatmentBenefitError, ListType, ProcedureFamily, type Product, ProductService, RelationshipError, type Requirement, RequirementError, type RequirementImportance, RequirementNotFoundError, RequirementService, RequirementType, type Subcategory, SubcategoryError, SubcategoryNotFoundError, SubcategoryService, type Technology, TechnologyError, TechnologyNotFoundError, type TechnologyRequirements, TechnologyService, type TimeFrame, TimeUnit, TreatmentBenefit, TreatmentBenefitError, type UpdateDocumentTemplateData, blockingConditionSchema, categorySchema, categoryUpdateSchema, certificationLevelSchema, certificationRequirementSchema, certificationSpecialtySchema, contraindicationSchema, createDocumentTemplateSchema, documentElementSchema, documentElementWithoutIdSchema, documentTemplateSchema, procedureFamilySchema, requirementSchema, requirementTypeSchema, requirementUpdateSchema, subcategorySchema, subcategoryUpdateSchema, technologyRequirementsSchema, technologySchema, technologyUpdateSchema, timeUnitSchema, timeframeSchema, treatmentBenefitSchema, updateDocumentTemplateSchema };
|