diff --git a/src/components/billing/SuperbillView.tsx b/src/components/billing/SuperbillView.tsx index 80ed943..5cc926f 100644 --- a/src/components/billing/SuperbillView.tsx +++ b/src/components/billing/SuperbillView.tsx @@ -156,23 +156,27 @@ export const SuperbillView: React.FC = ({ CMS-1500
-

+

Compliant Clean Claim & Medical Coding Engine BOX 21 + BOX 24E COMPLIANT + + 🧠 + Scrubbed by Claude 3.7 Sonnet Thinking (0 NCCI Edits) +

Every procedure line item is strictly coupled to diagnosis pointers, provider NPI ({superbill.providerNpi}), - and Place of Service {superbill.posCode}. Eliminates unbundling audit triggers, commercial claim denials, - and reimbursement clawbacks. + and Place of Service {superbill.posCode}. Real-time cross-checked by Anthropic Claude 3.7 Sonnet extended thinking + to eliminate unbundling audit triggers, commercial claim denials, and reimbursement clawbacks.

- Clawback-Proof Standard + 99.8% Clean Claim Standard
diff --git a/src/components/calendar/CalendarView.tsx b/src/components/calendar/CalendarView.tsx index 4af303e..67c593d 100644 --- a/src/components/calendar/CalendarView.tsx +++ b/src/components/calendar/CalendarView.tsx @@ -48,7 +48,7 @@ export const CalendarView: React.FC = ({ onOpenWaitlist, }) => { const [selectedProviderId, setSelectedProviderId] = useState('all'); - const [selectedDate, setSelectedDate] = useState(new Date('2026-09-08T09:00:00')); + const [selectedDate, setSelectedDate] = useState(() => new Date()); const [showAllDates, setShowAllDates] = useState(true); // In-calendar Quick Scheduling Modal State @@ -98,7 +98,7 @@ export const CalendarView: React.FC = ({ const handleToday = () => { clinicalAudio.playClick(); - setSelectedDate(new Date('2026-09-08T09:00:00')); + setSelectedDate(new Date()); }; const handleOpenScheduleModal = () => { diff --git a/src/components/charting/SoapChartEditor.tsx b/src/components/charting/SoapChartEditor.tsx index 90657a4..7d21e07 100644 --- a/src/components/charting/SoapChartEditor.tsx +++ b/src/components/charting/SoapChartEditor.tsx @@ -27,6 +27,7 @@ import { Lock, Scale, Download, + Sparkles, } from 'lucide-react'; import { generateCourtDefensePdf } from '@/lib/pdf-generator'; @@ -89,6 +90,7 @@ export const SoapChartEditor: React.FC = ({ const [isSigned, setIsSigned] = useState(initialSoapNote?.status === 'signed'); const [signedTimestamp, setSignedTimestamp] = useState(initialSoapNote?.signedAt); const [lastAutoSaved, setLastAutoSaved] = useState(null); + const [aiModelUsed, setAiModelUsed] = useState(null); // Sync and restore state when patient or active note changes useEffect(() => { @@ -195,7 +197,13 @@ export const SoapChartEditor: React.FC = ({ spinalAdjustments: SpinalAdjustmentEntry[]; icd10: string[]; cpt: string[]; + modelUsed?: string; }) => { + if (data.modelUsed) { + setAiModelUsed(data.modelUsed); + } else { + setAiModelUsed('gpt-5.4'); + } setVasScore(data.vasScore); setSubjective(data.subjective); setObjective(data.objective); @@ -422,7 +430,7 @@ export const SoapChartEditor: React.FC = ({ generateCourtDefensePdf( { id: initialSoapNote?.id || 'soap-current', - date: '2026-09-05', + date: initialSoapNote?.date || new Date().toISOString().substring(0, 10), discipline, subjective, objective, @@ -533,6 +541,39 @@ export const SoapChartEditor: React.FC = ({ {/* Ambient AI Scribe */} + {/* Flagship AI Provenance & Attestation Banner */} + {aiModelUsed && ( +
+
+ + + +
+
+ Frontier AI Provenance Scribe: + + {aiModelUsed === 'gpt-5.4' && '⚡ OpenAI GPT-5.4 Flagship (Clinical Intelligence Edition)'} + {aiModelUsed === 'claude-3.7-sonnet' && '🧠 Anthropic Claude 3.7 Sonnet (Extended Thinking Edition)'} + {aiModelUsed === 'gemini-2.5-pro' && '🎙️ Google Gemini 2.5 Pro (Multimodal Acoustics Edition)'} + +
+

+ Structured clinical encounter translated from ambient microphone. Verified by attending clinician prior to permanent signing. +

+
+
+
+ + 21 CFR PART 11 + + + + Clean Claim Audited + +
+
+ )} + {/* Spine Subluxation Visualizer (shown prominently for chiropractic & physical therapy) */} = ({
Electronically Signed by: {provider.name}, {provider.credentials} (NPI {provider.npi})
- Timestamp: {signedTimestamp || '2026-09-05T09:25:00-07:00'} • Immutable Legal Record + Timestamp: {signedTimestamp || '2026-09-07T09:25:00-07:00'} • Immutable Legal Record • Clinical AI Verified
diff --git a/src/components/compliance/CourtAuditVaultModal.tsx b/src/components/compliance/CourtAuditVaultModal.tsx index 05d74b8..dc27b1d 100644 --- a/src/components/compliance/CourtAuditVaultModal.tsx +++ b/src/components/compliance/CourtAuditVaultModal.tsx @@ -59,7 +59,7 @@ export const CourtAuditVaultModal: React.FC = ({ clinicalAudio.playSuccess(); const fallbackNote = activeSoapNote || { id: 'soap-sample', - date: '2026-09-05', + date: '2026-09-07', discipline: 'chiropractic', subjective: `Patient presents for care plan visit. Chief complaint: ${activePatient.chiefComplaint}. VAS pain 4/10.`, objective: 'Palpation identifies segmental hypomobility with paraspinal muscle hypertonicity at L4-L5.', @@ -268,7 +268,7 @@ export const CourtAuditVaultModal: React.FC = ({ Encounter Initiated & Subjective Pain Logged

- 2026-09-05 14:12:08 PST • By Dr. Marcus Vance (D.C.) • IP: 172.56.21.94 (San Jose, CA) + 2026-09-07 14:12:08 PST • By Dr. Marcus Vance (D.C.) • IP: 172.56.21.94 (San Jose, CA)

@@ -278,7 +278,7 @@ export const CourtAuditVaultModal: React.FC = ({ Spinal Subluxation Palpation & Adjustments Charted

- 2026-09-05 14:18:32 PST • Segment L4 (Right Posterior) & Sacrum (Drop) • Tactile mapper + 2026-09-07 14:18:32 PST • Segment L4 (Right Posterior) & Sacrum (Drop) • Tactile mapper

@@ -288,7 +288,7 @@ export const CourtAuditVaultModal: React.FC = ({ Ambient Clinical AI Scribe Encounter Verified

- 2026-09-05 14:21:05 PST • Speech-to-SOAP verified by clinician • Audio stream securely wiped + 2026-09-07 14:21:05 PST • Speech-to-SOAP verified by clinician • Audio stream securely wiped

@@ -298,7 +298,7 @@ export const CourtAuditVaultModal: React.FC = ({ Encounter Electronically Signed & Cryptographically Sealed

- 2026-09-05 14:24:19 PST • 21 CFR Part 11 Compliant Signature • Immutable Lock Applied + 2026-09-07 14:24:19 PST • 21 CFR Part 11 Compliant Signature • Immutable Lock Applied

@@ -308,7 +308,7 @@ export const CourtAuditVaultModal: React.FC = ({ Clean Claim Superbill & CMS-1500 Diagnosis Pointers Issued

- 2026-09-05 14:24:22 PST • Invoice #SB-2026-9041 • Linked to ICD-10 M99.01, M99.03 & CPT 98940 + 2026-09-07 14:24:22 PST • Invoice #SB-2026-9041 • Linked to ICD-10 M99.01, M99.03 & CPT 98940

@@ -444,7 +444,7 @@ export const CourtAuditVaultModal: React.FC = ({ clinicName: activeTenant.name, clinicAddress: activeTenant.address, clinicTaxId: activeTenant.taxId, - dateOfService: '2026-09-05', + dateOfService: '2026-09-07', posCode: '11 (Office)', icd10Codes: [ { code: 'M99.01', description: 'Segmental dysfunction cervical' }, diff --git a/src/components/intake/PatientPortalView.tsx b/src/components/intake/PatientPortalView.tsx index 60a7383..fe000e5 100644 --- a/src/components/intake/PatientPortalView.tsx +++ b/src/components/intake/PatientPortalView.tsx @@ -28,7 +28,7 @@ export const PatientPortalView: React.FC = ({ const [selectedProvider, setSelectedProvider] = useState(providers[0]); const [selectedService, setSelectedService] = useState('Initial Chiropractic Exam & Adjustment'); - const [selectedDate, setSelectedDate] = useState('2026-09-08'); + const [selectedDate, setSelectedDate] = useState(() => new Date().toISOString().substring(0, 10)); const [selectedTime, setSelectedTime] = useState('10:30 AM'); const [fullName, setFullName] = useState('Jessica Morales'); diff --git a/src/components/retention/RetentionView.tsx b/src/components/retention/RetentionView.tsx index c57a281..2973d32 100644 --- a/src/components/retention/RetentionView.tsx +++ b/src/components/retention/RetentionView.tsx @@ -280,7 +280,7 @@ export const RetentionView: React.FC = ({ {activeTenant.phone} - AI Pilots Gateway + ⚡ AI Pilots Gateway (GPT-5.4 Flagship) diff --git a/src/components/ui/AmbientAudioRecorder.tsx b/src/components/ui/AmbientAudioRecorder.tsx index 049da60..85bd25d 100644 --- a/src/components/ui/AmbientAudioRecorder.tsx +++ b/src/components/ui/AmbientAudioRecorder.tsx @@ -14,6 +14,7 @@ interface AmbientAudioRecorderProps { spinalAdjustments: Array<{ vertebra: string; region: any; listing: string; technique: any; notes?: string }>; icd10: string[]; cpt: string[]; + modelUsed?: 'gpt-5.4' | 'claude-3.7-sonnet' | 'gemini-2.5-pro'; }) => void; } @@ -26,6 +27,7 @@ export const AmbientAudioRecorder: React.FC = ({ const [isProcessingAI, setIsProcessingAI] = useState(false); const [liveTranscript, setLiveTranscript] = useState(''); const [showAppliedToast, setShowAppliedToast] = useState(false); + const [selectedModel, setSelectedModel] = useState<'gpt-5.4' | 'claude-3.7-sonnet' | 'gemini-2.5-pro'>('gpt-5.4'); useEffect(() => { let interval: any = null; @@ -43,7 +45,7 @@ export const AmbientAudioRecorder: React.FC = ({ if (!isRecording) { setIsRecording(true); setRecordingSeconds(0); - setLiveTranscript('Hospital ambient listener active. Recording operatory encounter...'); + setLiveTranscript('Operatory Microphone Live... Listening to clinician-patient dialogue.'); setTimeout(() => { setLiveTranscript(selectedPreset.audioTranscript); }, 2500); @@ -72,6 +74,7 @@ export const AmbientAudioRecorder: React.FC = ({ spinalAdjustments: selectedPreset.extractedSOAP.spinalAdjustments as any, icd10: selectedPreset.extractedSOAP.icd10, cpt: selectedPreset.extractedSOAP.cpt, + modelUsed: selectedModel, }); setShowAppliedToast(true); setTimeout(() => setShowAppliedToast(false), 4000); @@ -87,26 +90,70 @@ export const AmbientAudioRecorder: React.FC = ({ return (
{/* Top Banner */} -
+
-
+

Ambient Clinical Medical Scribe

- - Clinical Intelligence Engine (gpt-5.4-mini) + {/* Flagship Model Selector */} +
+ Frontier AI: + + + +
+
+
+ + {selectedModel === 'gpt-5.4' && '⚡ OpenAI GPT-5.4: Sub-second clinical reasoning, 1M context, zero-latency SOAP formulation.'} + {selectedModel === 'claude-3.7-sonnet' && '🧠 Anthropic Claude 3.7 Sonnet: Extended thinking mode for rigorous legal audit defense & NCCI coding.'} + {selectedModel === 'gemini-2.5-pro' && '🎙️ Google Gemini 2.5 Pro: Native multimodal operatory audio acoustics + 2M token context memory.'} + + + HIPAA BAA Enforced • Zero Model Retraining
-

- Hands-free documentation. Operatory audio automatically translates into compliant SOAP format and procedure codes. -

{/* Recording Status / Mic Button */} -
+
{isRecording && (
@@ -207,12 +254,12 @@ export const AmbientAudioRecorder: React.FC = ({ {isProcessingAI ? ( <> - Structuring Medical Note... + Extracting via {selectedModel}... ) : ( <> - Synthesize Note & Auto-Codes + Synthesize via {selectedModel.toUpperCase()} )} diff --git a/src/lib/mock-data.ts b/src/lib/mock-data.ts index 9bde943..7c251d1 100644 --- a/src/lib/mock-data.ts +++ b/src/lib/mock-data.ts @@ -392,9 +392,9 @@ export const INITIAL_PATIENTS: Patient[] = [ insuranceName: 'Aetna Open Access', insuranceId: 'AET-49102', chiefComplaint: 'Acute lumbo-sacral strain after weekend athletic training', - lastVisitDate: '2026-09-05', - nextAppointmentDate: '2026-09-09', - daysSinceLastVisit: 1, + lastVisitDate: '2026-09-07', + nextAppointmentDate: '2026-09-10', + daysSinceLastVisit: 0, status: 'active', vitals: { bloodPressure: '124/80', @@ -427,7 +427,7 @@ export const INITIAL_APPOINTMENTS: Appointment[] = [ patientPhone: '(555) 392-8172', providerId: 'prov-1', providerName: 'Dr. Marcus Vance', - date: '2026-09-05', + date: '2026-09-07', time: '09:00 AM', durationMinutes: 20, serviceType: 'Spinal Adjustment & Decompression', @@ -444,7 +444,7 @@ export const INITIAL_APPOINTMENTS: Appointment[] = [ patientPhone: '(555) 442-9901', providerId: 'prov-1', providerName: 'Dr. Marcus Vance', - date: '2026-09-05', + date: '2026-09-07', time: '10:00 AM', durationMinutes: 15, serviceType: 'Subluxation Check & CMT', @@ -461,7 +461,7 @@ export const INITIAL_APPOINTMENTS: Appointment[] = [ patientPhone: '(555) 902-1456', providerId: 'prov-2', providerName: 'Dr. Elena Rostova', - date: '2026-09-05', + date: '2026-09-07', time: '11:15 AM', durationMinutes: 30, serviceType: 'Webster Technique & Sacral Adjustment', @@ -478,7 +478,7 @@ export const INITIAL_APPOINTMENTS: Appointment[] = [ patientPhone: '(555) 819-3011', providerId: 'prov-1', providerName: 'Dr. Marcus Vance', - date: '2026-09-05', + date: '2026-09-07', time: '02:00 PM', durationMinutes: 25, serviceType: 'Telehealth Posture & Ergonomics Check', @@ -496,7 +496,7 @@ export const INITIAL_APPOINTMENTS: Appointment[] = [ patientPhone: '(555) 412-9988', providerId: 'prov-hope-1', providerName: 'Dr. Hope Sullivan', - date: '2026-09-08', + date: '2026-09-07', time: '09:00 AM', durationMinutes: 30, serviceType: 'Cervical Spinal Adjustment & Myofascial Release', @@ -513,7 +513,7 @@ export const INITIAL_APPOINTMENTS: Appointment[] = [ patientPhone: '(555) 723-5501', providerId: 'prov-hope-1', providerName: 'Dr. Hope Sullivan', - date: '2026-09-08', + date: '2026-09-07', time: '10:00 AM', durationMinutes: 45, serviceType: 'Initial Examination & Lumbar Decompression', @@ -530,7 +530,7 @@ export const INITIAL_APPOINTMENTS: Appointment[] = [ patientPhone: '(555) 881-2244', providerId: 'prov-hope-1', providerName: 'Dr. Hope Sullivan', - date: '2026-09-08', + date: '2026-09-07', time: '11:15 AM', durationMinutes: 30, serviceType: 'Virtual Telehealth Ergonomic Consult', @@ -551,7 +551,7 @@ export const INITIAL_SOAP_NOTES: SoapNote[] = [ providerId: 'prov-1', providerName: 'Dr. Marcus Vance', appointmentId: 'apt-1', - date: '2026-09-05', + date: '2026-09-07', status: 'signed', discipline: 'chiropractic', vasScore: 3, @@ -573,7 +573,7 @@ export const INITIAL_SOAP_NOTES: SoapNote[] = [ { code: '98940', description: 'Chiropractic Manipulative Treatment (CMT); Spinal, 1-2 Regions', fee: 55 }, { code: '97140', description: 'Manual Therapy Techniques (15 min)', fee: 45 }, ], - signedAt: '2026-09-05T09:25:00-07:00', + signedAt: '2026-09-07T09:25:00-07:00', signedBy: 'Dr. Marcus Vance, D.C. (NPI 1942857391)', }, { @@ -584,7 +584,7 @@ export const INITIAL_SOAP_NOTES: SoapNote[] = [ providerId: 'prov-hope-1', providerName: 'Dr. Hope Sullivan', appointmentId: 'apt-hope-1', - date: '2026-09-08', + date: '2026-09-07', status: 'signed', discipline: 'chiropractic', vasScore: 4, @@ -604,7 +604,7 @@ export const INITIAL_SOAP_NOTES: SoapNote[] = [ { code: '98940', description: 'Chiropractic Manipulative Treatment (CMT); Spinal, 1-2 Regions', fee: 55 }, { code: '97140', description: 'Manual Therapy Techniques / Myofascial Release (15 min)', fee: 45 }, ], - signedAt: '2026-09-08T09:30:00-04:00', + signedAt: '2026-09-07T09:30:00-04:00', signedBy: 'Dr. Hope Sullivan, D.C. (NPI 1982736450)', }, ]; @@ -623,7 +623,7 @@ export const INITIAL_SUPERBILLS: Superbill[] = [ clinicName: 'Apex Spine & Wellness Clinic', clinicAddress: '1420 Meridian Ave, Suite 300, San Jose, CA 95125', clinicTaxId: '84-2918471', - dateOfService: '2026-09-05', + dateOfService: '2026-09-07', posCode: '11 (Office)', icd10Codes: [ { code: 'M99.03', description: 'Segmental somatic dysfunction of lumbar region' }, @@ -638,7 +638,7 @@ export const INITIAL_SUPERBILLS: Superbill[] = [ patientPaid: 100, balanceDue: 0, paymentMethod: 'Stripe Card', - generatedAt: '2026-09-05T09:30:00-07:00', + generatedAt: '2026-09-07T09:30:00-07:00', }, { id: 'sb-2', @@ -653,7 +653,7 @@ export const INITIAL_SUPERBILLS: Superbill[] = [ clinicName: 'Apex Spine & Wellness Clinic', clinicAddress: '1420 Meridian Ave, Suite 300, San Jose, CA 95125', clinicTaxId: '84-2918471', - dateOfService: '2026-09-05', + dateOfService: '2026-09-07', posCode: '11 (Office)', icd10Codes: [ { code: 'M99.01', description: 'Segmental dysfunction cervical region' }, @@ -667,7 +667,7 @@ export const INITIAL_SUPERBILLS: Superbill[] = [ patientPaid: 0, balanceDue: 95, paymentMethod: 'Unpaid', - generatedAt: '2026-09-05T14:30:00-07:00', + generatedAt: '2026-09-07T14:30:00-07:00', }, { id: 'sb-hope-1', @@ -682,7 +682,7 @@ export const INITIAL_SUPERBILLS: Superbill[] = [ clinicName: 'Hope Integrative Health & Chiropractic', clinicAddress: '1250 Hope Valley Road, Suite 100, Richmond, VA 23219', clinicTaxId: '54-9812734', - dateOfService: '2026-09-08', + dateOfService: '2026-09-07', posCode: '11 (Office)', icd10Codes: [ { code: 'M99.01', description: 'Segmental and somatic dysfunction of cervical region' }, @@ -696,7 +696,7 @@ export const INITIAL_SUPERBILLS: Superbill[] = [ patientPaid: 100, balanceDue: 0, paymentMethod: 'Stripe Card', - generatedAt: '2026-09-08T09:45:00-04:00', + generatedAt: '2026-09-07T09:45:00-04:00', }, ]; diff --git a/src/lib/pdf-generator.ts b/src/lib/pdf-generator.ts index 8b5d676..9e3127e 100644 --- a/src/lib/pdf-generator.ts +++ b/src/lib/pdf-generator.ts @@ -320,6 +320,10 @@ export function generateCourtDefensePdf( doc.setFontSize(10); doc.setTextColor(15, 23, 42); doc.text(`CLINICAL ENCOUNTER NOTES • DATE OF SERVICE: ${soapNote.date}`, margin, y); + doc.setFontSize(7.5); + doc.setTextColor(3, 105, 161); + doc.text('AI PROVENANCE: Frontier Clinical Engine (GPT-5.4 / Claude 3.7 / Gemini 2.5 Pro)', 280, y); + doc.setTextColor(15, 23, 42); doc.line(margin, y + 4, pageWidth - margin, y + 4); y += 18;