1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,805220,e=>{"use strict";e.i(836051);var r=e.i(361731),t=e.i(165456);let i=new Set(["primary","secondary"]);function n(e,r={}){let t=String(r?.coverageRole??e?.coverageRole??"primary").trim().toLowerCase();return i.has(t)?t:null}function a(e={}){return"function"==typeof e?.transport?e.transport:fetch}async function o(e,t,i={}){try{let n=new URLSearchParams(t?{practiceId:t}:{}),o=await a(i)(`/api/v1/practice/patients/${encodeURIComponent(String(e))}/demographics?${n}`,{method:"GET",headers:{...(0,r.adminHeaders)()},credentials:"include",cache:"no-store",signal:AbortSignal.timeout(15e3)}),s=await o.json();if(!o.ok||s?.ok!==!0)return{ok:!1,error:s?.error||"The current patient ID could not be loaded."};if(!1===s.supported)return{ok:!0,supported:!1};if(!0!==s.supported||"string"!=typeof s.patientMemberPolicy||"string"!=typeof s.patientMemberId||!s.patient?.firstName||!s.patient?.lastName||!s.patient?.dateOfBirth)return{ok:!1,error:"The current patient identity was incomplete. Refresh this patient."};return s}catch{return{ok:!1,error:"The current patient ID could not be loaded. Please retry."}}}function s(e,r=null){return e?.ok?{...e,pmsWrite:r,pmsWriteVerified:!1,overrideSaved:!0}:e}let c={writeback_unsupported:"Saved in Verora. The PMS does not support this update from here â it will not sync automatically.",writeback_failed:"Saved in Verora only â the PMS write failed. This correction has NOT reached the PMS.",missing_write_readback:"Saved in Verora. The PMS accepted the request but did not confirm the write."};function d(e){if(!e||!0!==e.ok)return e;if(!0===e.pmsWriteVerified)return{...e,message:e.message||"Saved and confirmed in the PMS."};let r=e.pmsWrite?.reason,t=e.message||c[r]||(e.overrideSaved?"Saved in Verora only â this correction has not been confirmed in the PMS.":"Saved.");return{...e,message:t}}function l(e){if(!e||"object"!=typeof e)return!1;let r=e.insuranceName??e.insurance_name??void 0,t=e.payerId??e.payer_id??void 0,i="insuranceName"in e||"insurance_name"in e,n="payerId"in e||"payer_id"in e;return!!i&&void 0!==r||!!n&&void 0!==t}function u(e){return!!e&&"object"==typeof e&&!!("groupNumber"in e||"group_number"in e)&&(e.groupNumber??e.group_number)!==void 0}function _(e){return!!e&&"object"==typeof e&&(!0===e._identityFieldsChanged||!1!==e._identityFieldsChanged)}async function p(e,t,i,n,a){let o=await a(`/api/v1/practice/patients/${encodeURIComponent(e)}/demographics`,{method:"PATCH",headers:{"content-type":"application/json",...(0,r.adminHeaders)()},body:JSON.stringify(f(t,i,n))});if(!o.ok){let e=await o.json().catch(()=>({}));return{ok:!1,code:e?.code,error:e?.error||`Saving carrier/payer correction failed (HTTP ${o.status})`}}return s({...await o.json(),ok:!0})}function f(e,r,t){let i={practiceId:r,coverageRole:t},n=e?._demographicOverrideVersion??e?.demographicOverrideVersion;Number.isInteger(n)&&n>0&&(i.expectedVersion=n);let a="insuranceName"in(e||{})||"insurance_name"in(e||{}),o="payerId"in(e||{})||"payer_id"in(e||{});if(a){let r=e?.insuranceName??e?.insurance_name;i.insuranceName=null==r?"":String(r)}if(o){let r=e?.payerId??e?.payer_id;i.payerId=null==r?"":String(r)}return i}async function m(e,t,i,n,a){let o=await a(`/api/v1/practice/patients/${encodeURIComponent(e)}/demographics`,{method:"PATCH",headers:{"content-type":"application/json",...(0,r.adminHeaders)()},body:JSON.stringify(function(e,r,t){let i=f(e,r,t);for(let r of["memberId","groupNumber","dateOfBirth","firstName","lastName"])e&&r in e&&null!=e[r]&&(i[r]=String(e[r]));if("secondary"===t){for(let r of["relationship","subscriberFirstName","subscriberLastName","subscriberDob","subscriberGender"])e&&r in e&&null!=e[r]&&(i[r]=String(e[r]));e&&Object.prototype.hasOwnProperty.call(e,"subscriberDateOfBirth")&&null!=e.subscriberDateOfBirth&&(i.subscriberDob=String(e.subscriberDateOfBirth)),e&&Object.prototype.hasOwnProperty.call(e,"isDependent")&&(i.isDependent=!0===e.isDependent)}let n=e?.nexhealthPatientId??e?.nexhealth_patient_id;return null!=n&&(i.nexhealthPatientId=n),i}(t,i,n))});if(!o.ok){let e=await o.json().catch(()=>({}));
1return{ok:!1,code:e?.code,error:e?.error||`Saving the correction failed (HTTP ${o.status})`}}return s({...await o.json(),ok:!0})}async function h(e,i,o,c={}){if(!e)return{ok:!1,error:"Missing patientId"};let f=String(e),y=n(i,c),b=a(c);if(!y)return{ok:!1,error:"coverageRole must be primary or secondary"};if(Object.prototype.hasOwnProperty.call(i||{},"patientMemberId")){let e=new Set(["patientMemberId","patientMemberSource","patientMemberConfirmed","expectedPatientMemberId","patientMemberPolicy","_demographicOverrideVersion"]);if(Object.keys(i).some(r=>!e.has(r)))return{ok:!1,error:"Save the patient's separate member ID on its own."};try{let e=await b(`/api/v1/practice/patients/${encodeURIComponent(f)}/demographics`,{method:"PATCH",headers:{"content-type":"application/json",...(0,r.adminHeaders)()},body:JSON.stringify({...i,practiceId:o,coverageRole:y,...i._demographicOverrideVersion?{expectedVersion:i._demographicOverrideVersion}:{}})}),t=await e.json();if(!e.ok||t?.action!=="set"||!Number.isInteger(t.version)||t.version<1)return{ok:!1,error:t?.error||"Patient ID save was not confirmed."};return s({ok:!0,version:t.version,message:"Patient ID saved in Sally. The subscriber ID in your practice software stays the same."})}catch(e){return{ok:!1,error:e?.message||"Patient ID save failed."}}}let g=String(c?.coverageId??i?.coverageId??i?.insuranceCoverageId??i?.coverage_id??"").trim();if("secondary"===y&&!g)try{return d(await m(f,i,o,y,b))}catch(e){return t.default.warn("[patientFix] secondary override failed",{message:e?.message}),{ok:!1,error:e?.message||"Secondary insurance correction failed."}}if(l(i)&&!u(i)&&!_(i))try{return d(await p(f,i,o,y,b))}catch(e){return t.default.warn("[patientFix] carrier-only override failed",{message:e?.message}),{ok:!1,error:e?.message||"Carrier/payer durable correction failed."}}try{let e=await b(`/api/v1/pms/writeback/${encodeURIComponent(f)}`,{method:"PATCH",headers:{"content-type":"application/json",...(0,r.adminHeaders)()},body:JSON.stringify({...i,...g?{coverageId:g}:{},coverageRole:y,practice_id:o})});if(501===e.status)return d(s(await m(f,i,o,y,b),{supported:!1,writeVerified:!1,reason:"writeback_unsupported"}));if(!e.ok){let r=await e.json().catch(()=>({}));if(["patient_member_policy_collision","patient_member_identity_unavailable"].includes(r?.code))return{ok:!1,code:r.code,error:r.error};let n=r?.pmsWrite?.reconciliationRequired===!0||r?.reconciliationRequired===!0;try{let e=await m(f,i,o,y,b);if(["patient_member_policy_collision","patient_member_identity_unavailable"].includes(e.code))return e;if(e.ok){if(n)return{ok:!1,reconciliationRequired:!0,retryable:!1,error:r?.error||"PMS update could not be verified. Support reconciliation is required before retrying."};return d(s(e,r?.pmsWrite||{supported:!1,writeVerified:!1,reason:"writeback_failed"}))}}catch(e){t.default.warn("[patientFix] override rescue after writeback failure failed",{message:e?.message})}return{ok:!1,error:r?.error||`PMS writeback failed (HTTP ${e.status})`}}let n=await e.json().catch(()=>({})),a=n?.pmsWrite&&"object"==typeof n.pmsWrite?n.pmsWrite:null,c=a?.writeVerified===!0;if(!c&&_(i))try{let e=await m(f,i,o,y,b);if(!e.ok)return e;return d(s(e,a||{supported:!1,writeVerified:!1,reason:"missing_write_readback"}))}catch(e){return t.default.warn("[patientFix] durable override after partial PMS writeback failed",{message:e?.message}),{ok:!1,error:"Durable correction after PMS writeback failed."}}let h=!1,C={};if(l(i)||u(i))try{let e=u(i)?await m(f,i,o,y,b):await p(f,i,o,y,b);if(!e.ok)return e;h=!0,C=e}catch(e){return t.default.warn("[patientFix] durable insurance override after pms writeback failed",{message:e?.message}),{ok:!1,error:"Insurance correction durable write failed."}}return d({...C,ok:!0,pmsWrite:a,pmsWriteVerified:c,overrideSaved:h,message:C.message||(c?n?.message:void 0)})}catch(e){return t.default.warn("[patientFix] saveDemographicCorrection error",{message:e?.message}),{ok:!1,error:e?.message||"Saving the correction failed."}}}async function y(e,i,n,o={}){if(!e)return{ok:!1,error:"Missing patientId"};if("boolean"!=typeof i?.isDependent)return{ok:!1,error:"Confirm whether the patient is the policyholder or a dependent before saving subscriber information."};let s=String(e),c=a(o);
1try{let e={isDependent:i?.isDependent===!0,subscriberFirstName:i?.subscriberFirstName??i?.subscriber_first_name??"",subscriberLastName:i?.subscriberLastName??i?.subscriber_last_name??"",subscriberDob:i?.subscriberDob??i?.subscriber_dob??i?.subscriberDateOfBirth??"",subscriberMemberId:i?.subscriberMemberId??i?.subscriber_member_id??"",practiceId:n},t=await c(`/api/v1/practice/patients/${encodeURIComponent(s)}/subscriber`,{method:"PATCH",headers:{"content-type":"application/json",...(0,r.adminHeaders)()},body:JSON.stringify(e)});if(!t.ok){let e=await t.json().catch(()=>({}));return{ok:!1,error:e?.error||`Subscriber save failed (HTTP ${t.status})`}}return{ok:!0}}catch(e){return t.default.warn("[patientFix] saveSubscriberCorrection error",{message:e?.message}),{ok:!1,error:e?.message||"Dependent/subscriber save failed."}}}async function b(e,i=[],o=null,s={}){let c=s?.externalApptId!=null&&""!==String(s.externalApptId).trim()?String(s.externalApptId).trim():"",d=null!=e&&""!==String(e).trim()?String(e).trim():c;if(!d)return{ok:!1,error:"Missing patient identity (no PMS id or appointment id)"};let l=a(s);try{let e=await l(`/api/v1/practice/patients/${encodeURIComponent(d)}/reverify`,{method:"POST",headers:{"content-type":"application/json",...(0,r.adminHeaders)()},body:JSON.stringify({practiceId:o,coverageRole:n(null,s)||"primary",editedFields:Array.isArray(i)?i:Object.keys(i||{}),...c?{externalApptId:c}:{},...s?.operatorOverride?.actor&&s?.operatorOverride?.reason?{operatorOverride:{actor:String(s.operatorOverride.actor),reason:String(s.operatorOverride.reason)}}:{}})}),t=await e.json().catch(()=>({})),a="boolean"==typeof t?.capReset?t.capReset:void 0,u="boolean"==typeof t?.coveragePreserved?t.coveragePreserved:void 0;if(!e.ok||t?.ok===!1)return{ok:!1,error:t?.error||`Re-verify failed (HTTP ${e.status})`,blocked:t?.blocked??null,capReset:a,coveragePreserved:u,...t?.capResetError?{capResetError:String(t.capResetError)}:{}};return{ok:!0,capReset:a,coveragePreserved:u,...t?.capResetError?{capResetError:String(t.capResetError)}:{},blocked:null}}catch(e){return t.default.warn("[patientFix] reverifyAfterFix error",{message:e?.message}),{ok:!1,error:e?.message||"Re-verify failed."}}}e.s(["loadPatientMemberIdentity",0,o,"reverifyAfterFix",0,b,"saveDemographicCorrection",0,h,"saveSubscriberCorrection",0,y])},572294,e=>{"use strict";var r=e.i(2250),t=e.i(1448);let i=Object.freeze({ACTIVE:"active",CHECK_CARD:"check_card",SELF_PAY:"self_pay",INACTIVE:"inactive",FIX_CHART:"fix_chart",ENROLL_OFFICE:"enroll_office",VA:"va",PARTIAL_RESPONSE:"partial_response",WAITING:"waiting",CALL_INSURANCE:"call_insurance"}),n=Object.freeze({[i.ACTIVE]:"Active",[i.CHECK_CARD]:"Check card",[i.SELF_PAY]:"Self pay",[i.INACTIVE]:"Inactive",[i.FIX_CHART]:"Fix chart",[i.ENROLL_OFFICE]:"Enroll office",[i.VA]:"VA",[i.PARTIAL_RESPONSE]:"Partial Response",[i.WAITING]:"Waiting",[i.CALL_INSURANCE]:"Call insurance"});Object.freeze(Object.values(n));let a=Object.freeze({incomplete:"No confirmed verification result is available.",insurance_unconfirmed:"Insurance information is unconfirmed. Check the card or source record.",clearinghouse_error:"The last insurance request could not be completed.",request_invalid:"Our eligibility request did not meet the payer network's request requirements, so no coverage answer was obtained. Contact Verora support to correct the request before trying again.",cap_backend_unavailable:"Verification was held because a Verora system was unavailable.",payer_offline:"The insurance system did not answer the last check.",pms_lookup_failed:"Insurance information could not be loaded from your practice system.",review:"Verification needs review. Open the patient for details."}),o="We couldnât confirm this plan. Review the available insurance information.",s=Object.freeze({membership_plan:{key:i.ACTIVE,reason:"In-house membership plan â charge per practice agreement."},pms_benefits:{key:i.PARTIAL_RESPONSE,reason:"Coverage is from your PMS, not a live insurance check."},pms_lookup_failed:{key:i.WAITING,reason:a.pms_lookup_failed},claim_accepted:{key:i.ACTIVE,reason:"Claim accepted by payer."},claim_rejected:{key:i.CALL_INSURANCE,reason:"Claim rejected. Review with the payer."}
1,claim_denied:{key:i.CALL_INSURANCE,reason:"Claim denied. Appeal may be required."},claim_pending:{key:i.WAITING,reason:"Claim is being processed."},auth_approved:{key:i.ACTIVE,reason:"Pre-authorization approved."},auth_denied:{key:i.CALL_INSURANCE,reason:"Pre-authorization denied."},auth_partial:{key:i.PARTIAL_RESPONSE,reason:"Pre-authorization was only partly approved."},auth_review:{key:i.WAITING,reason:"Pre-authorization is under review."},ocr_low_confidence:{key:i.FIX_CHART,reason:"Check the card, re-verify."},needs_review:{key:i.CALL_INSURANCE,reason:o}}),c=new Set(["15","56","57","58","60","62","63","64","65","66","67","71","72","73","74","75","76","77","78","79"]),d=new Set(["33","43","47","48","49","51","52"]),l=new Set(["42","80"]),u=new Set(["41"]),_=new Set(["stedi_cap_exceeded"]),p=new Set(["aaa_unrescued_33","aaa_unrescued_43","aaa_unrescued_47","aaa_unrescued_48","aaa_unrescued_49","aaa_unrescued_51","aaa_unrescued_52","provider_config","provider_config_blocked","provider_config_error","auth_error"]),f=new Set(["aaa_unrescued_15","aaa_unrescued_56","aaa_unrescued_57","aaa_unrescued_58","aaa_unrescued_60","aaa_unrescued_62","aaa_unrescued_63","aaa_unrescued_64","aaa_unrescued_65","aaa_unrescued_66","aaa_unrescued_67","aaa_unrescued_71","aaa_unrescued_72","aaa_unrescued_73","aaa_unrescued_74","aaa_unrescued_75","aaa_unrescued_76","aaa_unrescued_77","aaa_unrescued_78","aaa_unrescued_79","missing_member_id","missing_dob","missing_name","missing_payer_id","missing_subscriber_info","missing_subscriber_for_dependent","identity_mismatch","member_not_found","invalid_dob","enter_payer_id","confirm_payer","confirm_member_id","required_data_missing","missing_group_number","incomplete_insurance","subscriber_identity_missing"]),m=new Set(["payer_not_eligible","payer_not_eligibility_capable","payer_no_eligibility","payer_not_supported_edi","portal_only_payer","payer_not_dental_capable","aaa_unrescued_41","payer_cannot_process","no_coverage_returned"]),h=new Set(["payer_not_dental_capable","payer_id_not_in_catalog","payer_resolution_failed","payer_resolution_low_confidence","payer_unmapped"]),y=Object.freeze({dirty_carrier:"Confirm whether this is an insurance plan or a discount product.",invalid_data:"The submitted details did not pass validation. Confirm them against the card.",no_insurance:"Insurance information is unconfirmed. Confirm coverage before collecting as self-pay.",confirm_coverage:"Insurance records disagree. Confirm coverage against the card or source record.",stedi_empty_271:"The insurance response did not include usable coverage. Confirm the plan directly.",circuit_breaker_exhausted:"We couldnât confirm this plan with the available information.",subscriber_identity_conflict:"Confirm the policyholder and patient relationship in the source record."}),b=new Set(["request_invalid","payer_offline","stedi_payer_offline","clearinghouse_payer_offline","payer_persistent_aaa42","clearinghouse_error","cap_backend_unavailable","payer_timeout","carrier_timeout","carrier_down","carrier_unreachable","aaa_unrescued_42","aaa_unrescued_80"]),g=new Set(["rescue_exhausted","manual_review_required","manual_review_unspecified"]),C=new Set(["no_carrier_answer","derived_status_only","identity_rejection_pending","contradicted_by_coverage_evidence"]),v=new Set(["active","active_secondary","active_with_warning"]),A=new Set(["awaiting_verification","payer_offline","retrying","in_progress"]),I=Object.freeze({15:"Add the group number.",41:"This plan isnât supported by our electronic eligibility connection. Confirm benefits directly.",42:a.payer_offline,43:"This office isnât enrolled with that insurance. Manual enrollment required.",47:"Office setup with this insurance is incomplete.",48:"Office setup with this insurance is incomplete.",49:"Office setup with this insurance is incomplete.",51:"This office isnât enrolled with that insurance. Manual enrollment required.",52:"Enrollment doesnât cover this visit date.",56:"The date doesnât work. Check birthday and visit date.",57:"The date doesnât work. Check birthday and visit date.",58:"Fix the date of birth.",60:"The date doesnât work. Check birthday and visit date.",62:"The date doesnât work. Check birthday and visit date.",63:"The date doesnât work. Check birthday and visit date.",64:"Patient ID is wrong.",65:"Name is wrong.",66:"Gender is wrong.",67:"Patient not found.",71:"Birthday doesnât match.",72:"Member ID doesnât match.",73:"Name doesnât match.",74:"Subscriber gender is wrong.",75:"Subscriber not found.",76:"This ID is used on more than one person.",77:"Subscriber found. This patient wasnât.",78:"Person found. Not on this group plan.",79:"This member ID isnât valid.",80:a.payer_offline,33:"This office isnât enrolled with that insurance. Manual enrollment required."}),S=Object.freeze({missing_member_id:"Add the member ID.",missing_payer_id:"Add the insurance ID.",enter_payer_id:"Add the insurance ID.",confirm_payer:"Add the insurance ID.",missing_group_number:"Add the group number.",required_data_missing:"Complete the required insurance details.",missing_name:"Add the patientâs name.",missing_subscriber_info:"Add the policyholderâs name and date of birth.",missing_subscriber_for_dependent:"Add the policyholderâs name and date of birth.",subscriber_identity_missing:"Confirm the policyholderâs identity and complete their name and date of birth.",missing_dob:"Fix the date of birth.",invalid_dob:"Fix the date of birth.",confirm_coverage:"Check the card, re-verify.",stedi_empty_271:"Check the card, re-verify.",circuit_breaker_exhausted:"Check the card, re-verify.",incomplete_insurance:"Insurance information is incomplete. Confirm the missing details.",payer_not_dental_capable:"We couldnât route this plan for an online check.",payer_not_eligible:"This plan isnât supported by our electronic eligibility connection. Confirm benefits directly.",payer_not_eligibility_capable:"This plan isnât supported by our electronic eligibility connection. Confirm benefits directly.",payer_no_eligibility:"This plan isnât supported by our electronic eligibility connection. Confirm benefits directly.",payer_not_supported_edi:"This plan isnât supported by our electronic eligibility connection. Confirm benefits directly.",portal_only_payer:"This plan isnât supported by our electronic eligibility connection. Confirm benefits directly.",aaa_unrescued_41:"This plan isnât supported by our electronic eligibility connection. Confirm benefits directly.",payer_cannot_process:"They didnât send usable benefits.",no_coverage_returned:"They didnât send usable benefits.",provider_config_blocked:"Awaiting enrollment.",provider_config:"Awaiting enrollment.",provider_config_error:"Awaiting enrollment."});function w(e){return String(e||"").trim().toLowerCase()}function T(e,r){return"string"==typeof e?._failCategory&&e._failCategory.trim()?e._failCategory.trim():"string"==typeof r?.reasonCode&&r.reasonCode.trim()?r.reasonCode.trim():N(e).find(e=>f.has(e))||""}function N(e){return Array.isArray(e?.action_flags)?e.action_flags:[]}
1function k(e){return(0,r.extractAaaCodes)(e)}function E(e,r){return k(e).some(e=>r.has(String(e)))}function P(e,r){return k(e).map(String).find(e=>r.has(e))||""}function R(e,r,t,i){return"request_invalid"===t?a.request_invalid:"cap_backend_unavailable"===t?a.cap_backend_unavailable:"clearinghouse_error"===t?a.clearinghouse_error:E(e,l)||b.has(t)||"payer_offline"===i?a.payer_offline:a.incomplete}function O(e,r){return{key:e,label:n[e],reasonLine:String(r||n[e]).trim()}}let L=Object.freeze([{key:i.ACTIVE,label:n[i.ACTIVE],means:"The insurance company confirmed this plan is on.",does:"Treat."},{key:i.CHECK_CARD,label:n[i.CHECK_CARD],means:"The plan is on. Something they sent back does not match the chart.",does:"Treat, then match the card."},{key:i.SELF_PAY,label:n[i.SELF_PAY],means:"There is no insurance on file.",does:"Collect cash unless they bring a card."},{key:i.INACTIVE,label:n[i.INACTIVE],means:"The insurance company said this plan is not on.",does:"Ask for a new card."},{key:i.FIX_CHART,label:n[i.FIX_CHART],means:"Something on the chart is missing, or they rejected it.",does:"Fix the named field, then re-verify."},{key:i.ENROLL_OFFICE,label:n[i.ENROLL_OFFICE],means:"This office is not set up with that insurance company.",does:"Do not change the patientâs chart."},{key:i.VA,label:n[i.VA],means:"This is VA Community Care. We do not run an online insurance check.",does:"No online check."},{key:i.PARTIAL_RESPONSE,label:n[i.PARTIAL_RESPONSE],means:"They answered, but they did not say the plan is on or dead.",does:"Do not collect as self-pay. Do not treat as verified."},{key:i.WAITING,label:n[i.WAITING],means:"A confirmed verification result is not available. See the reason for the current hold.",does:"Do not rewrite the chart."},{key:i.CALL_INSURANCE,label:n[i.CALL_INSURANCE],means:"The plan or insurance information needs direct confirmation.",does:"Last resort."}]);e.s(["STATUS_CHIP_FAMILY",0,i,"STATUS_CHIP_LABEL",0,n,"STATUS_CHIP_LEGEND",0,L,"VERIFICATION_WAIT_REASON",0,a,"applyStatusChipFamily",0,function(e,{result:n,latestAttempt:k}={}){if(!e||"object"!=typeof e)return e;let L=function(e,t){let i=e&&"object"==typeof e?e:null,n=t&&"object"==typeof t?t:null;if(!n)return i;let a=(0,r.extractAaaCodes)(i),o=(0,r.extractAaaCodes)(n),s=function(e,r){if(!e)return!1;let t=e=>{let r=null==e?NaN:new Date(e).getTime();return Number.isFinite(r)?r:null},i=t(r?.finishedAt)??t(r?.createdAt);if(null==i)return!1;let n=t(e?.verifiedAt)??t(e?._responseTimestamp)??t(e?._normalized_at);return null!=n&&i<n}(i,n),c=a.length>0?a:s?[]:o,d={...i||{}};return d._chipEvidenceAaaSource=a.length>0?"result":c.length>0?"attempt":"none",d._failCategory||"string"!=typeof n.failCategory||(d._failCategory=n.failCategory),d._capPriorFailCategory||"string"!=typeof n._capPriorFailCategory||(d._capPriorFailCategory=n._capPriorFailCategory),c.length>0&&0===(0,r.extractAaaCodes)(d).length&&(d._capPriorAaaCodes=c),n._stediCapResetAt&&!d._stediCapResetAt&&(d._stediCapResetAt=n._stediCapResetAt),Object.keys(d).length>0?d:i}(n,k),D=function(e,t){let n=String(e?.displayStatus||""),_=String(e?.label||"").trim(),k=T(t,e);if(e?.reasonCode==="insurance_unconfirmed")return O(i.WAITING,a.insurance_unconfirmed);if(e?.reasonCode==="member_id_missing")return O(i.FIX_CHART,S.missing_member_id);if(e?.reasonCode==="subscriber_identity_conflict"||e?.reasonCode==="confirm_coverage"||e?.reasonCode==="no_insurance")return O(i.CALL_INSURANCE,y[e.reasonCode]);if(e?.reasonCode==="subscriber_identity_missing")return O(i.FIX_CHART,S.subscriber_identity_missing);let L=s[n];if(L)return O(L.key,L.reason);if("self_pay"===n||"self pay"===w(_)||"self-pay"===w(_))return O(i.SELF_PAY,"No insurance on file.");if("va_ccn"===n||/^va\b/i.test(_)||/community care/i.test(_))return O(i.VA,"VA plan. No online check.");let D=v.has(n)||"verified"===w(_)||"active"===w(_)||"active (secondary)"===w(_)||/^verified/i.test(_);if(D&&t?._dependentIdentityProof?.confirmed===!1&&["dependent_loop_missing_or_ambiguous","dependent_identity_incomplete"].includes(t._dependentIdentityProof.reason))return O(i.CALL_INSURANCE,"The plan may be active, but the payer did not confirm this patient.");if(D&&["dependent_name_mismatch","dependent_dob_mismatch"].includes(t?._dependentIdentityProof?.reason)){let e=t._dependentIdentityProof;return Number(e.assessmentVersion)>=2&&!0===e.replayable?"dependent_name_mismatch"===e.reason?O(i.CHECK_CARD,"Plan is active. The payer's patient name doesn't match."):O(i.CHECK_CARD,"Plan is active. The payer's patient birthday doesn't match."):O(i.CHECK_CARD,"Plan is active, but this patient was not confirmed. Recheck the card or payer.")}if(D&&(t?._identityNotice?.severity==="attention"||N(t).includes("identity_attention")))return O(i.CHECK_CARD,function(e){let r=Array.isArray(e?._identityNotice?.notices)?e._identityNotice.notices:[],t=new Set;for(let e of r){let r=w(e?.field);"first_name"===r||"last_name"===r||"name"===r?t.add("name"):"dob"===r||"b
1irthday"===r||"date_of_birth"===r?t.add("birthday"):"gender"===r&&t.add("gender")}return t.size>1?"Plan is active. The card doesnât match the chart.":t.has("name")?"Plan is active. Name doesnât match.":t.has("birthday")?"Plan is active. Birthday doesnât match.":t.has("gender")?"Plan is active. Gender doesnât match.":"Plan is active. The card doesnât match the chart."}(t));if(D&&("update_chart"===String(e?.reasonCode||"")||Array.isArray(t?.action_flags)&&t.action_flags.includes("update_chart")))return O(i.ACTIVE,"Fix chart.");if(D){let r="active_with_warning"===n||/some details are missing|limited benefit|didn't return/i.test(String(e?.tooltip||""));return O(i.ACTIVE,r?"Plan is active. Some details are missing.":"Plan is active.")}if("inactive"===n||"inactive"===w(_)||"inactive policy"===w(_))return O(i.INACTIVE,"This plan is not active. Ask for a new card.");if("partial_response"===n&&C.has(String(e?.reasonCode||""))||"partial_response"===n&&/did not confirm dental coverage/i.test(String(e?.tooltip||""))||"partial_response"===n&&!D)return O(i.PARTIAL_RESPONSE,"Carrier answered but did not confirm dental coverage either way.");if("patient_member_identity_changed"===k)return O(i.FIX_CHART,"Confirm the patientâs separate UPMC ID again in Edit patient & member info.");if("patient_member_identity_unavailable"===k)return O(i.WAITING,"We couldnât load the saved patient ID. Retry the check.");if(h.has(k))return O(i.CALL_INSURANCE,"We couldnât route this plan for an online check.");if(m.has(k))return O(i.CALL_INSURANCE,S[k]||"Confirm this plan directly with the insurance company.");if(y[k])return O(i.CALL_INSURANCE,y[k]);let F=E(t,c),j=E(t,d),V=E(t,l),M=E(t,u),x=(0,r.isVagueStatusTerminal)(k);if(!b.has(k)&&(F||f.has(k)||"error_demographics"===n||"identity_mismatch"===n)){let r;if(x&&V&&!F)return O(i.WAITING,R(t,e,k,n));if(x&&M&&!F)return O(i.CALL_INSURANCE,"This plan isnât supported by our electronic eligibility connection. Confirm benefits directly.");let a=(r=P(t,c))?I[r]:"",o=S[k];return O(i.FIX_CHART,a||o||"Add the missing insurance fields.")}if(j||p.has(k)){let r;return O(i.ENROLL_OFFICE,"52"===(r=P(t,d))||"aaa_unrescued_52"===k?"Enrollment doesnât cover this visit date.":"47"===r||"48"===r||"49"===r?"Office setup with this insurance is incomplete.":"provider_config_blocked"===k||"provider_config"===k||"provider_config_error"===k||N(t).includes("enrollment_pending")||/awaiting enrollment|enrollment pending|in progress/i.test(String(e?.label||""))?"Awaiting enrollment.":S[k]||I[r]||"This office isnât enrolled with that insurance. Manual enrollment required.")}return M||m.has(k)?O(i.CALL_INSURANCE,S[k]||"This plan isnât supported by our electronic eligibility connection. Confirm benefits directly."):!x||F||j?g.has(k)?O(i.CALL_INSURANCE,o):b.has(k)||V||A.has(n)?O(i.WAITING,R(t,e,k,n)):/didnât send usable benefits|no coverage returned|payer cannot process/i.test(_+String(e?.tooltip||""))?O(i.CALL_INSURANCE,"They didnât send usable benefits."):e?.actionRequired===!0?O(i.WAITING,a.review):O(i.WAITING,R(t,e,k,n)):V?O(i.WAITING,R(t,e,k,n)):O(i.CALL_INSURANCE,o)}
1(e,L),F={...e,family:D.key,familyLabel:D.label,reasonLine:function(e,r,t){let i;if(i=T(r,t),!_.has(i)&&"verification paused"!==w(t?.label)&&1)return e;let n=function(e){let r="string"==typeof e?._stediCapResetAt?e._stediCapResetAt:"";if(!r)return"Paused until the pause lifts";let t=new Date(r);return Number.isNaN(t.getTime())?"Paused until the pause lifts":`Paused until ${t.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric",timeZone:"UTC"})}`}(r),a=String(e||"").trim();return a?RegExp(n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"i").test(a)?a:`${a.replace(/\.$/,"")}. ${n}`:n}(D.reasonLine,L,e)};if(D.key===i.WAITING&&(F.tooltip=F.reasonLine,delete F.pulse,/retrying|in progress/i.test(String(F.label||""))&&(F.label="Verification incomplete")),D.key===i.ACTIVE){let e=(0,t.verifyChannelFromResult)(L);e&&(F.verifyChannel=e,F.verifyChannelLabel=t.VERIFY_CHANNEL_LABEL[e])}return F}])},2250,e=>{"use strict";let r=Object.freeze(["stedi_cap_exceeded","rescue_exhausted","manual_review_required","manual_review_unspecified"]),t=Object.freeze({15:"Group Number Needed",42:"Payer Offline",51:"Office Not Enrolled With This Payer",58:"Date of Birth Missing On Request",71:"Date of Birth Doesn't Match This Payer",72:"Member ID Not Found",73:"Name Doesn't Match This Payer",75:"Subscriber Not Found",76:"Group Number Doesn't Match",77:"Patient Not On This Policy",80:"Payer Connection Issue"}),i=Object.freeze({aaa_unrescued_15:"Group Number Needed",aaa_unrescued_42:"Payer Offline",aaa_unrescued_51:"Office Not Enrolled With This Payer",aaa_unrescued_58:"Date of Birth Missing On Request",aaa_unrescued_71:"Date of Birth Doesn't Match This Payer",aaa_unrescued_72:"Member ID Not Found",aaa_unrescued_73:"Name Doesn't Match This Payer",aaa_unrescued_75:"Subscriber Not Found",aaa_unrescued_80:"Payer Connection Issue",missing_member_id:"Missing Member ID",member_not_found:"Member ID Not Found",missing_dob:"Check Date of Birth",missing_name:"Missing Patient Name",missing_payer_id:"Enter Payer ID",payer_id_not_in_catalog:"Enter Payer ID",payer_resolution_failed:"Enter Payer ID",payer_persistent_aaa42:"Payer Offline",payer_offline:"Payer Offline",stedi_payer_offline:"Payer Offline",clearinghouse_payer_offline:"Payer Offline"});function n(e){if(e&&"object"==typeof e)return n(e.code??e.aaaCode??e.AAA??"");let r=String(e??"").replace(/^AAA\*/i,"").trim();return r?r.replace(/\D/g,"")||r:""}function a(e,r){if(null==e)return;if(Array.isArray(e)){for(let t of e)a(t,r);return}if("object"==typeof e)return void a(e.code??e.aaaCode??e.AAA??null,r);let t=n(e);t&&r.add(t)}function o(e){let r=new Set;return e&&"object"==typeof e?(a(e._capPriorAaaCodes,r),a(e._stediRejectionErrors,r),a(e._payerRejectionErrors,r),a(e.aaaCodes,r),a(e.aaa,r),a(e.errors,r),[...r]):[]}function s({failCategory:e,aaaCodes:r}={}){for(let e of o({aaaCodes:r})){let r=t[n(e)];if(r)return r}let a=String(e??"").trim();return a&&Object.prototype.hasOwnProperty.call(i,a)?i[a]:null}function c(e,r){return s({failCategory:e?._capPriorFailCategory??null,aaaCodes:o(e)})||r}e.s(["extractAaaCodes",0,o,"extractCurrentAaaCodes",0,function(e){let r=new Set;return e&&"object"==typeof e?(a(e._stediRejectionErrors,r),a(e._payerRejectionErrors,r),a(e.aaaCodes,r),a(e.aaa,r),a(e.errors,r),[...r]):[]},"formatNeedsManualVerificationLabel",0,function(e){return c(e,"Needs Manual Verification")},"formatVerificationPausedLabel",0,function(e){return c(e,"Verification Paused")},"isVagueStatusTerminal",0,function(e){let t="string"==typeof e?e:String(e?._failCategory||"").trim();return r.includes(t)},"shortCapPriorCause",0,s])},1448,e=>{"use strict";let r=Object.freeze(["edi_271","verification_hunter"]),t=Object.freeze(["wire_replay","wiretap_271_reparse"]),i=Object.freeze(["payer_portal_live_extract"]),n=Object.freeze({PORTAL:"portal",EVERIFY:"everify"}),a=Object.freeze({[n.PORTAL]:"Portal",[n.EVERIFY]:"EVerified"}),o=/^portal$/i,s=/^e-?verif(?:y|ied)$/i,c=new Set(i),d=new Set([...r,"edi_271_alt",...t]),l=new Set(Object.freeze([...r,"edi_271_alt",...t,...i])),u=new Set(Object.freeze(["pms_stored","pms_coverage_design","practice_asserted","
1self_pay_bypass","staff_confirmed_membership","membership_plan_bypass","fax_retrieval","fax_ocr","sandbox_fixture","manual_override"]));e.s(["ACTIVE_271_WIRE_SOURCES",0,r,"PAYER_PORTAL_LIVE_WIRE_SOURCES",0,i,"STORED_271_REPLAY_WIRE_SOURCES",0,t,"VERIFY_CHANNEL_LABEL",0,a,"hasWireLineageSource",0,function(e){if(!e||"object"!=typeof e)return!1;let r=e._source,t="string"==typeof r?r.trim():"";return!!(""!==t&&l.has(t))||!(""!==t&&u.has(t))&&function(e){let r=e._benefitEvidence;if(!r||"object"!=typeof r)return!1;let t="string"==typeof r.source?r.source.trim().toLowerCase():"";if("wiretap"!==t&&"271"!==t)return!1;let i=String(e._ediSource??"").trim(),n=!0===e._raw271Available;if("raw_271_ediParser"!==i&&!n)return!1;let a=e._source,o="string"==typeof a?a.trim():"";return!(o&&u.has(o))}(e)},"verifyChannelDisplayLabel",0,function(e,r){let t="string"==typeof e?e.trim().toLowerCase():"";if(t===n.PORTAL)return a[n.PORTAL];if(t===n.EVERIFY)return a[n.EVERIFY];let i="string"==typeof r?r.trim():"";return i?o.test(i)?a[n.PORTAL]:s.test(i)?a[n.EVERIFY]:null:null},"verifyChannelFromResult",0,function(e){if(!e||"object"!=typeof e)return null;let r=e._source;if(null!=r&&"string"!=typeof r)return null;let t="string"==typeof r?r.trim():"";if(t&&u.has(t))return null;if(t&&c.has(t))return n.PORTAL;if(t&&d.has(t))return n.EVERIFY;let i=String(e._ediSource??"").trim();return t||"veraxus"!==i?t||"raw_271_ediParser"!==i?null:n.EVERIFY:n.PORTAL}])}]);
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.