arshenoy commited on
Commit
0295b09
·
verified ·
1 Parent(s): 67844bd

Update types.ts

Browse files
Files changed (1) hide show
  1. types.ts +108 -123
types.ts CHANGED
@@ -1,147 +1,132 @@
1
  export interface PatientProfile {
2
- // Basics
3
- name: string;
4
- age: number;
5
- gender: string;
6
- bloodGroup: string;
7
-
8
- // Contacts
9
- contactNumber: string;
10
- emergencyContactName: string;
11
- emergencyContactRelation: string;
12
- emergencyContactPhone: string;
13
-
14
- // Medical History
15
- condition: string;
16
- history: string;
17
- surgeries: string;
18
- familyHistory: string;
19
- allergies: string;
20
- medicationsHistory: string;
21
-
22
- // Lifestyle
23
- diet: 'Omnivore' | 'Vegetarian' | 'Vegan' | 'Keto' | 'Other';
24
- exerciseFrequency: 'Sedentary' | 'Light' | 'Moderate' | 'Active';
25
- smokingStatus: 'Never' | 'Former' | 'Current';
26
- alcoholConsumption: 'None' | 'Occasional' | 'Regular';
27
-
28
- // Gamification
29
- streak: number;
30
- lastStreakUpdate: string;
31
- lastCheckup: string;
32
- badges: string[];
33
  }
34
-
35
  export interface Medication {
36
- id: string;
37
- name: string;
38
- dosage: string;
39
- time: string;
40
- taken: boolean;
41
- startDate?: string;
42
- endDate?: string;
43
  }
44
-
45
  export interface ClinicalVitals {
46
- systolicBpMorning: number;
47
- systolicBpEvening: number;
48
- systolicBp: number;
49
- glucose: number;
50
- heartRate: number;
51
- weight: number;
52
- temperature: number;
53
- spo2: number;
54
- sleepQuality: number;
55
- missedDoses: number;
56
- clinicalNote: string;
57
  }
58
-
59
  export interface ICDCode {
60
- code: string;
61
- description: string;
62
- type: 'Primary' | 'History' | 'Symptom';
63
  }
64
-
65
  export interface RiskAnalysisResult {
66
- numericScore: number;
67
- summary: string;
68
- actionItems: string[];
69
- icd10Codes: string[];
70
- codingPipeline: ICDCode[];
71
- insuranceNote: string;
72
- timestamp: string;
73
- source?: string;
74
  }
75
-
76
  export interface HealthInsights {
77
- weeklySummary: string;
78
- progress: string;
79
- tips: string[];
80
  }
81
-
82
  export interface ChatMessage {
83
- id: string;
84
- role: 'user' | 'model';
85
- text: string;
86
- timestamp: number;
87
- image?: string;
88
- modelUsed?: string;
89
  }
90
-
91
  export interface ChatSession {
92
- id: string;
93
- name: string;
94
- messages: ChatMessage[];
95
- createdAt: number;
96
- lastModified: number;
97
  }
98
-
99
  export interface ExtractionResult {
100
- profile?: Partial<PatientProfile>;
101
- vitals?: Partial<ClinicalVitals>;
102
- confidence: number;
103
  }
104
-
105
  export enum AppMode {
106
- GENERAL = 'GENERAL',
107
- THERAPY = 'THERAPY'
108
  }
109
-
110
  export const INITIAL_PROFILE: PatientProfile = {
111
- name: 'Guest Patient',
112
- age: 35,
113
- gender: 'Prefer not to say',
114
- bloodGroup: 'O+',
115
- contactNumber: '',
116
- emergencyContactName: '',
117
- emergencyContactRelation: '',
118
- emergencyContactPhone: '',
119
- condition: 'Hypertension',
120
- history: 'None',
121
- surgeries: 'None',
122
- familyHistory: 'None',
123
- allergies: 'None',
124
- medicationsHistory: 'None',
125
- diet: 'Omnivore',
126
- exerciseFrequency: 'Sedentary',
127
- smokingStatus: 'Never',
128
- alcoholConsumption: 'None',
129
- streak: 0,
130
- lastStreakUpdate: new Date().toISOString(),
131
- lastCheckup: new Date().toISOString(),
132
- badges: []
133
  };
134
-
135
  export const INITIAL_VITALS: ClinicalVitals = {
136
- systolicBpMorning: 120,
137
- systolicBpEvening: 122,
138
- systolicBp: 121,
139
- glucose: 100,
140
- heartRate: 72,
141
- weight: 70,
142
- temperature: 98.6,
143
- spo2: 98,
144
- sleepQuality: 7,
145
- missedDoses: 0,
146
- clinicalNote: ''
147
  };
 
1
  export interface PatientProfile {
2
+ // Basics
3
+ name: string;
4
+ age: number;
5
+ gender: string;
6
+ bloodGroup: string;
7
+ // Contacts
8
+ contactNumber: string;
9
+ emergencyContactName: string;
10
+ emergencyContactRelation: string;
11
+ emergencyContactPhone: string;
12
+ // Medical History
13
+ condition: string;
14
+ history: string;
15
+ surgeries: string;
16
+ familyHistory: string;
17
+ allergies: string;
18
+ medicationsHistory: string;
19
+ // Lifestyle
20
+ diet: 'Omnivore' | 'Vegetarian' | 'Vegan' | 'Keto' | 'Other';
21
+ exerciseFrequency: 'Sedentary' | 'Light' | 'Moderate' | 'Active';
22
+ smokingStatus: 'Never' | 'Former' | 'Current';
23
+ alcoholConsumption: 'None' | 'Occasional' | 'Regular';
24
+ // Gamification
25
+ streak: number;
26
+ lastStreakUpdate: string;
27
+ lastCheckup: string;
28
+ badges: string[];
 
 
 
 
29
  }
 
30
  export interface Medication {
31
+ id: string;
32
+ name: string;
33
+ dosage: string;
34
+ time: string;
35
+ taken: boolean;
36
+ startDate?: string;
37
+ endDate?: string;
38
  }
 
39
  export interface ClinicalVitals {
40
+ systolicBpMorning: number;
41
+ systolicBpEvening: number;
42
+ systolicBp: number;
43
+ glucose: number;
44
+ heartRate: number;
45
+ weight: number;
46
+ temperature: number;
47
+ spo2: number;
48
+ sleepQuality: number;
49
+ missedDoses: number;
50
+ clinicalNote: string;
51
  }
 
52
  export interface ICDCode {
53
+ code: string;
54
+ description: string;
55
+ type: 'Primary' | 'History' | 'Symptom';
56
  }
 
57
  export interface RiskAnalysisResult {
58
+ numericScore: number;
59
+ summary: string;
60
+ actionItems: string[];
61
+ icd10Codes: string[];
62
+ codingPipeline: ICDCode[];
63
+ insuranceNote: string;
64
+ timestamp: string;
65
+ source?: string;
66
  }
 
67
  export interface HealthInsights {
68
+ weeklySummary: string;
69
+ progress: string;
70
+ tips: string[];
71
  }
 
72
  export interface ChatMessage {
73
+ id: string;
74
+ role: 'user' | 'model';
75
+ text: string;
76
+ timestamp: number;
77
+ image?: string;
78
+ modelUsed?: string;
79
  }
 
80
  export interface ChatSession {
81
+ id: string;
82
+ name: string;
83
+ messages: ChatMessage[];
84
+ createdAt: number;
85
+ lastModified: number;
86
  }
 
87
  export interface ExtractionResult {
88
+ profile?: Partial<PatientProfile>;
89
+ vitals?: Partial<ClinicalVitals>;
90
+ confidence: number;
91
  }
 
92
  export enum AppMode {
93
+ GENERAL = 'GENERAL',
94
+ THERAPY = 'THERAPY'
95
  }
 
96
  export const INITIAL_PROFILE: PatientProfile = {
97
+ name: 'Guest Patient',
98
+ age: 35,
99
+ gender: 'Prefer not to say',
100
+ bloodGroup: 'O+',
101
+ contactNumber: '',
102
+ emergencyContactName: '',
103
+ emergencyContactRelation: '',
104
+ emergencyContactPhone: '',
105
+ condition: 'Hypertension',
106
+ history: 'None',
107
+ surgeries: 'None',
108
+ familyHistory: 'None',
109
+ allergies: 'None',
110
+ medicationsHistory: 'None',
111
+ diet: 'Omnivore',
112
+ exerciseFrequency: 'Sedentary',
113
+ smokingStatus: 'Never',
114
+ alcoholConsumption: 'None',
115
+ streak: 0,
116
+ lastStreakUpdate: new Date().toISOString(),
117
+ lastCheckup: new Date().toISOString(),
118
+ badges: []
119
  };
 
120
  export const INITIAL_VITALS: ClinicalVitals = {
121
+ systolicBpMorning: 120,
122
+ systolicBpEvening: 122,
123
+ systolicBp: 121,
124
+ glucose: 100,
125
+ heartRate: 72,
126
+ weight: 70,
127
+ temperature: 98.6,
128
+ spo2: 98,
129
+ sleepQuality: 7,
130
+ missedDoses: 0,
131
+ clinicalNote: ''
132
  };