evo360-types 1.2.25 → 1.2.26

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.
@@ -553,42 +553,16 @@ export declare const zChronicConditionSchema: z.ZodObject<z.objectUtil.extendSha
553
553
  }, {
554
554
  code: z.ZodString;
555
555
  name: z.ZodString;
556
- diagnosis_date: z.ZodOptional<z.ZodNullable<z.ZodString>>;
557
- severity: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodEnum<["Mild", "Moderate", "Severe", "Unknown"]>>>>;
558
- controlled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
559
- medications: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
560
- name: z.ZodString;
561
- dosage: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
562
- frequency: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
563
- }, "strip", z.ZodTypeAny, {
564
- name: string;
565
- dosage: string | null;
566
- frequency: string | null;
567
- }, {
568
- name: string;
569
- dosage?: string | null | undefined;
570
- frequency?: string | null | undefined;
571
- }>, "many">>>;
572
- notes: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
573
556
  }>, "strip", z.ZodTypeAny, {
574
557
  code: string;
575
558
  name: string;
576
559
  id: string;
577
560
  tenant: string;
578
561
  model_ver: number;
579
- severity: "Mild" | "Moderate" | "Severe" | "Unknown" | null;
580
- controlled: boolean;
581
- notes: string | null;
582
562
  ref?: any;
583
563
  created_at?: Date | null | undefined;
584
564
  updated_at?: Date | null | undefined;
585
565
  deleted_at?: Date | null | undefined;
586
- diagnosis_date?: string | null | undefined;
587
- medications?: {
588
- name: string;
589
- dosage: string | null;
590
- frequency: string | null;
591
- }[] | null | undefined;
592
566
  }, {
593
567
  code: string;
594
568
  name: string;
@@ -599,18 +573,8 @@ export declare const zChronicConditionSchema: z.ZodObject<z.objectUtil.extendSha
599
573
  created_at?: Date | null | undefined;
600
574
  updated_at?: Date | null | undefined;
601
575
  deleted_at?: Date | null | undefined;
602
- diagnosis_date?: string | null | undefined;
603
- severity?: "Mild" | "Moderate" | "Severe" | "Unknown" | null | undefined;
604
- controlled?: boolean | undefined;
605
- medications?: {
606
- name: string;
607
- dosage?: string | null | undefined;
608
- frequency?: string | null | undefined;
609
- }[] | null | undefined;
610
- notes?: string | null | undefined;
611
576
  }>;
612
577
  export declare const zAllergyKindSchema: z.ZodEnum<["Food", "Drug", "Insect", "Other"]>;
613
- export declare const zAllergySeveritySchema: z.ZodEnum<["Mild", "Moderate", "Severe", "Unknown"]>;
614
578
  export declare const zAllergySchema: z.ZodObject<z.objectUtil.extendShape<{
615
579
  id: z.ZodString;
616
580
  ref: z.ZodAny;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.zMedicalCouncilSchema = exports.zMedicalCouncilUFSchema = exports.zAllergySchema = exports.zAllergySeveritySchema = exports.zAllergyKindSchema = exports.zChronicConditionSchema = exports.zSeveritySchema = exports.zMedicationSchema = exports.zAppointmentStatusSchema = exports.zAppointmentStatusTypeSchema = exports.zAppointmentRequestTypeSchema = exports.zAppointmentSourceSchema = exports.zPatientSourceSchema = exports.zDistChannelSchema = exports.zDistChannelTypeSchema = exports.zSpecialtySchema = exports.zSpecialtyTypeSchema = void 0;
3
+ exports.zMedicalCouncilSchema = exports.zMedicalCouncilUFSchema = exports.zAllergySchema = exports.zAllergyKindSchema = exports.zChronicConditionSchema = exports.zSeveritySchema = exports.zMedicationSchema = exports.zAppointmentStatusSchema = exports.zAppointmentStatusTypeSchema = exports.zAppointmentRequestTypeSchema = exports.zAppointmentSourceSchema = exports.zPatientSourceSchema = exports.zDistChannelSchema = exports.zDistChannelTypeSchema = exports.zSpecialtySchema = exports.zSpecialtyTypeSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const zod_schemas_1 = require("../../shared/zod-schemas");
6
6
  exports.zSpecialtyTypeSchema = zod_schemas_1.zFireDocSchema
@@ -85,24 +85,13 @@ exports.zSeveritySchema = zod_1.z.enum([
85
85
  exports.zChronicConditionSchema = zod_schemas_1.zFireDocSchema.extend({
86
86
  code: zod_1.z.string().min(1).max(10),
87
87
  name: zod_1.z.string().min(1).max(255),
88
- diagnosis_date: zod_1.z.string().nullable().optional(),
89
- severity: exports.zSeveritySchema.nullable().optional().default("Unknown"),
90
- controlled: zod_1.z.boolean().optional().default(false),
91
- medications: zod_1.z.array(exports.zMedicationSchema).nullable().optional(),
92
- notes: zod_1.z.string().max(1024).nullable().optional().default(""),
93
88
  });
94
89
  exports.zAllergyKindSchema = zod_1.z.enum(["Food", "Drug", "Insect", "Other"]);
95
- exports.zAllergySeveritySchema = zod_1.z.enum([
96
- "Mild",
97
- "Moderate",
98
- "Severe",
99
- "Unknown",
100
- ]);
101
90
  exports.zAllergySchema = zod_schemas_1.zFireDocSchema.extend({
102
91
  code: zod_1.z.string().min(1).max(10),
103
92
  name: zod_1.z.string().min(1).max(255),
104
93
  kind: exports.zAllergyKindSchema.nullable().optional().default("Other"),
105
- severity: exports.zAllergySeveritySchema.nullable().optional().default("Unknown"),
94
+ severity: exports.zSeveritySchema.nullable().optional().default("Unknown"),
106
95
  });
107
96
  exports.zMedicalCouncilUFSchema = zod_1.z.enum([
108
97
  "AC",
@@ -94,26 +94,15 @@ export const zSeveritySchema = z.enum([
94
94
  export const zChronicConditionSchema = zFireDocSchema.extend({
95
95
  code: z.string().min(1).max(10),
96
96
  name: z.string().min(1).max(255),
97
- diagnosis_date: z.string().nullable().optional(),
98
- severity: zSeveritySchema.nullable().optional().default("Unknown"),
99
- controlled: z.boolean().optional().default(false),
100
- medications: z.array(zMedicationSchema).nullable().optional(),
101
- notes: z.string().max(1024).nullable().optional().default(""),
102
97
  });
103
98
 
104
99
  export const zAllergyKindSchema = z.enum(["Food", "Drug", "Insect", "Other"]);
105
- export const zAllergySeveritySchema = z.enum([
106
- "Mild",
107
- "Moderate",
108
- "Severe",
109
- "Unknown",
110
- ]);
111
100
 
112
101
  export const zAllergySchema = zFireDocSchema.extend({
113
102
  code: z.string().min(1).max(10),
114
103
  name: z.string().min(1).max(255),
115
104
  kind: zAllergyKindSchema.nullable().optional().default("Other"),
116
- severity: zAllergySeveritySchema.nullable().optional().default("Unknown"),
105
+ severity: zSeveritySchema.nullable().optional().default("Unknown"),
117
106
  });
118
107
 
119
108
  export const zMedicalCouncilUFSchema = z.enum([
@@ -432,6 +432,73 @@ export declare const zProfessionalSchema: z.ZodObject<z.objectUtil.extendShape<z
432
432
  }>, z.ZodTypeAny, "passthrough">>;
433
433
  export declare const zPatientStatusSchema: z.ZodEnum<["active", "inactive", "draft"]>;
434
434
  export declare const zBloodTypeSchema: z.ZodEnum<["A+", "A-", "B+", "B-", "AB+", "AB-", "O+", "O-", "Unknown"]>;
435
+ export declare const zPatientAllergySchema: z.ZodObject<{
436
+ code: z.ZodString;
437
+ name: z.ZodString;
438
+ ref: z.ZodAny;
439
+ kind: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodEnum<["Food", "Drug", "Insect", "Other"]>>>>;
440
+ severity: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodEnum<["Mild", "Moderate", "Severe", "Unknown"]>>>>;
441
+ }, "strip", z.ZodTypeAny, {
442
+ code: string;
443
+ name: string;
444
+ severity: "Mild" | "Moderate" | "Severe" | "Unknown" | null;
445
+ kind: "Food" | "Drug" | "Insect" | "Other" | null;
446
+ ref?: any;
447
+ }, {
448
+ code: string;
449
+ name: string;
450
+ ref?: any;
451
+ severity?: "Mild" | "Moderate" | "Severe" | "Unknown" | null | undefined;
452
+ kind?: "Food" | "Drug" | "Insect" | "Other" | null | undefined;
453
+ }>;
454
+ export declare const zPatientChronicConditionSchema: z.ZodObject<{
455
+ code: z.ZodString;
456
+ name: z.ZodString;
457
+ ref: z.ZodAny;
458
+ diagnosis_date: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
459
+ severity: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodEnum<["Mild", "Moderate", "Severe", "Unknown"]>>>>;
460
+ controlled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
461
+ medications: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
462
+ name: z.ZodString;
463
+ dosage: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
464
+ frequency: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
465
+ }, "strip", z.ZodTypeAny, {
466
+ name: string;
467
+ dosage: string | null;
468
+ frequency: string | null;
469
+ }, {
470
+ name: string;
471
+ dosage?: string | null | undefined;
472
+ frequency?: string | null | undefined;
473
+ }>, "many">>>;
474
+ notes: z.ZodDefault<z.ZodOptional<z.ZodString>>;
475
+ }, "strip", z.ZodTypeAny, {
476
+ code: string;
477
+ name: string;
478
+ severity: "Mild" | "Moderate" | "Severe" | "Unknown" | null;
479
+ controlled: boolean;
480
+ notes: string;
481
+ ref?: any;
482
+ diagnosis_date?: Date | null | undefined;
483
+ medications?: {
484
+ name: string;
485
+ dosage: string | null;
486
+ frequency: string | null;
487
+ }[] | null | undefined;
488
+ }, {
489
+ code: string;
490
+ name: string;
491
+ ref?: any;
492
+ diagnosis_date?: Date | null | undefined;
493
+ severity?: "Mild" | "Moderate" | "Severe" | "Unknown" | null | undefined;
494
+ controlled?: boolean | undefined;
495
+ medications?: {
496
+ name: string;
497
+ dosage?: string | null | undefined;
498
+ frequency?: string | null | undefined;
499
+ }[] | null | undefined;
500
+ notes?: string | undefined;
501
+ }>;
435
502
  export declare const zPatientSchema: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
436
503
  id: z.ZodString;
437
504
  ref: z.ZodAny;
@@ -498,56 +565,30 @@ export declare const zPatientSchema: z.ZodObject<z.objectUtil.extendShape<z.obje
498
565
  height_cm: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
499
566
  weight_kg: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
500
567
  blood_type: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodEnum<["A+", "A-", "B+", "B-", "AB+", "AB-", "O+", "O-", "Unknown"]>>>>;
501
- allergies: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<z.objectUtil.extendShape<{
502
- id: z.ZodString;
503
- ref: z.ZodAny;
504
- tenant: z.ZodString;
505
- model_ver: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
506
- created_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
507
- updated_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
508
- deleted_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
509
- }, {
568
+ allergies: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
510
569
  code: z.ZodString;
511
570
  name: z.ZodString;
571
+ ref: z.ZodAny;
512
572
  kind: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodEnum<["Food", "Drug", "Insect", "Other"]>>>>;
513
573
  severity: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodEnum<["Mild", "Moderate", "Severe", "Unknown"]>>>>;
514
- }>, "strip", z.ZodTypeAny, {
574
+ }, "strip", z.ZodTypeAny, {
515
575
  code: string;
516
576
  name: string;
517
- id: string;
518
- tenant: string;
519
- model_ver: number;
520
577
  severity: "Mild" | "Moderate" | "Severe" | "Unknown" | null;
521
578
  kind: "Food" | "Drug" | "Insect" | "Other" | null;
522
579
  ref?: any;
523
- created_at?: Date | null | undefined;
524
- updated_at?: Date | null | undefined;
525
- deleted_at?: Date | null | undefined;
526
580
  }, {
527
581
  code: string;
528
582
  name: string;
529
- id: string;
530
- tenant: string;
531
583
  ref?: any;
532
- model_ver?: number | undefined;
533
- created_at?: Date | null | undefined;
534
- updated_at?: Date | null | undefined;
535
- deleted_at?: Date | null | undefined;
536
584
  severity?: "Mild" | "Moderate" | "Severe" | "Unknown" | null | undefined;
537
585
  kind?: "Food" | "Drug" | "Insect" | "Other" | null | undefined;
538
586
  }>, "many">>>;
539
- chronic_conditions: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<z.objectUtil.extendShape<{
540
- id: z.ZodString;
541
- ref: z.ZodAny;
542
- tenant: z.ZodString;
543
- model_ver: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
544
- created_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
545
- updated_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
546
- deleted_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
547
- }, {
587
+ chronic_conditions: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
548
588
  code: z.ZodString;
549
589
  name: z.ZodString;
550
- diagnosis_date: z.ZodOptional<z.ZodNullable<z.ZodString>>;
590
+ ref: z.ZodAny;
591
+ diagnosis_date: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
551
592
  severity: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodEnum<["Mild", "Moderate", "Severe", "Unknown"]>>>>;
552
593
  controlled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
553
594
  medications: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
@@ -563,21 +604,15 @@ export declare const zPatientSchema: z.ZodObject<z.objectUtil.extendShape<z.obje
563
604
  dosage?: string | null | undefined;
564
605
  frequency?: string | null | undefined;
565
606
  }>, "many">>>;
566
- notes: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
567
- }>, "strip", z.ZodTypeAny, {
607
+ notes: z.ZodDefault<z.ZodOptional<z.ZodString>>;
608
+ }, "strip", z.ZodTypeAny, {
568
609
  code: string;
569
610
  name: string;
570
- id: string;
571
- tenant: string;
572
- model_ver: number;
573
611
  severity: "Mild" | "Moderate" | "Severe" | "Unknown" | null;
574
612
  controlled: boolean;
575
- notes: string | null;
613
+ notes: string;
576
614
  ref?: any;
577
- created_at?: Date | null | undefined;
578
- updated_at?: Date | null | undefined;
579
- deleted_at?: Date | null | undefined;
580
- diagnosis_date?: string | null | undefined;
615
+ diagnosis_date?: Date | null | undefined;
581
616
  medications?: {
582
617
  name: string;
583
618
  dosage: string | null;
@@ -586,14 +621,8 @@ export declare const zPatientSchema: z.ZodObject<z.objectUtil.extendShape<z.obje
586
621
  }, {
587
622
  code: string;
588
623
  name: string;
589
- id: string;
590
- tenant: string;
591
624
  ref?: any;
592
- model_ver?: number | undefined;
593
- created_at?: Date | null | undefined;
594
- updated_at?: Date | null | undefined;
595
- deleted_at?: Date | null | undefined;
596
- diagnosis_date?: string | null | undefined;
625
+ diagnosis_date?: Date | null | undefined;
597
626
  severity?: "Mild" | "Moderate" | "Severe" | "Unknown" | null | undefined;
598
627
  controlled?: boolean | undefined;
599
628
  medications?: {
@@ -601,7 +630,7 @@ export declare const zPatientSchema: z.ZodObject<z.objectUtil.extendShape<z.obje
601
630
  dosage?: string | null | undefined;
602
631
  frequency?: string | null | undefined;
603
632
  }[] | null | undefined;
604
- notes?: string | null | undefined;
633
+ notes?: string | undefined;
605
634
  }>, "many">>>;
606
635
  tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
607
636
  name: z.ZodString;
@@ -683,56 +712,30 @@ export declare const zPatientSchema: z.ZodObject<z.objectUtil.extendShape<z.obje
683
712
  height_cm: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
684
713
  weight_kg: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
685
714
  blood_type: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodEnum<["A+", "A-", "B+", "B-", "AB+", "AB-", "O+", "O-", "Unknown"]>>>>;
686
- allergies: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<z.objectUtil.extendShape<{
687
- id: z.ZodString;
688
- ref: z.ZodAny;
689
- tenant: z.ZodString;
690
- model_ver: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
691
- created_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
692
- updated_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
693
- deleted_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
694
- }, {
715
+ allergies: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
695
716
  code: z.ZodString;
696
717
  name: z.ZodString;
718
+ ref: z.ZodAny;
697
719
  kind: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodEnum<["Food", "Drug", "Insect", "Other"]>>>>;
698
720
  severity: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodEnum<["Mild", "Moderate", "Severe", "Unknown"]>>>>;
699
- }>, "strip", z.ZodTypeAny, {
721
+ }, "strip", z.ZodTypeAny, {
700
722
  code: string;
701
723
  name: string;
702
- id: string;
703
- tenant: string;
704
- model_ver: number;
705
724
  severity: "Mild" | "Moderate" | "Severe" | "Unknown" | null;
706
725
  kind: "Food" | "Drug" | "Insect" | "Other" | null;
707
726
  ref?: any;
708
- created_at?: Date | null | undefined;
709
- updated_at?: Date | null | undefined;
710
- deleted_at?: Date | null | undefined;
711
727
  }, {
712
728
  code: string;
713
729
  name: string;
714
- id: string;
715
- tenant: string;
716
730
  ref?: any;
717
- model_ver?: number | undefined;
718
- created_at?: Date | null | undefined;
719
- updated_at?: Date | null | undefined;
720
- deleted_at?: Date | null | undefined;
721
731
  severity?: "Mild" | "Moderate" | "Severe" | "Unknown" | null | undefined;
722
732
  kind?: "Food" | "Drug" | "Insect" | "Other" | null | undefined;
723
733
  }>, "many">>>;
724
- chronic_conditions: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<z.objectUtil.extendShape<{
725
- id: z.ZodString;
726
- ref: z.ZodAny;
727
- tenant: z.ZodString;
728
- model_ver: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
729
- created_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
730
- updated_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
731
- deleted_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
732
- }, {
734
+ chronic_conditions: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
733
735
  code: z.ZodString;
734
736
  name: z.ZodString;
735
- diagnosis_date: z.ZodOptional<z.ZodNullable<z.ZodString>>;
737
+ ref: z.ZodAny;
738
+ diagnosis_date: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
736
739
  severity: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodEnum<["Mild", "Moderate", "Severe", "Unknown"]>>>>;
737
740
  controlled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
738
741
  medications: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
@@ -748,21 +751,15 @@ export declare const zPatientSchema: z.ZodObject<z.objectUtil.extendShape<z.obje
748
751
  dosage?: string | null | undefined;
749
752
  frequency?: string | null | undefined;
750
753
  }>, "many">>>;
751
- notes: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
752
- }>, "strip", z.ZodTypeAny, {
754
+ notes: z.ZodDefault<z.ZodOptional<z.ZodString>>;
755
+ }, "strip", z.ZodTypeAny, {
753
756
  code: string;
754
757
  name: string;
755
- id: string;
756
- tenant: string;
757
- model_ver: number;
758
758
  severity: "Mild" | "Moderate" | "Severe" | "Unknown" | null;
759
759
  controlled: boolean;
760
- notes: string | null;
760
+ notes: string;
761
761
  ref?: any;
762
- created_at?: Date | null | undefined;
763
- updated_at?: Date | null | undefined;
764
- deleted_at?: Date | null | undefined;
765
- diagnosis_date?: string | null | undefined;
762
+ diagnosis_date?: Date | null | undefined;
766
763
  medications?: {
767
764
  name: string;
768
765
  dosage: string | null;
@@ -771,14 +768,8 @@ export declare const zPatientSchema: z.ZodObject<z.objectUtil.extendShape<z.obje
771
768
  }, {
772
769
  code: string;
773
770
  name: string;
774
- id: string;
775
- tenant: string;
776
771
  ref?: any;
777
- model_ver?: number | undefined;
778
- created_at?: Date | null | undefined;
779
- updated_at?: Date | null | undefined;
780
- deleted_at?: Date | null | undefined;
781
- diagnosis_date?: string | null | undefined;
772
+ diagnosis_date?: Date | null | undefined;
782
773
  severity?: "Mild" | "Moderate" | "Severe" | "Unknown" | null | undefined;
783
774
  controlled?: boolean | undefined;
784
775
  medications?: {
@@ -786,7 +777,7 @@ export declare const zPatientSchema: z.ZodObject<z.objectUtil.extendShape<z.obje
786
777
  dosage?: string | null | undefined;
787
778
  frequency?: string | null | undefined;
788
779
  }[] | null | undefined;
789
- notes?: string | null | undefined;
780
+ notes?: string | undefined;
790
781
  }>, "many">>>;
791
782
  tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
792
783
  name: z.ZodString;
@@ -868,56 +859,30 @@ export declare const zPatientSchema: z.ZodObject<z.objectUtil.extendShape<z.obje
868
859
  height_cm: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
869
860
  weight_kg: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
870
861
  blood_type: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodEnum<["A+", "A-", "B+", "B-", "AB+", "AB-", "O+", "O-", "Unknown"]>>>>;
871
- allergies: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<z.objectUtil.extendShape<{
872
- id: z.ZodString;
873
- ref: z.ZodAny;
874
- tenant: z.ZodString;
875
- model_ver: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
876
- created_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
877
- updated_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
878
- deleted_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
879
- }, {
862
+ allergies: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
880
863
  code: z.ZodString;
881
864
  name: z.ZodString;
865
+ ref: z.ZodAny;
882
866
  kind: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodEnum<["Food", "Drug", "Insect", "Other"]>>>>;
883
867
  severity: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodEnum<["Mild", "Moderate", "Severe", "Unknown"]>>>>;
884
- }>, "strip", z.ZodTypeAny, {
868
+ }, "strip", z.ZodTypeAny, {
885
869
  code: string;
886
870
  name: string;
887
- id: string;
888
- tenant: string;
889
- model_ver: number;
890
871
  severity: "Mild" | "Moderate" | "Severe" | "Unknown" | null;
891
872
  kind: "Food" | "Drug" | "Insect" | "Other" | null;
892
873
  ref?: any;
893
- created_at?: Date | null | undefined;
894
- updated_at?: Date | null | undefined;
895
- deleted_at?: Date | null | undefined;
896
874
  }, {
897
875
  code: string;
898
876
  name: string;
899
- id: string;
900
- tenant: string;
901
877
  ref?: any;
902
- model_ver?: number | undefined;
903
- created_at?: Date | null | undefined;
904
- updated_at?: Date | null | undefined;
905
- deleted_at?: Date | null | undefined;
906
878
  severity?: "Mild" | "Moderate" | "Severe" | "Unknown" | null | undefined;
907
879
  kind?: "Food" | "Drug" | "Insect" | "Other" | null | undefined;
908
880
  }>, "many">>>;
909
- chronic_conditions: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<z.objectUtil.extendShape<{
910
- id: z.ZodString;
911
- ref: z.ZodAny;
912
- tenant: z.ZodString;
913
- model_ver: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
914
- created_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
915
- updated_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
916
- deleted_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
917
- }, {
881
+ chronic_conditions: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
918
882
  code: z.ZodString;
919
883
  name: z.ZodString;
920
- diagnosis_date: z.ZodOptional<z.ZodNullable<z.ZodString>>;
884
+ ref: z.ZodAny;
885
+ diagnosis_date: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
921
886
  severity: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodEnum<["Mild", "Moderate", "Severe", "Unknown"]>>>>;
922
887
  controlled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
923
888
  medications: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
@@ -933,21 +898,15 @@ export declare const zPatientSchema: z.ZodObject<z.objectUtil.extendShape<z.obje
933
898
  dosage?: string | null | undefined;
934
899
  frequency?: string | null | undefined;
935
900
  }>, "many">>>;
936
- notes: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
937
- }>, "strip", z.ZodTypeAny, {
901
+ notes: z.ZodDefault<z.ZodOptional<z.ZodString>>;
902
+ }, "strip", z.ZodTypeAny, {
938
903
  code: string;
939
904
  name: string;
940
- id: string;
941
- tenant: string;
942
- model_ver: number;
943
905
  severity: "Mild" | "Moderate" | "Severe" | "Unknown" | null;
944
906
  controlled: boolean;
945
- notes: string | null;
907
+ notes: string;
946
908
  ref?: any;
947
- created_at?: Date | null | undefined;
948
- updated_at?: Date | null | undefined;
949
- deleted_at?: Date | null | undefined;
950
- diagnosis_date?: string | null | undefined;
909
+ diagnosis_date?: Date | null | undefined;
951
910
  medications?: {
952
911
  name: string;
953
912
  dosage: string | null;
@@ -956,14 +915,8 @@ export declare const zPatientSchema: z.ZodObject<z.objectUtil.extendShape<z.obje
956
915
  }, {
957
916
  code: string;
958
917
  name: string;
959
- id: string;
960
- tenant: string;
961
918
  ref?: any;
962
- model_ver?: number | undefined;
963
- created_at?: Date | null | undefined;
964
- updated_at?: Date | null | undefined;
965
- deleted_at?: Date | null | undefined;
966
- diagnosis_date?: string | null | undefined;
919
+ diagnosis_date?: Date | null | undefined;
967
920
  severity?: "Mild" | "Moderate" | "Severe" | "Unknown" | null | undefined;
968
921
  controlled?: boolean | undefined;
969
922
  medications?: {
@@ -971,7 +924,7 @@ export declare const zPatientSchema: z.ZodObject<z.objectUtil.extendShape<z.obje
971
924
  dosage?: string | null | undefined;
972
925
  frequency?: string | null | undefined;
973
926
  }[] | null | undefined;
974
- notes?: string | null | undefined;
927
+ notes?: string | undefined;
975
928
  }>, "many">>>;
976
929
  tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
977
930
  name: z.ZodString;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.zPatientSchema = exports.zBloodTypeSchema = exports.zPatientStatusSchema = exports.zProfessionalSchema = exports.zProfessionalOfficeSchema = exports.zProfessionalSpecialtySchema = exports.zProfessionalCouncilSchema = exports.zProfessionalStatusSchema = void 0;
3
+ exports.zPatientSchema = exports.zPatientChronicConditionSchema = exports.zPatientAllergySchema = exports.zBloodTypeSchema = exports.zPatientStatusSchema = exports.zProfessionalSchema = exports.zProfessionalOfficeSchema = exports.zProfessionalSpecialtySchema = exports.zProfessionalCouncilSchema = exports.zProfessionalStatusSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const zod_schemas_1 = require("../dic/zod-schemas");
6
6
  const zod_schemas_2 = require("../../shared/zod-schemas");
@@ -59,6 +59,23 @@ exports.zBloodTypeSchema = zod_1.z.enum([
59
59
  "O-",
60
60
  "Unknown",
61
61
  ]);
62
+ exports.zPatientAllergySchema = zod_1.z.object({
63
+ code: zod_1.z.string().min(1).max(10),
64
+ name: zod_1.z.string().min(1).max(255),
65
+ ref: zod_1.z.any(),
66
+ kind: zod_schemas_1.zAllergyKindSchema.nullable().optional().default("Other"),
67
+ severity: zod_schemas_1.zSeveritySchema.nullable().optional().default("Unknown"),
68
+ });
69
+ exports.zPatientChronicConditionSchema = zod_1.z.object({
70
+ code: zod_1.z.string().min(1).max(10),
71
+ name: zod_1.z.string().min(1).max(255),
72
+ ref: zod_1.z.any(),
73
+ diagnosis_date: zod_1.z.date().nullable().optional(),
74
+ severity: zod_schemas_1.zSeveritySchema.nullable().optional().default("Unknown"),
75
+ controlled: zod_1.z.boolean().optional().default(false),
76
+ medications: zod_1.z.array(zod_schemas_1.zMedicationSchema).nullable().optional(),
77
+ notes: zod_1.z.string().max(2048).optional().default(""),
78
+ });
62
79
  exports.zPatientSchema = zod_schemas_3.zProfileSchema // Extend from ProfileSchema
63
80
  .extend({
64
81
  social_id: zod_1.z.string().nullable().optional(),
@@ -68,8 +85,11 @@ exports.zPatientSchema = zod_schemas_3.zProfileSchema // Extend from ProfileSche
68
85
  height_cm: zod_1.z.number().nullable().optional(),
69
86
  weight_kg: zod_1.z.number().nullable().optional(),
70
87
  blood_type: exports.zBloodTypeSchema.nullable().optional().default("Unknown"),
71
- allergies: zod_1.z.array(zod_schemas_1.zAllergySchema).nullable().optional(),
72
- chronic_conditions: zod_1.z.array(zod_schemas_1.zChronicConditionSchema).nullable().optional(),
88
+ allergies: zod_1.z.array(exports.zPatientAllergySchema).nullable().optional(),
89
+ chronic_conditions: zod_1.z
90
+ .array(exports.zPatientChronicConditionSchema)
91
+ .nullable()
92
+ .optional(),
73
93
  tags: zod_1.z.array(zod_schemas_2.zTagSchema).nullable().optional(),
74
94
  userRef: zod_1.z.any(),
75
95
  })
@@ -1,8 +1,10 @@
1
1
  import { z } from "zod";
2
2
  import {
3
+ zAllergyKindSchema,
3
4
  zAllergySchema,
4
- zChronicConditionSchema,
5
5
  zMedicalCouncilUFSchema,
6
+ zMedicationSchema,
7
+ zSeveritySchema,
6
8
  } from "../dic/zod-schemas";
7
9
  import {
8
10
  zAddressSchema,
@@ -73,6 +75,25 @@ export const zBloodTypeSchema = z.enum([
73
75
  "Unknown",
74
76
  ]);
75
77
 
78
+ export const zPatientAllergySchema = z.object({
79
+ code: z.string().min(1).max(10),
80
+ name: z.string().min(1).max(255),
81
+ ref: z.any(),
82
+ kind: zAllergyKindSchema.nullable().optional().default("Other"),
83
+ severity: zSeveritySchema.nullable().optional().default("Unknown"),
84
+ });
85
+
86
+ export const zPatientChronicConditionSchema = z.object({
87
+ code: z.string().min(1).max(10),
88
+ name: z.string().min(1).max(255),
89
+ ref: z.any(),
90
+ diagnosis_date: z.date().nullable().optional(),
91
+ severity: zSeveritySchema.nullable().optional().default("Unknown"),
92
+ controlled: z.boolean().optional().default(false),
93
+ medications: z.array(zMedicationSchema).nullable().optional(),
94
+ notes: z.string().max(2048).optional().default(""),
95
+ });
96
+
76
97
  export const zPatientSchema = zProfileSchema // Extend from ProfileSchema
77
98
  .extend({
78
99
  social_id: z.string().nullable().optional(),
@@ -82,8 +103,11 @@ export const zPatientSchema = zProfileSchema // Extend from ProfileSchema
82
103
  height_cm: z.number().nullable().optional(),
83
104
  weight_kg: z.number().nullable().optional(),
84
105
  blood_type: zBloodTypeSchema.nullable().optional().default("Unknown"),
85
- allergies: z.array(zAllergySchema).nullable().optional(),
86
- chronic_conditions: z.array(zChronicConditionSchema).nullable().optional(),
106
+ allergies: z.array(zPatientAllergySchema).nullable().optional(),
107
+ chronic_conditions: z
108
+ .array(zPatientChronicConditionSchema)
109
+ .nullable()
110
+ .optional(),
87
111
  tags: z.array(zTagSchema).nullable().optional(),
88
112
  userRef: z.any(),
89
113
  })
@@ -103,7 +103,6 @@ export interface IAllergy extends IFireDoc {
103
103
  code: string;
104
104
  name: string;
105
105
  kind?: "Food" | "Drug" | "Insect" | "Other" | null;
106
- severity?: "Mild" | "Moderate" | "Severe" | "Unknown" | null;
107
106
  }
108
107
  export interface IMedicalCouncil extends IFireDoc {
109
108
  name: string;
@@ -141,7 +141,6 @@ export interface IAllergy extends IFireDoc {
141
141
  code: string;
142
142
  name: string;
143
143
  kind?: "Food" | "Drug" | "Insect" | "Other" | null;
144
- severity?: "Mild" | "Moderate" | "Severe" | "Unknown" | null;
145
144
  }
146
145
 
147
146
  export interface IMedicalCouncil extends IFireDoc {
@@ -1,7 +1,7 @@
1
1
  export * from "../fb_collections";
2
2
  import { IProfile } from "../../evo-people";
3
3
  import type { FirestoreDocumentReference, IAddress, IContact, ITag } from "../../shared";
4
- import { IAllergy, IChronicCondition } from "../dic";
4
+ import { IAllergy, IMedication } from "../dic";
5
5
  export type MedPeopleAction = "CREATE_PROFESSIONAL" | "DELETE_PROFESSIONAL" | "UPDATE_PROFESSIONAL" | "UPDATE_PROFESSIONAL_PHOTO" | "UPDATE_PROFESSIONAL_PROFILE" | "UPDATE_PROFESSIONAL_PASSWORD" | "UPDATE_PROFESSIONAL_REPORT_TO" | "UPDATE_PROFESSIONAL_DEPARTMENT" | "UPDATE_PROFESSIONAL_OFFICE" | "UPDATE_PROFESSIONAL_COMPANY" | "UPDATE_PROFESSIONAL_JOB_TITLE" | "UPDATE_PROFESSIONAL_WORK_EMAIL" | "UPDATE_PROFESSIONAL_STATUS";
6
6
  export declare enum IMedPeopleAction {
7
7
  Create_professional = "CREATE_PROFESSIONAL",
@@ -78,6 +78,30 @@ export declare enum IBloodType {
78
78
  ONegative = "O-",
79
79
  Unknown = "Unknown"
80
80
  }
81
+ export type Severity = "Mild" | "Moderate" | "Severe" | "Unknown";
82
+ export declare enum ISeverity {
83
+ Mild = "Mild",
84
+ Moderate = "Moderate",
85
+ Severe = "Severe",
86
+ Unknown = "Unknown"
87
+ }
88
+ export interface IPatientChronicCondition {
89
+ code: string;
90
+ name: string;
91
+ ref?: FirestoreDocumentReference;
92
+ diagnosis_date?: Date | null;
93
+ severity?: Severity | null;
94
+ controlled?: boolean | null;
95
+ medications?: IMedication[] | null;
96
+ notes?: string | null;
97
+ }
98
+ export interface IPatientAllergy {
99
+ code: string;
100
+ name: string;
101
+ kind?: "Food" | "Drug" | "Insect" | "Other" | null;
102
+ ref?: FirestoreDocumentReference;
103
+ severity?: Severity | null;
104
+ }
81
105
  export interface IPatient extends IProfile {
82
106
  social_id?: string | null;
83
107
  status?: PatientStatus;
@@ -90,7 +114,7 @@ export interface IPatient extends IProfile {
90
114
  weight_kg?: number | null;
91
115
  blood_type?: BloodType | null;
92
116
  allergies?: IAllergy[] | null;
93
- chronic_conditions?: IChronicCondition[] | null;
117
+ chronic_conditions?: IPatientChronicCondition[] | null;
94
118
  tags?: ITag[] | null;
95
119
  userRef?: FirestoreDocumentReference;
96
120
  [key: string]: unknown;
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.IBloodType = exports.IPatientStatus = exports.IProfessionalStatus = exports.IMedPeopleAction = void 0;
17
+ exports.ISeverity = exports.IBloodType = exports.IPatientStatus = exports.IProfessionalStatus = exports.IMedPeopleAction = void 0;
18
18
  __exportStar(require("../fb_collections"), exports);
19
19
  var IMedPeopleAction;
20
20
  (function (IMedPeopleAction) {
@@ -57,3 +57,10 @@ var IBloodType;
57
57
  IBloodType["ONegative"] = "O-";
58
58
  IBloodType["Unknown"] = "Unknown";
59
59
  })(IBloodType || (exports.IBloodType = IBloodType = {}));
60
+ var ISeverity;
61
+ (function (ISeverity) {
62
+ ISeverity["Mild"] = "Mild";
63
+ ISeverity["Moderate"] = "Moderate";
64
+ ISeverity["Severe"] = "Severe";
65
+ ISeverity["Unknown"] = "Unknown";
66
+ })(ISeverity || (exports.ISeverity = ISeverity = {}));
@@ -6,7 +6,7 @@ import type {
6
6
  IContact,
7
7
  ITag,
8
8
  } from "../../shared";
9
- import { IAllergy, IChronicCondition } from "../dic";
9
+ import { IAllergy, IChronicCondition, IMedication } from "../dic";
10
10
 
11
11
  // ----- MedPeopleTypes
12
12
 
@@ -137,6 +137,33 @@ export enum IBloodType {
137
137
  Unknown = "Unknown",
138
138
  }
139
139
 
140
+ export type Severity = "Mild" | "Moderate" | "Severe" | "Unknown";
141
+ export enum ISeverity {
142
+ Mild = "Mild",
143
+ Moderate = "Moderate",
144
+ Severe = "Severe",
145
+ Unknown = "Unknown",
146
+ }
147
+
148
+ export interface IPatientChronicCondition {
149
+ code: string; // Identificador único da condição
150
+ name: string; // Nome da doença crônica, ex: "Diabetes Tipo 2"
151
+ ref?: FirestoreDocumentReference;
152
+ diagnosis_date?: Date | null; // Data do diagnóstico (ISO 8601)
153
+ severity?: Severity | null; // Nível de gravidade
154
+ controlled?: boolean | null; // Indica se a condição está sob controle
155
+ medications?: IMedication[] | null; // Lista de medicamentos utilizados para tratar a condição
156
+ notes?: string | null; // Observações adicionais
157
+ }
158
+
159
+ export interface IPatientAllergy {
160
+ code: string;
161
+ name: string;
162
+ kind?: "Food" | "Drug" | "Insect" | "Other" | null;
163
+ ref?: FirestoreDocumentReference;
164
+ severity?: Severity | null; // Nível de gravidade
165
+ }
166
+
140
167
  export interface IPatient extends IProfile {
141
168
  social_id?: string | null; //CPF
142
169
  status?: PatientStatus;
@@ -150,7 +177,7 @@ export interface IPatient extends IProfile {
150
177
  weight_kg?: number | null; // Peso em kg
151
178
  blood_type?: BloodType | null; // Tipo sanguíneo
152
179
  allergies?: IAllergy[] | null; // Lista de alergias conhecidas
153
- chronic_conditions?: IChronicCondition[] | null; // Lista de doenças crônicas do paciente
180
+ chronic_conditions?: IPatientChronicCondition[] | null; // Lista de doenças crônicas do paciente
154
181
  tags?: ITag[] | null;
155
182
  userRef?: FirestoreDocumentReference;
156
183
  [key: string]: unknown; // index signature
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "evo360-types",
3
- "version": "1.2.25",
3
+ "version": "1.2.26",
4
4
  "description": "HREVO360 Shared Types",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",