"use client" import { useState } from "react" import { Button } from "@/components/ui/button" import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card" import { Input } from "@/components/ui/input" import { Label } from "@/components/ui/label" import { RichTextEditor } from "./rich-text-editor" import { Plus, Calendar, Sun, Sunset, Moon, Clock } from "lucide-react" interface ProgressNotesProps { patient: any } export function ProgressNotes({ patient }: ProgressNotesProps) { const [showAddNote, setShowAddNote] = useState(false) const [currentDate, setCurrentDate] = useState(new Date().toISOString().split("T")[0]) const [morningShift, setMorningShift] = useState({ complaints: "", findings: "", vitals: "", events: "", doctor: "", }) const [eveningShift, setEveningShift] = useState({ complaints: "", findings: "", vitals: "", events: "", doctor: "", }) const [nightShift, setNightShift] = useState({ complaints: "", findings: "", vitals: "", events: "", doctor: "", }) const handleShiftChange = (shift: string, field: string, value: string) => { if (shift === "morning") { setMorningShift((prev) => ({ ...prev, [field]: value })) } else if (shift === "evening") { setEveningShift((prev) => ({ ...prev, [field]: value })) } else if (shift === "night") { setNightShift((prev) => ({ ...prev, [field]: value })) } } const ShiftCard = ({ title, icon: Icon, bgColor, shift, shiftData, }: { title: string icon: any bgColor: string shift: string shiftData: any }) => ( {title}
handleShiftChange(shift, "complaints", value)} placeholder="Enter chief complaints for this shift..." rows={2} fieldType="chief-complaints" />
handleShiftChange(shift, "findings", value)} placeholder="Enter examination findings..." rows={3} fieldType="assessment" />
handleShiftChange(shift, "vitals", value)} placeholder="BP: 120/80, Pulse: 72, Temp: 98.6°F, RR: 16" rows={2} fieldType="general" />
handleShiftChange(shift, "events", value)} placeholder="Any specific events or observations..." rows={2} fieldType="general" />
handleShiftChange(shift, "doctor", e.target.value)} placeholder="Enter doctor name" className="bg-white" />
) return (
{/* Header */}

Daily Progress Notes

Three-shift monitoring for {patient.name}

{/* Add New Note Form */} {showAddNote && (
New Daily Progress Note
setCurrentDate(e.target.value)} className="bg-white" />
{/* Patient Info */}
{patient.name} | MRN: {patient.mrn} | {patient.age}Y {patient.gender} | Ward:{" "} {patient.ward} | Bed: {patient.bed}
{/* Three Shifts */}
)} {/* Existing Notes */} Progress Notes History

No Progress Notes

Start documenting daily progress with three-shift monitoring.

) }