PageSourceSearch

https://ems-app-beta.boyletb8.workers.dev/assets/StrokeTool-BOqEG6iZ.js

js ems-app-beta.boyletb8.workers.dev collected 2026-10-03 05:51:06 UTC 5,769 bytes, 2 lines download raw bytes

1import{j as e}from"./markdown-BRYhFWnL.js";import{au as I,av as O,aw as S,p as R,ax as f,ay as k,az as N,aA as P,aB as E,aC as L,aD as M,aE as A,aF as F,q as D,aG as _,H as Y,I as U,d as $,aH as q,f as G}from"./index-CDeLxwOE.js";import{r as i}from"./react-ChdzvwWi.js";import{a as K,R as x,S as C}from"./common-Cr1Vf92D.js";import{ScoreItems as y}from"./ScoreTools-B9Lqdyau.js";import{R as V}from"./rotate-ccw-C6JsW_Y0.js";import"./neon-B5RpTIjE.js";function B(t){const o=n=>String(n).padStart(2,"0");return`${t.getFullYear()}-${o(t.getMonth()+1)}-${o(t.getDate())}T${o(t.getHours())}:${o(t.getMinutes())}`}function W({value:t,onChange:o,yes:n="Yes",no:m="No"}){return e.jsx("div",{className:"grid grid-cols-2 gap-2",children:[!1,!0].map(s=>e.jsx("button",{type:"button","aria-pressed":t===s,onClick:()=>o(s),className:G("h-11 rounded-lg border text-sm font-semibold",t===s?s?"border-red-500 bg-red-50 text-red-800 dark:bg-red-500/15 dark:text-red-200":"border-emerald-500 bg-emerald-50 text-emerald-800 dark:bg-emerald-500/15 dark:text-emerald-200":"border-stone-200 dark:border-stone-700"),children:s?n:m},String(s)))})}function J(){const[t,o]=i.useState(""),[n,m]=i.useState(()=>new Date);i.useEffect(()=>{const b=setInterval(()=>m(new Date),3e4);return()=>clearInterval(b)},[]);const s=t?new Date(t):null,l=s&&!Number.isNaN(s.getTime())?_(s,n):null,u=s&&s.getTime()>n.getTime(),p=l?Math.floor(l.elapsedMinutes/60):0,h=l?Math.round(l.elapsedMinutes%60):0;return e.jsxs(C,{title:"Last known well",action:e.jsx(D,{size:"sm",variant:"outline",icon:e.jsx(q,{className:"size-4"}),onClick:()=>o(B(new Date)),children:"Now"}),children:[e.jsx(Y,{label:"Date and time the patient was last at baseline",children:e.jsx(U,{type:"datetime-local",value:t,max:B(n),onChange:b=>o(b.target.value),className:"h-12"})}),u&&e.jsx("p",{className:"mt-2 text-sm text-amber-700 dark:text-amber-300",children:"Last known well cannot be in the future."}),l&&!u&&e.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-2",children:[e.jsxs("span",{className:"text-2xl font-semibold tabular-nums",children:[p," h ",h," min"]}),e.jsx($,{tone:l.withinThrombolyticWindow?"success":"neutral",children:l.withinThrombolyticWindow?"Within 4.5 h":"Beyond 4.5 h"}),e.jsx($,{tone:l.withinThrombectomyWindow?"brand":"neutral",children:l.withinThrombectomyWindow?"Within 24 h":"Beyond 24 h"})]}),e.jsx("p",{className:"mt-2 text-xs text-stone-500",children:"Treatment windows are determined by the receiving stroke team. Follow your regional destination plan."})]})}function ne(){const[t,o]=i.useState("befast"),[n,m]=i.useState({}),[s,l]=i.useState({}),[u,p]=i.useState({}),[h,b]=i.useState("right"),[g,j]=i.useState({}),[v,T]=i.useState({}),z=()=>{m({}),l({}),p({}),j({}),T({})},r=I(L,u),c=I(A(h),g),d=O(v),H=S.filter(a=>v[a.id]!==void 0).length;return e.jsxs(K,{id:"stroke",actions:e.jsx(D,{variant:"ghost",size:"sm",icon:e.jsx(V,{className:"size-4"}),onClick:z,children:"Reset all"}),children:[e.jsx(J,{}),e.jsx("div",{className:"scrollbar-none overflow-x-auto",children:e.jsx(R,{value:t,onChange:o,options:[{value:"befast",label:"BE-FAST"},{value:"cincinnati",label:"Cincinnati"},{value:"lams",label:"LAMS"},{value:"race",label:"RACE"},{value:"nihss",label:"NIHSS"}]})}),t==="befast"&&e.jsxs(e.Fragment,{children:[Object.keys(n).length>0&&e.jsx(x,{label:"BE-FAST screen",value:f(n)?"Positive":Object.keys(n).length===k.length?"Negative":"In progress",severity:f(n)?"critical":Object.keys(n).length===k.length?"normal":void 0,detail:f(n)?"Check glucose, establish last known well, and perform an LVO scale.":void 0}),k.map(a=>e.jsxs(C,{title:`${a.letter} — ${a.label}`,children:[e.jsx("p",{className:"-mt-2 mb-2 text-sm text-stone-600 dar
1k:text-stone-300",children:a.prompt}),e.jsx(W,{value:n[a.id],onChange:w=>m({...n,[a.id]:w})})]},a.id))]}),t==="cincinnati"&&e.jsxs(e.Fragment,{children:[Object.keys(s).length>0&&e.jsx(x,{label:"Cincinnati Prehospital Stroke Scale",value:`${N(s).abnormal} abnormal`,severity:N(s).positive?"critical":"normal",detail:N(s).detail}),P.map(a=>e.jsxs(C,{title:a.label,children:[e.jsxs("div",{className:"-mt-2 mb-2 grid gap-1 text-sm text-stone-600 dark:text-stone-300",children:[e.jsxs("span",{children:["Normal: ",a.normal]}),e.jsxs("span",{children:["Abnormal: ",a.abnormal]})]}),e.jsx(W,{value:s[a.id],onChange:w=>l({...s,[a.id]:w}),yes:"Abnormal",no:"Normal"})]},a.id))]}),t==="lams"&&e.jsxs(e.Fragment,{children:[e.jsx(x,{label:"Los Angeles Motor Scale",value:r.complete?r.total:"—",unit:r.complete?"/ 5":"incomplete",severity:r.complete?E(r.total).severity:void 0,interpretation:r.complete?E(r.total).label:void 0}),e.jsx(y,{items:L,answers:u,onChange:p})]}),t==="race"&&e.jsxs(e.Fragment,{children:[e.jsx(R,{value:h,onChange:a=>{b(a),j({...g,cortical:void 0})},options:[{value:"right",label:"Right-sided weakness"},{value:"left",label:"Left-sided weakness"}]}),e.jsx(x,{label:"RACE scale",value:c.complete?c.total:"—",unit:c.complete?"/ 9":"incomplete",severity:c.complete?M(c.total).severity:void 0,interpretation:c.complete?M(c.total).label:void 0}),e.jsx(y,{items:A(h),answers:g,onChange:j})]}),t==="nihss"&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"sticky top-14 z-20 -mx-1 bg-stone-50/95 px-1 py-2 backdrop-blur dark:bg-ink-950/95",children:e.jsx(x,{label:`NIH Stroke Scale — ${H}/${S.length} items`,value:d.total,unit:"/ 42",severity:d.complete?F(d.total).severity:void 0,interpretation:d.complete?F(d.total).label:"Complete all items for a final score",detail:d.untestable.length>0?`Untestable items (scored 0): ${d.untestable.join(", ")}`:void 0})}),e.jsx(y,{items:S,answers:v,onChange:T,untestableLabel:"UN — amputation, joint fusion, or intubated"})]})]})}export{ne as default};
2//# sourceMappingURL=StrokeTool-BOqEG6iZ.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.