arshenoy commited on
Commit
52d1841
·
verified ·
1 Parent(s): 614524f

Update components/ReportView.tsx

Browse files
Files changed (1) hide show
  1. components/ReportView.tsx +15 -6
components/ReportView.tsx CHANGED
@@ -1,7 +1,6 @@
1
-
2
  import React from 'react';
3
  import { PatientProfile, ClinicalVitals, RiskAnalysisResult, ChatMessage, Medication } from '../types';
4
- import { FileText, User, Activity, Pill, MessageSquare, ShieldCheck } from 'lucide-react';
5
 
6
  interface ReportViewProps {
7
  profile: PatientProfile;
@@ -42,10 +41,16 @@ const ReportView: React.FC<ReportViewProps> = ({
42
 
43
  {/* Vitals & Risk */}
44
  <section>
45
- <h3 className="text-sm font-mono font-bold text-gray-400 uppercase mb-4 border-b border-white/5 pb-2 flex items-center gap-2">
46
- <Activity size={16} /> Clinical Analysis
 
 
 
 
 
 
47
  </h3>
48
- <div className="grid grid-cols-1 md:grid-cols-3 gap-4 mb-4">
49
  <div className="bg-white/5 p-3 rounded-lg text-center border border-white/5">
50
  <span className="text-gray-500 text-xs block">Systolic BP</span>
51
  <span className="font-mono font-bold text-neon-green text-lg">{vitals.systolicBp}</span>
@@ -54,6 +59,10 @@ const ReportView: React.FC<ReportViewProps> = ({
54
  <span className="text-gray-500 text-xs block">Glucose</span>
55
  <span className="font-mono font-bold text-neon-yellow text-lg">{vitals.glucose}</span>
56
  </div>
 
 
 
 
57
  <div className="bg-white/5 p-3 rounded-lg text-center border border-white/5">
58
  <span className="text-gray-500 text-xs block">Risk Score</span>
59
  <span className="font-mono font-bold text-neon-red text-lg">{riskResult?.numericScore ?? 'N/A'}</span>
@@ -154,4 +163,4 @@ const ReportView: React.FC<ReportViewProps> = ({
154
  );
155
  };
156
 
157
- export default ReportView;
 
 
1
  import React from 'react';
2
  import { PatientProfile, ClinicalVitals, RiskAnalysisResult, ChatMessage, Medication } from '../types';
3
+ import { FileText, User, Activity, Pill, MessageSquare, ShieldCheck, Zap, Server } from 'lucide-react';
4
 
5
  interface ReportViewProps {
6
  profile: PatientProfile;
 
41
 
42
  {/* Vitals & Risk */}
43
  <section>
44
+ <h3 className="text-sm font-mono font-bold text-gray-400 uppercase mb-4 border-b border-white/5 pb-2 flex items-center gap-2 justify-between">
45
+ <div className="flex items-center gap-2"><Activity size={16} /> Clinical Analysis</div>
46
+ {riskResult?.source && (
47
+ <span className="text-[10px] font-mono font-medium text-gray-500 flex items-center gap-1 bg-white/5 px-2 py-0.5 rounded">
48
+ {riskResult.source.includes('Gemini') ? <Zap size={10}/> : <Server size={10}/>}
49
+ {riskResult.source}
50
+ </span>
51
+ )}
52
  </h3>
53
+ <div className="grid grid-cols-1 md:grid-cols-4 gap-4 mb-4">
54
  <div className="bg-white/5 p-3 rounded-lg text-center border border-white/5">
55
  <span className="text-gray-500 text-xs block">Systolic BP</span>
56
  <span className="font-mono font-bold text-neon-green text-lg">{vitals.systolicBp}</span>
 
59
  <span className="text-gray-500 text-xs block">Glucose</span>
60
  <span className="font-mono font-bold text-neon-yellow text-lg">{vitals.glucose}</span>
61
  </div>
62
+ <div className="bg-white/5 p-3 rounded-lg text-center border border-white/5">
63
+ <span className="text-gray-500 text-xs block">SpO2</span>
64
+ <span className={`font-mono font-bold text-lg ${vitals.spo2 < 95 ? 'text-neon-red' : 'text-cyan-400'}`}>{vitals.spo2}%</span>
65
+ </div>
66
  <div className="bg-white/5 p-3 rounded-lg text-center border border-white/5">
67
  <span className="text-gray-500 text-xs block">Risk Score</span>
68
  <span className="font-mono font-bold text-neon-red text-lg">{riskResult?.numericScore ?? 'N/A'}</span>
 
163
  );
164
  };
165
 
166
+ export default ReportView;