PageSourceSearch

https://chartinsight.ai/_nuxt/BonvSg5g.js

js chartinsight.ai collected 2026-10-05 12:27:20 UTC 9,739 bytes, 1 lines download raw bytes

1import{_ as Z}from"./B5dBc8Nv.js";import{f as ee,Y as te,aa as se,M as ae,i as k,u as oe,c as u,a as e,b as c,s as n,t as v,B as l,n as f,H as F,a4 as R,w as V,D as re,aI as E,z as a,y as g,q as ne,o as b,aD as le,G as ie,d as de}from"./DeGZr0e7.js";import{u as ue}from"./DTYc-L_s.js";import{u as ce}from"./C1qVyGFw.js";import{r as I}from"./Rl0_qRDU.js";import{r as ve}from"./DtguL9rc.js";import"./DkbcUKai.js";const be=["id"],fe={class:"w-full relative px-6 pb-10"},ge={class:"container"},me={class:"grid gap-8 container max-w-screen-lg grid-cols-1"},pe={class:"space-y-6"},xe={class:"space-y-4 max-w-2xl"},ye={key:0,class:"relative p-5 bg-gradient-to-br from-blue-50 to-indigo-50 border border-blue-100 rounded-xl select-none"},_e={class:"relative block text-gray-900 !text-sm !mb-0 !font-semibold pb-3"},he={class:"flex items-center gap-2 justify-between w-full"},we={class:"flex items-center gap-2"},ke={class:"relative group/info z-50"},De={class:"flex items-center justify-center w-4 h-4 rounded-full bg-blue-100 hover:bg-blue-200 transition-colors cursor-help"},Se={class:"fixed opacity-0 invisible group-hover/info:opacity-100 group-hover/info:visible transition-all duration-200 ease-out group-hover/info:translate-y-0 translate-y-1 pointer-events-none group-hover/info:pointer-events-auto",style:{left:"auto",top:"auto","margin-top":"1.75rem"}},Ce={class:"bg-white rounded-xl shadow-2xl border border-gray-200 p-4 w-80"},je={class:"flex items-start gap-3"},Fe={class:"flex-shrink-0 w-8 h-8 rounded-lg bg-blue-100 flex items-center justify-center mt-0.5"},Re={class:"flex-1 space-y-2"},Ve={class:"text-xs leading-relaxed text-gray-600"},Ee={class:"flex items-center gap-2"},Ie={class:"flex items-center justify-center w-8 h-8 rounded-lg bg-blue-100"},Me={class:"space-y-4 max-w-2xl"},Ne={class:"flex items-center gap-3"},$e=["aria-checked"],Te={class:"grid grid-cols-1 sm:grid-cols-2 gap-4 pb-4"},ze=["disabled"],Ae=["disabled"],Be={key:0,class:"mt-2 text-xs bg-yellow-50 border border-yellow-200 text-yellow-800 rounded px-3 py-2 flex items-center gap-2"},He={class:"flex items-center gap-2 pt-2"},Ue={key:0,class:"animate-spin -ml-0.5 mr-2 h-4 w-4 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},Je={key:0,class:"text-xs text-gray-500 pl-2"},Le={key:1,class:"text-sm text-red-600"},We={class:"text-xs text-gray-500 mt-2"},Ze=ee({__name:"focus",setup(qe){te();const o=se(),{trackEvent:M}=re(),m=E("medicalRecordId"),N=a(()=>o.recordStatus?.status),{handleSectionReady:$}=ue(m,N,"focus");ae(()=>{$("focus"),M("focusViewed",{record_id:m.value,time_to_view_seconds:0,via_route:!0})});const T=E("matterContext",a(()=>null)),z=a(()=>!!T.value),_=a(()=>z.value?"matter":"record"),{rootClass:A,bodyClass:B,bodyId:H}=ce(),i=g(!1),p=g(null),D=g(!1),s=g({enabled:!1,instructions:"",startDate:"",endDate:""}),x=g(!1),h=g(!1),w=()=>{const r=o.record;r&&(h.value=!0,s.value.enabled=!!r.focus_enabled,s.value.instructions=r.focus_instructions||"",s.value.startDate=r.focus_start_date||"",s.value.endDate=r.focus_end_date||"",h.value=!1)};k(()=>m.value,()=>{x.value=!1,D.value=!1,w()}),k(s,()=>{h.value||(x.value=!0)},{deep:!0}),k(()=>o.record,()=>{x.value||w()},{immediate:!0});const S=a(()=>o.record?.enhanced_focus_instructions||""),U=a(()=>!!o.record?.focus_instructions_not_relevant),C=a(()=>{const t=o.record?.enhanced_focus_start_date;if(!t)return"";const y=new Date(t);return isNaN(y.getTime())?String(t):y.toLocaleDateString()}),J=a(()=>!!o.record?.focus_enabled),L=a(()=>o.record?.focus_instructions||""),W=a(()=>o.record?.focus_start_date||""),q=a(()=>o.record?.focus_end_date||""),G=a(()=>!!s.value.enabled!==J.value),O=a(()=>(s.value.instructions||"")!==L.value),Y=a(()=>(s.value.startDate||"")!==W.value),K=a(()=>(s.value.endDate||"")!==q.value),P=a(()=>G.value||O.value||Y.value||K.value),j=a(()=>i.value),Q=async()=>{if(m.value){i.value=!0,p.value=null;try{await o.updateMedicalRecordFocusInstructions(m.value,{focus_enabled:!!s.value.enabled,focus_instructions:s.value.instructions||"",focus_start_date:s.value.startDate||null,focus_end_date:s.value.endDate||null}),x.value=!1,D.value=!0,w()}catch(r){p.value=r?.message||"Failed to save focus settings"}finally{i.value=!1}}};return oe({title:a(()=>`Focus - ${o.record?.name??"Medical Record"}`)}),(r,t)=>{const y=Z,X=ne;return b(),u("div",{class:l(n(A))},[t[15]||(t[15]=e("div",{class:"bg-white dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700 p-6 w-full"},[e("div",{class:"flex items-center justify-between"},[e("div",null,[e("h1",{class:"text-2xl font-bold text-gray-900 dark:text-white"},"Focus settings"),e("p",{class:"text-sm text-gray-500 dark:text-gray-400 mt-1"}," Force the AI to focus on specific injuries, diagnoses, conditions, or topics in the patient's history. Specifying start and/or end dates will focus only on the selected time period. ")])])],-1)),e("div",{id:n(H),class:l(n(B))},[e("div",fe,[e("div",ge,[e("div",me,[e("div",pe,[t[13]||(t[13]=e("h1",{class:"sr-only"},"Current Focus",-1)),e("div",xe,[S.value?(b(),u("div",ye,[t[8]||(t[8]=e("div",{class:"absolute inset-0 opacity-[0.03] rounded-xl pointer-events-none",style:{"background-image":"radial-gradient(circle at 1px 1px, rgb(99 102 241) 1px, transparent 0)","background-size":"20px 20px"}},null,-1)),e("label",_e,[e("div",he,[e("div",we,[t[7]||(t[7]=e("span",{class:"text-blue-900"}
1,"AI-Enhanced Subject",-1)),e("div",ke,[e("div",De,[c(n(le),{class:"w-5 h-5 text-blue-600"})]),e("div",Se,[e("div",Ce,[e("div",je,[e("div",Fe,[c(n(I),{class:"w-4 h-4 text-blue-600"})]),e("div",Re,[t[5]||(t[5]=e("p",{class:"text-sm font-medium text-gray-900"},"What is this?",-1)),e("p",Ve," This is the AI-enhanced version of your original subject. We use this refined version to generate more accurate and focused content from your "+v(_.value)+". ",1)])]),t[6]||(t[6]=e("div",{class:"absolute -top-2 left-4 w-4 h-4 bg-white border-l border-t border-gray-200 transform rotate-45"},null,-1))])])])]),e("div",Ee,[e("div",Ie,[c(n(I),{class:"w-4 h-4 text-blue-600"})])])])]),e("div",{class:l(["relative text-sm text-gray-700 leading-relaxed italic",j.value?"blur-sm":""])},' "'+v(S.value)+'" ',3),C.value?(b(),u("div",{key:0,class:l(["relative pt-3 text-xs font-medium text-blue-700 flex items-center gap-2",j.value?"blur-sm":""])},[c(n(ve),{class:"w-3.5 h-3.5"}),e("span",null,"Relevant Start Date: "+v(C.value),1)],2)):f("",!0)])):f("",!0)]),t[14]||(t[14]=e("h1",{class:"sr-only"},"Focus Settings",-1)),e("div",Me,[e("div",Ne,[e("button",{type:"button",role:"switch","aria-checked":s.value.enabled,onClick:t[0]||(t[0]=d=>s.value.enabled=!s.value.enabled),class:l(["relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus-visible:ring-2 focus-visible:ring-judy-orange-500 focus-visible:ring-offset-2",s.value.enabled?"bg-judy-orange-500":"bg-gray-200"])},[t[9]||(t[9]=e("span",{class:"sr-only"},"Enable focus",-1)),e("span",{"aria-hidden":"true",class:l(["pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out",s.value.enabled?"translate-x-5":"translate-x-0"])},null,2)],10,$e),e("label",{class:"text-sm font-medium text-gray-900 dark:text-gray-200 cursor-pointer",onClick:t[1]||(t[1]=d=>s.value.enabled=!s.value.enabled)}," Enable ")]),c(y,{id:"focus-instructions",modelValue:s.value.instructions,"onUpdate:modelValue":t[2]||(t[2]=d=>s.value.instructions=d),label:"Subject",placeholder:"Describe the specific injuries, diagnoses, conditions, or topics to focus on (e.g., 'right knee')",rows:3,disabled:!s.value.enabled,"label-class":"!text-sm !mb-0 !font-semibold"},null,8,["modelValue","disabled"]),e("div",Te,[e("div",null,[t[10]||(t[10]=e("label",{class:"block text-gray-900 !text-sm !mb-0 !font-semibold pb-2"},"Start date",-1)),F(e("input",{type:"date","onUpdate:modelValue":t[3]||(t[3]=d=>s.value.startDate=d),class:l(["block w-full rounded-md border px-3 py-2 text-gray-900 shadow-sm sm:text-sm",s.value.enabled?"bg-white border-gray-300 focus:ring-judy-orange-500 focus:border-judy-orange-500":"bg-gray-50 border-gray-200 text-gray-400 cursor-not-allowed"]),disabled:!s.value.enabled},null,10,ze),[[R,s.value.startDate]])]),e("div",null,[t[11]||(t[11]=e("label",{class:"block text-gray-900 !text-sm !mb-0 !font-semibold pb-2"},"End date",-1)),F(e("input",{type:"date","onUpdate:modelValue":t[4]||(t[4]=d=>s.value.endDate=d),class:l(["block w-full rounded-md border px-3 py-2 text-gray-900 shadow-sm sm:text-sm",s.value.enabled?"bg-white border-gray-300 focus:ring-judy-orange-500 focus:border-judy-orange-500":"bg-gray-50 border-gray-200 text-gray-400 cursor-not-allowed"]),disabled:!s.value.enabled},null,10,Ae),[[R,s.value.endDate]])])]),U.value?(b(),u("div",Be,[c(n(ie),{class:"w-4 h-4 text-yellow-600"}),e("span",null,"Our AI model could not find the subject in this "+v(_.value)+". Focus will not be applied.",1)])):f("",!0),e("div",He,[c(X,{variant:"primary",disabled:i.value||!P.value,onClick:Q},{"icon-left":V(()=>[i.value?(b(),u("svg",Ue,[...t[12]||(t[12]=[e("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),e("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},null,-1)])])):f("",!0)]),default:V(()=>[de(" "+v(i.value?"Saving…":"Save"),1)]),_:1},8,["disabled"]),i.value?(b(),u("span",Je,"This may take a few minutes.")):f("",!0),p.value?(b(),u("span",Le,v(p.value),1)):f("",!0)]),e("p",We,"Focus will be applied after reprocessing the "+v(_.value)+".",1)])])])])])],10,be)],2)}}});
1export{Ze as default};

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.