Fix: Mapa de camas responsive y mejoras en Historia Clínica
This commit is contained in:
+2
-2
@@ -4,10 +4,10 @@ services:
|
|||||||
app:
|
app:
|
||||||
build: .
|
build: .
|
||||||
ports:
|
ports:
|
||||||
- "80:80"
|
- "8077:80"
|
||||||
- "4000:4000"
|
- "4000:4000"
|
||||||
volumes:
|
volumes:
|
||||||
- hospital-data:/app/data
|
- hospital-data:/app
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
|
|||||||
@@ -154,23 +154,34 @@ export function HistoriaClinica({
|
|||||||
<div className="space-y-6">
|
<div className="space-y-6">
|
||||||
<div className="flex items-center justify-between gap-4">
|
<div className="flex items-center justify-between gap-4">
|
||||||
<div className="flex items-center gap-4">
|
<div className="flex items-center gap-4">
|
||||||
<Button variant="outline" onClick={onVolver}>
|
|
||||||
<ArrowLeft className="h-4 w-4 mr-2" />
|
|
||||||
Volver
|
|
||||||
</Button>
|
|
||||||
<div>
|
<div>
|
||||||
<h1 className="text-2xl font-bold text-gray-900">Historia Clínica</h1>
|
<h1 className="text-2xl font-bold text-gray-900">Historia Clínica</h1>
|
||||||
<p className="text-gray-500">
|
<p className="text-gray-500">
|
||||||
Cama: {cama?.numero || 'N/A'} | {paciente.apellido}, {paciente.nombre} | {paciente.fechaNacimiento ? calcularEdad(paciente.fechaNacimiento) + ' años' : ''} | DNI: {paciente.dni}
|
Cama: {cama?.numero || 'N/A'} | {paciente.apellido}, {paciente.nombre} | {paciente.fechaNacimiento ? calcularEdad(paciente.fechaNacimiento) + ' años' : ''} | DNI: {paciente.dni}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<Button variant="outline" onClick={() => setEditIngresoDialog(true)}>
|
|
||||||
<Pencil className="h-4 w-4 mr-2" />
|
<div className="flex items-center gap-4">
|
||||||
Editar Ingreso
|
<Button variant="outline" onClick={onVolver}>
|
||||||
</Button>
|
<ArrowLeft className="h-4 w-4 mr-2" />
|
||||||
|
Volver
|
||||||
|
</Button>
|
||||||
|
<Button variant="outline" onClick={() => setEditIngresoDialog(true)}>
|
||||||
|
<Pencil className="h-4 w-4 mr-2" />
|
||||||
|
Editar Ingreso
|
||||||
|
</Button>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<Dialog open={editIngresoDialog} onOpenChange={setEditIngresoDialog}>
|
<Dialog open={editIngresoDialog} onOpenChange={setEditIngresoDialog}>
|
||||||
<DialogContent className="sm:max-w-2xl max-h-[90vh] overflow-y-auto">
|
<DialogContent className="sm:max-w-2xl max-h-[90vh] overflow-y-auto">
|
||||||
<DialogHeader>
|
<DialogHeader>
|
||||||
@@ -284,7 +295,7 @@ export function HistoriaClinica({
|
|||||||
try {
|
try {
|
||||||
const formField = form.getTextField(field.name);
|
const formField = form.getTextField(field.name);
|
||||||
if (formField) formField.setText(field.value);
|
if (formField) formField.setText(field.value);
|
||||||
} catch (e) {}
|
} catch (e) { }
|
||||||
}
|
}
|
||||||
const pdfBytes = await pdfDoc.save();
|
const pdfBytes = await pdfDoc.save();
|
||||||
const blob = new Blob([new Uint8Array(pdfBytes)], { type: 'application/pdf' });
|
const blob = new Blob([new Uint8Array(pdfBytes)], { type: 'application/pdf' });
|
||||||
@@ -956,7 +967,7 @@ function SeccionCultivos({ cults, patient, add, update, del }: {
|
|||||||
|
|
||||||
const cs = cults.filter(c => c.pacienteId === patient.id).sort((a, b) => new Date(b.fechaToma).getTime() - new Date(a.fechaToma).getTime());
|
const cs = cults.filter(c => c.pacienteId === patient.id).sort((a, b) => new Date(b.fechaToma).getTime() - new Date(a.fechaToma).getTime());
|
||||||
|
|
||||||
const getEstadoColor = (estado:Cultivo['estado']) => {
|
const getEstadoColor = (estado: Cultivo['estado']) => {
|
||||||
switch (estado) {
|
switch (estado) {
|
||||||
case 'NAF/Pendiente': return 'bg-amber-100 text-amber-800';
|
case 'NAF/Pendiente': return 'bg-amber-100 text-amber-800';
|
||||||
case 'Parcial': return 'bg-orange-100 text-orange-800';
|
case 'Parcial': return 'bg-orange-100 text-orange-800';
|
||||||
@@ -1005,7 +1016,7 @@ function SeccionCultivos({ cults, patient, add, update, del }: {
|
|||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<Label>Tipo de Muestra *</Label>
|
<Label>Tipo de Muestra *</Label>
|
||||||
<Select value={tipoMuestra} onValueChange={(v:Cultivo['tipoMuestra']) => setTipoMuestra(v)}>
|
<Select value={tipoMuestra} onValueChange={(v: Cultivo['tipoMuestra']) => setTipoMuestra(v)}>
|
||||||
<SelectTrigger><SelectValue /></SelectTrigger>
|
<SelectTrigger><SelectValue /></SelectTrigger>
|
||||||
<SelectContent>
|
<SelectContent>
|
||||||
<SelectItem value="HMCx2">HMCx2</SelectItem>
|
<SelectItem value="HMCx2">HMCx2</SelectItem>
|
||||||
@@ -1049,7 +1060,7 @@ function SeccionCultivos({ cults, patient, add, update, del }: {
|
|||||||
<div className="grid grid-cols-2 gap-4">
|
<div className="grid grid-cols-2 gap-4">
|
||||||
<div><Label>Fecha de Resultado *</Label><Input type="date" value={fechaResultado} onChange={e => setFechaResultado(e.target.value)} /></div>
|
<div><Label>Fecha de Resultado *</Label><Input type="date" value={fechaResultado} onChange={e => setFechaResultado(e.target.value)} /></div>
|
||||||
<div><Label>Resultado *</Label>
|
<div><Label>Resultado *</Label>
|
||||||
<Select value={estadoResultado} onValueChange={(v:Cultivo['estado']) => setEstadoResultado(v)}>
|
<Select value={estadoResultado} onValueChange={(v: Cultivo['estado']) => setEstadoResultado(v)}>
|
||||||
<SelectTrigger><SelectValue /></SelectTrigger>
|
<SelectTrigger><SelectValue /></SelectTrigger>
|
||||||
<SelectContent>
|
<SelectContent>
|
||||||
<SelectItem value="Positivo">Positivo</SelectItem>
|
<SelectItem value="Positivo">Positivo</SelectItem>
|
||||||
|
|||||||
@@ -277,7 +277,7 @@ export function MapaCamas({
|
|||||||
</Card>
|
</Card>
|
||||||
|
|
||||||
{/* Mapa de Camas */}
|
{/* Mapa de Camas */}
|
||||||
<div className="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 gap-4">
|
<div className="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 gap-2 sm:gap-4">
|
||||||
{sortedCamas.map((cama) => {
|
{sortedCamas.map((cama) => {
|
||||||
const paciente = cama.pacienteId ? getPacienteById(cama.pacienteId) : null;
|
const paciente = cama.pacienteId ? getPacienteById(cama.pacienteId) : null;
|
||||||
const internacion = cama.internacionId ? getInternacionById(cama.internacionId) : null;
|
const internacion = cama.internacionId ? getInternacionById(cama.internacionId) : null;
|
||||||
|
|||||||
Reference in New Issue
Block a user