PageSourceSearch

https://form.easydocforms.com/static/js/844.daea75b7.chunk.js

js easydocforms.com collected 2026-10-05 05:25:51 UTC 13,103 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkhealthcare_forms_frontend=self.webpackChunkhealthcare_forms_frontend||[]).push([[844],{38678(e,t,a){a.d(t,{A:()=>d,o:()=>r});var n=a(89379),s=a(5544),i=a(9950),l=a(76655),o=a(44414);const r=e=>{let t=e.picked,a=e.onPick,r=e.onError;const d=(0,l.Zo)(),c=(0,s.A)(d,2),h=c[0],u=c[1],m=(0,i.useState)({firstName:"",lastName:"",birthdate:""}),p=(0,s.A)(m,2),_=p[0],f=p[1],v=(0,i.useState)([]),g=(0,s.A)(v,2),b=g[0],x=g[1];return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{className:"cf__search",children:[(0,o.jsx)("input",{placeholder:"First name",value:_.firstName,onChange:e=>f((0,n.A)((0,n.A)({},_),{},{firstName:e.target.value}))}),(0,o.jsx)("input",{placeholder:"Last name",value:_.lastName,onChange:e=>f((0,n.A)((0,n.A)({},_),{},{lastName:e.target.value}))}),(0,o.jsx)("input",{placeholder:"DOB yyyy-mm-dd",value:_.birthdate,onChange:e=>f((0,n.A)((0,n.A)({},_),{},{birthdate:e.target.value}))}),(0,o.jsx)("button",{type:"button",className:"cf__btn",onClick:async()=>{x([]);try{const e=await h(_).unwrap();x(e.candidates||[])}catch(e){null===r||void 0===r||r((e=>{var t;const a=e;return(null===a||void 0===a||null===(t=a.data)||void 0===t?void 0:t.error)||(null===a||void 0===a?void 0:a.error)||"Request failed"})(e))}},disabled:u.isLoading,children:u.isLoading?"Searching\u2026":"Search"})]}),b.length>0&&(0,o.jsx)("ul",{className:"cf__candidates",children:b.map(e=>(0,o.jsx)("li",{children:(0,o.jsxs)("button",{type:"button",className:"cf__candidate".concat((null===t||void 0===t?void 0:t.patient_ref)===e.patient_ref?" cf__candidate--picked":""),onClick:()=>a(e),children:[e.first_name," ",e.last_name,(0,o.jsxs)("span",{className:"cf__muted",children:[" \xb7 DOB ",e.birthdate?e.birthdate.slice(0,10):"\u2014"," \xb7 #",e.patient_ref]})]})},e.patient_ref))}),u.isSuccess&&0===b.length&&(0,o.jsx)("p",{className:"cf__muted",children:"No matching patients."})]})},d=r},30844(e,t,a){a.r(t),a.d(t,{ECWSendFormPage:()=>p,default:()=>_});var n=a(9950),s=a(5544),i=a(42074),l=a(76655),o=a(43463),r=a(38678),d=a(39651),c=(a(43589),a(80128),a(44414));const h=async e=>{try{return await navigator.clipboard.writeText(e),!0}catch(t){return!1}},u=e=>"".concat(e.first_name," ").concat(e.last_name).trim()||"Chart ".concat(e.patient_ref),m=e=>{var t;let a=e.outstandingPath;const m=(0,d.C)(),p=m.practiceName,_=m.label,f=(0,n.useState)(null),v=(0,s.A)(f,2),g=v[0],b=v[1],x=(0,n.useState)([]),j=(0,s.A)(x,2),y=j[0],N=j[1],k=(0,n.useState)(null),C=(0,s.A)(k,2),w=C[0],S=C[1],F=(0,n.useState)(null),P=(0,s.A)(F,2),R=P[0],q=P[1],M=(0,l.g5)(),A=M.data,E=M.isLoading,I=(0,o.R6)(),L=(0,s.A)(I,2),O=L[0],T=L[1],D=(0,o.z9)(),G=(0,s.A)(D,2),U=G[0],Q=G[1],z=(null===A||void 0===A?void 0:A.forms)||[],B=null!==(t=T.data)&&void 0!==t&&t.patient&&g&&T.data.patient.patientRef===g.patient_ref?T.data.patient:void 0,W=(null===B||void 0===B?void 0:B.name)||(g?u(g):""),Z=(0,n.useCallback)(async e=>{if(!g)return;const t=y.filter(e=>z.some(t=>t.templateId===e));if(0!==t.length)try{const a=await U({patientRef:String(g.patient_ref),templateIds:t,deliver:e}).unwrap();q(a);const n=a.links.length,s=a.failures||[];if(a.warning)return void S({text:a.warning,bad:!0});if("email"===e&&"email"===a.delivered)return void S({text:"Sent ".concat(n," ").concat(1===n?"form":"forms"," to ").concat(a.to," for ").concat(W,".").concat(s.length?" ".concat(s[0].error):""),bad:s.length>0});const i=await h(a.links.map(e=>"".concat(e.title,": ").concat(e.url)).join("\n")),l=B&&!B.email?" \u2014 this patient has no email on the chart in ".concat(_,"."):" \u2014 paste them into your own message.";S({text:i?"".concat(n," ").concat(1===n?"link":"links"," for ").concat(W," copied").concat(l):"Links created \u2014 copy them below.",bad:!i||s.length>0})}catch(n){var a;S({text:(null===n||void 0===n||null===(a=n.data)||void 0===a?void 0:a.error)||"The forms could not be sent.",bad:!0})}},[g,y,z,U,W,B,_]),H=Q.isLoading,J=null!==B&&void 0!==B&&B.birthdate?new Date("".concat(B.birthdate,"T00:00:00")).toLocaleDateString(void 0,{month:"long",day:"numeric",year:"numeric"}):"";return(0,c.jsxs)("div",{className:"odt",children:[(0,c.jsxs)("div",{className:"odt__top",children:[(0,c.jsx)("h1",{children:"Send a form"}),(0,c.jsx)("span",{className:"odt__grow"}),p&&(0,c.jsx)("span",{className:"odt__sync",children:p})]}),w&&(0,c.jsxs)("div",{className:"odt__notice".concat(w.bad?" odt__notice--bad":""),role:"status",children:[w.text," ",(0,c.jsx)("button",{type:"button",className:"odt__btn odt__btn--quiet odt__btn--small",onClick:()=>S(null),children:"Dismiss"})]}),(0,c.jsxs)("div",{className:"odt__body",children:[(0,c.jsxs)("section",{className:"odt__list",children:[(0,c.jsxs)("div",{className:"odt__step",children:[(0,c.jsx)("div",{className:"odt__ptitle",children:"1 \xb7 Find the patient"}),(0,c.jsx)(r.o,{picked:g,onPick:e=>{b(e),q(null),S(null),N([]),O(e.patient_ref)},onError:e=>S({text:e,bad:!0})})]}),(0,c.jsxs)("div",{className:"odt__step",children:[(0,c.jsx)("div",{className:"odt__ptitle",children:"2 \xb7 Choose the forms"}),g?(0,c.jsxs)(c.Fragment,{children:[E&&(0,c.jsx)("p",{className:"odt__sub",children:"Loading your forms\u2026"}),!E&&0===z.length&&(0,c.jsxs)("p",{className:"odt__onfile",children:["No PDF templates yet. ",(0,c.jsx)(i.N_,{to:"/exact-pdf-templates",children:"Import one"})," first."]}),(0,c.jsx)("div",{className:"odt__forms",children:z.map(e=>(0,c.jsx)("label",{className:"odt__f odt__f--pick",children:(0,c.jsxs)("span",{children:[(0,c.jsx)("input",{type:"checkbox",checked:y.includes(e.templateId),onChange:()=>{return t=e.templateId,N(e=>e.includes(t)?e.filter(e=>e!==t):[...e,t]);var t}}),(0,c.jsx)("span",{className:"odt__fn",children:e.title})]})},e.templateId))})]}):(0,c.jsx)("p",{className:"odt__onfile",children:"Pick a patient first."})]}),(0,c.jsxs)("div",{className:"odt__step",children:[(0,c.jsx)("div",{className:"odt__ptitle",children:"3 \xb7 Send"}),g?(0,c.jsxs)("div",{className:"odt__send",children:[T.isFetching&&(0,c.jsx)("p",{children:"Reading the chart\u2026"}),T.isError&&!T.isFetching&&(0,c.jsxs)("p",{children:[_," did not answer for this chart."]}),B&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)("p",{children:["Send ",1===y.length?"one form":"".concat(y.length," forms"),B.email?(0,c.jsxs)(c.Fragment,{children:[" ","to ",(0,c.jsx)("b",{children:B.email})]}):" \u2014 no email on the chart, so copy the links into your own message"]}),(0,c.jsxs)("div",{className:"odt__acts",children:[B.email&&(0,c.jsx)("button",{type:"button",className:"odt__btn odt__btn--primary",disabled:H||0===y.length,onClick:()=>Z("email"),children:"Send by email"}),(0,c.jsx)("button",{type:"button",className:"odt__btn",disabled:H||0===y.length,onClick:()=>Z("none"),children:B.email?"Copy links":"Create and copy links"})]}
1),(0,c.jsx)("div",{className:"odt__fine",children:"Each link opens once and is bound to this chart \u2014 the name is already filled in and locked. Completed forms come back for your review before anything is filed."})]})]}):(0,c.jsx)("p",{className:"odt__onfile",children:"Pick a patient and the forms first."}),R&&R.links.length>0&&(0,c.jsxs)("div",{className:"odt__sentlinks",children:[R.links.map(e=>(0,c.jsxs)("div",{className:"odt__f",children:[(0,c.jsxs)("div",{children:[(0,c.jsx)("div",{className:"odt__fn",children:e.title}),(0,c.jsx)("code",{children:e.url})]}),(0,c.jsx)("button",{type:"button",className:"odt__btn odt__btn--quiet odt__btn--small",onClick:()=>h(e.url),children:"Copy link"})]},e.shareLinkId)),(0,c.jsxs)("p",{className:"odt__fine",children:["These forms are now on ",(0,c.jsx)(i.N_,{to:a,children:"Outstanding"})," until they come back."]})]})]})]}),(0,c.jsx)("aside",{className:"odt__panel","aria-label":g?u(g):"Patient",children:g?(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("div",{className:"odt__ph",children:(0,c.jsxs)("div",{children:[(0,c.jsx)("h3",{children:W}),(0,c.jsx)("div",{className:"odt__meta",children:(null===B||void 0===B?void 0:B.status)||""})]})}),(0,c.jsxs)("dl",{className:"odt__kv",children:[J&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("dt",{children:"Born"}),(0,c.jsx)("dd",{children:J})]}),(null===B||void 0===B?void 0:B.mobilePhone)&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("dt",{children:"Mobile"}),(0,c.jsx)("dd",{children:(0,c.jsx)("a",{href:"tel:".concat(B.mobilePhone),children:B.mobilePhone})})]}),(0,c.jsx)("dt",{children:"Email"}),(0,c.jsx)("dd",{children:B?B.email||(0,c.jsx)("small",{children:"none on the chart"}):"\u2026"}),(0,c.jsx)("dt",{children:"Chart"}),(0,c.jsx)("dd",{children:g.patient_ref})]}),(0,c.jsxs)("div",{className:"odt__links",children:[(0,c.jsx)(i.N_,{to:a,children:"Open Outstanding"}),(0,c.jsx)(i.N_,{to:"/chart-fill",children:"Fill a form from the chart"})]})]}):(0,c.jsx)("p",{className:"odt__onfile",children:"Search by name and date of birth, then pick the chart. A person always picks, even when only one matches."})})]})]})},p=()=>(0,c.jsx)(m,{outstandingPath:"/ecw/outstanding"}),_=p},39651(e,t,a){a.d(t,{C:()=>l});var n=a(81941);const s="Open Dental",i="eClinicalWorks",l=()=>{var e,t,a,l;const o=(0,n.G)(e=>e.auth.organization),r=(null===o||void 0===o||null===(e=o.clinic_info)||void 0===e?void 0:e.practice_name)||(null===o||void 0===o||null===(t=o.clinic_info)||void 0===t?void 0:t.clinic_name)||(null===o||void 0===o?void 0:o.name)||"",d=Boolean(o);return!0===(null===o||void 0===o||null===(a=o.openDental)||void 0===a?void 0:a.connected)?{resolved:d,provider:"opendental",connected:!0,practiceName:r,label:s,capabilities:{documentCreate:!0,documents:!1}}:!0===(null===o||void 0===o||null===(l=o.ecw)||void 0===l?void 0:l.connected)?{resolved:d,provider:"ecw",connected:!0,practiceName:r,label:i,capabilities:(c=o.ecw.capabilities,{documentCreate:!0===(null===c||void 0===c?void 0:c.documentCreate),documents:!0===(null===c||void 0===c?void 0:c.documents)})}:{resolved:d,provider:"",connected:!1,practiceName:r,label:"",capabilities:{documentCreate:!1,documents:!1}};var c}},76655(e,t,a){a.d(t,{O1:()=>_,Ol:()=>o,Zo:()=>f,ff:()=>u,g5:()=>h,io:()=>v,lH:()=>m,mG:()=>r,oJ:()=>p,wk:()=>c});var n=a(80045),s=a(21569);const i=["templateId"],l=["templateId"],o=e=>{if(!e)return null;switch(e.writeKind){case"set":return{badge:"Sets",badgeStatus:"filled",target:e.writeTarget||"",writes:!0};case"add_item":return{badge:"Adds",badgeStatus:"overflow",target:e.writeTarget||"",writes:!0};case"match_only":return{badge:"Match only",badgeStatus:"ask",target:e.writeTarget||"",writes:!1};case"manual":return{badge:"Shown only",badgeStatus:"blank",target:"Not written \u2014 shown to staff",writes:!1};default:return{badge:"Not written",badgeStatus:"skipped",target:"Nothing on this form writes it",writes:!1}}},r=e=>e.prompt&&e.choiceLabel?"".concat(e.prompt," \u2014 ").concat(e.choiceLabel):e.prompt?e.prompt:e.label?e.label:e.id,d=s.q.injectEndpoints({endpoints:e=>({getChartFillSlots:e.query({query:()=>"/assistant/chart-fill/slots"}),getChartFillForms:e.query({query:()=>"/assistant/chart-fill/forms"}),getChartFillForm:e.query({query:e=>"/assistant/chart-fill/forms/".concat(encodeURIComponent(e))}),putChartFillMapping:e.mutation({query:e=>{let t=e.templateId,a=(0,n.A)(e,i);return{url:"/assistant/chart-fill/forms/".concat(encodeURIComponent(t),"/mapping"),method:"PUT",body:a}}}),proposeChartFillMapping:e.mutation({query:e=>{let t=e.templateId,a=e.purpose;return{url:"/assistant/chart-fill/forms/".concat(encodeURIComponent(t),"/propose"),method:"POST",body:a?{purpose:a}:{}}}}),renderChartFill:e.mutation({query:e=>{let t=e.templateId,a=(0,n.A)(e,l);return{url:"/assistant/chart-fill/forms/".concat(encodeURIComponent(t),"/render"),method:"POST",body:a}}}),searchChartPatients:e.mutation({query:e=>({url:"/assistant/patient-search",method:"POST",body:e})}),getChartStatus:e.query({query:e=>"/assistant/charts/".concat(encodeURIComponent(e))})}),overrideExisting:!1}),c=d.useGetChartFillSlotsQuery,h=d.useGetChartFillFormsQuery,u=d.useGetChartFillFormQuery,m=d.usePutChartFillMappingMutation,p=d.useProposeChartFillMappingMutation,_=d.useRenderChartFillMutation,f=d.useSearchChartPatientsMutation,v=d.useLazyGetChartStatusQuery},43463(e,t,a){a.d(t,{Lf:()=>d,O4:()=>s,R6:()=>o,WE:()=>l,z9:()=>r});var n=a(21569);const s=()=>{const e=new Date,t="".concat(e.getMonth()+1).padStart(2,"0"),a="".concat(e.getDate()).padStart(2,"0");return"".concat(e.getFullYear(),"-").concat(t,"-").concat(a)},i=n.q.injectEndpoints({endpoints:e=>({createEMRFillLink:e.mutation({query:e=>({url:"/assistant/emr/fill-links",method:"POST",body:e})}),getEMROutstanding:e.query({query:e=>"/assistant/emr/outstanding?today=".concat(encodeURIComponent((null===e||void 0===e?void 0:e.today)||s()))}),getEMRPatient:e.query({query:e=>"/assistant/emr/patients/".concat(encodeURIComponent(e))}),sendEMRPacket:e.mutation({query:e=>({url:"/assistant/emr/fill-links/send",method:"POST",body:e})}),resendEMRLinks:e.mutation({query:e=>({url:"/assistant/emr/fill-links/resend",method:"POST",body:e})})})}),l=(i.useCreateEMRFillLinkMutation,i.useGetEMROutstandingQuery),o=i.useLazyGetEMRPatientQuery,r=i.useSendEMRPacketMutation,d=i.useResendEMRLinksMutation},43589(){},80128(){}}]);

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.