Update types.ts
Browse files
types.ts
CHANGED
|
@@ -1,147 +1,132 @@
|
|
| 1 |
export interface PatientProfile {
|
| 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 |
-
streak: number;
|
| 30 |
-
lastStreakUpdate: string;
|
| 31 |
-
lastCheckup: string;
|
| 32 |
-
badges: string[];
|
| 33 |
}
|
| 34 |
-
|
| 35 |
export interface Medication {
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
}
|
| 44 |
-
|
| 45 |
export interface ClinicalVitals {
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
}
|
| 58 |
-
|
| 59 |
export interface ICDCode {
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
}
|
| 64 |
-
|
| 65 |
export interface RiskAnalysisResult {
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
}
|
| 75 |
-
|
| 76 |
export interface HealthInsights {
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
}
|
| 81 |
-
|
| 82 |
export interface ChatMessage {
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
}
|
| 90 |
-
|
| 91 |
export interface ChatSession {
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
}
|
| 98 |
-
|
| 99 |
export interface ExtractionResult {
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
}
|
| 104 |
-
|
| 105 |
export enum AppMode {
|
| 106 |
-
|
| 107 |
-
|
| 108 |
}
|
| 109 |
-
|
| 110 |
export const INITIAL_PROFILE: PatientProfile = {
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
|
| 129 |
-
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
|
| 133 |
};
|
| 134 |
-
|
| 135 |
export const INITIAL_VITALS: ClinicalVitals = {
|
| 136 |
-
|
| 137 |
-
|
| 138 |
-
|
| 139 |
-
|
| 140 |
-
|
| 141 |
-
|
| 142 |
-
|
| 143 |
-
|
| 144 |
-
|
| 145 |
-
|
| 146 |
-
|
| 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 |
};
|