@mindbill/react 0.39.0 → 0.41.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +45 -9
- package/dist/index.js +1209 -1038
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
// src/index.tsx
|
|
4
4
|
import "@mindbill/embed";
|
|
5
|
-
import { createElement, useEffect as
|
|
5
|
+
import { createElement, useEffect as useEffect10, useRef as useRef6 } from "react";
|
|
6
6
|
|
|
7
7
|
// src/appearance.ts
|
|
8
8
|
var mindBillThemePresets = {
|
|
@@ -1087,8 +1087,8 @@ var PAYER_TABS = [
|
|
|
1087
1087
|
function DirectoryEmpty({ children }) {
|
|
1088
1088
|
return /* @__PURE__ */ jsx2("p", { className: "mb-read-directory-empty", children });
|
|
1089
1089
|
}
|
|
1090
|
-
function ContactTable({ contacts, empty }) {
|
|
1091
|
-
if (!
|
|
1090
|
+
function ContactTable({ contacts: contacts2, empty }) {
|
|
1091
|
+
if (!contacts2.length) return /* @__PURE__ */ jsx2(DirectoryEmpty, { children: empty });
|
|
1092
1092
|
return /* @__PURE__ */ jsx2("div", { className: "mb-read-directory-table-wrap", children: /* @__PURE__ */ jsxs2("table", { className: "mb-read-directory-table", children: [
|
|
1093
1093
|
/* @__PURE__ */ jsx2("thead", { children: /* @__PURE__ */ jsxs2("tr", { children: [
|
|
1094
1094
|
/* @__PURE__ */ jsx2("th", { children: "Name" }),
|
|
@@ -1097,7 +1097,7 @@ function ContactTable({ contacts, empty }) {
|
|
|
1097
1097
|
/* @__PURE__ */ jsx2("th", { children: "Fax" }),
|
|
1098
1098
|
/* @__PURE__ */ jsx2("th", { children: "Address" })
|
|
1099
1099
|
] }) }),
|
|
1100
|
-
/* @__PURE__ */ jsx2("tbody", { children:
|
|
1100
|
+
/* @__PURE__ */ jsx2("tbody", { children: contacts2.map((contact, index) => /* @__PURE__ */ jsxs2("tr", { children: [
|
|
1101
1101
|
/* @__PURE__ */ jsxs2("td", { children: [
|
|
1102
1102
|
contact.name || "\u2014",
|
|
1103
1103
|
contact.note ? /* @__PURE__ */ jsx2("small", { children: contact.note }) : null
|
|
@@ -1147,6 +1147,7 @@ function BillReadOnlyForm({ data, appearance, className, style, onOpenAttachment
|
|
|
1147
1147
|
const [payerOpen, setPayerOpen] = useState2(false);
|
|
1148
1148
|
const [payerTab, setPayerTab] = useState2("main");
|
|
1149
1149
|
const { bill, patient, injury } = data;
|
|
1150
|
+
const diagnoses = injury.diagnoses?.length ? injury.diagnoses : (injury.diagnosisCodes ?? []).map((code) => ({ code, description: "" }));
|
|
1150
1151
|
const provider = bill.billingSnapshot?.billingProvider;
|
|
1151
1152
|
const clinician = bill.billingSnapshot?.renderingProvider;
|
|
1152
1153
|
const location = bill.billingSnapshot?.placeOfService;
|
|
@@ -1155,18 +1156,18 @@ function BillReadOnlyForm({ data, appearance, className, style, onOpenAttachment
|
|
|
1155
1156
|
const billingAddress = provider ? [provider.billingStreet, provider.billingCity, provider.billingState, provider.billingZip].filter(Boolean).join(", ") : "";
|
|
1156
1157
|
const locationAddress = location ? [location.street, location.city, location.state, location.zip].filter(Boolean).join(", ") : "";
|
|
1157
1158
|
const payerName = data.delivery?.payerName || injury.claimsAdminName || "\u2014";
|
|
1158
|
-
const
|
|
1159
|
+
const contacts2 = data.delivery?.contacts;
|
|
1159
1160
|
const directory = data.delivery?.directory;
|
|
1160
|
-
const fallbackContacts =
|
|
1161
|
-
name:
|
|
1162
|
-
...
|
|
1163
|
-
...
|
|
1164
|
-
...
|
|
1165
|
-
...
|
|
1166
|
-
...
|
|
1161
|
+
const fallbackContacts = contacts2 && Object.values(contacts2).some(Boolean) ? [{
|
|
1162
|
+
name: contacts2.adjusterName || "Claims contact",
|
|
1163
|
+
...contacts2.adjusterPhone ? { phone: contacts2.adjusterPhone } : {},
|
|
1164
|
+
...contacts2.adjusterEmail || contacts2.claimsEmail ? { email: contacts2.adjusterEmail || contacts2.claimsEmail } : {},
|
|
1165
|
+
...contacts2.faxNumber ? { fax: contacts2.faxNumber } : {},
|
|
1166
|
+
...contacts2.portalUrl ? { portalUrl: contacts2.portalUrl } : {},
|
|
1167
|
+
...contacts2.mailingAddress ? { address: contacts2.mailingAddress } : {}
|
|
1167
1168
|
}] : [];
|
|
1168
1169
|
const billReview = directory?.billReview?.length ? directory.billReview : fallbackContacts;
|
|
1169
|
-
const mailingAddresses = directory?.mailingAddresses?.length ? directory.mailingAddresses :
|
|
1170
|
+
const mailingAddresses = directory?.mailingAddresses?.length ? directory.mailingAddresses : contacts2?.mailingAddress ? [{ company: payerName, address: contacts2.mailingAddress }] : [];
|
|
1170
1171
|
useEffect2(() => {
|
|
1171
1172
|
if (!payerOpen) return;
|
|
1172
1173
|
const close = (event) => {
|
|
@@ -1204,7 +1205,10 @@ function BillReadOnlyForm({ data, appearance, className, style, onOpenAttachment
|
|
|
1204
1205
|
/* @__PURE__ */ jsx2(Value, { label: "Date of service", children: bill.dosEnd ? `${date(bill.dos)} \u2013 ${date(bill.dosEnd)}` : date(bill.dos) }),
|
|
1205
1206
|
/* @__PURE__ */ jsx2(Value, { label: "Injury description", wide: true, children: injury.injuryDescription })
|
|
1206
1207
|
] }),
|
|
1207
|
-
|
|
1208
|
+
diagnoses.length ? /* @__PURE__ */ jsx2("div", { className: "mb-read-diagnoses", "aria-label": "Diagnoses", children: diagnoses.map((diagnosis) => /* @__PURE__ */ jsxs2("div", { children: [
|
|
1209
|
+
/* @__PURE__ */ jsx2("strong", { children: diagnosis.code }),
|
|
1210
|
+
diagnosis.description ? /* @__PURE__ */ jsx2("span", { children: diagnosis.description }) : null
|
|
1211
|
+
] }, diagnosis.code)) }) : null
|
|
1208
1212
|
] }),
|
|
1209
1213
|
/* @__PURE__ */ jsxs2("section", { className: "mb-read-card", children: [
|
|
1210
1214
|
/* @__PURE__ */ jsx2("h3", { children: "Providers & location" }),
|
|
@@ -1288,12 +1292,13 @@ function BillReadOnlyForm({ data, appearance, className, style, onOpenAttachment
|
|
|
1288
1292
|
] });
|
|
1289
1293
|
}
|
|
1290
1294
|
var READ_ONLY_STYLES = `
|
|
1295
|
+
.mb-read-diagnoses{display:grid;gap:8px;margin-top:16px}.mb-read-diagnoses>div{display:grid;grid-template-columns:minmax(64px,max-content) 1fr;gap:12px;align-items:baseline;border:1px solid var(--mb-border);border-radius:9px;background:#f7f9f8;padding:9px 12px}.mb-read-diagnoses span{color:var(--mb-muted)}
|
|
1291
1296
|
.mb-readonly-bill{--mb-accent:#176c70;--mb-border:#d7e0df;--mb-surface:#fff;--mb-muted:#607176;color:var(--mb-text,#17282d);font:inherit;display:grid;gap:16px}.mb-readonly-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:20px}.mb-readonly-heading h2,.mb-read-card h3{margin:0}.mb-readonly-heading>strong{font-size:1.35rem}.mb-read-card{background:var(--mb-surface);border:1px solid var(--mb-border);border-radius:var(--mb-radius,14px);padding:20px;box-shadow:0 1px 2px rgba(15,40,45,.04)}.mb-read-card h3{font-size:1.05rem;margin-bottom:16px}.mb-read-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:17px 28px;margin:0}.mb-read-value{min-width:0}.mb-read-value.is-wide{grid-column:1/-1}.mb-read-value dt{color:var(--mb-muted);font-size:.75rem;font-weight:700;letter-spacing:.07em;text-transform:uppercase}.mb-read-value dd{font-weight:600;margin:5px 0 0;overflow-wrap:anywhere}.mb-read-payer{border:0;border-bottom:1px dotted currentColor;background:transparent;color:inherit;padding:0;font:inherit;font-weight:inherit;text-align:left;cursor:pointer}.mb-read-payer:hover{color:var(--mb-accent)}.mb-read-chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:16px}.mb-read-chips span{border:1px solid var(--mb-border);border-radius:999px;padding:3px 9px;font-size:.82rem;background:#f7f9f8}.mb-read-lines{border:1px solid var(--mb-border);border-radius:10px;overflow:hidden}.mb-read-line-header,.mb-read-line{display:grid;grid-template-columns:1.2fr 1.5fr .45fr .7fr;gap:16px;align-items:center;padding:12px 14px}.mb-read-line-header{background:#f6f8f7;color:var(--mb-muted);font-size:.75rem;font-weight:700;text-transform:uppercase}.mb-read-line{border-top:1px solid var(--mb-border)}.mb-read-line .mb-read-chips{margin:0}.mb-read-line>span:last-child,.mb-read-line>strong:last-child{text-align:right}.mb-read-total{display:flex;justify-content:flex-end;gap:24px;border-top:1px solid var(--mb-border);padding:13px 14px}.mb-read-documents{list-style:none;padding:0;margin:0;display:grid}.mb-read-documents li{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:13px 0;border-top:1px solid var(--mb-border)}.mb-read-documents li:first-child{border-top:0;padding-top:0}.mb-read-documents li:last-child{padding-bottom:0}.mb-read-documents div{display:grid;gap:3px;min-width:0}.mb-read-documents strong{overflow-wrap:anywhere}.mb-read-documents span,.mb-read-empty{color:var(--mb-muted)}.mb-read-documents button{border:1px solid var(--mb-border);border-radius:8px;background:transparent;color:inherit;padding:8px 13px;font:inherit;font-weight:650;cursor:pointer}.mb-read-documents button:hover{border-color:var(--mb-accent);color:var(--mb-accent)}.mb-read-dialog-backdrop{position:fixed;inset:0;z-index:1000;display:grid;place-items:center;background:rgba(11,28,32,.46);padding:20px}.mb-read-dialog{width:min(1040px,100%);min-height:min(620px,calc(100vh - 40px));max-height:calc(100vh - 40px);overflow:auto;border:1px solid var(--mb-border);border-radius:var(--mb-radius,14px);background:var(--mb-surface);padding:22px;box-shadow:0 22px 70px rgba(8,25,29,.24)}.mb-read-dialog header{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:20px}.mb-read-dialog header span{display:block;margin-top:4px;color:var(--mb-muted);font-size:.78rem}.mb-read-dialog h3{margin:0;font-size:1.35rem}.mb-read-dialog header button{border:0;background:transparent;color:inherit;font:inherit;font-size:1.7rem;line-height:1;cursor:pointer}.mb-read-dialog-tabs{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));border-radius:10px;background:var(--mb-soft,#f4f7f6);padding:0 10px}.mb-read-dialog-tabs button{min-height:68px;border:0;border-top:4px solid transparent;background:transparent;color:var(--mb-muted);font:inherit;font-weight:750;cursor:pointer;padding:8px}.mb-read-dialog-tabs button[aria-selected=true]{border-color:var(--mb-accent);background:var(--mb-surface);color:var(--mb-text)}.mb-read-dialog-panel{padding-top:22px}.mb-read-directory-main{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 28px;margin:0}.mb-read-directory-main a,.mb-read-directory-table a{color:var(--mb-accent)}.mb-read-directory-table-wrap{border:1px solid var(--mb-border);border-radius:10px;overflow:auto}.mb-read-directory-table{width:100%;border-collapse:collapse;text-align:left}.mb-read-directory-table th,.mb-read-directory-table td{padding:13px 14px;vertical-align:top;border-top:1px solid var(--mb-border)}.mb-read-directory-table th{border-top:0;background:var(--mb-soft,#f4f7f6);color:var(--mb-muted);font-size:.78rem}.mb-read-directory-table td small{display:block;margin-top:4px;color:var(--mb-muted)}.mb-read-directory-empty{margin:0;padding:26px;border:1px dashed var(--mb-border);border-radius:10px;color:var(--mb-muted);text-align:center}.mb-read-match{display:inline-flex;border-radius:999px;padding:3px 8px;font-size:.78rem;font-weight:750}.mb-read-match.is-match{background:#eaf7ef;color:#237448}.mb-read-match.is-warning{background:#fff5df;color:#8a5b00}
|
|
1292
1297
|
@media(max-width:700px){.mb-readonly-heading{align-items:flex-start}.mb-read-grid,.mb-read-directory-main{grid-template-columns:1fr}.mb-read-value.is-wide{grid-column:auto}.mb-read-card{padding:16px}.mb-read-line-header{display:none}.mb-read-line{grid-template-columns:1fr auto;gap:8px}.mb-read-line>*:nth-child(2){grid-column:1/-1}.mb-read-total{justify-content:space-between}.mb-readonly-heading>strong{font-size:1.05rem}.mb-read-dialog-backdrop{place-items:end center;padding:0}.mb-read-dialog{width:100%;min-height:0;max-height:88vh;border-radius:18px 18px 0 0;padding:20px 18px calc(20px + env(safe-area-inset-bottom))}.mb-read-dialog-tabs{display:flex;overflow-x:auto;padding:0}.mb-read-dialog-tabs button{min-width:128px}.mb-read-directory-table-wrap{border:0;overflow:visible}.mb-read-directory-table,.mb-read-directory-table thead,.mb-read-directory-table tbody,.mb-read-directory-table tr,.mb-read-directory-table th,.mb-read-directory-table td{display:block}.mb-read-directory-table thead{display:none}.mb-read-directory-table tr{border:1px solid var(--mb-border);border-radius:10px;margin-bottom:10px;overflow:hidden}.mb-read-directory-table td{border-top:1px solid var(--mb-border)}.mb-read-directory-table td:first-child{border-top:0}}
|
|
1293
1298
|
`;
|
|
1294
1299
|
|
|
1295
1300
|
// src/bill-submission-form.tsx
|
|
1296
|
-
import { createContext, useCallback, useContext, useEffect as
|
|
1301
|
+
import { createContext, useCallback, useContext, useEffect as useEffect5, useMemo as useMemo3, useRef as useRef2, useState as useState5 } from "react";
|
|
1297
1302
|
import {
|
|
1298
1303
|
createBillReferenceClient,
|
|
1299
1304
|
createBillSubmissionClient,
|
|
@@ -1689,6 +1694,136 @@ function SendRouteDialog({
|
|
|
1689
1694
|
] });
|
|
1690
1695
|
}
|
|
1691
1696
|
|
|
1697
|
+
// src/claims-administrator-directory-dialog.tsx
|
|
1698
|
+
import { useEffect as useEffect4, useState as useState4 } from "react";
|
|
1699
|
+
import { Fragment as Fragment3, jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
1700
|
+
var css2 = `
|
|
1701
|
+
.mbcad-backdrop{position:fixed;z-index:1000;inset:0;display:grid;place-items:center;padding:24px;background:rgba(17,28,38,.44)}
|
|
1702
|
+
.mbcad-dialog{display:grid;grid-template-rows:auto auto minmax(0,1fr);width:min(1180px,100%);max-height:min(860px,92vh);overflow:hidden;border:1px solid var(--mb-border);border-radius:14px;background:var(--mb-surface);color:var(--mb-text);box-shadow:0 28px 80px rgba(14,31,43,.28);font-family:var(--mb-font)}
|
|
1703
|
+
.mbcad-head{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:18px 22px;border-bottom:1px solid var(--mb-border)}.mbcad-head h2{margin:0;font-size:24px;line-height:1.2}.mbcad-close{width:40px;height:40px;border:0;border-radius:9px;background:color-mix(in srgb,var(--mb-muted) 9%,var(--mb-surface));color:var(--mb-accent);font:inherit;font-size:28px;line-height:1;cursor:pointer}
|
|
1704
|
+
.mbcad-tabs{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));margin:18px 22px 0;border-radius:10px;background:color-mix(in srgb,var(--mb-muted) 8%,var(--mb-surface));overflow:hidden}.mbcad-tab{min-height:64px;padding:10px;border:0;border-right:1px solid var(--mb-border);border-top:4px solid transparent;background:transparent;color:var(--mb-muted);font:inherit;font-weight:750;cursor:pointer}.mbcad-tab:last-child{border-right:0}.mbcad-tab[aria-selected=true]{border-top-color:var(--mb-accent);background:var(--mb-surface);color:var(--mb-text)}
|
|
1705
|
+
.mbcad-body{overflow:auto;padding:24px 22px 28px}.mbcad-grid{display:grid;gap:0;border:1px solid var(--mb-border);border-radius:10px;overflow:hidden}.mbcad-row{display:grid;grid-template-columns:minmax(180px,.8fr) minmax(0,2fr);gap:18px;padding:11px 14px;border-bottom:1px solid var(--mb-border)}.mbcad-row:last-child{border-bottom:0}.mbcad-row strong{font-weight:750}.mbcad-list{display:grid;gap:5px;margin:0;padding:0;list-style:none}.mbcad-list a,.mbcad-table a{color:var(--mb-accent);overflow-wrap:anywhere}.mbcad-table{width:100%;border-collapse:collapse;border:1px solid var(--mb-border);border-radius:10px;overflow:hidden}.mbcad-table th,.mbcad-table td{padding:13px 14px;border-bottom:1px solid var(--mb-border);text-align:left;vertical-align:top}.mbcad-table th{background:color-mix(in srgb,var(--mb-muted) 7%,var(--mb-surface));font-size:13px}.mbcad-empty{padding:36px;text-align:center;color:var(--mb-muted)}.mbcad-notice{padding:14px 16px;border:1px solid color-mix(in srgb,var(--mb-accent) 70%,var(--mb-border));border-radius:9px;background:color-mix(in srgb,var(--mb-accent) 5%,var(--mb-surface));font-weight:650}
|
|
1706
|
+
@media(max-width:760px){.mbcad-backdrop{padding:8px}.mbcad-dialog{max-height:96vh}.mbcad-head{padding:14px}.mbcad-head h2{font-size:19px}.mbcad-tabs{display:flex;overflow-x:auto;margin:10px 12px 0}.mbcad-tab{min-width:145px}.mbcad-body{padding:14px 12px 18px}.mbcad-row{grid-template-columns:1fr;gap:5px}.mbcad-table{display:block;overflow-x:auto}}
|
|
1707
|
+
`;
|
|
1708
|
+
function outbound(value, kind) {
|
|
1709
|
+
const href = kind === "phone" ? `tel:${value.replace(/[^+\d]/g, "")}` : kind === "email" ? `mailto:${value}` : /^https?:\/\//i.test(value) ? value : `https://${value}`;
|
|
1710
|
+
return /* @__PURE__ */ jsx4("a", { href, ...kind === "url" ? { target: "_blank", rel: "noreferrer" } : {}, children: value });
|
|
1711
|
+
}
|
|
1712
|
+
function list(values, kind) {
|
|
1713
|
+
return values?.length ? /* @__PURE__ */ jsx4("ul", { className: "mbcad-list", children: values.map((value, index) => /* @__PURE__ */ jsx4("li", { children: kind ? outbound(value, kind) : value }, `${value}-${index}`)) }) : "\u2014";
|
|
1714
|
+
}
|
|
1715
|
+
function Main({ directory }) {
|
|
1716
|
+
return /* @__PURE__ */ jsx4("div", { className: "mbcad-grid", children: [
|
|
1717
|
+
["Name", directory.name ?? "\u2014"],
|
|
1718
|
+
["Description", directory.description ?? "\u2014"],
|
|
1719
|
+
["Type", directory.type ?? "\u2014"],
|
|
1720
|
+
["Website", directory.website ? outbound(directory.website, "url") : "\u2014"],
|
|
1721
|
+
["Also known as", list(directory.aliases)],
|
|
1722
|
+
["Affiliated entities", list(directory.affiliatedEntities)],
|
|
1723
|
+
["Hours of operation", directory.hours ?? "\u2014"],
|
|
1724
|
+
["Telephone numbers", list(directory.telephoneNumbers, "phone")],
|
|
1725
|
+
["Email addresses", list(directory.emailAddresses, "email")],
|
|
1726
|
+
["Web portals", list(directory.webPortals, "url")],
|
|
1727
|
+
["Payers", directory.payers?.length ? /* @__PURE__ */ jsx4("ul", { className: "mbcad-list", children: directory.payers.map((payer, index) => /* @__PURE__ */ jsxs4("li", { children: [
|
|
1728
|
+
/* @__PURE__ */ jsx4("strong", { children: payer.name }),
|
|
1729
|
+
payer.daisyBillPayerId ? ` \xB7 daisyBill Payer ID ${payer.daisyBillPayerId}` : "",
|
|
1730
|
+
payer.route ? ` \xB7 ${payer.route}` : "",
|
|
1731
|
+
payer.hint ? /* @__PURE__ */ jsx4("small", { children: payer.hint }) : null
|
|
1732
|
+
] }, `${payer.name}-${index}`)) }) : "\u2014"],
|
|
1733
|
+
["Bill processing workflow", directory.billProcessingWorkflow ?? "\u2014"],
|
|
1734
|
+
["Bill processing workflow notes", directory.billProcessingWorkflowNotes ?? "\u2014"],
|
|
1735
|
+
["Claim number hint", directory.claimNumberHint ?? "\u2014"]
|
|
1736
|
+
].map(([label, value]) => /* @__PURE__ */ jsxs4("div", { className: "mbcad-row", children: [
|
|
1737
|
+
/* @__PURE__ */ jsx4("strong", { children: label }),
|
|
1738
|
+
/* @__PURE__ */ jsx4("div", { children: value })
|
|
1739
|
+
] }, label)) });
|
|
1740
|
+
}
|
|
1741
|
+
function contacts(items, empty) {
|
|
1742
|
+
if (!items?.length) return /* @__PURE__ */ jsx4("div", { className: "mbcad-empty", children: empty });
|
|
1743
|
+
return /* @__PURE__ */ jsxs4("table", { className: "mbcad-table", children: [
|
|
1744
|
+
/* @__PURE__ */ jsx4("thead", { children: /* @__PURE__ */ jsxs4("tr", { children: [
|
|
1745
|
+
/* @__PURE__ */ jsx4("th", { children: "Name" }),
|
|
1746
|
+
/* @__PURE__ */ jsx4("th", { children: "Telephone" }),
|
|
1747
|
+
/* @__PURE__ */ jsx4("th", { children: "Web portal" }),
|
|
1748
|
+
/* @__PURE__ */ jsx4("th", { children: "Email" }),
|
|
1749
|
+
/* @__PURE__ */ jsx4("th", { children: "Fax" }),
|
|
1750
|
+
/* @__PURE__ */ jsx4("th", { children: "Address / note" })
|
|
1751
|
+
] }) }),
|
|
1752
|
+
/* @__PURE__ */ jsx4("tbody", { children: items.map((item, index) => /* @__PURE__ */ jsxs4("tr", { children: [
|
|
1753
|
+
/* @__PURE__ */ jsx4("td", { children: item.name ?? "\u2014" }),
|
|
1754
|
+
/* @__PURE__ */ jsx4("td", { children: item.phone ? outbound(item.phone, "phone") : "\u2014" }),
|
|
1755
|
+
/* @__PURE__ */ jsx4("td", { children: item.portalUrl ? outbound(item.portalUrl, "url") : "\u2014" }),
|
|
1756
|
+
/* @__PURE__ */ jsx4("td", { children: item.email ? outbound(item.email, "email") : "\u2014" }),
|
|
1757
|
+
/* @__PURE__ */ jsx4("td", { children: item.fax ?? "\u2014" }),
|
|
1758
|
+
/* @__PURE__ */ jsx4("td", { children: [item.address, item.note].filter(Boolean).join(" \xB7 ") || "\u2014" })
|
|
1759
|
+
] }, `${item.name ?? "contact"}-${index}`)) })
|
|
1760
|
+
] });
|
|
1761
|
+
}
|
|
1762
|
+
function ClaimsAdministratorDirectoryDialog({ open, directory, loading = false, error, onClose }) {
|
|
1763
|
+
const [tab, setTab] = useState4("main");
|
|
1764
|
+
useEffect4(() => {
|
|
1765
|
+
if (open) setTab("main");
|
|
1766
|
+
}, [open, directory?.id]);
|
|
1767
|
+
useEffect4(() => {
|
|
1768
|
+
if (!open) return;
|
|
1769
|
+
const close = (event) => {
|
|
1770
|
+
if (event.key === "Escape") onClose();
|
|
1771
|
+
};
|
|
1772
|
+
window.addEventListener("keydown", close);
|
|
1773
|
+
return () => window.removeEventListener("keydown", close);
|
|
1774
|
+
}, [onClose, open]);
|
|
1775
|
+
if (!open) return null;
|
|
1776
|
+
const title = directory?.name ?? "Claims administrator directory";
|
|
1777
|
+
return /* @__PURE__ */ jsxs4("div", { className: "mbcad-backdrop", onMouseDown: (event) => {
|
|
1778
|
+
if (event.target === event.currentTarget) onClose();
|
|
1779
|
+
}, children: [
|
|
1780
|
+
/* @__PURE__ */ jsx4("style", { children: css2 }),
|
|
1781
|
+
/* @__PURE__ */ jsxs4("section", { className: "mbcad-dialog", role: "dialog", "aria-modal": "true", "aria-labelledby": "mbcad-title", children: [
|
|
1782
|
+
/* @__PURE__ */ jsxs4("header", { className: "mbcad-head", children: [
|
|
1783
|
+
/* @__PURE__ */ jsx4("h2", { id: "mbcad-title", children: title }),
|
|
1784
|
+
/* @__PURE__ */ jsx4("button", { className: "mbcad-close", type: "button", "aria-label": "Close claims administrator details", onClick: onClose, children: "\xD7" })
|
|
1785
|
+
] }),
|
|
1786
|
+
/* @__PURE__ */ jsx4("div", { className: "mbcad-tabs", role: "tablist", children: [
|
|
1787
|
+
["main", "Main"],
|
|
1788
|
+
["bill-review", "Bill Review"],
|
|
1789
|
+
["authorization", "Authorization Info"],
|
|
1790
|
+
["mailing", "Mailing Address"],
|
|
1791
|
+
["patterns", "Claim Number Pattern"]
|
|
1792
|
+
].map(([id, label]) => /* @__PURE__ */ jsx4("button", { className: "mbcad-tab", type: "button", role: "tab", "aria-selected": tab === id, onClick: () => setTab(id), children: label }, id)) }),
|
|
1793
|
+
/* @__PURE__ */ jsx4("div", { className: "mbcad-body", role: "tabpanel", children: loading ? /* @__PURE__ */ jsx4("div", { className: "mbcad-empty", children: "Loading directory details\u2026" }) : error ? /* @__PURE__ */ jsx4("div", { className: "mbcad-empty", role: "alert", children: error }) : !directory ? /* @__PURE__ */ jsx4("div", { className: "mbcad-empty", children: "Directory details are unavailable." }) : tab === "main" ? /* @__PURE__ */ jsx4(Main, { directory }) : tab === "bill-review" ? contacts(directory.billReview, "No bill-review contacts are listed.") : tab === "authorization" ? /* @__PURE__ */ jsxs4(Fragment3, { children: [
|
|
1794
|
+
directory.authorizationNotice ? /* @__PURE__ */ jsx4("p", { className: "mbcad-notice", children: directory.authorizationNotice }) : null,
|
|
1795
|
+
contacts(directory.authorization, "No authorization contacts are listed.")
|
|
1796
|
+
] }) : tab === "mailing" ? directory.mailingAddresses?.length ? /* @__PURE__ */ jsxs4("table", { className: "mbcad-table", children: [
|
|
1797
|
+
/* @__PURE__ */ jsx4("thead", { children: /* @__PURE__ */ jsxs4("tr", { children: [
|
|
1798
|
+
/* @__PURE__ */ jsx4("th", { children: "Company" }),
|
|
1799
|
+
/* @__PURE__ */ jsx4("th", { children: "Address" }),
|
|
1800
|
+
/* @__PURE__ */ jsx4("th", { children: "Notes" }),
|
|
1801
|
+
/* @__PURE__ */ jsx4("th", { children: "Bill treatment types" }),
|
|
1802
|
+
/* @__PURE__ */ jsx4("th", { children: "Submission type" })
|
|
1803
|
+
] }) }),
|
|
1804
|
+
/* @__PURE__ */ jsx4("tbody", { children: directory.mailingAddresses.map((item, index) => /* @__PURE__ */ jsxs4("tr", { children: [
|
|
1805
|
+
/* @__PURE__ */ jsx4("td", { children: item.company ?? "\u2014" }),
|
|
1806
|
+
/* @__PURE__ */ jsx4("td", { children: item.address }),
|
|
1807
|
+
/* @__PURE__ */ jsx4("td", { children: item.notes ?? "\u2014" }),
|
|
1808
|
+
/* @__PURE__ */ jsx4("td", { children: item.billTreatmentTypes?.join(", ") || "\u2014" }),
|
|
1809
|
+
/* @__PURE__ */ jsx4("td", { children: item.submissionTypes?.join(", ") || "\u2014" })
|
|
1810
|
+
] }, `${item.address}-${index}`)) })
|
|
1811
|
+
] }) : /* @__PURE__ */ jsx4("div", { className: "mbcad-empty", children: "No mailing addresses are listed." }) : directory.claimNumberPatterns?.length ? /* @__PURE__ */ jsxs4("table", { className: "mbcad-table", children: [
|
|
1812
|
+
/* @__PURE__ */ jsx4("thead", { children: /* @__PURE__ */ jsxs4("tr", { children: [
|
|
1813
|
+
/* @__PURE__ */ jsx4("th", { children: "Length" }),
|
|
1814
|
+
/* @__PURE__ */ jsx4("th", { children: "Pattern" }),
|
|
1815
|
+
/* @__PURE__ */ jsx4("th", { children: "Example" })
|
|
1816
|
+
] }) }),
|
|
1817
|
+
/* @__PURE__ */ jsx4("tbody", { children: directory.claimNumberPatterns.map((item, index) => /* @__PURE__ */ jsxs4("tr", { children: [
|
|
1818
|
+
/* @__PURE__ */ jsx4("td", { children: item.length ?? "\u2014" }),
|
|
1819
|
+
/* @__PURE__ */ jsx4("td", { children: item.pattern }),
|
|
1820
|
+
/* @__PURE__ */ jsx4("td", { children: item.example ?? "\u2014" })
|
|
1821
|
+
] }, `${item.pattern}-${index}`)) })
|
|
1822
|
+
] }) : /* @__PURE__ */ jsx4("div", { className: "mbcad-empty", children: "No claim-number patterns are listed." }) })
|
|
1823
|
+
] })
|
|
1824
|
+
] });
|
|
1825
|
+
}
|
|
1826
|
+
|
|
1692
1827
|
// src/billing-catalog.ts
|
|
1693
1828
|
var DEFAULT_BILL_SUBMISSION_PROCEDURES = [
|
|
1694
1829
|
{ code: "ML200", description: "Missed appointment for a medical-legal evaluation", allowedAmount: 503.75 },
|
|
@@ -1850,7 +1985,7 @@ function calculateBillSubmissionAllowedAmount(line, procedures = DEFAULT_BILL_SU
|
|
|
1850
1985
|
}
|
|
1851
1986
|
|
|
1852
1987
|
// src/bill-submission-form.tsx
|
|
1853
|
-
import { Fragment as
|
|
1988
|
+
import { Fragment as Fragment4, jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
1854
1989
|
var BILL_SUBMISSION_DOCUMENT_TYPES = [
|
|
1855
1990
|
"final_report",
|
|
1856
1991
|
"proof_of_service",
|
|
@@ -2177,12 +2312,12 @@ function validateBillSubmission(bill) {
|
|
|
2177
2312
|
});
|
|
2178
2313
|
return { valid: Object.keys(errors).length === 0, fieldErrors: errors };
|
|
2179
2314
|
}
|
|
2180
|
-
var
|
|
2315
|
+
var css3 = `
|
|
2181
2316
|
.mbsf{display:grid;gap:20px;color:var(--mb-text);font-family:var(--mb-font);font-size:15px}.mbsf *{box-sizing:border-box}
|
|
2182
2317
|
.mbsf-attention{padding:14px 16px;border-left:4px solid var(--mb-danger);border-radius:var(--mb-control-radius);background:color-mix(in srgb,var(--mb-danger) 8%,var(--mb-surface));color:var(--mb-text)}.mbsf [data-attention=true] .mbsf-input,.mbsf [data-attention=true] .mbsf-select,.mbsf [data-attention=true].mbsf-lines{border-color:var(--mb-danger);background:color-mix(in srgb,var(--mb-danger) 4%,var(--mb-input))}.mbsf [data-attention=true]>.mbsf-label{color:var(--mb-danger)}
|
|
2183
2318
|
.mbsf-head,.mbsf-section-head,.mbsf-attach-row,.mbsf-actions{display:flex;align-items:center;justify-content:space-between;gap:16px}.mbsf-title{margin:0;font-size:24px}.mbsf-copy,.mbsf-help{color:var(--mb-muted);margin:5px 0 0}.mbsf-required{font-size:13px;color:var(--mb-muted);white-space:nowrap}.mbsf-star,.mbsf-error{color:var(--mb-danger)}
|
|
2184
2319
|
.mbsf-card{min-width:0;margin:0;padding:24px;border:1px solid var(--mb-border);border-radius:var(--mb-radius);background:var(--mb-surface);box-shadow:var(--mb-shadow)}.mbsf-card[data-invalid=true]{border-color:var(--mb-danger)}.mbsf-legend{padding:0 10px;font-size:18px;font-weight:760}.mbsf-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 24px}.mbsf-subhead{grid-column:1/-1;margin:6px 0 -2px;padding-top:14px;border-top:1px solid var(--mb-border);font-size:15px;font-weight:780;letter-spacing:.01em}.mbsf-subhead:first-child{margin-top:0;padding-top:0;border-top:0}.mbsf-span{grid-column:1/-1}.mbsf-field{display:grid;align-content:start;gap:7px;min-width:0}.mbsf-label{font-weight:680}.mbsf-input,.mbsf-select{width:100%;min-height:46px;padding:10px 12px;border:1px solid var(--mb-border);border-radius:var(--mb-control-radius);background:var(--mb-input);color:var(--mb-text);font:inherit}.mbsf-input:focus,.mbsf-select:focus{outline:3px solid color-mix(in srgb,var(--mb-accent) 22%,transparent);border-color:var(--mb-accent)}.mbsf-field[data-invalid=true] .mbsf-input,.mbsf-field[data-invalid=true] .mbsf-select,.mbsf-invalid-control .mbsf-input{border-color:var(--mb-danger);background:color-mix(in srgb,var(--mb-danger) 4%,var(--mb-input))}.mbsf-field[data-invalid=true] .mbsf-input:focus,.mbsf-field[data-invalid=true] .mbsf-select:focus{outline-color:color-mix(in srgb,var(--mb-danger) 24%,transparent)}
|
|
2185
|
-
.mbsf-combo{position:relative}.mbsf-menu{position:absolute;z-index:20;top:calc(100% + 5px);left:0;right:0;max-height:min(360px,46vh);overflow:auto;overscroll-behavior:contain;padding:7px;border:1px solid var(--mb-border);border-radius:12px;background:var(--mb-surface);box-shadow:0 14px 35px rgba(17,38,49,.16)}.mbsf-option{display:grid;width:100%;
|
|
2320
|
+
.mbsf-combo{position:relative}.mbsf-menu{position:absolute;z-index:20;top:calc(100% + 5px);left:0;right:0;max-height:min(360px,46vh);overflow:auto;overscroll-behavior:contain;padding:7px;border:1px solid var(--mb-border);border-radius:12px;background:var(--mb-surface);box-shadow:0 14px 35px rgba(17,38,49,.16)}.mbsf-option{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:14px;width:100%;padding:10px;border:0;border-radius:8px;background:transparent;color:var(--mb-text);font:inherit;text-align:left;cursor:pointer}.mbsf-option:hover,.mbsf-option:focus{background:color-mix(in srgb,var(--mb-accent) 9%,var(--mb-surface))}.mbsf-option-main{display:grid;gap:2px;min-width:0}.mbsf-option small{color:var(--mb-muted);overflow-wrap:anywhere}.mbsf-option-route{align-self:center;color:var(--mb-accent);font-size:13px;font-weight:750;white-space:nowrap}.mbsf-menu-status{padding:12px;text-align:center;color:var(--mb-muted);font-size:13px}.mbsf-directory-link{justify-self:start;border:0;padding:0;background:transparent;color:var(--mb-accent);font:inherit;font-weight:700;text-align:left;text-decoration:underline;cursor:pointer}
|
|
2186
2321
|
.mbsf-payer-status{display:flex;align-items:center;gap:7px;color:#087f5b;font-size:13px;font-weight:650}.mbsf-payer-intro{margin:4px 0 0;color:var(--mb-muted)}.mbsf-payer-list{display:grid;gap:8px}.mbsf-payer-option{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:11px 12px;border:1px solid var(--mb-border);border-radius:var(--mb-control-radius);background:color-mix(in srgb,var(--mb-accent) 3%,var(--mb-surface))}.mbsf-payer-option-main{display:grid;gap:5px;min-width:0}.mbsf-payer-option-main strong{overflow-wrap:anywhere}.mbsf-payer-signals{display:flex;flex-wrap:wrap;gap:6px}.mbsf-payer-signal{padding:2px 7px;border:1px solid var(--mb-border);border-radius:999px;color:var(--mb-muted);font-size:12px}.mbsf-payer-signal[data-state=match]{border-color:color-mix(in srgb,#159447 45%,var(--mb-border));color:#087f5b}.mbsf-payer-signal[data-state=warning]{border-color:color-mix(in srgb,#c56a00 55%,var(--mb-border));color:#9a5200}
|
|
2187
2322
|
.mbsf-chips,.mbsf-quick-picks{display:flex;flex-wrap:wrap;gap:7px;margin-bottom:8px}.mbsf-chip,.mbsf-quick-pick{display:inline-flex;align-items:center;gap:7px;padding:5px 9px;border:1px solid var(--mb-border);border-radius:999px;background:var(--mb-input)}.mbsf-chip button{border:0;background:transparent;color:var(--mb-muted);cursor:pointer;font:inherit}.mbsf-quick-pick{color:var(--mb-text);font:inherit;cursor:pointer}.mbsf-quick-pick[data-selected=true]{border-color:var(--mb-accent);color:var(--mb-accent)}
|
|
2188
2323
|
.mbsf-segments{display:grid;grid-template-columns:repeat(3,1fr);border:1px solid var(--mb-border);border-radius:var(--mb-control-radius);overflow:hidden}.mbsf-segment{min-height:44px;border:0;border-right:1px solid var(--mb-border);background:var(--mb-input);color:var(--mb-text);font:inherit;font-weight:700;cursor:pointer}.mbsf-segment:last-child{border-right:0}.mbsf-segment[aria-pressed=true]{background:var(--mb-accent);color:var(--mb-accent-contrast)}
|
|
@@ -2191,27 +2326,27 @@ var css2 = `
|
|
|
2191
2326
|
@media(max-width:820px){.mbsf{gap:16px}.mbsf-grid{grid-template-columns:1fr}.mbsf-span{grid-column:auto}.mbsf-card{padding:18px 16px}.mbsf-line-head{display:none}.mbsf-line{position:relative;display:grid;grid-template-columns:minmax(0,1fr) 86px;gap:14px;padding:18px 16px}.mbsf-line>div:before{display:block;margin-bottom:6px;color:var(--mb-muted);font-size:12px;font-weight:700;content:attr(data-label)}.mbsf-line>div:nth-child(1),.mbsf-line>div:nth-child(2),.mbsf-line>div:nth-child(3){grid-column:1/-1}.mbsf-money{align-self:end;padding:0 0 12px;text-align:right}.mbsf-line .mbsf-icon-btn{position:absolute;right:8px;bottom:3px}.mbsf-total{padding:16px 18px;gap:24px}.mbsf-head{align-items:flex-start}.mbsf-segments{grid-template-columns:repeat(3,minmax(0,1fr))}.mbsf-segment{min-width:0;padding:8px 4px;border-right:1px solid var(--mb-border);border-bottom:0;font-size:13px}.mbsf-segment:last-child{border-right:0}.mbsf-payer-option{align-items:flex-start}.mbsf-attach-row{align-items:flex-start;flex-wrap:wrap}.mbsf-attach-main{align-items:flex-start;flex-basis:calc(100% - 150px)}.mbsf-attach-type{width:100%;flex-basis:100%;order:3}.mbsf-attach-actions{margin-left:auto}.mbsf-drop{min-height:190px;padding:24px 18px}.mbsf-actions{position:sticky;bottom:86px;z-index:10}.mbsf-submit{width:100%}}
|
|
2192
2327
|
`;
|
|
2193
2328
|
function RequiredMark() {
|
|
2194
|
-
return /* @__PURE__ */
|
|
2329
|
+
return /* @__PURE__ */ jsx5("span", { className: "mbsf-star", children: " *" });
|
|
2195
2330
|
}
|
|
2196
|
-
function Field2({ label, required, error, path, span, children }) {
|
|
2197
|
-
return /* @__PURE__ */
|
|
2198
|
-
/* @__PURE__ */
|
|
2331
|
+
function Field2({ label, required, error, invalid, path, span, children }) {
|
|
2332
|
+
return /* @__PURE__ */ jsxs5("label", { className: `mbsf-field${span ? " mbsf-span" : ""}`, "data-field-path": path, "data-invalid": Boolean(error) || invalid, children: [
|
|
2333
|
+
/* @__PURE__ */ jsxs5("span", { className: "mbsf-label", children: [
|
|
2199
2334
|
label,
|
|
2200
|
-
required ? /* @__PURE__ */
|
|
2335
|
+
required ? /* @__PURE__ */ jsx5(RequiredMark, {}) : null
|
|
2201
2336
|
] }),
|
|
2202
2337
|
children,
|
|
2203
|
-
error ? /* @__PURE__ */
|
|
2338
|
+
error ? /* @__PURE__ */ jsx5("small", { className: "mbsf-error", role: "alert", children: error }) : null
|
|
2204
2339
|
] });
|
|
2205
2340
|
}
|
|
2206
2341
|
function TextDateInput({ value, onChange, disabled, required, ariaLabel }) {
|
|
2207
|
-
const [display, setDisplay] =
|
|
2208
|
-
const [invalid, setInvalid] =
|
|
2209
|
-
|
|
2342
|
+
const [display, setDisplay] = useState5(() => formatBillSubmissionDate(value));
|
|
2343
|
+
const [invalid, setInvalid] = useState5(false);
|
|
2344
|
+
useEffect5(() => {
|
|
2210
2345
|
setDisplay(formatBillSubmissionDate(value));
|
|
2211
2346
|
setInvalid(false);
|
|
2212
2347
|
}, [value]);
|
|
2213
|
-
return /* @__PURE__ */
|
|
2214
|
-
/* @__PURE__ */
|
|
2348
|
+
return /* @__PURE__ */ jsxs5(Fragment4, { children: [
|
|
2349
|
+
/* @__PURE__ */ jsx5("input", { className: "mbsf-input", type: "text", inputMode: "numeric", autoComplete: "off", placeholder: "MM/DD/YYYY", "aria-label": ariaLabel, "aria-invalid": invalid, required, disabled, value: display, onChange: (event) => {
|
|
2215
2350
|
const next = event.target.value;
|
|
2216
2351
|
const parsed = parseBillSubmissionDate(next);
|
|
2217
2352
|
setDisplay(next);
|
|
@@ -2219,21 +2354,21 @@ function TextDateInput({ value, onChange, disabled, required, ariaLabel }) {
|
|
|
2219
2354
|
if (!next.trim()) onChange("");
|
|
2220
2355
|
else if (parsed) onChange(parsed);
|
|
2221
2356
|
}, onBlur: () => setInvalid(Boolean(display && !parseBillSubmissionDate(display))) }),
|
|
2222
|
-
invalid ? /* @__PURE__ */
|
|
2357
|
+
invalid ? /* @__PURE__ */ jsx5("small", { className: "mbsf-error", children: "Use MM/DD/YYYY" }) : null
|
|
2223
2358
|
] });
|
|
2224
2359
|
}
|
|
2225
2360
|
function ComboBox({ value, placeholder, options, disabled, loading, loadingMore, invalid, preserveValueOnOpen = false, onOpen, onQuery, onEndReached, onSelect, createOption, ariaLabel }) {
|
|
2226
|
-
const [open, setOpen] =
|
|
2227
|
-
const [query, setQuery] =
|
|
2361
|
+
const [open, setOpen] = useState5(false);
|
|
2362
|
+
const [query, setQuery] = useState5("");
|
|
2228
2363
|
const visible = useMemo3(() => {
|
|
2229
2364
|
const q = query.trim().toLowerCase();
|
|
2230
|
-
const matches = q ? options.filter((option) => `${option.id} ${option.label} ${option.detail ?? ""}`.toLowerCase().includes(q)) : options;
|
|
2365
|
+
const matches = q ? options.filter((option) => `${option.id} ${option.label} ${option.detail ?? ""} ${option.trailing ?? ""}`.toLowerCase().includes(q)) : options;
|
|
2231
2366
|
const custom = createOption?.(query) ?? null;
|
|
2232
2367
|
return custom && !matches.some((option) => option.id.toUpperCase() === custom.id.toUpperCase()) ? [...matches, custom] : matches;
|
|
2233
2368
|
}, [createOption, options, query]);
|
|
2234
2369
|
const showMenu = open && (loading || visible.length > 0 || query.trim().length >= 2);
|
|
2235
|
-
return /* @__PURE__ */
|
|
2236
|
-
/* @__PURE__ */
|
|
2370
|
+
return /* @__PURE__ */ jsxs5("div", { className: "mbsf-combo", children: [
|
|
2371
|
+
/* @__PURE__ */ jsx5("input", { className: "mbsf-input", role: "combobox", "aria-label": ariaLabel, "aria-invalid": invalid, "aria-expanded": showMenu, autoComplete: "off", disabled, placeholder, value: open ? query : value, onFocus: () => {
|
|
2237
2372
|
const next = preserveValueOnOpen ? value : "";
|
|
2238
2373
|
setOpen(true);
|
|
2239
2374
|
setQuery(next);
|
|
@@ -2244,19 +2379,22 @@ function ComboBox({ value, placeholder, options, disabled, loading, loadingMore,
|
|
|
2244
2379
|
setQuery(event.target.value);
|
|
2245
2380
|
onQuery?.(event.target.value);
|
|
2246
2381
|
}, onBlur: () => setTimeout(() => setOpen(false), 120) }),
|
|
2247
|
-
showMenu ? /* @__PURE__ */
|
|
2382
|
+
showMenu ? /* @__PURE__ */ jsxs5("div", { className: "mbsf-menu", role: "listbox", onScroll: (event) => {
|
|
2248
2383
|
const menu = event.currentTarget;
|
|
2249
2384
|
if (menu.scrollHeight - menu.scrollTop - menu.clientHeight < 120) onEndReached?.();
|
|
2250
2385
|
}, children: [
|
|
2251
|
-
loading && !visible.length ? /* @__PURE__ */
|
|
2386
|
+
loading && !visible.length ? /* @__PURE__ */ jsx5("div", { className: "mbsf-menu-status", children: "Loading\u2026" }) : visible.length ? visible.map((option) => /* @__PURE__ */ jsxs5("button", { className: "mbsf-option", type: "button", role: "option", onMouseDown: (event) => event.preventDefault(), onClick: () => {
|
|
2252
2387
|
onSelect(option);
|
|
2253
2388
|
setOpen(false);
|
|
2254
2389
|
setQuery("");
|
|
2255
2390
|
}, children: [
|
|
2256
|
-
/* @__PURE__ */
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2391
|
+
/* @__PURE__ */ jsxs5("span", { className: "mbsf-option-main", children: [
|
|
2392
|
+
/* @__PURE__ */ jsx5("strong", { children: option.label }),
|
|
2393
|
+
option.detail ? /* @__PURE__ */ jsx5("small", { children: option.detail }) : null
|
|
2394
|
+
] }),
|
|
2395
|
+
option.trailing ? /* @__PURE__ */ jsx5("span", { className: "mbsf-option-route", children: option.trailing }) : null
|
|
2396
|
+
] }, option.id)) : /* @__PURE__ */ jsx5("div", { className: "mbsf-option", children: "No matches" }),
|
|
2397
|
+
loadingMore ? /* @__PURE__ */ jsx5("div", { className: "mbsf-menu-status", children: "Loading more\u2026" }) : null
|
|
2260
2398
|
] }) : null
|
|
2261
2399
|
] });
|
|
2262
2400
|
}
|
|
@@ -2325,28 +2463,28 @@ var BillSubmissionSectionsContext = createContext(null);
|
|
|
2325
2463
|
function BillSubmissionSection({ id }) {
|
|
2326
2464
|
const sections = useContext(BillSubmissionSectionsContext);
|
|
2327
2465
|
if (!sections) throw new Error("Bill submission sections must be rendered inside BillSubmissionForm.");
|
|
2328
|
-
return /* @__PURE__ */
|
|
2466
|
+
return /* @__PURE__ */ jsx5(Fragment4, { children: sections[id] });
|
|
2329
2467
|
}
|
|
2330
2468
|
function BillSubmissionHeader() {
|
|
2331
|
-
return /* @__PURE__ */
|
|
2469
|
+
return /* @__PURE__ */ jsx5(BillSubmissionSection, { id: "header" });
|
|
2332
2470
|
}
|
|
2333
2471
|
function BillSubmissionPatientSection() {
|
|
2334
|
-
return /* @__PURE__ */
|
|
2472
|
+
return /* @__PURE__ */ jsx5(BillSubmissionSection, { id: "patient" });
|
|
2335
2473
|
}
|
|
2336
2474
|
function BillSubmissionClaimSection() {
|
|
2337
|
-
return /* @__PURE__ */
|
|
2475
|
+
return /* @__PURE__ */ jsx5(BillSubmissionSection, { id: "claim" });
|
|
2338
2476
|
}
|
|
2339
2477
|
function BillSubmissionProvidersSection() {
|
|
2340
|
-
return /* @__PURE__ */
|
|
2478
|
+
return /* @__PURE__ */ jsx5(BillSubmissionSection, { id: "providers" });
|
|
2341
2479
|
}
|
|
2342
2480
|
function BillSubmissionServiceLinesSection() {
|
|
2343
|
-
return /* @__PURE__ */
|
|
2481
|
+
return /* @__PURE__ */ jsx5(BillSubmissionSection, { id: "serviceLines" });
|
|
2344
2482
|
}
|
|
2345
2483
|
function BillSubmissionAttachmentsSection() {
|
|
2346
|
-
return /* @__PURE__ */
|
|
2484
|
+
return /* @__PURE__ */ jsx5(BillSubmissionSection, { id: "attachments" });
|
|
2347
2485
|
}
|
|
2348
2486
|
function BillSubmissionActions() {
|
|
2349
|
-
return /* @__PURE__ */
|
|
2487
|
+
return /* @__PURE__ */ jsx5(BillSubmissionSection, { id: "actions" });
|
|
2350
2488
|
}
|
|
2351
2489
|
function BillSubmissionForm({
|
|
2352
2490
|
initialBill,
|
|
@@ -2358,6 +2496,8 @@ function BillSubmissionForm({
|
|
|
2358
2496
|
apiBaseUrl,
|
|
2359
2497
|
fetch: fetchOverride,
|
|
2360
2498
|
onSearchClaimsAdministrators,
|
|
2499
|
+
onGetClaimsAdministratorDirectory,
|
|
2500
|
+
claimsAdministratorHint,
|
|
2361
2501
|
diagnosisOptions = [],
|
|
2362
2502
|
onSearchDiagnoses,
|
|
2363
2503
|
onLookupPostalCode,
|
|
@@ -2379,26 +2519,30 @@ function BillSubmissionForm({
|
|
|
2379
2519
|
attentionMessage,
|
|
2380
2520
|
children
|
|
2381
2521
|
}) {
|
|
2382
|
-
const [bill, setBill] =
|
|
2383
|
-
const [selectedIds, setSelectedIds] =
|
|
2384
|
-
const [removedSourceIds, setRemovedSourceIds] =
|
|
2385
|
-
const [uploads, setUploads] =
|
|
2386
|
-
const [errors, setErrors] =
|
|
2387
|
-
const [sourceAttachmentReportTypes, setSourceAttachmentReportTypes] =
|
|
2388
|
-
const [validationActive, setValidationActive] =
|
|
2389
|
-
const [formError, setFormError] =
|
|
2390
|
-
const [submitting, setSubmitting] =
|
|
2391
|
-
const [routeDialog, setRouteDialog] =
|
|
2392
|
-
const [routeError, setRouteError] =
|
|
2393
|
-
const [payerResults, setPayerResults] =
|
|
2394
|
-
const [payerLoading, setPayerLoading] =
|
|
2395
|
-
const [
|
|
2396
|
-
const [
|
|
2397
|
-
const [
|
|
2398
|
-
const [
|
|
2399
|
-
const [
|
|
2400
|
-
const [
|
|
2401
|
-
const [
|
|
2522
|
+
const [bill, setBill] = useState5(() => cloneInitialBill(initialBill));
|
|
2523
|
+
const [selectedIds, setSelectedIds] = useState5(() => attachments.map((item) => item.id));
|
|
2524
|
+
const [removedSourceIds, setRemovedSourceIds] = useState5([]);
|
|
2525
|
+
const [uploads, setUploads] = useState5([]);
|
|
2526
|
+
const [errors, setErrors] = useState5({});
|
|
2527
|
+
const [sourceAttachmentReportTypes, setSourceAttachmentReportTypes] = useState5(() => Object.fromEntries(attachments.flatMap((item) => item.reportTypeCode ? [[item.id, item.reportTypeCode]] : [])));
|
|
2528
|
+
const [validationActive, setValidationActive] = useState5(false);
|
|
2529
|
+
const [formError, setFormError] = useState5(null);
|
|
2530
|
+
const [submitting, setSubmitting] = useState5(false);
|
|
2531
|
+
const [routeDialog, setRouteDialog] = useState5(null);
|
|
2532
|
+
const [routeError, setRouteError] = useState5(null);
|
|
2533
|
+
const [payerResults, setPayerResults] = useState5([]);
|
|
2534
|
+
const [payerLoading, setPayerLoading] = useState5(false);
|
|
2535
|
+
const [directoryOpen, setDirectoryOpen] = useState5(false);
|
|
2536
|
+
const [directory, setDirectory] = useState5(null);
|
|
2537
|
+
const [directoryLoading, setDirectoryLoading] = useState5(false);
|
|
2538
|
+
const [directoryError, setDirectoryError] = useState5(null);
|
|
2539
|
+
const [diagnosisResults, setDiagnosisResults] = useState5([]);
|
|
2540
|
+
const [diagnosisLoading, setDiagnosisLoading] = useState5(false);
|
|
2541
|
+
const [diagnosisLoadingMore, setDiagnosisLoadingMore] = useState5(false);
|
|
2542
|
+
const [diagnosisQuery, setDiagnosisQuery] = useState5(null);
|
|
2543
|
+
const [diagnosisHasMore, setDiagnosisHasMore] = useState5(true);
|
|
2544
|
+
const [postalStatus, setPostalStatus] = useState5(null);
|
|
2545
|
+
const [dragActive, setDragActive] = useState5(false);
|
|
2402
2546
|
const formRef = useRef2(null);
|
|
2403
2547
|
const fileInput = useRef2(null);
|
|
2404
2548
|
const diagnosisRequest = useRef2(0);
|
|
@@ -2407,7 +2551,7 @@ function BillSubmissionForm({
|
|
|
2407
2551
|
const procedures = useMemo3(() => mergeOptions(DEFAULT_BILL_SUBMISSION_PROCEDURES, procedureOptions), [procedureOptions]);
|
|
2408
2552
|
const modifiers = useMemo3(() => mergeOptions(DEFAULT_BILL_SUBMISSION_MODIFIERS, modifierOptions), [modifierOptions]);
|
|
2409
2553
|
const taxonomies = useMemo3(() => mergeOptions(DEFAULT_BILL_SUBMISSION_TAXONOMIES, taxonomyOptions), [taxonomyOptions]);
|
|
2410
|
-
const [evaluationType, setEvaluationType] =
|
|
2554
|
+
const [evaluationType, setEvaluationType] = useState5(() => initialEvaluationType(initialBill));
|
|
2411
2555
|
const connected = !onSubmit;
|
|
2412
2556
|
const referenceClient = useMemo3(() => getSession || sessionEndpoint || connected ? createBillReferenceClient({ getSession, sessionEndpoint, apiBaseUrl, fetch: fetchOverride }) : null, [getSession, sessionEndpoint, apiBaseUrl, fetchOverride, connected]);
|
|
2413
2557
|
const submissionClient = useMemo3(() => connected ? createBillSubmissionClient({ getSession, sessionEndpoint, apiBaseUrl, fetch: fetchOverride }) : null, [getSession, sessionEndpoint, apiBaseUrl, fetchOverride, connected]);
|
|
@@ -2416,7 +2560,7 @@ function BillSubmissionForm({
|
|
|
2416
2560
|
const forcedAttachmentReportType = showAttachmentReportTypes ? void 0 : defaultAttachmentReportType ?? MED_LEGAL_REPORT_TYPE_CODE;
|
|
2417
2561
|
const reportTypeOptions = useMemo3(() => attachmentReportTypes.map((item) => ({ id: item.code, label: item.code.replace(/^OZ:/, ""), detail: item.label })), [attachmentReportTypes]);
|
|
2418
2562
|
const missingAttachmentReportType = showAttachmentReportTypes && (selectedIds.some((id) => !(sourceAttachmentReportTypes[id] || attachments.find((item) => item.id === id)?.reportTypeCode || defaultAttachmentReportType)) || uploads.some((upload) => !(upload.reportTypeCode || defaultAttachmentReportType)));
|
|
2419
|
-
|
|
2563
|
+
useEffect5(() => {
|
|
2420
2564
|
setBill(cloneInitialBill(initialBill));
|
|
2421
2565
|
setEvaluationType(initialEvaluationType(initialBill));
|
|
2422
2566
|
setSelectedIds(attachments.map((item) => item.id));
|
|
@@ -2432,12 +2576,12 @@ function BillSubmissionForm({
|
|
|
2432
2576
|
diagnosisRequest.current += 1;
|
|
2433
2577
|
diagnosisAppendPending.current = false;
|
|
2434
2578
|
}, [initialBill, attachments]);
|
|
2435
|
-
|
|
2579
|
+
useEffect5(() => {
|
|
2436
2580
|
if (!validationActive) return;
|
|
2437
2581
|
const next = validateBillSubmission(bill).fieldErrors;
|
|
2438
2582
|
setErrors(missingAttachmentReportType ? { ...next, attachments: "Select a report type for every attachment." } : next);
|
|
2439
2583
|
}, [bill, missingAttachmentReportType, validationActive]);
|
|
2440
|
-
|
|
2584
|
+
useEffect5(() => {
|
|
2441
2585
|
const root = formRef.current;
|
|
2442
2586
|
if (!root) return;
|
|
2443
2587
|
const nodes = Array.from(root.querySelectorAll("[data-field-path]"));
|
|
@@ -2465,7 +2609,7 @@ function BillSubmissionForm({
|
|
|
2465
2609
|
if (selectedIds.length + uploads.length + files.length > MAX_DOCUMENTS) return setFormError(`A bill can include at most ${MAX_DOCUMENTS} attachments.`);
|
|
2466
2610
|
setUploads((current) => [...current, ...files.map((file) => ({ file, documentType: "other", ...defaultAttachmentReportType ? { reportTypeCode: defaultAttachmentReportType } : {} }))]);
|
|
2467
2611
|
}, [defaultAttachmentReportType, selectedIds.length, uploads]);
|
|
2468
|
-
|
|
2612
|
+
useEffect5(() => {
|
|
2469
2613
|
const over = (event) => {
|
|
2470
2614
|
if (event.dataTransfer?.types.includes("Files")) {
|
|
2471
2615
|
event.preventDefault();
|
|
@@ -2504,8 +2648,8 @@ function BillSubmissionForm({
|
|
|
2504
2648
|
}
|
|
2505
2649
|
return next;
|
|
2506
2650
|
})) }));
|
|
2507
|
-
const text = (value, onChange, options = {}) => /* @__PURE__ */
|
|
2508
|
-
const runPayerSearch = useCallback(async (query
|
|
2651
|
+
const text = (value, onChange, options = {}) => /* @__PURE__ */ jsx5("input", { className: "mbsf-input", disabled: locked, value: value ?? "", onChange: (event) => onChange(event.target.value), ...options });
|
|
2652
|
+
const runPayerSearch = useCallback(async (query) => {
|
|
2509
2653
|
const trimmed = query.trim();
|
|
2510
2654
|
if (trimmed.length < 2) {
|
|
2511
2655
|
setPayerResults([]);
|
|
@@ -2519,8 +2663,6 @@ function BillSubmissionForm({
|
|
|
2519
2663
|
const results = await search(trimmed, bill.claim.claimNumber);
|
|
2520
2664
|
if (request !== payerRequest.current) return;
|
|
2521
2665
|
setPayerResults(results);
|
|
2522
|
-
const exact = autoSelect ? exactClaimsAdministratorMatch(results, trimmed) : void 0;
|
|
2523
|
-
if (exact) setBill((current) => ({ ...current, claim: { ...current.claim, claimsAdministrator: chooseClaimsAdministrator(exact) } }));
|
|
2524
2666
|
} catch (caught) {
|
|
2525
2667
|
if (request === payerRequest.current) setFormError(caught instanceof Error ? caught.message : "Claims administrator search is unavailable.");
|
|
2526
2668
|
} finally {
|
|
@@ -2533,13 +2675,8 @@ function BillSubmissionForm({
|
|
|
2533
2675
|
if (selected?.id && selected.name === query) return current;
|
|
2534
2676
|
return { ...current, claim: { ...current.claim, claimsAdministrator: { name: query } } };
|
|
2535
2677
|
});
|
|
2536
|
-
void runPayerSearch(query
|
|
2678
|
+
void runPayerSearch(query);
|
|
2537
2679
|
};
|
|
2538
|
-
useEffect4(() => {
|
|
2539
|
-
const payer = bill.claim.claimsAdministrator;
|
|
2540
|
-
if (!payer?.name || payer.name.trim().length < 2) return;
|
|
2541
|
-
void runPayerSearch(payer.name, !payer.id);
|
|
2542
|
-
}, [bill.claim.claimsAdministrator?.id, bill.claim.claimsAdministrator?.name, bill.claim.claimNumber, runPayerSearch]);
|
|
2543
2680
|
const loadDiagnoses = (query, append = false) => {
|
|
2544
2681
|
const trimmed = query.trim();
|
|
2545
2682
|
const search = onSearchDiagnoses ?? referenceClient?.searchDiagnosisCodes;
|
|
@@ -2680,226 +2817,224 @@ function BillSubmissionForm({
|
|
|
2680
2817
|
}
|
|
2681
2818
|
}
|
|
2682
2819
|
const claimsAdministratorError = errors["claim.claimsAdministrator"];
|
|
2683
|
-
const selectedPayer = payerResults.find((payer) => payer.id === bill.claim.claimsAdministrator?.id);
|
|
2684
|
-
const payerRecommendations = bill.claim.claimsAdministrator?.id ? [] : claimsAdministratorRecommendations(payerResults);
|
|
2685
2820
|
const choosePayer = (payer) => setBill((current) => ({ ...current, claim: { ...current.claim, claimsAdministrator: chooseClaimsAdministrator(payer) } }));
|
|
2686
2821
|
const administrator = bill.claim.claimsAdministrator;
|
|
2687
2822
|
const subpayorOptions = administrator?.payerSelectionRequired ? administrator.payers ?? [] : [];
|
|
2688
2823
|
const subpayorError = errors["claim.claimsAdministrator.payerId"];
|
|
2689
2824
|
const selectedSubpayor = subpayorOptions.find((option) => option.id === administrator?.payerId);
|
|
2690
2825
|
const chooseSubpayor = (payerId) => setBill((current) => current.claim.claimsAdministrator ? { ...current, claim: { ...current.claim, claimsAdministrator: { ...current.claim.claimsAdministrator, payerId } } } : current);
|
|
2691
|
-
const
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2826
|
+
const openAdministratorDirectory = async () => {
|
|
2827
|
+
if (!administrator?.id) return;
|
|
2828
|
+
setDirectoryOpen(true);
|
|
2829
|
+
setDirectory(null);
|
|
2830
|
+
setDirectoryError(null);
|
|
2831
|
+
setDirectoryLoading(true);
|
|
2832
|
+
try {
|
|
2833
|
+
const load = onGetClaimsAdministratorDirectory ?? referenceClient?.getClaimsAdministratorDirectory;
|
|
2834
|
+
if (!load) throw new Error("Claims administrator details are unavailable.");
|
|
2835
|
+
setDirectory(await load(administrator.id, bill.claim.injuryState));
|
|
2836
|
+
} catch (caught) {
|
|
2837
|
+
setDirectoryError(caught instanceof Error ? caught.message : "Unable to load claims administrator details.");
|
|
2838
|
+
} finally {
|
|
2839
|
+
setDirectoryLoading(false);
|
|
2840
|
+
}
|
|
2841
|
+
};
|
|
2842
|
+
const headerSection = /* @__PURE__ */ jsxs5("div", { className: "mbsf-head", children: [
|
|
2843
|
+
/* @__PURE__ */ jsxs5("div", { children: [
|
|
2844
|
+
/* @__PURE__ */ jsx5("h3", { className: "mbsf-title", children: heading }),
|
|
2845
|
+
/* @__PURE__ */ jsx5("p", { className: "mbsf-copy", children: description })
|
|
2695
2846
|
] }),
|
|
2696
|
-
/* @__PURE__ */
|
|
2697
|
-
/* @__PURE__ */
|
|
2847
|
+
/* @__PURE__ */ jsxs5("span", { className: "mbsf-required", children: [
|
|
2848
|
+
/* @__PURE__ */ jsx5(RequiredMark, {}),
|
|
2698
2849
|
" Required"
|
|
2699
2850
|
] })
|
|
2700
2851
|
] });
|
|
2701
|
-
const patientSection = /* @__PURE__ */
|
|
2702
|
-
/* @__PURE__ */
|
|
2703
|
-
/* @__PURE__ */
|
|
2704
|
-
/* @__PURE__ */
|
|
2705
|
-
/* @__PURE__ */
|
|
2706
|
-
/* @__PURE__ */
|
|
2707
|
-
/* @__PURE__ */
|
|
2708
|
-
/* @__PURE__ */
|
|
2709
|
-
/* @__PURE__ */
|
|
2710
|
-
/* @__PURE__ */
|
|
2852
|
+
const patientSection = /* @__PURE__ */ jsxs5("fieldset", { className: "mbsf-card", disabled: locked, children: [
|
|
2853
|
+
/* @__PURE__ */ jsx5("legend", { className: "mbsf-legend", children: "Patient" }),
|
|
2854
|
+
/* @__PURE__ */ jsxs5("div", { className: "mbsf-grid", children: [
|
|
2855
|
+
/* @__PURE__ */ jsx5(Field2, { path: "patient.firstName", label: "First name", required: true, error: errors["patient.firstName"], children: text(bill.patient.firstName, (firstName) => setBill((c) => ({ ...c, patient: { ...c.patient, firstName } }))) }),
|
|
2856
|
+
/* @__PURE__ */ jsx5(Field2, { path: "patient.lastName", label: "Last name", required: true, error: errors["patient.lastName"], children: text(bill.patient.lastName, (lastName) => setBill((c) => ({ ...c, patient: { ...c.patient, lastName } }))) }),
|
|
2857
|
+
/* @__PURE__ */ jsx5(Field2, { label: "Middle name", children: text(bill.patient.middleName, (middleName) => setBill((c) => ({ ...c, patient: { ...c.patient, middleName } }))) }),
|
|
2858
|
+
/* @__PURE__ */ jsx5(Field2, { label: "Phone (optional)", children: text(bill.patient.phone, (phone) => setBill((c) => ({ ...c, patient: { ...c.patient, phone } })), { type: "tel" }) }),
|
|
2859
|
+
/* @__PURE__ */ jsx5(Field2, { path: "patient.dateOfBirth", label: "Date of birth", required: true, error: errors["patient.dateOfBirth"], children: /* @__PURE__ */ jsx5(TextDateInput, { ariaLabel: "Date of birth", value: bill.patient.dateOfBirth, disabled: locked, required: true, onChange: (dateOfBirth) => setBill((c) => ({ ...c, patient: { ...c.patient, dateOfBirth } })) }) }),
|
|
2860
|
+
/* @__PURE__ */ jsx5(Field2, { path: "patient.address.line1", label: "Address", required: true, span: true, error: errors["patient.address.line1"], children: text(bill.patient.address.line1, (line1) => setAddress({ line1 }), { placeholder: "Street address" }) }),
|
|
2861
|
+
/* @__PURE__ */ jsxs5(Field2, { path: "patient.address.postalCode", label: "ZIP", required: true, error: errors["patient.address.postalCode"], children: [
|
|
2711
2862
|
text(bill.patient.address.postalCode, updatePostalCode, { maxLength: 10 }),
|
|
2712
|
-
postalStatus ? /* @__PURE__ */
|
|
2863
|
+
postalStatus ? /* @__PURE__ */ jsx5("small", { className: "mbsf-help", children: postalStatus }) : null
|
|
2713
2864
|
] }),
|
|
2714
|
-
/* @__PURE__ */
|
|
2715
|
-
/* @__PURE__ */
|
|
2865
|
+
/* @__PURE__ */ jsx5(Field2, { path: "patient.address.city", label: "City", required: true, error: errors["patient.address.city"], children: text(bill.patient.address.city, (city) => setAddress({ city })) }),
|
|
2866
|
+
/* @__PURE__ */ jsx5(Field2, { path: "patient.address.state", label: "State", required: true, error: errors["patient.address.state"], children: text(bill.patient.address.state, (state) => setAddress({ state: state.toUpperCase() }), { maxLength: 2 }) })
|
|
2716
2867
|
] })
|
|
2717
2868
|
] });
|
|
2718
|
-
const claimSection = /* @__PURE__ */
|
|
2719
|
-
/* @__PURE__ */
|
|
2720
|
-
/* @__PURE__ */
|
|
2721
|
-
/* @__PURE__ */
|
|
2722
|
-
/* @__PURE__ */
|
|
2869
|
+
const claimSection = /* @__PURE__ */ jsxs5("fieldset", { className: "mbsf-card", disabled: locked, children: [
|
|
2870
|
+
/* @__PURE__ */ jsx5("legend", { className: "mbsf-legend", children: "Injury & claim" }),
|
|
2871
|
+
/* @__PURE__ */ jsxs5("div", { className: "mbsf-grid", children: [
|
|
2872
|
+
/* @__PURE__ */ jsx5(Field2, { path: "service.date", label: "Date of service", required: true, error: errors["service.date"], children: /* @__PURE__ */ jsx5(TextDateInput, { ariaLabel: "Date of service", value: bill.service.date, disabled: locked, required: true, onChange: (date2) => setBill((c) => ({ ...c, service: { ...c.service, date: date2 } })) }) }),
|
|
2873
|
+
/* @__PURE__ */ jsxs5(Field2, { label: "Treatment authorization # (optional)", children: [
|
|
2723
2874
|
text(bill.service.authorizationNumber, (authorizationNumber) => setBill((c) => ({ ...c, service: { ...c.service, authorizationNumber } })), { placeholder: "Utilization-review authorization number" }),
|
|
2724
|
-
/* @__PURE__ */
|
|
2875
|
+
/* @__PURE__ */ jsx5("small", { className: "mbsf-help", children: "Rides on the bill as CMS-1500 Box 23 / 837 REF*G1." })
|
|
2725
2876
|
] }),
|
|
2726
|
-
/* @__PURE__ */
|
|
2727
|
-
/* @__PURE__ */
|
|
2728
|
-
/* @__PURE__ */
|
|
2729
|
-
/* @__PURE__ */
|
|
2730
|
-
/* @__PURE__ */
|
|
2731
|
-
/* @__PURE__ */
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
selectedPayer.name
|
|
2736
|
-
] }) : null,
|
|
2737
|
-
selectedPayer?.signals?.length ? /* @__PURE__ */ jsx4("div", { className: "mbsf-payer-signals", children: selectedPayer.signals.map((signal, index) => /* @__PURE__ */ jsxs4("span", { "data-state": signal.state, children: [
|
|
2738
|
-
signal.state === "match" ? "\u2713" : "!",
|
|
2739
|
-
" ",
|
|
2740
|
-
signal.label
|
|
2741
|
-
] }, `${signal.kind}-${index}`)) }) : null,
|
|
2742
|
-
!selectedPayer && payerRecommendations.length ? /* @__PURE__ */ jsxs4(Fragment3, { children: [
|
|
2743
|
-
/* @__PURE__ */ jsxs4("p", { className: "mbsf-payer-intro", children: [
|
|
2744
|
-
"Confirm the best routing match for ",
|
|
2745
|
-
/* @__PURE__ */ jsx4("strong", { children: bill.claim.claimsAdministrator?.name }),
|
|
2746
|
-
":"
|
|
2747
|
-
] }),
|
|
2748
|
-
/* @__PURE__ */ jsx4("div", { className: "mbsf-payer-list", children: payerRecommendations.map((payer) => /* @__PURE__ */ jsxs4("div", { className: "mbsf-payer-option", children: [
|
|
2749
|
-
/* @__PURE__ */ jsxs4("div", { className: "mbsf-payer-option-main", children: [
|
|
2750
|
-
/* @__PURE__ */ jsx4("strong", { children: payer.name }),
|
|
2751
|
-
payer.signals?.length ? /* @__PURE__ */ jsx4("div", { className: "mbsf-payer-signals", children: payer.signals.map((signal, index) => /* @__PURE__ */ jsxs4("span", { "data-state": signal.state, children: [
|
|
2752
|
-
signal.state === "match" ? "\u2713" : "!",
|
|
2753
|
-
" ",
|
|
2754
|
-
signal.label
|
|
2755
|
-
] }, `${signal.kind}-${index}`)) }) : /* @__PURE__ */ jsx4("small", { className: "mbsf-help", children: "Directory match" })
|
|
2756
|
-
] }),
|
|
2757
|
-
/* @__PURE__ */ jsx4("button", { className: "mbsf-secondary", type: "button", onClick: () => choosePayer(payer), children: "Use" })
|
|
2758
|
-
] }, payer.id)) })
|
|
2877
|
+
/* @__PURE__ */ jsx5(Field2, { path: "claim.dateOfInjury", label: "Date of injury", required: true, error: errors["claim.dateOfInjury"], children: /* @__PURE__ */ jsx5(TextDateInput, { ariaLabel: "Date of injury", value: bill.claim.dateOfInjury, disabled: locked, required: true, onChange: (dateOfInjury) => setBill((c) => ({ ...c, claim: { ...c.claim, dateOfInjury } })) }) }),
|
|
2878
|
+
/* @__PURE__ */ jsx5(Field2, { path: "claim.employer", label: "Employer name", required: true, error: errors["claim.employer"], children: text(bill.claim.employer, (employer) => setBill((c) => ({ ...c, claim: { ...c.claim, employer } }))) }),
|
|
2879
|
+
/* @__PURE__ */ jsx5(Field2, { path: "claim.claimNumber", label: "Claim number", required: true, error: errors["claim.claimNumber"], children: text(bill.claim.claimNumber, (claimNumber) => setBill((c) => ({ ...c, claim: { ...c.claim, claimNumber } }))) }),
|
|
2880
|
+
/* @__PURE__ */ jsx5(Field2, { label: "WCAB / ADJ number (optional)", children: text(bill.claim.adjNumber, (adjNumber) => setBill((c) => ({ ...c, claim: { ...c.claim, adjNumber } }))) }),
|
|
2881
|
+
/* @__PURE__ */ jsxs5(Field2, { path: "claim.claimsAdministrator", label: "Claims administrator", required: true, span: true, error: claimsAdministratorError, invalid: !administrator?.id, children: [
|
|
2882
|
+
/* @__PURE__ */ jsx5(ComboBox, { ariaLabel: "Claims administrator", invalid: Boolean(claimsAdministratorError) || !administrator?.id, disabled: locked, loading: payerLoading, preserveValueOnOpen: true, value: administrator?.name ?? "", placeholder: "Search the claims administrator directory\u2026", options: payerResults.map((payer) => ({ id: payer.id, label: payer.name, detail: [payer.aliases?.length ? `Also known as ${payer.aliases.join(", ")}` : "", payer.claimNumberHint ?? "", payer.affiliatedEntities?.length ? `Affiliated with ${payer.affiliatedEntities.join(", ")}` : ""].filter(Boolean).join(" \xB7 ") || "Claims administrator", ...payer.route ? { trailing: payer.route } : {} })), onQuery: searchPayers, onSelect: (option) => choosePayer(payerResults.find((payer) => payer.id === option.id) ?? { id: option.id, name: option.label }) }),
|
|
2883
|
+
claimsAdministratorHint ? /* @__PURE__ */ jsxs5("small", { className: "mbsf-help", children: [
|
|
2884
|
+
"Claims administrator in your system: ",
|
|
2885
|
+
claimsAdministratorHint
|
|
2759
2886
|
] }) : null,
|
|
2760
|
-
|
|
2887
|
+
administrator?.id ? /* @__PURE__ */ jsxs5("button", { className: "mbsf-directory-link", type: "button", onClick: () => {
|
|
2888
|
+
void openAdministratorDirectory();
|
|
2889
|
+
}, children: [
|
|
2890
|
+
"View contacts and routing details for ",
|
|
2891
|
+
administrator.name
|
|
2892
|
+
] }) : /* @__PURE__ */ jsx5("small", { className: "mbsf-help", children: "Search the directory and choose a claims administrator." })
|
|
2761
2893
|
] }),
|
|
2762
|
-
administrator?.payerSelectionRequired && subpayorOptions.length ? /* @__PURE__ */
|
|
2763
|
-
/* @__PURE__ */
|
|
2764
|
-
|
|
2765
|
-
|
|
2894
|
+
administrator?.payerSelectionRequired && subpayorOptions.length ? /* @__PURE__ */ jsxs5(Field2, { path: "claim.claimsAdministrator.payerId", label: "Payer", required: true, span: true, error: subpayorError, children: [
|
|
2895
|
+
/* @__PURE__ */ jsx5(ComboBox, { ariaLabel: "Payer", invalid: Boolean(subpayorError), disabled: locked, preserveValueOnOpen: true, value: selectedSubpayor?.label ?? "", placeholder: "Select the payer for this claims administrator\u2026", options: subpayorOptions.map((option) => {
|
|
2896
|
+
const detail = [option.aliases?.length ? `Also known as ${option.aliases.join(", ")}` : "", option.hint ?? "", option.affiliatedEntities?.length ? `Affiliated with ${option.affiliatedEntities.join(", ")}` : "", option.default ? "Default" : ""].filter(Boolean).join(" \xB7 ");
|
|
2897
|
+
return { id: option.id, label: option.label, ...detail ? { detail } : {}, ...option.route ? { trailing: option.route } : {} };
|
|
2898
|
+
}), onSelect: (option) => chooseSubpayor(option.id) }),
|
|
2899
|
+
selectedSubpayor ? /* @__PURE__ */ jsxs5("div", { className: "mbsf-payer-status", role: "status", children: [
|
|
2900
|
+
/* @__PURE__ */ jsx5("strong", { children: "\u2713 Payer set:" }),
|
|
2766
2901
|
" ",
|
|
2767
2902
|
selectedSubpayor.label
|
|
2768
|
-
] }) : /* @__PURE__ */
|
|
2903
|
+
] }) : /* @__PURE__ */ jsx5("small", { className: "mbsf-help", children: "This claims administrator routes bills per payer. Choose the payer that should receive this bill." })
|
|
2769
2904
|
] }) : null,
|
|
2770
|
-
/* @__PURE__ */
|
|
2771
|
-
/* @__PURE__ */
|
|
2772
|
-
/* @__PURE__ */
|
|
2905
|
+
/* @__PURE__ */ jsx5(Field2, { label: "Injury description (optional)", span: true, children: text(bill.claim.description, (description2) => setBill((c) => ({ ...c, claim: { ...c.claim, description: description2 } }))) }),
|
|
2906
|
+
/* @__PURE__ */ jsxs5(Field2, { path: "diagnoses", label: "Diagnosis codes (ICD-10)", required: true, span: true, error: errors.diagnoses, children: [
|
|
2907
|
+
/* @__PURE__ */ jsx5("div", { className: "mbsf-quick-picks", "aria-label": "Common diagnosis codes", children: BILL_SUBMISSION_DIAGNOSIS_QUICK_PICKS.map((option) => {
|
|
2773
2908
|
const selected = (bill.diagnoses ?? []).includes(option.code);
|
|
2774
|
-
return /* @__PURE__ */
|
|
2909
|
+
return /* @__PURE__ */ jsxs5("button", { className: "mbsf-quick-pick", "data-selected": selected, type: "button", "aria-pressed": selected, title: `${option.code} \u2014 ${option.description}`, onClick: () => setBill((current) => ({ ...current, diagnoses: selected ? (current.diagnoses ?? []).filter((code) => code !== option.code) : [.../* @__PURE__ */ new Set([...current.diagnoses ?? [], option.code])] })), children: [
|
|
2775
2910
|
selected ? "\u2713" : "+",
|
|
2776
2911
|
" ",
|
|
2777
2912
|
option.label
|
|
2778
2913
|
] }, option.code);
|
|
2779
2914
|
}) }),
|
|
2780
|
-
/* @__PURE__ */
|
|
2915
|
+
/* @__PURE__ */ jsx5("div", { className: "mbsf-chips", children: (bill.diagnoses ?? []).map((code) => {
|
|
2781
2916
|
const option = [...BILL_SUBMISSION_DIAGNOSIS_QUICK_PICKS, ...diagnosisChoices].find((item) => item.code === code);
|
|
2782
|
-
return /* @__PURE__ */
|
|
2783
|
-
/* @__PURE__ */
|
|
2917
|
+
return /* @__PURE__ */ jsxs5("span", { className: "mbsf-chip", children: [
|
|
2918
|
+
/* @__PURE__ */ jsx5("strong", { children: code }),
|
|
2784
2919
|
option?.description ? ` ${option.description}` : "",
|
|
2785
|
-
/* @__PURE__ */
|
|
2920
|
+
/* @__PURE__ */ jsx5("button", { type: "button", "aria-label": `Remove ${code}`, onClick: () => setBill((c) => ({ ...c, diagnoses: (c.diagnoses ?? []).filter((item) => item !== code) })), children: "\xD7" })
|
|
2786
2921
|
] }, code);
|
|
2787
2922
|
}) }),
|
|
2788
|
-
/* @__PURE__ */
|
|
2923
|
+
/* @__PURE__ */ jsx5(ComboBox, { ariaLabel: "Add diagnosis code", invalid: Boolean(errors.diagnoses), disabled: locked, loading: diagnosisLoading, loadingMore: diagnosisLoadingMore, value: "", placeholder: bill.diagnoses?.length ?? 0 ? `${bill.diagnoses.length} selected \u2014 add more\u2026` : "Search ICD-10 codes\u2026", options: diagnosisChoices.filter((item) => !(bill.diagnoses ?? []).includes(item.code)).map((item) => ({ id: item.code, label: item.code, detail: item.description })), onOpen: () => {
|
|
2789
2924
|
if (diagnosisQuery !== "") loadDiagnoses("");
|
|
2790
2925
|
}, onQuery: searchDiagnoses, onEndReached: () => loadDiagnoses(diagnosisQuery ?? "", true), onSelect: (option) => setBill((c) => ({ ...c, diagnoses: [.../* @__PURE__ */ new Set([...c.diagnoses ?? [], option.id])] })) })
|
|
2791
2926
|
] })
|
|
2792
2927
|
] })
|
|
2793
2928
|
] });
|
|
2794
|
-
const providersSection = /* @__PURE__ */
|
|
2795
|
-
/* @__PURE__ */
|
|
2796
|
-
/* @__PURE__ */
|
|
2797
|
-
/* @__PURE__ */
|
|
2798
|
-
/* @__PURE__ */
|
|
2799
|
-
/* @__PURE__ */
|
|
2800
|
-
/* @__PURE__ */
|
|
2801
|
-
/* @__PURE__ */
|
|
2802
|
-
/* @__PURE__ */
|
|
2803
|
-
/* @__PURE__ */
|
|
2804
|
-
/* @__PURE__ */
|
|
2805
|
-
/* @__PURE__ */
|
|
2806
|
-
/* @__PURE__ */
|
|
2807
|
-
/* @__PURE__ */
|
|
2808
|
-
/* @__PURE__ */
|
|
2809
|
-
/* @__PURE__ */
|
|
2810
|
-
/* @__PURE__ */
|
|
2811
|
-
/* @__PURE__ */
|
|
2929
|
+
const providersSection = /* @__PURE__ */ jsxs5("fieldset", { className: "mbsf-card", disabled: locked, children: [
|
|
2930
|
+
/* @__PURE__ */ jsx5("legend", { className: "mbsf-legend", children: "Providers & place of service" }),
|
|
2931
|
+
/* @__PURE__ */ jsxs5("div", { className: "mbsf-grid", children: [
|
|
2932
|
+
/* @__PURE__ */ jsx5("h4", { className: "mbsf-subhead", children: "Billing provider" }),
|
|
2933
|
+
/* @__PURE__ */ jsx5(Field2, { path: "billingProvider.name", label: "Billing provider name", required: true, error: errors["billingProvider.name"], children: text(bill.billingProvider?.name, (name) => setBill((c) => ({ ...c, billingProvider: { ...c.billingProvider, name } }))) }),
|
|
2934
|
+
/* @__PURE__ */ jsx5(Field2, { path: "billingProvider.taxId", label: "Tax ID (EIN / SSN)", required: true, error: errors["billingProvider.taxId"], children: text(bill.billingProvider?.taxId, (taxId) => setBill((c) => ({ ...c, billingProvider: { ...c.billingProvider, taxId } })), { inputMode: "numeric" }) }),
|
|
2935
|
+
/* @__PURE__ */ jsx5(Field2, { path: "billingProvider.npi", label: "Billing provider NPI", required: true, error: errors["billingProvider.npi"], children: text(bill.billingProvider?.npi, (npi) => setBill((c) => ({ ...c, billingProvider: { ...c.billingProvider, npi } })), { inputMode: "numeric", maxLength: 10 }) }),
|
|
2936
|
+
/* @__PURE__ */ jsx5(Field2, { path: "billingProvider.phone", label: "Billing provider phone", required: true, error: errors["billingProvider.phone"], children: text(bill.billingProvider?.phone, (phone) => setBill((c) => ({ ...c, billingProvider: { ...c.billingProvider, phone } })), { type: "tel" }) }),
|
|
2937
|
+
/* @__PURE__ */ jsx5(Field2, { path: "billingProvider.address.line1", label: "Billing address line 1", required: true, span: true, error: errors["billingProvider.address.line1"], children: text(bill.billingProvider?.address?.line1, (line1) => setBill((c) => ({ ...c, billingProvider: { ...c.billingProvider, address: { line1, line2: c.billingProvider?.address?.line2 ?? "", city: c.billingProvider?.address?.city ?? "", state: c.billingProvider?.address?.state ?? "", postalCode: c.billingProvider?.address?.postalCode ?? "" } } }))) }),
|
|
2938
|
+
/* @__PURE__ */ jsx5(Field2, { label: "Billing address line 2 (optional)", span: true, children: text(bill.billingProvider?.address?.line2, (line2) => setBill((c) => ({ ...c, billingProvider: { ...c.billingProvider, address: { line1: c.billingProvider?.address?.line1 ?? "", line2, city: c.billingProvider?.address?.city ?? "", state: c.billingProvider?.address?.state ?? "", postalCode: c.billingProvider?.address?.postalCode ?? "" } } }))) }),
|
|
2939
|
+
/* @__PURE__ */ jsx5(Field2, { path: "billingProvider.address.city", label: "Billing city", required: true, error: errors["billingProvider.address.city"], children: text(bill.billingProvider?.address?.city, (city) => setBill((c) => ({ ...c, billingProvider: { ...c.billingProvider, address: { line1: c.billingProvider?.address?.line1 ?? "", line2: c.billingProvider?.address?.line2 ?? "", city, state: c.billingProvider?.address?.state ?? "", postalCode: c.billingProvider?.address?.postalCode ?? "" } } }))) }),
|
|
2940
|
+
/* @__PURE__ */ jsx5(Field2, { path: "billingProvider.address.state", label: "Billing state", required: true, error: errors["billingProvider.address.state"], children: text(bill.billingProvider?.address?.state, (state) => setBill((c) => ({ ...c, billingProvider: { ...c.billingProvider, address: { line1: c.billingProvider?.address?.line1 ?? "", line2: c.billingProvider?.address?.line2 ?? "", city: c.billingProvider?.address?.city ?? "", state: state.toUpperCase(), postalCode: c.billingProvider?.address?.postalCode ?? "" } } })), { maxLength: 2 }) }),
|
|
2941
|
+
/* @__PURE__ */ jsx5(Field2, { path: "billingProvider.address.postalCode", label: "Billing ZIP", required: true, error: errors["billingProvider.address.postalCode"], children: text(bill.billingProvider?.address?.postalCode, (postalCode) => setBill((c) => ({ ...c, billingProvider: { ...c.billingProvider, address: { line1: c.billingProvider?.address?.line1 ?? "", line2: c.billingProvider?.address?.line2 ?? "", city: c.billingProvider?.address?.city ?? "", state: c.billingProvider?.address?.state ?? "", postalCode } } }))) }),
|
|
2942
|
+
/* @__PURE__ */ jsx5("h4", { className: "mbsf-subhead", children: "Rendering provider" }),
|
|
2943
|
+
/* @__PURE__ */ jsx5(Field2, { path: "renderingProvider.name", label: "Rendering provider name", required: true, error: errors["renderingProvider.name"], children: text(bill.renderingProvider?.name, (name) => setBill((c) => ({ ...c, renderingProvider: { ...c.renderingProvider, name } }))) }),
|
|
2944
|
+
/* @__PURE__ */ jsx5(Field2, { path: "renderingProvider.npi", label: "Rendering provider NPI", required: true, error: errors["renderingProvider.npi"], children: text(bill.renderingProvider?.npi, (npi) => setBill((c) => ({ ...c, renderingProvider: { ...c.renderingProvider, npi } })), { inputMode: "numeric", maxLength: 10 }) }),
|
|
2945
|
+
/* @__PURE__ */ jsxs5(Field2, { path: "renderingProvider.taxonomy", label: "Rendering taxonomy", required: true, error: errors["renderingProvider.taxonomy"], children: [
|
|
2946
|
+
/* @__PURE__ */ jsx5(ComboBox, { ariaLabel: "Rendering taxonomy", invalid: Boolean(errors["renderingProvider.taxonomy"]), disabled: locked, preserveValueOnOpen: true, value: bill.renderingProvider?.taxonomy ?? "", placeholder: "Search specialty name or taxonomy code\u2026", options: taxonomies.map((item) => ({ id: item.code, label: item.description, detail: item.code })), createOption: (query) => {
|
|
2812
2947
|
const code = query.trim().toUpperCase();
|
|
2813
2948
|
return /^[A-Z0-9]{10}$/.test(code) ? { id: code, label: code, detail: "Use this taxonomy code" } : null;
|
|
2814
2949
|
}, onSelect: (option) => setBill((c) => ({ ...c, renderingProvider: { ...c.renderingProvider, taxonomy: option.id } })) }),
|
|
2815
|
-
/* @__PURE__ */
|
|
2950
|
+
/* @__PURE__ */ jsx5("small", { className: "mbsf-help", children: "Search by specialty name or 10-character taxonomy code." })
|
|
2816
2951
|
] }),
|
|
2817
|
-
/* @__PURE__ */
|
|
2818
|
-
/* @__PURE__ */
|
|
2819
|
-
/* @__PURE__ */
|
|
2820
|
-
/* @__PURE__ */
|
|
2821
|
-
/* @__PURE__ */
|
|
2822
|
-
/* @__PURE__ */
|
|
2823
|
-
/* @__PURE__ */
|
|
2952
|
+
/* @__PURE__ */ jsx5("h4", { className: "mbsf-subhead", children: "Service facility" }),
|
|
2953
|
+
/* @__PURE__ */ jsx5(Field2, { path: "serviceLocation.placeOfServiceCode", label: "Place of service code", required: true, error: errors["serviceLocation.placeOfServiceCode"], children: text(bill.serviceLocation?.placeOfServiceCode, (placeOfServiceCode) => setBill((c) => ({ ...c, serviceLocation: { ...c.serviceLocation, placeOfServiceCode } })), { inputMode: "numeric", maxLength: 2, placeholder: "11" }) }),
|
|
2954
|
+
/* @__PURE__ */ jsx5(Field2, { path: "serviceLocation.address.line1", label: "Service address line 1", required: true, span: true, error: errors["serviceLocation.address.line1"], children: text(bill.serviceLocation?.address?.line1, (line1) => setBill((c) => ({ ...c, serviceLocation: { ...c.serviceLocation, address: { line1, line2: c.serviceLocation?.address?.line2 ?? "", city: c.serviceLocation?.address?.city ?? "", state: c.serviceLocation?.address?.state ?? "", postalCode: c.serviceLocation?.address?.postalCode ?? "" } } }))) }),
|
|
2955
|
+
/* @__PURE__ */ jsx5(Field2, { label: "Service address line 2 (optional)", span: true, children: text(bill.serviceLocation?.address?.line2, (line2) => setBill((c) => ({ ...c, serviceLocation: { ...c.serviceLocation, address: { line1: c.serviceLocation?.address?.line1 ?? "", line2, city: c.serviceLocation?.address?.city ?? "", state: c.serviceLocation?.address?.state ?? "", postalCode: c.serviceLocation?.address?.postalCode ?? "" } } }))) }),
|
|
2956
|
+
/* @__PURE__ */ jsx5(Field2, { path: "serviceLocation.address.city", label: "Service city", required: true, error: errors["serviceLocation.address.city"], children: text(bill.serviceLocation?.address?.city, (city) => setBill((c) => ({ ...c, serviceLocation: { ...c.serviceLocation, address: { line1: c.serviceLocation?.address?.line1 ?? "", line2: c.serviceLocation?.address?.line2 ?? "", city, state: c.serviceLocation?.address?.state ?? "", postalCode: c.serviceLocation?.address?.postalCode ?? "" } } }))) }),
|
|
2957
|
+
/* @__PURE__ */ jsx5(Field2, { path: "serviceLocation.address.state", label: "Service state", required: true, error: errors["serviceLocation.address.state"], children: text(bill.serviceLocation?.address?.state, (state) => setBill((c) => ({ ...c, serviceLocation: { ...c.serviceLocation, address: { line1: c.serviceLocation?.address?.line1 ?? "", line2: c.serviceLocation?.address?.line2 ?? "", city: c.serviceLocation?.address?.city ?? "", state: state.toUpperCase(), postalCode: c.serviceLocation?.address?.postalCode ?? "" } } })), { maxLength: 2 }) }),
|
|
2958
|
+
/* @__PURE__ */ jsx5(Field2, { path: "serviceLocation.address.postalCode", label: "Service ZIP", required: true, error: errors["serviceLocation.address.postalCode"], children: text(bill.serviceLocation?.address?.postalCode, (postalCode) => setBill((c) => ({ ...c, serviceLocation: { ...c.serviceLocation, address: { line1: c.serviceLocation?.address?.line1 ?? "", line2: c.serviceLocation?.address?.line2 ?? "", city: c.serviceLocation?.address?.city ?? "", state: c.serviceLocation?.address?.state ?? "", postalCode } } }))) })
|
|
2824
2959
|
] })
|
|
2825
2960
|
] });
|
|
2826
|
-
const serviceLinesSection = /* @__PURE__ */
|
|
2827
|
-
/* @__PURE__ */
|
|
2828
|
-
/* @__PURE__ */
|
|
2829
|
-
/* @__PURE__ */
|
|
2830
|
-
/* @__PURE__ */
|
|
2831
|
-
/* @__PURE__ */
|
|
2832
|
-
/* @__PURE__ */
|
|
2833
|
-
/* @__PURE__ */
|
|
2961
|
+
const serviceLinesSection = /* @__PURE__ */ jsxs5("fieldset", { className: "mbsf-card", disabled: locked, children: [
|
|
2962
|
+
/* @__PURE__ */ jsx5("legend", { className: "mbsf-legend", children: "Evaluation & service lines" }),
|
|
2963
|
+
/* @__PURE__ */ jsx5("p", { className: "mbsf-help", children: "Sets the evaluator/specialty modifier on medical-legal evaluation lines." }),
|
|
2964
|
+
/* @__PURE__ */ jsx5("div", { className: "mbsf-segments", role: "group", "aria-label": "Evaluation type", children: [["qme", "QME (default)"], ["ame", "AME"], ["psych_qme", "Psych QME"]].map(([type, label]) => /* @__PURE__ */ jsx5("button", { className: "mbsf-segment", type: "button", "aria-pressed": evaluationType === type, onClick: () => changeEvaluation(type), children: label }, type)) }),
|
|
2965
|
+
/* @__PURE__ */ jsx5("p", { className: "mbsf-help", children: evaluationType === "ame" ? "Agreed Medical Evaluator \u2014 eligible ML evaluation codes default to modifier -94." : evaluationType === "psych_qme" ? "Psychiatric QME \u2014 eligible ML evaluation codes default to modifier -96 (-95 for ML200)." : "Qualified Medical Evaluator \u2014 eligible ML evaluation codes default to modifier -95." }),
|
|
2966
|
+
/* @__PURE__ */ jsxs5("div", { className: "mbsf-lines", "data-field-path": "serviceLines", "data-invalid": Boolean(errors.serviceLines), children: [
|
|
2967
|
+
/* @__PURE__ */ jsxs5("div", { className: "mbsf-line-head", children: [
|
|
2968
|
+
/* @__PURE__ */ jsxs5("span", { children: [
|
|
2834
2969
|
"Procedure code",
|
|
2835
|
-
/* @__PURE__ */
|
|
2970
|
+
/* @__PURE__ */ jsx5(RequiredMark, {})
|
|
2836
2971
|
] }),
|
|
2837
|
-
/* @__PURE__ */
|
|
2838
|
-
/* @__PURE__ */
|
|
2839
|
-
/* @__PURE__ */
|
|
2972
|
+
/* @__PURE__ */ jsx5("span", { children: "Modifiers" }),
|
|
2973
|
+
/* @__PURE__ */ jsx5("span", { children: "Dx" }),
|
|
2974
|
+
/* @__PURE__ */ jsxs5("span", { children: [
|
|
2840
2975
|
"Units",
|
|
2841
|
-
/* @__PURE__ */
|
|
2976
|
+
/* @__PURE__ */ jsx5(RequiredMark, {})
|
|
2842
2977
|
] }),
|
|
2843
|
-
/* @__PURE__ */
|
|
2844
|
-
/* @__PURE__ */
|
|
2978
|
+
/* @__PURE__ */ jsx5("span", { children: "Allowed" }),
|
|
2979
|
+
/* @__PURE__ */ jsx5("span", {}),
|
|
2845
2980
|
" "
|
|
2846
2981
|
] }),
|
|
2847
|
-
bill.serviceLines.map((line, index) => /* @__PURE__ */
|
|
2848
|
-
/* @__PURE__ */
|
|
2849
|
-
/* @__PURE__ */
|
|
2982
|
+
bill.serviceLines.map((line, index) => /* @__PURE__ */ jsxs5("div", { className: "mbsf-line", children: [
|
|
2983
|
+
/* @__PURE__ */ jsxs5("div", { "data-label": "Procedure code", "data-field-path": `serviceLines.${index}.code`, "data-invalid": Boolean(errors[`serviceLines.${index}.code`]), children: [
|
|
2984
|
+
/* @__PURE__ */ jsx5(ComboBox, { ariaLabel: `Procedure code ${index + 1}`, invalid: Boolean(errors[`serviceLines.${index}.code`]), disabled: locked, value: line.code, placeholder: "Search or enter code\u2026", options: procedures.map((item) => ({ id: item.code, label: item.code, detail: item.description })), createOption: customProcedureOption, onSelect: (option) => {
|
|
2850
2985
|
const auto = evaluationModifier(evaluationType, option.id);
|
|
2851
2986
|
setLine(index, { code: option.id, ...auto ? { modifiers: [auto, ...(line.modifiers ?? []).filter((item) => !["94", "95", "96"].includes(item.replace(/^-/, "")))] } : line.modifiers ? { modifiers: line.modifiers } : {} });
|
|
2852
2987
|
} }),
|
|
2853
|
-
line.code ? /* @__PURE__ */
|
|
2854
|
-
errors[`serviceLines.${index}.code`] ? /* @__PURE__ */
|
|
2988
|
+
line.code ? /* @__PURE__ */ jsx5("small", { className: "mbsf-help", children: procedures.find((item) => item.code === line.code)?.description ?? "Custom CPT, HCPCS, or medical-legal code" }) : null,
|
|
2989
|
+
errors[`serviceLines.${index}.code`] ? /* @__PURE__ */ jsx5("small", { className: "mbsf-error", role: "alert", children: errors[`serviceLines.${index}.code`] }) : null
|
|
2855
2990
|
] }),
|
|
2856
|
-
/* @__PURE__ */
|
|
2857
|
-
/* @__PURE__ */
|
|
2991
|
+
/* @__PURE__ */ jsxs5("div", { "data-label": "Modifiers", children: [
|
|
2992
|
+
/* @__PURE__ */ jsx5("div", { className: "mbsf-chips", children: (line.modifiers ?? []).map((modifier) => /* @__PURE__ */ jsxs5("span", { className: "mbsf-chip", children: [
|
|
2858
2993
|
"\u2212",
|
|
2859
2994
|
modifier.replace(/^-/, ""),
|
|
2860
|
-
/* @__PURE__ */
|
|
2995
|
+
/* @__PURE__ */ jsx5("button", { type: "button", "aria-label": `Remove modifier ${modifier}`, onClick: () => setLine(index, { modifiers: (line.modifiers ?? []).filter((item) => item !== modifier) }), children: "\xD7" })
|
|
2861
2996
|
] }, modifier)) }),
|
|
2862
|
-
/* @__PURE__ */
|
|
2997
|
+
/* @__PURE__ */ jsx5(ComboBox, { ariaLabel: `Modifiers ${index + 1}`, disabled: locked, value: "", placeholder: line.modifiers?.length ?? 0 ? `${line.modifiers.length} modifier${line.modifiers.length === 1 ? "" : "s"}` : "Add modifiers\u2026", options: modifiers.filter((item) => !(line.modifiers ?? []).includes(item.code)).map((item) => ({ id: item.code, label: `\u2212${item.code}`, detail: item.description })), onSelect: (option) => setLine(index, { modifiers: [.../* @__PURE__ */ new Set([...line.modifiers ?? [], option.id])] }) })
|
|
2863
2998
|
] }),
|
|
2864
|
-
/* @__PURE__ */
|
|
2999
|
+
/* @__PURE__ */ jsx5("div", { "data-label": "Dx", children: /* @__PURE__ */ jsx5("div", { className: "mbsf-dx", children: (bill.diagnoses ?? []).length ? (bill.diagnoses ?? []).map((code, dxIndex) => {
|
|
2865
3000
|
const pointer = dxIndex + 1;
|
|
2866
3001
|
const active = (line.diagnosisPointers ?? []).includes(pointer);
|
|
2867
|
-
return /* @__PURE__ */
|
|
2868
|
-
}) : /* @__PURE__ */
|
|
2869
|
-
/* @__PURE__ */
|
|
2870
|
-
/* @__PURE__ */
|
|
2871
|
-
errors[`serviceLines.${index}.units`] ? /* @__PURE__ */
|
|
3002
|
+
return /* @__PURE__ */ jsx5("button", { type: "button", className: "mbsf-dx-chip", "data-active": active, title: `${String.fromCharCode(64 + pointer)} \u2014 ${code}`, "aria-pressed": active, "aria-label": `Point line ${index + 1} at diagnosis ${code}`, onClick: () => setLine(index, { diagnosisPointers: active ? (line.diagnosisPointers ?? []).filter((item) => item !== pointer) : [...line.diagnosisPointers ?? [], pointer].sort((left, right) => left - right) }), children: String.fromCharCode(64 + pointer) }, code);
|
|
3003
|
+
}) : /* @__PURE__ */ jsx5("small", { className: "mbsf-help", children: "Add diagnoses above" }) }) }),
|
|
3004
|
+
/* @__PURE__ */ jsxs5("div", { "data-label": "Units", "data-field-path": `serviceLines.${index}.units`, "data-invalid": Boolean(errors[`serviceLines.${index}.units`]), children: [
|
|
3005
|
+
/* @__PURE__ */ jsx5("input", { className: "mbsf-input", "aria-label": `Units ${index + 1}`, "aria-invalid": Boolean(errors[`serviceLines.${index}.units`]), type: "number", min: 1, value: line.units ?? 1, onChange: (event) => setLine(index, { units: Number(event.target.value) }) }),
|
|
3006
|
+
errors[`serviceLines.${index}.units`] ? /* @__PURE__ */ jsx5("small", { className: "mbsf-error", role: "alert", children: errors[`serviceLines.${index}.units`] }) : null
|
|
2872
3007
|
] }),
|
|
2873
|
-
/* @__PURE__ */
|
|
2874
|
-
/* @__PURE__ */
|
|
3008
|
+
/* @__PURE__ */ jsx5("div", { className: "mbsf-money", "data-label": "Allowed", children: lineCharge(line) == null ? "\u2014" : lineCharge(line).toLocaleString(void 0, { style: "currency", currency: "USD" }) }),
|
|
3009
|
+
/* @__PURE__ */ jsx5("button", { className: "mbsf-icon-btn", type: "button", "aria-label": `Remove service line ${index + 1}`, disabled: locked || !lineHasContent(line) && index === bill.serviceLines.length - 1, onClick: () => setBill((c) => ({ ...c, serviceLines: ensureTrailingBillSubmissionLine(c.serviceLines.filter((_, itemIndex) => itemIndex !== index)) })), children: "\xD7" })
|
|
2875
3010
|
] }, index)),
|
|
2876
|
-
/* @__PURE__ */
|
|
2877
|
-
/* @__PURE__ */
|
|
2878
|
-
/* @__PURE__ */
|
|
3011
|
+
/* @__PURE__ */ jsxs5("div", { className: "mbsf-total", children: [
|
|
3012
|
+
/* @__PURE__ */ jsx5("span", { children: "Total" }),
|
|
3013
|
+
/* @__PURE__ */ jsx5("span", { children: total.toLocaleString(void 0, { style: "currency", currency: "USD" }) })
|
|
2879
3014
|
] })
|
|
2880
3015
|
] }),
|
|
2881
|
-
errors.serviceLines ? /* @__PURE__ */
|
|
3016
|
+
errors.serviceLines ? /* @__PURE__ */ jsx5("p", { className: "mbsf-error", role: "alert", children: errors.serviceLines }) : null
|
|
2882
3017
|
] });
|
|
2883
|
-
const attachmentsSection = /* @__PURE__ */
|
|
2884
|
-
/* @__PURE__ */
|
|
2885
|
-
/* @__PURE__ */
|
|
3018
|
+
const attachmentsSection = /* @__PURE__ */ jsxs5("fieldset", { className: "mbsf-card", "data-field-path": "attachments", "data-invalid": Boolean(errors.attachments), disabled: locked, children: [
|
|
3019
|
+
/* @__PURE__ */ jsx5("legend", { className: "mbsf-legend", children: "Attachments" }),
|
|
3020
|
+
/* @__PURE__ */ jsxs5("div", { className: "mbsf-attach-list", children: [
|
|
2886
3021
|
attachments.filter((attachment) => !removedSourceIds.includes(attachment.id)).map((attachment) => {
|
|
2887
3022
|
const auto = attachment.autoAttached || attachment.documentType === "w9";
|
|
2888
3023
|
const removable = !auto && attachment.removable !== false;
|
|
2889
3024
|
const reportTypeCode = sourceAttachmentReportTypes[attachment.id] || attachment.reportTypeCode || defaultAttachmentReportType || "";
|
|
2890
|
-
return /* @__PURE__ */
|
|
2891
|
-
/* @__PURE__ */
|
|
2892
|
-
auto ? /* @__PURE__ */
|
|
2893
|
-
/* @__PURE__ */
|
|
2894
|
-
/* @__PURE__ */
|
|
2895
|
-
/* @__PURE__ */
|
|
2896
|
-
/* @__PURE__ */
|
|
3025
|
+
return /* @__PURE__ */ jsxs5("div", { className: "mbsf-attach-row", "data-auto": auto, children: [
|
|
3026
|
+
/* @__PURE__ */ jsxs5("div", { className: "mbsf-attach-main", children: [
|
|
3027
|
+
auto ? /* @__PURE__ */ jsx5("span", { "aria-label": "Always attached", role: "img", children: "\u2713" }) : null,
|
|
3028
|
+
/* @__PURE__ */ jsxs5("span", { className: "mbsf-file", children: [
|
|
3029
|
+
/* @__PURE__ */ jsx5("strong", { children: attachment.fileName }),
|
|
3030
|
+
/* @__PURE__ */ jsx5("span", { className: "mbsf-badge", children: auto ? "Auto-attached" : documentLabels[attachment.documentType] }),
|
|
3031
|
+
/* @__PURE__ */ jsx5("span", { className: "mbsf-help", style: { display: "block" }, children: attachment.description || (auto ? "Included automatically with every bill." : documentLabels[attachment.documentType]) })
|
|
2897
3032
|
] })
|
|
2898
3033
|
] }),
|
|
2899
|
-
showAttachmentReportTypes ? /* @__PURE__ */
|
|
2900
|
-
/* @__PURE__ */
|
|
2901
|
-
attachment.previewUrl ? /* @__PURE__ */
|
|
2902
|
-
removable ? /* @__PURE__ */
|
|
3034
|
+
showAttachmentReportTypes ? /* @__PURE__ */ jsx5("div", { className: "mbsf-attach-type", children: /* @__PURE__ */ jsx5(ComboBox, { ariaLabel: `Report type for ${attachment.fileName}`, invalid: !reportTypeCode, disabled: locked, preserveValueOnOpen: true, value: reportTypeCode, placeholder: "Select report type\u2026", options: reportTypeOptions, onSelect: (option) => setSourceAttachmentReportTypes((current) => ({ ...current, [attachment.id]: option.id })) }) }) : null,
|
|
3035
|
+
/* @__PURE__ */ jsxs5("div", { className: "mbsf-attach-actions", children: [
|
|
3036
|
+
attachment.previewUrl ? /* @__PURE__ */ jsx5("a", { className: "mbsf-secondary", href: attachment.previewUrl, target: "_blank", rel: "noopener noreferrer", children: "Preview" }) : null,
|
|
3037
|
+
removable ? /* @__PURE__ */ jsx5("button", { className: "mbsf-icon-btn", type: "button", "aria-label": `Remove ${attachment.fileName}`, disabled: locked, onClick: () => {
|
|
2903
3038
|
setSelectedIds((current) => current.filter((id) => id !== attachment.id));
|
|
2904
3039
|
setRemovedSourceIds((current) => [.../* @__PURE__ */ new Set([...current, attachment.id])]);
|
|
2905
3040
|
}, children: "\xD7" }) : null
|
|
@@ -2908,35 +3043,35 @@ function BillSubmissionForm({
|
|
|
2908
3043
|
}),
|
|
2909
3044
|
uploads.map((upload, index) => {
|
|
2910
3045
|
const reportTypeCode = upload.reportTypeCode || defaultAttachmentReportType || "";
|
|
2911
|
-
return /* @__PURE__ */
|
|
2912
|
-
/* @__PURE__ */
|
|
2913
|
-
/* @__PURE__ */
|
|
2914
|
-
/* @__PURE__ */
|
|
3046
|
+
return /* @__PURE__ */ jsxs5("div", { className: "mbsf-attach-row", children: [
|
|
3047
|
+
/* @__PURE__ */ jsx5("div", { className: "mbsf-attach-main", children: /* @__PURE__ */ jsxs5("span", { className: "mbsf-file", children: [
|
|
3048
|
+
/* @__PURE__ */ jsx5("strong", { children: upload.file.name }),
|
|
3049
|
+
/* @__PURE__ */ jsxs5("span", { className: "mbsf-help", style: { display: "block" }, children: [
|
|
2915
3050
|
(upload.file.size / 1024 / 1024).toFixed(1),
|
|
2916
3051
|
" MB"
|
|
2917
3052
|
] })
|
|
2918
3053
|
] }) }),
|
|
2919
|
-
showAttachmentReportTypes ? /* @__PURE__ */
|
|
2920
|
-
/* @__PURE__ */
|
|
2921
|
-
/* @__PURE__ */
|
|
2922
|
-
/* @__PURE__ */
|
|
3054
|
+
showAttachmentReportTypes ? /* @__PURE__ */ jsx5("div", { className: "mbsf-attach-type", children: /* @__PURE__ */ jsx5(ComboBox, { ariaLabel: `Report type for ${upload.file.name}`, invalid: !reportTypeCode, disabled: locked, preserveValueOnOpen: true, value: reportTypeCode, placeholder: "Select report type\u2026", options: reportTypeOptions, onSelect: (option) => setUploads((current) => current.map((item, itemIndex) => itemIndex === index ? { ...item, reportTypeCode: option.id } : item)) }) }) : null,
|
|
3055
|
+
/* @__PURE__ */ jsxs5("div", { className: "mbsf-attach-actions", children: [
|
|
3056
|
+
/* @__PURE__ */ jsx5("button", { className: "mbsf-secondary", type: "button", onClick: () => previewUploadedPdf(upload.file), children: "Preview" }),
|
|
3057
|
+
/* @__PURE__ */ jsx5("button", { className: "mbsf-icon-btn", type: "button", "aria-label": `Remove ${upload.file.name}`, onClick: () => setUploads((current) => current.filter((_, itemIndex) => itemIndex !== index)), children: "\xD7" })
|
|
2923
3058
|
] })
|
|
2924
3059
|
] }, `${upload.file.name}-${index}`);
|
|
2925
3060
|
})
|
|
2926
3061
|
] }),
|
|
2927
|
-
errors.attachments ? /* @__PURE__ */
|
|
2928
|
-
/* @__PURE__ */
|
|
3062
|
+
errors.attachments ? /* @__PURE__ */ jsx5("p", { className: "mbsf-error", role: "alert", children: errors.attachments }) : null,
|
|
3063
|
+
/* @__PURE__ */ jsx5("input", { ref: fileInput, hidden: true, type: "file", accept: "application/pdf,.pdf", multiple: true, onChange: (event) => {
|
|
2929
3064
|
if (event.target.files) addFiles(event.target.files);
|
|
2930
3065
|
event.target.value = "";
|
|
2931
3066
|
} }),
|
|
2932
|
-
/* @__PURE__ */
|
|
2933
|
-
/* @__PURE__ */
|
|
2934
|
-
/* @__PURE__ */
|
|
3067
|
+
/* @__PURE__ */ jsx5("button", { className: "mbsf-drop", "data-active": dragActive, type: "button", onClick: () => fileInput.current?.click(), children: /* @__PURE__ */ jsxs5("span", { children: [
|
|
3068
|
+
/* @__PURE__ */ jsx5("strong", { style: { fontSize: 18 }, children: "Drop additional PDF files here, or click to choose" }),
|
|
3069
|
+
/* @__PURE__ */ jsx5("span", { className: "mbsf-help", style: { display: "block", marginTop: 8 }, children: "Add supporting documents anywhere on this screen." })
|
|
2935
3070
|
] }) })
|
|
2936
3071
|
] });
|
|
2937
|
-
const actionsSection = /* @__PURE__ */
|
|
2938
|
-
formError ? /* @__PURE__ */
|
|
2939
|
-
/* @__PURE__ */
|
|
3072
|
+
const actionsSection = /* @__PURE__ */ jsxs5(Fragment4, { children: [
|
|
3073
|
+
formError ? /* @__PURE__ */ jsx5("div", { className: "mbsf-alert", role: "alert", children: formError }) : null,
|
|
3074
|
+
/* @__PURE__ */ jsx5("div", { className: "mbsf-actions", children: /* @__PURE__ */ jsx5("button", { className: "mbsf-submit", type: "submit", disabled: locked, children: submitting ? "Submitting\u2026" : submitLabel }) })
|
|
2940
3075
|
] });
|
|
2941
3076
|
const sections = {
|
|
2942
3077
|
header: headerSection,
|
|
@@ -2947,47 +3082,63 @@ function BillSubmissionForm({
|
|
|
2947
3082
|
attachments: attachmentsSection,
|
|
2948
3083
|
actions: actionsSection
|
|
2949
3084
|
};
|
|
2950
|
-
const defaultLayout = /* @__PURE__ */
|
|
2951
|
-
/* @__PURE__ */
|
|
2952
|
-
/* @__PURE__ */
|
|
2953
|
-
/* @__PURE__ */
|
|
2954
|
-
/* @__PURE__ */
|
|
2955
|
-
/* @__PURE__ */
|
|
2956
|
-
/* @__PURE__ */
|
|
2957
|
-
/* @__PURE__ */
|
|
3085
|
+
const defaultLayout = /* @__PURE__ */ jsxs5(Fragment4, { children: [
|
|
3086
|
+
/* @__PURE__ */ jsx5(BillSubmissionHeader, {}),
|
|
3087
|
+
/* @__PURE__ */ jsx5(BillSubmissionPatientSection, {}),
|
|
3088
|
+
/* @__PURE__ */ jsx5(BillSubmissionClaimSection, {}),
|
|
3089
|
+
/* @__PURE__ */ jsx5(BillSubmissionProvidersSection, {}),
|
|
3090
|
+
/* @__PURE__ */ jsx5(BillSubmissionServiceLinesSection, {}),
|
|
3091
|
+
/* @__PURE__ */ jsx5(BillSubmissionAttachmentsSection, {}),
|
|
3092
|
+
/* @__PURE__ */ jsx5(BillSubmissionActions, {})
|
|
2958
3093
|
] });
|
|
2959
|
-
return /* @__PURE__ */
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
3094
|
+
return /* @__PURE__ */ jsxs5(BillSubmissionSectionsContext.Provider, { value: sections, children: [
|
|
3095
|
+
/* @__PURE__ */ jsxs5("form", { ref: formRef, className: `${className} mbsf`, style: { ...mindBillAppearanceStyle(appearance), ...style }, onSubmit: (event) => {
|
|
3096
|
+
event.preventDefault();
|
|
3097
|
+
void submit();
|
|
3098
|
+
}, noValidate: true, children: [
|
|
3099
|
+
/* @__PURE__ */ jsx5("style", { children: css3 }),
|
|
3100
|
+
attentionMessage ? /* @__PURE__ */ jsx5("div", { className: "mbsf-attention", role: "status", children: attentionMessage }) : null,
|
|
3101
|
+
children ?? defaultLayout,
|
|
3102
|
+
routeDialog ? /* @__PURE__ */ jsx5(
|
|
3103
|
+
SendRouteDialog,
|
|
3104
|
+
{
|
|
3105
|
+
title: "Send bill",
|
|
3106
|
+
delivery: routeDialog.delivery,
|
|
3107
|
+
submitting,
|
|
3108
|
+
error: routeError,
|
|
3109
|
+
onCancel: () => {
|
|
3110
|
+
if (!submitting) {
|
|
3111
|
+
setRouteDialog(null);
|
|
3112
|
+
setRouteError(null);
|
|
3113
|
+
}
|
|
3114
|
+
},
|
|
3115
|
+
onConfirm: (submission) => {
|
|
3116
|
+
void performConnectedSubmit(routeDialog.complete, submission);
|
|
2977
3117
|
}
|
|
2978
|
-
}
|
|
2979
|
-
|
|
2980
|
-
|
|
3118
|
+
}
|
|
3119
|
+
) : null
|
|
3120
|
+
] }),
|
|
3121
|
+
/* @__PURE__ */ jsx5(
|
|
3122
|
+
ClaimsAdministratorDirectoryDialog,
|
|
3123
|
+
{
|
|
3124
|
+
open: directoryOpen,
|
|
3125
|
+
directory,
|
|
3126
|
+
loading: directoryLoading,
|
|
3127
|
+
error: directoryError,
|
|
3128
|
+
onClose: () => {
|
|
3129
|
+
setDirectoryOpen(false);
|
|
3130
|
+
setDirectory(null);
|
|
3131
|
+
setDirectoryError(null);
|
|
2981
3132
|
}
|
|
2982
3133
|
}
|
|
2983
|
-
)
|
|
2984
|
-
] })
|
|
3134
|
+
)
|
|
3135
|
+
] });
|
|
2985
3136
|
}
|
|
2986
3137
|
|
|
2987
3138
|
// src/billing-dashboard.tsx
|
|
2988
|
-
import { useMemo as useMemo4, useState as
|
|
2989
|
-
import { Fragment as
|
|
2990
|
-
var
|
|
3139
|
+
import { useMemo as useMemo4, useState as useState6 } from "react";
|
|
3140
|
+
import { Fragment as Fragment5, jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
3141
|
+
var css4 = `
|
|
2991
3142
|
.mbdash{display:grid;gap:20px;color:var(--mb-text);font-family:var(--mb-font);font-size:15px}.mbdash *{box-sizing:border-box}.mbdash h2,.mbdash h3,.mbdash p{margin:0}.mbdash-copy{color:var(--mb-muted);margin-top:5px!important}.mbdash-card{min-width:0;border:1px solid var(--mb-border);border-radius:var(--mb-radius);background:var(--mb-surface);box-shadow:var(--mb-shadow)}
|
|
2992
3143
|
.mbdash-head{display:flex;align-items:flex-end;justify-content:space-between;gap:18px}.mbdash-head h2{font-size:24px}.mbdash-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));overflow:hidden}.mbdash-stat{display:grid;gap:7px;padding:20px 22px;border-right:1px solid var(--mb-border)}.mbdash-stat:last-child{border:0}.mbdash-label{color:var(--mb-muted);font-size:12px;font-weight:760;letter-spacing:.06em;text-transform:uppercase}.mbdash-value{font-size:24px;font-weight:780;font-variant-numeric:tabular-nums}.mbdash-aging{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));overflow:hidden}.mbdash-aging-item{display:grid;gap:5px;padding:16px 20px;border-right:1px solid var(--mb-border)}.mbdash-aging-item:last-child{border:0}.mbdash-aging-item strong{font-size:18px;font-variant-numeric:tabular-nums}.mbdash-aging-item span:last-child{color:var(--mb-muted);font-size:13px}
|
|
2993
3144
|
.mbdash-filters{display:grid;grid-template-columns:minmax(240px,1fr) minmax(180px,260px);gap:12px}.mbdash-control{width:100%;min-height:46px;padding:10px 12px;border:1px solid var(--mb-border);border-radius:var(--mb-control-radius);background:var(--mb-input);color:var(--mb-text);font:inherit}.mbdash-control:focus{outline:3px solid color-mix(in srgb,var(--mb-accent) 22%,transparent);border-color:var(--mb-accent)}
|
|
@@ -3038,63 +3189,63 @@ function summarizeBillingDashboard(bills, now = /* @__PURE__ */ new Date()) {
|
|
|
3038
3189
|
return { totalBilled, totalPaid, outstanding, openCount, bills: bills.length, aging };
|
|
3039
3190
|
}
|
|
3040
3191
|
function Shell({ appearance, className = "", style, children }) {
|
|
3041
|
-
return /* @__PURE__ */
|
|
3042
|
-
/* @__PURE__ */
|
|
3192
|
+
return /* @__PURE__ */ jsxs6("div", { className: `mbdash ${className}`.trim(), style: { ...mindBillAppearanceStyle(appearance), ...style }, children: [
|
|
3193
|
+
/* @__PURE__ */ jsx6("style", { children: css4 }),
|
|
3043
3194
|
children
|
|
3044
3195
|
] });
|
|
3045
3196
|
}
|
|
3046
3197
|
function BillIdentity({ bill }) {
|
|
3047
3198
|
const label = bill.billNumber == null ? bill.externalId ?? "Bill" : `Bill #${bill.billNumber}`;
|
|
3048
|
-
const content = /* @__PURE__ */
|
|
3049
|
-
/* @__PURE__ */
|
|
3050
|
-
/* @__PURE__ */
|
|
3199
|
+
const content = /* @__PURE__ */ jsxs6(Fragment5, { children: [
|
|
3200
|
+
/* @__PURE__ */ jsx6("span", { className: "mbdash-primary", children: label }),
|
|
3201
|
+
/* @__PURE__ */ jsx6("span", { className: "mbdash-secondary", children: [bill.patientName, bill.claimNumber ? `Claim ${bill.claimNumber}` : null].filter(Boolean).join(" \xB7 ") })
|
|
3051
3202
|
] });
|
|
3052
|
-
return bill.href ? /* @__PURE__ */
|
|
3203
|
+
return bill.href ? /* @__PURE__ */ jsx6("a", { href: bill.href, className: "mbdash-primary", children: content }) : /* @__PURE__ */ jsx6(Fragment5, { children: content });
|
|
3053
3204
|
}
|
|
3054
3205
|
function BillListContent({ bills, onSelectBill, emptyState = "No bills match these filters." }) {
|
|
3055
|
-
if (!bills.length) return /* @__PURE__ */
|
|
3056
|
-
return /* @__PURE__ */
|
|
3057
|
-
/* @__PURE__ */
|
|
3058
|
-
/* @__PURE__ */
|
|
3059
|
-
/* @__PURE__ */
|
|
3060
|
-
/* @__PURE__ */
|
|
3061
|
-
/* @__PURE__ */
|
|
3062
|
-
/* @__PURE__ */
|
|
3063
|
-
/* @__PURE__ */
|
|
3064
|
-
/* @__PURE__ */
|
|
3065
|
-
/* @__PURE__ */
|
|
3206
|
+
if (!bills.length) return /* @__PURE__ */ jsx6("div", { className: "mbdash-card mbdash-empty", children: emptyState });
|
|
3207
|
+
return /* @__PURE__ */ jsxs6("div", { className: "mbdash-card", children: [
|
|
3208
|
+
/* @__PURE__ */ jsx6("div", { className: "mbdash-table-wrap", children: /* @__PURE__ */ jsxs6("table", { className: "mbdash-table", children: [
|
|
3209
|
+
/* @__PURE__ */ jsx6("thead", { children: /* @__PURE__ */ jsxs6("tr", { children: [
|
|
3210
|
+
/* @__PURE__ */ jsx6("th", { children: "Bill" }),
|
|
3211
|
+
/* @__PURE__ */ jsx6("th", { children: "Payer" }),
|
|
3212
|
+
/* @__PURE__ */ jsx6("th", { children: "Status" }),
|
|
3213
|
+
/* @__PURE__ */ jsx6("th", { children: "Age" }),
|
|
3214
|
+
/* @__PURE__ */ jsx6("th", { className: "mbdash-money", children: "Billed" }),
|
|
3215
|
+
/* @__PURE__ */ jsx6("th", { className: "mbdash-money", children: "Paid" }),
|
|
3216
|
+
/* @__PURE__ */ jsx6("th", { className: "mbdash-money", children: "Balance" })
|
|
3066
3217
|
] }) }),
|
|
3067
|
-
/* @__PURE__ */
|
|
3068
|
-
/* @__PURE__ */
|
|
3069
|
-
/* @__PURE__ */
|
|
3070
|
-
/* @__PURE__ */
|
|
3071
|
-
/* @__PURE__ */
|
|
3218
|
+
/* @__PURE__ */ jsx6("tbody", { children: bills.map((bill) => /* @__PURE__ */ jsxs6("tr", { "data-clickable": Boolean(onSelectBill), onClick: () => onSelectBill?.(bill), children: [
|
|
3219
|
+
/* @__PURE__ */ jsx6("td", { children: /* @__PURE__ */ jsx6(BillIdentity, { bill }) }),
|
|
3220
|
+
/* @__PURE__ */ jsx6("td", { children: bill.payerName || "\u2014" }),
|
|
3221
|
+
/* @__PURE__ */ jsx6("td", { children: /* @__PURE__ */ jsx6("span", { className: "mbdash-state", children: stateLabel(bill.state) }) }),
|
|
3222
|
+
/* @__PURE__ */ jsxs6("td", { children: [
|
|
3072
3223
|
billAgingDays(bill),
|
|
3073
3224
|
" days"
|
|
3074
3225
|
] }),
|
|
3075
|
-
/* @__PURE__ */
|
|
3076
|
-
/* @__PURE__ */
|
|
3077
|
-
/* @__PURE__ */
|
|
3226
|
+
/* @__PURE__ */ jsx6("td", { className: "mbdash-money", children: money3(bill.totalCharge) }),
|
|
3227
|
+
/* @__PURE__ */ jsx6("td", { className: "mbdash-money", children: money3(bill.totalPaid) }),
|
|
3228
|
+
/* @__PURE__ */ jsx6("td", { className: "mbdash-money", children: /* @__PURE__ */ jsx6("strong", { children: money3(bill.balanceDue) }) })
|
|
3078
3229
|
] }, bill.id)) })
|
|
3079
3230
|
] }) }),
|
|
3080
|
-
/* @__PURE__ */
|
|
3081
|
-
/* @__PURE__ */
|
|
3082
|
-
/* @__PURE__ */
|
|
3083
|
-
/* @__PURE__ */
|
|
3231
|
+
/* @__PURE__ */ jsx6("div", { className: "mbdash-mobile-list", children: bills.map((bill) => /* @__PURE__ */ jsxs6("article", { className: "mbdash-mobile-card", onClick: () => onSelectBill?.(bill), children: [
|
|
3232
|
+
/* @__PURE__ */ jsxs6("div", { className: "mbdash-mobile-top", children: [
|
|
3233
|
+
/* @__PURE__ */ jsx6("div", { children: /* @__PURE__ */ jsx6(BillIdentity, { bill }) }),
|
|
3234
|
+
/* @__PURE__ */ jsx6("span", { className: "mbdash-state", children: stateLabel(bill.state) })
|
|
3084
3235
|
] }),
|
|
3085
|
-
/* @__PURE__ */
|
|
3086
|
-
/* @__PURE__ */
|
|
3087
|
-
/* @__PURE__ */
|
|
3236
|
+
/* @__PURE__ */ jsxs6("div", { className: "mbdash-mobile-money", children: [
|
|
3237
|
+
/* @__PURE__ */ jsxs6("span", { children: [
|
|
3238
|
+
/* @__PURE__ */ jsx6("small", { children: "Age" }),
|
|
3088
3239
|
billAgingDays(bill),
|
|
3089
3240
|
" days"
|
|
3090
3241
|
] }),
|
|
3091
|
-
/* @__PURE__ */
|
|
3092
|
-
/* @__PURE__ */
|
|
3242
|
+
/* @__PURE__ */ jsxs6("span", { children: [
|
|
3243
|
+
/* @__PURE__ */ jsx6("small", { children: "Paid" }),
|
|
3093
3244
|
money3(bill.totalPaid)
|
|
3094
3245
|
] }),
|
|
3095
|
-
/* @__PURE__ */
|
|
3096
|
-
/* @__PURE__ */
|
|
3097
|
-
/* @__PURE__ */
|
|
3246
|
+
/* @__PURE__ */ jsxs6("span", { children: [
|
|
3247
|
+
/* @__PURE__ */ jsx6("small", { children: "Balance" }),
|
|
3248
|
+
/* @__PURE__ */ jsx6("strong", { children: money3(bill.balanceDue) })
|
|
3098
3249
|
] })
|
|
3099
3250
|
] })
|
|
3100
3251
|
] }, bill.id)) })
|
|
@@ -3106,37 +3257,37 @@ function BillList(props) {
|
|
|
3106
3257
|
...props.className === void 0 ? {} : { className: props.className },
|
|
3107
3258
|
...props.style === void 0 ? {} : { style: props.style }
|
|
3108
3259
|
};
|
|
3109
|
-
return /* @__PURE__ */
|
|
3260
|
+
return /* @__PURE__ */ jsx6(Shell, { ...shellProps, children: /* @__PURE__ */ jsx6(BillListContent, { ...props }) });
|
|
3110
3261
|
}
|
|
3111
3262
|
function AgingContent({ bills, heading = "Accounts receivable" }) {
|
|
3112
3263
|
const summary = useMemo4(() => summarizeBillingDashboard(bills), [bills]);
|
|
3113
|
-
return /* @__PURE__ */
|
|
3114
|
-
/* @__PURE__ */
|
|
3115
|
-
/* @__PURE__ */
|
|
3116
|
-
/* @__PURE__ */
|
|
3264
|
+
return /* @__PURE__ */ jsxs6(Fragment5, { children: [
|
|
3265
|
+
/* @__PURE__ */ jsx6("div", { className: "mbdash-head", children: /* @__PURE__ */ jsxs6("div", { children: [
|
|
3266
|
+
/* @__PURE__ */ jsx6("h2", { children: heading }),
|
|
3267
|
+
/* @__PURE__ */ jsx6("p", { className: "mbdash-copy", children: "Current balances and aging at a glance." })
|
|
3117
3268
|
] }) }),
|
|
3118
|
-
/* @__PURE__ */
|
|
3119
|
-
/* @__PURE__ */
|
|
3120
|
-
/* @__PURE__ */
|
|
3121
|
-
/* @__PURE__ */
|
|
3269
|
+
/* @__PURE__ */ jsxs6("div", { className: "mbdash-card mbdash-summary", children: [
|
|
3270
|
+
/* @__PURE__ */ jsxs6("div", { className: "mbdash-stat", children: [
|
|
3271
|
+
/* @__PURE__ */ jsx6("span", { className: "mbdash-label", children: "Outstanding" }),
|
|
3272
|
+
/* @__PURE__ */ jsx6("span", { className: "mbdash-value", children: money3(summary.outstanding) })
|
|
3122
3273
|
] }),
|
|
3123
|
-
/* @__PURE__ */
|
|
3124
|
-
/* @__PURE__ */
|
|
3125
|
-
/* @__PURE__ */
|
|
3274
|
+
/* @__PURE__ */ jsxs6("div", { className: "mbdash-stat", children: [
|
|
3275
|
+
/* @__PURE__ */ jsx6("span", { className: "mbdash-label", children: "Open bills" }),
|
|
3276
|
+
/* @__PURE__ */ jsx6("span", { className: "mbdash-value", children: summary.openCount })
|
|
3126
3277
|
] }),
|
|
3127
|
-
/* @__PURE__ */
|
|
3128
|
-
/* @__PURE__ */
|
|
3129
|
-
/* @__PURE__ */
|
|
3278
|
+
/* @__PURE__ */ jsxs6("div", { className: "mbdash-stat", children: [
|
|
3279
|
+
/* @__PURE__ */ jsx6("span", { className: "mbdash-label", children: "Collected" }),
|
|
3280
|
+
/* @__PURE__ */ jsx6("span", { className: "mbdash-value", children: money3(summary.totalPaid) })
|
|
3130
3281
|
] }),
|
|
3131
|
-
/* @__PURE__ */
|
|
3132
|
-
/* @__PURE__ */
|
|
3133
|
-
/* @__PURE__ */
|
|
3282
|
+
/* @__PURE__ */ jsxs6("div", { className: "mbdash-stat", children: [
|
|
3283
|
+
/* @__PURE__ */ jsx6("span", { className: "mbdash-label", children: "Total billed" }),
|
|
3284
|
+
/* @__PURE__ */ jsx6("span", { className: "mbdash-value", children: money3(summary.totalBilled) })
|
|
3134
3285
|
] })
|
|
3135
3286
|
] }),
|
|
3136
|
-
/* @__PURE__ */
|
|
3137
|
-
/* @__PURE__ */
|
|
3138
|
-
/* @__PURE__ */
|
|
3139
|
-
/* @__PURE__ */
|
|
3287
|
+
/* @__PURE__ */ jsx6("div", { className: "mbdash-card mbdash-aging", children: summary.aging.map((bucket) => /* @__PURE__ */ jsxs6("div", { className: "mbdash-aging-item", children: [
|
|
3288
|
+
/* @__PURE__ */ jsx6("span", { className: "mbdash-label", children: bucket.label }),
|
|
3289
|
+
/* @__PURE__ */ jsx6("strong", { children: money3(bucket.balance) }),
|
|
3290
|
+
/* @__PURE__ */ jsxs6("span", { children: [
|
|
3140
3291
|
bucket.count,
|
|
3141
3292
|
" bill",
|
|
3142
3293
|
bucket.count === 1 ? "" : "s"
|
|
@@ -3150,11 +3301,11 @@ function BillAgingSummary(props) {
|
|
|
3150
3301
|
...props.className === void 0 ? {} : { className: props.className },
|
|
3151
3302
|
...props.style === void 0 ? {} : { style: props.style }
|
|
3152
3303
|
};
|
|
3153
|
-
return /* @__PURE__ */
|
|
3304
|
+
return /* @__PURE__ */ jsx6(Shell, { ...shellProps, children: /* @__PURE__ */ jsx6(AgingContent, { bills: props.bills, ...props.heading === void 0 ? {} : { heading: props.heading } }) });
|
|
3154
3305
|
}
|
|
3155
3306
|
function BillingDashboard({ bills, heading = "Billing", description = "Track submitted bills, payments, and outstanding balances.", onSelectBill, initialSearch = "", initialState = "all", hideFilters = false, appearance, className, style }) {
|
|
3156
|
-
const [search, setSearch] =
|
|
3157
|
-
const [state, setState] =
|
|
3307
|
+
const [search, setSearch] = useState6(initialSearch);
|
|
3308
|
+
const [state, setState] = useState6(initialState);
|
|
3158
3309
|
const states = useMemo4(() => [...new Set(bills.map((bill) => bill.state))].sort((a, b) => a.localeCompare(b)), [bills]);
|
|
3159
3310
|
const filtered = useMemo4(() => {
|
|
3160
3311
|
const query = search.trim().toLowerCase();
|
|
@@ -3166,20 +3317,20 @@ function BillingDashboard({ bills, heading = "Billing", description = "Track sub
|
|
|
3166
3317
|
...style === void 0 ? {} : { style }
|
|
3167
3318
|
};
|
|
3168
3319
|
const listProps = { bills: filtered, ...onSelectBill === void 0 ? {} : { onSelectBill } };
|
|
3169
|
-
return /* @__PURE__ */
|
|
3170
|
-
/* @__PURE__ */
|
|
3171
|
-
/* @__PURE__ */
|
|
3172
|
-
/* @__PURE__ */
|
|
3320
|
+
return /* @__PURE__ */ jsxs6(Shell, { ...shellProps, children: [
|
|
3321
|
+
/* @__PURE__ */ jsx6("div", { className: "mbdash-head", children: /* @__PURE__ */ jsxs6("div", { children: [
|
|
3322
|
+
/* @__PURE__ */ jsx6("h2", { children: heading }),
|
|
3323
|
+
/* @__PURE__ */ jsx6("p", { className: "mbdash-copy", children: description })
|
|
3173
3324
|
] }) }),
|
|
3174
|
-
/* @__PURE__ */
|
|
3175
|
-
hideFilters ? null : /* @__PURE__ */
|
|
3176
|
-
/* @__PURE__ */
|
|
3177
|
-
/* @__PURE__ */
|
|
3178
|
-
/* @__PURE__ */
|
|
3179
|
-
states.map((item) => /* @__PURE__ */
|
|
3325
|
+
/* @__PURE__ */ jsx6(AgingContent, { bills: filtered, heading: "Receivables" }),
|
|
3326
|
+
hideFilters ? null : /* @__PURE__ */ jsxs6("div", { className: "mbdash-filters", children: [
|
|
3327
|
+
/* @__PURE__ */ jsx6("input", { className: "mbdash-control", type: "search", value: search, onChange: (event) => setSearch(event.target.value), placeholder: "Search patient, claim, payer, or bill\u2026", "aria-label": "Search bills" }),
|
|
3328
|
+
/* @__PURE__ */ jsxs6("select", { className: "mbdash-control", value: state, onChange: (event) => setState(event.target.value), "aria-label": "Filter bills by status", children: [
|
|
3329
|
+
/* @__PURE__ */ jsx6("option", { value: "all", children: "All statuses" }),
|
|
3330
|
+
states.map((item) => /* @__PURE__ */ jsx6("option", { value: item, children: stateLabel(item) }, item))
|
|
3180
3331
|
] })
|
|
3181
3332
|
] }),
|
|
3182
|
-
/* @__PURE__ */
|
|
3333
|
+
/* @__PURE__ */ jsx6(BillListContent, { ...listProps })
|
|
3183
3334
|
] });
|
|
3184
3335
|
}
|
|
3185
3336
|
function buildBillingReportRows(bills, groupBy = "status") {
|
|
@@ -3208,39 +3359,39 @@ function BillingReport({ bills, groupBy = "status", heading = "Billing report",
|
|
|
3208
3359
|
className: `mbdash-report ${className ?? ""}`.trim(),
|
|
3209
3360
|
...style === void 0 ? {} : { style }
|
|
3210
3361
|
};
|
|
3211
|
-
return /* @__PURE__ */
|
|
3212
|
-
/* @__PURE__ */
|
|
3213
|
-
/* @__PURE__ */
|
|
3214
|
-
/* @__PURE__ */
|
|
3215
|
-
/* @__PURE__ */
|
|
3362
|
+
return /* @__PURE__ */ jsx6(Shell, { ...shellProps, children: /* @__PURE__ */ jsxs6("div", { className: "mbdash-card", children: [
|
|
3363
|
+
/* @__PURE__ */ jsxs6("div", { className: "mbdash-report-head", children: [
|
|
3364
|
+
/* @__PURE__ */ jsxs6("div", { children: [
|
|
3365
|
+
/* @__PURE__ */ jsx6("h2", { children: heading }),
|
|
3366
|
+
/* @__PURE__ */ jsx6("p", { className: "mbdash-copy", children: description })
|
|
3216
3367
|
] }),
|
|
3217
|
-
/* @__PURE__ */
|
|
3368
|
+
/* @__PURE__ */ jsxs6("span", { className: "mbdash-state", children: [
|
|
3218
3369
|
"By ",
|
|
3219
3370
|
groupBy
|
|
3220
3371
|
] })
|
|
3221
3372
|
] }),
|
|
3222
|
-
/* @__PURE__ */
|
|
3223
|
-
/* @__PURE__ */
|
|
3224
|
-
/* @__PURE__ */
|
|
3225
|
-
/* @__PURE__ */
|
|
3226
|
-
/* @__PURE__ */
|
|
3227
|
-
/* @__PURE__ */
|
|
3228
|
-
/* @__PURE__ */
|
|
3373
|
+
/* @__PURE__ */ jsx6("div", { className: "mbdash-table-wrap", children: /* @__PURE__ */ jsxs6("table", { className: "mbdash-table", children: [
|
|
3374
|
+
/* @__PURE__ */ jsx6("thead", { children: /* @__PURE__ */ jsxs6("tr", { children: [
|
|
3375
|
+
/* @__PURE__ */ jsx6("th", { children: "Group" }),
|
|
3376
|
+
/* @__PURE__ */ jsx6("th", { children: "Bills" }),
|
|
3377
|
+
/* @__PURE__ */ jsx6("th", { className: "mbdash-money", children: "Billed" }),
|
|
3378
|
+
/* @__PURE__ */ jsx6("th", { className: "mbdash-money", children: "Paid" }),
|
|
3379
|
+
/* @__PURE__ */ jsx6("th", { className: "mbdash-money", children: "Balance" })
|
|
3229
3380
|
] }) }),
|
|
3230
|
-
/* @__PURE__ */
|
|
3231
|
-
rows.map((row) => /* @__PURE__ */
|
|
3232
|
-
/* @__PURE__ */
|
|
3233
|
-
/* @__PURE__ */
|
|
3234
|
-
/* @__PURE__ */
|
|
3235
|
-
/* @__PURE__ */
|
|
3236
|
-
/* @__PURE__ */
|
|
3381
|
+
/* @__PURE__ */ jsxs6("tbody", { children: [
|
|
3382
|
+
rows.map((row) => /* @__PURE__ */ jsxs6("tr", { children: [
|
|
3383
|
+
/* @__PURE__ */ jsx6("td", { children: /* @__PURE__ */ jsx6("strong", { children: row.label }) }),
|
|
3384
|
+
/* @__PURE__ */ jsx6("td", { children: row.billCount }),
|
|
3385
|
+
/* @__PURE__ */ jsx6("td", { className: "mbdash-money", children: money3(row.totalBilled) }),
|
|
3386
|
+
/* @__PURE__ */ jsx6("td", { className: "mbdash-money", children: money3(row.totalPaid) }),
|
|
3387
|
+
/* @__PURE__ */ jsx6("td", { className: "mbdash-money", children: money3(row.balanceDue) })
|
|
3237
3388
|
] }, row.key)),
|
|
3238
|
-
/* @__PURE__ */
|
|
3239
|
-
/* @__PURE__ */
|
|
3240
|
-
/* @__PURE__ */
|
|
3241
|
-
/* @__PURE__ */
|
|
3242
|
-
/* @__PURE__ */
|
|
3243
|
-
/* @__PURE__ */
|
|
3389
|
+
/* @__PURE__ */ jsxs6("tr", { className: "mbdash-report-total", children: [
|
|
3390
|
+
/* @__PURE__ */ jsx6("td", { children: "Total" }),
|
|
3391
|
+
/* @__PURE__ */ jsx6("td", { children: total.bills }),
|
|
3392
|
+
/* @__PURE__ */ jsx6("td", { className: "mbdash-money", children: money3(total.totalBilled) }),
|
|
3393
|
+
/* @__PURE__ */ jsx6("td", { className: "mbdash-money", children: money3(total.totalPaid) }),
|
|
3394
|
+
/* @__PURE__ */ jsx6("td", { className: "mbdash-money", children: money3(total.outstanding) })
|
|
3244
3395
|
] })
|
|
3245
3396
|
] })
|
|
3246
3397
|
] }) })
|
|
@@ -3249,7 +3400,7 @@ function BillingReport({ bills, groupBy = "status", heading = "Billing report",
|
|
|
3249
3400
|
|
|
3250
3401
|
// src/status-aging-matrix.tsx
|
|
3251
3402
|
import { useMemo as useMemo5 } from "react";
|
|
3252
|
-
import { jsx as
|
|
3403
|
+
import { jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
3253
3404
|
var BILL_STATUS_AGING_BUCKETS = [
|
|
3254
3405
|
{ id: "current", label: "0\u201330 days" },
|
|
3255
3406
|
{ id: "31-60", label: "31\u201360 days" },
|
|
@@ -3312,7 +3463,7 @@ function buildBillStatusAgingCsv(bills, stateOrder) {
|
|
|
3312
3463
|
lines.push(["Total", ...matrix.columnTotals.map((cell) => cell.count), matrix.grandTotal.count]);
|
|
3313
3464
|
return [header, ...lines].map((line) => line.map(escape).join(",")).join("\n");
|
|
3314
3465
|
}
|
|
3315
|
-
var
|
|
3466
|
+
var css5 = `
|
|
3316
3467
|
.mbmx{color:var(--mb-text);font-family:var(--mb-font);font-size:15px}.mbmx *{box-sizing:border-box}.mbmx h2,.mbmx p{margin:0}
|
|
3317
3468
|
.mbmx-head{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;margin-bottom:16px}.mbmx-head h2{font-size:24px}.mbmx-copy{color:var(--mb-muted);margin-top:5px!important}
|
|
3318
3469
|
.mbmx-card{border:1px solid var(--mb-border);border-radius:var(--mb-radius);background:var(--mb-surface);box-shadow:var(--mb-shadow);overflow:auto}
|
|
@@ -3343,7 +3494,7 @@ function BillStatusAgingMatrix({
|
|
|
3343
3494
|
}) {
|
|
3344
3495
|
const matrix = useMemo5(() => buildBillStatusAgingMatrix(bills, stateOrder), [bills, stateOrder]);
|
|
3345
3496
|
const clickable = Boolean(onSelectCell);
|
|
3346
|
-
const cell = (data, key, isTotal = false) => /* @__PURE__ */
|
|
3497
|
+
const cell = (data, key, isTotal = false) => /* @__PURE__ */ jsx7("td", { className: isTotal ? "mbmx-rowtotal" : void 0, children: /* @__PURE__ */ jsxs7(
|
|
3347
3498
|
"button",
|
|
3348
3499
|
{
|
|
3349
3500
|
type: "button",
|
|
@@ -3353,31 +3504,31 @@ function BillStatusAgingMatrix({
|
|
|
3353
3504
|
disabled: !clickable || data.count === 0,
|
|
3354
3505
|
"aria-label": `${stateLabel2(data.state)} \xB7 ${data.bucket === "total" ? "all ages" : data.bucket}: ${data.count} bills`,
|
|
3355
3506
|
children: [
|
|
3356
|
-
/* @__PURE__ */
|
|
3357
|
-
showBalances && data.count > 0 ? /* @__PURE__ */
|
|
3507
|
+
/* @__PURE__ */ jsx7("span", { className: `mbmx-count ${data.count === 0 ? "mbmx-zero" : ""}`.trim(), children: data.count === 0 ? "\u2014" : data.count }),
|
|
3508
|
+
showBalances && data.count > 0 ? /* @__PURE__ */ jsx7("span", { className: "mbmx-balance", children: money4(data.balance) }) : null
|
|
3358
3509
|
]
|
|
3359
3510
|
}
|
|
3360
3511
|
) }, key);
|
|
3361
|
-
return /* @__PURE__ */
|
|
3362
|
-
/* @__PURE__ */
|
|
3363
|
-
/* @__PURE__ */
|
|
3364
|
-
/* @__PURE__ */
|
|
3365
|
-
/* @__PURE__ */
|
|
3512
|
+
return /* @__PURE__ */ jsxs7("div", { className: `mbmx ${className}`.trim(), style: { ...mindBillAppearanceStyle(appearance), ...style }, children: [
|
|
3513
|
+
/* @__PURE__ */ jsx7("style", { children: css5 }),
|
|
3514
|
+
/* @__PURE__ */ jsx7("div", { className: "mbmx-head", children: /* @__PURE__ */ jsxs7("div", { children: [
|
|
3515
|
+
/* @__PURE__ */ jsx7("h2", { children: heading }),
|
|
3516
|
+
/* @__PURE__ */ jsx7("p", { className: "mbmx-copy", children: description })
|
|
3366
3517
|
] }) }),
|
|
3367
|
-
/* @__PURE__ */
|
|
3368
|
-
/* @__PURE__ */
|
|
3369
|
-
/* @__PURE__ */
|
|
3370
|
-
BILL_STATUS_AGING_BUCKETS.map((bucket) => /* @__PURE__ */
|
|
3371
|
-
/* @__PURE__ */
|
|
3518
|
+
/* @__PURE__ */ jsx7("div", { className: "mbmx-card", children: /* @__PURE__ */ jsxs7("table", { className: "mbmx-table", children: [
|
|
3519
|
+
/* @__PURE__ */ jsx7("thead", { children: /* @__PURE__ */ jsxs7("tr", { children: [
|
|
3520
|
+
/* @__PURE__ */ jsx7("th", { children: "Status" }),
|
|
3521
|
+
BILL_STATUS_AGING_BUCKETS.map((bucket) => /* @__PURE__ */ jsx7("th", { children: bucket.label }, bucket.id)),
|
|
3522
|
+
/* @__PURE__ */ jsx7("th", { children: "Total" })
|
|
3372
3523
|
] }) }),
|
|
3373
|
-
/* @__PURE__ */
|
|
3374
|
-
matrix.rows.map((row) => /* @__PURE__ */
|
|
3375
|
-
/* @__PURE__ */
|
|
3524
|
+
/* @__PURE__ */ jsxs7("tbody", { children: [
|
|
3525
|
+
matrix.rows.map((row) => /* @__PURE__ */ jsxs7("tr", { children: [
|
|
3526
|
+
/* @__PURE__ */ jsx7("td", { children: /* @__PURE__ */ jsx7("span", { className: "mbmx-state", children: row.label }) }),
|
|
3376
3527
|
row.cells.map((data) => cell(data, `${row.state}-${data.bucket}`)),
|
|
3377
3528
|
cell(row.total, `${row.state}-total`, true)
|
|
3378
3529
|
] }, row.state)),
|
|
3379
|
-
/* @__PURE__ */
|
|
3380
|
-
/* @__PURE__ */
|
|
3530
|
+
/* @__PURE__ */ jsxs7("tr", { className: "mbmx-total", children: [
|
|
3531
|
+
/* @__PURE__ */ jsx7("td", { children: "Total" }),
|
|
3381
3532
|
matrix.columnTotals.map((data) => cell(data, `all-${data.bucket}`)),
|
|
3382
3533
|
cell(matrix.grandTotal, "all-total", true)
|
|
3383
3534
|
] })
|
|
@@ -3395,7 +3546,7 @@ import {
|
|
|
3395
3546
|
billTasksAgingBucketIndex,
|
|
3396
3547
|
buildBillTasksDashboard
|
|
3397
3548
|
} from "@mindbill/browser";
|
|
3398
|
-
import { Fragment as
|
|
3549
|
+
import { Fragment as Fragment6, jsx as jsx8, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
3399
3550
|
var TONES = {
|
|
3400
3551
|
violet: "#7c53c3",
|
|
3401
3552
|
red: "#cf4437",
|
|
@@ -3405,7 +3556,7 @@ var TONES = {
|
|
|
3405
3556
|
neutral: "#8195a1"
|
|
3406
3557
|
};
|
|
3407
3558
|
var BUCKET_PILL_BASES = ["#2c9a5b", "#1f9aa8", "#dcbb28", "#e08a2e", "#d75d8a"];
|
|
3408
|
-
var
|
|
3559
|
+
var css6 = `
|
|
3409
3560
|
.mbtk{color:var(--mb-text);font-family:var(--mb-font);font-size:14px}.mbtk *{box-sizing:border-box}.mbtk h2,.mbtk p{margin:0}
|
|
3410
3561
|
.mbtk-heading{margin-bottom:14px}.mbtk-heading h2{font-size:24px}
|
|
3411
3562
|
.mbtk-toolbar{margin-bottom:14px}
|
|
@@ -3438,9 +3589,9 @@ var css5 = `
|
|
|
3438
3589
|
`;
|
|
3439
3590
|
function cellButton(key, count, className, label, onSelect) {
|
|
3440
3591
|
if (count > 0 && onSelect) {
|
|
3441
|
-
return /* @__PURE__ */
|
|
3592
|
+
return /* @__PURE__ */ jsx8("span", { className, children: /* @__PURE__ */ jsx8("button", { type: "button", className: "mbtk-link", "aria-label": label, onClick: onSelect, children: count }) }, key);
|
|
3442
3593
|
}
|
|
3443
|
-
return /* @__PURE__ */
|
|
3594
|
+
return /* @__PURE__ */ jsx8("span", { className: `${className}${count === 0 ? " mbtk-zero" : ""}`, children: count }, key);
|
|
3444
3595
|
}
|
|
3445
3596
|
function TaskRow({
|
|
3446
3597
|
sectionId,
|
|
@@ -3449,8 +3600,8 @@ function TaskRow({
|
|
|
3449
3600
|
onSelectCell
|
|
3450
3601
|
}) {
|
|
3451
3602
|
const allRefs = row.refs.flat();
|
|
3452
|
-
return /* @__PURE__ */
|
|
3453
|
-
/* @__PURE__ */
|
|
3603
|
+
return /* @__PURE__ */ jsxs8("div", { className: "mbtk-grid mbtk-row", children: [
|
|
3604
|
+
/* @__PURE__ */ jsx8("span", { className: "mbtk-rowlabel", children: row.label }),
|
|
3454
3605
|
buckets.map((bucket, index) => {
|
|
3455
3606
|
const count = row.counts[index] ?? 0;
|
|
3456
3607
|
return cellButton(
|
|
@@ -3476,25 +3627,25 @@ function SectionCard({
|
|
|
3476
3627
|
emptyLabel,
|
|
3477
3628
|
onSelectCell
|
|
3478
3629
|
}) {
|
|
3479
|
-
return /* @__PURE__ */
|
|
3630
|
+
return /* @__PURE__ */ jsxs8(
|
|
3480
3631
|
"section",
|
|
3481
3632
|
{
|
|
3482
3633
|
className: "mbtk-section",
|
|
3483
3634
|
style: { "--mbtk-tone": TONES[section.tone] },
|
|
3484
3635
|
"aria-label": section.label,
|
|
3485
3636
|
children: [
|
|
3486
|
-
/* @__PURE__ */
|
|
3487
|
-
/* @__PURE__ */
|
|
3488
|
-
/* @__PURE__ */
|
|
3489
|
-
/* @__PURE__ */
|
|
3490
|
-
/* @__PURE__ */
|
|
3491
|
-
/* @__PURE__ */
|
|
3637
|
+
/* @__PURE__ */ jsxs8("div", { className: "mbtk-grid mbtk-head", children: [
|
|
3638
|
+
/* @__PURE__ */ jsxs8("span", { className: "mbtk-title", children: [
|
|
3639
|
+
/* @__PURE__ */ jsx8("i", { className: "mbtk-dot", "aria-hidden": "true" }),
|
|
3640
|
+
/* @__PURE__ */ jsxs8("span", { className: "mbtk-title-text", children: [
|
|
3641
|
+
/* @__PURE__ */ jsx8("strong", { children: section.label }),
|
|
3642
|
+
/* @__PURE__ */ jsxs8("span", { className: "mbtk-basis", children: [
|
|
3492
3643
|
"by ",
|
|
3493
3644
|
section.agingBasisLabel
|
|
3494
3645
|
] })
|
|
3495
3646
|
] })
|
|
3496
3647
|
] }),
|
|
3497
|
-
buckets.map((bucket, index) => /* @__PURE__ */
|
|
3648
|
+
buckets.map((bucket, index) => /* @__PURE__ */ jsx8(
|
|
3498
3649
|
"span",
|
|
3499
3650
|
{
|
|
3500
3651
|
className: "mbtk-pill",
|
|
@@ -3503,14 +3654,14 @@ function SectionCard({
|
|
|
3503
3654
|
},
|
|
3504
3655
|
bucket.id
|
|
3505
3656
|
)),
|
|
3506
|
-
/* @__PURE__ */
|
|
3657
|
+
/* @__PURE__ */ jsx8("span", { className: "mbtk-colhead", children: "Task Total" })
|
|
3507
3658
|
] }),
|
|
3508
|
-
section.empty ? /* @__PURE__ */
|
|
3509
|
-
section.rows.map((row) => /* @__PURE__ */
|
|
3510
|
-
/* @__PURE__ */
|
|
3511
|
-
/* @__PURE__ */
|
|
3512
|
-
buckets.map((bucket, index) => /* @__PURE__ */
|
|
3513
|
-
/* @__PURE__ */
|
|
3659
|
+
section.empty ? /* @__PURE__ */ jsx8("p", { className: "mbtk-empty", children: emptyLabel }) : /* @__PURE__ */ jsxs8(Fragment6, { children: [
|
|
3660
|
+
section.rows.map((row) => /* @__PURE__ */ jsx8(TaskRow, { sectionId: section.id, row, buckets, onSelectCell }, row.id)),
|
|
3661
|
+
/* @__PURE__ */ jsxs8("div", { className: "mbtk-grid mbtk-row mbtk-totals", children: [
|
|
3662
|
+
/* @__PURE__ */ jsx8("span", { className: "mbtk-rowlabel", children: "Total" }),
|
|
3663
|
+
buckets.map((bucket, index) => /* @__PURE__ */ jsx8("span", { className: "mbtk-count", children: section.totals[index] ?? 0 }, bucket.id)),
|
|
3664
|
+
/* @__PURE__ */ jsx8("span", { className: "mbtk-total", children: section.total })
|
|
3514
3665
|
] })
|
|
3515
3666
|
] })
|
|
3516
3667
|
]
|
|
@@ -3531,16 +3682,16 @@ function BillTasksDashboard({
|
|
|
3531
3682
|
style
|
|
3532
3683
|
}) {
|
|
3533
3684
|
const columns = `minmax(150px,1.6fr) repeat(${buckets.length},minmax(84px,1fr)) minmax(84px,1fr)`;
|
|
3534
|
-
return /* @__PURE__ */
|
|
3685
|
+
return /* @__PURE__ */ jsxs8(
|
|
3535
3686
|
"div",
|
|
3536
3687
|
{
|
|
3537
3688
|
className: `mbtk ${className}`.trim(),
|
|
3538
3689
|
style: { ...mindBillAppearanceStyle(appearance), "--mbtk-cols": columns, ...style },
|
|
3539
3690
|
children: [
|
|
3540
|
-
/* @__PURE__ */
|
|
3541
|
-
heading ? /* @__PURE__ */
|
|
3542
|
-
toolbar ? /* @__PURE__ */
|
|
3543
|
-
data.sections.map((section) => /* @__PURE__ */
|
|
3691
|
+
/* @__PURE__ */ jsx8("style", { children: css6 }),
|
|
3692
|
+
heading ? /* @__PURE__ */ jsx8("div", { className: "mbtk-heading", children: typeof heading === "string" ? /* @__PURE__ */ jsx8("h2", { children: heading }) : heading }) : null,
|
|
3693
|
+
toolbar ? /* @__PURE__ */ jsx8("div", { className: "mbtk-toolbar", children: toolbar }) : null,
|
|
3694
|
+
data.sections.map((section) => /* @__PURE__ */ jsx8(
|
|
3544
3695
|
SectionCard,
|
|
3545
3696
|
{
|
|
3546
3697
|
section,
|
|
@@ -3550,19 +3701,19 @@ function BillTasksDashboard({
|
|
|
3550
3701
|
},
|
|
3551
3702
|
section.id
|
|
3552
3703
|
)),
|
|
3553
|
-
/* @__PURE__ */
|
|
3554
|
-
/* @__PURE__ */
|
|
3555
|
-
buckets.map((bucket, index) => /* @__PURE__ */
|
|
3556
|
-
/* @__PURE__ */
|
|
3704
|
+
/* @__PURE__ */ jsx8("section", { className: "mbtk-section is-grand", "aria-label": grandTotalLabel, children: /* @__PURE__ */ jsxs8("div", { className: "mbtk-grid mbtk-row mbtk-grand mbtk-totals", children: [
|
|
3705
|
+
/* @__PURE__ */ jsx8("span", { className: "mbtk-rowlabel", children: grandTotalLabel }),
|
|
3706
|
+
buckets.map((bucket, index) => /* @__PURE__ */ jsx8("span", { className: "mbtk-count", children: data.grandTotals[index] ?? 0 }, bucket.id)),
|
|
3707
|
+
/* @__PURE__ */ jsx8("span", { className: "mbtk-total", children: data.grandTotal })
|
|
3557
3708
|
] }) }),
|
|
3558
|
-
footnote ? /* @__PURE__ */
|
|
3709
|
+
footnote ? /* @__PURE__ */ jsx8("p", { className: "mbtk-footnote", children: footnote }) : null
|
|
3559
3710
|
]
|
|
3560
3711
|
}
|
|
3561
3712
|
);
|
|
3562
3713
|
}
|
|
3563
3714
|
|
|
3564
3715
|
// src/bill-submissions-ribbon.tsx
|
|
3565
|
-
import { Fragment as
|
|
3716
|
+
import { Fragment as Fragment7, jsx as jsx9, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
3566
3717
|
function billSubmissionsRibbonDeliveryLabel(summary) {
|
|
3567
3718
|
if (/electronically sent/i.test(summary)) return "e-Bill (837)";
|
|
3568
3719
|
if (/faxed/i.test(summary)) return "Fax";
|
|
@@ -3585,7 +3736,7 @@ function billSubmissionsRibbonFromHistory(history) {
|
|
|
3585
3736
|
]
|
|
3586
3737
|
}));
|
|
3587
3738
|
}
|
|
3588
|
-
var
|
|
3739
|
+
var css7 = `
|
|
3589
3740
|
.mbsr{display:flex;gap:10px;overflow-x:auto;padding-bottom:4px;color:var(--mb-text);font-family:var(--mb-font);font-size:13px}
|
|
3590
3741
|
.mbsr *{box-sizing:border-box}
|
|
3591
3742
|
.mbsr-chip{flex:0 0 auto;display:grid;gap:7px;min-width:180px;max-width:280px;padding:11px 13px;border:1px solid var(--mb-border);border-radius:var(--mb-control-radius);background:var(--mb-surface);color:inherit;font:inherit;text-align:left;text-decoration:none;cursor:pointer}
|
|
@@ -3606,7 +3757,7 @@ function BillSubmissionsRibbon({
|
|
|
3606
3757
|
className = "",
|
|
3607
3758
|
style
|
|
3608
3759
|
}) {
|
|
3609
|
-
return /* @__PURE__ */
|
|
3760
|
+
return /* @__PURE__ */ jsxs9(
|
|
3610
3761
|
"div",
|
|
3611
3762
|
{
|
|
3612
3763
|
className: `mbsr ${className}`.trim(),
|
|
@@ -3614,19 +3765,19 @@ function BillSubmissionsRibbon({
|
|
|
3614
3765
|
role: "list",
|
|
3615
3766
|
"aria-label": "Bill submissions",
|
|
3616
3767
|
children: [
|
|
3617
|
-
/* @__PURE__ */
|
|
3768
|
+
/* @__PURE__ */ jsx9("style", { children: css7 }),
|
|
3618
3769
|
items.map((item) => {
|
|
3619
|
-
const content = /* @__PURE__ */
|
|
3620
|
-
/* @__PURE__ */
|
|
3621
|
-
/* @__PURE__ */
|
|
3622
|
-
item.badge ? /* @__PURE__ */
|
|
3770
|
+
const content = /* @__PURE__ */ jsxs9(Fragment7, { children: [
|
|
3771
|
+
/* @__PURE__ */ jsxs9("span", { className: "mbsr-top", children: [
|
|
3772
|
+
/* @__PURE__ */ jsx9("span", { className: "mbsr-label", children: item.label }),
|
|
3773
|
+
item.badge ? /* @__PURE__ */ jsx9("span", { className: "mbsr-badge", children: item.badge }) : null
|
|
3623
3774
|
] }),
|
|
3624
|
-
item.meta?.length ? /* @__PURE__ */
|
|
3625
|
-
/* @__PURE__ */
|
|
3626
|
-
/* @__PURE__ */
|
|
3775
|
+
item.meta?.length ? /* @__PURE__ */ jsx9("span", { className: "mbsr-meta", children: item.meta.slice(0, 3).map((pair) => /* @__PURE__ */ jsxs9("span", { children: [
|
|
3776
|
+
/* @__PURE__ */ jsx9("i", { children: pair.label }),
|
|
3777
|
+
/* @__PURE__ */ jsx9("b", { children: pair.value })
|
|
3627
3778
|
] }, pair.label)) }) : null
|
|
3628
3779
|
] });
|
|
3629
|
-
return item.href ? /* @__PURE__ */
|
|
3780
|
+
return item.href ? /* @__PURE__ */ jsx9(
|
|
3630
3781
|
"a",
|
|
3631
3782
|
{
|
|
3632
3783
|
className: "mbsr-chip",
|
|
@@ -3637,7 +3788,7 @@ function BillSubmissionsRibbon({
|
|
|
3637
3788
|
children: content
|
|
3638
3789
|
},
|
|
3639
3790
|
item.id
|
|
3640
|
-
) : /* @__PURE__ */
|
|
3791
|
+
) : /* @__PURE__ */ jsx9(
|
|
3641
3792
|
"button",
|
|
3642
3793
|
{
|
|
3643
3794
|
type: "button",
|
|
@@ -3656,13 +3807,13 @@ function BillSubmissionsRibbon({
|
|
|
3656
3807
|
}
|
|
3657
3808
|
|
|
3658
3809
|
// src/report-bill-status-dialog.tsx
|
|
3659
|
-
import { useEffect as
|
|
3810
|
+
import { useEffect as useEffect6, useState as useState7 } from "react";
|
|
3660
3811
|
import {
|
|
3661
3812
|
REPORT_BILL_STATUS_OPTIONS
|
|
3662
3813
|
} from "@mindbill/browser";
|
|
3663
3814
|
import { REPORT_BILL_STATUS_OPTIONS as REPORT_BILL_STATUS_OPTIONS2 } from "@mindbill/browser";
|
|
3664
|
-
import { jsx as
|
|
3665
|
-
var
|
|
3815
|
+
import { jsx as jsx10, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
3816
|
+
var css8 = `
|
|
3666
3817
|
.mbbs-overlay{position:fixed;inset:0;z-index:1000;display:grid;place-items:center;padding:20px;background:rgba(15,30,40,.45)}
|
|
3667
3818
|
.mbbs{display:grid;gap:18px;width:min(860px,100%);max-height:min(90vh,960px);overflow:auto;overscroll-behavior:contain;padding:24px;border:1px solid var(--mb-border);border-radius:var(--mb-radius);background:var(--mb-surface);color:var(--mb-text);font-family:var(--mb-font);font-size:14px;box-shadow:0 24px 60px rgba(17,38,49,.28)}
|
|
3668
3819
|
.mbbs *{box-sizing:border-box}
|
|
@@ -3712,14 +3863,14 @@ function ReportBillStatusDialog({
|
|
|
3712
3863
|
className = "",
|
|
3713
3864
|
style
|
|
3714
3865
|
}) {
|
|
3715
|
-
const [status, setStatus] =
|
|
3716
|
-
const [company, setCompany] =
|
|
3717
|
-
const [representativeName, setRepresentativeName] =
|
|
3718
|
-
const [representativeRole, setRepresentativeRole] =
|
|
3719
|
-
const [phone, setPhone] =
|
|
3720
|
-
const [callReference, setCallReference] =
|
|
3721
|
-
const [note, setNote] =
|
|
3722
|
-
|
|
3866
|
+
const [status, setStatus] = useState7(null);
|
|
3867
|
+
const [company, setCompany] = useState7("");
|
|
3868
|
+
const [representativeName, setRepresentativeName] = useState7("");
|
|
3869
|
+
const [representativeRole, setRepresentativeRole] = useState7("");
|
|
3870
|
+
const [phone, setPhone] = useState7("");
|
|
3871
|
+
const [callReference, setCallReference] = useState7("");
|
|
3872
|
+
const [note, setNote] = useState7("");
|
|
3873
|
+
useEffect6(() => {
|
|
3723
3874
|
const onKey = (event) => {
|
|
3724
3875
|
if (event.key === "Escape" && !submitting) onCancel();
|
|
3725
3876
|
};
|
|
@@ -3738,11 +3889,11 @@ function ReportBillStatusDialog({
|
|
|
3738
3889
|
...note.trim() ? { note: note.trim() } : {}
|
|
3739
3890
|
});
|
|
3740
3891
|
};
|
|
3741
|
-
const field = (label, value, onChange) => /* @__PURE__ */
|
|
3742
|
-
/* @__PURE__ */
|
|
3743
|
-
/* @__PURE__ */
|
|
3892
|
+
const field = (label, value, onChange) => /* @__PURE__ */ jsxs10("label", { className: "mbbs-field", children: [
|
|
3893
|
+
/* @__PURE__ */ jsx10("span", { className: "mbbs-label", children: label }),
|
|
3894
|
+
/* @__PURE__ */ jsx10("input", { className: "mbbs-input", value, disabled: submitting, onChange: (event) => onChange(event.target.value) })
|
|
3744
3895
|
] }, label);
|
|
3745
|
-
return /* @__PURE__ */
|
|
3896
|
+
return /* @__PURE__ */ jsxs10(
|
|
3746
3897
|
"div",
|
|
3747
3898
|
{
|
|
3748
3899
|
className: "mbbs-overlay",
|
|
@@ -3751,8 +3902,8 @@ function ReportBillStatusDialog({
|
|
|
3751
3902
|
if (event.target === event.currentTarget && !submitting) onCancel();
|
|
3752
3903
|
},
|
|
3753
3904
|
children: [
|
|
3754
|
-
/* @__PURE__ */
|
|
3755
|
-
/* @__PURE__ */
|
|
3905
|
+
/* @__PURE__ */ jsx10("style", { children: css8 }),
|
|
3906
|
+
/* @__PURE__ */ jsxs10(
|
|
3756
3907
|
"div",
|
|
3757
3908
|
{
|
|
3758
3909
|
className: `mbbs ${className}`.trim(),
|
|
@@ -3761,57 +3912,57 @@ function ReportBillStatusDialog({
|
|
|
3761
3912
|
"aria-modal": "true",
|
|
3762
3913
|
"aria-label": typeof title === "string" ? title : "Report Bill Status",
|
|
3763
3914
|
children: [
|
|
3764
|
-
/* @__PURE__ */
|
|
3765
|
-
/* @__PURE__ */
|
|
3766
|
-
/* @__PURE__ */
|
|
3915
|
+
/* @__PURE__ */ jsxs10("div", { className: "mbbs-head", children: [
|
|
3916
|
+
/* @__PURE__ */ jsx10("h3", { className: "mbbs-title", children: title }),
|
|
3917
|
+
/* @__PURE__ */ jsx10("button", { className: "mbbs-close", type: "button", "aria-label": "Close", disabled: submitting, onClick: onCancel, children: "\xD7" })
|
|
3767
3918
|
] }),
|
|
3768
|
-
claimsAdmin || billReview ? /* @__PURE__ */
|
|
3769
|
-
/* @__PURE__ */
|
|
3770
|
-
/* @__PURE__ */
|
|
3771
|
-
/* @__PURE__ */
|
|
3772
|
-
claimsAdmin ? /* @__PURE__ */
|
|
3773
|
-
/* @__PURE__ */
|
|
3774
|
-
/* @__PURE__ */
|
|
3775
|
-
/* @__PURE__ */
|
|
3776
|
-
/* @__PURE__ */
|
|
3777
|
-
/* @__PURE__ */
|
|
3919
|
+
claimsAdmin || billReview ? /* @__PURE__ */ jsxs10("div", { className: "mbbs-section", children: [
|
|
3920
|
+
/* @__PURE__ */ jsx10("h4", { children: "1. Call Claims Administrator or Bill Review" }),
|
|
3921
|
+
/* @__PURE__ */ jsx10("p", { className: "mbbs-copy", children: "Contact the payer to request the payment status of this bill." }),
|
|
3922
|
+
/* @__PURE__ */ jsxs10("div", { className: "mbbs-contacts", children: [
|
|
3923
|
+
claimsAdmin ? /* @__PURE__ */ jsxs10("div", { className: "mbbs-contact", children: [
|
|
3924
|
+
/* @__PURE__ */ jsx10("h5", { children: "Claims Admin" }),
|
|
3925
|
+
/* @__PURE__ */ jsxs10("dl", { children: [
|
|
3926
|
+
/* @__PURE__ */ jsxs10("div", { children: [
|
|
3927
|
+
/* @__PURE__ */ jsx10("dt", { children: "Name" }),
|
|
3928
|
+
/* @__PURE__ */ jsx10("dd", { children: claimsAdmin.name })
|
|
3778
3929
|
] }),
|
|
3779
|
-
claimsAdmin.hoursOfOperation ? /* @__PURE__ */
|
|
3780
|
-
/* @__PURE__ */
|
|
3781
|
-
/* @__PURE__ */
|
|
3930
|
+
claimsAdmin.hoursOfOperation ? /* @__PURE__ */ jsxs10("div", { children: [
|
|
3931
|
+
/* @__PURE__ */ jsx10("dt", { children: "Hours of Operation" }),
|
|
3932
|
+
/* @__PURE__ */ jsx10("dd", { children: claimsAdmin.hoursOfOperation })
|
|
3782
3933
|
] }) : null,
|
|
3783
|
-
(claimsAdmin.phones ?? []).map((entry) => /* @__PURE__ */
|
|
3784
|
-
/* @__PURE__ */
|
|
3785
|
-
/* @__PURE__ */
|
|
3934
|
+
(claimsAdmin.phones ?? []).map((entry) => /* @__PURE__ */ jsxs10("div", { children: [
|
|
3935
|
+
/* @__PURE__ */ jsx10("dt", { children: entry.label }),
|
|
3936
|
+
/* @__PURE__ */ jsx10("dd", { children: entry.value })
|
|
3786
3937
|
] }, `${entry.label}-${entry.value}`))
|
|
3787
3938
|
] })
|
|
3788
3939
|
] }) : null,
|
|
3789
|
-
billReview ? /* @__PURE__ */
|
|
3790
|
-
/* @__PURE__ */
|
|
3791
|
-
/* @__PURE__ */
|
|
3792
|
-
/* @__PURE__ */
|
|
3793
|
-
/* @__PURE__ */
|
|
3794
|
-
/* @__PURE__ */
|
|
3940
|
+
billReview ? /* @__PURE__ */ jsxs10("div", { className: "mbbs-contact", children: [
|
|
3941
|
+
/* @__PURE__ */ jsx10("h5", { children: "Bill Review" }),
|
|
3942
|
+
/* @__PURE__ */ jsxs10("dl", { children: [
|
|
3943
|
+
/* @__PURE__ */ jsxs10("div", { children: [
|
|
3944
|
+
/* @__PURE__ */ jsx10("dt", { children: "Name" }),
|
|
3945
|
+
/* @__PURE__ */ jsx10("dd", { children: billReview.name })
|
|
3795
3946
|
] }),
|
|
3796
|
-
billReview.phone ? /* @__PURE__ */
|
|
3797
|
-
/* @__PURE__ */
|
|
3798
|
-
/* @__PURE__ */
|
|
3947
|
+
billReview.phone ? /* @__PURE__ */ jsxs10("div", { children: [
|
|
3948
|
+
/* @__PURE__ */ jsx10("dt", { children: "Phone" }),
|
|
3949
|
+
/* @__PURE__ */ jsx10("dd", { children: billReview.phone })
|
|
3799
3950
|
] }) : null
|
|
3800
3951
|
] })
|
|
3801
3952
|
] }) : null
|
|
3802
3953
|
] })
|
|
3803
3954
|
] }) : null,
|
|
3804
|
-
receipt ? /* @__PURE__ */
|
|
3805
|
-
/* @__PURE__ */
|
|
3806
|
-
/* @__PURE__ */
|
|
3807
|
-
/* @__PURE__ */
|
|
3955
|
+
receipt ? /* @__PURE__ */ jsxs10("div", { className: "mbbs-section", children: [
|
|
3956
|
+
/* @__PURE__ */ jsx10("h4", { children: "2. Review Bill Submission Receipt" }),
|
|
3957
|
+
/* @__PURE__ */ jsx10("p", { className: "mbbs-copy", children: "Reference the submission receipt below when the payer asks how and when the bill was sent." }),
|
|
3958
|
+
/* @__PURE__ */ jsx10("div", { className: "mbbs-receipt", children: receipt })
|
|
3808
3959
|
] }) : null,
|
|
3809
|
-
/* @__PURE__ */
|
|
3810
|
-
/* @__PURE__ */
|
|
3811
|
-
/* @__PURE__ */
|
|
3812
|
-
/* @__PURE__ */
|
|
3813
|
-
/* @__PURE__ */
|
|
3814
|
-
/* @__PURE__ */
|
|
3960
|
+
/* @__PURE__ */ jsxs10("div", { className: "mbbs-section", children: [
|
|
3961
|
+
/* @__PURE__ */ jsx10("h4", { children: "3. Report Bill Payment Status" }),
|
|
3962
|
+
/* @__PURE__ */ jsx10("p", { className: "mbbs-copy", children: "Select the status reported by the payer, then record who provided it." }),
|
|
3963
|
+
/* @__PURE__ */ jsxs10("div", { className: "mbbs-report", children: [
|
|
3964
|
+
/* @__PURE__ */ jsx10("div", { className: "mbbs-options", role: "radiogroup", "aria-label": "Reported bill payment status", children: REPORT_BILL_STATUS_OPTIONS.map((option) => /* @__PURE__ */ jsxs10("label", { className: "mbbs-option", "data-selected": status === option.id, children: [
|
|
3965
|
+
/* @__PURE__ */ jsx10(
|
|
3815
3966
|
"input",
|
|
3816
3967
|
{
|
|
3817
3968
|
type: "radio",
|
|
@@ -3822,28 +3973,28 @@ function ReportBillStatusDialog({
|
|
|
3822
3973
|
onChange: () => setStatus(option.id)
|
|
3823
3974
|
}
|
|
3824
3975
|
),
|
|
3825
|
-
/* @__PURE__ */
|
|
3826
|
-
/* @__PURE__ */
|
|
3827
|
-
/* @__PURE__ */
|
|
3976
|
+
/* @__PURE__ */ jsxs10("span", { children: [
|
|
3977
|
+
/* @__PURE__ */ jsx10("span", { className: "mbbs-option-label", children: option.label }),
|
|
3978
|
+
/* @__PURE__ */ jsx10("span", { className: "mbbs-option-copy", children: option.description })
|
|
3828
3979
|
] })
|
|
3829
3980
|
] }, option.id)) }),
|
|
3830
|
-
/* @__PURE__ */
|
|
3981
|
+
/* @__PURE__ */ jsxs10("div", { className: "mbbs-fields", children: [
|
|
3831
3982
|
field("Company", company, setCompany),
|
|
3832
3983
|
field("Name", representativeName, setRepresentativeName),
|
|
3833
3984
|
field("Role", representativeRole, setRepresentativeRole),
|
|
3834
3985
|
field("Phone Number", phone, setPhone),
|
|
3835
3986
|
field("Call Reference Number", callReference, setCallReference),
|
|
3836
|
-
/* @__PURE__ */
|
|
3837
|
-
/* @__PURE__ */
|
|
3838
|
-
/* @__PURE__ */
|
|
3987
|
+
/* @__PURE__ */ jsxs10("label", { className: "mbbs-field", children: [
|
|
3988
|
+
/* @__PURE__ */ jsx10("span", { className: "mbbs-label", children: "Message Note" }),
|
|
3989
|
+
/* @__PURE__ */ jsx10("textarea", { className: "mbbs-textarea", value: note, disabled: submitting, onChange: (event) => setNote(event.target.value) })
|
|
3839
3990
|
] })
|
|
3840
3991
|
] })
|
|
3841
3992
|
] })
|
|
3842
3993
|
] }),
|
|
3843
|
-
error ? /* @__PURE__ */
|
|
3844
|
-
/* @__PURE__ */
|
|
3845
|
-
/* @__PURE__ */
|
|
3846
|
-
/* @__PURE__ */
|
|
3994
|
+
error ? /* @__PURE__ */ jsx10("div", { className: "mbbs-alert", role: "alert", children: error }) : null,
|
|
3995
|
+
/* @__PURE__ */ jsxs10("div", { className: "mbbs-actions", children: [
|
|
3996
|
+
/* @__PURE__ */ jsx10("button", { className: "mbbs-cancel", type: "button", disabled: submitting, onClick: onCancel, children: "Cancel" }),
|
|
3997
|
+
/* @__PURE__ */ jsx10("button", { className: "mbbs-save", type: "button", disabled: submitting || !status, onClick: save, children: submitting ? "Saving\u2026" : "Save" })
|
|
3847
3998
|
] })
|
|
3848
3999
|
]
|
|
3849
4000
|
}
|
|
@@ -3854,18 +4005,18 @@ function ReportBillStatusDialog({
|
|
|
3854
4005
|
}
|
|
3855
4006
|
|
|
3856
4007
|
// src/organization-onboarding.tsx
|
|
3857
|
-
import { useCallback as useCallback2, useEffect as
|
|
4008
|
+
import { useCallback as useCallback2, useEffect as useEffect7, useMemo as useMemo6, useRef as useRef3, useState as useState8 } from "react";
|
|
3858
4009
|
import {
|
|
3859
4010
|
createOrganizationClient
|
|
3860
4011
|
} from "@mindbill/browser";
|
|
3861
|
-
import { Fragment as
|
|
4012
|
+
import { Fragment as Fragment8, jsx as jsx11, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
3862
4013
|
var STEPS = [
|
|
3863
4014
|
{ id: "practice", label: "Practice & billing" },
|
|
3864
4015
|
{ id: "locations", label: "Locations" },
|
|
3865
4016
|
{ id: "w9", label: "W-9" },
|
|
3866
4017
|
{ id: "review", label: "Review" }
|
|
3867
4018
|
];
|
|
3868
|
-
var
|
|
4019
|
+
var css9 = `
|
|
3869
4020
|
.mbob{color:var(--mb-text);font-family:var(--mb-font);font-size:15px}.mbob *{box-sizing:border-box}.mbob h2,.mbob h3,.mbob p{margin:0}
|
|
3870
4021
|
.mbob-card{border:1px solid var(--mb-border);border-radius:var(--mb-radius);background:var(--mb-surface);box-shadow:var(--mb-shadow);padding:24px}
|
|
3871
4022
|
.mbob-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;margin-bottom:18px}.mbob-head h2{font-size:22px}.mbob-copy{color:var(--mb-muted);margin-top:5px!important}
|
|
@@ -3929,16 +4080,16 @@ function OrganizationOnboarding({
|
|
|
3929
4080
|
}),
|
|
3930
4081
|
[sessionEndpoint, getSession, apiBaseUrl]
|
|
3931
4082
|
);
|
|
3932
|
-
const [profile, setProfile] =
|
|
3933
|
-
const [loadError, setLoadError] =
|
|
3934
|
-
const [step, setStep] =
|
|
3935
|
-
const [identity, setIdentity] =
|
|
3936
|
-
const [provider, setProvider] =
|
|
3937
|
-
const [locations, setLocations] =
|
|
3938
|
-
const [w9File, setW9File] =
|
|
3939
|
-
const [saving, setSaving] =
|
|
3940
|
-
const [error, setError] =
|
|
3941
|
-
const [savedStep, setSavedStep] =
|
|
4083
|
+
const [profile, setProfile] = useState8(null);
|
|
4084
|
+
const [loadError, setLoadError] = useState8(null);
|
|
4085
|
+
const [step, setStep] = useState8("practice");
|
|
4086
|
+
const [identity, setIdentity] = useState8({ name: "", legalName: "", taxId: "", npi: "", phone: "", email: "" });
|
|
4087
|
+
const [provider, setProvider] = useState8({ name: "", taxId: "", npi: "", billType: "Professional", phone: "", billingStreet: "", billingCity: "", billingState: "", billingZip: "" });
|
|
4088
|
+
const [locations, setLocations] = useState8([blankLocation()]);
|
|
4089
|
+
const [w9File, setW9File] = useState8(null);
|
|
4090
|
+
const [saving, setSaving] = useState8(false);
|
|
4091
|
+
const [error, setError] = useState8(null);
|
|
4092
|
+
const [savedStep, setSavedStep] = useState8({});
|
|
3942
4093
|
const completedFired = useRef3(false);
|
|
3943
4094
|
const adoptProfile = useCallback2((next) => {
|
|
3944
4095
|
setProfile(next);
|
|
@@ -3957,7 +4108,7 @@ function OrganizationOnboarding({
|
|
|
3957
4108
|
onCompleted?.(next);
|
|
3958
4109
|
}
|
|
3959
4110
|
}, [onCompleted]);
|
|
3960
|
-
|
|
4111
|
+
useEffect7(() => {
|
|
3961
4112
|
let alive = true;
|
|
3962
4113
|
client.getOrganization().then((next) => {
|
|
3963
4114
|
if (alive) {
|
|
@@ -4004,16 +4155,16 @@ function OrganizationOnboarding({
|
|
|
4004
4155
|
if (!w9File) throw new Error("Choose the practice W-9 PDF first.");
|
|
4005
4156
|
return client.saveW9({ filename: w9File.name, contentBase64: await fileToBase64(w9File) });
|
|
4006
4157
|
}, "w9");
|
|
4007
|
-
const field = (label, value, onChange, span = false, placeholder = "") => /* @__PURE__ */
|
|
4158
|
+
const field = (label, value, onChange, span = false, placeholder = "") => /* @__PURE__ */ jsxs11("label", { className: `mbob-field${span ? " mbob-span" : ""}`, children: [
|
|
4008
4159
|
label,
|
|
4009
|
-
/* @__PURE__ */
|
|
4160
|
+
/* @__PURE__ */ jsx11("input", { value, placeholder, onChange: (event) => onChange(event.target.value), disabled: saving })
|
|
4010
4161
|
] });
|
|
4011
4162
|
const setLocation = (index, patch) => setLocations((current) => current.map((item, itemIndex) => {
|
|
4012
4163
|
if (itemIndex !== index) return patch.isPrimary ? { ...item, isPrimary: false } : item;
|
|
4013
4164
|
return { ...item, ...patch };
|
|
4014
4165
|
}));
|
|
4015
|
-
const practiceSection = /* @__PURE__ */
|
|
4016
|
-
/* @__PURE__ */
|
|
4166
|
+
const practiceSection = /* @__PURE__ */ jsxs11("div", { children: [
|
|
4167
|
+
/* @__PURE__ */ jsxs11("div", { className: "mbob-grid", children: [
|
|
4017
4168
|
field("Practice name", identity.name, (name) => setIdentity((c) => ({ ...c, name }))),
|
|
4018
4169
|
field("Legal name", identity.legalName, (legalName) => setIdentity((c) => ({ ...c, legalName }))),
|
|
4019
4170
|
field("Tax ID (EIN)", identity.taxId, (taxId) => setIdentity((c) => ({ ...c, taxId })), false, "94-1234567"),
|
|
@@ -4021,8 +4172,8 @@ function OrganizationOnboarding({
|
|
|
4021
4172
|
field("Phone", identity.phone, (phone) => setIdentity((c) => ({ ...c, phone }))),
|
|
4022
4173
|
field("Email", identity.email, (email) => setIdentity((c) => ({ ...c, email })))
|
|
4023
4174
|
] }),
|
|
4024
|
-
/* @__PURE__ */
|
|
4025
|
-
/* @__PURE__ */
|
|
4175
|
+
/* @__PURE__ */ jsx11("h3", { className: "mbob-subhead", children: "Billing provider (pay-to)" }),
|
|
4176
|
+
/* @__PURE__ */ jsxs11("div", { className: "mbob-grid", children: [
|
|
4026
4177
|
field("Billing provider name", provider.name, (name) => setProvider((c) => ({ ...c, name }))),
|
|
4027
4178
|
field("Billing tax ID", provider.taxId, (taxId) => setProvider((c) => ({ ...c, taxId }))),
|
|
4028
4179
|
field("Billing NPI", provider.npi, (npi) => setProvider((c) => ({ ...c, npi }))),
|
|
@@ -4032,88 +4183,88 @@ function OrganizationOnboarding({
|
|
|
4032
4183
|
field("State", provider.billingState ?? "", (billingState) => setProvider((c) => ({ ...c, billingState: billingState.toUpperCase().slice(0, 2) }))),
|
|
4033
4184
|
field("ZIP", provider.billingZip ?? "", (billingZip) => setProvider((c) => ({ ...c, billingZip })))
|
|
4034
4185
|
] }),
|
|
4035
|
-
/* @__PURE__ */
|
|
4036
|
-
/* @__PURE__ */
|
|
4037
|
-
/* @__PURE__ */
|
|
4186
|
+
/* @__PURE__ */ jsxs11("div", { className: "mbob-actions", children: [
|
|
4187
|
+
/* @__PURE__ */ jsx11("span", { className: "mbob-status", children: savedStep["practice"] ? "Saved to MindBill." : "Saved once, used on every bill." }),
|
|
4188
|
+
/* @__PURE__ */ jsx11("button", { className: "mbob-save", type: "button", disabled: saving, onClick: savePractice, children: saving ? "Saving\u2026" : "Save practice" })
|
|
4038
4189
|
] })
|
|
4039
4190
|
] });
|
|
4040
|
-
const locationsSection = /* @__PURE__ */
|
|
4041
|
-
locations.map((location, index) => /* @__PURE__ */
|
|
4191
|
+
const locationsSection = /* @__PURE__ */ jsxs11("div", { children: [
|
|
4192
|
+
locations.map((location, index) => /* @__PURE__ */ jsxs11("div", { className: "mbob-loc", children: [
|
|
4042
4193
|
field("Name", location.name, (name) => setLocation(index, { name })),
|
|
4043
4194
|
field("Street", location.street, (street) => setLocation(index, { street })),
|
|
4044
4195
|
field("City", location.city, (city) => setLocation(index, { city })),
|
|
4045
4196
|
field("State", location.state, (state) => setLocation(index, { state: state.toUpperCase().slice(0, 2) })),
|
|
4046
4197
|
field("ZIP", location.zip, (zip) => setLocation(index, { zip })),
|
|
4047
|
-
/* @__PURE__ */
|
|
4048
|
-
/* @__PURE__ */
|
|
4198
|
+
/* @__PURE__ */ jsxs11("label", { className: "mbob-primary", children: [
|
|
4199
|
+
/* @__PURE__ */ jsx11("input", { type: "radio", name: "mbob-primary", checked: location.isPrimary === true, onChange: () => setLocation(index, { isPrimary: true }) }),
|
|
4049
4200
|
" Primary"
|
|
4050
4201
|
] }),
|
|
4051
|
-
/* @__PURE__ */
|
|
4202
|
+
/* @__PURE__ */ jsx11("button", { className: "mbob-remove", type: "button", "aria-label": "Remove location", onClick: () => setLocations((current) => current.filter((_, itemIndex) => itemIndex !== index)), children: "\xD7" })
|
|
4052
4203
|
] }, location.id ?? index)),
|
|
4053
|
-
/* @__PURE__ */
|
|
4054
|
-
/* @__PURE__ */
|
|
4055
|
-
/* @__PURE__ */
|
|
4056
|
-
/* @__PURE__ */
|
|
4204
|
+
/* @__PURE__ */ jsx11("button", { className: "mbob-add", type: "button", onClick: () => setLocations((current) => [...current, blankLocation()]), children: "+ Add location" }),
|
|
4205
|
+
/* @__PURE__ */ jsxs11("div", { className: "mbob-actions", children: [
|
|
4206
|
+
/* @__PURE__ */ jsx11("span", { className: "mbob-status", children: savedStep["locations"] ? "Saved to MindBill." : "Where evaluations happen." }),
|
|
4207
|
+
/* @__PURE__ */ jsx11("button", { className: "mbob-save", type: "button", disabled: saving, onClick: saveLocations, children: saving ? "Saving\u2026" : "Save locations" })
|
|
4057
4208
|
] })
|
|
4058
4209
|
] });
|
|
4059
|
-
const w9Section = /* @__PURE__ */
|
|
4060
|
-
profile?.w9 ? /* @__PURE__ */
|
|
4061
|
-
/* @__PURE__ */
|
|
4062
|
-
/* @__PURE__ */
|
|
4063
|
-
/* @__PURE__ */
|
|
4210
|
+
const w9Section = /* @__PURE__ */ jsxs11("div", { children: [
|
|
4211
|
+
profile?.w9 ? /* @__PURE__ */ jsxs11("div", { className: "mbob-w9-current", children: [
|
|
4212
|
+
/* @__PURE__ */ jsxs11("div", { children: [
|
|
4213
|
+
/* @__PURE__ */ jsx11("strong", { children: profile.w9.filename }),
|
|
4214
|
+
/* @__PURE__ */ jsxs11("span", { children: [
|
|
4064
4215
|
" \xB7 added ",
|
|
4065
4216
|
profile.w9.addDate
|
|
4066
4217
|
] })
|
|
4067
4218
|
] }),
|
|
4068
|
-
/* @__PURE__ */
|
|
4219
|
+
/* @__PURE__ */ jsx11("span", { children: "Rides on every bill automatically" })
|
|
4069
4220
|
] }) : null,
|
|
4070
|
-
/* @__PURE__ */
|
|
4071
|
-
/* @__PURE__ */
|
|
4072
|
-
/* @__PURE__ */
|
|
4073
|
-
/* @__PURE__ */
|
|
4221
|
+
/* @__PURE__ */ jsxs11("label", { className: "mbob-drop", children: [
|
|
4222
|
+
/* @__PURE__ */ jsx11("input", { type: "file", accept: "application/pdf,.pdf", onChange: (event) => setW9File(event.target.files?.[0] ?? null) }),
|
|
4223
|
+
/* @__PURE__ */ jsx11("strong", { children: w9File ? w9File.name : profile?.w9 ? "Replace the W-9 PDF" : "Drop the practice W-9 PDF here, or click to choose" }),
|
|
4224
|
+
/* @__PURE__ */ jsx11("span", { children: "The W-9 is auto-attached to every submission." })
|
|
4074
4225
|
] }),
|
|
4075
|
-
/* @__PURE__ */
|
|
4076
|
-
/* @__PURE__ */
|
|
4077
|
-
/* @__PURE__ */
|
|
4226
|
+
/* @__PURE__ */ jsxs11("div", { className: "mbob-actions", children: [
|
|
4227
|
+
/* @__PURE__ */ jsx11("span", { className: "mbob-status", children: savedStep["w9"] ? "Saved to MindBill." : "" }),
|
|
4228
|
+
/* @__PURE__ */ jsx11("button", { className: "mbob-save", type: "button", disabled: saving || !w9File, onClick: saveW9, children: saving ? "Uploading\u2026" : "Save W-9" })
|
|
4078
4229
|
] })
|
|
4079
4230
|
] });
|
|
4080
|
-
const reviewSection = /* @__PURE__ */
|
|
4081
|
-
(profile?.onboarding.checklist ?? []).map((item) => /* @__PURE__ */
|
|
4082
|
-
/* @__PURE__ */
|
|
4083
|
-
/* @__PURE__ */
|
|
4231
|
+
const reviewSection = /* @__PURE__ */ jsxs11("div", { className: "mbob-check", children: [
|
|
4232
|
+
(profile?.onboarding.checklist ?? []).map((item) => /* @__PURE__ */ jsxs11("div", { className: "mbob-check-item", "data-complete": item.complete, children: [
|
|
4233
|
+
/* @__PURE__ */ jsx11("i", { children: item.complete ? "\u2713" : "\u2022" }),
|
|
4234
|
+
/* @__PURE__ */ jsx11("span", { children: item.label })
|
|
4084
4235
|
] }, item.id)),
|
|
4085
|
-
profile?.onboarding.complete ? /* @__PURE__ */
|
|
4236
|
+
profile?.onboarding.complete ? /* @__PURE__ */ jsx11("p", { className: "mbob-done", children: "Billing setup is complete \u2014 bills submitted from your product carry this profile automatically." }) : /* @__PURE__ */ jsx11("p", { className: "mbob-status", children: "Items above complete themselves as each section is saved." })
|
|
4086
4237
|
] });
|
|
4087
4238
|
const sections = { practice: practiceSection, locations: locationsSection, w9: w9Section, review: reviewSection };
|
|
4088
|
-
return /* @__PURE__ */
|
|
4089
|
-
/* @__PURE__ */
|
|
4090
|
-
/* @__PURE__ */
|
|
4091
|
-
/* @__PURE__ */
|
|
4092
|
-
/* @__PURE__ */
|
|
4093
|
-
/* @__PURE__ */
|
|
4239
|
+
return /* @__PURE__ */ jsxs11("div", { className: `mbob ${className}`.trim(), style: { ...mindBillAppearanceStyle(appearance), ...style }, children: [
|
|
4240
|
+
/* @__PURE__ */ jsx11("style", { children: css9 }),
|
|
4241
|
+
/* @__PURE__ */ jsxs11("div", { className: "mbob-card", children: [
|
|
4242
|
+
/* @__PURE__ */ jsx11("div", { className: "mbob-head", children: /* @__PURE__ */ jsxs11("div", { children: [
|
|
4243
|
+
/* @__PURE__ */ jsx11("h2", { children: heading }),
|
|
4244
|
+
/* @__PURE__ */ jsx11("p", { className: "mbob-copy", children: description })
|
|
4094
4245
|
] }) }),
|
|
4095
|
-
loadError ? /* @__PURE__ */
|
|
4096
|
-
variant === "onboarding" ? /* @__PURE__ */
|
|
4097
|
-
/* @__PURE__ */
|
|
4098
|
-
/* @__PURE__ */
|
|
4246
|
+
loadError ? /* @__PURE__ */ jsx11("div", { className: "mbob-error", role: "alert", children: loadError }) : null,
|
|
4247
|
+
variant === "onboarding" ? /* @__PURE__ */ jsxs11(Fragment8, { children: [
|
|
4248
|
+
/* @__PURE__ */ jsx11("div", { className: "mbob-steps", children: STEPS.map((item) => /* @__PURE__ */ jsxs11("button", { className: "mbob-step", type: "button", "data-active": step === item.id, "data-done": Boolean(savedStep[item.id]), onClick: () => setStep(item.id), children: [
|
|
4249
|
+
/* @__PURE__ */ jsx11("i", { children: savedStep[item.id] ? "\u2713" : "" }),
|
|
4099
4250
|
item.label
|
|
4100
4251
|
] }, item.id)) }),
|
|
4101
4252
|
sections[step]
|
|
4102
|
-
] }) : /* @__PURE__ */
|
|
4253
|
+
] }) : /* @__PURE__ */ jsxs11(Fragment8, { children: [
|
|
4103
4254
|
practiceSection,
|
|
4104
|
-
/* @__PURE__ */
|
|
4255
|
+
/* @__PURE__ */ jsx11("h3", { className: "mbob-subhead", children: "Locations" }),
|
|
4105
4256
|
locationsSection,
|
|
4106
|
-
/* @__PURE__ */
|
|
4257
|
+
/* @__PURE__ */ jsx11("h3", { className: "mbob-subhead", children: "Practice W-9" }),
|
|
4107
4258
|
w9Section,
|
|
4108
|
-
/* @__PURE__ */
|
|
4259
|
+
/* @__PURE__ */ jsx11("h3", { className: "mbob-subhead", children: "Checklist" }),
|
|
4109
4260
|
reviewSection
|
|
4110
4261
|
] }),
|
|
4111
|
-
error ? /* @__PURE__ */
|
|
4262
|
+
error ? /* @__PURE__ */ jsx11("div", { className: "mbob-error", role: "alert", children: error }) : null
|
|
4112
4263
|
] })
|
|
4113
4264
|
] });
|
|
4114
4265
|
}
|
|
4115
4266
|
function BillingSettings(props) {
|
|
4116
|
-
return /* @__PURE__ */
|
|
4267
|
+
return /* @__PURE__ */ jsx11(
|
|
4117
4268
|
OrganizationOnboarding,
|
|
4118
4269
|
{
|
|
4119
4270
|
heading: "Billing settings",
|
|
@@ -4127,16 +4278,16 @@ function BillingSettings(props) {
|
|
|
4127
4278
|
// src/connected-bill-status.tsx
|
|
4128
4279
|
import {
|
|
4129
4280
|
useCallback as useCallback3,
|
|
4130
|
-
useEffect as
|
|
4281
|
+
useEffect as useEffect8,
|
|
4131
4282
|
useMemo as useMemo7,
|
|
4132
4283
|
useRef as useRef4,
|
|
4133
|
-
useState as
|
|
4284
|
+
useState as useState9
|
|
4134
4285
|
} from "react";
|
|
4135
4286
|
import {
|
|
4136
4287
|
DEFAULT_API_BASE_URL,
|
|
4137
4288
|
DEFAULT_SESSION_ENDPOINT
|
|
4138
4289
|
} from "@mindbill/browser";
|
|
4139
|
-
import { Fragment as
|
|
4290
|
+
import { Fragment as Fragment9, jsx as jsx12, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
4140
4291
|
var DEFAULT_REFRESH_INTERVAL = 6e4;
|
|
4141
4292
|
async function responseError(response, fallback) {
|
|
4142
4293
|
const body = await response.json().catch(() => null);
|
|
@@ -4276,16 +4427,16 @@ function useBillStatus({
|
|
|
4276
4427
|
apiBaseUrl,
|
|
4277
4428
|
...fetchOverride ? { fetch: fetchOverride } : {}
|
|
4278
4429
|
}), [apiBaseUrl, billId, fetchOverride, getSession, sessionEndpoint]);
|
|
4279
|
-
const [data, setData] =
|
|
4280
|
-
const [error, setError] =
|
|
4281
|
-
const [isLoading, setIsLoading] =
|
|
4282
|
-
const [isRefreshing, setIsRefreshing] =
|
|
4430
|
+
const [data, setData] = useState9(initialData);
|
|
4431
|
+
const [error, setError] = useState9(null);
|
|
4432
|
+
const [isLoading, setIsLoading] = useState9(enabled && !initialData);
|
|
4433
|
+
const [isRefreshing, setIsRefreshing] = useState9(false);
|
|
4283
4434
|
const dataRef = useRef4(initialData);
|
|
4284
4435
|
const initialDataRef = useRef4(initialData);
|
|
4285
4436
|
initialDataRef.current = initialData;
|
|
4286
4437
|
const activeControllerRef = useRef4(null);
|
|
4287
4438
|
const requestSequence = useRef4(0);
|
|
4288
|
-
|
|
4439
|
+
useEffect8(() => {
|
|
4289
4440
|
const seed = initialDataRef.current;
|
|
4290
4441
|
dataRef.current = seed;
|
|
4291
4442
|
setData(seed);
|
|
@@ -4326,10 +4477,10 @@ function useBillStatus({
|
|
|
4326
4477
|
}
|
|
4327
4478
|
}
|
|
4328
4479
|
}, [billId, client, enabled]);
|
|
4329
|
-
|
|
4480
|
+
useEffect8(() => {
|
|
4330
4481
|
if (enabled) void load();
|
|
4331
4482
|
}, [enabled, load]);
|
|
4332
|
-
|
|
4483
|
+
useEffect8(() => {
|
|
4333
4484
|
if (!enabled || refreshInterval <= 0) return;
|
|
4334
4485
|
const timer = window.setInterval(() => void load(), refreshInterval);
|
|
4335
4486
|
const onFocus = () => void load();
|
|
@@ -4357,17 +4508,17 @@ function ConnectedBillStatus({
|
|
|
4357
4508
|
}) {
|
|
4358
4509
|
const status = useBillStatus(options);
|
|
4359
4510
|
if (status.isLoading && !status.data) {
|
|
4360
|
-
return /* @__PURE__ */
|
|
4511
|
+
return /* @__PURE__ */ jsx12(Fragment9, { children: loadingFallback ?? /* @__PURE__ */ jsx12("div", { role: "status", children: "Loading bill status\u2026" }) });
|
|
4361
4512
|
}
|
|
4362
4513
|
if (status.error && !status.data) {
|
|
4363
|
-
return /* @__PURE__ */
|
|
4514
|
+
return /* @__PURE__ */ jsx12(Fragment9, { children: errorFallback?.(status.error, status.refresh) ?? /* @__PURE__ */ jsxs12("div", { role: "alert", children: [
|
|
4364
4515
|
status.error.message,
|
|
4365
4516
|
" ",
|
|
4366
|
-
/* @__PURE__ */
|
|
4517
|
+
/* @__PURE__ */ jsx12("button", { type: "button", onClick: () => void status.refresh(), children: "Retry" })
|
|
4367
4518
|
] }) });
|
|
4368
4519
|
}
|
|
4369
4520
|
if (!status.data) return null;
|
|
4370
|
-
return /* @__PURE__ */
|
|
4521
|
+
return /* @__PURE__ */ jsx12(
|
|
4371
4522
|
BillStatusSummary,
|
|
4372
4523
|
{
|
|
4373
4524
|
status: status.data.state,
|
|
@@ -4386,8 +4537,8 @@ function ConnectedBillStatus({
|
|
|
4386
4537
|
}
|
|
4387
4538
|
|
|
4388
4539
|
// src/bill-lifecycle-surfaces.tsx
|
|
4389
|
-
import { useState as
|
|
4390
|
-
import { jsx as
|
|
4540
|
+
import { useState as useState10 } from "react";
|
|
4541
|
+
import { Fragment as Fragment10, jsx as jsx13, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
4391
4542
|
function visibleBillLifecycleActions(actions, showUnavailable = false) {
|
|
4392
4543
|
return actions.filter((action) => action.enabled || showUnavailable);
|
|
4393
4544
|
}
|
|
@@ -4402,11 +4553,11 @@ function BillLifecycleActions({
|
|
|
4402
4553
|
}) {
|
|
4403
4554
|
const visible = visibleBillLifecycleActions(actions, showUnavailable);
|
|
4404
4555
|
if (!visible.length) return null;
|
|
4405
|
-
return /* @__PURE__ */
|
|
4406
|
-
/* @__PURE__ */
|
|
4407
|
-
visible.map((action) => /* @__PURE__ */
|
|
4408
|
-
/* @__PURE__ */
|
|
4409
|
-
!action.enabled && action.reason ? /* @__PURE__ */
|
|
4556
|
+
return /* @__PURE__ */ jsxs13("div", { className: classes("mb-lifecycle-actions", className), style: mindBillAppearanceStyle(appearance, style), "aria-label": "Bill actions", children: [
|
|
4557
|
+
/* @__PURE__ */ jsx13("style", { children: lifecycleSurfaceStyles }),
|
|
4558
|
+
visible.map((action) => /* @__PURE__ */ jsxs13("div", { className: "mb-lifecycle-action", children: [
|
|
4559
|
+
/* @__PURE__ */ jsx13("button", { type: "button", className: action.primary ? "mb-action-button is-primary" : "mb-action-button", disabled: disabled || !action.enabled, onClick: () => onAction(action), children: action.label }),
|
|
4560
|
+
!action.enabled && action.reason ? /* @__PURE__ */ jsx13("span", { className: "mb-action-reason", children: action.reason }) : null
|
|
4410
4561
|
] }, action.id))
|
|
4411
4562
|
] });
|
|
4412
4563
|
}
|
|
@@ -4436,18 +4587,18 @@ function defaultFormatDate(createdAt) {
|
|
|
4436
4587
|
return new Intl.DateTimeFormat(void 0, { dateStyle: "medium", timeStyle: "short" }).format(parsed);
|
|
4437
4588
|
}
|
|
4438
4589
|
function BillActivityTimeline({ events, emptyLabel = "No bill activity yet.", appearance, className, style, formatDate = defaultFormatDate }) {
|
|
4439
|
-
return /* @__PURE__ */
|
|
4440
|
-
/* @__PURE__ */
|
|
4441
|
-
/* @__PURE__ */
|
|
4442
|
-
/* @__PURE__ */
|
|
4443
|
-
/* @__PURE__ */
|
|
4590
|
+
return /* @__PURE__ */ jsxs13("section", { className: classes("mb-surface mb-activity", className), style: mindBillAppearanceStyle(appearance, style), "aria-label": "Bill activity", children: [
|
|
4591
|
+
/* @__PURE__ */ jsx13("style", { children: lifecycleSurfaceStyles }),
|
|
4592
|
+
/* @__PURE__ */ jsx13("header", { className: "mb-surface-heading", children: /* @__PURE__ */ jsxs13("div", { children: [
|
|
4593
|
+
/* @__PURE__ */ jsx13("strong", { children: "Bill history" }),
|
|
4594
|
+
/* @__PURE__ */ jsx13("span", { children: "Submission, payer responses, follow-up, and payments." })
|
|
4444
4595
|
] }) }),
|
|
4445
|
-
!events.length ? /* @__PURE__ */
|
|
4446
|
-
/* @__PURE__ */
|
|
4447
|
-
/* @__PURE__ */
|
|
4448
|
-
/* @__PURE__ */
|
|
4449
|
-
event.description ? /* @__PURE__ */
|
|
4450
|
-
/* @__PURE__ */
|
|
4596
|
+
!events.length ? /* @__PURE__ */ jsx13("p", { className: "mb-activity-empty", children: emptyLabel }) : /* @__PURE__ */ jsx13("ol", { className: "mb-activity-list", children: events.map((event) => /* @__PURE__ */ jsxs13("li", { className: "mb-activity-item", children: [
|
|
4597
|
+
/* @__PURE__ */ jsx13("span", { className: "mb-activity-marker", "aria-hidden": "true" }),
|
|
4598
|
+
/* @__PURE__ */ jsxs13("div", { className: "mb-activity-content", children: [
|
|
4599
|
+
/* @__PURE__ */ jsx13("strong", { children: event.title ?? billActivityEventLabel(event.type) }),
|
|
4600
|
+
event.description ? /* @__PURE__ */ jsx13("p", { children: event.description }) : null,
|
|
4601
|
+
/* @__PURE__ */ jsxs13("span", { children: [
|
|
4451
4602
|
formatDate(event.createdAt),
|
|
4452
4603
|
event.actor ? ` \xB7 ${event.actor}` : ""
|
|
4453
4604
|
] })
|
|
@@ -4460,69 +4611,69 @@ function historyDate(iso) {
|
|
|
4460
4611
|
if (Number.isNaN(parsed.getTime())) return iso;
|
|
4461
4612
|
return new Intl.DateTimeFormat("en-US", { month: "2-digit", day: "2-digit", year: "numeric" }).format(parsed);
|
|
4462
4613
|
}
|
|
4463
|
-
function BillHistoryTable({ entries, emptyLabel = "No bill history yet.", appearance, className, style, formatDate = historyDate, documentHref }) {
|
|
4464
|
-
const [expanded, setExpanded] =
|
|
4465
|
-
return /* @__PURE__ */
|
|
4466
|
-
/* @__PURE__ */
|
|
4467
|
-
/* @__PURE__ */
|
|
4468
|
-
/* @__PURE__ */
|
|
4469
|
-
/* @__PURE__ */
|
|
4614
|
+
function BillHistoryTable({ entries, emptyLabel = "No bill history yet.", appearance, className, style, formatDate = historyDate, documentHref, onOpenDocument }) {
|
|
4615
|
+
const [expanded, setExpanded] = useState10({});
|
|
4616
|
+
return /* @__PURE__ */ jsxs13("section", { className: classes("mb-surface mb-history", className), style: mindBillAppearanceStyle(appearance, style), "aria-label": "Bill history", children: [
|
|
4617
|
+
/* @__PURE__ */ jsx13("style", { children: lifecycleSurfaceStyles }),
|
|
4618
|
+
/* @__PURE__ */ jsx13("header", { className: "mb-surface-heading", children: /* @__PURE__ */ jsxs13("div", { children: [
|
|
4619
|
+
/* @__PURE__ */ jsx13("strong", { children: "Bill history" }),
|
|
4620
|
+
/* @__PURE__ */ jsx13("span", { children: "Submissions, payer responses, follow-up, and payments." })
|
|
4470
4621
|
] }) }),
|
|
4471
|
-
!entries.length ? /* @__PURE__ */
|
|
4472
|
-
/* @__PURE__ */
|
|
4473
|
-
/* @__PURE__ */
|
|
4474
|
-
/* @__PURE__ */
|
|
4475
|
-
/* @__PURE__ */
|
|
4476
|
-
/* @__PURE__ */
|
|
4622
|
+
!entries.length ? /* @__PURE__ */ jsx13("p", { className: "mb-activity-empty", children: emptyLabel }) : /* @__PURE__ */ jsxs13("div", { className: "mb-history-table", children: [
|
|
4623
|
+
/* @__PURE__ */ jsxs13("div", { className: "mb-history-head", "aria-hidden": "true", children: [
|
|
4624
|
+
/* @__PURE__ */ jsx13("span", { children: "Date" }),
|
|
4625
|
+
/* @__PURE__ */ jsx13("span", { children: "Action" }),
|
|
4626
|
+
/* @__PURE__ */ jsx13("span", { children: "User" }),
|
|
4627
|
+
/* @__PURE__ */ jsx13("span", { children: "Details" })
|
|
4477
4628
|
] }),
|
|
4478
|
-
/* @__PURE__ */
|
|
4629
|
+
/* @__PURE__ */ jsx13("ul", { className: "mb-history-rows", children: entries.map((entry) => {
|
|
4479
4630
|
const expandable = Boolean(entry.details);
|
|
4480
4631
|
const isOpen = expandable && Boolean(expanded[entry.id]);
|
|
4481
4632
|
const details = entry.details;
|
|
4482
|
-
|
|
4483
|
-
/* @__PURE__ */
|
|
4633
|
+
const lineContents = /* @__PURE__ */ jsxs13(Fragment10, { children: [
|
|
4634
|
+
/* @__PURE__ */ jsx13("span", { className: "mb-history-date", children: formatDate(entry.date) }),
|
|
4635
|
+
/* @__PURE__ */ jsx13("span", { className: "mb-history-action", children: entry.action }),
|
|
4636
|
+
/* @__PURE__ */ jsx13("span", { className: "mb-history-actor", children: entry.actor ?? "\u2014" }),
|
|
4637
|
+
/* @__PURE__ */ jsxs13("span", { className: "mb-history-summary", children: [
|
|
4638
|
+
expandable ? /* @__PURE__ */ jsx13("i", { className: `mb-history-caret${isOpen ? " is-open" : ""}`, "aria-hidden": "true" }) : null,
|
|
4639
|
+
entry.summary
|
|
4640
|
+
] })
|
|
4641
|
+
] });
|
|
4642
|
+
return /* @__PURE__ */ jsxs13("li", { className: `mb-history-row is-${entry.tone}`, children: [
|
|
4643
|
+
expandable ? /* @__PURE__ */ jsx13(
|
|
4484
4644
|
"button",
|
|
4485
4645
|
{
|
|
4486
4646
|
type: "button",
|
|
4487
|
-
className: "mb-history-line",
|
|
4488
|
-
|
|
4489
|
-
|
|
4490
|
-
|
|
4491
|
-
children: [
|
|
4492
|
-
/* @__PURE__ */ jsx12("span", { className: "mb-history-date", children: formatDate(entry.date) }),
|
|
4493
|
-
/* @__PURE__ */ jsx12("span", { className: "mb-history-action", children: entry.action }),
|
|
4494
|
-
/* @__PURE__ */ jsx12("span", { className: "mb-history-actor", children: entry.actor ?? "\u2014" }),
|
|
4495
|
-
/* @__PURE__ */ jsxs12("span", { className: "mb-history-summary", children: [
|
|
4496
|
-
expandable ? /* @__PURE__ */ jsx12("i", { className: `mb-history-caret${isOpen ? " is-open" : ""}`, "aria-hidden": "true" }) : null,
|
|
4497
|
-
entry.summary
|
|
4498
|
-
] })
|
|
4499
|
-
]
|
|
4647
|
+
className: "mb-history-line is-expandable",
|
|
4648
|
+
"aria-expanded": isOpen,
|
|
4649
|
+
onClick: () => setExpanded((current) => ({ ...current, [entry.id]: !current[entry.id] })),
|
|
4650
|
+
children: lineContents
|
|
4500
4651
|
}
|
|
4501
|
-
),
|
|
4502
|
-
isOpen && details ? /* @__PURE__ */
|
|
4503
|
-
details.rows?.length ? /* @__PURE__ */
|
|
4504
|
-
/* @__PURE__ */
|
|
4505
|
-
/* @__PURE__ */
|
|
4652
|
+
) : /* @__PURE__ */ jsx13("div", { className: "mb-history-line", children: lineContents }),
|
|
4653
|
+
isOpen && details ? /* @__PURE__ */ jsxs13("div", { className: "mb-history-details", children: [
|
|
4654
|
+
details.rows?.length ? /* @__PURE__ */ jsx13("dl", { className: "mb-history-kv", children: details.rows.map((row) => /* @__PURE__ */ jsxs13("div", { children: [
|
|
4655
|
+
/* @__PURE__ */ jsx13("dt", { children: row.label }),
|
|
4656
|
+
/* @__PURE__ */ jsx13("dd", { children: row.value })
|
|
4506
4657
|
] }, `${row.label}-${row.value}`)) }) : null,
|
|
4507
|
-
details.documents?.length ? /* @__PURE__ */
|
|
4508
|
-
/* @__PURE__ */
|
|
4509
|
-
/* @__PURE__ */
|
|
4658
|
+
details.documents?.length ? /* @__PURE__ */ jsx13("div", { className: "mb-history-kv", children: /* @__PURE__ */ jsxs13("div", { children: [
|
|
4659
|
+
/* @__PURE__ */ jsx13("dt", { children: "Documents" }),
|
|
4660
|
+
/* @__PURE__ */ jsx13("dd", { children: details.documents.map((doc) => {
|
|
4510
4661
|
const href = documentHref?.(doc) ?? null;
|
|
4511
|
-
return href ? /* @__PURE__ */
|
|
4662
|
+
return href ? /* @__PURE__ */ jsx13("a", { className: "mb-history-doc", href, target: "_blank", rel: "noreferrer", children: doc.filename }, doc.id) : onOpenDocument ? /* @__PURE__ */ jsx13("button", { type: "button", className: "mb-history-doc", onClick: () => void onOpenDocument(doc), children: doc.filename }, doc.id) : /* @__PURE__ */ jsx13("span", { className: "mb-history-doc", children: doc.filename }, doc.id);
|
|
4512
4663
|
}) })
|
|
4513
4664
|
] }) }) : null,
|
|
4514
|
-
details.codes?.length ? /* @__PURE__ */
|
|
4515
|
-
/* @__PURE__ */
|
|
4516
|
-
/* @__PURE__ */
|
|
4665
|
+
details.codes?.length ? /* @__PURE__ */ jsx13("dl", { className: "mb-history-codes", children: details.codes.map((code) => /* @__PURE__ */ jsxs13("div", { children: [
|
|
4666
|
+
/* @__PURE__ */ jsx13("dt", { children: code.code }),
|
|
4667
|
+
/* @__PURE__ */ jsx13("dd", { children: code.text })
|
|
4517
4668
|
] }, code.code)) }) : null,
|
|
4518
|
-
details.complianceDueDates?.length ? /* @__PURE__ */
|
|
4519
|
-
/* @__PURE__ */
|
|
4520
|
-
/* @__PURE__ */
|
|
4521
|
-
/* @__PURE__ */
|
|
4522
|
-
/* @__PURE__ */
|
|
4669
|
+
details.complianceDueDates?.length ? /* @__PURE__ */ jsxs13("div", { className: "mb-history-due", children: [
|
|
4670
|
+
/* @__PURE__ */ jsx13("em", { children: "Compliance Due Dates" }),
|
|
4671
|
+
/* @__PURE__ */ jsx13("dl", { children: details.complianceDueDates.map((due) => /* @__PURE__ */ jsxs13("div", { children: [
|
|
4672
|
+
/* @__PURE__ */ jsx13("dt", { children: formatDate(due.date) }),
|
|
4673
|
+
/* @__PURE__ */ jsx13("dd", { children: due.text })
|
|
4523
4674
|
] }, `${due.date}-${due.text}`)) })
|
|
4524
4675
|
] }) : null,
|
|
4525
|
-
details.text ? /* @__PURE__ */
|
|
4676
|
+
details.text ? /* @__PURE__ */ jsx13("p", { className: "mb-history-text", children: details.text }) : null
|
|
4526
4677
|
] }) : null
|
|
4527
4678
|
] }, entry.id);
|
|
4528
4679
|
}) })
|
|
@@ -4543,13 +4694,22 @@ function billLifecycleStage(state) {
|
|
|
4543
4694
|
if (value.includes("accepted")) return "accepted";
|
|
4544
4695
|
return "submitted";
|
|
4545
4696
|
}
|
|
4546
|
-
function
|
|
4697
|
+
function isBillLifecycleDraft(state) {
|
|
4698
|
+
return state.toLowerCase() === "draft";
|
|
4699
|
+
}
|
|
4700
|
+
function billLifecycleProgressSteps(state, options) {
|
|
4547
4701
|
if (state.toLowerCase() === "rejected") {
|
|
4548
4702
|
return [
|
|
4549
4703
|
{ id: "submitted", label: "Sent", status: "complete" },
|
|
4550
4704
|
{ id: "rejected", label: "Rejected", status: "current" }
|
|
4551
4705
|
];
|
|
4552
4706
|
}
|
|
4707
|
+
if (options?.draftStage && isBillLifecycleDraft(state)) {
|
|
4708
|
+
return [
|
|
4709
|
+
{ id: "draft", label: "Draft", status: "current" },
|
|
4710
|
+
...lifecycleStages.map((stage) => ({ ...stage, status: "upcoming" }))
|
|
4711
|
+
];
|
|
4712
|
+
}
|
|
4553
4713
|
const current = billLifecycleStage(state);
|
|
4554
4714
|
const currentIndex = lifecycleStages.findIndex((stage) => stage.id === current);
|
|
4555
4715
|
return lifecycleStages.map((stage, index) => ({
|
|
@@ -4567,18 +4727,19 @@ function billLifecycleDisplayLabel(state, nativeStatus) {
|
|
|
4567
4727
|
if (value === "written_off") return "Written off";
|
|
4568
4728
|
return humanize(state || nativeStatus || "submitted");
|
|
4569
4729
|
}
|
|
4570
|
-
function BillLifecycleProgress({ state, nativeStatus, submittedAt, agingDays, appearance, className, style }) {
|
|
4730
|
+
function BillLifecycleProgress({ state, nativeStatus, submittedAt, agingDays, draftStage, appearance, className, style }) {
|
|
4571
4731
|
const rejected = state.toLowerCase() === "rejected";
|
|
4572
|
-
const
|
|
4573
|
-
|
|
4574
|
-
|
|
4575
|
-
/* @__PURE__ */
|
|
4576
|
-
|
|
4577
|
-
/* @__PURE__ */
|
|
4732
|
+
const draft = Boolean(draftStage) && isBillLifecycleDraft(state);
|
|
4733
|
+
const steps = billLifecycleProgressSteps(state, { draftStage: Boolean(draftStage) });
|
|
4734
|
+
return /* @__PURE__ */ jsxs13("section", { className: classes(`mb-surface mb-progress${rejected ? " is-rejected" : ""}`, className), style: mindBillAppearanceStyle(appearance, style), "aria-label": "Bill lifecycle", children: [
|
|
4735
|
+
/* @__PURE__ */ jsx13("style", { children: lifecycleSurfaceStyles }),
|
|
4736
|
+
/* @__PURE__ */ jsx13("header", { className: "mb-surface-heading", children: /* @__PURE__ */ jsxs13("div", { children: [
|
|
4737
|
+
/* @__PURE__ */ jsx13("strong", { children: billLifecycleDisplayLabel(state, nativeStatus) }),
|
|
4738
|
+
/* @__PURE__ */ jsx13("span", { children: rejected ? "The payer rejected this submission." : draft ? "Not yet sent" : `${submittedAt ? `Submitted ${defaultFormatDate(submittedAt)}` : "Submitted"}${typeof agingDays === "number" ? ` \xB7 ${agingDays} days old` : ""}` })
|
|
4578
4739
|
] }) }),
|
|
4579
|
-
/* @__PURE__ */
|
|
4580
|
-
/* @__PURE__ */
|
|
4581
|
-
/* @__PURE__ */
|
|
4740
|
+
/* @__PURE__ */ jsx13("ol", { className: "mb-progress-list", style: { gridTemplateColumns: `repeat(${steps.length}, minmax(0, 1fr))` }, children: steps.map((step, index) => /* @__PURE__ */ jsxs13("li", { className: `is-${step.status}`, "aria-current": step.status === "current" ? "step" : void 0, children: [
|
|
4741
|
+
/* @__PURE__ */ jsx13("span", { "aria-hidden": "true", children: step.status === "complete" ? "\u2713" : rejected && step.status === "current" ? "!" : index + 1 }),
|
|
4742
|
+
/* @__PURE__ */ jsx13("b", { children: step.label })
|
|
4582
4743
|
] }, step.id)) })
|
|
4583
4744
|
] });
|
|
4584
4745
|
}
|
|
@@ -4592,48 +4753,48 @@ function billRejectionIssueSummary(rejection, count) {
|
|
|
4592
4753
|
function BillRejectionNotice({ rejection, title = "Rejected \u2014 action required", submittedAt, appearance, className, style, formatDate = defaultFormatDate }) {
|
|
4593
4754
|
const issues = rejection.issues?.length ? rejection.issues : [{ code: rejection.code, description: rejection.reason }];
|
|
4594
4755
|
const hasCodes = issues.some((issue) => Boolean(issue.code));
|
|
4595
|
-
return /* @__PURE__ */
|
|
4596
|
-
/* @__PURE__ */
|
|
4597
|
-
/* @__PURE__ */
|
|
4598
|
-
/* @__PURE__ */
|
|
4599
|
-
/* @__PURE__ */
|
|
4600
|
-
/* @__PURE__ */
|
|
4601
|
-
/* @__PURE__ */
|
|
4602
|
-
/* @__PURE__ */
|
|
4756
|
+
return /* @__PURE__ */ jsxs13("section", { className: classes("mb-surface mb-rejection-notice", className), style: mindBillAppearanceStyle(appearance, style), role: "alert", "aria-label": "Bill rejection reasons", children: [
|
|
4757
|
+
/* @__PURE__ */ jsx13("style", { children: lifecycleSurfaceStyles }),
|
|
4758
|
+
/* @__PURE__ */ jsxs13("div", { className: "mb-rejection-overview", children: [
|
|
4759
|
+
/* @__PURE__ */ jsxs13("header", { className: "mb-rejection-heading", children: [
|
|
4760
|
+
/* @__PURE__ */ jsx13("span", { className: "mb-rejection-icon", "aria-hidden": "true", children: "!" }),
|
|
4761
|
+
/* @__PURE__ */ jsxs13("div", { children: [
|
|
4762
|
+
/* @__PURE__ */ jsx13("strong", { children: title }),
|
|
4763
|
+
/* @__PURE__ */ jsxs13("span", { children: [
|
|
4603
4764
|
"Fix the ",
|
|
4604
4765
|
issues.length === 1 ? "issue" : "issues",
|
|
4605
4766
|
" below, then resubmit."
|
|
4606
4767
|
] })
|
|
4607
4768
|
] })
|
|
4608
4769
|
] }),
|
|
4609
|
-
/* @__PURE__ */
|
|
4610
|
-
/* @__PURE__ */
|
|
4611
|
-
/* @__PURE__ */
|
|
4612
|
-
/* @__PURE__ */
|
|
4613
|
-
submittedAt ? /* @__PURE__ */
|
|
4770
|
+
/* @__PURE__ */ jsxs13("ol", { className: "mb-rejection-progress", "aria-label": "Submission status", children: [
|
|
4771
|
+
/* @__PURE__ */ jsxs13("li", { className: "is-complete", children: [
|
|
4772
|
+
/* @__PURE__ */ jsx13("span", { "aria-hidden": "true", children: "\u2713" }),
|
|
4773
|
+
/* @__PURE__ */ jsx13("b", { children: "Sent" }),
|
|
4774
|
+
submittedAt ? /* @__PURE__ */ jsx13("small", { children: formatDate(submittedAt) }) : null
|
|
4614
4775
|
] }),
|
|
4615
|
-
/* @__PURE__ */
|
|
4616
|
-
/* @__PURE__ */
|
|
4617
|
-
/* @__PURE__ */
|
|
4618
|
-
rejection.receivedAt ? /* @__PURE__ */
|
|
4776
|
+
/* @__PURE__ */ jsxs13("li", { className: "is-rejected", "aria-current": "step", children: [
|
|
4777
|
+
/* @__PURE__ */ jsx13("span", { "aria-hidden": "true", children: "!" }),
|
|
4778
|
+
/* @__PURE__ */ jsx13("b", { children: "Rejected" }),
|
|
4779
|
+
rejection.receivedAt ? /* @__PURE__ */ jsx13("small", { children: formatDate(rejection.receivedAt) }) : null
|
|
4619
4780
|
] })
|
|
4620
4781
|
] })
|
|
4621
4782
|
] }),
|
|
4622
|
-
/* @__PURE__ */
|
|
4623
|
-
/* @__PURE__ */
|
|
4624
|
-
/* @__PURE__ */
|
|
4625
|
-
/* @__PURE__ */
|
|
4783
|
+
/* @__PURE__ */ jsxs13("div", { className: "mb-rejection-issues", "aria-label": "Rejection reasons", children: [
|
|
4784
|
+
/* @__PURE__ */ jsxs13("div", { className: "mb-rejection-issues-heading", children: [
|
|
4785
|
+
/* @__PURE__ */ jsxs13("strong", { children: [
|
|
4786
|
+
/* @__PURE__ */ jsx13("span", { "aria-hidden": "true", children: "\u25B3" }),
|
|
4626
4787
|
" Rejection reasons"
|
|
4627
4788
|
] }),
|
|
4628
|
-
/* @__PURE__ */
|
|
4789
|
+
/* @__PURE__ */ jsx13("span", { children: billRejectionIssueSummary(rejection, issues.length) })
|
|
4629
4790
|
] }),
|
|
4630
|
-
/* @__PURE__ */
|
|
4631
|
-
/* @__PURE__ */
|
|
4632
|
-
/* @__PURE__ */
|
|
4633
|
-
issue.code ? /* @__PURE__ */
|
|
4791
|
+
/* @__PURE__ */ jsx13("ol", { "aria-label": `${issues.length} rejection ${issues.length === 1 ? "reason" : "reasons"}`, children: issues.map((issue, index) => /* @__PURE__ */ jsxs13("li", { children: [
|
|
4792
|
+
/* @__PURE__ */ jsx13("span", { className: "mb-rejection-bullet", "aria-hidden": "true" }),
|
|
4793
|
+
/* @__PURE__ */ jsx13("p", { children: issue.description }),
|
|
4794
|
+
issue.code ? /* @__PURE__ */ jsx13("span", { className: "mb-rejection-code", children: issue.code }) : null
|
|
4634
4795
|
] }, `${issue.code ?? "issue"}-${index}`)) }),
|
|
4635
|
-
hasCodes ? /* @__PURE__ */
|
|
4636
|
-
/* @__PURE__ */
|
|
4796
|
+
hasCodes ? /* @__PURE__ */ jsxs13("p", { className: "mb-rejection-code-note", children: [
|
|
4797
|
+
/* @__PURE__ */ jsx13("span", { "aria-hidden": "true", children: "i" }),
|
|
4637
4798
|
" Technical error codes are included for support and auditability."
|
|
4638
4799
|
] }) : null
|
|
4639
4800
|
] })
|
|
@@ -4648,18 +4809,18 @@ function BillSnapshotSummary({ bill, patient, injury, delivery, appearance, clas
|
|
|
4648
4809
|
["Charged", currency(bill.totalCharge)],
|
|
4649
4810
|
["Balance", currency(bill.balanceDue)]
|
|
4650
4811
|
];
|
|
4651
|
-
return /* @__PURE__ */
|
|
4652
|
-
/* @__PURE__ */
|
|
4653
|
-
/* @__PURE__ */
|
|
4654
|
-
/* @__PURE__ */
|
|
4655
|
-
/* @__PURE__ */
|
|
4812
|
+
return /* @__PURE__ */ jsxs13("section", { className: classes("mb-surface mb-snapshot", className), style: mindBillAppearanceStyle(appearance, style), "aria-label": "Bill snapshot", children: [
|
|
4813
|
+
/* @__PURE__ */ jsx13("style", { children: lifecycleSurfaceStyles }),
|
|
4814
|
+
/* @__PURE__ */ jsx13("header", { className: "mb-surface-heading", children: /* @__PURE__ */ jsxs13("div", { children: [
|
|
4815
|
+
/* @__PURE__ */ jsx13("strong", { children: "Bill snapshot" }),
|
|
4816
|
+
/* @__PURE__ */ jsxs13("span", { children: [
|
|
4656
4817
|
"Bill #",
|
|
4657
4818
|
bill.billNumber
|
|
4658
4819
|
] })
|
|
4659
4820
|
] }) }),
|
|
4660
|
-
/* @__PURE__ */
|
|
4661
|
-
/* @__PURE__ */
|
|
4662
|
-
/* @__PURE__ */
|
|
4821
|
+
/* @__PURE__ */ jsx13("dl", { children: values.map(([label, value]) => /* @__PURE__ */ jsxs13("div", { children: [
|
|
4822
|
+
/* @__PURE__ */ jsx13("dt", { children: label }),
|
|
4823
|
+
/* @__PURE__ */ jsx13("dd", { children: value })
|
|
4663
4824
|
] }, label)) })
|
|
4664
4825
|
] });
|
|
4665
4826
|
}
|
|
@@ -4674,145 +4835,145 @@ function BillExplanationOfReview({
|
|
|
4674
4835
|
style
|
|
4675
4836
|
}) {
|
|
4676
4837
|
const rows = payments.length ? payments : [null];
|
|
4677
|
-
return /* @__PURE__ */
|
|
4678
|
-
/* @__PURE__ */
|
|
4679
|
-
/* @__PURE__ */
|
|
4680
|
-
/* @__PURE__ */
|
|
4681
|
-
/* @__PURE__ */
|
|
4838
|
+
return /* @__PURE__ */ jsxs13("section", { className: classes("mb-surface mb-eor-review", className), style: mindBillAppearanceStyle(appearance, style), "aria-label": "Explanation of Review and payments", children: [
|
|
4839
|
+
/* @__PURE__ */ jsx13("style", { children: lifecycleSurfaceStyles }),
|
|
4840
|
+
/* @__PURE__ */ jsx13("header", { className: "mb-surface-heading", children: /* @__PURE__ */ jsxs13("div", { children: [
|
|
4841
|
+
/* @__PURE__ */ jsx13("strong", { children: "Explanation of Review" }),
|
|
4842
|
+
/* @__PURE__ */ jsx13("span", { children: "Payer response and payment reconciliation." })
|
|
4682
4843
|
] }) }),
|
|
4683
|
-
/* @__PURE__ */
|
|
4684
|
-
/* @__PURE__ */
|
|
4685
|
-
/* @__PURE__ */
|
|
4686
|
-
/* @__PURE__ */
|
|
4844
|
+
/* @__PURE__ */ jsxs13("dl", { className: "mb-eor-metrics", children: [
|
|
4845
|
+
/* @__PURE__ */ jsxs13("div", { children: [
|
|
4846
|
+
/* @__PURE__ */ jsx13("dt", { children: "Amount billed" }),
|
|
4847
|
+
/* @__PURE__ */ jsx13("dd", { children: currency(remittance.billedAmount) })
|
|
4687
4848
|
] }),
|
|
4688
|
-
/* @__PURE__ */
|
|
4689
|
-
/* @__PURE__ */
|
|
4690
|
-
/* @__PURE__ */
|
|
4849
|
+
/* @__PURE__ */ jsxs13("div", { children: [
|
|
4850
|
+
/* @__PURE__ */ jsx13("dt", { children: "Payer allowed" }),
|
|
4851
|
+
/* @__PURE__ */ jsx13("dd", { children: remittance.payerAllowedAmount === null ? "\u2014" : currency(remittance.payerAllowedAmount) })
|
|
4691
4852
|
] }),
|
|
4692
|
-
/* @__PURE__ */
|
|
4693
|
-
/* @__PURE__ */
|
|
4694
|
-
/* @__PURE__ */
|
|
4853
|
+
/* @__PURE__ */ jsxs13("div", { children: [
|
|
4854
|
+
/* @__PURE__ */ jsx13("dt", { children: "Payer reported paid" }),
|
|
4855
|
+
/* @__PURE__ */ jsx13("dd", { children: remittance.payerReportedPaid === null ? "\u2014" : currency(remittance.payerReportedPaid) })
|
|
4695
4856
|
] }),
|
|
4696
|
-
/* @__PURE__ */
|
|
4697
|
-
/* @__PURE__ */
|
|
4698
|
-
/* @__PURE__ */
|
|
4857
|
+
/* @__PURE__ */ jsxs13("div", { className: "is-balance", children: [
|
|
4858
|
+
/* @__PURE__ */ jsx13("dt", { children: "Balance due" }),
|
|
4859
|
+
/* @__PURE__ */ jsx13("dd", { children: currency(remittance.balanceDue) })
|
|
4699
4860
|
] }),
|
|
4700
|
-
/* @__PURE__ */
|
|
4701
|
-
/* @__PURE__ */
|
|
4702
|
-
/* @__PURE__ */
|
|
4861
|
+
/* @__PURE__ */ jsxs13("div", { children: [
|
|
4862
|
+
/* @__PURE__ */ jsx13("dt", { children: "Payment posted" }),
|
|
4863
|
+
/* @__PURE__ */ jsx13("dd", { children: currency(remittance.postedPrincipal) })
|
|
4703
4864
|
] }),
|
|
4704
|
-
/* @__PURE__ */
|
|
4705
|
-
/* @__PURE__ */
|
|
4706
|
-
/* @__PURE__ */
|
|
4865
|
+
/* @__PURE__ */ jsxs13("div", { children: [
|
|
4866
|
+
/* @__PURE__ */ jsx13("dt", { children: "Penalty & interest" }),
|
|
4867
|
+
/* @__PURE__ */ jsx13("dd", { children: currency(remittance.postedAdditional) })
|
|
4707
4868
|
] }),
|
|
4708
|
-
/* @__PURE__ */
|
|
4709
|
-
/* @__PURE__ */
|
|
4710
|
-
/* @__PURE__ */
|
|
4869
|
+
/* @__PURE__ */ jsxs13("div", { children: [
|
|
4870
|
+
/* @__PURE__ */ jsx13("dt", { children: "Total received" }),
|
|
4871
|
+
/* @__PURE__ */ jsx13("dd", { children: currency(remittance.totalPostedCash) })
|
|
4711
4872
|
] }),
|
|
4712
|
-
/* @__PURE__ */
|
|
4713
|
-
/* @__PURE__ */
|
|
4714
|
-
/* @__PURE__ */
|
|
4873
|
+
/* @__PURE__ */ jsxs13("div", { children: [
|
|
4874
|
+
/* @__PURE__ */ jsx13("dt", { children: "Expected" }),
|
|
4875
|
+
/* @__PURE__ */ jsx13("dd", { children: currency(remittance.expectedAmount) })
|
|
4715
4876
|
] })
|
|
4716
4877
|
] }),
|
|
4717
|
-
remittance.denialReason ? /* @__PURE__ */
|
|
4718
|
-
/* @__PURE__ */
|
|
4719
|
-
/* @__PURE__ */
|
|
4878
|
+
remittance.denialReason ? /* @__PURE__ */ jsxs13("div", { className: "mb-denial", children: [
|
|
4879
|
+
/* @__PURE__ */ jsx13("strong", { children: "Denial reason" }),
|
|
4880
|
+
/* @__PURE__ */ jsx13("p", { children: remittance.denialReason })
|
|
4720
4881
|
] }) : null,
|
|
4721
|
-
/* @__PURE__ */
|
|
4722
|
-
/* @__PURE__ */
|
|
4723
|
-
/* @__PURE__ */
|
|
4724
|
-
/* @__PURE__ */
|
|
4725
|
-
/* @__PURE__ */
|
|
4726
|
-
/* @__PURE__ */
|
|
4727
|
-
/* @__PURE__ */
|
|
4882
|
+
/* @__PURE__ */ jsx13("div", { className: "mb-eor-table-wrap", children: /* @__PURE__ */ jsxs13("table", { className: "mb-eor-table", children: [
|
|
4883
|
+
/* @__PURE__ */ jsxs13("thead", { children: [
|
|
4884
|
+
/* @__PURE__ */ jsxs13("tr", { className: "mb-eor-groups", children: [
|
|
4885
|
+
/* @__PURE__ */ jsx13("th", { colSpan: 2, children: "Submission" }),
|
|
4886
|
+
/* @__PURE__ */ jsx13("th", { colSpan: 5, children: "EOR payment information" }),
|
|
4887
|
+
/* @__PURE__ */ jsx13("th", { colSpan: 2, children: "EOR post" }),
|
|
4888
|
+
/* @__PURE__ */ jsx13("th", { children: "EOR" })
|
|
4728
4889
|
] }),
|
|
4729
|
-
/* @__PURE__ */
|
|
4730
|
-
/* @__PURE__ */
|
|
4731
|
-
/* @__PURE__ */
|
|
4732
|
-
/* @__PURE__ */
|
|
4733
|
-
/* @__PURE__ */
|
|
4734
|
-
/* @__PURE__ */
|
|
4735
|
-
/* @__PURE__ */
|
|
4736
|
-
/* @__PURE__ */
|
|
4737
|
-
/* @__PURE__ */
|
|
4738
|
-
/* @__PURE__ */
|
|
4739
|
-
/* @__PURE__ */
|
|
4890
|
+
/* @__PURE__ */ jsxs13("tr", { children: [
|
|
4891
|
+
/* @__PURE__ */ jsx13("th", { children: "Submission" }),
|
|
4892
|
+
/* @__PURE__ */ jsx13("th", { children: "Submission payment" }),
|
|
4893
|
+
/* @__PURE__ */ jsx13("th", { children: "Payment method" }),
|
|
4894
|
+
/* @__PURE__ */ jsx13("th", { children: "Reference" }),
|
|
4895
|
+
/* @__PURE__ */ jsx13("th", { children: "Effective date" }),
|
|
4896
|
+
/* @__PURE__ */ jsx13("th", { children: "Payment total" }),
|
|
4897
|
+
/* @__PURE__ */ jsx13("th", { children: "Deposit date" }),
|
|
4898
|
+
/* @__PURE__ */ jsx13("th", { children: "Post date" }),
|
|
4899
|
+
/* @__PURE__ */ jsx13("th", { children: "Source" }),
|
|
4900
|
+
/* @__PURE__ */ jsx13("th", { children: "Document" })
|
|
4740
4901
|
] })
|
|
4741
4902
|
] }),
|
|
4742
|
-
/* @__PURE__ */
|
|
4903
|
+
/* @__PURE__ */ jsx13("tbody", { children: rows.map((payment, index) => {
|
|
4743
4904
|
const eor = eors[index] ?? eors[0];
|
|
4744
|
-
return /* @__PURE__ */
|
|
4745
|
-
/* @__PURE__ */
|
|
4746
|
-
/* @__PURE__ */
|
|
4747
|
-
submittedAt ? /* @__PURE__ */
|
|
4905
|
+
return /* @__PURE__ */ jsxs13("tr", { children: [
|
|
4906
|
+
/* @__PURE__ */ jsxs13("td", { "data-label": "Submission", children: [
|
|
4907
|
+
/* @__PURE__ */ jsx13("strong", { children: "Original bill" }),
|
|
4908
|
+
submittedAt ? /* @__PURE__ */ jsxs13("span", { children: [
|
|
4748
4909
|
"Sent ",
|
|
4749
4910
|
defaultFormatDate(submittedAt)
|
|
4750
4911
|
] }) : null
|
|
4751
4912
|
] }),
|
|
4752
|
-
/* @__PURE__ */
|
|
4753
|
-
/* @__PURE__ */
|
|
4754
|
-
/* @__PURE__ */
|
|
4755
|
-
/* @__PURE__ */
|
|
4756
|
-
/* @__PURE__ */
|
|
4757
|
-
/* @__PURE__ */
|
|
4758
|
-
/* @__PURE__ */
|
|
4759
|
-
/* @__PURE__ */
|
|
4760
|
-
/* @__PURE__ */
|
|
4913
|
+
/* @__PURE__ */ jsx13("td", { "data-label": "Submission payment", children: remittance.payerReportedPaid === null ? "\u2014" : currency(remittance.payerReportedPaid) }),
|
|
4914
|
+
/* @__PURE__ */ jsx13("td", { "data-label": "Payment method", children: payment ? humanize(payment.method) : "\u2014" }),
|
|
4915
|
+
/* @__PURE__ */ jsx13("td", { "data-label": "Reference", children: payment?.checkNumber || "\u2014" }),
|
|
4916
|
+
/* @__PURE__ */ jsx13("td", { "data-label": "Effective date", children: payment ? payment.receivedDate || payment.depositDate || defaultFormatDate(payment.postedAt) : "\u2014" }),
|
|
4917
|
+
/* @__PURE__ */ jsx13("td", { "data-label": "Payment total", children: payment ? currency(payment.amount) : currency(0) }),
|
|
4918
|
+
/* @__PURE__ */ jsx13("td", { "data-label": "Deposit date", children: payment?.depositDate || "Not recorded" }),
|
|
4919
|
+
/* @__PURE__ */ jsx13("td", { "data-label": "Post date", children: payment ? defaultFormatDate(payment.postedAt) : eor ? defaultFormatDate(eor.addedAt) : "\u2014" }),
|
|
4920
|
+
/* @__PURE__ */ jsx13("td", { "data-label": "Source", children: payment ? payment.source.toUpperCase() : eor ? "EOR" : "\u2014" }),
|
|
4921
|
+
/* @__PURE__ */ jsx13("td", { "data-label": "EOR", children: eor && onOpenEor ? /* @__PURE__ */ jsx13("button", { type: "button", className: "mb-eor-link", onClick: () => void onOpenEor(eor), children: eor.filename }) : eor?.filename || "\u2014" })
|
|
4761
4922
|
] }, payment?.id ?? `empty-${index}`);
|
|
4762
4923
|
}) })
|
|
4763
4924
|
] }) }),
|
|
4764
|
-
eors.length > rows.length ? /* @__PURE__ */
|
|
4925
|
+
eors.length > rows.length ? /* @__PURE__ */ jsx13("div", { className: "mb-eor-documents", children: eors.slice(rows.length).map((eor) => /* @__PURE__ */ jsx13("button", { type: "button", onClick: () => void onOpenEor?.(eor), children: eor.filename }, eor.id)) }) : null
|
|
4765
4926
|
] });
|
|
4766
4927
|
}
|
|
4767
4928
|
function BillRemittanceCard({ remittance, appearance, className, style }) {
|
|
4768
|
-
return /* @__PURE__ */
|
|
4769
|
-
/* @__PURE__ */
|
|
4770
|
-
/* @__PURE__ */
|
|
4771
|
-
/* @__PURE__ */
|
|
4772
|
-
/* @__PURE__ */
|
|
4929
|
+
return /* @__PURE__ */ jsxs13("section", { className: classes("mb-surface mb-remittance", className), style: mindBillAppearanceStyle(appearance, style), "aria-label": "Remittance summary", children: [
|
|
4930
|
+
/* @__PURE__ */ jsx13("style", { children: lifecycleSurfaceStyles }),
|
|
4931
|
+
/* @__PURE__ */ jsx13("header", { className: "mb-surface-heading", children: /* @__PURE__ */ jsxs13("div", { children: [
|
|
4932
|
+
/* @__PURE__ */ jsx13("strong", { children: "Remittance" }),
|
|
4933
|
+
/* @__PURE__ */ jsx13("span", { children: "Amounts reported by the payer and posted to the bill." })
|
|
4773
4934
|
] }) }),
|
|
4774
|
-
/* @__PURE__ */
|
|
4775
|
-
/* @__PURE__ */
|
|
4776
|
-
/* @__PURE__ */
|
|
4777
|
-
/* @__PURE__ */
|
|
4935
|
+
/* @__PURE__ */ jsxs13("dl", { children: [
|
|
4936
|
+
/* @__PURE__ */ jsxs13("div", { children: [
|
|
4937
|
+
/* @__PURE__ */ jsx13("dt", { children: "Amount billed" }),
|
|
4938
|
+
/* @__PURE__ */ jsx13("dd", { children: currency(remittance.billedAmount) })
|
|
4778
4939
|
] }),
|
|
4779
|
-
/* @__PURE__ */
|
|
4780
|
-
/* @__PURE__ */
|
|
4781
|
-
/* @__PURE__ */
|
|
4940
|
+
/* @__PURE__ */ jsxs13("div", { children: [
|
|
4941
|
+
/* @__PURE__ */ jsx13("dt", { children: "Expected" }),
|
|
4942
|
+
/* @__PURE__ */ jsx13("dd", { children: currency(remittance.expectedAmount) })
|
|
4782
4943
|
] }),
|
|
4783
|
-
/* @__PURE__ */
|
|
4784
|
-
/* @__PURE__ */
|
|
4785
|
-
/* @__PURE__ */
|
|
4944
|
+
/* @__PURE__ */ jsxs13("div", { children: [
|
|
4945
|
+
/* @__PURE__ */ jsx13("dt", { children: "Payer allowed" }),
|
|
4946
|
+
/* @__PURE__ */ jsx13("dd", { children: remittance.payerAllowedAmount === null ? "\u2014" : currency(remittance.payerAllowedAmount) })
|
|
4786
4947
|
] }),
|
|
4787
|
-
/* @__PURE__ */
|
|
4788
|
-
/* @__PURE__ */
|
|
4789
|
-
/* @__PURE__ */
|
|
4948
|
+
/* @__PURE__ */ jsxs13("div", { children: [
|
|
4949
|
+
/* @__PURE__ */ jsx13("dt", { children: "Payer reported paid" }),
|
|
4950
|
+
/* @__PURE__ */ jsx13("dd", { children: remittance.payerReportedPaid === null ? "\u2014" : currency(remittance.payerReportedPaid) })
|
|
4790
4951
|
] }),
|
|
4791
|
-
/* @__PURE__ */
|
|
4792
|
-
/* @__PURE__ */
|
|
4793
|
-
/* @__PURE__ */
|
|
4952
|
+
/* @__PURE__ */ jsxs13("div", { children: [
|
|
4953
|
+
/* @__PURE__ */ jsx13("dt", { children: "Payment posted" }),
|
|
4954
|
+
/* @__PURE__ */ jsx13("dd", { children: currency(remittance.postedPrincipal) })
|
|
4794
4955
|
] }),
|
|
4795
|
-
/* @__PURE__ */
|
|
4796
|
-
/* @__PURE__ */
|
|
4797
|
-
/* @__PURE__ */
|
|
4956
|
+
/* @__PURE__ */ jsxs13("div", { children: [
|
|
4957
|
+
/* @__PURE__ */ jsx13("dt", { children: "Penalty & interest" }),
|
|
4958
|
+
/* @__PURE__ */ jsx13("dd", { children: currency(remittance.postedAdditional) })
|
|
4798
4959
|
] }),
|
|
4799
|
-
/* @__PURE__ */
|
|
4800
|
-
/* @__PURE__ */
|
|
4801
|
-
/* @__PURE__ */
|
|
4960
|
+
/* @__PURE__ */ jsxs13("div", { children: [
|
|
4961
|
+
/* @__PURE__ */ jsx13("dt", { children: "Total received" }),
|
|
4962
|
+
/* @__PURE__ */ jsx13("dd", { children: currency(remittance.totalPostedCash) })
|
|
4802
4963
|
] }),
|
|
4803
|
-
/* @__PURE__ */
|
|
4804
|
-
/* @__PURE__ */
|
|
4805
|
-
/* @__PURE__ */
|
|
4964
|
+
/* @__PURE__ */ jsxs13("div", { children: [
|
|
4965
|
+
/* @__PURE__ */ jsx13("dt", { children: "Balance due" }),
|
|
4966
|
+
/* @__PURE__ */ jsx13("dd", { children: currency(remittance.balanceDue) })
|
|
4806
4967
|
] })
|
|
4807
4968
|
] }),
|
|
4808
|
-
remittance.denialReason ? /* @__PURE__ */
|
|
4809
|
-
/* @__PURE__ */
|
|
4810
|
-
/* @__PURE__ */
|
|
4969
|
+
remittance.denialReason ? /* @__PURE__ */ jsxs13("div", { className: "mb-denial", children: [
|
|
4970
|
+
/* @__PURE__ */ jsx13("strong", { children: "Denial reason" }),
|
|
4971
|
+
/* @__PURE__ */ jsx13("p", { children: remittance.denialReason })
|
|
4811
4972
|
] }) : null
|
|
4812
4973
|
] });
|
|
4813
4974
|
}
|
|
4814
4975
|
function BillPayerContactCard({ delivery, appearance, className, style }) {
|
|
4815
|
-
const
|
|
4976
|
+
const contacts2 = [
|
|
4816
4977
|
delivery.contacts.adjusterName ? ["Adjuster", delivery.contacts.adjusterName, null] : null,
|
|
4817
4978
|
delivery.contacts.adjusterPhone ? ["Adjuster phone", delivery.contacts.adjusterPhone, `tel:${delivery.contacts.adjusterPhone}`] : null,
|
|
4818
4979
|
delivery.contacts.adjusterEmail ? ["Adjuster email", delivery.contacts.adjusterEmail, `mailto:${delivery.contacts.adjusterEmail}`] : null,
|
|
@@ -4821,73 +4982,73 @@ function BillPayerContactCard({ delivery, appearance, className, style }) {
|
|
|
4821
4982
|
delivery.contacts.mailingAddress ? ["Mail", delivery.contacts.mailingAddress, null] : null,
|
|
4822
4983
|
delivery.contacts.portalUrl ? ["Portal", "Open payer portal", delivery.contacts.portalUrl] : null
|
|
4823
4984
|
].filter(Boolean);
|
|
4824
|
-
if (!delivery.payerName && !
|
|
4825
|
-
return /* @__PURE__ */
|
|
4826
|
-
/* @__PURE__ */
|
|
4827
|
-
/* @__PURE__ */
|
|
4828
|
-
/* @__PURE__ */
|
|
4829
|
-
/* @__PURE__ */
|
|
4985
|
+
if (!delivery.payerName && !contacts2.length) return null;
|
|
4986
|
+
return /* @__PURE__ */ jsxs13("section", { className: classes("mb-surface mb-contacts", className), style: mindBillAppearanceStyle(appearance, style), "aria-label": "Payer contact information", children: [
|
|
4987
|
+
/* @__PURE__ */ jsx13("style", { children: lifecycleSurfaceStyles }),
|
|
4988
|
+
/* @__PURE__ */ jsx13("header", { className: "mb-surface-heading", children: /* @__PURE__ */ jsxs13("div", { children: [
|
|
4989
|
+
/* @__PURE__ */ jsx13("strong", { children: delivery.payerName || "Claims administrator" }),
|
|
4990
|
+
/* @__PURE__ */ jsx13("span", { children: "Billing and follow-up contacts." })
|
|
4830
4991
|
] }) }),
|
|
4831
|
-
!
|
|
4832
|
-
/* @__PURE__ */
|
|
4833
|
-
/* @__PURE__ */
|
|
4992
|
+
!contacts2.length ? /* @__PURE__ */ jsx13("p", { className: "mb-empty", children: "No payer contact details are available." }) : /* @__PURE__ */ jsx13("dl", { children: contacts2.map(([label, value, href]) => /* @__PURE__ */ jsxs13("div", { children: [
|
|
4993
|
+
/* @__PURE__ */ jsx13("dt", { children: label }),
|
|
4994
|
+
/* @__PURE__ */ jsx13("dd", { children: href ? /* @__PURE__ */ jsx13("a", { href, target: label === "Portal" ? "_blank" : void 0, rel: label === "Portal" ? "noreferrer noopener" : void 0, children: value }) : value })
|
|
4834
4995
|
] }, label)) })
|
|
4835
4996
|
] });
|
|
4836
4997
|
}
|
|
4837
4998
|
function BillPaymentLedger({ payments, appearance, className, style }) {
|
|
4838
|
-
return /* @__PURE__ */
|
|
4839
|
-
/* @__PURE__ */
|
|
4840
|
-
/* @__PURE__ */
|
|
4841
|
-
/* @__PURE__ */
|
|
4842
|
-
/* @__PURE__ */
|
|
4999
|
+
return /* @__PURE__ */ jsxs13("section", { className: classes("mb-surface mb-payments", className), style: mindBillAppearanceStyle(appearance, style), "aria-label": "Payment ledger", children: [
|
|
5000
|
+
/* @__PURE__ */ jsx13("style", { children: lifecycleSurfaceStyles }),
|
|
5001
|
+
/* @__PURE__ */ jsx13("header", { className: "mb-surface-heading", children: /* @__PURE__ */ jsxs13("div", { children: [
|
|
5002
|
+
/* @__PURE__ */ jsx13("strong", { children: "Payments" }),
|
|
5003
|
+
/* @__PURE__ */ jsx13("span", { children: "Funds recorded against this bill." })
|
|
4843
5004
|
] }) }),
|
|
4844
|
-
!payments.length ? /* @__PURE__ */
|
|
5005
|
+
!payments.length ? /* @__PURE__ */ jsx13("p", { className: "mb-empty", children: "No payments posted." }) : /* @__PURE__ */ jsx13("div", { className: "mb-payment-list", children: payments.map((payment) => {
|
|
4845
5006
|
const additional = payment.feeAmount ?? 0;
|
|
4846
|
-
return /* @__PURE__ */
|
|
4847
|
-
/* @__PURE__ */
|
|
4848
|
-
/* @__PURE__ */
|
|
4849
|
-
/* @__PURE__ */
|
|
5007
|
+
return /* @__PURE__ */ jsxs13("article", { children: [
|
|
5008
|
+
/* @__PURE__ */ jsxs13("div", { className: "mb-payment-amount", children: [
|
|
5009
|
+
/* @__PURE__ */ jsx13("strong", { children: currency(payment.amount) }),
|
|
5010
|
+
/* @__PURE__ */ jsx13("span", { children: "Total received" })
|
|
4850
5011
|
] }),
|
|
4851
|
-
/* @__PURE__ */
|
|
4852
|
-
/* @__PURE__ */
|
|
4853
|
-
/* @__PURE__ */
|
|
4854
|
-
/* @__PURE__ */
|
|
5012
|
+
/* @__PURE__ */ jsxs13("dl", { children: [
|
|
5013
|
+
/* @__PURE__ */ jsxs13("div", { children: [
|
|
5014
|
+
/* @__PURE__ */ jsx13("dt", { children: "Applied to bill" }),
|
|
5015
|
+
/* @__PURE__ */ jsx13("dd", { children: currency(payment.principalAmount) })
|
|
4855
5016
|
] }),
|
|
4856
|
-
additional > 0 ? /* @__PURE__ */
|
|
4857
|
-
/* @__PURE__ */
|
|
4858
|
-
/* @__PURE__ */
|
|
5017
|
+
additional > 0 ? /* @__PURE__ */ jsxs13("div", { children: [
|
|
5018
|
+
/* @__PURE__ */ jsx13("dt", { children: "Penalty & interest" }),
|
|
5019
|
+
/* @__PURE__ */ jsx13("dd", { children: currency(additional) })
|
|
4859
5020
|
] }) : null,
|
|
4860
|
-
/* @__PURE__ */
|
|
4861
|
-
/* @__PURE__ */
|
|
4862
|
-
/* @__PURE__ */
|
|
5021
|
+
/* @__PURE__ */ jsxs13("div", { children: [
|
|
5022
|
+
/* @__PURE__ */ jsx13("dt", { children: "Method" }),
|
|
5023
|
+
/* @__PURE__ */ jsx13("dd", { children: payment.method.toUpperCase() })
|
|
4863
5024
|
] }),
|
|
4864
|
-
/* @__PURE__ */
|
|
4865
|
-
/* @__PURE__ */
|
|
4866
|
-
/* @__PURE__ */
|
|
5025
|
+
/* @__PURE__ */ jsxs13("div", { children: [
|
|
5026
|
+
/* @__PURE__ */ jsx13("dt", { children: "Reference" }),
|
|
5027
|
+
/* @__PURE__ */ jsx13("dd", { children: payment.checkNumber || "\u2014" })
|
|
4867
5028
|
] }),
|
|
4868
|
-
/* @__PURE__ */
|
|
4869
|
-
/* @__PURE__ */
|
|
4870
|
-
/* @__PURE__ */
|
|
5029
|
+
/* @__PURE__ */ jsxs13("div", { children: [
|
|
5030
|
+
/* @__PURE__ */ jsx13("dt", { children: "Effective date" }),
|
|
5031
|
+
/* @__PURE__ */ jsx13("dd", { children: payment.receivedDate || payment.depositDate || defaultFormatDate(payment.postedAt) })
|
|
4871
5032
|
] }),
|
|
4872
|
-
/* @__PURE__ */
|
|
4873
|
-
/* @__PURE__ */
|
|
4874
|
-
/* @__PURE__ */
|
|
5033
|
+
/* @__PURE__ */ jsxs13("div", { children: [
|
|
5034
|
+
/* @__PURE__ */ jsx13("dt", { children: "Deposit date" }),
|
|
5035
|
+
/* @__PURE__ */ jsx13("dd", { children: payment.depositDate || "Not recorded" })
|
|
4875
5036
|
] }),
|
|
4876
|
-
/* @__PURE__ */
|
|
4877
|
-
/* @__PURE__ */
|
|
4878
|
-
/* @__PURE__ */
|
|
5037
|
+
/* @__PURE__ */ jsxs13("div", { children: [
|
|
5038
|
+
/* @__PURE__ */ jsx13("dt", { children: "Posted" }),
|
|
5039
|
+
/* @__PURE__ */ jsxs13("dd", { children: [
|
|
4879
5040
|
defaultFormatDate(payment.postedAt),
|
|
4880
5041
|
" \xB7 ",
|
|
4881
5042
|
payment.source.toUpperCase()
|
|
4882
5043
|
] })
|
|
4883
5044
|
] }),
|
|
4884
|
-
/* @__PURE__ */
|
|
4885
|
-
/* @__PURE__ */
|
|
4886
|
-
/* @__PURE__ */
|
|
5045
|
+
/* @__PURE__ */ jsxs13("div", { children: [
|
|
5046
|
+
/* @__PURE__ */ jsx13("dt", { children: "Status" }),
|
|
5047
|
+
/* @__PURE__ */ jsx13("dd", { children: humanize(payment.status || "posted") })
|
|
4887
5048
|
] })
|
|
4888
5049
|
] }),
|
|
4889
|
-
payment.feeReason ? /* @__PURE__ */
|
|
4890
|
-
payment.note ? /* @__PURE__ */
|
|
5050
|
+
payment.feeReason ? /* @__PURE__ */ jsx13("p", { children: payment.feeReason }) : null,
|
|
5051
|
+
payment.note ? /* @__PURE__ */ jsx13("p", { children: payment.note }) : null
|
|
4891
5052
|
] }, payment.id);
|
|
4892
5053
|
}) })
|
|
4893
5054
|
] });
|
|
@@ -4918,8 +5079,8 @@ var lifecycleSurfaceStyles = `
|
|
|
4918
5079
|
.mb-history-rows{list-style:none;margin:0;padding:0}.mb-history-row{border-top:1px solid var(--mb-border)}
|
|
4919
5080
|
.mb-history-row.is-submission{background:color-mix(in srgb,var(--mb-accent) 9%,var(--mb-surface))}
|
|
4920
5081
|
.mb-history-row.is-note{background:color-mix(in srgb,#f2c344 13%,var(--mb-surface))}
|
|
4921
|
-
.mb-history-line{display:grid;grid-template-columns:96px 160px 140px minmax(0,1fr);gap:12px;width:100%;padding:10px 14px;border:0;background:transparent;color:inherit;font:inherit;text-align:left
|
|
4922
|
-
.mb-history-line
|
|
5082
|
+
.mb-history-line{display:grid;grid-template-columns:96px 160px 140px minmax(0,1fr);gap:12px;width:100%;padding:10px 14px;border:0;background:transparent;color:inherit;font:inherit;text-align:left}
|
|
5083
|
+
.mb-history-line.is-expandable{cursor:pointer}.mb-history-line.is-expandable:hover .mb-history-summary{text-decoration:underline}
|
|
4923
5084
|
.mb-history-date{color:var(--mb-muted);font-size:13px}.mb-history-action{font-size:13.5px;font-weight:750}
|
|
4924
5085
|
.mb-history-row.is-problem .mb-history-action{color:var(--mb-danger)}
|
|
4925
5086
|
.mb-history-actor{color:var(--mb-muted);font-size:13px;overflow-wrap:anywhere}
|
|
@@ -4929,7 +5090,7 @@ var lifecycleSurfaceStyles = `
|
|
|
4929
5090
|
.mb-history-details{padding:4px 14px 14px 122px;font-size:13.5px;line-height:1.5}
|
|
4930
5091
|
.mb-history-kv,.mb-history-codes,.mb-history-due dl{display:grid;gap:4px;margin:0}
|
|
4931
5092
|
.mb-history-kv>div{display:grid;grid-template-columns:180px minmax(0,1fr);gap:12px;border-top:1px solid color-mix(in srgb,var(--mb-border) 60%,transparent);padding-top:4px}
|
|
4932
|
-
.mb-history-kv dt{font-weight:750}.mb-history-kv dd{margin:0;overflow-wrap:anywhere}.mb-history-kv dd a{color:var(--mb-accent)}.mb-history-doc{display:block}
|
|
5093
|
+
.mb-history-kv dt{font-weight:750}.mb-history-kv dd{margin:0;overflow-wrap:anywhere}.mb-history-kv dd a{color:var(--mb-accent)}.mb-history-doc{display:block}.mb-history-kv button.mb-history-doc{border:0;background:transparent;color:var(--mb-accent);font:inherit;padding:0;text-align:left;text-decoration:underline;cursor:pointer}
|
|
4933
5094
|
.mb-history-codes>div{display:grid;grid-template-columns:56px minmax(0,1fr);gap:12px}.mb-history-codes dt{font-weight:800}.mb-history-codes dd{margin:0}
|
|
4934
5095
|
.mb-history-due{margin-top:8px}.mb-history-due em{display:block;color:var(--mb-muted);font-size:12.5px;margin-bottom:4px}
|
|
4935
5096
|
.mb-history-due dl>div{display:grid;grid-template-columns:96px minmax(0,1fr);gap:12px;border-top:1px solid color-mix(in srgb,var(--mb-border) 60%,transparent);padding-top:4px}
|
|
@@ -4942,10 +5103,10 @@ var lifecycleSurfaceStyles = `
|
|
|
4942
5103
|
// src/connected-bill-lifecycle.tsx
|
|
4943
5104
|
import {
|
|
4944
5105
|
useCallback as useCallback4,
|
|
4945
|
-
useEffect as
|
|
5106
|
+
useEffect as useEffect9,
|
|
4946
5107
|
useMemo as useMemo8,
|
|
4947
5108
|
useRef as useRef5,
|
|
4948
|
-
useState as
|
|
5109
|
+
useState as useState11
|
|
4949
5110
|
} from "react";
|
|
4950
5111
|
import {
|
|
4951
5112
|
DEFAULT_API_BASE_URL as DEFAULT_API_BASE_URL2,
|
|
@@ -4962,7 +5123,7 @@ import {
|
|
|
4962
5123
|
reportBillStatusContacts as reportBillStatusContacts2,
|
|
4963
5124
|
secondReviewDeadline as secondReviewDeadline2
|
|
4964
5125
|
} from "@mindbill/browser";
|
|
4965
|
-
import { Fragment as
|
|
5126
|
+
import { Fragment as Fragment11, jsx as jsx14, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
4966
5127
|
var DEFAULT_REFRESH_INTERVAL2 = 6e4;
|
|
4967
5128
|
function reservePreviewWindow() {
|
|
4968
5129
|
const preview = window.open("about:blank", "_blank");
|
|
@@ -5004,11 +5165,11 @@ function useBillLifecycle({
|
|
|
5004
5165
|
enabled = true,
|
|
5005
5166
|
fetch: fetchOverride
|
|
5006
5167
|
}) {
|
|
5007
|
-
const [data, setData] =
|
|
5008
|
-
const [error, setError] =
|
|
5009
|
-
const [isLoading, setIsLoading] =
|
|
5010
|
-
const [isRefreshing, setIsRefreshing] =
|
|
5011
|
-
const [isMutating, setIsMutating] =
|
|
5168
|
+
const [data, setData] = useState11(null);
|
|
5169
|
+
const [error, setError] = useState11(null);
|
|
5170
|
+
const [isLoading, setIsLoading] = useState11(enabled);
|
|
5171
|
+
const [isRefreshing, setIsRefreshing] = useState11(false);
|
|
5172
|
+
const [isMutating, setIsMutating] = useState11(false);
|
|
5012
5173
|
const mounted = useRef5(true);
|
|
5013
5174
|
const client = useMemo8(() => createBillLifecycleClient({
|
|
5014
5175
|
billId: providedBillId,
|
|
@@ -5017,12 +5178,12 @@ function useBillLifecycle({
|
|
|
5017
5178
|
apiBaseUrl,
|
|
5018
5179
|
fetch: fetchOverride
|
|
5019
5180
|
}), [apiBaseUrl, fetchOverride, getSession, providedBillId, sessionEndpoint]);
|
|
5020
|
-
|
|
5181
|
+
useEffect9(() => {
|
|
5021
5182
|
setData(null);
|
|
5022
5183
|
setError(null);
|
|
5023
5184
|
setIsLoading(enabled);
|
|
5024
5185
|
}, [enabled, providedBillId]);
|
|
5025
|
-
|
|
5186
|
+
useEffect9(() => {
|
|
5026
5187
|
mounted.current = true;
|
|
5027
5188
|
return () => {
|
|
5028
5189
|
mounted.current = false;
|
|
@@ -5046,7 +5207,7 @@ function useBillLifecycle({
|
|
|
5046
5207
|
}
|
|
5047
5208
|
}
|
|
5048
5209
|
}, [client, enabled]);
|
|
5049
|
-
|
|
5210
|
+
useEffect9(() => {
|
|
5050
5211
|
if (!enabled) return;
|
|
5051
5212
|
void refresh();
|
|
5052
5213
|
const interval = refreshInterval > 0 ? window.setInterval(() => void refresh(), refreshInterval) : null;
|
|
@@ -5097,6 +5258,7 @@ function useBillLifecycle({
|
|
|
5097
5258
|
isMutating,
|
|
5098
5259
|
refresh,
|
|
5099
5260
|
searchClaimsAdministrators: (query, claimNumber) => client.searchClaimsAdministrators(query, claimNumber),
|
|
5261
|
+
getClaimsAdministratorDirectory: (id, injuryState) => client.getClaimsAdministratorDirectory(id, injuryState),
|
|
5100
5262
|
getDeliveryOptions: () => client.getDeliveryOptions(),
|
|
5101
5263
|
getAttachment: (attachmentId) => client.getAttachment(attachmentId),
|
|
5102
5264
|
openAttachment,
|
|
@@ -5115,7 +5277,7 @@ function useBillLifecycle({
|
|
|
5115
5277
|
}
|
|
5116
5278
|
function LifecycleDialog({ children, title, wide = false, onClose }) {
|
|
5117
5279
|
const dialog = useRef5(null);
|
|
5118
|
-
|
|
5280
|
+
useEffect9(() => {
|
|
5119
5281
|
const previous = document.activeElement;
|
|
5120
5282
|
dialog.current?.focus();
|
|
5121
5283
|
const onKeyDown = (event) => event.key === "Escape" && onClose();
|
|
@@ -5125,8 +5287,8 @@ function LifecycleDialog({ children, title, wide = false, onClose }) {
|
|
|
5125
5287
|
previous?.focus();
|
|
5126
5288
|
};
|
|
5127
5289
|
}, [onClose]);
|
|
5128
|
-
return /* @__PURE__ */
|
|
5129
|
-
/* @__PURE__ */
|
|
5290
|
+
return /* @__PURE__ */ jsx14("div", { className: "mb-lifecycle-dialog-backdrop", onMouseDown: (event) => event.currentTarget === event.target && onClose(), children: /* @__PURE__ */ jsxs14("div", { ref: dialog, className: ["mb-lifecycle-dialog", wide ? "wide" : ""].filter(Boolean).join(" "), role: "dialog", "aria-modal": "true", "aria-label": title, tabIndex: -1, children: [
|
|
5291
|
+
/* @__PURE__ */ jsx14("button", { type: "button", className: "mb-lifecycle-dialog-close", "aria-label": "Close", onClick: onClose, children: "\xD7" }),
|
|
5130
5292
|
children
|
|
5131
5293
|
] }) });
|
|
5132
5294
|
}
|
|
@@ -5197,7 +5359,7 @@ function correctionBill(data) {
|
|
|
5197
5359
|
address: { line1: location.street, city: location.city, state: location.state, postalCode: location.zip },
|
|
5198
5360
|
...location.posCode ? { placeOfServiceCode: location.posCode } : {}
|
|
5199
5361
|
} } : {},
|
|
5200
|
-
diagnoses: [...data.injury.diagnosisCodes || []],
|
|
5362
|
+
diagnoses: data.injury.diagnoses?.map((diagnosis) => diagnosis.code) ?? [...data.injury.diagnosisCodes || []],
|
|
5201
5363
|
serviceLines: data.bill.lineItems.map((line) => ({
|
|
5202
5364
|
code: line.code,
|
|
5203
5365
|
modifiers: [...line.modifiers],
|
|
@@ -5242,19 +5404,20 @@ function sandboxScenarios(state) {
|
|
|
5242
5404
|
function shouldShowSandboxControls(environment, enabled = false) {
|
|
5243
5405
|
return enabled && environment === "sandbox";
|
|
5244
5406
|
}
|
|
5245
|
-
function ConnectedBillLifecycle({ appearance, sandboxControls = false, className, style, loadingFallback, errorFallback, onChanged, ...options }) {
|
|
5407
|
+
function ConnectedBillLifecycle({ appearance, actorName, claimsAdministratorHint, sandboxControls = false, className, style, loadingFallback, errorFallback, onChanged, ...options }) {
|
|
5246
5408
|
const lifecycle = useBillLifecycle(options);
|
|
5247
5409
|
const { data } = lifecycle;
|
|
5248
|
-
const [tab, setTab] =
|
|
5249
|
-
const [panel, setPanel] =
|
|
5250
|
-
const [notice, setNotice] =
|
|
5251
|
-
const [reason, setReason] =
|
|
5252
|
-
const [correctionError, setCorrectionError] =
|
|
5253
|
-
const [newBillError, setNewBillError] =
|
|
5254
|
-
const [payment, setPayment] =
|
|
5255
|
-
const [review, setReview] =
|
|
5256
|
-
const [duplicateDelivery, setDuplicateDelivery] =
|
|
5257
|
-
const [duplicateDeliveryError, setDuplicateDeliveryError] =
|
|
5410
|
+
const [tab, setTab] = useState11("details");
|
|
5411
|
+
const [panel, setPanel] = useState11("");
|
|
5412
|
+
const [notice, setNotice] = useState11("");
|
|
5413
|
+
const [reason, setReason] = useState11("");
|
|
5414
|
+
const [correctionError, setCorrectionError] = useState11("");
|
|
5415
|
+
const [newBillError, setNewBillError] = useState11("");
|
|
5416
|
+
const [payment, setPayment] = useState11({ amount: 0, penaltyAmount: 0, interestAmount: 0, method: "check", checkNumber: "", depositDate: today(), note: "" });
|
|
5417
|
+
const [review, setReview] = useState11({ reason: "", payerClaimControlNumber: "", disputedAmount: void 0, attachmentIds: [], route: "ebill" });
|
|
5418
|
+
const [duplicateDelivery, setDuplicateDelivery] = useState11(null);
|
|
5419
|
+
const [duplicateDeliveryError, setDuplicateDeliveryError] = useState11("");
|
|
5420
|
+
const actor = actorName?.trim() ? { actorName: actorName.trim() } : {};
|
|
5258
5421
|
const lastData = useRef5(null);
|
|
5259
5422
|
const correctionInitialBill = useMemo8(() => data ? correctionBill(data) : null, [data]);
|
|
5260
5423
|
const correctionAttachments = useMemo8(() => data ? data.bill.attachments.map((attachment) => {
|
|
@@ -5271,7 +5434,7 @@ function ConnectedBillLifecycle({ appearance, sandboxControls = false, className
|
|
|
5271
5434
|
};
|
|
5272
5435
|
}) : [], [data, lifecycle]);
|
|
5273
5436
|
const correctionAttentionFields = useMemo8(() => data?.rejection?.issues?.flatMap((issue) => issue.fieldPaths || []).filter((path, index, fields) => fields.indexOf(path) === index) || [], [data]);
|
|
5274
|
-
|
|
5437
|
+
useEffect9(() => {
|
|
5275
5438
|
if (!data || data === lastData.current) return;
|
|
5276
5439
|
lastData.current = data;
|
|
5277
5440
|
onChanged?.(data);
|
|
@@ -5288,13 +5451,13 @@ function ConnectedBillLifecycle({ appearance, sandboxControls = false, className
|
|
|
5288
5451
|
attachmentIds: current.attachmentIds.length ? current.attachmentIds.filter((id) => data.bill.attachments.some((document2) => document2.id === id)) : data.bill.attachments.map((document2) => document2.id)
|
|
5289
5452
|
}));
|
|
5290
5453
|
}, [data, onChanged]);
|
|
5291
|
-
if (lifecycle.isLoading && !data) return /* @__PURE__ */
|
|
5454
|
+
if (lifecycle.isLoading && !data) return /* @__PURE__ */ jsx14(Fragment11, { children: loadingFallback ?? /* @__PURE__ */ jsx14("div", { className: "mb-lifecycle-loading", children: "Loading bill\u2026" }) });
|
|
5292
5455
|
if (!data) {
|
|
5293
5456
|
const error = lifecycle.error ?? new Error("Bill could not be loaded.");
|
|
5294
|
-
return /* @__PURE__ */
|
|
5295
|
-
/* @__PURE__ */
|
|
5296
|
-
/* @__PURE__ */
|
|
5297
|
-
/* @__PURE__ */
|
|
5457
|
+
return /* @__PURE__ */ jsx14(Fragment11, { children: errorFallback?.(error, lifecycle.refresh) ?? /* @__PURE__ */ jsxs14("div", { className: "mb-lifecycle-error", role: "alert", children: [
|
|
5458
|
+
/* @__PURE__ */ jsx14("strong", { children: "Billing is unavailable." }),
|
|
5459
|
+
/* @__PURE__ */ jsx14("span", { children: error.message }),
|
|
5460
|
+
/* @__PURE__ */ jsx14("button", { type: "button", onClick: () => void lifecycle.refresh(), children: "Try again" })
|
|
5298
5461
|
] }) });
|
|
5299
5462
|
}
|
|
5300
5463
|
const complete = async (message, task) => {
|
|
@@ -5321,7 +5484,8 @@ function ConnectedBillLifecycle({ appearance, sandboxControls = false, className
|
|
|
5321
5484
|
await lifecycle.resubmitBill({
|
|
5322
5485
|
bill: value.bill,
|
|
5323
5486
|
...documents.length ? { documents } : {},
|
|
5324
|
-
...reason.trim() ? { reason: reason.trim() } : {}
|
|
5487
|
+
...reason.trim() ? { reason: reason.trim() } : {},
|
|
5488
|
+
...actor
|
|
5325
5489
|
});
|
|
5326
5490
|
} catch (cause) {
|
|
5327
5491
|
setCorrectionError(
|
|
@@ -5347,7 +5511,8 @@ function ConnectedBillLifecycle({ appearance, sandboxControls = false, className
|
|
|
5347
5511
|
await lifecycle.submitNewBill({
|
|
5348
5512
|
bill: value.bill,
|
|
5349
5513
|
...documents.length ? { documents } : {},
|
|
5350
|
-
...reason.trim() ? { reason: reason.trim() } : {}
|
|
5514
|
+
...reason.trim() ? { reason: reason.trim() } : {},
|
|
5515
|
+
...actor
|
|
5351
5516
|
});
|
|
5352
5517
|
} catch (cause) {
|
|
5353
5518
|
setNewBillError(
|
|
@@ -5373,46 +5538,46 @@ function ConnectedBillLifecycle({ appearance, sandboxControls = false, className
|
|
|
5373
5538
|
const statusContacts = reportBillStatusContacts(data.delivery);
|
|
5374
5539
|
const receiptEntries = (data.history ?? []).filter((entry) => entry.kind === "submission" || entry.kind === "ack");
|
|
5375
5540
|
const reviewDeadline = secondReviewDeadline(data.eors);
|
|
5376
|
-
return /* @__PURE__ */
|
|
5377
|
-
/* @__PURE__ */
|
|
5378
|
-
ribbonItems.length >= 2 ? /* @__PURE__ */
|
|
5379
|
-
data.lifecycle.state.toLowerCase() === "rejected" && data.rejection ? /* @__PURE__ */
|
|
5380
|
-
/* @__PURE__ */
|
|
5381
|
-
/* @__PURE__ */
|
|
5382
|
-
/* @__PURE__ */
|
|
5541
|
+
return /* @__PURE__ */ jsxs14("section", { className: ["mb-connected-lifecycle", className].filter(Boolean).join(" "), style: mindBillAppearanceStyle(appearance, style), children: [
|
|
5542
|
+
/* @__PURE__ */ jsx14("style", { children: CONNECTED_LIFECYCLE_STYLES }),
|
|
5543
|
+
ribbonItems.length >= 2 ? /* @__PURE__ */ jsx14(BillSubmissionsRibbon, { items: ribbonItems, onSelect: () => setTab("history"), ...appearance ? { appearance } : {} }) : null,
|
|
5544
|
+
data.lifecycle.state.toLowerCase() === "rejected" && data.rejection ? /* @__PURE__ */ jsx14(BillRejectionNotice, { rejection: data.rejection, submittedAt: data.lifecycle.submittedAt ?? null, ...appearance ? { appearance } : {} }) : /* @__PURE__ */ jsx14(BillLifecycleProgress, { state: data.lifecycle.state, nativeStatus: data.lifecycle.nativeStatus, submittedAt: data.lifecycle.submittedAt ?? null, agingDays: data.lifecycle.agingDays ?? null, ...appearance ? { appearance } : {} }),
|
|
5545
|
+
/* @__PURE__ */ jsxs14("header", { className: "mb-lifecycle-head", children: [
|
|
5546
|
+
/* @__PURE__ */ jsxs14("div", { children: [
|
|
5547
|
+
/* @__PURE__ */ jsx14("div", { className: "mb-lifecycle-title", children: /* @__PURE__ */ jsxs14("h2", { children: [
|
|
5383
5548
|
"Bill #",
|
|
5384
5549
|
data.bill.billNumber
|
|
5385
5550
|
] }) }),
|
|
5386
|
-
/* @__PURE__ */
|
|
5551
|
+
/* @__PURE__ */ jsxs14("p", { children: [
|
|
5387
5552
|
"Claim ",
|
|
5388
5553
|
data.injury.claimNumber || "\u2014",
|
|
5389
5554
|
lifecycle.isRefreshing ? " \xB7 Refreshing\u2026" : ""
|
|
5390
5555
|
] })
|
|
5391
5556
|
] }),
|
|
5392
|
-
/* @__PURE__ */
|
|
5557
|
+
/* @__PURE__ */ jsx14("button", { type: "button", className: "mb-lifecycle-button primary", disabled: lifecycle.isMutating, onClick: () => void lifecycle.downloadPacket().catch(() => void 0), children: "Download packet" })
|
|
5393
5558
|
] }),
|
|
5394
|
-
/* @__PURE__ */
|
|
5395
|
-
/* @__PURE__ */
|
|
5396
|
-
/* @__PURE__ */
|
|
5559
|
+
/* @__PURE__ */ jsxs14("div", { className: "mb-lifecycle-tabs", role: "tablist", "aria-label": "Bill view", children: [
|
|
5560
|
+
/* @__PURE__ */ jsx14("button", { type: "button", role: "tab", "aria-selected": tab === "details", onClick: () => setTab("details"), children: "Bill details" }),
|
|
5561
|
+
/* @__PURE__ */ jsx14("button", { type: "button", role: "tab", "aria-selected": tab === "history", onClick: () => setTab("history"), children: "Bill history" })
|
|
5397
5562
|
] }),
|
|
5398
|
-
tab === "details" ? /* @__PURE__ */
|
|
5399
|
-
data.eors.length || data.payments.length || ["processed", "denied", "partially_paid"].includes(data.lifecycle.state) ? /* @__PURE__ */
|
|
5400
|
-
showSandboxControls ? /* @__PURE__ */
|
|
5401
|
-
/* @__PURE__ */
|
|
5402
|
-
/* @__PURE__ */
|
|
5403
|
-
/* @__PURE__ */
|
|
5404
|
-
/* @__PURE__ */
|
|
5563
|
+
tab === "details" ? /* @__PURE__ */ jsxs14("div", { className: "mb-lifecycle-tabpanel", role: "tabpanel", children: [
|
|
5564
|
+
data.eors.length || data.payments.length || ["processed", "denied", "partially_paid"].includes(data.lifecycle.state) ? /* @__PURE__ */ jsx14(BillExplanationOfReview, { remittance: data.remittance, eors: data.eors, payments: data.payments, submittedAt: data.lifecycle.submittedAt ?? null, onOpenEor: lifecycle.openEor, ...appearance ? { appearance } : {} }) : null,
|
|
5565
|
+
showSandboxControls ? /* @__PURE__ */ jsxs14("section", { className: "mb-lifecycle-simulator", "aria-label": "Sandbox lifecycle simulator", children: [
|
|
5566
|
+
/* @__PURE__ */ jsxs14("div", { children: [
|
|
5567
|
+
/* @__PURE__ */ jsx14("span", { children: "Sandbox demo controls" }),
|
|
5568
|
+
/* @__PURE__ */ jsx14("h3", { children: "Simulate the next payer response" }),
|
|
5569
|
+
/* @__PURE__ */ jsx14("p", { children: "This changes sandbox data only. The host receives the result through the same lifecycle API and components partners use." })
|
|
5405
5570
|
] }),
|
|
5406
|
-
simulations.length ? /* @__PURE__ */
|
|
5407
|
-
/* @__PURE__ */
|
|
5408
|
-
/* @__PURE__ */
|
|
5409
|
-
] }, scenario.id)) }) : /* @__PURE__ */
|
|
5571
|
+
simulations.length ? /* @__PURE__ */ jsx14("div", { className: "mb-lifecycle-simulator-actions", children: simulations.map((scenario) => /* @__PURE__ */ jsxs14("button", { type: "button", disabled: lifecycle.isMutating, onClick: () => void complete(`${scenario.label} simulated.`, () => lifecycle.simulateSandbox({ scenario: scenario.id })), children: [
|
|
5572
|
+
/* @__PURE__ */ jsx14("strong", { children: scenario.label }),
|
|
5573
|
+
/* @__PURE__ */ jsx14("span", { children: scenario.detail })
|
|
5574
|
+
] }, scenario.id)) }) : /* @__PURE__ */ jsx14("p", { className: "mb-lifecycle-simulator-idle", children: "No simulated payer transition is needed at this stage. Use the bill action below to continue." })
|
|
5410
5575
|
] }) : null,
|
|
5411
|
-
/* @__PURE__ */
|
|
5412
|
-
] }) : /* @__PURE__ */
|
|
5413
|
-
viewEor || actions.length ? /* @__PURE__ */
|
|
5414
|
-
viewEor && data.eors[0] ? /* @__PURE__ */
|
|
5415
|
-
actions.map((action) => /* @__PURE__ */
|
|
5576
|
+
/* @__PURE__ */ jsx14(BillReadOnlyForm, { data, onOpenAttachment: lifecycle.openAttachment, ...appearance ? { appearance } : {} })
|
|
5577
|
+
] }) : /* @__PURE__ */ jsx14("div", { className: "mb-lifecycle-tabpanel", role: "tabpanel", children: data.history?.length ? /* @__PURE__ */ jsx14(BillHistoryTable, { entries: data.history, onOpenDocument: lifecycle.openAttachment, ...appearance ? { appearance } : {} }) : /* @__PURE__ */ jsx14(BillActivityTimeline, { events: data.activity, ...appearance ? { appearance } : {} }) }),
|
|
5578
|
+
viewEor || actions.length ? /* @__PURE__ */ jsxs14("aside", { className: "mb-lifecycle-actions-sheet", "aria-label": "Bill actions", children: [
|
|
5579
|
+
viewEor && data.eors[0] ? /* @__PURE__ */ jsx14("button", { type: "button", className: "mb-lifecycle-button secondary", onClick: () => void lifecycle.openEor(data.eors[0]).catch(() => void 0), children: viewEor.label }) : null,
|
|
5580
|
+
actions.map((action) => /* @__PURE__ */ jsx14("button", { type: "button", className: action.primary ? "mb-lifecycle-button primary" : "mb-lifecycle-button secondary", onClick: () => {
|
|
5416
5581
|
const next = actionPanel(action);
|
|
5417
5582
|
if (!next) return;
|
|
5418
5583
|
if (next === "resubmit") setCorrectionError("");
|
|
@@ -5422,24 +5587,24 @@ function ConnectedBillLifecycle({ appearance, sandboxControls = false, className
|
|
|
5422
5587
|
setPanel(next);
|
|
5423
5588
|
}, children: action.label }, action.id))
|
|
5424
5589
|
] }) : null,
|
|
5425
|
-
panel === "resubmit" && correctionInitialBill ? /* @__PURE__ */
|
|
5426
|
-
/* @__PURE__ */
|
|
5427
|
-
/* @__PURE__ */
|
|
5428
|
-
/* @__PURE__ */
|
|
5429
|
-
/* @__PURE__ */
|
|
5590
|
+
panel === "resubmit" && correctionInitialBill ? /* @__PURE__ */ jsx14(LifecycleDialog, { title: "Correct and resubmit", wide: true, onClose: () => setPanel(""), children: /* @__PURE__ */ jsxs14("section", { className: "mb-lifecycle-correction", children: [
|
|
5591
|
+
/* @__PURE__ */ jsxs14("header", { children: [
|
|
5592
|
+
/* @__PURE__ */ jsxs14("div", { children: [
|
|
5593
|
+
/* @__PURE__ */ jsx14("h3", { children: "Correct and resubmit" }),
|
|
5594
|
+
/* @__PURE__ */ jsx14("p", { children: "Review the rejected snapshot, correct the highlighted information, and submit a new immutable attempt under this bill." })
|
|
5430
5595
|
] }),
|
|
5431
|
-
/* @__PURE__ */
|
|
5596
|
+
/* @__PURE__ */ jsx14("button", { type: "button", className: "mb-lifecycle-button secondary", onClick: () => setPanel(""), children: "Cancel" })
|
|
5432
5597
|
] }),
|
|
5433
|
-
data.rejection ? /* @__PURE__ */
|
|
5434
|
-
/* @__PURE__ */
|
|
5435
|
-
data.rejection.issues?.map((issue, index) => /* @__PURE__ */
|
|
5598
|
+
data.rejection ? /* @__PURE__ */ jsxs14("div", { className: "mb-lifecycle-correction-reason", children: [
|
|
5599
|
+
/* @__PURE__ */ jsx14("strong", { children: data.rejection.reason }),
|
|
5600
|
+
data.rejection.issues?.map((issue, index) => /* @__PURE__ */ jsxs14("span", { children: [
|
|
5436
5601
|
issue.code ? `${issue.code}: ` : "",
|
|
5437
5602
|
issue.description
|
|
5438
5603
|
] }, `${issue.code || "issue"}-${index}`))
|
|
5439
5604
|
] }) : null,
|
|
5440
|
-
data.delivery.contacts.adjusterPhone || data.delivery.contacts.claimsEmail ? /* @__PURE__ */
|
|
5441
|
-
/* @__PURE__ */
|
|
5442
|
-
/* @__PURE__ */
|
|
5605
|
+
data.delivery.contacts.adjusterPhone || data.delivery.contacts.claimsEmail ? /* @__PURE__ */ jsxs14("aside", { className: "mb-lifecycle-correction-contact", children: [
|
|
5606
|
+
/* @__PURE__ */ jsx14("strong", { children: "Need to verify the rejected information?" }),
|
|
5607
|
+
/* @__PURE__ */ jsxs14("span", { children: [
|
|
5443
5608
|
"Contact ",
|
|
5444
5609
|
data.delivery.payerName,
|
|
5445
5610
|
data.delivery.contacts.adjusterPhone ? ` at ${data.delivery.contacts.adjusterPhone}` : "",
|
|
@@ -5447,17 +5612,19 @@ function ConnectedBillLifecycle({ appearance, sandboxControls = false, className
|
|
|
5447
5612
|
"."
|
|
5448
5613
|
] })
|
|
5449
5614
|
] }) : null,
|
|
5450
|
-
/* @__PURE__ */
|
|
5451
|
-
/* @__PURE__ */
|
|
5452
|
-
/* @__PURE__ */
|
|
5615
|
+
/* @__PURE__ */ jsxs14("label", { className: "mb-lifecycle-correction-note", children: [
|
|
5616
|
+
/* @__PURE__ */ jsx14("span", { children: "Correction note (optional)" }),
|
|
5617
|
+
/* @__PURE__ */ jsx14("textarea", { value: reason, placeholder: "What changed before resubmission?", onChange: (event) => setReason(event.target.value) })
|
|
5453
5618
|
] }),
|
|
5454
|
-
/* @__PURE__ */
|
|
5619
|
+
/* @__PURE__ */ jsx14(
|
|
5455
5620
|
BillSubmissionForm,
|
|
5456
5621
|
{
|
|
5457
5622
|
initialBill: correctionInitialBill,
|
|
5458
5623
|
attachments: correctionAttachments,
|
|
5459
5624
|
onSubmit: submitCorrection,
|
|
5460
5625
|
onSearchClaimsAdministrators: lifecycle.searchClaimsAdministrators,
|
|
5626
|
+
onGetClaimsAdministratorDirectory: lifecycle.getClaimsAdministratorDirectory,
|
|
5627
|
+
claimsAdministratorHint,
|
|
5461
5628
|
attentionFields: correctionAttentionFields,
|
|
5462
5629
|
attentionMessage: correctionAttentionFields.length ? "The rejected response points to the highlighted fields. Confirm every required value before resubmitting." : "Confirm the bill information below before resubmitting.",
|
|
5463
5630
|
submitLabel: lifecycle.isMutating ? "Resubmitting\u2026" : "Resubmit bill",
|
|
@@ -5471,27 +5638,29 @@ function ConnectedBillLifecycle({ appearance, sandboxControls = false, className
|
|
|
5471
5638
|
...appearance ? { appearance } : {}
|
|
5472
5639
|
}
|
|
5473
5640
|
),
|
|
5474
|
-
correctionError ? /* @__PURE__ */
|
|
5641
|
+
correctionError ? /* @__PURE__ */ jsx14("div", { className: "mb-lifecycle-message error", role: "alert", children: correctionError }) : null
|
|
5475
5642
|
] }) }) : null,
|
|
5476
|
-
panel === "submit_new_bill" && correctionInitialBill ? /* @__PURE__ */
|
|
5477
|
-
/* @__PURE__ */
|
|
5478
|
-
/* @__PURE__ */
|
|
5479
|
-
/* @__PURE__ */
|
|
5480
|
-
/* @__PURE__ */
|
|
5643
|
+
panel === "submit_new_bill" && correctionInitialBill ? /* @__PURE__ */ jsx14(LifecycleDialog, { title: "Submit New Bill", wide: true, onClose: () => setPanel(""), children: /* @__PURE__ */ jsxs14("section", { className: "mb-lifecycle-correction", children: [
|
|
5644
|
+
/* @__PURE__ */ jsxs14("header", { children: [
|
|
5645
|
+
/* @__PURE__ */ jsxs14("div", { children: [
|
|
5646
|
+
/* @__PURE__ */ jsx14("h3", { children: "Submit New Bill" }),
|
|
5647
|
+
/* @__PURE__ */ jsx14("p", { children: "This closed bill stays closed and keeps its record. Review the carried-over snapshot below and submit a fresh bill \u2014 both bills stay linked in the submissions timeline." })
|
|
5481
5648
|
] }),
|
|
5482
|
-
/* @__PURE__ */
|
|
5649
|
+
/* @__PURE__ */ jsx14("button", { type: "button", className: "mb-lifecycle-button secondary", onClick: () => setPanel(""), children: "Cancel" })
|
|
5483
5650
|
] }),
|
|
5484
|
-
/* @__PURE__ */
|
|
5485
|
-
/* @__PURE__ */
|
|
5486
|
-
/* @__PURE__ */
|
|
5651
|
+
/* @__PURE__ */ jsxs14("label", { className: "mb-lifecycle-correction-note", children: [
|
|
5652
|
+
/* @__PURE__ */ jsx14("span", { children: "Submission note (optional)" }),
|
|
5653
|
+
/* @__PURE__ */ jsx14("textarea", { value: reason, placeholder: "Why is a new bill being submitted?", onChange: (event) => setReason(event.target.value) })
|
|
5487
5654
|
] }),
|
|
5488
|
-
/* @__PURE__ */
|
|
5655
|
+
/* @__PURE__ */ jsx14(
|
|
5489
5656
|
BillSubmissionForm,
|
|
5490
5657
|
{
|
|
5491
5658
|
initialBill: correctionInitialBill,
|
|
5492
5659
|
attachments: correctionAttachments,
|
|
5493
5660
|
onSubmit: submitNewBillFromForm,
|
|
5494
5661
|
onSearchClaimsAdministrators: lifecycle.searchClaimsAdministrators,
|
|
5662
|
+
onGetClaimsAdministratorDirectory: lifecycle.getClaimsAdministratorDirectory,
|
|
5663
|
+
claimsAdministratorHint,
|
|
5495
5664
|
attentionMessage: "Confirm every value carried over from the closed bill before submitting the new bill.",
|
|
5496
5665
|
submitLabel: lifecycle.isMutating ? "Submitting\u2026" : "Submit New Bill",
|
|
5497
5666
|
heading: "New bill information",
|
|
@@ -5504,121 +5673,121 @@ function ConnectedBillLifecycle({ appearance, sandboxControls = false, className
|
|
|
5504
5673
|
...appearance ? { appearance } : {}
|
|
5505
5674
|
}
|
|
5506
5675
|
),
|
|
5507
|
-
newBillError ? /* @__PURE__ */
|
|
5676
|
+
newBillError ? /* @__PURE__ */ jsx14("div", { className: "mb-lifecycle-message error", role: "alert", children: newBillError }) : null
|
|
5508
5677
|
] }) }) : null,
|
|
5509
|
-
panel === "second_review" ? /* @__PURE__ */
|
|
5510
|
-
/* @__PURE__ */
|
|
5511
|
-
/* @__PURE__ */
|
|
5512
|
-
/* @__PURE__ */
|
|
5678
|
+
panel === "second_review" ? /* @__PURE__ */ jsx14(LifecycleDialog, { title: "Submit Second Review", onClose: () => setPanel(""), children: /* @__PURE__ */ jsxs14("section", { className: "mb-lifecycle-panel", children: [
|
|
5679
|
+
/* @__PURE__ */ jsxs14("div", { children: [
|
|
5680
|
+
/* @__PURE__ */ jsx14("h3", { children: "Submit Second Review" }),
|
|
5681
|
+
/* @__PURE__ */ jsx14("p", { children: "Explain the dispute and include the payer control number and supporting documents." })
|
|
5513
5682
|
] }),
|
|
5514
|
-
reviewDeadline ? /* @__PURE__ */
|
|
5683
|
+
reviewDeadline ? /* @__PURE__ */ jsxs14("p", { className: "mb-lifecycle-deadline-hint", children: [
|
|
5515
5684
|
"Second Review must be requested within 90 days of the denial EOR (dated ",
|
|
5516
5685
|
usDate(reviewDeadline.eorDate),
|
|
5517
5686
|
") \u2014 file by ",
|
|
5518
|
-
/* @__PURE__ */
|
|
5687
|
+
/* @__PURE__ */ jsx14("strong", { children: usDate(reviewDeadline.deadline) }),
|
|
5519
5688
|
"."
|
|
5520
5689
|
] }) : null,
|
|
5521
|
-
/* @__PURE__ */
|
|
5522
|
-
/* @__PURE__ */
|
|
5523
|
-
/* @__PURE__ */
|
|
5524
|
-
/* @__PURE__ */
|
|
5690
|
+
/* @__PURE__ */ jsxs14("div", { className: "mb-lifecycle-fields two", children: [
|
|
5691
|
+
/* @__PURE__ */ jsxs14("label", { className: "full", children: [
|
|
5692
|
+
/* @__PURE__ */ jsx14("span", { children: "Reason" }),
|
|
5693
|
+
/* @__PURE__ */ jsx14("textarea", { required: true, value: review.reason, onChange: (event) => setReview((current) => ({ ...current, reason: event.target.value })) })
|
|
5525
5694
|
] }),
|
|
5526
|
-
/* @__PURE__ */
|
|
5527
|
-
/* @__PURE__ */
|
|
5528
|
-
/* @__PURE__ */
|
|
5695
|
+
/* @__PURE__ */ jsxs14("label", { children: [
|
|
5696
|
+
/* @__PURE__ */ jsx14("span", { children: "Payer claim control number" }),
|
|
5697
|
+
/* @__PURE__ */ jsx14("input", { required: true, value: review.payerClaimControlNumber, onChange: (event) => setReview((current) => ({ ...current, payerClaimControlNumber: event.target.value })) })
|
|
5529
5698
|
] }),
|
|
5530
|
-
/* @__PURE__ */
|
|
5531
|
-
/* @__PURE__ */
|
|
5532
|
-
/* @__PURE__ */
|
|
5699
|
+
/* @__PURE__ */ jsxs14("label", { children: [
|
|
5700
|
+
/* @__PURE__ */ jsx14("span", { children: "Disputed amount" }),
|
|
5701
|
+
/* @__PURE__ */ jsx14("input", { type: "number", min: "0.01", step: "0.01", value: review.disputedAmount ?? "", onChange: (event) => setReview((current) => ({ ...current, disputedAmount: event.target.value ? Number(event.target.value) : void 0 })) })
|
|
5533
5702
|
] }),
|
|
5534
|
-
/* @__PURE__ */
|
|
5535
|
-
/* @__PURE__ */
|
|
5536
|
-
/* @__PURE__ */
|
|
5537
|
-
/* @__PURE__ */
|
|
5538
|
-
/* @__PURE__ */
|
|
5539
|
-
/* @__PURE__ */
|
|
5540
|
-
/* @__PURE__ */
|
|
5703
|
+
/* @__PURE__ */ jsxs14("label", { children: [
|
|
5704
|
+
/* @__PURE__ */ jsx14("span", { children: "Send via" }),
|
|
5705
|
+
/* @__PURE__ */ jsxs14("select", { value: review.route, onChange: (event) => setReview((current) => ({ ...current, route: event.target.value })), children: [
|
|
5706
|
+
/* @__PURE__ */ jsx14("option", { value: "ebill", children: "E-bill" }),
|
|
5707
|
+
/* @__PURE__ */ jsx14("option", { value: "fax", children: "Fax" }),
|
|
5708
|
+
/* @__PURE__ */ jsx14("option", { value: "mail", children: "Mail" }),
|
|
5709
|
+
/* @__PURE__ */ jsx14("option", { value: "email", children: "Email" })
|
|
5541
5710
|
] })
|
|
5542
5711
|
] })
|
|
5543
5712
|
] }),
|
|
5544
|
-
/* @__PURE__ */
|
|
5545
|
-
/* @__PURE__ */
|
|
5546
|
-
data.bill.attachments.map((attachment) => /* @__PURE__ */
|
|
5547
|
-
/* @__PURE__ */
|
|
5548
|
-
/* @__PURE__ */
|
|
5549
|
-
/* @__PURE__ */
|
|
5550
|
-
/* @__PURE__ */
|
|
5713
|
+
/* @__PURE__ */ jsxs14("fieldset", { className: "mb-lifecycle-packet", children: [
|
|
5714
|
+
/* @__PURE__ */ jsx14("legend", { children: "Supporting packet" }),
|
|
5715
|
+
data.bill.attachments.map((attachment) => /* @__PURE__ */ jsxs14("label", { children: [
|
|
5716
|
+
/* @__PURE__ */ jsx14("input", { type: "checkbox", checked: review.attachmentIds.includes(attachment.id), onChange: (event) => setReview((current) => ({ ...current, attachmentIds: event.target.checked ? [...current.attachmentIds, attachment.id] : current.attachmentIds.filter((id) => id !== attachment.id) })) }),
|
|
5717
|
+
/* @__PURE__ */ jsxs14("span", { children: [
|
|
5718
|
+
/* @__PURE__ */ jsx14("strong", { children: attachment.filename }),
|
|
5719
|
+
/* @__PURE__ */ jsx14("small", { children: attachment.description || attachment.documentType })
|
|
5551
5720
|
] }),
|
|
5552
|
-
/* @__PURE__ */
|
|
5721
|
+
/* @__PURE__ */ jsx14("button", { type: "button", onClick: () => void lifecycle.openAttachment(attachment).catch(() => void 0), children: "View" })
|
|
5553
5722
|
] }, attachment.id))
|
|
5554
5723
|
] }),
|
|
5555
|
-
/* @__PURE__ */
|
|
5556
|
-
/* @__PURE__ */
|
|
5557
|
-
/* @__PURE__ */
|
|
5724
|
+
/* @__PURE__ */ jsxs14("div", { className: "mb-lifecycle-panel-actions", children: [
|
|
5725
|
+
/* @__PURE__ */ jsx14("button", { type: "button", className: "mb-lifecycle-button secondary", onClick: () => setPanel(""), children: "Cancel" }),
|
|
5726
|
+
/* @__PURE__ */ jsx14("button", { type: "button", className: "mb-lifecycle-button primary", disabled: lifecycle.isMutating || !review.reason.trim() || !review.payerClaimControlNumber.trim(), onClick: () => void complete("Second Review submitted.", () => lifecycle.submitSecondReview({ ...review, ...actor })), children: lifecycle.isMutating ? "Submitting\u2026" : "Submit Second Review" })
|
|
5558
5727
|
] })
|
|
5559
5728
|
] }) }) : null,
|
|
5560
|
-
panel === "payment" ? /* @__PURE__ */
|
|
5561
|
-
/* @__PURE__ */
|
|
5562
|
-
/* @__PURE__ */
|
|
5563
|
-
/* @__PURE__ */
|
|
5729
|
+
panel === "payment" ? /* @__PURE__ */ jsx14(LifecycleDialog, { title: "Post payment", onClose: () => setPanel(""), children: /* @__PURE__ */ jsxs14("section", { className: "mb-lifecycle-panel", children: [
|
|
5730
|
+
/* @__PURE__ */ jsxs14("div", { children: [
|
|
5731
|
+
/* @__PURE__ */ jsx14("h3", { children: "Post payment" }),
|
|
5732
|
+
/* @__PURE__ */ jsx14("p", { children: "Record a full or partial payment, plus any penalty and interest received." })
|
|
5564
5733
|
] }),
|
|
5565
|
-
/* @__PURE__ */
|
|
5566
|
-
/* @__PURE__ */
|
|
5567
|
-
/* @__PURE__ */
|
|
5568
|
-
/* @__PURE__ */
|
|
5734
|
+
/* @__PURE__ */ jsxs14("div", { className: "mb-lifecycle-fields two", children: [
|
|
5735
|
+
/* @__PURE__ */ jsxs14("label", { children: [
|
|
5736
|
+
/* @__PURE__ */ jsx14("span", { children: "Amount applied to bill" }),
|
|
5737
|
+
/* @__PURE__ */ jsx14("input", { type: "number", min: "0.01", max: data.bill.balanceDue, step: "0.01", value: payment.amount || "", onChange: (event) => setPayment((current) => ({ ...current, amount: Number(event.target.value) })) })
|
|
5569
5738
|
] }),
|
|
5570
|
-
/* @__PURE__ */
|
|
5571
|
-
/* @__PURE__ */
|
|
5572
|
-
/* @__PURE__ */
|
|
5739
|
+
/* @__PURE__ */ jsxs14("label", { children: [
|
|
5740
|
+
/* @__PURE__ */ jsx14("span", { children: "Penalty" }),
|
|
5741
|
+
/* @__PURE__ */ jsx14("input", { type: "number", min: "0", step: "0.01", value: payment.penaltyAmount || "", placeholder: "0.00", onChange: (event) => setPayment((current) => ({ ...current, penaltyAmount: Number(event.target.value) })) })
|
|
5573
5742
|
] }),
|
|
5574
|
-
/* @__PURE__ */
|
|
5575
|
-
/* @__PURE__ */
|
|
5576
|
-
/* @__PURE__ */
|
|
5743
|
+
/* @__PURE__ */ jsxs14("label", { children: [
|
|
5744
|
+
/* @__PURE__ */ jsx14("span", { children: "Interest" }),
|
|
5745
|
+
/* @__PURE__ */ jsx14("input", { type: "number", min: "0", step: "0.01", value: payment.interestAmount || "", placeholder: "0.00", onChange: (event) => setPayment((current) => ({ ...current, interestAmount: Number(event.target.value) })) })
|
|
5577
5746
|
] }),
|
|
5578
|
-
/* @__PURE__ */
|
|
5579
|
-
/* @__PURE__ */
|
|
5580
|
-
/* @__PURE__ */
|
|
5581
|
-
/* @__PURE__ */
|
|
5582
|
-
/* @__PURE__ */
|
|
5747
|
+
/* @__PURE__ */ jsxs14("label", { children: [
|
|
5748
|
+
/* @__PURE__ */ jsx14("span", { children: "Method" }),
|
|
5749
|
+
/* @__PURE__ */ jsxs14("select", { value: payment.method, onChange: (event) => setPayment((current) => ({ ...current, method: event.target.value })), children: [
|
|
5750
|
+
/* @__PURE__ */ jsx14("option", { value: "check", children: "Check" }),
|
|
5751
|
+
/* @__PURE__ */ jsx14("option", { value: "eft", children: "EFT" })
|
|
5583
5752
|
] })
|
|
5584
5753
|
] }),
|
|
5585
|
-
/* @__PURE__ */
|
|
5586
|
-
/* @__PURE__ */
|
|
5587
|
-
/* @__PURE__ */
|
|
5754
|
+
/* @__PURE__ */ jsxs14("label", { children: [
|
|
5755
|
+
/* @__PURE__ */ jsx14("span", { children: payment.method === "check" ? "Check number" : "EFT reference" }),
|
|
5756
|
+
/* @__PURE__ */ jsx14("input", { value: payment.checkNumber, onChange: (event) => setPayment((current) => ({ ...current, checkNumber: event.target.value })) })
|
|
5588
5757
|
] }),
|
|
5589
|
-
/* @__PURE__ */
|
|
5590
|
-
/* @__PURE__ */
|
|
5591
|
-
/* @__PURE__ */
|
|
5758
|
+
/* @__PURE__ */ jsxs14("label", { children: [
|
|
5759
|
+
/* @__PURE__ */ jsx14("span", { children: "Deposit date" }),
|
|
5760
|
+
/* @__PURE__ */ jsx14("input", { required: true, value: payment.depositDate, placeholder: "MM/DD/YYYY", onChange: (event) => setPayment((current) => ({ ...current, depositDate: event.target.value })) })
|
|
5592
5761
|
] }),
|
|
5593
|
-
/* @__PURE__ */
|
|
5594
|
-
/* @__PURE__ */
|
|
5595
|
-
/* @__PURE__ */
|
|
5762
|
+
/* @__PURE__ */ jsxs14("label", { className: "full", children: [
|
|
5763
|
+
/* @__PURE__ */ jsx14("span", { children: "Note (optional)" }),
|
|
5764
|
+
/* @__PURE__ */ jsx14("input", { value: payment.note, onChange: (event) => setPayment((current) => ({ ...current, note: event.target.value })) })
|
|
5596
5765
|
] })
|
|
5597
5766
|
] }),
|
|
5598
|
-
/* @__PURE__ */
|
|
5599
|
-
/* @__PURE__ */
|
|
5600
|
-
/* @__PURE__ */
|
|
5767
|
+
/* @__PURE__ */ jsxs14("div", { className: "mb-payment-total", children: [
|
|
5768
|
+
/* @__PURE__ */ jsx14("span", { children: "Total received" }),
|
|
5769
|
+
/* @__PURE__ */ jsx14("strong", { children: new Intl.NumberFormat(void 0, { style: "currency", currency: "USD" }).format(payment.amount + (payment.penaltyAmount ?? 0) + (payment.interestAmount ?? 0)) })
|
|
5601
5770
|
] }),
|
|
5602
|
-
/* @__PURE__ */
|
|
5603
|
-
/* @__PURE__ */
|
|
5604
|
-
/* @__PURE__ */
|
|
5771
|
+
/* @__PURE__ */ jsxs14("div", { className: "mb-lifecycle-panel-actions", children: [
|
|
5772
|
+
/* @__PURE__ */ jsx14("button", { type: "button", className: "mb-lifecycle-button secondary", onClick: () => setPanel(""), children: "Cancel" }),
|
|
5773
|
+
/* @__PURE__ */ jsx14("button", { type: "button", className: "mb-lifecycle-button primary", disabled: lifecycle.isMutating || payment.amount <= 0 || payment.amount > data.bill.balanceDue || (payment.penaltyAmount ?? 0) < 0 || (payment.interestAmount ?? 0) < 0 || !payment.depositDate, onClick: () => void complete("Payment posted.", () => lifecycle.postPayment({ ...payment, ...actor })), children: lifecycle.isMutating ? "Posting\u2026" : "Post payment" })
|
|
5605
5774
|
] })
|
|
5606
5775
|
] }) }) : null,
|
|
5607
|
-
panel === "close" || panel === "reopen" ? /* @__PURE__ */
|
|
5608
|
-
/* @__PURE__ */
|
|
5609
|
-
/* @__PURE__ */
|
|
5610
|
-
/* @__PURE__ */
|
|
5776
|
+
panel === "close" || panel === "reopen" ? /* @__PURE__ */ jsx14(LifecycleDialog, { title: panel === "close" ? "Close bill" : "Reopen bill", onClose: () => setPanel(""), children: /* @__PURE__ */ jsxs14("section", { className: "mb-lifecycle-panel", children: [
|
|
5777
|
+
/* @__PURE__ */ jsxs14("div", { children: [
|
|
5778
|
+
/* @__PURE__ */ jsx14("h3", { children: panel === "close" ? "Close bill" : "Reopen bill" }),
|
|
5779
|
+
/* @__PURE__ */ jsx14("p", { children: panel === "close" ? "The immutable submission and history remain available." : "Return this bill to active follow-up without changing the submitted snapshot." })
|
|
5611
5780
|
] }),
|
|
5612
|
-
/* @__PURE__ */
|
|
5613
|
-
/* @__PURE__ */
|
|
5614
|
-
/* @__PURE__ */
|
|
5781
|
+
/* @__PURE__ */ jsxs14("label", { children: [
|
|
5782
|
+
/* @__PURE__ */ jsx14("span", { children: "Reason" }),
|
|
5783
|
+
/* @__PURE__ */ jsx14("textarea", { required: true, value: reason, onChange: (event) => setReason(event.target.value) })
|
|
5615
5784
|
] }),
|
|
5616
|
-
/* @__PURE__ */
|
|
5617
|
-
/* @__PURE__ */
|
|
5618
|
-
/* @__PURE__ */
|
|
5785
|
+
/* @__PURE__ */ jsxs14("div", { className: "mb-lifecycle-panel-actions", children: [
|
|
5786
|
+
/* @__PURE__ */ jsx14("button", { type: "button", className: "mb-lifecycle-button secondary", onClick: () => setPanel(""), children: "Cancel" }),
|
|
5787
|
+
/* @__PURE__ */ jsx14("button", { type: "button", className: "mb-lifecycle-button primary", disabled: lifecycle.isMutating || !reason.trim(), onClick: () => void complete(panel === "close" ? "Bill closed." : "Bill reopened.", () => panel === "close" ? lifecycle.closeBill({ reason, ...actor }) : lifecycle.reopenBill({ reason, ...actor })), children: lifecycle.isMutating ? "Saving\u2026" : panel === "close" ? "Close bill" : "Reopen bill" })
|
|
5619
5788
|
] })
|
|
5620
5789
|
] }) }) : null,
|
|
5621
|
-
panel === "send_duplicate" ? duplicateDelivery ? /* @__PURE__ */
|
|
5790
|
+
panel === "send_duplicate" ? duplicateDelivery ? /* @__PURE__ */ jsx14(
|
|
5622
5791
|
SendRouteDialog,
|
|
5623
5792
|
{
|
|
5624
5793
|
title: "Send duplicate bill",
|
|
@@ -5626,33 +5795,33 @@ function ConnectedBillLifecycle({ appearance, sandboxControls = false, className
|
|
|
5626
5795
|
submitting: lifecycle.isMutating,
|
|
5627
5796
|
error: lifecycle.error?.message ?? null,
|
|
5628
5797
|
onCancel: () => setPanel(""),
|
|
5629
|
-
onConfirm: (submission) => void complete("Duplicate bill sent.", () => lifecycle.sendDuplicateBill(submission))
|
|
5798
|
+
onConfirm: (submission) => void complete("Duplicate bill sent.", () => lifecycle.sendDuplicateBill({ ...submission, ...actor }))
|
|
5630
5799
|
}
|
|
5631
|
-
) : /* @__PURE__ */
|
|
5632
|
-
/* @__PURE__ */
|
|
5633
|
-
/* @__PURE__ */
|
|
5634
|
-
/* @__PURE__ */
|
|
5800
|
+
) : /* @__PURE__ */ jsx14(LifecycleDialog, { title: "Send duplicate bill", onClose: () => setPanel(""), children: /* @__PURE__ */ jsxs14("section", { className: "mb-lifecycle-panel", children: [
|
|
5801
|
+
/* @__PURE__ */ jsxs14("div", { children: [
|
|
5802
|
+
/* @__PURE__ */ jsx14("h3", { children: "Send duplicate bill" }),
|
|
5803
|
+
/* @__PURE__ */ jsx14("p", { children: duplicateDeliveryError || "Loading delivery options\u2026" })
|
|
5635
5804
|
] }),
|
|
5636
|
-
/* @__PURE__ */
|
|
5637
|
-
/* @__PURE__ */
|
|
5638
|
-
duplicateDeliveryError ? /* @__PURE__ */
|
|
5805
|
+
/* @__PURE__ */ jsxs14("div", { className: "mb-lifecycle-panel-actions", children: [
|
|
5806
|
+
/* @__PURE__ */ jsx14("button", { type: "button", className: "mb-lifecycle-button secondary", onClick: () => setPanel(""), children: "Cancel" }),
|
|
5807
|
+
duplicateDeliveryError ? /* @__PURE__ */ jsx14("button", { type: "button", className: "mb-lifecycle-button primary", onClick: loadDuplicateDelivery, children: "Try again" }) : null
|
|
5639
5808
|
] })
|
|
5640
5809
|
] }) }) : null,
|
|
5641
|
-
panel === "report_status" ? /* @__PURE__ */
|
|
5810
|
+
panel === "report_status" ? /* @__PURE__ */ jsx14(
|
|
5642
5811
|
ReportBillStatusDialog,
|
|
5643
5812
|
{
|
|
5644
5813
|
...statusContacts.claimsAdmin ? { claimsAdmin: statusContacts.claimsAdmin } : {},
|
|
5645
5814
|
...statusContacts.billReview ? { billReview: statusContacts.billReview } : {},
|
|
5646
|
-
...receiptEntries.length ? { receipt: /* @__PURE__ */
|
|
5815
|
+
...receiptEntries.length ? { receipt: /* @__PURE__ */ jsx14(BillHistoryTable, { entries: receiptEntries, onOpenDocument: lifecycle.openAttachment, ...appearance ? { appearance } : {} }) } : {},
|
|
5647
5816
|
submitting: lifecycle.isMutating,
|
|
5648
5817
|
error: lifecycle.error?.message ?? null,
|
|
5649
5818
|
onCancel: () => setPanel(""),
|
|
5650
|
-
onSave: (input) => void complete("Bill status reported.", () => lifecycle.reportBillStatus(input)),
|
|
5819
|
+
onSave: (input) => void complete("Bill status reported.", () => lifecycle.reportBillStatus({ ...input, ...actor })),
|
|
5651
5820
|
...appearance ? { appearance } : {}
|
|
5652
5821
|
}
|
|
5653
5822
|
) : null,
|
|
5654
|
-
notice ? /* @__PURE__ */
|
|
5655
|
-
lifecycle.error ? /* @__PURE__ */
|
|
5823
|
+
notice ? /* @__PURE__ */ jsx14("div", { className: "mb-lifecycle-message success", role: "status", children: notice }) : null,
|
|
5824
|
+
lifecycle.error ? /* @__PURE__ */ jsx14("div", { className: "mb-lifecycle-message error", role: "alert", children: lifecycle.error.message }) : null
|
|
5656
5825
|
] });
|
|
5657
5826
|
}
|
|
5658
5827
|
var CONNECTED_LIFECYCLE_STYLES = `
|
|
@@ -5668,7 +5837,7 @@ var CONNECTED_LIFECYCLE_STYLES = `
|
|
|
5668
5837
|
function widget(tagName, props) {
|
|
5669
5838
|
const ref = useRef6(null);
|
|
5670
5839
|
const { onMindBill, onMindBillError } = props;
|
|
5671
|
-
|
|
5840
|
+
useEffect10(() => {
|
|
5672
5841
|
const element = ref.current;
|
|
5673
5842
|
if (!element) return;
|
|
5674
5843
|
const handleEvent = (event) => onMindBill?.(event);
|
|
@@ -5740,6 +5909,7 @@ export {
|
|
|
5740
5909
|
BillingDashboard,
|
|
5741
5910
|
BillingReport,
|
|
5742
5911
|
BillingSettings,
|
|
5912
|
+
ClaimsAdministratorDirectoryDialog,
|
|
5743
5913
|
ConnectedBillLifecycle,
|
|
5744
5914
|
ConnectedBillStatus,
|
|
5745
5915
|
DEFAULT_BILL_SUBMISSION_MODIFIERS,
|
|
@@ -5782,6 +5952,7 @@ export {
|
|
|
5782
5952
|
extractSendRouteEmail,
|
|
5783
5953
|
formatBillSubmissionDate,
|
|
5784
5954
|
formatSendRouteFax,
|
|
5955
|
+
isBillLifecycleDraft,
|
|
5785
5956
|
mindBillAppearanceStyle,
|
|
5786
5957
|
mindBillThemePresets,
|
|
5787
5958
|
normalizeClaimsAdministratorName,
|