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