@blackcode_sa/metaestetics-api 1.5.35 → 1.5.36

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/index.d.mts CHANGED
@@ -1,258 +1,320 @@
1
+ import { z } from 'zod';
2
+ import { Timestamp, FieldValue, Firestore, QueryDocumentSnapshot, DocumentSnapshot } from 'firebase/firestore';
3
+ import { Timestamp as Timestamp$1 } from 'firebase-admin/firestore';
1
4
  import { FirebaseApp } from 'firebase/app';
2
- import { Firestore, Timestamp, FieldValue, QueryDocumentSnapshot } from 'firebase/firestore';
3
5
  import { Auth, User as User$1 } from 'firebase/auth';
4
6
  import { Analytics } from 'firebase/analytics';
5
7
  import { FirebaseStorage } from 'firebase/storage';
6
- import { Timestamp as Timestamp$1 } from 'firebase-admin/firestore';
7
- import { z } from 'zod';
8
-
9
- interface FirebaseInstance {
10
- app: FirebaseApp;
11
- db: Firestore;
12
- auth: Auth;
13
- analytics: Analytics | null;
14
- }
15
- declare const initializeFirebase: (config: {
16
- apiKey: string;
17
- authDomain: string;
18
- projectId: string;
19
- storageBucket: string;
20
- messagingSenderId: string;
21
- appId: string;
22
- measurementId?: string;
23
- }) => FirebaseInstance;
24
- declare const getFirebaseInstance: () => Promise<FirebaseInstance>;
25
- declare const getFirebaseAuth: () => Promise<Auth>;
26
- declare const getFirebaseDB: () => Promise<Firestore>;
27
- declare const getFirebaseApp: () => Promise<FirebaseApp>;
28
8
 
29
9
  /**
30
- * Types for the Medical Documentation Templating System
31
- */
32
- /**
33
- * Kolekcija u Firestore bazi gde se čuvaju dokumentacijske šablone
10
+ * Review system type definitions
34
11
  */
35
- declare const DOCUMENTATION_TEMPLATES_COLLECTION = "documentation-templates";
36
- declare const FILLED_DOCUMENTS_COLLECTION = "filled-documents";
37
12
  /**
38
- * Enum for element types in documentation templates
13
+ * Base review interface with common properties
39
14
  */
40
- declare enum DocumentElementType {
41
- HEADING = "heading",
42
- PARAGRAPH = "paragraph",
43
- LIST = "list",
44
- DYNAMIC_TEXT = "dynamic_text",
45
- BINARY_CHOICE = "binary_choice",
46
- MULTIPLE_CHOICE = "multiple_choice",
47
- SINGLE_CHOICE = "single_choice",
48
- RATING_SCALE = "rating_scale",
49
- TEXT_INPUT = "text_input",
50
- DATE_PICKER = "date_picker",
51
- SIGNATURE = "signature",
52
- FILE_UPLOAD = "file_upload"
15
+ interface BaseReview {
16
+ id: string;
17
+ fullReviewId: string;
18
+ patientId: string;
19
+ createdAt: Date;
20
+ updatedAt: Date;
21
+ comment: string;
22
+ isVerified: boolean;
23
+ isPublished: boolean;
53
24
  }
54
25
  /**
55
- * Enum for list types
26
+ * Clinic review interface
27
+ * @description Full review for a clinic
56
28
  */
57
- declare enum ListType {
58
- ORDERED = "ordered",
59
- UNORDERED = "unordered"
29
+ interface ClinicReview extends BaseReview {
30
+ clinicId: string;
31
+ cleanliness: number;
32
+ facilities: number;
33
+ staffFriendliness: number;
34
+ waitingTime: number;
35
+ accessibility: number;
36
+ overallRating: number;
37
+ wouldRecommend: boolean;
60
38
  }
61
39
  /**
62
- * Enum for heading levels
40
+ * Practitioner review interface
41
+ * @description Full review for a healthcare practitioner
63
42
  */
64
- declare enum HeadingLevel {
65
- H1 = "h1",
66
- H2 = "h2",
67
- H3 = "h3",
68
- H4 = "h4",
69
- H5 = "h5",
70
- H6 = "h6"
43
+ interface PractitionerReview extends BaseReview {
44
+ practitionerId: string;
45
+ knowledgeAndExpertise: number;
46
+ communicationSkills: number;
47
+ bedSideManner: number;
48
+ thoroughness: number;
49
+ trustworthiness: number;
50
+ overallRating: number;
51
+ wouldRecommend: boolean;
71
52
  }
72
53
  /**
73
- * Enum for dynamic variable placeholders
54
+ * Procedure review interface
55
+ * @description Full review for a medical procedure
74
56
  */
75
- declare enum DynamicVariable {
76
- PATIENT_NAME = "[PATIENT_NAME]",
77
- DOCTOR_NAME = "[DOCTOR_NAME]",
78
- CLINIC_NAME = "[CLINIC_NAME]",
79
- PATIENT_BIRTHDAY = "[PATIENT_BIRTHDAY]",
80
- APPOINTMENT_DATE = "[APPOINTMENT_DATE]",
81
- CURRENT_DATE = "[CURRENT_DATE]"
57
+ interface ProcedureReview extends BaseReview {
58
+ procedureId: string;
59
+ effectivenessOfTreatment: number;
60
+ outcomeExplanation: number;
61
+ painManagement: number;
62
+ followUpCare: number;
63
+ valueForMoney: number;
64
+ overallRating: number;
65
+ wouldRecommend: boolean;
82
66
  }
83
67
  /**
84
- * Base interface for all document elements
68
+ * Condensed clinic review information
69
+ * @description Used for aggregated data attached to clinic documents
85
70
  */
86
- interface BaseDocumentElement {
87
- id: string;
88
- type: DocumentElementType;
89
- required?: boolean;
71
+ interface ClinicReviewInfo {
72
+ totalReviews: number;
73
+ averageRating: number;
74
+ cleanliness: number;
75
+ facilities: number;
76
+ staffFriendliness: number;
77
+ waitingTime: number;
78
+ accessibility: number;
79
+ recommendationPercentage: number;
90
80
  }
91
81
  /**
92
- * Interface for heading element
82
+ * Condensed practitioner review information
83
+ * @description Used for aggregated data attached to practitioner documents
93
84
  */
94
- interface HeadingElement extends BaseDocumentElement {
95
- type: DocumentElementType.HEADING;
96
- text: string;
97
- level: HeadingLevel;
85
+ interface PractitionerReviewInfo {
86
+ totalReviews: number;
87
+ averageRating: number;
88
+ knowledgeAndExpertise: number;
89
+ communicationSkills: number;
90
+ bedSideManner: number;
91
+ thoroughness: number;
92
+ trustworthiness: number;
93
+ recommendationPercentage: number;
98
94
  }
99
95
  /**
100
- * Interface for paragraph element
96
+ * Condensed procedure review information
97
+ * @description Used for aggregated data attached to procedure documents
101
98
  */
102
- interface ParagraphElement extends BaseDocumentElement {
103
- type: DocumentElementType.PARAGRAPH;
104
- text: string;
99
+ interface ProcedureReviewInfo {
100
+ totalReviews: number;
101
+ averageRating: number;
102
+ effectivenessOfTreatment: number;
103
+ outcomeExplanation: number;
104
+ painManagement: number;
105
+ followUpCare: number;
106
+ valueForMoney: number;
107
+ recommendationPercentage: number;
105
108
  }
106
109
  /**
107
- * Interface for list element
110
+ * Crown review object
111
+ * @description Combined review data for clinic, practitioner, and procedure
108
112
  */
109
- interface ListElement extends BaseDocumentElement {
110
- type: DocumentElementType.LIST;
111
- items: string[];
112
- listType: ListType;
113
+ interface Review {
114
+ id: string;
115
+ appointmentId: string;
116
+ patientId: string;
117
+ createdAt: Date;
118
+ updatedAt: Date;
119
+ clinicReview?: ClinicReview;
120
+ practitionerReview?: PractitionerReview;
121
+ procedureReview?: ProcedureReview;
122
+ overallComment: string;
123
+ overallRating: number;
113
124
  }
125
+ declare const REVIEWS_COLLECTION = "reviews";
126
+
114
127
  /**
115
- * Interface for dynamic text element
128
+ * Familije procedura u sistemu
129
+ * Predstavlja najviši nivo hijerarhije i deli procedure na estetske i hirurške
130
+ *
131
+ * @enum
132
+ * @property AESTHETICS - Estetske procedure (neivazivne i minimalno invazivne)
133
+ * @property SURGERY - Hirurške procedure (invazivne)
116
134
  */
117
- interface DynamicTextElement extends BaseDocumentElement {
118
- type: DocumentElementType.DYNAMIC_TEXT;
119
- text: string;
135
+ declare enum ProcedureFamily {
136
+ /** Estetske procedure koje ne zahtevaju hirurški zahvat */
137
+ AESTHETICS = "aesthetics",
138
+ /** Hirurške procedure koje zahtevaju operativni zahvat */
139
+ SURGERY = "surgery"
120
140
  }
141
+
121
142
  /**
122
- * Interface for binary choice element (Yes/No)
143
+ * Kategorija procedura
144
+ * Kategorije su prvi nivo hijerarhije nakon procedure family
145
+ * One grupišu slične podkategorije u okviru familije procedura
146
+ *
147
+ * @property id - Jedinstveni identifikator kategorije
148
+ * @property name - Naziv kategorije
149
+ * @property description - Detaljan opis kategorije i njene namene
150
+ * @property family - Familija procedura kojoj kategorija pripada (aesthetics/surgery)
151
+ * @property isActive - Da li je kategorija aktivna u sistemu
152
+ * @property createdAt - Datum kreiranja
153
+ * @property updatedAt - Datum poslednjeg ažuriranja
123
154
  */
124
- interface BinaryChoiceElement extends BaseDocumentElement {
125
- type: DocumentElementType.BINARY_CHOICE;
126
- question: string;
127
- defaultValue?: boolean;
155
+ interface Category {
156
+ /** Jedinstveni identifikator kategorije (automatski generisan od strane Firestore) */
157
+ id?: string;
158
+ /** Naziv kategorije */
159
+ name: string;
160
+ /** Detaljan opis kategorije i njene namene */
161
+ description: string;
162
+ /** Tip procedure kojoj kategorija pripada */
163
+ family: ProcedureFamily;
164
+ /** Datum kreiranja kategorije */
165
+ createdAt: Date;
166
+ /** Datum poslednjeg ažuriranja kategorije */
167
+ updatedAt: Date;
168
+ /** Flag koji označava da li je kategorija aktivna */
169
+ isActive: boolean;
128
170
  }
171
+
129
172
  /**
130
- * Interface for multiple choice element
173
+ * Podkategorija procedura
174
+ * Podkategorije su drugi nivo hijerarhije i pripadaju određenoj kategoriji
175
+ * One grupišu slične tehnologije u okviru kategorije
176
+ *
177
+ * @property id - Jedinstveni identifikator podkategorije
178
+ * @property name - Naziv podkategorije
179
+ * @property description - Detaljan opis podkategorije i njene namene
180
+ * @property categoryId - ID kategorije kojoj podkategorija pripada
181
+ * @property isActive - Da li je podkategorija aktivna u sistemu
182
+ * @property createdAt - Datum kreiranja
183
+ * @property updatedAt - Datum poslednjeg ažuriranja
131
184
  */
132
- interface MultipleChoiceElement extends BaseDocumentElement {
133
- type: DocumentElementType.MULTIPLE_CHOICE;
134
- question: string;
135
- options: string[];
136
- defaultValues?: string[];
185
+ interface Subcategory {
186
+ /** Jedinstveni identifikator podkategorije (automatski generisan od strane Firestore) */
187
+ id?: string;
188
+ /** Naziv podkategorije */
189
+ name: string;
190
+ /** Detaljniji opis podkategorije */
191
+ description?: string;
192
+ /** ID kategorije kojoj podkategorija pripada */
193
+ categoryId: string;
194
+ /** Flag koji označava da li je podkategorija aktivna */
195
+ isActive: boolean;
196
+ /** Datum kreiranja podkategorije */
197
+ createdAt: Date;
198
+ /** Datum poslednjeg ažuriranja podkategorije */
199
+ updatedAt: Date;
137
200
  }
201
+
138
202
  /**
139
- * Interface for single choice element
140
- */
141
- interface SingleChoiceElement extends BaseDocumentElement {
142
- type: DocumentElementType.SINGLE_CHOICE;
143
- question: string;
144
- options: string[];
145
- defaultValue?: string;
146
- }
147
- /**
148
- * Interface for rating scale element
149
- */
150
- interface RatingScaleElement extends BaseDocumentElement {
151
- type: DocumentElementType.RATING_SCALE;
152
- question: string;
153
- min: number;
154
- max: number;
155
- labels?: {
156
- [key: number]: string;
157
- };
158
- defaultValue?: number;
159
- }
160
- /**
161
- * Interface for text input element
203
+ * Jedinica mere za vremenski period
162
204
  */
163
- interface TextInputElement extends BaseDocumentElement {
164
- type: DocumentElementType.TEXT_INPUT;
165
- label: string;
166
- placeholder?: string;
167
- multiline?: boolean;
168
- defaultValue?: string;
205
+ declare enum TimeUnit {
206
+ HOURS = "hours",
207
+ DAYS = "days"
169
208
  }
170
209
  /**
171
- * Interface for date picker element
210
+ * Tip zahteva - da li se odnosi na period pre ili posle procedure
172
211
  */
173
- interface DatePickerElement extends BaseDocumentElement {
174
- type: DocumentElementType.DATE_PICKER;
175
- label: string;
176
- defaultValue?: string;
212
+ declare enum RequirementType {
213
+ PRE = "pre",
214
+ POST = "post"
177
215
  }
178
216
  /**
179
- * Interface for signature element
217
+ * Nivo važnosti zahteva
180
218
  */
181
- interface SignatureElement extends BaseDocumentElement {
182
- type: DocumentElementType.SIGNATURE;
183
- label: string;
184
- }
219
+ type RequirementImportance = "low" | "medium" | "high";
185
220
  /**
186
- * Interface for file upload element
221
+ * Vremenski okvir za zahtev
222
+ * @property duration - Trajanje u odabranoj jedinici vremena
223
+ * @property unit - Jedinica vremena (sati ili dani)
224
+ * @property notifyAt - Lista trenutaka kada treba poslati obaveštenje (u istoj jedinici)
187
225
  */
188
- interface FileUploadElement extends BaseDocumentElement {
189
- type: DocumentElementType.FILE_UPLOAD;
190
- label: string;
191
- allowedFileTypes?: string[];
192
- maxFileSizeMB?: number;
226
+ interface TimeFrame {
227
+ duration: number;
228
+ unit: TimeUnit;
229
+ notifyAt: number[];
193
230
  }
194
231
  /**
195
- * Union type for all document elements
196
- */
197
- type DocumentElement = HeadingElement | ParagraphElement | ListElement | DynamicTextElement | BinaryChoiceElement | MultipleChoiceElement | SingleChoiceElement | RatingScaleElement | TextInputElement | DatePickerElement | SignatureElement | FileUploadElement;
198
- /**
199
- * Interface for document template
232
+ * Zahtev koji se može povezati sa tehnologijom
233
+ * Može biti zahtev pre procedure (pre) ili posle procedure (post)
234
+ *
235
+ * @property id - Jedinstveni identifikator zahteva
236
+ * @property type - Tip zahteva (pre/post)
237
+ * @property name - Naziv zahteva
238
+ * @property description - Detaljan opis zahteva
239
+ * @property timeframe - Vremenski okvir za zahtev
240
+ * @property importance - Nivo važnosti zahteva
241
+ * @property isActive - Da li je zahtev aktivan u sistemu
242
+ * @property createdAt - Datum kreiranja
243
+ * @property updatedAt - Datum poslednjeg ažuriranja
200
244
  */
201
- interface DocumentTemplate {
245
+ interface Requirement {
202
246
  id: string;
203
- title: string;
204
- description?: string;
205
- createdAt: number;
206
- updatedAt: number;
207
- createdBy: string;
208
- elements: DocumentElement[];
209
- tags?: string[];
210
- version: number;
247
+ type: RequirementType;
248
+ name: string;
249
+ description: string;
250
+ timeframe: TimeFrame;
251
+ importance: RequirementImportance;
211
252
  isActive: boolean;
253
+ createdAt: Date;
254
+ updatedAt: Date;
212
255
  }
256
+
213
257
  /**
214
- * Interface for creating a new document template
215
- */
216
- interface CreateDocumentTemplateData {
217
- title: string;
218
- description?: string;
219
- elements: Omit<DocumentElement, "id">[];
220
- tags?: string[];
221
- }
222
- /**
223
- * Interface for updating an existing document template
258
+ * Blokirajući uslovi koji mogu sprečiti proceduru
259
+ * Ovi uslovi predstavljaju apsolutne kontraindikacije koje onemogućavaju izvođenje procedure
224
260
  */
225
- interface UpdateDocumentTemplateData {
226
- title?: string;
227
- description?: string;
228
- elements?: Omit<DocumentElement, "id">[];
229
- tags?: string[];
230
- isActive?: boolean;
261
+ declare enum BlockingCondition {
262
+ PREGNANCY = "pregnancy",
263
+ BREASTFEEDING = "breastfeeding",
264
+ ACTIVE_INFECTION = "active_infection",
265
+ SKIN_CONDITION = "skin_condition",
266
+ AUTOIMMUNE_DISEASE = "autoimmune_disease",
267
+ BLOOD_THINNERS = "blood_thinners",
268
+ RECENT_SURGERY = "recent_surgery",
269
+ DIABETES = "diabetes",
270
+ HEART_CONDITION = "heart_condition",
271
+ HIGH_BLOOD_PRESSURE = "high_blood_pressure",
272
+ KELOID_SCARRING = "keloid_scarring",
273
+ METAL_IMPLANTS = "metal_implants",
274
+ PACEMAKER = "pacemaker",
275
+ CANCER = "cancer",
276
+ EPILEPSY = "epilepsy"
231
277
  }
278
+
232
279
  /**
233
- * Interface for a filled document (completed form)
280
+ * Kontraindikacije koje mogu uticati na proceduru
281
+ * Ovi uslovi predstavljaju relativne kontraindikacije koje zahtevaju posebnu pažnju
234
282
  */
235
- interface FilledDocument {
236
- id: string;
237
- templateId: string;
238
- templateVersion: number;
239
- patientId: string;
240
- practitionerId: string;
241
- clinicId: string;
242
- createdAt: number;
243
- updatedAt: number;
244
- values: {
245
- [elementId: string]: any;
246
- };
247
- status: FilledDocumentStatus;
283
+ declare enum Contraindication {
284
+ SENSITIVE_SKIN = "sensitive_skin",
285
+ RECENT_TANNING = "recent_tanning",
286
+ RECENT_BOTOX = "recent_botox",
287
+ RECENT_FILLERS = "recent_fillers",
288
+ SKIN_ALLERGIES = "skin_allergies",
289
+ MEDICATIONS = "medications",
290
+ RECENT_CHEMICAL_PEEL = "recent_chemical_peel",
291
+ RECENT_LASER = "recent_laser",
292
+ SKIN_INFLAMMATION = "skin_inflammation",
293
+ OPEN_WOUNDS = "open_wounds",
294
+ HERPES_SIMPLEX = "herpes_simplex",
295
+ COLD_SORES = "cold_sores"
248
296
  }
297
+
249
298
  /**
250
- * Enum for filled document status
299
+ * Benefiti koji se mogu očekivati od procedure
300
+ * Lista mogućih pozitivnih efekata i rezultata tretmana
251
301
  */
252
- declare enum FilledDocumentStatus {
253
- DRAFT = "draft",
254
- COMPLETED = "completed",
255
- SIGNED = "signed"
302
+ declare enum TreatmentBenefit {
303
+ WRINKLE_REDUCTION = "wrinkle_reduction",
304
+ SKIN_TIGHTENING = "skin_tightening",
305
+ COLLAGEN_PRODUCTION = "collagen_production",
306
+ ACNE_REDUCTION = "acne_reduction",
307
+ SCAR_REDUCTION = "scar_reduction",
308
+ PIGMENTATION_IMPROVEMENT = "pigmentation_improvement",
309
+ HAIR_REMOVAL = "hair_removal",
310
+ MUSCLE_TONING = "muscle_toning",
311
+ FAT_REDUCTION = "fat_reduction",
312
+ CELLULITE_REDUCTION = "cellulite_reduction",
313
+ SKIN_REJUVENATION = "skin_rejuvenation",
314
+ PORE_REDUCTION = "pore_reduction",
315
+ TEXTURE_IMPROVEMENT = "texture_improvement",
316
+ HYDRATION_BOOST = "hydration_boost",
317
+ CIRCULATION_IMPROVEMENT = "circulation_improvement"
256
318
  }
257
319
 
258
320
  /**
@@ -292,314 +354,232 @@ interface CertificationRequirement {
292
354
  }
293
355
 
294
356
  /**
295
- * Review system type definitions
357
+ * Types for the Medical Documentation Templating System
296
358
  */
297
359
  /**
298
- * Base review interface with common properties
360
+ * Kolekcija u Firestore bazi gde se čuvaju dokumentacijske šablone
299
361
  */
300
- interface BaseReview {
301
- id: string;
302
- fullReviewId: string;
303
- patientId: string;
304
- createdAt: Date;
305
- updatedAt: Date;
306
- comment: string;
307
- isVerified: boolean;
308
- isPublished: boolean;
362
+ declare const DOCUMENTATION_TEMPLATES_COLLECTION = "documentation-templates";
363
+ declare const FILLED_DOCUMENTS_COLLECTION = "filled-documents";
364
+ /**
365
+ * Enum for element types in documentation templates
366
+ */
367
+ declare enum DocumentElementType {
368
+ HEADING = "heading",
369
+ PARAGRAPH = "paragraph",
370
+ LIST = "list",
371
+ DYNAMIC_TEXT = "dynamic_text",
372
+ BINARY_CHOICE = "binary_choice",
373
+ MULTIPLE_CHOICE = "multiple_choice",
374
+ SINGLE_CHOICE = "single_choice",
375
+ RATING_SCALE = "rating_scale",
376
+ TEXT_INPUT = "text_input",
377
+ DATE_PICKER = "date_picker",
378
+ SIGNATURE = "signature",
379
+ FILE_UPLOAD = "file_upload"
309
380
  }
310
381
  /**
311
- * Clinic review interface
312
- * @description Full review for a clinic
382
+ * Enum for list types
313
383
  */
314
- interface ClinicReview extends BaseReview {
315
- clinicId: string;
316
- cleanliness: number;
317
- facilities: number;
318
- staffFriendliness: number;
319
- waitingTime: number;
320
- accessibility: number;
321
- overallRating: number;
322
- wouldRecommend: boolean;
384
+ declare enum ListType {
385
+ ORDERED = "ordered",
386
+ UNORDERED = "unordered"
323
387
  }
324
388
  /**
325
- * Practitioner review interface
326
- * @description Full review for a healthcare practitioner
389
+ * Enum for heading levels
327
390
  */
328
- interface PractitionerReview extends BaseReview {
329
- practitionerId: string;
330
- knowledgeAndExpertise: number;
331
- communicationSkills: number;
332
- bedSideManner: number;
333
- thoroughness: number;
334
- trustworthiness: number;
335
- overallRating: number;
336
- wouldRecommend: boolean;
391
+ declare enum HeadingLevel {
392
+ H1 = "h1",
393
+ H2 = "h2",
394
+ H3 = "h3",
395
+ H4 = "h4",
396
+ H5 = "h5",
397
+ H6 = "h6"
337
398
  }
338
399
  /**
339
- * Procedure review interface
340
- * @description Full review for a medical procedure
400
+ * Enum for dynamic variable placeholders
341
401
  */
342
- interface ProcedureReview extends BaseReview {
343
- procedureId: string;
344
- effectivenessOfTreatment: number;
345
- outcomeExplanation: number;
346
- painManagement: number;
347
- followUpCare: number;
348
- valueForMoney: number;
349
- overallRating: number;
350
- wouldRecommend: boolean;
402
+ declare enum DynamicVariable {
403
+ PATIENT_NAME = "[PATIENT_NAME]",
404
+ DOCTOR_NAME = "[DOCTOR_NAME]",
405
+ CLINIC_NAME = "[CLINIC_NAME]",
406
+ PATIENT_BIRTHDAY = "[PATIENT_BIRTHDAY]",
407
+ APPOINTMENT_DATE = "[APPOINTMENT_DATE]",
408
+ CURRENT_DATE = "[CURRENT_DATE]"
351
409
  }
352
410
  /**
353
- * Condensed clinic review information
354
- * @description Used for aggregated data attached to clinic documents
411
+ * Base interface for all document elements
355
412
  */
356
- interface ClinicReviewInfo {
357
- totalReviews: number;
358
- averageRating: number;
359
- cleanliness: number;
360
- facilities: number;
361
- staffFriendliness: number;
362
- waitingTime: number;
363
- accessibility: number;
364
- recommendationPercentage: number;
413
+ interface BaseDocumentElement {
414
+ id: string;
415
+ type: DocumentElementType;
416
+ required?: boolean;
365
417
  }
366
418
  /**
367
- * Condensed practitioner review information
368
- * @description Used for aggregated data attached to practitioner documents
419
+ * Interface for heading element
369
420
  */
370
- interface PractitionerReviewInfo {
371
- totalReviews: number;
372
- averageRating: number;
373
- knowledgeAndExpertise: number;
374
- communicationSkills: number;
375
- bedSideManner: number;
376
- thoroughness: number;
377
- trustworthiness: number;
378
- recommendationPercentage: number;
421
+ interface HeadingElement extends BaseDocumentElement {
422
+ type: DocumentElementType.HEADING;
423
+ text: string;
424
+ level: HeadingLevel;
379
425
  }
380
426
  /**
381
- * Condensed procedure review information
382
- * @description Used for aggregated data attached to procedure documents
427
+ * Interface for paragraph element
383
428
  */
384
- interface ProcedureReviewInfo {
385
- totalReviews: number;
386
- averageRating: number;
387
- effectivenessOfTreatment: number;
388
- outcomeExplanation: number;
389
- painManagement: number;
390
- followUpCare: number;
391
- valueForMoney: number;
392
- recommendationPercentage: number;
429
+ interface ParagraphElement extends BaseDocumentElement {
430
+ type: DocumentElementType.PARAGRAPH;
431
+ text: string;
393
432
  }
394
433
  /**
395
- * Crown review object
396
- * @description Combined review data for clinic, practitioner, and procedure
434
+ * Interface for list element
397
435
  */
398
- interface Review {
399
- id: string;
400
- appointmentId: string;
401
- patientId: string;
402
- createdAt: Date;
403
- updatedAt: Date;
404
- clinicReview?: ClinicReview;
405
- practitionerReview?: PractitionerReview;
406
- procedureReview?: ProcedureReview;
407
- overallComment: string;
408
- overallRating: number;
436
+ interface ListElement extends BaseDocumentElement {
437
+ type: DocumentElementType.LIST;
438
+ items: string[];
439
+ listType: ListType;
409
440
  }
410
- declare const REVIEWS_COLLECTION = "reviews";
411
-
412
441
  /**
413
- * Familije procedura u sistemu
414
- * Predstavlja najviši nivo hijerarhije i deli procedure na estetske i hirurške
415
- *
416
- * @enum
417
- * @property AESTHETICS - Estetske procedure (neivazivne i minimalno invazivne)
418
- * @property SURGERY - Hirurške procedure (invazivne)
442
+ * Interface for dynamic text element
419
443
  */
420
- declare enum ProcedureFamily {
421
- /** Estetske procedure koje ne zahtevaju hirurški zahvat */
422
- AESTHETICS = "aesthetics",
423
- /** Hirurške procedure koje zahtevaju operativni zahvat */
424
- SURGERY = "surgery"
444
+ interface DynamicTextElement extends BaseDocumentElement {
445
+ type: DocumentElementType.DYNAMIC_TEXT;
446
+ text: string;
425
447
  }
426
-
427
448
  /**
428
- * Kategorija procedura
429
- * Kategorije su prvi nivo hijerarhije nakon procedure family
430
- * One grupišu slične podkategorije u okviru familije procedura
431
- *
432
- * @property id - Jedinstveni identifikator kategorije
433
- * @property name - Naziv kategorije
434
- * @property description - Detaljan opis kategorije i njene namene
435
- * @property family - Familija procedura kojoj kategorija pripada (aesthetics/surgery)
436
- * @property isActive - Da li je kategorija aktivna u sistemu
437
- * @property createdAt - Datum kreiranja
438
- * @property updatedAt - Datum poslednjeg ažuriranja
449
+ * Interface for binary choice element (Yes/No)
439
450
  */
440
- interface Category {
441
- /** Jedinstveni identifikator kategorije (automatski generisan od strane Firestore) */
442
- id?: string;
443
- /** Naziv kategorije */
444
- name: string;
445
- /** Detaljan opis kategorije i njene namene */
446
- description: string;
447
- /** Tip procedure kojoj kategorija pripada */
448
- family: ProcedureFamily;
449
- /** Datum kreiranja kategorije */
450
- createdAt: Date;
451
- /** Datum poslednjeg ažuriranja kategorije */
452
- updatedAt: Date;
453
- /** Flag koji označava da li je kategorija aktivna */
454
- isActive: boolean;
451
+ interface BinaryChoiceElement extends BaseDocumentElement {
452
+ type: DocumentElementType.BINARY_CHOICE;
453
+ question: string;
454
+ defaultValue?: boolean;
455
455
  }
456
-
457
456
  /**
458
- * Podkategorija procedura
459
- * Podkategorije su drugi nivo hijerarhije i pripadaju određenoj kategoriji
460
- * One grupišu slične tehnologije u okviru kategorije
461
- *
462
- * @property id - Jedinstveni identifikator podkategorije
463
- * @property name - Naziv podkategorije
464
- * @property description - Detaljan opis podkategorije i njene namene
465
- * @property categoryId - ID kategorije kojoj podkategorija pripada
466
- * @property isActive - Da li je podkategorija aktivna u sistemu
467
- * @property createdAt - Datum kreiranja
468
- * @property updatedAt - Datum poslednjeg ažuriranja
457
+ * Interface for multiple choice element
469
458
  */
470
- interface Subcategory {
471
- /** Jedinstveni identifikator podkategorije (automatski generisan od strane Firestore) */
472
- id?: string;
473
- /** Naziv podkategorije */
474
- name: string;
475
- /** Detaljniji opis podkategorije */
476
- description?: string;
477
- /** ID kategorije kojoj podkategorija pripada */
478
- categoryId: string;
479
- /** Flag koji označava da li je podkategorija aktivna */
480
- isActive: boolean;
481
- /** Datum kreiranja podkategorije */
482
- createdAt: Date;
483
- /** Datum poslednjeg ažuriranja podkategorije */
484
- updatedAt: Date;
459
+ interface MultipleChoiceElement extends BaseDocumentElement {
460
+ type: DocumentElementType.MULTIPLE_CHOICE;
461
+ question: string;
462
+ options: string[];
463
+ defaultValues?: string[];
485
464
  }
486
-
487
465
  /**
488
- * Jedinica mere za vremenski period
466
+ * Interface for single choice element
489
467
  */
490
- declare enum TimeUnit {
491
- HOURS = "hours",
492
- DAYS = "days"
468
+ interface SingleChoiceElement extends BaseDocumentElement {
469
+ type: DocumentElementType.SINGLE_CHOICE;
470
+ question: string;
471
+ options: string[];
472
+ defaultValue?: string;
493
473
  }
494
474
  /**
495
- * Tip zahteva - da li se odnosi na period pre ili posle procedure
475
+ * Interface for rating scale element
496
476
  */
497
- declare enum RequirementType {
498
- PRE = "pre",
499
- POST = "post"
477
+ interface RatingScaleElement extends BaseDocumentElement {
478
+ type: DocumentElementType.RATING_SCALE;
479
+ question: string;
480
+ min: number;
481
+ max: number;
482
+ labels?: {
483
+ [key: number]: string;
484
+ };
485
+ defaultValue?: number;
500
486
  }
501
487
  /**
502
- * Nivo važnosti zahteva
503
- */
504
- type RequirementImportance = "low" | "medium" | "high";
505
- /**
506
- * Vremenski okvir za zahtev
507
- * @property duration - Trajanje u odabranoj jedinici vremena
508
- * @property unit - Jedinica vremena (sati ili dani)
509
- * @property notifyAt - Lista trenutaka kada treba poslati obaveštenje (u istoj jedinici)
488
+ * Interface for text input element
510
489
  */
511
- interface TimeFrame {
512
- duration: number;
513
- unit: TimeUnit;
514
- notifyAt: number[];
490
+ interface TextInputElement extends BaseDocumentElement {
491
+ type: DocumentElementType.TEXT_INPUT;
492
+ label: string;
493
+ placeholder?: string;
494
+ multiline?: boolean;
495
+ defaultValue?: string;
515
496
  }
516
497
  /**
517
- * Zahtev koji se može povezati sa tehnologijom
518
- * Može biti zahtev pre procedure (pre) ili posle procedure (post)
519
- *
520
- * @property id - Jedinstveni identifikator zahteva
521
- * @property type - Tip zahteva (pre/post)
522
- * @property name - Naziv zahteva
523
- * @property description - Detaljan opis zahteva
524
- * @property timeframe - Vremenski okvir za zahtev
525
- * @property importance - Nivo važnosti zahteva
526
- * @property isActive - Da li je zahtev aktivan u sistemu
527
- * @property createdAt - Datum kreiranja
528
- * @property updatedAt - Datum poslednjeg ažuriranja
498
+ * Interface for date picker element
529
499
  */
530
- interface Requirement {
531
- id: string;
532
- type: RequirementType;
533
- name: string;
534
- description: string;
535
- timeframe: TimeFrame;
536
- importance: RequirementImportance;
537
- isActive: boolean;
538
- createdAt: Date;
539
- updatedAt: Date;
500
+ interface DatePickerElement extends BaseDocumentElement {
501
+ type: DocumentElementType.DATE_PICKER;
502
+ label: string;
503
+ defaultValue?: string;
540
504
  }
541
-
542
505
  /**
543
- * Blokirajući uslovi koji mogu sprečiti proceduru
544
- * Ovi uslovi predstavljaju apsolutne kontraindikacije koje onemogućavaju izvođenje procedure
506
+ * Interface for signature element
545
507
  */
546
- declare enum BlockingCondition {
547
- PREGNANCY = "pregnancy",
548
- BREASTFEEDING = "breastfeeding",
549
- ACTIVE_INFECTION = "active_infection",
550
- SKIN_CONDITION = "skin_condition",
551
- AUTOIMMUNE_DISEASE = "autoimmune_disease",
552
- BLOOD_THINNERS = "blood_thinners",
553
- RECENT_SURGERY = "recent_surgery",
554
- DIABETES = "diabetes",
555
- HEART_CONDITION = "heart_condition",
556
- HIGH_BLOOD_PRESSURE = "high_blood_pressure",
557
- KELOID_SCARRING = "keloid_scarring",
558
- METAL_IMPLANTS = "metal_implants",
559
- PACEMAKER = "pacemaker",
560
- CANCER = "cancer",
561
- EPILEPSY = "epilepsy"
508
+ interface SignatureElement extends BaseDocumentElement {
509
+ type: DocumentElementType.SIGNATURE;
510
+ label: string;
562
511
  }
563
-
564
512
  /**
565
- * Kontraindikacije koje mogu uticati na proceduru
566
- * Ovi uslovi predstavljaju relativne kontraindikacije koje zahtevaju posebnu pažnju
513
+ * Interface for file upload element
567
514
  */
568
- declare enum Contraindication {
569
- SENSITIVE_SKIN = "sensitive_skin",
570
- RECENT_TANNING = "recent_tanning",
571
- RECENT_BOTOX = "recent_botox",
572
- RECENT_FILLERS = "recent_fillers",
573
- SKIN_ALLERGIES = "skin_allergies",
574
- MEDICATIONS = "medications",
575
- RECENT_CHEMICAL_PEEL = "recent_chemical_peel",
576
- RECENT_LASER = "recent_laser",
577
- SKIN_INFLAMMATION = "skin_inflammation",
578
- OPEN_WOUNDS = "open_wounds",
579
- HERPES_SIMPLEX = "herpes_simplex",
580
- COLD_SORES = "cold_sores"
515
+ interface FileUploadElement extends BaseDocumentElement {
516
+ type: DocumentElementType.FILE_UPLOAD;
517
+ label: string;
518
+ allowedFileTypes?: string[];
519
+ maxFileSizeMB?: number;
581
520
  }
582
-
583
521
  /**
584
- * Benefiti koji se mogu očekivati od procedure
585
- * Lista mogućih pozitivnih efekata i rezultata tretmana
522
+ * Union type for all document elements
586
523
  */
587
- declare enum TreatmentBenefit {
588
- WRINKLE_REDUCTION = "wrinkle_reduction",
589
- SKIN_TIGHTENING = "skin_tightening",
590
- COLLAGEN_PRODUCTION = "collagen_production",
591
- ACNE_REDUCTION = "acne_reduction",
592
- SCAR_REDUCTION = "scar_reduction",
593
- PIGMENTATION_IMPROVEMENT = "pigmentation_improvement",
594
- HAIR_REMOVAL = "hair_removal",
595
- MUSCLE_TONING = "muscle_toning",
596
- FAT_REDUCTION = "fat_reduction",
597
- CELLULITE_REDUCTION = "cellulite_reduction",
598
- SKIN_REJUVENATION = "skin_rejuvenation",
599
- PORE_REDUCTION = "pore_reduction",
600
- TEXTURE_IMPROVEMENT = "texture_improvement",
601
- HYDRATION_BOOST = "hydration_boost",
602
- CIRCULATION_IMPROVEMENT = "circulation_improvement"
524
+ type DocumentElement = HeadingElement | ParagraphElement | ListElement | DynamicTextElement | BinaryChoiceElement | MultipleChoiceElement | SingleChoiceElement | RatingScaleElement | TextInputElement | DatePickerElement | SignatureElement | FileUploadElement;
525
+ /**
526
+ * Interface for document template
527
+ */
528
+ interface DocumentTemplate {
529
+ id: string;
530
+ title: string;
531
+ description?: string;
532
+ createdAt: number;
533
+ updatedAt: number;
534
+ createdBy: string;
535
+ elements: DocumentElement[];
536
+ tags?: string[];
537
+ version: number;
538
+ isActive: boolean;
539
+ }
540
+ /**
541
+ * Interface for creating a new document template
542
+ */
543
+ interface CreateDocumentTemplateData {
544
+ title: string;
545
+ description?: string;
546
+ elements: Omit<DocumentElement, "id">[];
547
+ tags?: string[];
548
+ }
549
+ /**
550
+ * Interface for updating an existing document template
551
+ */
552
+ interface UpdateDocumentTemplateData {
553
+ title?: string;
554
+ description?: string;
555
+ elements?: Omit<DocumentElement, "id">[];
556
+ tags?: string[];
557
+ isActive?: boolean;
558
+ }
559
+ /**
560
+ * Interface for a filled document (completed form)
561
+ */
562
+ interface FilledDocument {
563
+ id: string;
564
+ templateId: string;
565
+ templateVersion: number;
566
+ patientId: string;
567
+ practitionerId: string;
568
+ clinicId: string;
569
+ createdAt: number;
570
+ updatedAt: number;
571
+ values: {
572
+ [elementId: string]: any;
573
+ };
574
+ status: FilledDocumentStatus;
575
+ }
576
+ /**
577
+ * Enum for filled document status
578
+ */
579
+ declare enum FilledDocumentStatus {
580
+ DRAFT = "draft",
581
+ COMPLETED = "completed",
582
+ SIGNED = "signed"
603
583
  }
604
584
 
605
585
  /**
@@ -862,234 +842,722 @@ interface ProcedureSummaryInfo {
862
842
  practitionerName: string;
863
843
  }
864
844
 
865
- declare const PRACTITIONERS_COLLECTION = "practitioners";
866
- declare const REGISTER_TOKENS_COLLECTION = "register_tokens";
867
- /**
868
- * Osnovne informacije o zdravstvenom radniku
869
- */
870
- interface PractitionerBasicInfo {
871
- firstName: string;
872
- lastName: string;
873
- title: string;
874
- email: string;
875
- phoneNumber: string;
876
- dateOfBirth: Timestamp | Date;
877
- gender: "male" | "female" | "other";
878
- profileImageUrl?: string;
879
- bio?: string;
880
- languages: string[];
881
- }
882
- /**
883
- * Sertifikacija zdravstvenog radnika
884
- */
885
- interface PractitionerCertification {
886
- level: CertificationLevel;
887
- specialties: CertificationSpecialty[];
888
- licenseNumber: string;
889
- issuingAuthority: string;
890
- issueDate: Timestamp | Date;
891
- expiryDate?: Timestamp | Date;
892
- verificationStatus: "pending" | "verified" | "rejected";
893
- }
894
845
  /**
895
- * Interfejs za radno vreme zdravstvenog radnika u klinici
846
+ * Enum for practice types
896
847
  */
897
- interface PractitionerClinicWorkingHours {
898
- clinicId: string;
899
- workingHours: {
900
- monday: {
901
- start: string;
902
- end: string;
903
- } | null;
904
- tuesday: {
905
- start: string;
906
- end: string;
907
- } | null;
908
- wednesday: {
909
- start: string;
910
- end: string;
911
- } | null;
912
- thursday: {
913
- start: string;
914
- end: string;
915
- } | null;
916
- friday: {
917
- start: string;
918
- end: string;
919
- } | null;
920
- saturday: {
921
- start: string;
922
- end: string;
923
- } | null;
924
- sunday: {
925
- start: string;
926
- end: string;
927
- } | null;
928
- };
929
- isActive: boolean;
930
- createdAt: Timestamp | Date;
931
- updatedAt: Timestamp | Date;
848
+ declare enum PracticeType {
849
+ GENERAL_PRACTICE = "general_practice",
850
+ DENTAL = "dental",
851
+ DERMATOLOGY = "dermatology",
852
+ CARDIOLOGY = "cardiology",
853
+ ORTHOPEDICS = "orthopedics",
854
+ GYNECOLOGY = "gynecology",
855
+ PEDIATRICS = "pediatrics",
856
+ OPHTHALMOLOGY = "ophthalmology",
857
+ NEUROLOGY = "neurology",
858
+ PSYCHIATRY = "psychiatry",
859
+ UROLOGY = "urology",
860
+ ONCOLOGY = "oncology",
861
+ ENDOCRINOLOGY = "endocrinology",
862
+ GASTROENTEROLOGY = "gastroenterology",
863
+ PULMONOLOGY = "pulmonology",
864
+ RHEUMATOLOGY = "rheumatology",
865
+ PHYSICAL_THERAPY = "physical_therapy",
866
+ NUTRITION = "nutrition",
867
+ ALTERNATIVE_MEDICINE = "alternative_medicine",
868
+ OTHER = "other"
932
869
  }
933
870
  /**
934
- * Status of practitioner profile
871
+ * Enum for languages
935
872
  */
936
- declare enum PractitionerStatus {
937
- DRAFT = "draft",
938
- ACTIVE = "active"
873
+ declare enum Language {
874
+ ENGLISH = "english",
875
+ GERMAN = "german",
876
+ ITALIAN = "italian",
877
+ FRENCH = "french",
878
+ SPANISH = "spanish"
939
879
  }
940
880
  /**
941
- * Token status for practitioner invitations
881
+ * Enum for all possible clinic tags
942
882
  */
943
- declare enum PractitionerTokenStatus {
944
- ACTIVE = "active",
945
- USED = "used",
946
- EXPIRED = "expired",
947
- REVOKED = "revoked"
883
+ declare enum ClinicTag {
884
+ PARKING = "parking",
885
+ WIFI = "wifi",
886
+ WHEELCHAIR_ACCESS = "wheelchair_access",
887
+ CAFE = "cafe",
888
+ PHARMACY = "pharmacy",
889
+ WAITING_ROOM = "waiting_room",
890
+ CARD_PAYMENT = "card_payment",
891
+ INSURANCE = "insurance",
892
+ CHILDREN_AREA = "children_area",
893
+ TV = "tv",
894
+ AIR_CONDITIONING = "air_conditioning",
895
+ WATER_DISPENSER = "water_dispenser",
896
+ VENDING_MACHINE = "vending_machine",
897
+ ELEVATOR = "elevator",
898
+ RAMP = "ramp",
899
+ HANDICAP_PARKING = "handicap_parking",
900
+ BRAILLE = "braille",
901
+ SIGN_LANGUAGE = "sign_language",
902
+ EMERGENCY_SERVICE = "emergency_service",
903
+ LAB = "lab",
904
+ XRAY = "xray",
905
+ ULTRASOUND = "ultrasound",
906
+ DENTAL = "dental",
907
+ PEDIATRIC = "pediatric",
908
+ GYNECOLOGY = "gynecology",
909
+ CARDIOLOGY = "cardiology",
910
+ DERMATOLOGY = "dermatology",
911
+ ORTHOPEDIC = "orthopedic",
912
+ OPHTHALMOLOGY = "ophthalmology",
913
+ TELEMEDICINE = "telemedicine",
914
+ HOME_VISITS = "home_visits",
915
+ ONLINE_BOOKING = "online_booking",
916
+ MOBILE_APP = "mobile_app",
917
+ SMS_NOTIFICATIONS = "sms_notifications",
918
+ EMAIL_NOTIFICATIONS = "email_notifications",
919
+ ENGLISH = "english",
920
+ SERBIAN = "serbian",
921
+ GERMAN = "german",
922
+ RUSSIAN = "russian",
923
+ CHINESE = "chinese",
924
+ SPANISH = "spanish",
925
+ FRENCH = "french",
926
+ OPEN_24_7 = "open_24_7",
927
+ WEEKEND_HOURS = "weekend_hours",
928
+ NIGHT_SHIFT = "night_shift",
929
+ HOLIDAY_HOURS = "holiday_hours"
948
930
  }
949
931
  /**
950
- * Interfejs za zdravstvenog radnika
932
+ * Enum for clinic photo tags
933
+ * Used to categorize photos of different areas/parts of the clinic
951
934
  */
952
- interface Practitioner {
953
- id: string;
954
- userRef: string;
955
- basicInfo: PractitionerBasicInfo;
956
- certification: PractitionerCertification;
957
- clinics: string[];
958
- clinicWorkingHours: PractitionerClinicWorkingHours[];
959
- clinicsInfo: ClinicInfo[];
960
- procedures: string[];
961
- proceduresInfo: ProcedureSummaryInfo[];
962
- reviewInfo: PractitionerReviewInfo;
963
- isActive: boolean;
964
- isVerified: boolean;
965
- status: PractitionerStatus;
966
- createdAt: Timestamp;
967
- updatedAt: Timestamp;
968
- }
969
- /**
970
- * Tip za kreiranje novog zdravstvenog radnika
971
- */
972
- interface CreatePractitionerData {
973
- userRef: string;
974
- basicInfo: PractitionerBasicInfo;
975
- certification: PractitionerCertification;
976
- clinics?: string[];
977
- clinicWorkingHours?: PractitionerClinicWorkingHours[];
978
- clinicsInfo?: ClinicInfo[];
979
- isActive: boolean;
980
- isVerified: boolean;
981
- status?: PractitionerStatus;
982
- }
983
- /**
984
- * Tip za kreiranje draft profila zdravstvenog radnika
985
- */
986
- interface CreateDraftPractitionerData {
987
- basicInfo: PractitionerBasicInfo;
988
- certification: PractitionerCertification;
989
- clinics?: string[];
990
- clinicWorkingHours?: PractitionerClinicWorkingHours[];
991
- clinicsInfo?: ClinicInfo[];
992
- isActive?: boolean;
993
- isVerified?: boolean;
935
+ declare enum ClinicPhotoTag {
936
+ BUILDING_EXTERIOR = "building_exterior",
937
+ ENTRANCE = "entrance",
938
+ PARKING = "parking",
939
+ RECEPTION = "reception",
940
+ WAITING_ROOM = "waiting_room",
941
+ HALLWAY = "hallway",
942
+ EXAM_ROOM = "exam_room",
943
+ TREATMENT_ROOM = "treatment_room",
944
+ LABORATORY = "laboratory",
945
+ XRAY_ROOM = "xray_room",
946
+ ULTRASOUND_ROOM = "ultrasound_room",
947
+ DENTAL_OFFICE = "dental_office",
948
+ OPERATING_ROOM = "operating_room",
949
+ RECOVERY_ROOM = "recovery_room",
950
+ MEDICAL_EQUIPMENT = "medical_equipment",
951
+ PHARMACY = "pharmacy",
952
+ CAFETERIA = "cafeteria",
953
+ CHILDREN_AREA = "children_area",
954
+ STAFF = "staff",
955
+ OTHER = "other"
994
956
  }
957
+
958
+ declare const CLINIC_GROUPS_COLLECTION = "clinic_groups";
959
+ declare const CLINIC_ADMINS_COLLECTION = "clinic_admins";
960
+ declare const CLINICS_COLLECTION = "clinics";
961
+
995
962
  /**
996
- * Tip za ažuriranje zdravstvenog radnika
963
+ * Interface for clinic contact information
997
964
  */
998
- interface UpdatePractitionerData extends Partial<CreatePractitionerData> {
999
- updatedAt?: FieldValue;
1000
- proceduresInfo?: ProcedureSummaryInfo[];
965
+ interface ClinicContactInfo {
966
+ email: string;
967
+ phoneNumber: string;
968
+ alternativePhoneNumber?: string | null;
969
+ website?: string | null;
1001
970
  }
1002
971
  /**
1003
- * Interfejs za procedure koje zdravstveni radnik izvodi u određenoj klinici
972
+ * Interface for clinic location
1004
973
  */
1005
- interface PractitionerClinicProcedures {
1006
- practitionerId: string;
1007
- clinicId: string;
1008
- procedures: string[];
1009
- isActive: boolean;
1010
- createdAt: Timestamp;
1011
- updatedAt: Timestamp;
974
+ interface ClinicLocation {
975
+ address: string;
976
+ city: string;
977
+ country: string;
978
+ postalCode: string;
979
+ latitude: number;
980
+ longitude: number;
981
+ geohash?: string | null;
1012
982
  }
1013
983
  /**
1014
- * Interfejs za radno vreme zdravstvenog radnika u klinici
984
+ * Interface for working hours
1015
985
  */
1016
- interface PractitionerWorkingHours {
1017
- practitionerId: string;
1018
- clinicId: string;
986
+ interface WorkingHours {
1019
987
  monday: {
1020
- start: string;
1021
- end: string;
988
+ open: string;
989
+ close: string;
990
+ breaks?: {
991
+ start: string;
992
+ end: string;
993
+ }[];
1022
994
  } | null;
1023
995
  tuesday: {
1024
- start: string;
1025
- end: string;
996
+ open: string;
997
+ close: string;
998
+ breaks?: {
999
+ start: string;
1000
+ end: string;
1001
+ }[];
1026
1002
  } | null;
1027
1003
  wednesday: {
1028
- start: string;
1029
- end: string;
1004
+ open: string;
1005
+ close: string;
1006
+ breaks?: {
1007
+ start: string;
1008
+ end: string;
1009
+ }[];
1030
1010
  } | null;
1031
1011
  thursday: {
1032
- start: string;
1033
- end: string;
1012
+ open: string;
1013
+ close: string;
1014
+ breaks?: {
1015
+ start: string;
1016
+ end: string;
1017
+ }[];
1034
1018
  } | null;
1035
1019
  friday: {
1036
- start: string;
1037
- end: string;
1020
+ open: string;
1021
+ close: string;
1022
+ breaks?: {
1023
+ start: string;
1024
+ end: string;
1025
+ }[];
1038
1026
  } | null;
1039
1027
  saturday: {
1040
- start: string;
1041
- end: string;
1028
+ open: string;
1029
+ close: string;
1030
+ breaks?: {
1031
+ start: string;
1032
+ end: string;
1033
+ }[];
1042
1034
  } | null;
1043
1035
  sunday: {
1044
- start: string;
1045
- end: string;
1036
+ open: string;
1037
+ close: string;
1038
+ breaks?: {
1039
+ start: string;
1040
+ end: string;
1041
+ }[];
1046
1042
  } | null;
1043
+ }
1044
+ /**
1045
+ * Interface for contact person
1046
+ */
1047
+ interface ContactPerson {
1048
+ firstName: string;
1049
+ lastName: string;
1050
+ title?: string | null;
1051
+ email: string;
1052
+ phoneNumber?: string | null;
1053
+ }
1054
+ /**
1055
+ * Interface for clinic admin
1056
+ */
1057
+ interface ClinicAdmin {
1058
+ id: string;
1059
+ userRef: string;
1060
+ clinicGroupId: string;
1061
+ isGroupOwner: boolean;
1062
+ clinicsManaged: string[];
1063
+ clinicsManagedInfo: ClinicInfo[];
1064
+ contactInfo: ContactPerson;
1065
+ roleTitle: string;
1047
1066
  createdAt: Timestamp;
1048
1067
  updatedAt: Timestamp;
1068
+ isActive: boolean;
1049
1069
  }
1050
1070
  /**
1051
- * Token za pozivanje zdravstvenog radnika
1071
+ * Interface for creating a clinic admin
1052
1072
  */
1053
- interface PractitionerToken {
1073
+ interface CreateClinicAdminData {
1074
+ userRef: string;
1075
+ clinicGroupId?: string;
1076
+ isGroupOwner: boolean;
1077
+ clinicsManaged: string[];
1078
+ clinicsManagedInfo?: ClinicInfo[];
1079
+ contactInfo: ContactPerson;
1080
+ roleTitle: string;
1081
+ isActive: boolean;
1082
+ }
1083
+ /**
1084
+ * Interface for updating a clinic admin
1085
+ */
1086
+ interface UpdateClinicAdminData extends Partial<CreateClinicAdminData> {
1087
+ updatedAt?: FieldValue;
1088
+ clinicsManagedInfo?: ClinicInfo[];
1089
+ }
1090
+ /**
1091
+ * Enum for admin token status
1092
+ */
1093
+ declare enum AdminTokenStatus {
1094
+ ACTIVE = "active",
1095
+ USED = "used",
1096
+ EXPIRED = "expired"
1097
+ }
1098
+ /**
1099
+ * Interface for admin token
1100
+ */
1101
+ interface AdminToken {
1054
1102
  id: string;
1055
1103
  token: string;
1056
- practitionerId: string;
1057
- email: string;
1058
- clinicId: string;
1059
- status: PractitionerTokenStatus;
1060
- createdBy: string;
1104
+ email?: string | null;
1105
+ status: AdminTokenStatus;
1106
+ usedByUserRef?: string;
1061
1107
  createdAt: Timestamp;
1062
1108
  expiresAt: Timestamp;
1063
- usedBy?: string;
1064
- usedAt?: Timestamp;
1065
1109
  }
1066
1110
  /**
1067
- * Tip za kreiranje tokena za zdravstvenog radnika
1111
+ * Interface for admin information
1068
1112
  */
1069
- interface CreatePractitionerTokenData {
1070
- practitionerId: string;
1113
+ interface AdminInfo {
1114
+ id: string;
1115
+ name: string;
1071
1116
  email: string;
1072
- clinicId: string;
1073
- expiresAt?: Date;
1074
- }
1075
-
1076
- declare enum AllergyType {
1077
- MEDICATION = "medication",
1078
- FOOD = "food",
1079
- ENVIRONMENTAL = "environmental",
1080
- LATEX = "latex",
1081
- COSMETIC = "cosmetic",
1082
- OTHER = "other"
1083
1117
  }
1084
- declare enum MedicationAllergySubtype {
1085
- ANTIBIOTICS = "antibiotics",
1086
- NSAIDS = "nsaids",
1087
- OPIOIDS = "opioids",
1088
- ANESTHETICS = "anesthetics",
1089
- VACCINES = "vaccines",
1090
- OTHER = "other"
1118
+ /**
1119
+ * Enum for subscription models
1120
+ */
1121
+ declare enum SubscriptionModel {
1122
+ NO_SUBSCRIPTION = "no_subscription",
1123
+ BASIC = "basic",
1124
+ PREMIUM = "premium",
1125
+ ENTERPRISE = "enterprise"
1091
1126
  }
1092
- declare enum FoodAllergySubtype {
1127
+ /**
1128
+ * Interface for clinic group
1129
+ */
1130
+ interface ClinicGroup {
1131
+ id: string;
1132
+ name: string;
1133
+ description?: string;
1134
+ hqLocation: ClinicLocation;
1135
+ contactInfo: ClinicContactInfo;
1136
+ contactPerson: ContactPerson;
1137
+ clinics: string[];
1138
+ clinicsInfo: ClinicInfo[];
1139
+ admins: string[];
1140
+ adminsInfo: AdminInfo[];
1141
+ adminTokens: AdminToken[];
1142
+ ownerId: string | null;
1143
+ createdAt: Timestamp;
1144
+ updatedAt: Timestamp;
1145
+ isActive: boolean;
1146
+ logo?: string | null;
1147
+ practiceType?: PracticeType;
1148
+ languages?: Language[];
1149
+ subscriptionModel: SubscriptionModel;
1150
+ calendarSyncEnabled?: boolean;
1151
+ autoConfirmAppointments?: boolean;
1152
+ businessIdentificationNumber?: string | null;
1153
+ }
1154
+ /**
1155
+ * Interface for creating a clinic group
1156
+ */
1157
+ interface CreateClinicGroupData {
1158
+ name: string;
1159
+ description?: string;
1160
+ hqLocation: ClinicLocation;
1161
+ contactInfo: ClinicContactInfo;
1162
+ contactPerson: ContactPerson;
1163
+ ownerId: string | null;
1164
+ isActive: boolean;
1165
+ logo?: string | null;
1166
+ practiceType?: PracticeType;
1167
+ languages?: Language[];
1168
+ subscriptionModel?: SubscriptionModel;
1169
+ calendarSyncEnabled?: boolean;
1170
+ autoConfirmAppointments?: boolean;
1171
+ businessIdentificationNumber?: string | null;
1172
+ }
1173
+ /**
1174
+ * Interface for updating a clinic group
1175
+ */
1176
+ interface UpdateClinicGroupData extends Partial<CreateClinicGroupData> {
1177
+ updatedAt?: FieldValue;
1178
+ }
1179
+ /**
1180
+ * Interface for creating an admin token
1181
+ */
1182
+ interface CreateAdminTokenData {
1183
+ expiresInDays?: number;
1184
+ email?: string | null;
1185
+ }
1186
+ /**
1187
+ * Interface for doctor information
1188
+ */
1189
+ interface DoctorInfo {
1190
+ id: string;
1191
+ name: string;
1192
+ description?: string;
1193
+ photo: string;
1194
+ rating: number;
1195
+ services: string[];
1196
+ }
1197
+ /**
1198
+ * Interface for service information
1199
+ */
1200
+ /**
1201
+ * Interface for clinic
1202
+ */
1203
+ interface Clinic {
1204
+ id: string;
1205
+ clinicGroupId: string;
1206
+ name: string;
1207
+ description?: string;
1208
+ location: ClinicLocation;
1209
+ contactInfo: ClinicContactInfo;
1210
+ workingHours: WorkingHours;
1211
+ tags: ClinicTag[];
1212
+ featuredPhotos: string[];
1213
+ coverPhoto: string | null;
1214
+ photosWithTags?: {
1215
+ url: string;
1216
+ tag: string;
1217
+ }[];
1218
+ doctors: string[];
1219
+ doctorsInfo: DoctorInfo[];
1220
+ procedures: string[];
1221
+ proceduresInfo: ProcedureSummaryInfo[];
1222
+ reviewInfo: ClinicReviewInfo;
1223
+ admins: string[];
1224
+ createdAt: Timestamp;
1225
+ updatedAt: Timestamp;
1226
+ isActive: boolean;
1227
+ isVerified: boolean;
1228
+ logo?: string;
1229
+ }
1230
+ /**
1231
+ * Interface for creating a clinic
1232
+ */
1233
+ interface CreateClinicData {
1234
+ clinicGroupId: string;
1235
+ name: string;
1236
+ description?: string;
1237
+ location: ClinicLocation;
1238
+ contactInfo: ClinicContactInfo;
1239
+ workingHours: WorkingHours;
1240
+ tags: ClinicTag[];
1241
+ coverPhoto: string | null;
1242
+ photosWithTags?: {
1243
+ url: string;
1244
+ tag: string;
1245
+ }[];
1246
+ doctors: string[];
1247
+ procedures: string[];
1248
+ proceduresInfo?: ProcedureSummaryInfo[];
1249
+ admins: string[];
1250
+ isActive: boolean;
1251
+ isVerified: boolean;
1252
+ logo?: string;
1253
+ featuredPhotos?: string[];
1254
+ }
1255
+ /**
1256
+ * Interface for updating a clinic
1257
+ */
1258
+ interface UpdateClinicData extends Partial<CreateClinicData> {
1259
+ updatedAt?: FieldValue;
1260
+ }
1261
+ /**
1262
+ * Interface for creating a default clinic group
1263
+ */
1264
+ interface CreateDefaultClinicGroupData {
1265
+ name: string;
1266
+ ownerId: string | null;
1267
+ contactPerson: ContactPerson;
1268
+ contactInfo: ClinicContactInfo;
1269
+ hqLocation: ClinicLocation;
1270
+ isActive: boolean;
1271
+ logo?: string | null;
1272
+ practiceType?: PracticeType;
1273
+ languages?: Language[];
1274
+ subscriptionModel?: SubscriptionModel;
1275
+ }
1276
+ /**
1277
+ * Interface for clinic admin signup data
1278
+ */
1279
+ interface ClinicAdminSignupData {
1280
+ email: string;
1281
+ password: string;
1282
+ firstName: string;
1283
+ lastName: string;
1284
+ title: string;
1285
+ phoneNumber: string;
1286
+ isCreatingNewGroup: boolean;
1287
+ inviteToken?: string;
1288
+ clinicGroupData?: {
1289
+ name: string;
1290
+ hqLocation: ClinicLocation;
1291
+ logo?: string;
1292
+ contactInfo: ClinicContactInfo;
1293
+ subscriptionModel?: SubscriptionModel;
1294
+ };
1295
+ }
1296
+ /**
1297
+ * Interface for clinic group setup data
1298
+ */
1299
+ interface ClinicGroupSetupData {
1300
+ languages: Language[];
1301
+ practiceType: PracticeType;
1302
+ description: string;
1303
+ logo: string;
1304
+ calendarSyncEnabled: boolean;
1305
+ autoConfirmAppointments: boolean;
1306
+ businessIdentificationNumber: string | null;
1307
+ }
1308
+ /**
1309
+ * Interface for clinic branch setup data
1310
+ */
1311
+ interface ClinicBranchSetupData {
1312
+ name: string;
1313
+ location: ClinicLocation;
1314
+ description?: string;
1315
+ contactInfo: ClinicContactInfo;
1316
+ workingHours: WorkingHours;
1317
+ tags: ClinicTag[];
1318
+ logo?: string;
1319
+ coverPhoto: string | null;
1320
+ photosWithTags?: {
1321
+ url: string;
1322
+ tag: string;
1323
+ }[];
1324
+ featuredPhotos?: string[];
1325
+ }
1326
+ /**
1327
+ * Interface for clinic tags
1328
+ */
1329
+ interface ClinicTags {
1330
+ tags: ClinicTag[];
1331
+ }
1332
+
1333
+ declare const PRACTITIONERS_COLLECTION = "practitioners";
1334
+ declare const REGISTER_TOKENS_COLLECTION = "register_tokens";
1335
+ /**
1336
+ * Osnovne informacije o zdravstvenom radniku
1337
+ */
1338
+ interface PractitionerBasicInfo {
1339
+ firstName: string;
1340
+ lastName: string;
1341
+ title: string;
1342
+ email: string;
1343
+ phoneNumber: string;
1344
+ dateOfBirth: Timestamp | Date;
1345
+ gender: "male" | "female" | "other";
1346
+ profileImageUrl?: string;
1347
+ bio?: string;
1348
+ languages: string[];
1349
+ }
1350
+ /**
1351
+ * Sertifikacija zdravstvenog radnika
1352
+ */
1353
+ interface PractitionerCertification {
1354
+ level: CertificationLevel;
1355
+ specialties: CertificationSpecialty[];
1356
+ licenseNumber: string;
1357
+ issuingAuthority: string;
1358
+ issueDate: Timestamp | Date;
1359
+ expiryDate?: Timestamp | Date;
1360
+ verificationStatus: "pending" | "verified" | "rejected";
1361
+ }
1362
+ /**
1363
+ * Interfejs za radno vreme zdravstvenog radnika u klinici
1364
+ */
1365
+ interface PractitionerClinicWorkingHours {
1366
+ clinicId: string;
1367
+ workingHours: {
1368
+ monday: {
1369
+ start: string;
1370
+ end: string;
1371
+ } | null;
1372
+ tuesday: {
1373
+ start: string;
1374
+ end: string;
1375
+ } | null;
1376
+ wednesday: {
1377
+ start: string;
1378
+ end: string;
1379
+ } | null;
1380
+ thursday: {
1381
+ start: string;
1382
+ end: string;
1383
+ } | null;
1384
+ friday: {
1385
+ start: string;
1386
+ end: string;
1387
+ } | null;
1388
+ saturday: {
1389
+ start: string;
1390
+ end: string;
1391
+ } | null;
1392
+ sunday: {
1393
+ start: string;
1394
+ end: string;
1395
+ } | null;
1396
+ };
1397
+ isActive: boolean;
1398
+ createdAt: Timestamp | Date;
1399
+ updatedAt: Timestamp | Date;
1400
+ }
1401
+ /**
1402
+ * Status of practitioner profile
1403
+ */
1404
+ declare enum PractitionerStatus {
1405
+ DRAFT = "draft",
1406
+ ACTIVE = "active"
1407
+ }
1408
+ /**
1409
+ * Token status for practitioner invitations
1410
+ */
1411
+ declare enum PractitionerTokenStatus {
1412
+ ACTIVE = "active",
1413
+ USED = "used",
1414
+ EXPIRED = "expired",
1415
+ REVOKED = "revoked"
1416
+ }
1417
+ /**
1418
+ * Interfejs za zdravstvenog radnika
1419
+ */
1420
+ interface Practitioner {
1421
+ id: string;
1422
+ userRef: string;
1423
+ basicInfo: PractitionerBasicInfo;
1424
+ certification: PractitionerCertification;
1425
+ clinics: string[];
1426
+ clinicWorkingHours: PractitionerClinicWorkingHours[];
1427
+ clinicsInfo: ClinicInfo[];
1428
+ procedures: string[];
1429
+ proceduresInfo: ProcedureSummaryInfo[];
1430
+ reviewInfo: PractitionerReviewInfo;
1431
+ isActive: boolean;
1432
+ isVerified: boolean;
1433
+ status: PractitionerStatus;
1434
+ createdAt: Timestamp;
1435
+ updatedAt: Timestamp;
1436
+ }
1437
+ /**
1438
+ * Tip za kreiranje novog zdravstvenog radnika
1439
+ */
1440
+ interface CreatePractitionerData {
1441
+ userRef: string;
1442
+ basicInfo: PractitionerBasicInfo;
1443
+ certification: PractitionerCertification;
1444
+ clinics?: string[];
1445
+ clinicWorkingHours?: PractitionerClinicWorkingHours[];
1446
+ clinicsInfo?: ClinicInfo[];
1447
+ isActive: boolean;
1448
+ isVerified: boolean;
1449
+ status?: PractitionerStatus;
1450
+ }
1451
+ /**
1452
+ * Tip za kreiranje draft profila zdravstvenog radnika
1453
+ */
1454
+ interface CreateDraftPractitionerData {
1455
+ basicInfo: PractitionerBasicInfo;
1456
+ certification: PractitionerCertification;
1457
+ clinics?: string[];
1458
+ clinicWorkingHours?: PractitionerClinicWorkingHours[];
1459
+ clinicsInfo?: ClinicInfo[];
1460
+ isActive?: boolean;
1461
+ isVerified?: boolean;
1462
+ }
1463
+ /**
1464
+ * Tip za ažuriranje zdravstvenog radnika
1465
+ */
1466
+ interface UpdatePractitionerData extends Partial<CreatePractitionerData> {
1467
+ updatedAt?: FieldValue;
1468
+ proceduresInfo?: ProcedureSummaryInfo[];
1469
+ }
1470
+ /**
1471
+ * Interfejs za procedure koje zdravstveni radnik izvodi u određenoj klinici
1472
+ */
1473
+ interface PractitionerClinicProcedures {
1474
+ practitionerId: string;
1475
+ clinicId: string;
1476
+ procedures: string[];
1477
+ isActive: boolean;
1478
+ createdAt: Timestamp;
1479
+ updatedAt: Timestamp;
1480
+ }
1481
+ /**
1482
+ * Interfejs za radno vreme zdravstvenog radnika u klinici
1483
+ */
1484
+ interface PractitionerWorkingHours {
1485
+ practitionerId: string;
1486
+ clinicId: string;
1487
+ monday: {
1488
+ start: string;
1489
+ end: string;
1490
+ } | null;
1491
+ tuesday: {
1492
+ start: string;
1493
+ end: string;
1494
+ } | null;
1495
+ wednesday: {
1496
+ start: string;
1497
+ end: string;
1498
+ } | null;
1499
+ thursday: {
1500
+ start: string;
1501
+ end: string;
1502
+ } | null;
1503
+ friday: {
1504
+ start: string;
1505
+ end: string;
1506
+ } | null;
1507
+ saturday: {
1508
+ start: string;
1509
+ end: string;
1510
+ } | null;
1511
+ sunday: {
1512
+ start: string;
1513
+ end: string;
1514
+ } | null;
1515
+ createdAt: Timestamp;
1516
+ updatedAt: Timestamp;
1517
+ }
1518
+ /**
1519
+ * Token za pozivanje zdravstvenog radnika
1520
+ */
1521
+ interface PractitionerToken {
1522
+ id: string;
1523
+ token: string;
1524
+ practitionerId: string;
1525
+ email: string;
1526
+ clinicId: string;
1527
+ status: PractitionerTokenStatus;
1528
+ createdBy: string;
1529
+ createdAt: Timestamp;
1530
+ expiresAt: Timestamp;
1531
+ usedBy?: string;
1532
+ usedAt?: Timestamp;
1533
+ }
1534
+ /**
1535
+ * Tip za kreiranje tokena za zdravstvenog radnika
1536
+ */
1537
+ interface CreatePractitionerTokenData {
1538
+ practitionerId: string;
1539
+ email: string;
1540
+ clinicId: string;
1541
+ expiresAt?: Date;
1542
+ }
1543
+
1544
+ declare enum AllergyType {
1545
+ MEDICATION = "medication",
1546
+ FOOD = "food",
1547
+ ENVIRONMENTAL = "environmental",
1548
+ LATEX = "latex",
1549
+ COSMETIC = "cosmetic",
1550
+ OTHER = "other"
1551
+ }
1552
+ declare enum MedicationAllergySubtype {
1553
+ ANTIBIOTICS = "antibiotics",
1554
+ NSAIDS = "nsaids",
1555
+ OPIOIDS = "opioids",
1556
+ ANESTHETICS = "anesthetics",
1557
+ VACCINES = "vaccines",
1558
+ OTHER = "other"
1559
+ }
1560
+ declare enum FoodAllergySubtype {
1093
1561
  NUTS = "nuts",
1094
1562
  SHELLFISH = "shellfish",
1095
1563
  DAIRY = "dairy",
@@ -1200,763 +1668,577 @@ interface AddBlockingConditionData {
1200
1668
  condition: BlockingCondition;
1201
1669
  diagnosedAt: Timestamp;
1202
1670
  isActive: boolean;
1203
- notes?: string;
1204
- }
1205
- interface UpdateBlockingConditionData extends Partial<AddBlockingConditionData> {
1206
- conditionIndex: number;
1207
- }
1208
- interface AddContraindicationData {
1209
- condition: Contraindication;
1210
- lastOccurrence: Timestamp;
1211
- frequency: "rare" | "occasional" | "frequent";
1212
- isActive: boolean;
1213
- notes?: string;
1214
- }
1215
- interface UpdateContraindicationData extends Partial<AddContraindicationData> {
1216
- contraindicationIndex: number;
1217
- }
1218
- interface AddMedicationData {
1219
- name: string;
1220
- dosage: string;
1221
- frequency: string;
1222
- startDate: Timestamp;
1223
- endDate?: Timestamp;
1224
- prescribedBy?: string;
1225
- }
1226
- interface UpdateMedicationData extends Partial<AddMedicationData> {
1227
- medicationIndex: number;
1228
- }
1229
-
1230
- declare const PATIENTS_COLLECTION = "patients";
1231
- declare const PATIENT_SENSITIVE_INFO_COLLECTION = "sensitive-info";
1232
- declare const PATIENT_MEDICAL_HISTORY_COLLECTION = "medical-history";
1233
- declare const PATIENT_APPOINTMENTS_COLLECTION = "appointments";
1234
- declare const PATIENT_LOCATION_INFO_COLLECTION = "location-info";
1235
- /**
1236
- * Enumeracija za pol pacijenta
1237
- */
1238
- declare enum Gender {
1239
- MALE = "male",
1240
- FEMALE = "female",
1241
- TRANSGENDER_MALE = "transgender_male",
1242
- TRANSGENDER_FEMALE = "transgender_female",
1243
- PREFER_NOT_TO_SAY = "prefer_not_to_say",
1244
- OTHER = "other"
1245
- }
1246
- /**
1247
- * Interfejs za geoprostorne podatke
1248
- */
1249
- interface LocationData {
1250
- latitude: number;
1251
- longitude: number;
1252
- geohash?: string;
1253
- }
1254
- /**
1255
- * Interfejs za adresne podatke
1256
- */
1257
- interface AddressData {
1258
- address: string;
1259
- city: string;
1260
- country: string;
1261
- postalCode: string;
1262
- }
1263
- /**
1264
- * Interfejs za kontakt za hitne slučajeve
1265
- */
1266
- interface EmergencyContact {
1267
- name: string;
1268
- relationship: string;
1269
- phoneNumber: string;
1270
- isNotifiable: boolean;
1271
- }
1272
- /**
1273
- * Interfejs za gamifikaciju
1274
- */
1275
- interface GamificationInfo {
1276
- /** Nivo korisnika */
1277
- level: number;
1278
- /** Trenutni poeni */
1279
- points: number;
1280
- }
1281
- /**
1282
- * Interfejs za lokacijske informacije pacijenta (subkolekcija)
1283
- */
1284
- interface PatientLocationInfo {
1285
- patientId: string;
1286
- userRef: string;
1287
- locationData: LocationData;
1288
- createdAt: Timestamp;
1289
- updatedAt: Timestamp;
1290
- }
1291
- /**
1292
- * Tip za kreiranje lokacijskih informacija
1293
- */
1294
- interface CreatePatientLocationInfoData {
1295
- patientId: string;
1296
- userRef: string;
1297
- locationData: LocationData;
1298
- }
1299
- /**
1300
- * Tip za ažuriranje lokacijskih informacija
1301
- */
1302
- interface UpdatePatientLocationInfoData extends Partial<CreatePatientLocationInfoData> {
1303
- updatedAt?: FieldValue;
1304
- }
1305
- /**
1306
- * Interfejs za osetljive informacije pacijenta (subkolekcija)
1307
- */
1308
- interface PatientSensitiveInfo {
1309
- patientId: string;
1310
- userRef: string;
1311
- photoUrl?: string;
1312
- firstName: string;
1313
- lastName: string;
1314
- dateOfBirth: Timestamp | null;
1315
- gender: Gender;
1316
- email?: string;
1317
- phoneNumber?: string;
1318
- alternativePhoneNumber?: string;
1319
- addressData?: AddressData;
1320
- emergencyContacts?: EmergencyContact[];
1321
- createdAt: Timestamp;
1322
- updatedAt: Timestamp;
1323
- }
1324
- /**
1325
- * Tip za kreiranje osetljivih informacija
1326
- */
1327
- interface CreatePatientSensitiveInfoData {
1328
- patientId: string;
1329
- userRef: string;
1330
- photoUrl?: string;
1331
- firstName: string;
1332
- lastName: string;
1333
- dateOfBirth: Timestamp | null;
1334
- gender: Gender;
1335
- email?: string;
1336
- phoneNumber?: string;
1337
- alternativePhoneNumber?: string;
1338
- addressData?: AddressData;
1339
- emergencyContacts?: EmergencyContact[];
1340
- }
1341
- /**
1342
- * Tip za ažuriranje osetljivih informacija
1343
- */
1344
- interface UpdatePatientSensitiveInfoData extends Partial<CreatePatientSensitiveInfoData> {
1345
- updatedAt?: FieldValue;
1346
- }
1347
- /**
1348
- * Interfejs za doktora pacijenta
1349
- */
1350
- interface PatientDoctor {
1351
- userRef: string;
1352
- assignedAt: Timestamp;
1353
- assignedBy?: string;
1354
- isActive: boolean;
1355
- notes?: string;
1356
- }
1357
- /**
1358
- * Interfejs za kliniku pacijenta
1359
- */
1360
- interface PatientClinic {
1361
- clinicId: string;
1362
- assignedAt: Timestamp;
1363
- assignedBy?: string;
1364
- isActive: boolean;
1365
- notes?: string;
1366
- }
1367
- /**
1368
- * Glavni interfejs za Patient profil (top-level kolekcija)
1369
- */
1370
- interface PatientProfile {
1371
- id: string;
1372
- userRef: string;
1373
- displayName: string;
1374
- profilePhoto: string | null;
1375
- gamification: GamificationInfo;
1376
- expoTokens: string[];
1377
- isActive: boolean;
1378
- isVerified: boolean;
1379
- phoneNumber?: string | null;
1380
- dateOfBirth?: Timestamp | null;
1381
- doctors: PatientDoctor[];
1382
- clinics: PatientClinic[];
1383
- doctorIds: string[];
1384
- clinicIds: string[];
1385
- createdAt: Timestamp;
1386
- updatedAt: Timestamp;
1387
- }
1388
- /**
1389
- * Tip za kreiranje novog Patient profila
1390
- */
1391
- interface CreatePatientProfileData {
1392
- userRef: string;
1393
- displayName: string;
1394
- expoTokens: string[];
1395
- gamification?: GamificationInfo;
1396
- isActive: boolean;
1397
- isVerified: boolean;
1398
- doctors?: PatientDoctor[];
1399
- clinics?: PatientClinic[];
1400
- doctorIds?: string[];
1401
- clinicIds?: string[];
1402
- }
1403
- /**
1404
- * Tip za ažuriranje Patient profila
1405
- */
1406
- interface UpdatePatientProfileData extends Partial<Omit<PatientProfile, "id" | "createdAt" | "updatedAt">> {
1407
- updatedAt?: FieldValue;
1408
- }
1409
- /**
1410
- * Parameters for searching patient profiles.
1411
- */
1412
- interface SearchPatientsParams {
1413
- /** Optional: Filter patients associated with this clinic ID. */
1414
- clinicId?: string;
1415
- /** Optional: Filter patients associated with this practitioner ID. */
1416
- practitionerId?: string;
1417
- }
1418
- /**
1419
- * Information about the entity requesting the patient search.
1420
- */
1421
- interface RequesterInfo {
1422
- /** ID of the clinic admin user or practitioner user making the request. */
1423
- id: string;
1424
- /** Role of the requester, determining the search context. */
1425
- role: "clinic_admin" | "practitioner";
1426
- /** If role is 'clinic_admin', this is the associated clinic ID. */
1427
- associatedClinicId?: string;
1428
- /** If role is 'practitioner', this is the associated practitioner profile ID. */
1429
- associatedPractitionerId?: string;
1430
- }
1431
-
1432
- interface PatientProfileComplete {
1433
- patientProfile?: PatientProfile;
1434
- patientSensitiveInfo?: PatientSensitiveInfo;
1435
- patientMedicalInfo?: PatientMedicalInfo;
1436
- patientLocationInfo?: PatientLocationInfo;
1437
- }
1438
-
1439
- /**
1440
- * Interface for clinic profile information
1441
- */
1442
- interface ClinicInfo {
1443
- id: string;
1444
- featuredPhoto: string;
1445
- name: string;
1446
- description?: string | null;
1447
- location: ClinicLocation;
1448
- contactInfo: ClinicContactInfo;
1671
+ notes?: string;
1449
1672
  }
1450
- /**
1451
- * Interface for practitioner profile information
1452
- */
1453
- interface PractitionerProfileInfo {
1454
- id: string;
1455
- practitionerPhoto: string | null;
1456
- name: string;
1457
- email: string;
1458
- phone: string | null;
1459
- certification: PractitionerCertification;
1673
+ interface UpdateBlockingConditionData extends Partial<AddBlockingConditionData> {
1674
+ conditionIndex: number;
1460
1675
  }
1461
- /**
1462
- * Interface for patient profile information
1463
- */
1464
- interface PatientProfileInfo {
1465
- id: string;
1466
- fullName: string;
1467
- email: string;
1468
- phone: string | null;
1469
- dateOfBirth: Timestamp$1;
1470
- gender: Gender;
1676
+ interface AddContraindicationData {
1677
+ condition: Contraindication;
1678
+ lastOccurrence: Timestamp;
1679
+ frequency: "rare" | "occasional" | "frequent";
1680
+ isActive: boolean;
1681
+ notes?: string;
1471
1682
  }
1472
-
1473
- /**
1474
- * Enum for practice types
1475
- */
1476
- declare enum PracticeType {
1477
- GENERAL_PRACTICE = "general_practice",
1478
- DENTAL = "dental",
1479
- DERMATOLOGY = "dermatology",
1480
- CARDIOLOGY = "cardiology",
1481
- ORTHOPEDICS = "orthopedics",
1482
- GYNECOLOGY = "gynecology",
1483
- PEDIATRICS = "pediatrics",
1484
- OPHTHALMOLOGY = "ophthalmology",
1485
- NEUROLOGY = "neurology",
1486
- PSYCHIATRY = "psychiatry",
1487
- UROLOGY = "urology",
1488
- ONCOLOGY = "oncology",
1489
- ENDOCRINOLOGY = "endocrinology",
1490
- GASTROENTEROLOGY = "gastroenterology",
1491
- PULMONOLOGY = "pulmonology",
1492
- RHEUMATOLOGY = "rheumatology",
1493
- PHYSICAL_THERAPY = "physical_therapy",
1494
- NUTRITION = "nutrition",
1495
- ALTERNATIVE_MEDICINE = "alternative_medicine",
1496
- OTHER = "other"
1683
+ interface UpdateContraindicationData extends Partial<AddContraindicationData> {
1684
+ contraindicationIndex: number;
1497
1685
  }
1498
- /**
1499
- * Enum for languages
1500
- */
1501
- declare enum Language {
1502
- ENGLISH = "english",
1503
- GERMAN = "german",
1504
- ITALIAN = "italian",
1505
- FRENCH = "french",
1506
- SPANISH = "spanish"
1686
+ interface AddMedicationData {
1687
+ name: string;
1688
+ dosage: string;
1689
+ frequency: string;
1690
+ startDate: Timestamp;
1691
+ endDate?: Timestamp;
1692
+ prescribedBy?: string;
1507
1693
  }
1508
- /**
1509
- * Enum for all possible clinic tags
1510
- */
1511
- declare enum ClinicTag {
1512
- PARKING = "parking",
1513
- WIFI = "wifi",
1514
- WHEELCHAIR_ACCESS = "wheelchair_access",
1515
- CAFE = "cafe",
1516
- PHARMACY = "pharmacy",
1517
- WAITING_ROOM = "waiting_room",
1518
- CARD_PAYMENT = "card_payment",
1519
- INSURANCE = "insurance",
1520
- CHILDREN_AREA = "children_area",
1521
- TV = "tv",
1522
- AIR_CONDITIONING = "air_conditioning",
1523
- WATER_DISPENSER = "water_dispenser",
1524
- VENDING_MACHINE = "vending_machine",
1525
- ELEVATOR = "elevator",
1526
- RAMP = "ramp",
1527
- HANDICAP_PARKING = "handicap_parking",
1528
- BRAILLE = "braille",
1529
- SIGN_LANGUAGE = "sign_language",
1530
- EMERGENCY_SERVICE = "emergency_service",
1531
- LAB = "lab",
1532
- XRAY = "xray",
1533
- ULTRASOUND = "ultrasound",
1534
- DENTAL = "dental",
1535
- PEDIATRIC = "pediatric",
1536
- GYNECOLOGY = "gynecology",
1537
- CARDIOLOGY = "cardiology",
1538
- DERMATOLOGY = "dermatology",
1539
- ORTHOPEDIC = "orthopedic",
1540
- OPHTHALMOLOGY = "ophthalmology",
1541
- TELEMEDICINE = "telemedicine",
1542
- HOME_VISITS = "home_visits",
1543
- ONLINE_BOOKING = "online_booking",
1544
- MOBILE_APP = "mobile_app",
1545
- SMS_NOTIFICATIONS = "sms_notifications",
1546
- EMAIL_NOTIFICATIONS = "email_notifications",
1547
- ENGLISH = "english",
1548
- SERBIAN = "serbian",
1549
- GERMAN = "german",
1550
- RUSSIAN = "russian",
1551
- CHINESE = "chinese",
1552
- SPANISH = "spanish",
1553
- FRENCH = "french",
1554
- OPEN_24_7 = "open_24_7",
1555
- WEEKEND_HOURS = "weekend_hours",
1556
- NIGHT_SHIFT = "night_shift",
1557
- HOLIDAY_HOURS = "holiday_hours"
1694
+ interface UpdateMedicationData extends Partial<AddMedicationData> {
1695
+ medicationIndex: number;
1558
1696
  }
1697
+
1698
+ declare const PATIENTS_COLLECTION = "patients";
1699
+ declare const PATIENT_SENSITIVE_INFO_COLLECTION = "sensitive-info";
1700
+ declare const PATIENT_MEDICAL_HISTORY_COLLECTION = "medical-history";
1701
+ declare const PATIENT_APPOINTMENTS_COLLECTION = "appointments";
1702
+ declare const PATIENT_LOCATION_INFO_COLLECTION = "location-info";
1559
1703
  /**
1560
- * Enum for clinic photo tags
1561
- * Used to categorize photos of different areas/parts of the clinic
1704
+ * Enumeracija za pol pacijenta
1562
1705
  */
1563
- declare enum ClinicPhotoTag {
1564
- BUILDING_EXTERIOR = "building_exterior",
1565
- ENTRANCE = "entrance",
1566
- PARKING = "parking",
1567
- RECEPTION = "reception",
1568
- WAITING_ROOM = "waiting_room",
1569
- HALLWAY = "hallway",
1570
- EXAM_ROOM = "exam_room",
1571
- TREATMENT_ROOM = "treatment_room",
1572
- LABORATORY = "laboratory",
1573
- XRAY_ROOM = "xray_room",
1574
- ULTRASOUND_ROOM = "ultrasound_room",
1575
- DENTAL_OFFICE = "dental_office",
1576
- OPERATING_ROOM = "operating_room",
1577
- RECOVERY_ROOM = "recovery_room",
1578
- MEDICAL_EQUIPMENT = "medical_equipment",
1579
- PHARMACY = "pharmacy",
1580
- CAFETERIA = "cafeteria",
1581
- CHILDREN_AREA = "children_area",
1582
- STAFF = "staff",
1706
+ declare enum Gender {
1707
+ MALE = "male",
1708
+ FEMALE = "female",
1709
+ TRANSGENDER_MALE = "transgender_male",
1710
+ TRANSGENDER_FEMALE = "transgender_female",
1711
+ PREFER_NOT_TO_SAY = "prefer_not_to_say",
1583
1712
  OTHER = "other"
1584
1713
  }
1585
-
1586
- declare const CLINIC_GROUPS_COLLECTION = "clinic_groups";
1587
- declare const CLINIC_ADMINS_COLLECTION = "clinic_admins";
1588
- declare const CLINICS_COLLECTION = "clinics";
1589
-
1590
1714
  /**
1591
- * Interface for clinic contact information
1715
+ * Interfejs za geoprostorne podatke
1592
1716
  */
1593
- interface ClinicContactInfo {
1594
- email: string;
1595
- phoneNumber: string;
1596
- alternativePhoneNumber?: string | null;
1597
- website?: string | null;
1717
+ interface LocationData {
1718
+ latitude: number;
1719
+ longitude: number;
1720
+ geohash?: string;
1598
1721
  }
1599
1722
  /**
1600
- * Interface for clinic location
1723
+ * Interfejs za adresne podatke
1601
1724
  */
1602
- interface ClinicLocation {
1725
+ interface AddressData {
1603
1726
  address: string;
1604
1727
  city: string;
1605
1728
  country: string;
1606
1729
  postalCode: string;
1607
- latitude: number;
1608
- longitude: number;
1609
- geohash?: string | null;
1610
- }
1611
- /**
1612
- * Interface for working hours
1613
- */
1614
- interface WorkingHours {
1615
- monday: {
1616
- open: string;
1617
- close: string;
1618
- breaks?: {
1619
- start: string;
1620
- end: string;
1621
- }[];
1622
- } | null;
1623
- tuesday: {
1624
- open: string;
1625
- close: string;
1626
- breaks?: {
1627
- start: string;
1628
- end: string;
1629
- }[];
1630
- } | null;
1631
- wednesday: {
1632
- open: string;
1633
- close: string;
1634
- breaks?: {
1635
- start: string;
1636
- end: string;
1637
- }[];
1638
- } | null;
1639
- thursday: {
1640
- open: string;
1641
- close: string;
1642
- breaks?: {
1643
- start: string;
1644
- end: string;
1645
- }[];
1646
- } | null;
1647
- friday: {
1648
- open: string;
1649
- close: string;
1650
- breaks?: {
1651
- start: string;
1652
- end: string;
1653
- }[];
1654
- } | null;
1655
- saturday: {
1656
- open: string;
1657
- close: string;
1658
- breaks?: {
1659
- start: string;
1660
- end: string;
1661
- }[];
1662
- } | null;
1663
- sunday: {
1664
- open: string;
1665
- close: string;
1666
- breaks?: {
1667
- start: string;
1668
- end: string;
1669
- }[];
1670
- } | null;
1671
1730
  }
1672
1731
  /**
1673
- * Interface for contact person
1732
+ * Interfejs za kontakt za hitne slučajeve
1674
1733
  */
1675
- interface ContactPerson {
1676
- firstName: string;
1677
- lastName: string;
1678
- title?: string | null;
1679
- email: string;
1680
- phoneNumber?: string | null;
1734
+ interface EmergencyContact {
1735
+ name: string;
1736
+ relationship: string;
1737
+ phoneNumber: string;
1738
+ isNotifiable: boolean;
1681
1739
  }
1682
1740
  /**
1683
- * Interface for clinic admin
1741
+ * Interfejs za gamifikaciju
1684
1742
  */
1685
- interface ClinicAdmin {
1686
- id: string;
1743
+ interface GamificationInfo {
1744
+ /** Nivo korisnika */
1745
+ level: number;
1746
+ /** Trenutni poeni */
1747
+ points: number;
1748
+ }
1749
+ /**
1750
+ * Interfejs za lokacijske informacije pacijenta (subkolekcija)
1751
+ */
1752
+ interface PatientLocationInfo {
1753
+ patientId: string;
1687
1754
  userRef: string;
1688
- clinicGroupId: string;
1689
- isGroupOwner: boolean;
1690
- clinicsManaged: string[];
1691
- clinicsManagedInfo: ClinicInfo[];
1692
- contactInfo: ContactPerson;
1693
- roleTitle: string;
1755
+ locationData: LocationData;
1694
1756
  createdAt: Timestamp;
1695
1757
  updatedAt: Timestamp;
1696
- isActive: boolean;
1697
1758
  }
1698
1759
  /**
1699
- * Interface for creating a clinic admin
1760
+ * Tip za kreiranje lokacijskih informacija
1700
1761
  */
1701
- interface CreateClinicAdminData {
1762
+ interface CreatePatientLocationInfoData {
1763
+ patientId: string;
1702
1764
  userRef: string;
1703
- clinicGroupId?: string;
1704
- isGroupOwner: boolean;
1705
- clinicsManaged: string[];
1706
- clinicsManagedInfo?: ClinicInfo[];
1707
- contactInfo: ContactPerson;
1708
- roleTitle: string;
1709
- isActive: boolean;
1765
+ locationData: LocationData;
1710
1766
  }
1711
1767
  /**
1712
- * Interface for updating a clinic admin
1768
+ * Tip za ažuriranje lokacijskih informacija
1713
1769
  */
1714
- interface UpdateClinicAdminData extends Partial<CreateClinicAdminData> {
1770
+ interface UpdatePatientLocationInfoData extends Partial<CreatePatientLocationInfoData> {
1715
1771
  updatedAt?: FieldValue;
1716
- clinicsManagedInfo?: ClinicInfo[];
1717
1772
  }
1718
1773
  /**
1719
- * Enum for admin token status
1774
+ * Interfejs za osetljive informacije pacijenta (subkolekcija)
1720
1775
  */
1721
- declare enum AdminTokenStatus {
1722
- ACTIVE = "active",
1723
- USED = "used",
1724
- EXPIRED = "expired"
1776
+ interface PatientSensitiveInfo {
1777
+ patientId: string;
1778
+ userRef: string;
1779
+ photoUrl?: string;
1780
+ firstName: string;
1781
+ lastName: string;
1782
+ dateOfBirth: Timestamp | null;
1783
+ gender: Gender;
1784
+ email?: string;
1785
+ phoneNumber?: string;
1786
+ alternativePhoneNumber?: string;
1787
+ addressData?: AddressData;
1788
+ emergencyContacts?: EmergencyContact[];
1789
+ createdAt: Timestamp;
1790
+ updatedAt: Timestamp;
1725
1791
  }
1726
1792
  /**
1727
- * Interface for admin token
1793
+ * Tip za kreiranje osetljivih informacija
1728
1794
  */
1729
- interface AdminToken {
1730
- id: string;
1731
- token: string;
1732
- email?: string | null;
1733
- status: AdminTokenStatus;
1734
- usedByUserRef?: string;
1735
- createdAt: Timestamp;
1736
- expiresAt: Timestamp;
1795
+ interface CreatePatientSensitiveInfoData {
1796
+ patientId: string;
1797
+ userRef: string;
1798
+ photoUrl?: string;
1799
+ firstName: string;
1800
+ lastName: string;
1801
+ dateOfBirth: Timestamp | null;
1802
+ gender: Gender;
1803
+ email?: string;
1804
+ phoneNumber?: string;
1805
+ alternativePhoneNumber?: string;
1806
+ addressData?: AddressData;
1807
+ emergencyContacts?: EmergencyContact[];
1737
1808
  }
1738
1809
  /**
1739
- * Interface for admin information
1810
+ * Tip za ažuriranje osetljivih informacija
1740
1811
  */
1741
- interface AdminInfo {
1742
- id: string;
1743
- name: string;
1744
- email: string;
1812
+ interface UpdatePatientSensitiveInfoData extends Partial<CreatePatientSensitiveInfoData> {
1813
+ updatedAt?: FieldValue;
1745
1814
  }
1746
1815
  /**
1747
- * Enum for subscription models
1816
+ * Interfejs za doktora pacijenta
1748
1817
  */
1749
- declare enum SubscriptionModel {
1750
- NO_SUBSCRIPTION = "no_subscription",
1751
- BASIC = "basic",
1752
- PREMIUM = "premium",
1753
- ENTERPRISE = "enterprise"
1818
+ interface PatientDoctor {
1819
+ userRef: string;
1820
+ assignedAt: Timestamp;
1821
+ assignedBy?: string;
1822
+ isActive: boolean;
1823
+ notes?: string;
1754
1824
  }
1755
1825
  /**
1756
- * Interface for clinic group
1826
+ * Interfejs za kliniku pacijenta
1757
1827
  */
1758
- interface ClinicGroup {
1828
+ interface PatientClinic {
1829
+ clinicId: string;
1830
+ assignedAt: Timestamp;
1831
+ assignedBy?: string;
1832
+ isActive: boolean;
1833
+ notes?: string;
1834
+ }
1835
+ /**
1836
+ * Glavni interfejs za Patient profil (top-level kolekcija)
1837
+ */
1838
+ interface PatientProfile {
1759
1839
  id: string;
1760
- name: string;
1761
- description?: string;
1762
- hqLocation: ClinicLocation;
1763
- contactInfo: ClinicContactInfo;
1764
- contactPerson: ContactPerson;
1765
- clinics: string[];
1766
- clinicsInfo: ClinicInfo[];
1767
- admins: string[];
1768
- adminsInfo: AdminInfo[];
1769
- adminTokens: AdminToken[];
1770
- ownerId: string | null;
1840
+ userRef: string;
1841
+ displayName: string;
1842
+ profilePhoto: string | null;
1843
+ gamification: GamificationInfo;
1844
+ expoTokens: string[];
1845
+ isActive: boolean;
1846
+ isVerified: boolean;
1847
+ phoneNumber?: string | null;
1848
+ dateOfBirth?: Timestamp | null;
1849
+ doctors: PatientDoctor[];
1850
+ clinics: PatientClinic[];
1851
+ doctorIds: string[];
1852
+ clinicIds: string[];
1771
1853
  createdAt: Timestamp;
1772
1854
  updatedAt: Timestamp;
1773
- isActive: boolean;
1774
- logo?: string | null;
1775
- practiceType?: PracticeType;
1776
- languages?: Language[];
1777
- subscriptionModel: SubscriptionModel;
1778
- calendarSyncEnabled?: boolean;
1779
- autoConfirmAppointments?: boolean;
1780
- businessIdentificationNumber?: string | null;
1781
1855
  }
1782
1856
  /**
1783
- * Interface for creating a clinic group
1857
+ * Tip za kreiranje novog Patient profila
1784
1858
  */
1785
- interface CreateClinicGroupData {
1786
- name: string;
1787
- description?: string;
1788
- hqLocation: ClinicLocation;
1789
- contactInfo: ClinicContactInfo;
1790
- contactPerson: ContactPerson;
1791
- ownerId: string | null;
1859
+ interface CreatePatientProfileData {
1860
+ userRef: string;
1861
+ displayName: string;
1862
+ expoTokens: string[];
1863
+ gamification?: GamificationInfo;
1792
1864
  isActive: boolean;
1793
- logo?: string | null;
1794
- practiceType?: PracticeType;
1795
- languages?: Language[];
1796
- subscriptionModel?: SubscriptionModel;
1797
- calendarSyncEnabled?: boolean;
1798
- autoConfirmAppointments?: boolean;
1799
- businessIdentificationNumber?: string | null;
1865
+ isVerified: boolean;
1866
+ doctors?: PatientDoctor[];
1867
+ clinics?: PatientClinic[];
1868
+ doctorIds?: string[];
1869
+ clinicIds?: string[];
1800
1870
  }
1801
1871
  /**
1802
- * Interface for updating a clinic group
1872
+ * Tip za ažuriranje Patient profila
1803
1873
  */
1804
- interface UpdateClinicGroupData extends Partial<CreateClinicGroupData> {
1874
+ interface UpdatePatientProfileData extends Partial<Omit<PatientProfile, "id" | "createdAt" | "updatedAt">> {
1805
1875
  updatedAt?: FieldValue;
1806
1876
  }
1807
1877
  /**
1808
- * Interface for creating an admin token
1878
+ * Parameters for searching patient profiles.
1809
1879
  */
1810
- interface CreateAdminTokenData {
1811
- expiresInDays?: number;
1812
- email?: string | null;
1880
+ interface SearchPatientsParams {
1881
+ /** Optional: Filter patients associated with this clinic ID. */
1882
+ clinicId?: string;
1883
+ /** Optional: Filter patients associated with this practitioner ID. */
1884
+ practitionerId?: string;
1813
1885
  }
1814
1886
  /**
1815
- * Interface for doctor information
1887
+ * Information about the entity requesting the patient search.
1816
1888
  */
1817
- interface DoctorInfo {
1889
+ interface RequesterInfo {
1890
+ /** ID of the clinic admin user or practitioner user making the request. */
1818
1891
  id: string;
1819
- name: string;
1820
- description?: string;
1821
- photo: string;
1822
- rating: number;
1823
- services: string[];
1892
+ /** Role of the requester, determining the search context. */
1893
+ role: "clinic_admin" | "practitioner";
1894
+ /** If role is 'clinic_admin', this is the associated clinic ID. */
1895
+ associatedClinicId?: string;
1896
+ /** If role is 'practitioner', this is the associated practitioner profile ID. */
1897
+ associatedPractitionerId?: string;
1824
1898
  }
1899
+
1900
+ interface PatientProfileComplete {
1901
+ patientProfile?: PatientProfile;
1902
+ patientSensitiveInfo?: PatientSensitiveInfo;
1903
+ patientMedicalInfo?: PatientMedicalInfo;
1904
+ patientLocationInfo?: PatientLocationInfo;
1905
+ }
1906
+
1825
1907
  /**
1826
- * Interface for service information
1827
- */
1828
- /**
1829
- * Interface for clinic
1908
+ * Interface for clinic profile information
1830
1909
  */
1831
- interface Clinic {
1910
+ interface ClinicInfo {
1832
1911
  id: string;
1833
- clinicGroupId: string;
1912
+ featuredPhoto: string;
1834
1913
  name: string;
1835
- description?: string;
1914
+ description?: string | null;
1836
1915
  location: ClinicLocation;
1837
1916
  contactInfo: ClinicContactInfo;
1838
- workingHours: WorkingHours;
1839
- tags: ClinicTag[];
1840
- featuredPhotos: string[];
1841
- coverPhoto: string | null;
1842
- photosWithTags?: {
1843
- url: string;
1844
- tag: string;
1845
- }[];
1846
- doctors: string[];
1847
- doctorsInfo: DoctorInfo[];
1848
- procedures: string[];
1849
- proceduresInfo: ProcedureSummaryInfo[];
1850
- reviewInfo: ClinicReviewInfo;
1851
- admins: string[];
1852
- createdAt: Timestamp;
1853
- updatedAt: Timestamp;
1854
- isActive: boolean;
1855
- isVerified: boolean;
1856
- logo?: string;
1857
1917
  }
1858
1918
  /**
1859
- * Interface for creating a clinic
1919
+ * Interface for practitioner profile information
1920
+ */
1921
+ interface PractitionerProfileInfo {
1922
+ id: string;
1923
+ practitionerPhoto: string | null;
1924
+ name: string;
1925
+ email: string;
1926
+ phone: string | null;
1927
+ certification: PractitionerCertification;
1928
+ }
1929
+ /**
1930
+ * Interface for patient profile information
1860
1931
  */
1861
- interface CreateClinicData {
1862
- clinicGroupId: string;
1863
- name: string;
1864
- description?: string;
1865
- location: ClinicLocation;
1866
- contactInfo: ClinicContactInfo;
1867
- workingHours: WorkingHours;
1868
- tags: ClinicTag[];
1869
- coverPhoto: string | null;
1870
- photosWithTags?: {
1871
- url: string;
1872
- tag: string;
1873
- }[];
1874
- doctors: string[];
1875
- procedures: string[];
1876
- proceduresInfo?: ProcedureSummaryInfo[];
1877
- admins: string[];
1878
- isActive: boolean;
1879
- isVerified: boolean;
1880
- logo?: string;
1881
- featuredPhotos?: string[];
1932
+ interface PatientProfileInfo {
1933
+ id: string;
1934
+ fullName: string;
1935
+ email: string;
1936
+ phone: string | null;
1937
+ dateOfBirth: Timestamp$1;
1938
+ gender: Gender;
1882
1939
  }
1940
+
1883
1941
  /**
1884
- * Interface for updating a clinic
1942
+ * Enum defining the possible statuses of an appointment.
1885
1943
  */
1886
- interface UpdateClinicData extends Partial<CreateClinicData> {
1887
- updatedAt?: FieldValue;
1944
+ declare enum AppointmentStatus {
1945
+ SCHEDULED = "scheduled",// Initial state after booking, before confirmation (if applicable)
1946
+ CONFIRMED = "confirmed",// Confirmed by clinic/practitioner
1947
+ CHECKED_IN = "checked_in",// Patient has arrived
1948
+ IN_PROGRESS = "in_progress",// Procedure has started
1949
+ COMPLETED = "completed",// Procedure finished successfully
1950
+ CANCELED_PATIENT = "canceled_patient",// Canceled by the patient
1951
+ CANCELED_CLINIC = "canceled_clinic",// Canceled by the clinic/practitioner
1952
+ NO_SHOW = "no_show",// Patient did not attend
1953
+ RESCHEDULED = "rescheduled"
1888
1954
  }
1889
1955
  /**
1890
- * Interface for creating a default clinic group
1956
+ * Enum defining the payment status of an appointment.
1891
1957
  */
1892
- interface CreateDefaultClinicGroupData {
1893
- name: string;
1894
- ownerId: string | null;
1895
- contactPerson: ContactPerson;
1896
- contactInfo: ClinicContactInfo;
1897
- hqLocation: ClinicLocation;
1898
- isActive: boolean;
1899
- logo?: string | null;
1900
- practiceType?: PracticeType;
1901
- languages?: Language[];
1902
- subscriptionModel?: SubscriptionModel;
1958
+ declare enum PaymentStatus {
1959
+ UNPAID = "unpaid",
1960
+ PAID = "paid",
1961
+ PARTIALLY_PAID = "partially_paid",
1962
+ REFUNDED = "refunded",
1963
+ NOT_APPLICABLE = "not_applicable"
1903
1964
  }
1904
1965
  /**
1905
- * Interface for clinic admin signup data
1966
+ * Represents a booked appointment, aggregating key information and relevant procedure rules.
1906
1967
  */
1907
- interface ClinicAdminSignupData {
1908
- email: string;
1909
- password: string;
1910
- firstName: string;
1911
- lastName: string;
1912
- title: string;
1913
- phoneNumber: string;
1914
- isCreatingNewGroup: boolean;
1915
- inviteToken?: string;
1916
- clinicGroupData?: {
1917
- name: string;
1918
- hqLocation: ClinicLocation;
1919
- logo?: string;
1920
- contactInfo: ClinicContactInfo;
1921
- subscriptionModel?: SubscriptionModel;
1922
- };
1968
+ interface Appointment {
1969
+ /** Unique identifier for the appointment */
1970
+ id: string;
1971
+ /** Reference to the associated CalendarEvent */
1972
+ calendarEventId: string;
1973
+ /** ID of the clinic branch */
1974
+ clinicBranchId: string;
1975
+ /** Aggregated clinic information (snapshot) */
1976
+ clinicInfo: ClinicInfo;
1977
+ /** ID of the practitioner */
1978
+ practitionerId: string;
1979
+ /** Aggregated practitioner information (snapshot) */
1980
+ practitionerInfo: PractitionerProfileInfo;
1981
+ /** ID of the patient */
1982
+ patientId: string;
1983
+ /** Aggregated patient information (snapshot) */
1984
+ patientInfo: PatientProfileInfo;
1985
+ /** ID of the procedure */
1986
+ procedureId: string;
1987
+ /** Aggregated procedure information including product/brand (snapshot) */
1988
+ procedureInfo: ProcedureSummaryInfo;
1989
+ /** Status of the appointment */
1990
+ status: AppointmentStatus;
1991
+ /** Timestamps */
1992
+ bookingTime: Timestamp;
1993
+ confirmationTime?: Timestamp | null;
1994
+ appointmentStartTime: Timestamp;
1995
+ appointmentEndTime: Timestamp;
1996
+ actualDurationMinutes?: number;
1997
+ /** Cancellation Details */
1998
+ cancellationReason?: string | null;
1999
+ canceledBy?: "patient" | "clinic" | "practitioner" | "system";
2000
+ /** Notes */
2001
+ internalNotes?: string | null;
2002
+ patientNotes?: string | null;
2003
+ /** Payment Details */
2004
+ cost: number;
2005
+ currency: Currency;
2006
+ paymentStatus: PaymentStatus;
2007
+ paymentTransactionId?: string | null;
2008
+ /** Procedure-related conditions and requirements */
2009
+ blockingConditions: BlockingCondition[];
2010
+ contraindications: Contraindication[];
2011
+ preProcedureRequirements: Requirement[];
2012
+ postProcedureRequirements: Requirement[];
2013
+ /** Tracking information for requirements completion */
2014
+ completedPreRequirements?: string[];
2015
+ completedPostRequirements?: string[];
2016
+ /** Timestamps */
2017
+ createdAt: Timestamp;
2018
+ updatedAt: Timestamp;
2019
+ /** Recurring appointment information */
2020
+ isRecurring?: boolean;
2021
+ recurringAppointmentId?: string | null;
1923
2022
  }
1924
2023
  /**
1925
- * Interface for clinic group setup data
2024
+ * Data needed to create a new Appointment
1926
2025
  */
1927
- interface ClinicGroupSetupData {
1928
- languages: Language[];
1929
- practiceType: PracticeType;
1930
- description: string;
1931
- logo: string;
1932
- calendarSyncEnabled: boolean;
1933
- autoConfirmAppointments: boolean;
1934
- businessIdentificationNumber: string | null;
2026
+ interface CreateAppointmentData {
2027
+ calendarEventId: string;
2028
+ clinicBranchId: string;
2029
+ practitionerId: string;
2030
+ patientId: string;
2031
+ procedureId: string;
2032
+ appointmentStartTime: Timestamp;
2033
+ appointmentEndTime: Timestamp;
2034
+ cost: number;
2035
+ currency: Currency;
2036
+ patientNotes?: string | null;
2037
+ initialStatus: AppointmentStatus;
2038
+ initialPaymentStatus?: PaymentStatus;
1935
2039
  }
1936
2040
  /**
1937
- * Interface for clinic branch setup data
2041
+ * Data allowed for updating an Appointment
1938
2042
  */
1939
- interface ClinicBranchSetupData {
1940
- name: string;
1941
- location: ClinicLocation;
1942
- description?: string;
1943
- contactInfo: ClinicContactInfo;
1944
- workingHours: WorkingHours;
1945
- tags: ClinicTag[];
1946
- logo?: string;
1947
- coverPhoto: string | null;
1948
- photosWithTags?: {
1949
- url: string;
1950
- tag: string;
1951
- }[];
1952
- featuredPhotos?: string[];
2043
+ interface UpdateAppointmentData {
2044
+ status?: AppointmentStatus;
2045
+ confirmationTime?: Timestamp | null;
2046
+ actualDurationMinutes?: number;
2047
+ cancellationReason?: string | null;
2048
+ canceledBy?: "patient" | "clinic" | "practitioner" | "system";
2049
+ internalNotes?: string | null;
2050
+ paymentStatus?: PaymentStatus;
2051
+ paymentTransactionId?: string | null;
2052
+ completedPreRequirements?: string[];
2053
+ completedPostRequirements?: string[];
1953
2054
  }
1954
2055
  /**
1955
- * Interface for clinic tags
2056
+ * Parameters for searching appointments
1956
2057
  */
1957
- interface ClinicTags {
1958
- tags: ClinicTag[];
2058
+ interface SearchAppointmentsParams {
2059
+ patientId?: string;
2060
+ practitionerId?: string;
2061
+ clinicBranchId?: string;
2062
+ startDate?: Date;
2063
+ endDate?: Date;
2064
+ status?: AppointmentStatus | AppointmentStatus[];
2065
+ limit?: number;
2066
+ startAfter?: any;
2067
+ }
2068
+ /** Firestore collection name */
2069
+ declare const APPOINTMENTS_COLLECTION = "appointments";
2070
+
2071
+ /**
2072
+ * Schema for validating appointment creation data
2073
+ */
2074
+ declare const createAppointmentSchema: z.ZodObject<{
2075
+ calendarEventId: z.ZodString;
2076
+ clinicBranchId: z.ZodString;
2077
+ practitionerId: z.ZodString;
2078
+ patientId: z.ZodString;
2079
+ procedureId: z.ZodString;
2080
+ appointmentStartTime: z.ZodEffects<z.ZodAny, any, any>;
2081
+ appointmentEndTime: z.ZodEffects<z.ZodAny, any, any>;
2082
+ cost: z.ZodNumber;
2083
+ currency: z.ZodString;
2084
+ patientNotes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2085
+ initialStatus: z.ZodNativeEnum<typeof AppointmentStatus>;
2086
+ initialPaymentStatus: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof PaymentStatus>>>;
2087
+ }, "strip", z.ZodTypeAny, {
2088
+ patientId: string;
2089
+ practitionerId: string;
2090
+ calendarEventId: string;
2091
+ clinicBranchId: string;
2092
+ procedureId: string;
2093
+ cost: number;
2094
+ currency: string;
2095
+ initialStatus: AppointmentStatus;
2096
+ initialPaymentStatus: PaymentStatus;
2097
+ appointmentStartTime?: any;
2098
+ appointmentEndTime?: any;
2099
+ patientNotes?: string | null | undefined;
2100
+ }, {
2101
+ patientId: string;
2102
+ practitionerId: string;
2103
+ calendarEventId: string;
2104
+ clinicBranchId: string;
2105
+ procedureId: string;
2106
+ cost: number;
2107
+ currency: string;
2108
+ initialStatus: AppointmentStatus;
2109
+ appointmentStartTime?: any;
2110
+ appointmentEndTime?: any;
2111
+ patientNotes?: string | null | undefined;
2112
+ initialPaymentStatus?: PaymentStatus | undefined;
2113
+ }>;
2114
+ /**
2115
+ * Schema for validating appointment update data
2116
+ */
2117
+ declare const updateAppointmentSchema: z.ZodEffects<z.ZodObject<{
2118
+ status: z.ZodOptional<z.ZodNativeEnum<typeof AppointmentStatus>>;
2119
+ confirmationTime: z.ZodOptional<z.ZodEffects<z.ZodAny, any, any>>;
2120
+ actualDurationMinutes: z.ZodOptional<z.ZodNumber>;
2121
+ cancellationReason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2122
+ canceledBy: z.ZodOptional<z.ZodEnum<["patient", "clinic", "practitioner", "system"]>>;
2123
+ internalNotes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2124
+ paymentStatus: z.ZodOptional<z.ZodNativeEnum<typeof PaymentStatus>>;
2125
+ paymentTransactionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2126
+ completedPreRequirements: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2127
+ completedPostRequirements: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2128
+ }, "strip", z.ZodTypeAny, {
2129
+ status?: AppointmentStatus | undefined;
2130
+ confirmationTime?: any;
2131
+ actualDurationMinutes?: number | undefined;
2132
+ cancellationReason?: string | null | undefined;
2133
+ canceledBy?: "practitioner" | "patient" | "clinic" | "system" | undefined;
2134
+ internalNotes?: string | null | undefined;
2135
+ paymentStatus?: PaymentStatus | undefined;
2136
+ paymentTransactionId?: string | null | undefined;
2137
+ completedPreRequirements?: string[] | undefined;
2138
+ completedPostRequirements?: string[] | undefined;
2139
+ }, {
2140
+ status?: AppointmentStatus | undefined;
2141
+ confirmationTime?: any;
2142
+ actualDurationMinutes?: number | undefined;
2143
+ cancellationReason?: string | null | undefined;
2144
+ canceledBy?: "practitioner" | "patient" | "clinic" | "system" | undefined;
2145
+ internalNotes?: string | null | undefined;
2146
+ paymentStatus?: PaymentStatus | undefined;
2147
+ paymentTransactionId?: string | null | undefined;
2148
+ completedPreRequirements?: string[] | undefined;
2149
+ completedPostRequirements?: string[] | undefined;
2150
+ }>, {
2151
+ status?: AppointmentStatus | undefined;
2152
+ confirmationTime?: any;
2153
+ actualDurationMinutes?: number | undefined;
2154
+ cancellationReason?: string | null | undefined;
2155
+ canceledBy?: "practitioner" | "patient" | "clinic" | "system" | undefined;
2156
+ internalNotes?: string | null | undefined;
2157
+ paymentStatus?: PaymentStatus | undefined;
2158
+ paymentTransactionId?: string | null | undefined;
2159
+ completedPreRequirements?: string[] | undefined;
2160
+ completedPostRequirements?: string[] | undefined;
2161
+ }, {
2162
+ status?: AppointmentStatus | undefined;
2163
+ confirmationTime?: any;
2164
+ actualDurationMinutes?: number | undefined;
2165
+ cancellationReason?: string | null | undefined;
2166
+ canceledBy?: "practitioner" | "patient" | "clinic" | "system" | undefined;
2167
+ internalNotes?: string | null | undefined;
2168
+ paymentStatus?: PaymentStatus | undefined;
2169
+ paymentTransactionId?: string | null | undefined;
2170
+ completedPreRequirements?: string[] | undefined;
2171
+ completedPostRequirements?: string[] | undefined;
2172
+ }>;
2173
+ /**
2174
+ * Schema for validating appointment search parameters
2175
+ */
2176
+ declare const searchAppointmentsSchema: z.ZodEffects<z.ZodObject<{
2177
+ patientId: z.ZodOptional<z.ZodString>;
2178
+ practitionerId: z.ZodOptional<z.ZodString>;
2179
+ clinicBranchId: z.ZodOptional<z.ZodString>;
2180
+ startDate: z.ZodOptional<z.ZodDate>;
2181
+ endDate: z.ZodOptional<z.ZodDate>;
2182
+ status: z.ZodOptional<z.ZodUnion<[z.ZodNativeEnum<typeof AppointmentStatus>, z.ZodArray<z.ZodNativeEnum<typeof AppointmentStatus>, "many">]>>;
2183
+ limit: z.ZodOptional<z.ZodNumber>;
2184
+ startAfter: z.ZodOptional<z.ZodAny>;
2185
+ }, "strip", z.ZodTypeAny, {
2186
+ status?: AppointmentStatus | AppointmentStatus[] | undefined;
2187
+ patientId?: string | undefined;
2188
+ startDate?: Date | undefined;
2189
+ endDate?: Date | undefined;
2190
+ limit?: number | undefined;
2191
+ startAfter?: any;
2192
+ practitionerId?: string | undefined;
2193
+ clinicBranchId?: string | undefined;
2194
+ }, {
2195
+ status?: AppointmentStatus | AppointmentStatus[] | undefined;
2196
+ patientId?: string | undefined;
2197
+ startDate?: Date | undefined;
2198
+ endDate?: Date | undefined;
2199
+ limit?: number | undefined;
2200
+ startAfter?: any;
2201
+ practitionerId?: string | undefined;
2202
+ clinicBranchId?: string | undefined;
2203
+ }>, {
2204
+ status?: AppointmentStatus | AppointmentStatus[] | undefined;
2205
+ patientId?: string | undefined;
2206
+ startDate?: Date | undefined;
2207
+ endDate?: Date | undefined;
2208
+ limit?: number | undefined;
2209
+ startAfter?: any;
2210
+ practitionerId?: string | undefined;
2211
+ clinicBranchId?: string | undefined;
2212
+ }, {
2213
+ status?: AppointmentStatus | AppointmentStatus[] | undefined;
2214
+ patientId?: string | undefined;
2215
+ startDate?: Date | undefined;
2216
+ endDate?: Date | undefined;
2217
+ limit?: number | undefined;
2218
+ startAfter?: any;
2219
+ practitionerId?: string | undefined;
2220
+ clinicBranchId?: string | undefined;
2221
+ }>;
2222
+
2223
+ interface FirebaseInstance {
2224
+ app: FirebaseApp;
2225
+ db: Firestore;
2226
+ auth: Auth;
2227
+ analytics: Analytics | null;
1959
2228
  }
2229
+ declare const initializeFirebase: (config: {
2230
+ apiKey: string;
2231
+ authDomain: string;
2232
+ projectId: string;
2233
+ storageBucket: string;
2234
+ messagingSenderId: string;
2235
+ appId: string;
2236
+ measurementId?: string;
2237
+ }) => FirebaseInstance;
2238
+ declare const getFirebaseInstance: () => Promise<FirebaseInstance>;
2239
+ declare const getFirebaseAuth: () => Promise<Auth>;
2240
+ declare const getFirebaseDB: () => Promise<Firestore>;
2241
+ declare const getFirebaseApp: () => Promise<FirebaseApp>;
1960
2242
 
1961
2243
  /**
1962
2244
  * Brend proizvoda ili opreme
@@ -6063,6 +6345,227 @@ declare class ReviewService extends BaseService {
6063
6345
  private calculateAverage;
6064
6346
  }
6065
6347
 
6348
+ /**
6349
+ * Interface for available booking slot
6350
+ */
6351
+ interface AvailableSlot {
6352
+ start: Date;
6353
+ }
6354
+ /**
6355
+ * AppointmentService is responsible for managing appointments,
6356
+ * including creating, updating, retrieving, and searching appointments.
6357
+ * It serves as the main entry point for working with appointment data.
6358
+ */
6359
+ declare class AppointmentService extends BaseService {
6360
+ private calendarService;
6361
+ private patientService;
6362
+ private practitionerService;
6363
+ private clinicService;
6364
+ private functions;
6365
+ /**
6366
+ * Creates a new AppointmentService instance.
6367
+ *
6368
+ * @param db Firestore instance
6369
+ * @param auth Firebase Auth instance
6370
+ * @param app Firebase App instance
6371
+ * @param calendarService Calendar service instance
6372
+ * @param patientService Patient service instance
6373
+ * @param practitionerService Practitioner service instance
6374
+ * @param clinicService Clinic service instance
6375
+ */
6376
+ constructor(db: Firestore, auth: Auth, app: FirebaseApp, calendarService: CalendarServiceV2, patientService: PatientService, practitionerService: PractitionerService, clinicService: ClinicService);
6377
+ /**
6378
+ * Gets available booking slots for a specific clinic, practitioner, and procedure.
6379
+ *
6380
+ * @param clinicId ID of the clinic
6381
+ * @param practitionerId ID of the practitioner
6382
+ * @param procedureId ID of the procedure
6383
+ * @param startDate Start date of the time range to check
6384
+ * @param endDate End date of the time range to check
6385
+ * @returns Array of available booking slots
6386
+ */
6387
+ getAvailableBookingSlots(clinicId: string, practitionerId: string, procedureId: string, startDate: Date, endDate: Date): Promise<AvailableSlot[]>;
6388
+ /**
6389
+ * Creates a new appointment.
6390
+ *
6391
+ * @param data Data needed to create the appointment
6392
+ * @returns The created appointment
6393
+ */
6394
+ createAppointment(data: CreateAppointmentData): Promise<Appointment>;
6395
+ /**
6396
+ * Gets an appointment by ID.
6397
+ *
6398
+ * @param appointmentId ID of the appointment to retrieve
6399
+ * @returns The appointment or null if not found
6400
+ */
6401
+ getAppointmentById(appointmentId: string): Promise<Appointment | null>;
6402
+ /**
6403
+ * Updates an existing appointment.
6404
+ *
6405
+ * @param appointmentId ID of the appointment to update
6406
+ * @param data Update data for the appointment
6407
+ * @returns The updated appointment
6408
+ */
6409
+ updateAppointment(appointmentId: string, data: UpdateAppointmentData): Promise<Appointment>;
6410
+ /**
6411
+ * Searches for appointments based on various criteria.
6412
+ *
6413
+ * @param params Search parameters
6414
+ * @returns Found appointments and the last document for pagination
6415
+ */
6416
+ searchAppointments(params: SearchAppointmentsParams): Promise<{
6417
+ appointments: Appointment[];
6418
+ lastDoc: DocumentSnapshot | null;
6419
+ }>;
6420
+ /**
6421
+ * Gets appointments for a specific patient.
6422
+ *
6423
+ * @param patientId ID of the patient
6424
+ * @param options Optional parameters for filtering and pagination
6425
+ * @returns Found appointments and the last document for pagination
6426
+ */
6427
+ getPatientAppointments(patientId: string, options?: {
6428
+ startDate?: Date;
6429
+ endDate?: Date;
6430
+ status?: AppointmentStatus | AppointmentStatus[];
6431
+ limit?: number;
6432
+ startAfter?: DocumentSnapshot;
6433
+ }): Promise<{
6434
+ appointments: Appointment[];
6435
+ lastDoc: DocumentSnapshot | null;
6436
+ }>;
6437
+ /**
6438
+ * Gets appointments for a specific practitioner.
6439
+ *
6440
+ * @param practitionerId ID of the practitioner
6441
+ * @param options Optional parameters for filtering and pagination
6442
+ * @returns Found appointments and the last document for pagination
6443
+ */
6444
+ getPractitionerAppointments(practitionerId: string, options?: {
6445
+ startDate?: Date;
6446
+ endDate?: Date;
6447
+ status?: AppointmentStatus | AppointmentStatus[];
6448
+ limit?: number;
6449
+ startAfter?: DocumentSnapshot;
6450
+ }): Promise<{
6451
+ appointments: Appointment[];
6452
+ lastDoc: DocumentSnapshot | null;
6453
+ }>;
6454
+ /**
6455
+ * Gets appointments for a specific clinic.
6456
+ *
6457
+ * @param clinicBranchId ID of the clinic branch
6458
+ * @param options Optional parameters for filtering and pagination
6459
+ * @returns Found appointments and the last document for pagination
6460
+ */
6461
+ getClinicAppointments(clinicBranchId: string, options?: {
6462
+ practitionerId?: string;
6463
+ startDate?: Date;
6464
+ endDate?: Date;
6465
+ status?: AppointmentStatus | AppointmentStatus[];
6466
+ limit?: number;
6467
+ startAfter?: DocumentSnapshot;
6468
+ }): Promise<{
6469
+ appointments: Appointment[];
6470
+ lastDoc: DocumentSnapshot | null;
6471
+ }>;
6472
+ /**
6473
+ * Updates the status of an appointment.
6474
+ *
6475
+ * @param appointmentId ID of the appointment
6476
+ * @param newStatus New status to set
6477
+ * @param cancellationReason Required if canceling the appointment
6478
+ * @param canceledBy Required if canceling the appointment
6479
+ * @returns The updated appointment
6480
+ */
6481
+ updateAppointmentStatus(appointmentId: string, newStatus: AppointmentStatus, cancellationReason?: string, canceledBy?: "patient" | "clinic" | "practitioner" | "system"): Promise<Appointment>;
6482
+ /**
6483
+ * Confirms an appointment.
6484
+ *
6485
+ * @param appointmentId ID of the appointment to confirm
6486
+ * @returns The confirmed appointment
6487
+ */
6488
+ confirmAppointment(appointmentId: string): Promise<Appointment>;
6489
+ /**
6490
+ * Cancels an appointment from the clinic side.
6491
+ *
6492
+ * @param appointmentId ID of the appointment to cancel
6493
+ * @param reason Reason for cancellation
6494
+ * @returns The canceled appointment
6495
+ */
6496
+ cancelAppointmentByClinic(appointmentId: string, reason: string): Promise<Appointment>;
6497
+ /**
6498
+ * Cancels an appointment from the patient side.
6499
+ *
6500
+ * @param appointmentId ID of the appointment to cancel
6501
+ * @param reason Reason for cancellation
6502
+ * @returns The canceled appointment
6503
+ */
6504
+ cancelAppointmentByPatient(appointmentId: string, reason: string): Promise<Appointment>;
6505
+ /**
6506
+ * Marks an appointment as checked in.
6507
+ *
6508
+ * @param appointmentId ID of the appointment
6509
+ * @returns The updated appointment
6510
+ */
6511
+ checkInAppointment(appointmentId: string): Promise<Appointment>;
6512
+ /**
6513
+ * Marks an appointment as in progress.
6514
+ *
6515
+ * @param appointmentId ID of the appointment
6516
+ * @returns The updated appointment
6517
+ */
6518
+ startAppointment(appointmentId: string): Promise<Appointment>;
6519
+ /**
6520
+ * Marks an appointment as completed.
6521
+ *
6522
+ * @param appointmentId ID of the appointment
6523
+ * @param actualDurationMinutes Actual duration of the appointment in minutes
6524
+ * @returns The updated appointment
6525
+ */
6526
+ completeAppointment(appointmentId: string, actualDurationMinutes?: number): Promise<Appointment>;
6527
+ /**
6528
+ * Marks an appointment as no-show.
6529
+ *
6530
+ * @param appointmentId ID of the appointment
6531
+ * @returns The updated appointment
6532
+ */
6533
+ markNoShow(appointmentId: string): Promise<Appointment>;
6534
+ /**
6535
+ * Updates the payment status of an appointment.
6536
+ *
6537
+ * @param appointmentId ID of the appointment
6538
+ * @param paymentStatus New payment status
6539
+ * @param paymentTransactionId Optional transaction ID for the payment
6540
+ * @returns The updated appointment
6541
+ */
6542
+ updatePaymentStatus(appointmentId: string, paymentStatus: PaymentStatus, paymentTransactionId?: string): Promise<Appointment>;
6543
+ /**
6544
+ * Marks pre-procedure requirements as completed.
6545
+ *
6546
+ * @param appointmentId ID of the appointment
6547
+ * @param requirementIds IDs of the requirements to mark as completed
6548
+ * @returns The updated appointment
6549
+ */
6550
+ completePreRequirements(appointmentId: string, requirementIds: string[]): Promise<Appointment>;
6551
+ /**
6552
+ * Marks post-procedure requirements as completed.
6553
+ *
6554
+ * @param appointmentId ID of the appointment
6555
+ * @param requirementIds IDs of the requirements to mark as completed
6556
+ * @returns The updated appointment
6557
+ */
6558
+ completePostRequirements(appointmentId: string, requirementIds: string[]): Promise<Appointment>;
6559
+ /**
6560
+ * Updates the internal notes of an appointment.
6561
+ *
6562
+ * @param appointmentId ID of the appointment
6563
+ * @param notes Updated internal notes
6564
+ * @returns The updated appointment
6565
+ */
6566
+ updateInternalNotes(appointmentId: string, notes: string | null): Promise<Appointment>;
6567
+ }
6568
+
6066
6569
  declare class AuthError extends Error {
6067
6570
  code: string;
6068
6571
  status: number;
@@ -9495,12 +9998,12 @@ declare const procedureSummaryInfoSchema: z.ZodObject<{
9495
9998
  family: ProcedureFamily;
9496
9999
  practitionerId: string;
9497
10000
  clinicId: string;
10001
+ currency: Currency;
9498
10002
  categoryName: string;
9499
10003
  subcategoryName: string;
9500
10004
  technologyName: string;
9501
10005
  price: number;
9502
10006
  pricingMeasure: PricingMeasure;
9503
- currency: Currency;
9504
10007
  clinicName: string;
9505
10008
  practitionerName: string;
9506
10009
  description?: string | undefined;
@@ -9512,12 +10015,12 @@ declare const procedureSummaryInfoSchema: z.ZodObject<{
9512
10015
  family: ProcedureFamily;
9513
10016
  practitionerId: string;
9514
10017
  clinicId: string;
10018
+ currency: Currency;
9515
10019
  categoryName: string;
9516
10020
  subcategoryName: string;
9517
10021
  technologyName: string;
9518
10022
  price: number;
9519
10023
  pricingMeasure: PricingMeasure;
9520
- currency: Currency;
9521
10024
  clinicName: string;
9522
10025
  practitionerName: string;
9523
10026
  description?: string | undefined;
@@ -9907,12 +10410,12 @@ declare const practitionerSchema: z.ZodObject<{
9907
10410
  family: ProcedureFamily;
9908
10411
  practitionerId: string;
9909
10412
  clinicId: string;
10413
+ currency: Currency;
9910
10414
  categoryName: string;
9911
10415
  subcategoryName: string;
9912
10416
  technologyName: string;
9913
10417
  price: number;
9914
10418
  pricingMeasure: PricingMeasure;
9915
- currency: Currency;
9916
10419
  clinicName: string;
9917
10420
  practitionerName: string;
9918
10421
  description?: string | undefined;
@@ -9924,12 +10427,12 @@ declare const practitionerSchema: z.ZodObject<{
9924
10427
  family: ProcedureFamily;
9925
10428
  practitionerId: string;
9926
10429
  clinicId: string;
10430
+ currency: Currency;
9927
10431
  categoryName: string;
9928
10432
  subcategoryName: string;
9929
10433
  technologyName: string;
9930
10434
  price: number;
9931
10435
  pricingMeasure: PricingMeasure;
9932
- currency: Currency;
9933
10436
  clinicName: string;
9934
10437
  practitionerName: string;
9935
10438
  description?: string | undefined;
@@ -10063,12 +10566,12 @@ declare const practitionerSchema: z.ZodObject<{
10063
10566
  family: ProcedureFamily;
10064
10567
  practitionerId: string;
10065
10568
  clinicId: string;
10569
+ currency: Currency;
10066
10570
  categoryName: string;
10067
10571
  subcategoryName: string;
10068
10572
  technologyName: string;
10069
10573
  price: number;
10070
10574
  pricingMeasure: PricingMeasure;
10071
- currency: Currency;
10072
10575
  clinicName: string;
10073
10576
  practitionerName: string;
10074
10577
  description?: string | undefined;
@@ -10179,12 +10682,12 @@ declare const practitionerSchema: z.ZodObject<{
10179
10682
  family: ProcedureFamily;
10180
10683
  practitionerId: string;
10181
10684
  clinicId: string;
10685
+ currency: Currency;
10182
10686
  categoryName: string;
10183
10687
  subcategoryName: string;
10184
10688
  technologyName: string;
10185
10689
  price: number;
10186
10690
  pricingMeasure: PricingMeasure;
10187
- currency: Currency;
10188
10691
  clinicName: string;
10189
10692
  practitionerName: string;
10190
10693
  description?: string | undefined;
@@ -10583,12 +11086,12 @@ declare const createPractitionerSchema: z.ZodObject<{
10583
11086
  family: ProcedureFamily;
10584
11087
  practitionerId: string;
10585
11088
  clinicId: string;
11089
+ currency: Currency;
10586
11090
  categoryName: string;
10587
11091
  subcategoryName: string;
10588
11092
  technologyName: string;
10589
11093
  price: number;
10590
11094
  pricingMeasure: PricingMeasure;
10591
- currency: Currency;
10592
11095
  clinicName: string;
10593
11096
  practitionerName: string;
10594
11097
  description?: string | undefined;
@@ -10600,12 +11103,12 @@ declare const createPractitionerSchema: z.ZodObject<{
10600
11103
  family: ProcedureFamily;
10601
11104
  practitionerId: string;
10602
11105
  clinicId: string;
11106
+ currency: Currency;
10603
11107
  categoryName: string;
10604
11108
  subcategoryName: string;
10605
11109
  technologyName: string;
10606
11110
  price: number;
10607
11111
  pricingMeasure: PricingMeasure;
10608
- currency: Currency;
10609
11112
  clinicName: string;
10610
11113
  practitionerName: string;
10611
11114
  description?: string | undefined;
@@ -10705,12 +11208,12 @@ declare const createPractitionerSchema: z.ZodObject<{
10705
11208
  family: ProcedureFamily;
10706
11209
  practitionerId: string;
10707
11210
  clinicId: string;
11211
+ currency: Currency;
10708
11212
  categoryName: string;
10709
11213
  subcategoryName: string;
10710
11214
  technologyName: string;
10711
11215
  price: number;
10712
11216
  pricingMeasure: PricingMeasure;
10713
- currency: Currency;
10714
11217
  clinicName: string;
10715
11218
  practitionerName: string;
10716
11219
  description?: string | undefined;
@@ -10807,12 +11310,12 @@ declare const createPractitionerSchema: z.ZodObject<{
10807
11310
  family: ProcedureFamily;
10808
11311
  practitionerId: string;
10809
11312
  clinicId: string;
11313
+ currency: Currency;
10810
11314
  categoryName: string;
10811
11315
  subcategoryName: string;
10812
11316
  technologyName: string;
10813
11317
  price: number;
10814
11318
  pricingMeasure: PricingMeasure;
10815
- currency: Currency;
10816
11319
  clinicName: string;
10817
11320
  practitionerName: string;
10818
11321
  description?: string | undefined;
@@ -11200,12 +11703,12 @@ declare const createDraftPractitionerSchema: z.ZodObject<{
11200
11703
  family: ProcedureFamily;
11201
11704
  practitionerId: string;
11202
11705
  clinicId: string;
11706
+ currency: Currency;
11203
11707
  categoryName: string;
11204
11708
  subcategoryName: string;
11205
11709
  technologyName: string;
11206
11710
  price: number;
11207
11711
  pricingMeasure: PricingMeasure;
11208
- currency: Currency;
11209
11712
  clinicName: string;
11210
11713
  practitionerName: string;
11211
11714
  description?: string | undefined;
@@ -11217,12 +11720,12 @@ declare const createDraftPractitionerSchema: z.ZodObject<{
11217
11720
  family: ProcedureFamily;
11218
11721
  practitionerId: string;
11219
11722
  clinicId: string;
11723
+ currency: Currency;
11220
11724
  categoryName: string;
11221
11725
  subcategoryName: string;
11222
11726
  technologyName: string;
11223
11727
  price: number;
11224
11728
  pricingMeasure: PricingMeasure;
11225
- currency: Currency;
11226
11729
  clinicName: string;
11227
11730
  practitionerName: string;
11228
11731
  description?: string | undefined;
@@ -11319,12 +11822,12 @@ declare const createDraftPractitionerSchema: z.ZodObject<{
11319
11822
  family: ProcedureFamily;
11320
11823
  practitionerId: string;
11321
11824
  clinicId: string;
11825
+ currency: Currency;
11322
11826
  categoryName: string;
11323
11827
  subcategoryName: string;
11324
11828
  technologyName: string;
11325
11829
  price: number;
11326
11830
  pricingMeasure: PricingMeasure;
11327
- currency: Currency;
11328
11831
  clinicName: string;
11329
11832
  practitionerName: string;
11330
11833
  description?: string | undefined;
@@ -11419,12 +11922,12 @@ declare const createDraftPractitionerSchema: z.ZodObject<{
11419
11922
  family: ProcedureFamily;
11420
11923
  practitionerId: string;
11421
11924
  clinicId: string;
11925
+ currency: Currency;
11422
11926
  categoryName: string;
11423
11927
  subcategoryName: string;
11424
11928
  technologyName: string;
11425
11929
  price: number;
11426
11930
  pricingMeasure: PricingMeasure;
11427
- currency: Currency;
11428
11931
  clinicName: string;
11429
11932
  practitionerName: string;
11430
11933
  description?: string | undefined;
@@ -13030,12 +13533,12 @@ declare const clinicSchema: z.ZodObject<{
13030
13533
  family: ProcedureFamily;
13031
13534
  practitionerId: string;
13032
13535
  clinicId: string;
13536
+ currency: Currency;
13033
13537
  categoryName: string;
13034
13538
  subcategoryName: string;
13035
13539
  technologyName: string;
13036
13540
  price: number;
13037
13541
  pricingMeasure: PricingMeasure;
13038
- currency: Currency;
13039
13542
  clinicName: string;
13040
13543
  practitionerName: string;
13041
13544
  description?: string | undefined;
@@ -13047,12 +13550,12 @@ declare const clinicSchema: z.ZodObject<{
13047
13550
  family: ProcedureFamily;
13048
13551
  practitionerId: string;
13049
13552
  clinicId: string;
13553
+ currency: Currency;
13050
13554
  categoryName: string;
13051
13555
  subcategoryName: string;
13052
13556
  technologyName: string;
13053
13557
  price: number;
13054
13558
  pricingMeasure: PricingMeasure;
13055
- currency: Currency;
13056
13559
  clinicName: string;
13057
13560
  practitionerName: string;
13058
13561
  description?: string | undefined;
@@ -13107,12 +13610,12 @@ declare const clinicSchema: z.ZodObject<{
13107
13610
  family: ProcedureFamily;
13108
13611
  practitionerId: string;
13109
13612
  clinicId: string;
13613
+ currency: Currency;
13110
13614
  categoryName: string;
13111
13615
  subcategoryName: string;
13112
13616
  technologyName: string;
13113
13617
  price: number;
13114
13618
  pricingMeasure: PricingMeasure;
13115
- currency: Currency;
13116
13619
  clinicName: string;
13117
13620
  practitionerName: string;
13118
13621
  description?: string | undefined;
@@ -13236,12 +13739,12 @@ declare const clinicSchema: z.ZodObject<{
13236
13739
  family: ProcedureFamily;
13237
13740
  practitionerId: string;
13238
13741
  clinicId: string;
13742
+ currency: Currency;
13239
13743
  categoryName: string;
13240
13744
  subcategoryName: string;
13241
13745
  technologyName: string;
13242
13746
  price: number;
13243
13747
  pricingMeasure: PricingMeasure;
13244
- currency: Currency;
13245
13748
  clinicName: string;
13246
13749
  practitionerName: string;
13247
13750
  description?: string | undefined;
@@ -15799,14 +16302,14 @@ declare const procedureInfoSchema: z.ZodObject<{
15799
16302
  name: string;
15800
16303
  description: string;
15801
16304
  duration: number;
15802
- price: number;
15803
16305
  currency: Currency;
16306
+ price: number;
15804
16307
  }, {
15805
16308
  name: string;
15806
16309
  description: string;
15807
16310
  duration: number;
15808
- price: number;
15809
16311
  currency: Currency;
16312
+ price: number;
15810
16313
  }>;
15811
16314
  /**
15812
16315
  * Validation schema for procedure categorization
@@ -15830,194 +16333,6 @@ declare const procedureCategorizationSchema: z.ZodObject<{
15830
16333
  procedureTechnology: string;
15831
16334
  procedureProduct: string;
15832
16335
  }>;
15833
- /**
15834
- * Validation schema for creating an appointment
15835
- */
15836
- declare const createAppointmentSchema: z.ZodEffects<z.ZodObject<{
15837
- clinicId: z.ZodString;
15838
- doctorId: z.ZodString;
15839
- patientId: z.ZodString;
15840
- procedureId: z.ZodString;
15841
- eventLocation: z.ZodObject<{
15842
- address: z.ZodString;
15843
- city: z.ZodString;
15844
- country: z.ZodString;
15845
- postalCode: z.ZodString;
15846
- latitude: z.ZodNumber;
15847
- longitude: z.ZodNumber;
15848
- geohash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
15849
- }, "strip", z.ZodTypeAny, {
15850
- latitude: number;
15851
- longitude: number;
15852
- address: string;
15853
- city: string;
15854
- country: string;
15855
- postalCode: string;
15856
- geohash?: string | null | undefined;
15857
- }, {
15858
- latitude: number;
15859
- longitude: number;
15860
- address: string;
15861
- city: string;
15862
- country: string;
15863
- postalCode: string;
15864
- geohash?: string | null | undefined;
15865
- }>;
15866
- eventTime: z.ZodEffects<z.ZodEffects<z.ZodObject<{
15867
- start: z.ZodUnion<[z.ZodType<Date, z.ZodTypeDef, Date>, z.ZodType<Timestamp, z.ZodTypeDef, Timestamp>]>;
15868
- end: z.ZodUnion<[z.ZodType<Date, z.ZodTypeDef, Date>, z.ZodType<Timestamp, z.ZodTypeDef, Timestamp>]>;
15869
- }, "strip", z.ZodTypeAny, {
15870
- start: Date | Timestamp;
15871
- end: Date | Timestamp;
15872
- }, {
15873
- start: Date | Timestamp;
15874
- end: Date | Timestamp;
15875
- }>, {
15876
- start: Date | Timestamp;
15877
- end: Date | Timestamp;
15878
- }, {
15879
- start: Date | Timestamp;
15880
- end: Date | Timestamp;
15881
- }>, {
15882
- start: Date | Timestamp;
15883
- end: Date | Timestamp;
15884
- }, {
15885
- start: Date | Timestamp;
15886
- end: Date | Timestamp;
15887
- }>;
15888
- description: z.ZodOptional<z.ZodString>;
15889
- }, "strip", z.ZodTypeAny, {
15890
- patientId: string;
15891
- clinicId: string;
15892
- procedureId: string;
15893
- doctorId: string;
15894
- eventLocation: {
15895
- latitude: number;
15896
- longitude: number;
15897
- address: string;
15898
- city: string;
15899
- country: string;
15900
- postalCode: string;
15901
- geohash?: string | null | undefined;
15902
- };
15903
- eventTime: {
15904
- start: Date | Timestamp;
15905
- end: Date | Timestamp;
15906
- };
15907
- description?: string | undefined;
15908
- }, {
15909
- patientId: string;
15910
- clinicId: string;
15911
- procedureId: string;
15912
- doctorId: string;
15913
- eventLocation: {
15914
- latitude: number;
15915
- longitude: number;
15916
- address: string;
15917
- city: string;
15918
- country: string;
15919
- postalCode: string;
15920
- geohash?: string | null | undefined;
15921
- };
15922
- eventTime: {
15923
- start: Date | Timestamp;
15924
- end: Date | Timestamp;
15925
- };
15926
- description?: string | undefined;
15927
- }>, {
15928
- patientId: string;
15929
- clinicId: string;
15930
- procedureId: string;
15931
- doctorId: string;
15932
- eventLocation: {
15933
- latitude: number;
15934
- longitude: number;
15935
- address: string;
15936
- city: string;
15937
- country: string;
15938
- postalCode: string;
15939
- geohash?: string | null | undefined;
15940
- };
15941
- eventTime: {
15942
- start: Date | Timestamp;
15943
- end: Date | Timestamp;
15944
- };
15945
- description?: string | undefined;
15946
- }, {
15947
- patientId: string;
15948
- clinicId: string;
15949
- procedureId: string;
15950
- doctorId: string;
15951
- eventLocation: {
15952
- latitude: number;
15953
- longitude: number;
15954
- address: string;
15955
- city: string;
15956
- country: string;
15957
- postalCode: string;
15958
- geohash?: string | null | undefined;
15959
- };
15960
- eventTime: {
15961
- start: Date | Timestamp;
15962
- end: Date | Timestamp;
15963
- };
15964
- description?: string | undefined;
15965
- }>;
15966
- /**
15967
- * Validation schema for updating an appointment
15968
- */
15969
- declare const updateAppointmentSchema: z.ZodObject<{
15970
- appointmentId: z.ZodString;
15971
- clinicId: z.ZodString;
15972
- doctorId: z.ZodString;
15973
- patientId: z.ZodString;
15974
- eventTime: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodObject<{
15975
- start: z.ZodUnion<[z.ZodType<Date, z.ZodTypeDef, Date>, z.ZodType<Timestamp, z.ZodTypeDef, Timestamp>]>;
15976
- end: z.ZodUnion<[z.ZodType<Date, z.ZodTypeDef, Date>, z.ZodType<Timestamp, z.ZodTypeDef, Timestamp>]>;
15977
- }, "strip", z.ZodTypeAny, {
15978
- start: Date | Timestamp;
15979
- end: Date | Timestamp;
15980
- }, {
15981
- start: Date | Timestamp;
15982
- end: Date | Timestamp;
15983
- }>, {
15984
- start: Date | Timestamp;
15985
- end: Date | Timestamp;
15986
- }, {
15987
- start: Date | Timestamp;
15988
- end: Date | Timestamp;
15989
- }>, {
15990
- start: Date | Timestamp;
15991
- end: Date | Timestamp;
15992
- }, {
15993
- start: Date | Timestamp;
15994
- end: Date | Timestamp;
15995
- }>>;
15996
- description: z.ZodOptional<z.ZodString>;
15997
- status: z.ZodOptional<z.ZodNativeEnum<typeof CalendarEventStatus>>;
15998
- }, "strip", z.ZodTypeAny, {
15999
- patientId: string;
16000
- clinicId: string;
16001
- appointmentId: string;
16002
- doctorId: string;
16003
- description?: string | undefined;
16004
- status?: CalendarEventStatus | undefined;
16005
- eventTime?: {
16006
- start: Date | Timestamp;
16007
- end: Date | Timestamp;
16008
- } | undefined;
16009
- }, {
16010
- patientId: string;
16011
- clinicId: string;
16012
- appointmentId: string;
16013
- doctorId: string;
16014
- description?: string | undefined;
16015
- status?: CalendarEventStatus | undefined;
16016
- eventTime?: {
16017
- start: Date | Timestamp;
16018
- end: Date | Timestamp;
16019
- } | undefined;
16020
- }>;
16021
16336
  /**
16022
16337
  * Validation schema for creating a calendar event
16023
16338
  */
@@ -16193,9 +16508,9 @@ declare const createCalendarEventSchema: z.ZodObject<{
16193
16508
  createdAt?: any;
16194
16509
  updatedAt?: any;
16195
16510
  description?: string | undefined;
16511
+ clinicBranchId?: string | null | undefined;
16196
16512
  procedureId?: string | null | undefined;
16197
16513
  appointmentId?: string | null | undefined;
16198
- clinicBranchId?: string | null | undefined;
16199
16514
  eventLocation?: {
16200
16515
  latitude: number;
16201
16516
  longitude: number;
@@ -16250,9 +16565,9 @@ declare const createCalendarEventSchema: z.ZodObject<{
16250
16565
  createdAt?: any;
16251
16566
  updatedAt?: any;
16252
16567
  description?: string | undefined;
16568
+ clinicBranchId?: string | null | undefined;
16253
16569
  procedureId?: string | null | undefined;
16254
16570
  appointmentId?: string | null | undefined;
16255
- clinicBranchId?: string | null | undefined;
16256
16571
  eventLocation?: {
16257
16572
  latitude: number;
16258
16573
  longitude: number;
@@ -16480,14 +16795,14 @@ declare const calendarEventSchema: z.ZodObject<{
16480
16795
  name: string;
16481
16796
  description: string;
16482
16797
  duration: number;
16483
- price: number;
16484
16798
  currency: Currency;
16799
+ price: number;
16485
16800
  }, {
16486
16801
  name: string;
16487
16802
  description: string;
16488
16803
  duration: number;
16489
- price: number;
16490
16804
  currency: Currency;
16805
+ price: number;
16491
16806
  }>>>;
16492
16807
  procedureCategorization: z.ZodOptional<z.ZodNullable<z.ZodObject<{
16493
16808
  procedureFamily: z.ZodString;
@@ -16589,9 +16904,9 @@ declare const calendarEventSchema: z.ZodObject<{
16589
16904
  syncStatus: CalendarSyncStatus;
16590
16905
  eventType: CalendarEventType;
16591
16906
  description?: string | undefined;
16907
+ clinicBranchId?: string | null | undefined;
16592
16908
  procedureId?: string | null | undefined;
16593
16909
  appointmentId?: string | null | undefined;
16594
- clinicBranchId?: string | null | undefined;
16595
16910
  eventLocation?: {
16596
16911
  latitude: number;
16597
16912
  longitude: number;
@@ -16637,8 +16952,8 @@ declare const calendarEventSchema: z.ZodObject<{
16637
16952
  name: string;
16638
16953
  description: string;
16639
16954
  duration: number;
16640
- price: number;
16641
16955
  currency: Currency;
16956
+ price: number;
16642
16957
  } | null | undefined;
16643
16958
  procedureCategorization?: {
16644
16959
  procedureFamily: string;
@@ -16660,9 +16975,9 @@ declare const calendarEventSchema: z.ZodObject<{
16660
16975
  syncStatus: CalendarSyncStatus;
16661
16976
  eventType: CalendarEventType;
16662
16977
  description?: string | undefined;
16978
+ clinicBranchId?: string | null | undefined;
16663
16979
  procedureId?: string | null | undefined;
16664
16980
  appointmentId?: string | null | undefined;
16665
- clinicBranchId?: string | null | undefined;
16666
16981
  eventLocation?: {
16667
16982
  latitude: number;
16668
16983
  longitude: number;
@@ -16708,8 +17023,8 @@ declare const calendarEventSchema: z.ZodObject<{
16708
17023
  name: string;
16709
17024
  description: string;
16710
17025
  duration: number;
16711
- price: number;
16712
17026
  currency: Currency;
17027
+ price: number;
16713
17028
  } | null | undefined;
16714
17029
  procedureCategorization?: {
16715
17030
  procedureFamily: string;
@@ -17070,12 +17385,12 @@ declare const procedureReviewSchema: z.ZodObject<z.objectUtil.extendShape<{
17070
17385
  updatedAt: Date;
17071
17386
  isVerified: boolean;
17072
17387
  patientId: string;
17388
+ procedureId: string;
17073
17389
  fullReviewId: string;
17074
17390
  comment: string;
17075
17391
  isPublished: boolean;
17076
17392
  overallRating: number;
17077
17393
  wouldRecommend: boolean;
17078
- procedureId: string;
17079
17394
  effectivenessOfTreatment: number;
17080
17395
  outcomeExplanation: number;
17081
17396
  painManagement: number;
@@ -17087,12 +17402,12 @@ declare const procedureReviewSchema: z.ZodObject<z.objectUtil.extendShape<{
17087
17402
  updatedAt: Date;
17088
17403
  isVerified: boolean;
17089
17404
  patientId: string;
17405
+ procedureId: string;
17090
17406
  fullReviewId: string;
17091
17407
  comment: string;
17092
17408
  isPublished: boolean;
17093
17409
  overallRating: number;
17094
17410
  wouldRecommend: boolean;
17095
- procedureId: string;
17096
17411
  effectivenessOfTreatment: number;
17097
17412
  outcomeExplanation: number;
17098
17413
  painManagement: number;
@@ -17118,10 +17433,10 @@ declare const createProcedureReviewSchema: z.ZodObject<z.objectUtil.extendShape<
17118
17433
  }>, "strip", z.ZodTypeAny, {
17119
17434
  isVerified: boolean;
17120
17435
  patientId: string;
17436
+ procedureId: string;
17121
17437
  comment: string;
17122
17438
  isPublished: boolean;
17123
17439
  wouldRecommend: boolean;
17124
- procedureId: string;
17125
17440
  effectivenessOfTreatment: number;
17126
17441
  outcomeExplanation: number;
17127
17442
  painManagement: number;
@@ -17129,9 +17444,9 @@ declare const createProcedureReviewSchema: z.ZodObject<z.objectUtil.extendShape<
17129
17444
  valueForMoney: number;
17130
17445
  }, {
17131
17446
  patientId: string;
17447
+ procedureId: string;
17132
17448
  comment: string;
17133
17449
  wouldRecommend: boolean;
17134
- procedureId: string;
17135
17450
  effectivenessOfTreatment: number;
17136
17451
  outcomeExplanation: number;
17137
17452
  painManagement: number;
@@ -17372,12 +17687,12 @@ declare const reviewSchema: z.ZodObject<{
17372
17687
  updatedAt: Date;
17373
17688
  isVerified: boolean;
17374
17689
  patientId: string;
17690
+ procedureId: string;
17375
17691
  fullReviewId: string;
17376
17692
  comment: string;
17377
17693
  isPublished: boolean;
17378
17694
  overallRating: number;
17379
17695
  wouldRecommend: boolean;
17380
- procedureId: string;
17381
17696
  effectivenessOfTreatment: number;
17382
17697
  outcomeExplanation: number;
17383
17698
  painManagement: number;
@@ -17389,12 +17704,12 @@ declare const reviewSchema: z.ZodObject<{
17389
17704
  updatedAt: Date;
17390
17705
  isVerified: boolean;
17391
17706
  patientId: string;
17707
+ procedureId: string;
17392
17708
  fullReviewId: string;
17393
17709
  comment: string;
17394
17710
  isPublished: boolean;
17395
17711
  overallRating: number;
17396
17712
  wouldRecommend: boolean;
17397
- procedureId: string;
17398
17713
  effectivenessOfTreatment: number;
17399
17714
  outcomeExplanation: number;
17400
17715
  painManagement: number;
@@ -17453,12 +17768,12 @@ declare const reviewSchema: z.ZodObject<{
17453
17768
  updatedAt: Date;
17454
17769
  isVerified: boolean;
17455
17770
  patientId: string;
17771
+ procedureId: string;
17456
17772
  fullReviewId: string;
17457
17773
  comment: string;
17458
17774
  isPublished: boolean;
17459
17775
  overallRating: number;
17460
17776
  wouldRecommend: boolean;
17461
- procedureId: string;
17462
17777
  effectivenessOfTreatment: number;
17463
17778
  outcomeExplanation: number;
17464
17779
  painManagement: number;
@@ -17515,12 +17830,12 @@ declare const reviewSchema: z.ZodObject<{
17515
17830
  updatedAt: Date;
17516
17831
  isVerified: boolean;
17517
17832
  patientId: string;
17833
+ procedureId: string;
17518
17834
  fullReviewId: string;
17519
17835
  comment: string;
17520
17836
  isPublished: boolean;
17521
17837
  overallRating: number;
17522
17838
  wouldRecommend: boolean;
17523
- procedureId: string;
17524
17839
  effectivenessOfTreatment: number;
17525
17840
  outcomeExplanation: number;
17526
17841
  painManagement: number;
@@ -17625,10 +17940,10 @@ declare const createReviewSchema: z.ZodEffects<z.ZodObject<{
17625
17940
  }>, "strip", z.ZodTypeAny, {
17626
17941
  isVerified: boolean;
17627
17942
  patientId: string;
17943
+ procedureId: string;
17628
17944
  comment: string;
17629
17945
  isPublished: boolean;
17630
17946
  wouldRecommend: boolean;
17631
- procedureId: string;
17632
17947
  effectivenessOfTreatment: number;
17633
17948
  outcomeExplanation: number;
17634
17949
  painManagement: number;
@@ -17636,9 +17951,9 @@ declare const createReviewSchema: z.ZodEffects<z.ZodObject<{
17636
17951
  valueForMoney: number;
17637
17952
  }, {
17638
17953
  patientId: string;
17954
+ procedureId: string;
17639
17955
  comment: string;
17640
17956
  wouldRecommend: boolean;
17641
- procedureId: string;
17642
17957
  effectivenessOfTreatment: number;
17643
17958
  outcomeExplanation: number;
17644
17959
  painManagement: number;
@@ -17680,10 +17995,10 @@ declare const createReviewSchema: z.ZodEffects<z.ZodObject<{
17680
17995
  procedureReview?: {
17681
17996
  isVerified: boolean;
17682
17997
  patientId: string;
17998
+ procedureId: string;
17683
17999
  comment: string;
17684
18000
  isPublished: boolean;
17685
18001
  wouldRecommend: boolean;
17686
- procedureId: string;
17687
18002
  effectivenessOfTreatment: number;
17688
18003
  outcomeExplanation: number;
17689
18004
  painManagement: number;
@@ -17721,9 +18036,9 @@ declare const createReviewSchema: z.ZodEffects<z.ZodObject<{
17721
18036
  } | undefined;
17722
18037
  procedureReview?: {
17723
18038
  patientId: string;
18039
+ procedureId: string;
17724
18040
  comment: string;
17725
18041
  wouldRecommend: boolean;
17726
- procedureId: string;
17727
18042
  effectivenessOfTreatment: number;
17728
18043
  outcomeExplanation: number;
17729
18044
  painManagement: number;
@@ -17764,10 +18079,10 @@ declare const createReviewSchema: z.ZodEffects<z.ZodObject<{
17764
18079
  procedureReview?: {
17765
18080
  isVerified: boolean;
17766
18081
  patientId: string;
18082
+ procedureId: string;
17767
18083
  comment: string;
17768
18084
  isPublished: boolean;
17769
18085
  wouldRecommend: boolean;
17770
- procedureId: string;
17771
18086
  effectivenessOfTreatment: number;
17772
18087
  outcomeExplanation: number;
17773
18088
  painManagement: number;
@@ -17805,9 +18120,9 @@ declare const createReviewSchema: z.ZodEffects<z.ZodObject<{
17805
18120
  } | undefined;
17806
18121
  procedureReview?: {
17807
18122
  patientId: string;
18123
+ procedureId: string;
17808
18124
  comment: string;
17809
18125
  wouldRecommend: boolean;
17810
- procedureId: string;
17811
18126
  effectivenessOfTreatment: number;
17812
18127
  outcomeExplanation: number;
17813
18128
  painManagement: number;
@@ -17818,4 +18133,4 @@ declare const createReviewSchema: z.ZodEffects<z.ZodObject<{
17818
18133
  } | undefined;
17819
18134
  }>;
17820
18135
 
17821
- export { AUTH_ERRORS, type AddAllergyData, type AddBlockingConditionData, type AddContraindicationData, type AddMedicationData, type AddressData, type AdminInfo, type AdminToken, AdminTokenStatus, type Allergy, type AllergySubtype, AllergyType, type AllergyTypeWithSubtype, type AppointmentNotification, type AppointmentReminderNotification, AuthError, AuthService, type BaseNotification, BlockingCondition, type Brand, BrandService, CALENDAR_COLLECTION, CLINICS_COLLECTION, CLINIC_ADMINS_COLLECTION, CLINIC_GROUPS_COLLECTION, type CalendarEvent, CalendarEventStatus, type CalendarEventTime, CalendarEventType, CalendarServiceV2, CalendarSyncStatus, type Category, CategoryService, CertificationLevel, CertificationSpecialty, type Clinic, type ClinicAdmin, ClinicAdminService, type ClinicAdminSignupData, type ClinicBranchSetupData, type ClinicContactInfo, type ClinicGroup, ClinicGroupService, type ClinicGroupSetupData, type ClinicInfo, type ClinicLocation, ClinicPhotoTag, type ClinicReview, type ClinicReviewInfo, ClinicService, ClinicTag, type ClinicTags, type ContactPerson, Contraindication, CosmeticAllergySubtype, type CreateAdminTokenData, type CreateAppointmentParams, type CreateCalendarEventData, type CreateClinicAdminData, type CreateClinicData, type CreateClinicGroupData, type CreateDefaultClinicGroupData, type CreateDocumentTemplateData, type CreateDraftPractitionerData, type CreatePatientLocationInfoData, type CreatePatientMedicalInfoData, type CreatePatientProfileData, type CreatePatientSensitiveInfoData, type CreatePractitionerData, type CreatePractitionerTokenData, type CreateProcedureData, type CreateSyncedCalendarData, type CreateUserData, Currency, DOCUMENTATION_TEMPLATES_COLLECTION, type DateRange, type DoctorInfo, type DocumentElement, DocumentElementType, type DocumentTemplate, DocumentationTemplateService, DynamicVariable, type EmergencyContact, EnvironmentalAllergySubtype, FILLED_DOCUMENTS_COLLECTION, type FilledDocument, FilledDocumentService, FilledDocumentStatus, FirebaseErrorCode, type FirebaseUser, FoodAllergySubtype, type GamificationInfo, Gender, HeadingLevel, Language, ListType, type LocationData, MedicationAllergySubtype, type Notification, NotificationService, NotificationStatus, NotificationType, PATIENTS_COLLECTION, PATIENT_APPOINTMENTS_COLLECTION, PATIENT_LOCATION_INFO_COLLECTION, PATIENT_MEDICAL_HISTORY_COLLECTION, PATIENT_MEDICAL_INFO_COLLECTION, PATIENT_SENSITIVE_INFO_COLLECTION, PRACTITIONERS_COLLECTION, PROCEDURES_COLLECTION, type PatientClinic, type PatientDoctor, type PatientLocationInfo, type PatientMedicalInfo, type PatientProfile, type PatientProfileComplete, type PatientProfileInfo, type PatientSensitiveInfo, PatientService, type PostRequirementNotification, PracticeType, type Practitioner, type PractitionerBasicInfo, type PractitionerCertification, type PractitionerClinicProcedures, type PractitionerClinicWorkingHours, type PractitionerProfileInfo, type PractitionerReview, type PractitionerReviewInfo, PractitionerService, PractitionerStatus, type PractitionerToken, PractitionerTokenStatus, type PractitionerWorkingHours, type PreRequirementNotification, PricingMeasure, type Procedure, type ProcedureCategorization, ProcedureFamily, type ProcedureInfo, type ProcedureReview, type ProcedureReviewInfo, ProcedureService, type Product, ProductService, REGISTER_TOKENS_COLLECTION, REVIEWS_COLLECTION, type RequesterInfo, type Requirement, RequirementType, type Review, ReviewService, SYNCED_CALENDARS_COLLECTION, type SearchCalendarEventsParams, SearchLocationEnum, type SearchPatientsParams, type Subcategory, SubcategoryService, SubscriptionModel, type SyncedCalendar, type SyncedCalendarEvent, SyncedCalendarProvider, SyncedCalendarsService, type Technology, TechnologyService, type TimeSlot, TimeUnit, TreatmentBenefit, USER_ERRORS, type UpdateAllergyData, type UpdateAppointmentParams, type UpdateBlockingConditionData, type UpdateCalendarEventData, type UpdateClinicAdminData, type UpdateClinicData, type UpdateClinicGroupData, type UpdateContraindicationData, type UpdateDocumentTemplateData, type UpdateMedicationData, type UpdatePatientLocationInfoData, type UpdatePatientMedicalInfoData, type UpdatePatientProfileData, type UpdatePatientSensitiveInfoData, type UpdatePractitionerData, type UpdateProcedureData, type UpdateSyncedCalendarData, type UpdateVitalStatsData, type User, UserRole, UserService, type ValidationSchema, type VitalStats, type WorkingHours, addAllergySchema, addBlockingConditionSchema, addContraindicationSchema, addMedicationSchema, addressDataSchema, adminInfoSchema, adminTokenSchema, allergySchema, allergySubtypeSchema, appointmentNotificationSchema, appointmentReminderNotificationSchema, baseNotificationSchema, blockingConditionSchema, calendarEventSchema, calendarEventTimeSchema, clinicAdminOptionsSchema, clinicAdminSchema, clinicAdminSignupSchema, clinicBranchSetupSchema, clinicContactInfoSchema, clinicGroupSchema, clinicGroupSetupSchema, clinicInfoSchema, clinicLocationSchema, clinicReviewInfoSchema, clinicReviewSchema, clinicSchema, clinicTagsSchema, contactPersonSchema, contraindicationSchema, createAdminTokenSchema, createAppointmentSchema, createCalendarEventSchema, createClinicAdminSchema, createClinicGroupSchema, createClinicReviewSchema, createClinicSchema, createDefaultClinicGroupSchema, createDocumentTemplateSchema, createDraftPractitionerSchema, createPatientLocationInfoSchema, createPatientMedicalInfoSchema, createPatientProfileSchema, createPatientSensitiveInfoSchema, createPractitionerReviewSchema, createPractitionerSchema, createPractitionerTokenSchema, createProcedureReviewSchema, createReviewSchema, createUserOptionsSchema, doctorInfoSchema, documentElementSchema, documentElementWithoutIdSchema, documentTemplateSchema, emailSchema, emergencyContactSchema, gamificationSchema, getFirebaseApp, getFirebaseAuth, getFirebaseDB, getFirebaseInstance, initializeFirebase, locationDataSchema, medicationSchema, notificationSchema, passwordSchema, patientClinicSchema, patientDoctorSchema, patientLocationInfoSchema, patientMedicalInfoSchema, patientProfileInfoSchema, patientProfileSchema, patientSensitiveInfoSchema, postRequirementNotificationSchema, practitionerBasicInfoSchema, practitionerCertificationSchema, practitionerClinicWorkingHoursSchema, practitionerProfileInfoSchema, practitionerReviewInfoSchema, practitionerReviewSchema, practitionerSchema, practitionerTokenSchema, practitionerWorkingHoursSchema, preRequirementNotificationSchema, procedureCategorizationSchema, procedureInfoSchema, procedureReviewInfoSchema, procedureReviewSchema, procedureSummaryInfoSchema, requesterInfoSchema, reviewSchema, searchPatientsSchema, syncedCalendarEventSchema, timeSlotSchema, timestampSchema, updateAllergySchema, updateAppointmentSchema, updateBlockingConditionSchema, updateCalendarEventSchema, updateClinicAdminSchema, updateClinicGroupSchema, updateClinicSchema, updateContraindicationSchema, updateDocumentTemplateSchema, updateMedicationSchema, updatePatientMedicalInfoSchema, updateVitalStatsSchema, userRoleSchema, userRolesSchema, userSchema, vitalStatsSchema, workingHoursSchema };
18136
+ export { APPOINTMENTS_COLLECTION, AUTH_ERRORS, type AddAllergyData, type AddBlockingConditionData, type AddContraindicationData, type AddMedicationData, type AddressData, type AdminInfo, type AdminToken, AdminTokenStatus, type Allergy, type AllergySubtype, AllergyType, type AllergyTypeWithSubtype, type Appointment, type AppointmentNotification, type AppointmentReminderNotification, AppointmentService, AppointmentStatus, AuthError, AuthService, type BaseNotification, BlockingCondition, type Brand, BrandService, CALENDAR_COLLECTION, CLINICS_COLLECTION, CLINIC_ADMINS_COLLECTION, CLINIC_GROUPS_COLLECTION, type CalendarEvent, CalendarEventStatus, type CalendarEventTime, CalendarEventType, CalendarServiceV2, CalendarSyncStatus, type Category, CategoryService, CertificationLevel, CertificationSpecialty, type Clinic, type ClinicAdmin, ClinicAdminService, type ClinicAdminSignupData, type ClinicBranchSetupData, type ClinicContactInfo, type ClinicGroup, ClinicGroupService, type ClinicGroupSetupData, type ClinicInfo, type ClinicLocation, ClinicPhotoTag, type ClinicReview, type ClinicReviewInfo, ClinicService, ClinicTag, type ClinicTags, type ContactPerson, Contraindication, CosmeticAllergySubtype, type CreateAdminTokenData, type CreateAppointmentData, type CreateAppointmentParams, type CreateCalendarEventData, type CreateClinicAdminData, type CreateClinicData, type CreateClinicGroupData, type CreateDefaultClinicGroupData, type CreateDocumentTemplateData, type CreateDraftPractitionerData, type CreatePatientLocationInfoData, type CreatePatientMedicalInfoData, type CreatePatientProfileData, type CreatePatientSensitiveInfoData, type CreatePractitionerData, type CreatePractitionerTokenData, type CreateProcedureData, type CreateSyncedCalendarData, type CreateUserData, Currency, DOCUMENTATION_TEMPLATES_COLLECTION, type DateRange, type DoctorInfo, type DocumentElement, DocumentElementType, type DocumentTemplate, DocumentationTemplateService, DynamicVariable, type EmergencyContact, EnvironmentalAllergySubtype, FILLED_DOCUMENTS_COLLECTION, type FilledDocument, FilledDocumentService, FilledDocumentStatus, FirebaseErrorCode, type FirebaseUser, FoodAllergySubtype, type GamificationInfo, Gender, HeadingLevel, Language, ListType, type LocationData, MedicationAllergySubtype, type Notification, NotificationService, NotificationStatus, NotificationType, PATIENTS_COLLECTION, PATIENT_APPOINTMENTS_COLLECTION, PATIENT_LOCATION_INFO_COLLECTION, PATIENT_MEDICAL_HISTORY_COLLECTION, PATIENT_MEDICAL_INFO_COLLECTION, PATIENT_SENSITIVE_INFO_COLLECTION, PRACTITIONERS_COLLECTION, PROCEDURES_COLLECTION, type PatientClinic, type PatientDoctor, type PatientLocationInfo, type PatientMedicalInfo, type PatientProfile, type PatientProfileComplete, type PatientProfileInfo, type PatientSensitiveInfo, PatientService, PaymentStatus, type PostRequirementNotification, PracticeType, type Practitioner, type PractitionerBasicInfo, type PractitionerCertification, type PractitionerClinicProcedures, type PractitionerClinicWorkingHours, type PractitionerProfileInfo, type PractitionerReview, type PractitionerReviewInfo, PractitionerService, PractitionerStatus, type PractitionerToken, PractitionerTokenStatus, type PractitionerWorkingHours, type PreRequirementNotification, PricingMeasure, type Procedure, type ProcedureCategorization, ProcedureFamily, type ProcedureInfo, type ProcedureReview, type ProcedureReviewInfo, ProcedureService, type Product, ProductService, REGISTER_TOKENS_COLLECTION, REVIEWS_COLLECTION, type RequesterInfo, type Requirement, RequirementType, type Review, ReviewService, SYNCED_CALENDARS_COLLECTION, type SearchAppointmentsParams, type SearchCalendarEventsParams, SearchLocationEnum, type SearchPatientsParams, type Subcategory, SubcategoryService, SubscriptionModel, type SyncedCalendar, type SyncedCalendarEvent, SyncedCalendarProvider, SyncedCalendarsService, type Technology, TechnologyService, type TimeSlot, TimeUnit, TreatmentBenefit, USER_ERRORS, type UpdateAllergyData, type UpdateAppointmentData, type UpdateAppointmentParams, type UpdateBlockingConditionData, type UpdateCalendarEventData, type UpdateClinicAdminData, type UpdateClinicData, type UpdateClinicGroupData, type UpdateContraindicationData, type UpdateDocumentTemplateData, type UpdateMedicationData, type UpdatePatientLocationInfoData, type UpdatePatientMedicalInfoData, type UpdatePatientProfileData, type UpdatePatientSensitiveInfoData, type UpdatePractitionerData, type UpdateProcedureData, type UpdateSyncedCalendarData, type UpdateVitalStatsData, type User, UserRole, UserService, type ValidationSchema, type VitalStats, type WorkingHours, addAllergySchema, addBlockingConditionSchema, addContraindicationSchema, addMedicationSchema, addressDataSchema, adminInfoSchema, adminTokenSchema, allergySchema, allergySubtypeSchema, appointmentNotificationSchema, appointmentReminderNotificationSchema, baseNotificationSchema, blockingConditionSchema, calendarEventSchema, calendarEventTimeSchema, clinicAdminOptionsSchema, clinicAdminSchema, clinicAdminSignupSchema, clinicBranchSetupSchema, clinicContactInfoSchema, clinicGroupSchema, clinicGroupSetupSchema, clinicInfoSchema, clinicLocationSchema, clinicReviewInfoSchema, clinicReviewSchema, clinicSchema, clinicTagsSchema, contactPersonSchema, contraindicationSchema, createAdminTokenSchema, createAppointmentSchema, createCalendarEventSchema, createClinicAdminSchema, createClinicGroupSchema, createClinicReviewSchema, createClinicSchema, createDefaultClinicGroupSchema, createDocumentTemplateSchema, createDraftPractitionerSchema, createPatientLocationInfoSchema, createPatientMedicalInfoSchema, createPatientProfileSchema, createPatientSensitiveInfoSchema, createPractitionerReviewSchema, createPractitionerSchema, createPractitionerTokenSchema, createProcedureReviewSchema, createReviewSchema, createUserOptionsSchema, doctorInfoSchema, documentElementSchema, documentElementWithoutIdSchema, documentTemplateSchema, emailSchema, emergencyContactSchema, gamificationSchema, getFirebaseApp, getFirebaseAuth, getFirebaseDB, getFirebaseInstance, initializeFirebase, locationDataSchema, medicationSchema, notificationSchema, passwordSchema, patientClinicSchema, patientDoctorSchema, patientLocationInfoSchema, patientMedicalInfoSchema, patientProfileInfoSchema, patientProfileSchema, patientSensitiveInfoSchema, postRequirementNotificationSchema, practitionerBasicInfoSchema, practitionerCertificationSchema, practitionerClinicWorkingHoursSchema, practitionerProfileInfoSchema, practitionerReviewInfoSchema, practitionerReviewSchema, practitionerSchema, practitionerTokenSchema, practitionerWorkingHoursSchema, preRequirementNotificationSchema, procedureCategorizationSchema, procedureInfoSchema, procedureReviewInfoSchema, procedureReviewSchema, procedureSummaryInfoSchema, requesterInfoSchema, reviewSchema, searchAppointmentsSchema, searchPatientsSchema, syncedCalendarEventSchema, timeSlotSchema, timestampSchema, updateAllergySchema, updateAppointmentSchema, updateBlockingConditionSchema, updateCalendarEventSchema, updateClinicAdminSchema, updateClinicGroupSchema, updateClinicSchema, updateContraindicationSchema, updateDocumentTemplateSchema, updateMedicationSchema, updatePatientMedicalInfoSchema, updateVitalStatsSchema, userRoleSchema, userRolesSchema, userSchema, vitalStatsSchema, workingHoursSchema };