@@ -5,6 +5,7 @@ const OLLAMA_DEFAULT_MODEL = "llama3.2";
55import { invoke } from "@tauri-apps/api/core" ;
66import { open } from "@tauri-apps/plugin-dialog" ;
77import { api , type DocumentDetail , type DocumentRow , type Health , type Settings } from "./api" ;
8+ import { printClinicalReport } from "./printReport" ;
89import { isTauriRuntime } from "./tauri-env" ;
910
1011type Tab = "dashboard" | "documents" | "settings" ;
@@ -166,7 +167,7 @@ export default function App() {
166167 < Stat
167168 title = "LLM endpoint"
168169 value = { settings ?. llm_base_url ? "Set" : "Default" }
169- hint = { settings ?. llm_base_url ?? "http://127.0.0.1:8080 " }
170+ hint = { settings ?. llm_base_url ?? "http://127.0.0.1:11434/v1 " }
170171 good
171172 />
172173 </ div >
@@ -244,7 +245,7 @@ export default function App() {
244245 ) }
245246 </ main >
246247
247- < footer className = "border-t border-slate-800/80 py-4 text-center text-xs text-slate-600 print:hidden" >
248+ < footer className = "border-t border-slate-800/80 py-4 text-center text-xs text-slate-400 print:hidden" >
248249 Local-only processing · No cloud · HIPAA-aligned deployment on your network
249250 </ footer >
250251 </ div >
@@ -359,47 +360,52 @@ function SettingsForm(props: {
359360function ReportCard ( props : { detail : DocumentDetail ; onClose : ( ) => void } ) {
360361 const d = props . detail ;
361362 return (
362- < article className = "rounded-xl border border-slate-800 bg-slate-900/40 overflow-hidden print:border-slate-300 print:bg-white print: shadow-none " >
363- < div className = "flex items-start justify-between gap-4 px-6 py-4 border-b border-slate-800 print:border -slate-200 " >
363+ < article className = "rounded-xl border border-slate-700 bg-slate-950/50 overflow-hidden shadow-lg " >
364+ < div className = "flex items-start justify-between gap-4 px-5 py-4 border-b border-slate-700 bg -slate-900/80 " >
364365 < div >
365- < h3 className = "text-base font-semibold text-white print:text- slate-900 " > { d . file_name } </ h3 >
366- < p className = "text-xs text-slate-500 mt-1 print:text-slate-600 " >
366+ < h3 className = "text-base font-semibold text-slate-100 " > { d . file_name } </ h3 >
367+ < p className = "text-xs text-slate-400 mt-1" >
367368 { d . source_type } · { new Date ( d . created_at ) . toLocaleString ( ) }
368369 { d . confidence != null && ` · Confidence ${ Math . round ( d . confidence * 100 ) } %` }
369370 </ p >
370371 </ div >
371- < button
372- type = "button"
373- onClick = { ( ) => window . print ( ) }
374- className = "text-xs rounded-md border border-slate-600 px-3 py-1.5 text-slate-300 hover:bg-slate-800 print:hidden"
375- >
376- Print report
377- </ button >
378- < button
379- type = "button"
380- onClick = { props . onClose }
381- className = "text-xs text-slate-500 hover:text-white print:hidden"
382- >
383- Close
384- </ button >
372+ < div className = "flex items-center gap-2 shrink-0" >
373+ < button
374+ type = "button"
375+ onClick = { ( ) => printClinicalReport ( d ) }
376+ className = "text-xs rounded-md border border-clinical-teal/50 bg-clinical-teal/15 px-3 py-1.5 text-clinical-teal hover:bg-clinical-teal/25"
377+ >
378+ Print report
379+ </ button >
380+ < button
381+ type = "button"
382+ onClick = { props . onClose }
383+ className = "text-xs text-slate-400 hover:text-white px-2"
384+ >
385+ Close
386+ </ button >
387+ </ div >
385388 </ div >
386- < div className = "px-6 py-6 space-y-6 print-sheet print:block " >
389+ < div className = "bg-slate-50 text-slate-900 px-5 py-5 space-y-6 border-t border-slate-200/80 " >
387390 < section >
388- < h4 className = "text-xs font-semibold uppercase tracking-wide text-slate-500 print:text-slate-600" >
389- Clinical synthesis
390- </ h4 >
391- < div className = "mt-2 prose prose-invert max-w-none text-sm leading-relaxed text-slate-200 print:prose-slate print:text-slate-800 whitespace-pre-wrap" >
391+ < h4 className = "text-xs font-semibold uppercase tracking-wide text-slate-600" > Clinical synthesis</ h4 >
392+ < p className = "mt-1 text-xs text-slate-500 leading-snug" >
393+ Text extracted from your file, then summarized by your local LLM (e.g. Ollama). Verify against the
394+ original record before clinical use.
395+ </ p >
396+ < div className = "mt-3 text-sm leading-relaxed text-slate-800 whitespace-pre-wrap" >
392397 { d . summary_text ?? "No summary available." }
393398 </ div >
394399 { d . error_message && (
395- < p className = "mt-3 text-sm text-rose-300 print:text-rose-700" > { d . error_message } </ p >
400+ < p className = "mt-3 text-sm text-rose-700 font-medium bg-rose-50 border border-rose-200 rounded-md px-3 py-2" >
401+ { d . error_message }
402+ </ p >
396403 ) }
397404 </ section >
398405 < section >
399- < h4 className = "text-xs font-semibold uppercase tracking-wide text-slate-500 print:text-slate-600" >
400- Extracted context (preview)
401- </ h4 >
402- < pre className = "mt-2 text-xs bg-slate-950/80 border border-slate-800 rounded-lg p-3 overflow-auto max-h-48 text-slate-400 print:text-slate-700 print:bg-slate-50 print:border-slate-200" >
406+ < h4 className = "text-xs font-semibold uppercase tracking-wide text-slate-600" > Extracted context (preview)</ h4 >
407+ < p className = "mt-1 text-xs text-slate-500" > Raw text or structured fields passed to the model (truncated).</ p >
408+ < pre className = "mt-2 text-xs bg-white border border-slate-200 rounded-lg p-3 overflow-auto max-h-64 text-slate-700 shadow-inner" >
403409 { ( d . raw_preview ?? "" ) . slice ( 0 , 8000 ) }
404410 </ pre >
405411 </ section >
0 commit comments