PageSourceSearch

https://form.easydocforms.com/static/js/9595.550cb27e.chunk.js

js easydocforms.com collected 2026-10-05 05:28:21 UTC 16,059 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkhealthcare_forms_frontend=self.webpackChunkhealthcare_forms_frontend||[]).push([[9595],{79595(e,t,n){n.d(t,{OpenDentalSettings:()=>q});var a=n(5544),o=n(9950),i=n(16491),s=n(46639),r=n(2235),l=n(82053),d=n(25277),c=n(66699),u=n(18160),p=n(74745),h=n(10226),y=n(25979),m=n(3788),x=n(4645),g=n(23266),v=n(16497),f=n(37324),A=n(57016),b=n(11227),j=n(49939),w=n(96523),k=n(57516),O=n(10300),_=n(84440),D=n(24021),I=n(42074),C=n(76690),S=n(44414);const T=()=>{const e=(0,C.id)(),t=e.data;if(e.isError)return null;const n=((null===t||void 0===t?void 0:t.imports)||[]).filter(e=>"pending_review"===e.status||"needs_patient"===e.status);if(0===n.length)return null;const a=n.filter(e=>"needs_patient"===e.status).length;return(0,S.jsxs)(u.A,{severity:"info",sx:{mb:3},action:(0,S.jsx)(h.A,{component:I.N_,to:"/opendental/imports",size:"small",children:"Review"}),children:[1===n.length?"One submitted form is":"".concat(n.length," submitted forms are")," waiting to go into a chart",a>0?", ".concat(a," of them without a patient chosen yet"):"","."]})},z="Setup \u203a Advanced Setup \u203a API",q=()=>{var e;const t=(0,O.d4)(e=>e.auth.organization),n=(0,o.useState)(null),I=(0,a.A)(n,2),C=I[0],q=I[1],P=(0,o.useState)([]),R=(0,a.A)(P,2),W=R[0],Y=R[1],F=(0,o.useState)(""),E=(0,a.A)(F,2),M=E[0],B=E[1],N=(0,o.useState)(!0),G=(0,a.A)(N,2),L=G[0],Q=G[1],U=(0,o.useState)(!1),H=(0,a.A)(U,2),K=H[0],J=H[1],V=(0,o.useState)(!1),X=(0,a.A)(V,2),Z=X[0],$=X[1],ee=(0,o.useState)(null),te=(0,a.A)(ee,2),ne=te[0],ae=te[1],oe=async()=>{const e=await D.firebaseAuth.getIdToken();return{Authorization:"Bearer ".concat(e),"Content-Type":"application/json"}},ie=(e,t)=>{var n,a;return _.A.isAxiosError(e)&&null!==(n=e.response)&&void 0!==n&&null!==(a=n.data)&&void 0!==a&&a.error?e.response.data.error:t},se=(null===C||void 0===C?void 0:C.activation_status)||"",re=Boolean(null===C||void 0===C?void 0:C.connected),le=!re&&("key_issued"===se||"awaiting_activation"===se||"timed_out"===se),de=Boolean(null===C||void 0===C?void 0:C.key_assigned_at),ce=(0,o.useCallback)(async function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==t&&void 0!==t&&t.id){e||Q(!0);try{const e=await _.A.get("/organizations/".concat(t.id,"/integrations/opendental"),{headers:await oe()});q(e.data)}catch(n){e||ae({type:"error",text:"Failed to load Open Dental settings"})}finally{e||Q(!1)}}},[null===t||void 0===t?void 0:t.id]);(0,o.useEffect)(()=>{ce()},[ce]),(0,o.useEffect)(()=>{if("awaiting_activation"!==se)return;const e=setInterval(()=>{ce(!0)},2e4);return()=>clearInterval(e)},[se,ce]),(0,o.useEffect)(()=>{if(null===t||void 0===t||!t.id||!re)return;let e=!1;return(async()=>{try{var n;const a=await _.A.get("/organizations/".concat(t.id,"/integrations/opendental/document-categories"),{headers:await oe()});e||Y((null===(n=a.data)||void 0===n?void 0:n.categories)||[])}catch(a){e||Y([])}})(),()=>{e=!0}},[null===t||void 0===t?void 0:t.id,re]),(0,o.useEffect)(()=>{if(null===t||void 0===t||!t.id)return;if(!le)return void B("");let e=!1;return(async()=>{try{var n;const a=await _.A.get("/organizations/".concat(t.id,"/integrations/opendental/customer-key"),{headers:await oe()});e||B((null===(n=a.data)||void 0===n?void 0:n.customer_key)||"")}catch(a){e||B("")}})(),()=>{e=!0}},[null===t||void 0===t?void 0:t.id,le]);const ue=async function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return null!==t&&void 0!==t&&t.id?_.A.post("/organizations/".concat(t.id,"/integrations/opendental").concat(e),n,{headers:await oe()}):null},pe=async()=>{J(!0),ae(null);try{await ue("/activation"),ae({type:"info",text:"We're checking for the connection again. You can close this page \u2014 we'll email you."}),await ce()}catch(e){ae({type:"error",text:ie(e,"Failed to start checking the connection")})}finally{J(!1)}},he=async()=>{J(!0),ae(null);try{var e,t;const a=await ue("/test");if(null!==a&&void 0!==a&&null!==(e=a.data)&&void 0!==e&&e.connected)ae({type:"success",text:"Connected to Open Dental."});else if(null!==a&&void 0!==a&&null!==(t=a.data)&&void 0!==t&&t.pending)ae({type:"info",text:de?"Not answering yet \u2014 Open Dental is still activating the key. We keep checking.":"Not answering yet. Once the key is added in Open Dental, we pick it up automatically."});else{var n;const e=(null===a||void 0===a||null===(n=a.data)||void 0===n?void 0:n.missing_permissions)||[];ae({type:"error",text:e.length?"Reached Open Dental, but the key is missing: ".concat(e.join(", ")):"Could not reach Open Dental yet."})}await ce()}catch(a){ae({type:"error",text:ie(a,"Could not reach Open Dental yet.")})}finally{J(!1)}},ye=async e=>{if(null!==t&&void 0!==t&&t.id){J(!0),ae(null);try{await _.A.put("/organizations/".concat(t.id,"/integrations/opendental"),e,{headers:await oe()}),ae({type:"success",text:"Saved"}),await ce()}catch(n){ae({type:"error",text:ie(n,"Failed to save settings")})}finally{J(!1)}}};if(!t||L)return(0,S.jsx)(i.A,{sx:{display:"flex",justifyContent:"center",py:6},children:(0,S.jsx)(s.A,{})});const me=["Connect","Add the key","Done"],xe=()=>re?2:le?1:0,ge=(null===C||void 0===C?void 0:C.activation_notify_email)||"you";return(0,S.jsx)(i.A,{sx:{maxWidth:860,mx:"auto",p:3},children:(0,S.jsxs)(r.A,{sx:{p:4},children:[(0,S.jsxs)(i.A,{sx:{display:"flex",alignItems:"center",mb:1},children:[(0,S.jsx)(A.A,{sx:{fontSize:32,mr:2,color:"primary.main"}}),(0,S.jsxs)(i.A,{sx:{flexGrow:1},children:[(0,S.jsx)(l.A,{variant:"h4",fontWeight:"bold",children:"Open Dental"}),(0,S.jsx)(l.A,{variant:"body2",color:"text.secondary",children:"File completed patient forms straight into the chart \u2014 no scanning, no re-keying."})]}),re&&(0,S.jsx)(d.A,{icon:(0,S.jsx)(b.A,{}),label:"Connected",color:"success"})]}),!re&&(0,S.jsxs)(i.A,{sx:{mt:3,mb:1},children:[(0,S.jsxs)(l.A,{variant:"caption",color:"text.secondary",children:["Step ",xe()+1," of ",me.length," \u2014 ",me[xe()]]}),(0,S.jsx)(c.A,{variant:"determinate",value:xe()/(me.length-1)*100,sx:{mt:.5,height:6,borderRadius:3}})]}),ne&&(0,S.jsx)(u.A,{severity:ne.type,sx:{mt:3},onClose:()=>ae(null),children:ne.text}),(0,S.jsx)(p.A,{sx:{my:3}}),!re&&!le&&(0,S.jsxs)(i.A,{children:[(0,S.jsx)(l.A,{variant:"h6",gutterBottom:!0,children:"Before you start"}),(0,S.jsx)(l.A,{variant:"body2",color:"text.secondary",paragraph:!0,children:"Two things need to be true at your office:"}),(0,S.jsxs)(i.A,{component:"ul",sx:{pl:3,mb:3},children:[(0,S.jsxs)(l.A,{component:"li",variant:"body2",color:"text.secondary",sx:{mb:1},children:[(0,S.jsx)("strong",{children:"An eConnector is running."})," It's what lets us reach your database. If it isn't running, nothing else here will work."]}),(0,S.jsxs)(l.A,{component:"li",variant:"body2",color:"text.secondary",children:[(0,S.jsxs)("strong",{children:["Someone has access to ",z]})," in Open Dental \u2014 usually the office manager. One short step happens there."]})]}),(0,S.jsx)(u.A,{severity:"info",sx:{mb:3},children:"Takes about two minutes. We'll give you a key to paste into Open Dental \u2014 that's the whole setup."}),(0,S.jsx)(h.A,{variant:"contained",size:"large",onClick:async()=>{J(!0),ae(null);try{await ue("/connect",{practice_title:(null===t||void 0===t?void 0:t.name)||""}),await ce()}catch(e){ae({type:"error",text:ie(e,"Could not start the connection. Try again in a moment.")})}finally{J(!1)}},disabled:K,children:K?"Getting your key\u2026":"Connect Open Dental"})]}),le&&(0,S.jsxs)(i.A,{children:["timed_out"===se&&(0,S.jsxs)(u.A,{severity:"warning",sx:{mb:3},children:["We checked for about a day and couldn't reach your Open Dental. It's almost always one of: the key isn't ticked ",(0,S.jsx)("strong",{children:"Enabled"}),", the eConnector isn't running, or the key didn't paste cleanly. Try the steps again below."]}),(0,S.jsx)(l.A,{variant:"h6",gutterBottom:!0,children:"Add this key in Open Dental"}),(0,S.jsx)(l.A,{variant:"body2",color:"text.secondary",paragraph:!0,children:"Takes about two minutes."}),M?(0,S.jsxs)(r.A,{variant:"outlined",sx:{p:2,mb:3,display:"flex",alignItems:"center",gap:2,bgcolor:"action.hover",borderStyle:"dashed"},children:[(0,S.jsx)(l.A,{sx:{fontFamily:"monospace",fontSize:"1.05rem",flexGrow:1,wordBreak:"break-all"},children:M}),(0,S.jsx)(h.A,{size:"small",startIcon:(0,S.jsx)(j.A,{}),onClick:async()=>{try{await navigator.clipboard.writeText(M),$(!0),setTimeout(()=>$(!1),2e3)}catch(e){ae({type:"error",text:"Could not copy \u2014 select the key and copy it manually."})}},children:Z?"Copied":"Copy"})]}):(0,S.jsx)(u.A,{severity:"error",sx:{mb:3},children:"We couldn't load your key. Refresh the page \u2014 if it still doesn't appear, reply to any of our emails and we'll sort it out."}),(0,S.jsxs)(i.A,{component:"ol",sx:{pl:3,mb:3},children:[(0,S.jsxs)(l.A,{component:"li",variant:"body2",sx:{mb:1},children:["In Open Dental, go to ",(0,S.jsx)("strong",{children:z})]}),(0,S.jsxs)(l.A,{component:"li",variant:"body2",sx:{mb:1},children:["Click ",(0,S.jsx)("strong",{children:"Add Key"})," and paste the key above"]}),(0,S.jsxs)(l.A,{component:"li",variant:"body2",children:["Tick the ",(0,S.jsx)("strong",{children:"Enabled"})," checkbox"]})]}),"awaiting_activation"===se&&(0,S.jsxs)(r.A,{variant:"outlined",sx:{p:2,mb:3,display:"flex",alignItems:"flex-start",ga
1p:2},children:[de?(0,S.jsx)(w.A,{color:"success",sx:{mt:.25}}):(0,S.jsx)(s.A,{size:20,sx:{mt:.5}}),(0,S.jsxs)(i.A,{children:[de?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(l.A,{variant:"body2",fontWeight:600,children:"Key added in Open Dental \u2014 activating"}),(0,S.jsxs)(l.A,{variant:"body2",color:"text.secondary",children:["Usually a few minutes, up to 15. We'll email ",(0,S.jsx)("strong",{children:ge})," the moment it connects."]})]}):(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(l.A,{variant:"body2",fontWeight:600,children:"Waiting for the key to be added in Open Dental"}),(0,S.jsxs)(l.A,{variant:"body2",color:"text.secondary",children:["Once you've done the steps above there's nothing else to do \u2014 we notice on our own and email ",(0,S.jsx)("strong",{children:ge})," when it connects."]})]}),(0,S.jsx)(l.A,{variant:"body2",color:"text.secondary",sx:{mt:1},children:(0,S.jsx)("strong",{children:"You can close this page."})})]})]}),"awaiting_activation"===se&&(0,S.jsx)(h.A,{variant:"outlined",onClick:he,disabled:K||!M,children:K?"Checking\u2026":"Check now"}),"key_issued"===se&&(0,S.jsx)(h.A,{variant:"contained",size:"large",onClick:pe,disabled:K||!M,children:K?"Starting\u2026":"Start checking"}),"timed_out"===se&&(0,S.jsx)(h.A,{variant:"contained",size:"large",onClick:pe,disabled:K||!M,children:K?"Starting\u2026":"Try again"})]}),re&&(0,S.jsxs)(i.A,{children:[(0,S.jsxs)(i.A,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:3},children:[(0,S.jsx)(i.A,{children:(0,S.jsxs)(l.A,{variant:"body2",color:"text.secondary",children:[(null===C||void 0===C?void 0:C.practice_title)||t.name,null!==C&&void 0!==C&&C.customer_key_last4?" \xb7 key ending ".concat(C.customer_key_last4):""]})}),(0,S.jsx)(h.A,{size:"small",variant:"outlined",onClick:he,disabled:K,children:K?"Testing\u2026":"Test"})]}),(null===C||void 0===C?void 0:C.last_error)&&(0,S.jsx)(u.A,{severity:"warning",sx:{mb:3},children:C.last_error}),(0,S.jsx)(T,{}),(0,S.jsxs)(y.A,{fullWidth:!0,sx:{mb:1},disabled:K||0===W.length,children:[(0,S.jsx)(m.A,{id:"opendental-folder-label",children:"File into"}),(0,S.jsx)(x.A,{labelId:"opendental-folder-label",label:"File into",value:W.length?String(null!==(e=null===C||void 0===C?void 0:C.doc_category)&&void 0!==e?e:""):"",onChange:e=>{const t=Number(e.target.value),n=W.find(e=>e.def_num===t);ye({doc_category:t,doc_category_name:(null===n||void 0===n?void 0:n.name)||""})},children:W.map(e=>(0,S.jsx)(g.A,{value:String(e.def_num),children:e.name},e.def_num))})]}),(0,S.jsx)(l.A,{variant:"caption",color:"text.secondary",children:W.length?"Which folder in the patient's chart completed forms land in.":"Couldn't load your chart folders \u2014 forms will use your Open Dental default."}),(0,S.jsx)(p.A,{sx:{my:3}}),(0,S.jsx)(v.A,{control:(0,S.jsx)(f.A,{checked:Boolean(null===C||void 0===C?void 0:C.auto_file),disabled:K,onChange:e=>{ye({auto_file:e.target.checked})}}),label:"File automatically"}),(0,S.jsx)(l.A,{variant:"caption",color:"text.secondary",display:"block",children:"When off, every form waits for someone to confirm the patient match before anything is written to a chart. Forms that match more than one patient always wait, either way."}),(0,S.jsx)(p.A,{sx:{my:3}}),(0,S.jsx)(v.A,{control:(0,S.jsx)(f.A,{checked:Boolean(null===C||void 0===C?void 0:C.reports_enabled),disabled:K,onChange:e=>{ye({reports_enabled:e.target.checked})}}),label:"Reports"}),(0,S.jsx)(l.A,{variant:"caption",color:"text.secondary",display:"block",children:"Adds a Reports tab reading your production, collections, claims and balances straight out of Open Dental. Turn it on only once those figures have been checked against your own Open Dental reports \u2014 every tile claims to match one to the dollar. Reload the page after changing this."})]}),(0,S.jsx)(p.A,{sx:{my:3}}),(0,S.jsx)(h.A,{size:"small",endIcon:(0,S.jsx)(k.A,{}),href:"https://www.opendental.com/site/apisetup.html",target:"_blank",rel:"noopener noreferrer",children:"Open Dental API documentation"})]})})}}
1,76690(e,t,n){n.d(t,{CH:()=>s,GR:()=>m,Hf:()=>c,Js:()=>p,P6:()=>d,Pn:()=>u,Rq:()=>i,T:()=>h,Yf:()=>y,fM:()=>r,id:()=>l,sm:()=>x,ue:()=>o});var a=n(21569);const o=e=>{switch(e){case"medical.allergies":return"allergydefs";case"medical.conditions":return"diseasedefs";case"medical.medications":return"medications";default:return null}},i=e=>{switch(e.action){case"set":return e.doImport?{label:"Set",tone:"go",needsYou:!1}:{label:"Differs",tone:"look",needsYou:!0};case"add":return{label:"Add",tone:"go",needsYou:!1};case"pick":return{label:"Pick one",tone:"look",needsYou:!0};case"conflict":return{label:"Two answers",tone:"look",needsYou:!0};case"invalid":return{label:"Not accepted",tone:"look",needsYou:!0};case"manual":return{label:"Shown only",tone:"none",needsYou:!1};case"skip":return{label:"Not imported",tone:"none",needsYou:!1};default:return{label:"Matches",tone:"none",needsYou:!1}}},s=e=>e?e.text?e.text:e.items&&e.items.length>0?e.items.join("; "):"boolean"===typeof e.bool?e.bool?"Yes":"No":e.date?e.date.slice(0,10):"":"",r=a.q.injectEndpoints({endpoints:e=>({listOpenDentalImports:e.query({query:e=>({url:"/assistant/opendental/imports",params:e&&e.status?{status:e.status}:void 0}),keepUnusedDataFor:900}),getOpenDentalImport:e.query({query:e=>({url:"/assistant/opendental/imports/".concat(e)})}),prepareOpenDentalImport:e.mutation({query:e=>({url:"/assistant/opendental/imports/".concat(e,"/prepare"),method:"POST"})}),selectOpenDentalImportPatient:e.mutation({query:e=>{let t=e.responseId,n=e.patientRef;return{url:"/assistant/opendental/imports/".concat(t,"/patient"),method:"POST",body:{patientRef:n}}}}),refreshOpenDentalImport:e.mutation({query:e=>({url:"/assistant/opendental/imports/".concat(e,"/refresh"),method:"POST"})}),setOpenDentalImportRows:e.mutation({query:e=>{let t=e.responseId,n=e.rows;return{url:"/assistant/opendental/imports/".concat(t,"/rows"),method:"PUT",body:{rows:n}}}}),searchOpenDentalMasterList:e.query({query:e=>({url:"/assistant/opendental/imports/master-lists",params:{kind:e.kind,q:e.q}})}),applyOpenDentalImport:e.mutation({query:e=>{let t=e.responseId,n=e.confirmIdentity;return{url:"/assistant/opendental/imports/".concat(t,"/apply"),method:"POST",body:{confirmIdentity:!0===n}}}}),dismissOpenDentalImport:e.mutation({query:e=>{let t=e.responseId,n=e.reason;return{url:"/assistant/opendental/imports/".concat(t,"/dismiss"),method:"POST",body:{reason:n||""}}}})}),overrideExisting:!1}),l=r.useListOpenDentalImportsQuery,d=r.useGetOpenDentalImportQuery,c=r.usePrepareOpenDentalImportMutation,u=r.useSelectOpenDentalImportPatientMutation,p=r.useRefreshOpenDentalImportMutation,h=r.useSetOpenDentalImportRowsMutation,y=r.useLazySearchOpenDentalMasterListQuery,m=r.useApplyOpenDentalImportMutation,x=r.useDismissOpenDentalImportMutation}}]);

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.