PageSourceSearch

https://www.clarafi.ai/assets/admin-clearinghouse-credentials-C09YZyHI.js

js clarafi.ai collected 2026-10-05 14:49:01 UTC 6,868 bytes, 1 lines download raw bytes

1import{u as w,r as o,d as I,f as k,aw as D,e as P,j as e,z as W,S as L,I as u,ah as $,ai as E,aj as R,ak as H,al as S,E as m,B as M}from"./index-BR4A0sgq.js";import{W as T}from"./workplace-back-K_v07imS.js";import{C as q,b as B,c as V,d as A,a as F}from"./card-BQRAYPnC.js";import{S as z}from"./shield-alert-jaYUOt7x.js";import{S as K}from"./save-BjG12xoA.js";function J(){const{toast:h}=w(),[n,N]=o.useState(""),[x,c]=o.useState({}),{data:r=[],isLoading:p,error:t}=I({queryKey:["/api/admin/clearinghouse-credentials"]});o.useEffect(()=>{const a={};for(const s of r)a[s.id]={clearinghouseProvider:s.clearinghouseProvider??"",clearinghouseCustomerId:s.clearinghouseCustomerId??"",waystarSubmitterId:s.waystarSubmitterId??""};c(a)},[r]);const g=k({mutationFn:async({hsId:a,body:s})=>P("PATCH",`/api/admin/clearinghouse-credentials/${a}`,s),onSuccess:(a,s)=>{h({title:"Saved",description:`Updated clearinghouse credentials for HS ${s.hsId}.`}),D.invalidateQueries({queryKey:["/api/admin/clearinghouse-credentials"]})},onError:a=>{h({title:"Save failed",description:(a==null?void 0:a.message)??String(a),variant:"destructive"})}}),y=o.useMemo(()=>{const a=n.trim().toLowerCase();return a?r.filter(s=>{var l;return String(s.id).includes(a)||((l=s.name)==null?void 0:l.toLowerCase().includes(a))||(s.clearinghouseCustomerId??"").toLowerCase().includes(a)||(s.waystarSubmitterId??"").toLowerCase().includes(a)}):r},[r,n]),C=a=>{const s=x[a.id];return s?s.clearinghouseProvider!==(a.clearinghouseProvider??"")||s.clearinghouseCustomerId!==(a.clearinghouseCustomerId??"")||s.waystarSubmitterId!==(a.waystarSubmitterId??""):!1};return e.jsxs("div",{className:"container mx-auto py-6 space-y-4",children:[e.jsx("div",{className:"flex items-center gap-2",children:e.jsx(T,{fallbackHref:"/admin",fallbackLabel:"Admin",testId:"button-back"})}),e.jsxs(q,{children:[e.jsxs(B,{children:[e.jsxs(V,{className:"flex items-center gap-2",children:[e.jsx(W,{className:"h-5 w-5"})," Clearinghouse Credentials (per Health System)"]}),e.jsx(A,{children:"System-admin tool for entering the per-clinic Waystar Customer ID (CustID) and Submitter ID after Waystar emails them following SOF submission. These values are required before generating EDI enrollment CSVs for that health system."})]}),e.jsxs(F,{className:"space-y-4",children:[e.jsxs("div",{className:"rounded-md border border-amber-200 bg-amber-50 dark:bg-amber-950/30 dark:border-amber-900 p-3 flex gap-2 text-sm",children:[e.jsx(z,{className:"h-4 w-4 mt-0.5 shrink-0 text-amber-700 dark:text-amber-400"}),e.jsx("div",{children:"The Waystar CustID is the child-account identifier Waystar assigns each clinic under the Clarafi domain. Use this page to record the CustID Waystar sends you (e.g., from Leslie Stepro) for each new clinic. Per Mary Beth Thompson’s March 24, 2026 email, the Enrollment Contact must also be configured in the Waystar portal for each CustID before uploading enrollment CSVs."})]}),e.jsxs("div",{className:"relative max-w-sm",children:[e.jsx(L,{className:"absolute left-2 top-2.5 h-4 w-4 text-muted-foreground"}),e.jsx(u,{placeholder:"Search by HS ID, name, or CustID",value:n,onChange:a=>N(a.target.value),className:"pl-8","data-testid":"input-search"})]}),p&&e.jsx("div",{className:"text-sm text-muted-foreground",children:"Loading health systems…"}),t&&e.jsxs("div",{className:"text-sm text-destructive",children:["Failed to load: ",(t==null?void 0:t.message)??String(t)]}),!p&&!t&&e.jsx("div",{className:"overflow-x-auto rounded-md border",children:e.jsxs("table",{className:"w-full text-sm",children:[e.jsx("thead",{className:"bg-muted/50",children:e.jsxs("tr",{className:"text-left",children:[e.jsx("th",{className:"px-3 py-2 w-16",children:"HS ID"}),e.jsx("th",{className:"px-3 py-2",children:"Name"}),e.jsx("th",{className:"px-3 py-2 w-36",children:"Provider"}),e.jsx("th",{className:"px-3 py-2 w-44",children:"Waystar CustID"}),e.jsx("th",{className:"px-3 py-2 w-44",children:"Submitter ID"}),e.jsx("th",{className:"px-3 py-2 w-56",children:"Waystar retained source"}),e.jsx("th",{className:"px-3 py-2 w-24"})]})}),e.jsxs("tbody",{children:[y.map(a=>{var j,v,f,b;const s=x[a.id]??{clearinghouseProvider:"",clearinghouseCustomerId:"",waystarSubmitterId:""},l=C(a);return e.jsxs("tr",{className:"border-t hover:bg-muted/20","data-testid":`row-hs-${a.id}`,children:[e.jsx("td",{className:"px-3 py-2 font-mono",children:a.id}),e.jsxs("td",{className:"px-3 py-2",children:[e.jsx("div",{className:"font-medium",children:a.name}),e.jsxs("div",{className:"text-xs text-muted-foreground",children:["NPI ",a.npi||"—"," · EIN ",a.taxId||"—"]}
1)]}),e.jsx("td",{className:"px-3 py-2",children:e.jsxs($,{value:s.clearinghouseProvider,onValueChange:i=>c(d=>({...d,[a.id]:{...s,clearinghouseProvider:i}})),children:[e.jsx(E,{"data-testid":`select-provider-${a.id}`,children:e.jsx(R,{})}),e.jsxs(H,{children:[e.jsx(S,{value:"waystar",children:"waystar"}),e.jsx(S,{value:"mock",children:"mock"})]})]})}),e.jsx("td",{className:"px-3 py-2",children:e.jsx(u,{value:s.clearinghouseCustomerId,onChange:i=>c(d=>({...d,[a.id]:{...s,clearinghouseCustomerId:i.target.value}})),placeholder:"e.g., 320105",inputMode:"numeric","data-testid":`input-custid-${a.id}`})}),e.jsx("td",{className:"px-3 py-2",children:e.jsx(u,{value:s.waystarSubmitterId,onChange:i=>c(d=>({...d,[a.id]:{...s,waystarSubmitterId:i.target.value}})),placeholder:"e.g., W152D124","data-testid":`input-submitter-${a.id}`})}),e.jsx("td",{className:"px-3 py-2",children:s.clearinghouseProvider==="waystar"?e.jsxs("div",{className:"space-y-1",children:[e.jsx(m,{variant:(j=a.waystarRetainedSource)!=null&&j.activated?"default":"destructive",className:"text-xs","data-testid":`badge-retained-source-${a.id}`,children:(v=a.waystarRetainedSource)!=null&&v.activated?"Retained source active":"Retained source blocked"}),e.jsx("div",{className:"text-xs text-muted-foreground",children:((f=a.waystarRetainedSource)==null?void 0:f.configVersion)||"No retained-source config version"}),!((b=a.waystarRetainedSource)!=null&&b.activated)&&e.jsx("div",{className:"text-xs text-amber-700 dark:text-amber-300",children:"Legacy Waystar current-truth actions will block until retained-source capabilities are configured."})]}):e.jsx(m,{variant:"outline",className:"text-xs","data-testid":`badge-retained-source-${a.id}`,children:"Mock/test scoped"})}),e.jsx("td",{className:"px-3 py-2 text-right",children:l?e.jsxs(M,{size:"sm",onClick:()=>g.mutate({hsId:a.id,body:s}),disabled:g.isPending,"data-testid":`button-save-${a.id}`,children:[e.jsx(K,{className:"h-3.5 w-3.5 mr-1"})," Save"]}):e.jsx(m,{variant:"outline",className:"text-xs",children:"Saved"})})]},a.id)}),y.length===0&&e.jsx("tr",{children:e.jsxs("td",{colSpan:7,className:"px-3 py-6 text-center text-muted-foreground",children:["No health systems match “",n,"”"]})})]})]})})]})]})]})}export{J 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.