PageSourceSearch

https://form.easydocforms.com/static/js/3923.d1175349.chunk.js

js easydocforms.com collected 2026-10-05 05:26:45 UTC 16,430 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkhealthcare_forms_frontend=self.webpackChunkhealthcare_forms_frontend||[]).push([[3923],{38678(e,t,n){n.d(t,{A:()=>d,o:()=>o});var a=n(89379),s=n(5544),i=n(9950),r=n(76655),l=n(44414);const o=e=>{let t=e.picked,n=e.onPick,o=e.onError;const d=(0,r.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],g=(0,i.useState)([]),y=(0,s.A)(g,2),v=y[0],x=y[1];return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"cf__search",children:[(0,l.jsx)("input",{placeholder:"First name",value:_.firstName,onChange:e=>f((0,a.A)((0,a.A)({},_),{},{firstName:e.target.value}))}),(0,l.jsx)("input",{placeholder:"Last name",value:_.lastName,onChange:e=>f((0,a.A)((0,a.A)({},_),{},{lastName:e.target.value}))}),(0,l.jsx)("input",{placeholder:"DOB yyyy-mm-dd",value:_.birthdate,onChange:e=>f((0,a.A)((0,a.A)({},_),{},{birthdate:e.target.value}))}),(0,l.jsx)("button",{type:"button",className:"cf__btn",onClick:async()=>{x([]);try{const e=await h(_).unwrap();x(e.candidates||[])}catch(e){null===o||void 0===o||o((e=>{var t;const n=e;return(null===n||void 0===n||null===(t=n.data)||void 0===t?void 0:t.error)||(null===n||void 0===n?void 0:n.error)||"Request failed"})(e))}},disabled:u.isLoading,children:u.isLoading?"Searching\u2026":"Search"})]}),v.length>0&&(0,l.jsx)("ul",{className:"cf__candidates",children:v.map(e=>(0,l.jsx)("li",{children:(0,l.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:()=>n(e),children:[e.first_name," ",e.last_name,(0,l.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===v.length&&(0,l.jsx)("p",{className:"cf__muted",children:"No matching patients."})]})},d=o},56753(e,t,n){n.d(t,{y:()=>s});n(9950);var a=n(44414);const s=e=>{var t;let n=e.state;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"odt__ptitle",children:"Already in Open Dental"}),(0,a.jsxs)("div",{className:"odt__onfile",children:[n.isFetching&&"Reading the chart\u2026",n.isError&&"Open Dental did not answer.",n.data&&!n.isFetching&&(0===n.data.items.length?"Nothing on file \u2014 no sheets, no scanned forms.":(0,a.jsx)("ul",{children:n.data.items.map((e,t)=>(0,a.jsxs)("li",{children:[e.type||("sheet"===e.kind?"Sheet":"Document"),e.description?" \u2014 ".concat(e.description):"",e.date?" \xb7 ".concat(e.date):""]},"".concat(e.kind,"-").concat(t)))})),((null===(t=n.data)||void 0===t?void 0:t.warnings)||[]).map(e=>(0,a.jsx)("div",{children:e},e))]})]})}},43923(e,t,n){n.r(t),n.d(t,{SendFormPage:()=>_,default:()=>f,onFileFor:()=>u});var a=n(5544),s=n(9950),i=n(42074),r=n(76655),l=n(68296),o=n(38678),d=n(56753),c=n(82775),h=(n(43589),n(80128),n(44414));const u=(e,t,n)=>{var a;const s=(null===(a=t.find(t=>t.template_id===e))||void 0===a?void 0:a.od_sheet_types)||[];if(0===s.length)return null;const i=n.filter(e=>"sheet"===e.kind&&s.includes(e.type)&&e.date);return 0===i.length?null:i.reduce((e,t)=>(t.date||"")>(e.date||"")?t:e)},m=async e=>{try{return await navigator.clipboard.writeText(e),!0}catch(t){return!1}},p=e=>"".concat(e.first_name," ").concat(e.last_name).trim()||"Chart #".concat(e.patient_ref),_=()=>{var e;
1const t=(0,c.W)().practiceName,n=(0,s.useState)(null),_=(0,a.A)(n,2),f=_[0],g=_[1],y=(0,s.useState)([]),v=(0,a.A)(y,2),x=v[0],b=v[1],j=(0,s.useState)(null),N=(0,a.A)(j,2),k=N[0],w=N[1],S=(0,s.useState)(null),C=(0,a.A)(S,2),D=C[0],F=C[1],O=(0,l.f)().data,P=(0,r.g5)(),q=P.data,A=P.isLoading,R=(0,l.TB)(),I=(0,a.A)(R,2),L=I[0],T=I[1],M=(0,l.jW)(),E=(0,a.A)(M,2),G=E[0],U=E[1],Q=(0,l.Hh)(),B=(0,a.A)(Q,2),z=B[0],H=B[1],K=(null===q||void 0===q?void 0:q.forms)||[],V=(null===O||void 0===O?void 0:O.settings.rules)||[],W=(null===O||void 0===O?void 0:O.settings.new_patient_template_ids)||[],$=null!==(e=T.data)&&void 0!==e&&e.patient&&f&&T.data.patient.patientRef===f.patient_ref?T.data.patient:void 0,J=!!$&&(0,l.$e)($),Z=$?(0,l.Dh)($):f?p(f):"";(0,s.useEffect)(()=>{$&&b((0,l.$e)($)?W:[])},[null===$||void 0===$?void 0:$.patientRef,O]);const X=(0,s.useCallback)(async e=>{if(!f)return;const t=x.filter(e=>K.some(t=>t.templateId===e));if(0!==t.length)try{const n=await z({patientRef:String(f.patient_ref),templateIds:t,deliver:e}).unwrap();F(n);const a=n.links.length,s=n.failures||[];if("email"===e&&"email"===n.delivered)return void w({text:"Sent ".concat(a," ").concat(1===a?"form":"forms"," to ").concat(n.to," for ").concat(Z,".").concat(s.length?" ".concat(s[0].error):""),bad:s.length>0});const i=await m(n.links.map(e=>"".concat(e.title,": ").concat(e.url)).join("\n")),r=$&&!$.email?" \u2014 this patient has no email in Open Dental.":" \u2014 paste them into your own message.";w({text:i?"".concat(a," ").concat(1===a?"link":"links"," for ").concat(Z," copied").concat(r):"Links created \u2014 copy them below.",bad:!i||s.length>0})}catch(a){var n;w({text:(null===a||void 0===a||null===(n=a.data)||void 0===n?void 0:n.error)||"The forms could not be sent.",bad:!0})}},[f,x,K,z,Z,$]),Y=H.isLoading,ee=null!==$&&void 0!==$&&$.birthdate?new Date("".concat($.birthdate,"T00:00:00")).toLocaleDateString(void 0,{month:"long",day:"numeric",year:"numeric"}):"";return(0,h.jsxs)("div",{className:"odt",children:[(0,h.jsxs)("div",{className:"odt__top",children:[(0,h.jsx)("h1",{children:"Send a form"}),(0,h.jsx)("span",{className:"odt__grow"}),t&&(0,h.jsx)("span",{className:"odt__sync",children:t})]}),k&&(0,h.jsxs)("div",{className:"odt__notice".concat(k.bad?" odt__notice--bad":""),role:"status",children:[k.text," ",(0,h.jsx)("button",{type:"button",className:"odt__btn odt__btn--quiet odt__btn--small",onClick:()=>w(null),children:"Dismiss"})]}),(0,h.jsxs)("div",{className:"odt__body",children:[(0,h.jsxs)("section",{className:"odt__list",children:[(0,h.jsxs)("div",{className:"odt__step",children:[(0,h.jsx)("div",{className:"odt__ptitle",children:"1 \xb7 Find the patient"}),(0,h.jsx)(o.o,{picked:f,onPick:e=>{g(e),F(null),w(null),b([]),L(e.patient_ref),G(e.patient_ref)},onError:e=>w({text:e,bad:!0})})]}),(0,h.jsxs)("div",{className:"odt__step",children:[(0,h.jsx)("div",{className:"odt__ptitle",children:"2 \xb7 Choose the forms"}),f?(0,h.jsxs)(h.Fragment,{children:[J&&W.length>0&&(0,h.jsx)("p",{className:"odt__sub",children:"New patient \u2014 the new-patient packet is ticked."}),A&&(0,h.jsx)("p",{className:"odt__sub",children:"Loading your forms\u2026"}),!A&&0===K.length&&(0,h.jsxs)("p",{className:"odt__onfile",children:["No PDF templates yet. ",(0,h.jsx)(i.N_,{to:"/exact-pdf-templates",children:"Import one"})," first."]}),(0,h.jsx)("div",{className:"odt__forms",children:K.map(e=>{var t;const n=u(e.templateId,V,(null===(t=U.data)||void 0===t?void 0:t.items)||[]);return(0,h.jsxs)("label",{className:"odt__f odt__f--pick",children:[(0,h.jsxs)("span",{children:[(0,h.jsx)("input",{type:"checkbox",checked:x.includes(e.templateId),onChange:()=>{return t=e.templateId,b(e=>e.includes(t)?e.filter(e=>e!==t):[...e,t]);var t}}),(0,h.jsx)("span",{className:"odt__fn",children:e.title})]}),(0,h.jsx)("span",{className:"odt__fs odt__fs--ok",children:n?"on file in Open Dental, ".concat((0,l.qm)(n.date)):""})]},e.templateId)})})]}):(0,h.jsx)("p",{className:"odt__onfile",children:"Pick a patient first."})]}),(0,h.jsxs)("div",{className:"odt__step",children:[(0,h.jsx)("div",{className:"odt__ptitle",children:"3 \xb7 Send"}),f?(0,h.jsxs)("div",{className:"odt__send",children:[T.isFetching&&(0,h.jsx)("p",{children:"Reading the chart\u2026"}),T.isError&&!T.isFetching&&(0,h.jsx)("p",{children:"Open Dental did not answer for this chart."}),$&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsxs)("p",{children:["Send ",1===x.length?"one form":"".concat(x.length," forms"),$.email?(0,h.jsxs)(h.Fragment,{children:[" to ",(0,h.jsx)("b",{children:$.email})]}):" \u2014 no email on the chart, so copy the links into your own message"]}),(0,h.jsxs)("div",{className:"odt__acts",children:[$.email&&(0,h.jsx)("button",{type:"button",className:"odt__btn odt__btn--primary",disabled:Y||0===x.length,onClick:()=>X("email"),children:"Send by email"}),(0,h.jsx)("button",{type:"button",className:"odt__btn",disabled:Y||0===x.length,onClick:()=>X("none"),children:$.email?"Copy links":"Create and copy links"})]}
1),(0,h.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 file into the chart and the answers wait for your review before anything is written to Open Dental."})]})]}):(0,h.jsx)("p",{className:"odt__onfile",children:"Pick a patient and the forms first."}),D&&D.links.length>0&&(0,h.jsxs)("div",{className:"odt__sentlinks",children:[D.links.map(e=>(0,h.jsxs)("div",{className:"odt__f",children:[(0,h.jsxs)("div",{children:[(0,h.jsx)("div",{className:"odt__fn",children:e.title}),(0,h.jsx)("code",{children:e.url})]}),(0,h.jsx)("button",{type:"button",className:"odt__btn odt__btn--quiet odt__btn--small",onClick:()=>m(e.url),children:"Copy link"})]},e.shareLinkId)),(0,h.jsxs)("p",{className:"odt__fine",children:["These forms will appear on ",(0,h.jsx)(i.N_,{to:"/opendental/today",children:"Today"})," for this patient\u2019s next appointment."]})]})]})]}),(0,h.jsx)("aside",{className:"odt__panel","aria-label":f?p(f):"Patient",children:f?(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)("div",{className:"odt__ph",children:(0,h.jsxs)("div",{children:[(0,h.jsx)("h3",{children:Z}),(0,h.jsx)("div",{className:"odt__meta",children:$?J?"New patient":"Established":""})]})}),(0,h.jsxs)("dl",{className:"odt__kv",children:[ee&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)("dt",{children:"Born"}),(0,h.jsx)("dd",{children:ee})]}),(null===$||void 0===$?void 0:$.mobilePhone)&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)("dt",{children:"Mobile"}),(0,h.jsxs)("dd",{children:[(0,h.jsx)("a",{href:"tel:".concat($.mobilePhone),children:$.mobilePhone}),$.textsOk&&(0,h.jsx)("small",{children:" \xb7 texts OK"})]})]}),(0,h.jsx)("dt",{children:"Email"}),(0,h.jsx)("dd",{children:$?$.email||(0,h.jsx)("small",{children:"none in Open Dental"}):"\u2026"}),(0,h.jsx)("dt",{children:"Chart"}),(0,h.jsxs)("dd",{children:["PatNum ",f.patient_ref]})]}),(0,h.jsx)(d.y,{state:U}),(0,h.jsxs)("div",{className:"odt__links",children:[(0,h.jsx)(i.N_,{to:"/opendental/today",children:"Open Today"}),(0,h.jsx)(i.N_,{to:"/chart-fill",children:"Fill a form from the chart"})]})]}):(0,h.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."})})]})]})},f=_},76655(e,t,n){n.d(t,{O1:()=>_,Ol:()=>l,Zo:()=>f,ff:()=>u,g5:()=>h,io:()=>g,lH:()=>m,mG:()=>o,oJ:()=>p,wk:()=>c});var a=n(80045),s=n(21569);const i=["templateId"],r=["templateId"],l=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}}},o=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,n=(0,a.A)(e,i);return{url:"/assistant/chart-fill/forms/".concat(encodeURIComponent(t),"/mapping"),method:"PUT",body:n}}}),proposeChartFillMapping:e.mutation({query:e=>{let t=e.templateId,n=e.purpose;return{url:"/assistant/chart-fill/forms/".concat(encodeURIComponent(t),"/propose"),method:"POST",body:n?{purpose:n}:{}}}}),renderChartFill:e.mutation({query:e=>{let t=e.templateId,n=(0,a.A)(e,r);return{url:"/assistant/chart-fill/forms/".concat(encodeURIComponent(t),"/render"),method:"POST",body:n}}}),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,g=d.useLazyGetChartStatusQuery},68296(e,t,n){n.d(t,{$e:()=>S,Dh:()=>w,Dj:()=>N,Fc:()=>i,Hh:()=>c,R7:()=>v,TB:()=>l,aC:()=>m,ec:()=>C,f:()=>o,iO:()=>r,jW:()=>u,kX:()=>h,ku:()=>j,lD:()=>f,mU:()=>x,pJ:()=>p,qm:()=>k,tE:()=>y,tK:()=>b,tV:()=>g,to:()=>d,u7:()=>_});var a=n(5544),s=n(21569);const i=s.q.injectEndpoints({endpoints:e=>({getOpenDentalReadinessDay:e.query({query:e=>{let t=e.date;return{url:"/assistant/opendental/readiness",params:e.refresh?{date:t,refresh:"1"}:{date:t}}}
1,keepUnusedDataFor:900}),getOpenDentalReadinessPatient:e.query({query:e=>({url:"/assistant/opendental/readiness/patients/".concat(e)})}),getOpenDentalReadinessSettings:e.query({query:()=>({url:"/assistant/opendental/readiness/settings"})}),putOpenDentalReadinessSettings:e.mutation({query:e=>({url:"/assistant/opendental/readiness/settings",method:"PUT",body:e})}),sendOpenDentalPacket:e.mutation({query:e=>({url:"/assistant/opendental/readiness/send",method:"POST",body:e})}),resendOpenDentalPacket:e.mutation({query:e=>({url:"/assistant/opendental/readiness/resend",method:"POST",body:e})}),getOpenDentalOnFile:e.query({query:e=>({url:"/assistant/opendental/readiness/patients/".concat(e,"/on-file")})}),retryOpenDentalFiling:e.mutation({query:e=>{let t=e.responseId,n=e.externalPatientId;return{url:"/responses/".concat(t,"/opendental/file"),method:"POST",body:{external_patient_id:n}}}})}),overrideExisting:!1}),r=i.useLazyGetOpenDentalReadinessDayQuery,l=i.useLazyGetOpenDentalReadinessPatientQuery,o=i.useGetOpenDentalReadinessSettingsQuery,d=i.usePutOpenDentalReadinessSettingsMutation,c=i.useSendOpenDentalPacketMutation,h=i.useResendOpenDentalPacketMutation,u=i.useLazyGetOpenDentalOnFileQuery,m=i.useRetryOpenDentalFilingMutation,p=e=>{const t=e.split(":").map(Number),n=(0,a.A)(t,2),s=n[0],i=n[1];if(Number.isNaN(s)||Number.isNaN(i))return e;const r=s>=12?"pm":"am";return"".concat(s%12===0?12:s%12,":").concat(String(i).padStart(2,"0")," ").concat(r)},_=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date;return"".concat(e.getFullYear(),"-").concat(String(e.getMonth()+1).padStart(2,"0"),"-").concat(String(e.getDate()).padStart(2,"0"))},f=(e,t)=>{const n=e.split("-").map(Number),s=(0,a.A)(n,3),i=s[0],r=s[1],l=s[2];return _(new Date(i,r-1,l+t))},g=e=>{const t=e.split("-").map(Number),n=(0,a.A)(t,3),s=n[0],i=n[1],r=n[2];return new Date(s,i-1,r).toLocaleDateString(void 0,{weekday:"long",month:"long",day:"numeric"})},y=e=>{const t=e.split("-").map(Number),n=(0,a.A)(t,3),s=n[0],i=n[1],r=n[2];return new Date(s,i-1,r).toLocaleDateString(void 0,{weekday:"short",month:"short",day:"numeric"})},v=e=>e.forms.filter(e=>"not_sent"===e.state||"expired"===e.state||"completed"===e.state&&!1===e.signed),x=e=>e.forms.filter(e=>"sent"===e.state&&e.shareLinkId),b=12,j=[{value:"manual",label:"Manual \u2014 never prompted"},{value:"once",label:"Once"},{value:"every_visit",label:"Every visit"},{value:"6",label:"Every 6 months"},{value:"12",label:"Every 12 months"},{value:"24",label:"Every 24 months"},{value:"custom",label:"Custom\u2026"}],N={MedicalHistory:"Medical history",Consent:"Consent",PatientForm:"Patient form"},k=e=>{const t=e.split("-").map(Number),n=(0,a.A)(t,3),s=n[0],i=n[1],r=n[2];return s&&i&&r?new Date(s,i-1,r).toLocaleDateString(void 0,{day:"numeric",month:"short",year:"numeric"}):e},w=e=>[e.preferred||e.firstName,e.lastName].filter(Boolean).join(" ").trim()||"Chart #".concat(e.patientRef),S=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_();return!e.firstVisit||e.firstVisit.slice(0,10)>=t},C=e=>e.missing+e.waiting+e.review+e.unsigned},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.