codigo0/dist/assets/IntoxicacionesChecklist-mYkQyLGE.js

2 lines
4.2 KiB
JavaScript
Raw Normal View History

import{r as c,j as e}from"./0-vendor-react-DWOJpYrt.js";import{u as S,L as C}from"./page-herramientas-DcKR8MlC.js";import{B as g}from"./page-ajustes-DgawOEJM.js";import{C as m,c as x,d as u,e as p,I as k}from"./page-comunicacion-DmHQUHoW.js";import{g as E,f as I,C as A}from"./timers-DtW-cs9v.js";import"./1-vendor-utils-Delnuc0l.js";import"./2-vendor-markdown-BQlHAcA7.js";const D=[{id:"intox-abcde",title:"ABCDE inmediato",description:"Asegurar via aerea, ventilacion y perfusion. Glucemia si alteracion mental."},{id:"intox-seguridad",title:"Seguridad de escena",description:"Ventilar, usar EPI y evitar exposicion a toxicos."},{id:"intox-pistas",title:"Buscar pistas",description:"Envases, olores, pupilas, signos de inyeccion, notas. Identificar toxidrome probable."},{id:"intox-no-vomito",title:"No inducir vomito",description:"Especialmente en causticos o hidrocarburos."},{id:"intox-antidotos",title:"Antidotos si aplica",description:"Naloxona en sospecha de opioides. Flumazenilo solo segun protocolo y riesgo."},{id:"intox-descontaminacion",title:"Descontaminacion",description:"Retirar ropa contaminada, ventilar escena. No inducir vomito en causticos."},{id:"intox-traslado",title:"Traslado urgente",description:"Monitorizacion continua y comunicacion de toxico sospechado."}],f="checklist_intoxicaciones_v1",o={startedAt:null,completed:{},manualWeightKg:void 0},P=()=>{if(typeof window>"u")return o;try{const s=window.localStorage.getItem(f);if(!s)return o;const d=JSON.parse(s);return{...o,...d}}catch{return o}},T=s=>{if(!(typeof window>"u"))try{window.localStorage.setItem(f,JSON.stringify(s))}catch{}},_=()=>{const{patient:s,hasPatientProperty:d}=S(),[i,n]=c.useState(o),[B,j]=c.useState(Date.now());c.useEffect(()=>{n(P())},[]),c.useEffect(()=>{T(i)},[i]),c.useEffect(()=>{const t=window.setInterval(()=>j(Date.now()),1e3);return()=>window.clearInterval(t)},[]);const w=E(i.startedAt),l=d("weight")&&s.weight?s.weight:i.manualWeightKg,h=l?Math.min(.1*l,2):null,N=(t,a)=>{n(r=>({...r,completed:{...r.completed,[t]:a}}))},v=()=>{i.startedAt||n(t=>({...t,startedAt:Date.now()}))},y=()=>{n(o)},b=t=>{const a=Number(t);n(r=>({...r,manualWeightKg:Number.isFinite(a)?a:void 0}))};return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("header",{className:"space-y-2",children:[e.jsx("h1",{className:"text-xl font-semibold text-foreground",children:"Checklist Intoxicaciones"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Enfoque ABCDE con antidotos y descontaminacion."})]}),e.jsxs(m,{children:[e.jsxs(x,{className:"flex flex-row items-center justify-between space-y-0",children:[e.jsx(u,{className:"text-base",children:"Temporizador"}),e.jsx("div",{className:"text-sm text-muted-foreground",children:i.startedAt?`Tiempo: ${I(w)}`:"Sin iniciar"})]}),e.jsxs(p,{className:"flex flex-col gap-3 md:flex-row md:items-center md:justify-between",children:[e.jsx("div",{className:"text-sm text-muted-foreground",children:"Inicia el temporizador al primer contacto."}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(g,{onClick:v,disabled:!!i.startedAt,children:"Iniciar"}),e.jsx(g,{variant:"outline",onClick:y,children:"Reiniciar"})]})]})]}),e.jsxs(m,{children:[e.jsx(x,{children:e.jsx(u,{className:"text-base",children:"Naloxona (orientativo)"})}),e.jsx(p,{className:"space-y-3",children:e.jsxs("div",{className:"rounded-md border border-border/60 bg-muted/30 p-3 space-y-2",children:[e.jsx(C,{children:"Peso (kg)"}),e.jsx(k,{type:"number",inputMode:"numeric",value:l??"",onChange:t=>b(t.target.value),placeholder:"Ej: 15"}),e.jsxs("div",{className:"text-sm text-muted-foreground space-y-1",children:[e.jsx("p",{children:"Adulto: dosis inicial 0.4 mg IV/IM/IN, titular según respuesta."}),h?e.jsxs("p",{children:["Pediatría: ",h.toFixed(2)," mg (0.1 mg/kg, máx 2 mg)."]}):e.jsx("p",{children:"Pediatría: introduce peso para calcular 0.1 mg/kg (máx 2 mg)."})]})]})})]}),D.map(t=>e.jsxs(m,{children:[e.jsx(x,{className:"flex flex-row items-center justify-between space-y-0",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(A,{checked