@mindbill/react 0.27.1 → 0.28.1
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/README.md +8 -3
- package/dist/index.d.ts +22 -4
- package/dist/index.js +251 -77
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1060,8 +1060,75 @@ function Value({ label, children, wide = false }) {
|
|
|
1060
1060
|
/* @__PURE__ */ jsx2("dd", { children: children || "\u2014" })
|
|
1061
1061
|
] });
|
|
1062
1062
|
}
|
|
1063
|
+
var PAYER_TABS = [
|
|
1064
|
+
["main", "Main"],
|
|
1065
|
+
["bill-review", "Bill Review"],
|
|
1066
|
+
["authorization", "Authorization Info"],
|
|
1067
|
+
["mailing", "Mailing Address"],
|
|
1068
|
+
["patterns", "Claim Number Pattern"]
|
|
1069
|
+
];
|
|
1070
|
+
function DirectoryEmpty({ children }) {
|
|
1071
|
+
return /* @__PURE__ */ jsx2("p", { className: "mb-read-directory-empty", children });
|
|
1072
|
+
}
|
|
1073
|
+
function ContactTable({ contacts, empty }) {
|
|
1074
|
+
if (!contacts.length) return /* @__PURE__ */ jsx2(DirectoryEmpty, { children: empty });
|
|
1075
|
+
return /* @__PURE__ */ jsx2("div", { className: "mb-read-directory-table-wrap", children: /* @__PURE__ */ jsxs2("table", { className: "mb-read-directory-table", children: [
|
|
1076
|
+
/* @__PURE__ */ jsx2("thead", { children: /* @__PURE__ */ jsxs2("tr", { children: [
|
|
1077
|
+
/* @__PURE__ */ jsx2("th", { children: "Name" }),
|
|
1078
|
+
/* @__PURE__ */ jsx2("th", { children: "Telephone" }),
|
|
1079
|
+
/* @__PURE__ */ jsx2("th", { children: "Portal / email" }),
|
|
1080
|
+
/* @__PURE__ */ jsx2("th", { children: "Fax" }),
|
|
1081
|
+
/* @__PURE__ */ jsx2("th", { children: "Address" })
|
|
1082
|
+
] }) }),
|
|
1083
|
+
/* @__PURE__ */ jsx2("tbody", { children: contacts.map((contact, index) => /* @__PURE__ */ jsxs2("tr", { children: [
|
|
1084
|
+
/* @__PURE__ */ jsxs2("td", { children: [
|
|
1085
|
+
contact.name || "\u2014",
|
|
1086
|
+
contact.note ? /* @__PURE__ */ jsx2("small", { children: contact.note }) : null
|
|
1087
|
+
] }),
|
|
1088
|
+
/* @__PURE__ */ jsx2("td", { children: contact.phone || "\u2014" }),
|
|
1089
|
+
/* @__PURE__ */ jsx2("td", { children: contact.portalUrl ? /* @__PURE__ */ jsx2("a", { href: contact.portalUrl, target: "_blank", rel: "noopener noreferrer", children: "Open portal" }) : contact.email || "\u2014" }),
|
|
1090
|
+
/* @__PURE__ */ jsx2("td", { children: contact.fax || "\u2014" }),
|
|
1091
|
+
/* @__PURE__ */ jsx2("td", { children: contact.address || "\u2014" })
|
|
1092
|
+
] }, `${contact.name || "contact"}-${index}`)) })
|
|
1093
|
+
] }) });
|
|
1094
|
+
}
|
|
1095
|
+
function MailingTable({ addresses }) {
|
|
1096
|
+
if (!addresses.length) return /* @__PURE__ */ jsx2(DirectoryEmpty, { children: "No mailing addresses are available for this directory entry." });
|
|
1097
|
+
return /* @__PURE__ */ jsx2("div", { className: "mb-read-directory-table-wrap", children: /* @__PURE__ */ jsxs2("table", { className: "mb-read-directory-table", children: [
|
|
1098
|
+
/* @__PURE__ */ jsx2("thead", { children: /* @__PURE__ */ jsxs2("tr", { children: [
|
|
1099
|
+
/* @__PURE__ */ jsx2("th", { children: "Company" }),
|
|
1100
|
+
/* @__PURE__ */ jsx2("th", { children: "Address" }),
|
|
1101
|
+
/* @__PURE__ */ jsx2("th", { children: "Notes" }),
|
|
1102
|
+
/* @__PURE__ */ jsx2("th", { children: "Submission types" })
|
|
1103
|
+
] }) }),
|
|
1104
|
+
/* @__PURE__ */ jsx2("tbody", { children: addresses.map((entry, index) => /* @__PURE__ */ jsxs2("tr", { children: [
|
|
1105
|
+
/* @__PURE__ */ jsx2("td", { children: entry.company || "\u2014" }),
|
|
1106
|
+
/* @__PURE__ */ jsx2("td", { children: entry.address }),
|
|
1107
|
+
/* @__PURE__ */ jsx2("td", { children: entry.notes || "\u2014" }),
|
|
1108
|
+
/* @__PURE__ */ jsx2("td", { children: entry.submissionTypes?.join(", ") || "\u2014" })
|
|
1109
|
+
] }, `${entry.address}-${index}`)) })
|
|
1110
|
+
] }) });
|
|
1111
|
+
}
|
|
1112
|
+
function PatternTable({ patterns }) {
|
|
1113
|
+
if (!patterns.length) return /* @__PURE__ */ jsx2(DirectoryEmpty, { children: "No claim-number pattern is available for this directory entry." });
|
|
1114
|
+
return /* @__PURE__ */ jsx2("div", { className: "mb-read-directory-table-wrap", children: /* @__PURE__ */ jsxs2("table", { className: "mb-read-directory-table", children: [
|
|
1115
|
+
/* @__PURE__ */ jsx2("thead", { children: /* @__PURE__ */ jsxs2("tr", { children: [
|
|
1116
|
+
/* @__PURE__ */ jsx2("th", { children: "Status" }),
|
|
1117
|
+
/* @__PURE__ */ jsx2("th", { children: "Length" }),
|
|
1118
|
+
/* @__PURE__ */ jsx2("th", { children: "Pattern" }),
|
|
1119
|
+
/* @__PURE__ */ jsx2("th", { children: "Example" })
|
|
1120
|
+
] }) }),
|
|
1121
|
+
/* @__PURE__ */ jsx2("tbody", { children: patterns.map((entry, index) => /* @__PURE__ */ jsxs2("tr", { children: [
|
|
1122
|
+
/* @__PURE__ */ jsx2("td", { children: entry.matches === true ? /* @__PURE__ */ jsx2("span", { className: "mb-read-match is-match", children: "\u2713 Matches this claim" }) : entry.matches === false ? /* @__PURE__ */ jsx2("span", { className: "mb-read-match is-warning", children: "Review format" }) : "Advisory" }),
|
|
1123
|
+
/* @__PURE__ */ jsx2("td", { children: entry.length ?? "\u2014" }),
|
|
1124
|
+
/* @__PURE__ */ jsx2("td", { children: entry.pattern }),
|
|
1125
|
+
/* @__PURE__ */ jsx2("td", { children: entry.example || "\u2014" })
|
|
1126
|
+
] }, `${entry.pattern}-${index}`)) })
|
|
1127
|
+
] }) });
|
|
1128
|
+
}
|
|
1063
1129
|
function BillReadOnlyForm({ data, appearance, className, style, onOpenAttachment }) {
|
|
1064
1130
|
const [payerOpen, setPayerOpen] = useState2(false);
|
|
1131
|
+
const [payerTab, setPayerTab] = useState2("main");
|
|
1065
1132
|
const { bill, patient, injury } = data;
|
|
1066
1133
|
const provider = bill.billingSnapshot?.billingProvider;
|
|
1067
1134
|
const clinician = bill.billingSnapshot?.renderingProvider;
|
|
@@ -1072,6 +1139,17 @@ function BillReadOnlyForm({ data, appearance, className, style, onOpenAttachment
|
|
|
1072
1139
|
const locationAddress = location ? [location.street, location.city, location.state, location.zip].filter(Boolean).join(", ") : "";
|
|
1073
1140
|
const payerName = data.delivery?.payerName || injury.claimsAdminName || "\u2014";
|
|
1074
1141
|
const contacts = data.delivery?.contacts;
|
|
1142
|
+
const directory = data.delivery?.directory;
|
|
1143
|
+
const fallbackContacts = contacts && Object.values(contacts).some(Boolean) ? [{
|
|
1144
|
+
name: contacts.adjusterName || "Claims contact",
|
|
1145
|
+
...contacts.adjusterPhone ? { phone: contacts.adjusterPhone } : {},
|
|
1146
|
+
...contacts.adjusterEmail || contacts.claimsEmail ? { email: contacts.adjusterEmail || contacts.claimsEmail } : {},
|
|
1147
|
+
...contacts.faxNumber ? { fax: contacts.faxNumber } : {},
|
|
1148
|
+
...contacts.portalUrl ? { portalUrl: contacts.portalUrl } : {},
|
|
1149
|
+
...contacts.mailingAddress ? { address: contacts.mailingAddress } : {}
|
|
1150
|
+
}] : [];
|
|
1151
|
+
const billReview = directory?.billReview?.length ? directory.billReview : fallbackContacts;
|
|
1152
|
+
const mailingAddresses = directory?.mailingAddresses?.length ? directory.mailingAddresses : contacts?.mailingAddress ? [{ company: payerName, address: contacts.mailingAddress }] : [];
|
|
1075
1153
|
useEffect2(() => {
|
|
1076
1154
|
if (!payerOpen) return;
|
|
1077
1155
|
const close = (event) => {
|
|
@@ -1083,10 +1161,7 @@ function BillReadOnlyForm({ data, appearance, className, style, onOpenAttachment
|
|
|
1083
1161
|
return /* @__PURE__ */ jsxs2("section", { className: ["mb-readonly-bill", className].filter(Boolean).join(" "), style: mindBillAppearanceStyle(appearance, style), "aria-label": "Bill details", children: [
|
|
1084
1162
|
/* @__PURE__ */ jsx2("style", { children: READ_ONLY_STYLES }),
|
|
1085
1163
|
/* @__PURE__ */ jsxs2("header", { className: "mb-readonly-heading", children: [
|
|
1086
|
-
/* @__PURE__ */
|
|
1087
|
-
/* @__PURE__ */ jsx2("h2", { children: "Bill details" }),
|
|
1088
|
-
/* @__PURE__ */ jsx2("p", { children: "Immutable snapshot submitted to the payer." })
|
|
1089
|
-
] }),
|
|
1164
|
+
/* @__PURE__ */ jsx2("h2", { children: "Bill details" }),
|
|
1090
1165
|
/* @__PURE__ */ jsx2("strong", { children: money2(bill.totalCharge) })
|
|
1091
1166
|
] }),
|
|
1092
1167
|
/* @__PURE__ */ jsxs2("section", { className: "mb-read-card", children: [
|
|
@@ -1103,7 +1178,10 @@ function BillReadOnlyForm({ data, appearance, className, style, onOpenAttachment
|
|
|
1103
1178
|
/* @__PURE__ */ jsxs2("dl", { className: "mb-read-grid", children: [
|
|
1104
1179
|
/* @__PURE__ */ jsx2(Value, { label: "Claim number", children: injury.claimNumber }),
|
|
1105
1180
|
/* @__PURE__ */ jsx2(Value, { label: "WCAB / ADJ number", children: injury.adjNumber }),
|
|
1106
|
-
/* @__PURE__ */ jsx2(Value, { label: "Claims administrator", children: /* @__PURE__ */ jsx2("button", { type: "button", className: "mb-read-payer", onClick: () =>
|
|
1181
|
+
/* @__PURE__ */ jsx2(Value, { label: "Claims administrator", children: /* @__PURE__ */ jsx2("button", { type: "button", className: "mb-read-payer", onClick: () => {
|
|
1182
|
+
setPayerTab("main");
|
|
1183
|
+
setPayerOpen(true);
|
|
1184
|
+
}, children: payerName }) }),
|
|
1107
1185
|
/* @__PURE__ */ jsx2(Value, { label: "Employer", children: injury.employer }),
|
|
1108
1186
|
/* @__PURE__ */ jsx2(Value, { label: "Date of injury", children: date(injury.doi) }),
|
|
1109
1187
|
/* @__PURE__ */ jsx2(Value, { label: "Date of service", children: bill.dosEnd ? `${date(bill.dos)} \u2013 ${date(bill.dosEnd)}` : date(bill.dos) }),
|
|
@@ -1168,27 +1246,33 @@ function BillReadOnlyForm({ data, appearance, className, style, onOpenAttachment
|
|
|
1168
1246
|
}, children: /* @__PURE__ */ jsxs2("section", { className: "mb-read-dialog", role: "dialog", "aria-modal": "true", "aria-labelledby": "mb-read-payer-title", children: [
|
|
1169
1247
|
/* @__PURE__ */ jsxs2("header", { children: [
|
|
1170
1248
|
/* @__PURE__ */ jsxs2("div", { children: [
|
|
1171
|
-
/* @__PURE__ */ jsx2("
|
|
1172
|
-
/* @__PURE__ */ jsx2("
|
|
1249
|
+
/* @__PURE__ */ jsx2("h3", { id: "mb-read-payer-title", children: payerName }),
|
|
1250
|
+
/* @__PURE__ */ jsx2("span", { children: "Claims administrator" })
|
|
1173
1251
|
] }),
|
|
1174
1252
|
/* @__PURE__ */ jsx2("button", { type: "button", "aria-label": "Close claims administrator details", onClick: () => setPayerOpen(false), children: "\xD7" })
|
|
1175
1253
|
] }),
|
|
1176
|
-
/* @__PURE__ */
|
|
1177
|
-
|
|
1178
|
-
/* @__PURE__ */
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1254
|
+
/* @__PURE__ */ jsx2("div", { className: "mb-read-dialog-tabs", role: "tablist", "aria-label": "Claims administrator information", children: PAYER_TABS.map(([id, label]) => /* @__PURE__ */ jsx2("button", { type: "button", role: "tab", "aria-selected": payerTab === id, onClick: () => setPayerTab(id), children: label }, id)) }),
|
|
1255
|
+
/* @__PURE__ */ jsxs2("div", { className: "mb-read-dialog-panel", role: "tabpanel", children: [
|
|
1256
|
+
payerTab === "main" ? /* @__PURE__ */ jsxs2("dl", { className: "mb-read-directory-main", children: [
|
|
1257
|
+
/* @__PURE__ */ jsx2(Value, { label: "Name", children: payerName }),
|
|
1258
|
+
/* @__PURE__ */ jsx2(Value, { label: "Type", children: directory?.type }),
|
|
1259
|
+
/* @__PURE__ */ jsx2(Value, { label: "Description", wide: true, children: directory?.description }),
|
|
1260
|
+
/* @__PURE__ */ jsx2(Value, { label: "Website", children: directory?.website ? /* @__PURE__ */ jsx2("a", { href: directory.website, target: "_blank", rel: "noopener noreferrer", children: directory.website }) : "\u2014" }),
|
|
1261
|
+
/* @__PURE__ */ jsx2(Value, { label: "Hours of operation", children: directory?.hours }),
|
|
1262
|
+
/* @__PURE__ */ jsx2(Value, { label: "Also known as", wide: true, children: directory?.aliases?.join(", ") }),
|
|
1263
|
+
/* @__PURE__ */ jsx2(Value, { label: "Affiliated entities", wide: true, children: directory?.affiliatedEntities?.join(", ") })
|
|
1264
|
+
] }) : null,
|
|
1265
|
+
payerTab === "bill-review" ? /* @__PURE__ */ jsx2(ContactTable, { contacts: billReview, empty: "No bill-review contacts are available for this directory entry." }) : null,
|
|
1266
|
+
payerTab === "authorization" ? /* @__PURE__ */ jsx2(ContactTable, { contacts: directory?.authorization ?? [], empty: "No authorization contacts are available for this directory entry." }) : null,
|
|
1267
|
+
payerTab === "mailing" ? /* @__PURE__ */ jsx2(MailingTable, { addresses: mailingAddresses }) : null,
|
|
1268
|
+
payerTab === "patterns" ? /* @__PURE__ */ jsx2(PatternTable, { patterns: directory?.claimNumberPatterns ?? [] }) : null
|
|
1269
|
+
] })
|
|
1186
1270
|
] }) }) : null
|
|
1187
1271
|
] });
|
|
1188
1272
|
}
|
|
1189
1273
|
var READ_ONLY_STYLES = `
|
|
1190
|
-
.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
|
|
1191
|
-
@media(max-width:700px){.mb-readonly-heading{align-items:flex-start}.mb-read-grid,.mb-read-
|
|
1274
|
+
.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}
|
|
1275
|
+
@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}}
|
|
1192
1276
|
`;
|
|
1193
1277
|
|
|
1194
1278
|
// src/bill-submission-form.tsx
|
|
@@ -3025,6 +3109,107 @@ function BillSnapshotSummary({ bill, patient, injury, delivery, appearance, clas
|
|
|
3025
3109
|
] }, label)) })
|
|
3026
3110
|
] });
|
|
3027
3111
|
}
|
|
3112
|
+
function BillExplanationOfReview({
|
|
3113
|
+
remittance,
|
|
3114
|
+
eors,
|
|
3115
|
+
payments,
|
|
3116
|
+
submittedAt,
|
|
3117
|
+
onOpenEor,
|
|
3118
|
+
appearance,
|
|
3119
|
+
className,
|
|
3120
|
+
style
|
|
3121
|
+
}) {
|
|
3122
|
+
const rows = payments.length ? payments : [null];
|
|
3123
|
+
return /* @__PURE__ */ jsxs6("section", { className: classes("mb-surface mb-eor-review", className), style: mindBillAppearanceStyle(appearance, style), "aria-label": "Explanation of Review and payments", children: [
|
|
3124
|
+
/* @__PURE__ */ jsx6("style", { children: lifecycleSurfaceStyles }),
|
|
3125
|
+
/* @__PURE__ */ jsx6("header", { className: "mb-surface-heading", children: /* @__PURE__ */ jsxs6("div", { children: [
|
|
3126
|
+
/* @__PURE__ */ jsx6("strong", { children: "Explanation of Review" }),
|
|
3127
|
+
/* @__PURE__ */ jsx6("span", { children: "Payer response and payment reconciliation." })
|
|
3128
|
+
] }) }),
|
|
3129
|
+
/* @__PURE__ */ jsxs6("dl", { className: "mb-eor-metrics", children: [
|
|
3130
|
+
/* @__PURE__ */ jsxs6("div", { children: [
|
|
3131
|
+
/* @__PURE__ */ jsx6("dt", { children: "Amount billed" }),
|
|
3132
|
+
/* @__PURE__ */ jsx6("dd", { children: currency(remittance.billedAmount) })
|
|
3133
|
+
] }),
|
|
3134
|
+
/* @__PURE__ */ jsxs6("div", { children: [
|
|
3135
|
+
/* @__PURE__ */ jsx6("dt", { children: "Payer allowed" }),
|
|
3136
|
+
/* @__PURE__ */ jsx6("dd", { children: remittance.payerAllowedAmount === null ? "\u2014" : currency(remittance.payerAllowedAmount) })
|
|
3137
|
+
] }),
|
|
3138
|
+
/* @__PURE__ */ jsxs6("div", { children: [
|
|
3139
|
+
/* @__PURE__ */ jsx6("dt", { children: "Payer reported paid" }),
|
|
3140
|
+
/* @__PURE__ */ jsx6("dd", { children: remittance.payerReportedPaid === null ? "\u2014" : currency(remittance.payerReportedPaid) })
|
|
3141
|
+
] }),
|
|
3142
|
+
/* @__PURE__ */ jsxs6("div", { className: "is-balance", children: [
|
|
3143
|
+
/* @__PURE__ */ jsx6("dt", { children: "Balance due" }),
|
|
3144
|
+
/* @__PURE__ */ jsx6("dd", { children: currency(remittance.balanceDue) })
|
|
3145
|
+
] }),
|
|
3146
|
+
/* @__PURE__ */ jsxs6("div", { children: [
|
|
3147
|
+
/* @__PURE__ */ jsx6("dt", { children: "Payment posted" }),
|
|
3148
|
+
/* @__PURE__ */ jsx6("dd", { children: currency(remittance.postedPrincipal) })
|
|
3149
|
+
] }),
|
|
3150
|
+
/* @__PURE__ */ jsxs6("div", { children: [
|
|
3151
|
+
/* @__PURE__ */ jsx6("dt", { children: "Penalty & interest" }),
|
|
3152
|
+
/* @__PURE__ */ jsx6("dd", { children: currency(remittance.postedAdditional) })
|
|
3153
|
+
] }),
|
|
3154
|
+
/* @__PURE__ */ jsxs6("div", { children: [
|
|
3155
|
+
/* @__PURE__ */ jsx6("dt", { children: "Total received" }),
|
|
3156
|
+
/* @__PURE__ */ jsx6("dd", { children: currency(remittance.totalPostedCash) })
|
|
3157
|
+
] }),
|
|
3158
|
+
/* @__PURE__ */ jsxs6("div", { children: [
|
|
3159
|
+
/* @__PURE__ */ jsx6("dt", { children: "Expected" }),
|
|
3160
|
+
/* @__PURE__ */ jsx6("dd", { children: currency(remittance.expectedAmount) })
|
|
3161
|
+
] })
|
|
3162
|
+
] }),
|
|
3163
|
+
remittance.denialReason ? /* @__PURE__ */ jsxs6("div", { className: "mb-denial", children: [
|
|
3164
|
+
/* @__PURE__ */ jsx6("strong", { children: "Denial reason" }),
|
|
3165
|
+
/* @__PURE__ */ jsx6("p", { children: remittance.denialReason })
|
|
3166
|
+
] }) : null,
|
|
3167
|
+
/* @__PURE__ */ jsx6("div", { className: "mb-eor-table-wrap", children: /* @__PURE__ */ jsxs6("table", { className: "mb-eor-table", children: [
|
|
3168
|
+
/* @__PURE__ */ jsxs6("thead", { children: [
|
|
3169
|
+
/* @__PURE__ */ jsxs6("tr", { className: "mb-eor-groups", children: [
|
|
3170
|
+
/* @__PURE__ */ jsx6("th", { colSpan: 2, children: "Submission" }),
|
|
3171
|
+
/* @__PURE__ */ jsx6("th", { colSpan: 5, children: "EOR payment information" }),
|
|
3172
|
+
/* @__PURE__ */ jsx6("th", { colSpan: 2, children: "EOR post" }),
|
|
3173
|
+
/* @__PURE__ */ jsx6("th", { children: "EOR" })
|
|
3174
|
+
] }),
|
|
3175
|
+
/* @__PURE__ */ jsxs6("tr", { children: [
|
|
3176
|
+
/* @__PURE__ */ jsx6("th", { children: "Submission" }),
|
|
3177
|
+
/* @__PURE__ */ jsx6("th", { children: "Submission payment" }),
|
|
3178
|
+
/* @__PURE__ */ jsx6("th", { children: "Payment method" }),
|
|
3179
|
+
/* @__PURE__ */ jsx6("th", { children: "Reference" }),
|
|
3180
|
+
/* @__PURE__ */ jsx6("th", { children: "Effective date" }),
|
|
3181
|
+
/* @__PURE__ */ jsx6("th", { children: "Payment total" }),
|
|
3182
|
+
/* @__PURE__ */ jsx6("th", { children: "Deposit date" }),
|
|
3183
|
+
/* @__PURE__ */ jsx6("th", { children: "Post date" }),
|
|
3184
|
+
/* @__PURE__ */ jsx6("th", { children: "Source" }),
|
|
3185
|
+
/* @__PURE__ */ jsx6("th", { children: "Document" })
|
|
3186
|
+
] })
|
|
3187
|
+
] }),
|
|
3188
|
+
/* @__PURE__ */ jsx6("tbody", { children: rows.map((payment, index) => {
|
|
3189
|
+
const eor = eors[index] ?? eors[0];
|
|
3190
|
+
return /* @__PURE__ */ jsxs6("tr", { children: [
|
|
3191
|
+
/* @__PURE__ */ jsxs6("td", { "data-label": "Submission", children: [
|
|
3192
|
+
/* @__PURE__ */ jsx6("strong", { children: "Original bill" }),
|
|
3193
|
+
submittedAt ? /* @__PURE__ */ jsxs6("span", { children: [
|
|
3194
|
+
"Sent ",
|
|
3195
|
+
defaultFormatDate(submittedAt)
|
|
3196
|
+
] }) : null
|
|
3197
|
+
] }),
|
|
3198
|
+
/* @__PURE__ */ jsx6("td", { "data-label": "Submission payment", children: remittance.payerReportedPaid === null ? "\u2014" : currency(remittance.payerReportedPaid) }),
|
|
3199
|
+
/* @__PURE__ */ jsx6("td", { "data-label": "Payment method", children: payment ? humanize(payment.method) : "\u2014" }),
|
|
3200
|
+
/* @__PURE__ */ jsx6("td", { "data-label": "Reference", children: payment?.checkNumber || "\u2014" }),
|
|
3201
|
+
/* @__PURE__ */ jsx6("td", { "data-label": "Effective date", children: payment ? payment.receivedDate || payment.depositDate || defaultFormatDate(payment.postedAt) : "\u2014" }),
|
|
3202
|
+
/* @__PURE__ */ jsx6("td", { "data-label": "Payment total", children: payment ? currency(payment.amount) : currency(0) }),
|
|
3203
|
+
/* @__PURE__ */ jsx6("td", { "data-label": "Deposit date", children: payment?.depositDate || "Not recorded" }),
|
|
3204
|
+
/* @__PURE__ */ jsx6("td", { "data-label": "Post date", children: payment ? defaultFormatDate(payment.postedAt) : eor ? defaultFormatDate(eor.addedAt) : "\u2014" }),
|
|
3205
|
+
/* @__PURE__ */ jsx6("td", { "data-label": "Source", children: payment ? payment.source.toUpperCase() : eor ? "EOR" : "\u2014" }),
|
|
3206
|
+
/* @__PURE__ */ jsx6("td", { "data-label": "EOR", children: eor && onOpenEor ? /* @__PURE__ */ jsx6("button", { type: "button", className: "mb-eor-link", onClick: () => void onOpenEor(eor), children: eor.filename }) : eor?.filename || "\u2014" })
|
|
3207
|
+
] }, payment?.id ?? `empty-${index}`);
|
|
3208
|
+
}) })
|
|
3209
|
+
] }) }),
|
|
3210
|
+
eors.length > rows.length ? /* @__PURE__ */ jsx6("div", { className: "mb-eor-documents", children: eors.slice(rows.length).map((eor) => /* @__PURE__ */ jsx6("button", { type: "button", onClick: () => void onOpenEor?.(eor), children: eor.filename }, eor.id)) }) : null
|
|
3211
|
+
] });
|
|
3212
|
+
}
|
|
3028
3213
|
function BillRemittanceCard({ remittance, appearance, className, style }) {
|
|
3029
3214
|
return /* @__PURE__ */ jsxs6("section", { className: classes("mb-surface mb-remittance", className), style: mindBillAppearanceStyle(appearance, style), "aria-label": "Remittance summary", children: [
|
|
3030
3215
|
/* @__PURE__ */ jsx6("style", { children: lifecycleSurfaceStyles }),
|
|
@@ -3171,6 +3356,7 @@ var lifecycleSurfaceStyles = `
|
|
|
3171
3356
|
.mb-progress-list{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));list-style:none;margin:0;padding:0}.mb-progress-list li{display:grid;gap:7px;position:relative;text-align:center;color:var(--mb-muted);font-size:12px}.mb-progress-list li:not(:last-child)::after{content:"";position:absolute;left:calc(50% + 14px);right:calc(-50% + 14px);top:13px;height:2px;background:var(--mb-border)}.mb-progress-list li.is-complete:not(:last-child)::after{background:var(--mb-accent)}.mb-progress-list li>span{display:grid;place-items:center;justify-self:center;position:relative;z-index:1;width:28px;height:28px;border:2px solid var(--mb-border);border-radius:50%;background:var(--mb-surface);font-weight:800}.mb-progress-list li.is-complete>span,.mb-progress-list li.is-current>span{border-color:var(--mb-accent);background:var(--mb-accent);color:var(--mb-accent-contrast)}.mb-progress-list li.is-current{color:var(--mb-text)}
|
|
3172
3357
|
.mb-snapshot dl,.mb-remittance dl,.mb-contacts dl{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0;margin:0}.mb-remittance dl{grid-template-columns:repeat(4,minmax(0,1fr));row-gap:1px;background:var(--mb-border)}.mb-snapshot dl>div,.mb-remittance dl>div,.mb-contacts dl>div{display:grid;gap:3px;padding:10px 14px;border-left:1px solid var(--mb-border)}.mb-remittance dl>div{border:0;background:var(--mb-surface)}.mb-snapshot dl>div:nth-child(3n+1),.mb-contacts dl>div:first-child{border-left:0}.mb-snapshot dt,.mb-remittance dt,.mb-contacts dt,.mb-payment-list dt{color:var(--mb-muted);font-size:11px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}.mb-snapshot dd,.mb-remittance dd,.mb-contacts dd,.mb-payment-list dd{font-size:14px;font-weight:750;margin:0;overflow-wrap:anywhere}.mb-contacts a{color:var(--mb-accent)}.mb-denial{margin-top: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));padding:12px 14px}.mb-denial p{margin:4px 0 0}
|
|
3173
3358
|
.mb-payment-list{display:grid}.mb-payment-list article{display:grid;grid-template-columns:minmax(120px,.35fr) 1fr;gap:14px 24px;padding:16px 0;border-top:1px solid var(--mb-border)}.mb-payment-list article:first-child{border-top:0}.mb-payment-amount{display:grid;align-content:start;gap:2px}.mb-payment-amount strong{font-size:1.2rem}.mb-payment-list article>dl{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:0}.mb-payment-list article>dl>div{display:grid;align-content:start;gap:3px}.mb-payment-list article span{color:var(--mb-muted);font-size:12px}.mb-payment-list article p{grid-column:1/-1;margin:0;color:var(--mb-muted);font-size:13px}
|
|
3359
|
+
.mb-eor-review{border-top:4px solid var(--mb-accent);padding-top:17px}.mb-eor-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));margin:0 0 18px;border:1px solid var(--mb-border);border-radius:10px;overflow:hidden}.mb-eor-metrics>div{display:grid;gap:4px;padding:13px 15px;border-left:1px solid var(--mb-border);border-top:1px solid var(--mb-border)}.mb-eor-metrics>div:nth-child(-n+4){border-top:0}.mb-eor-metrics>div:nth-child(4n+1){border-left:0}.mb-eor-metrics dt{color:var(--mb-muted);font-size:11px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}.mb-eor-metrics dd{margin:0;font-size:15px;font-weight:800}.mb-eor-metrics .is-balance{background:color-mix(in srgb,var(--mb-accent) 7%,var(--mb-surface))}.mb-eor-table-wrap{overflow-x:auto;border:1px solid var(--mb-border);border-radius:10px}.mb-eor-table{width:100%;min-width:1080px;border-collapse:collapse;font-size:12px}.mb-eor-table th,.mb-eor-table td{padding:10px 12px;border-left:1px solid var(--mb-border);border-top:1px solid var(--mb-border);text-align:left;vertical-align:top}.mb-eor-table th:first-child,.mb-eor-table td:first-child{border-left:0}.mb-eor-table thead th{background:var(--mb-soft);color:var(--mb-muted);font-weight:800}.mb-eor-table .mb-eor-groups th{border-top:0;background:color-mix(in srgb,var(--mb-accent) 13%,var(--mb-surface));color:var(--mb-text);text-align:center}.mb-eor-table td>strong,.mb-eor-table td>span{display:block}.mb-eor-table td>span{margin-top:3px;color:var(--mb-muted)}.mb-eor-link,.mb-eor-documents button{border:0;background:transparent;color:var(--mb-accent);font:inherit;font-weight:750;padding:0;text-align:left;text-decoration:underline;cursor:pointer;overflow-wrap:anywhere}.mb-eor-documents{display:flex;flex-wrap:wrap;gap:12px;margin-top:12px}
|
|
3174
3360
|
@media(max-width:700px){.mb-surface.mb-progress{padding:16px 10px}.mb-progress-list{grid-template-columns:repeat(4,minmax(0,1fr))}.mb-progress-list li{display:grid;grid-template-columns:1fr;align-items:start;gap:6px;text-align:center;font-size:10px;min-width:0}.mb-progress-list li b{font-size:10px;white-space:nowrap}.mb-progress-list li:not(:last-child)::after{left:calc(50% + 12px);right:calc(-50% + 12px);top:11px;bottom:auto;width:auto;height:2px}.mb-progress-list li>span{grid-row:auto;width:24px;height:24px;font-size:11px}.mb-snapshot dl,.mb-remittance dl,.mb-contacts dl{grid-template-columns:1fr 1fr}.mb-snapshot dl>div,.mb-remittance dl>div,.mb-contacts dl>div{border:0;border-top:1px solid var(--mb-border);padding:10px 0}.mb-snapshot dl>div:nth-child(-n+2),.mb-remittance dl>div:nth-child(-n+2),.mb-contacts dl>div:nth-child(-n+2){border-top:0}.mb-payment-list article{grid-template-columns:1fr}.mb-payment-list article>dl{grid-template-columns:1fr 1fr}}
|
|
3175
3361
|
`;
|
|
3176
3362
|
|
|
@@ -3192,12 +3378,22 @@ import { Fragment as Fragment5, jsx as jsx7, jsxs as jsxs7 } from "react/jsx-run
|
|
|
3192
3378
|
var DEFAULT_REFRESH_INTERVAL2 = 6e4;
|
|
3193
3379
|
function reservePreviewWindow() {
|
|
3194
3380
|
const preview = window.open("about:blank", "_blank");
|
|
3195
|
-
if (preview)
|
|
3381
|
+
if (preview) {
|
|
3382
|
+
preview.opener = null;
|
|
3383
|
+
preview.document.open();
|
|
3384
|
+
preview.document.write('<!doctype html><title>Preparing PDF\u2026</title><meta name=viewport content="width=device-width,initial-scale=1"><style>body{margin:0;display:grid;place-items:center;min-height:100vh;font:16px system-ui;color:#42545a;background:#f5f8f8}</style><p>Preparing PDF preview\u2026</p>');
|
|
3385
|
+
preview.document.close();
|
|
3386
|
+
}
|
|
3196
3387
|
return preview;
|
|
3197
3388
|
}
|
|
3389
|
+
function renderPreview(preview, title, body) {
|
|
3390
|
+
preview.document.open();
|
|
3391
|
+
preview.document.write(`<!doctype html><title>${title}</title><meta name="viewport" content="width=device-width,initial-scale=1"><style>html,body{height:100%;margin:0;background:#202124;font:14px system-ui}iframe{width:100%;height:100%;border:0}.fallback{position:fixed;right:12px;top:12px;z-index:2;border-radius:8px;background:#fff;padding:9px 12px;color:#17282d;text-decoration:none;box-shadow:0 2px 12px #0005}</style>${body}`);
|
|
3392
|
+
preview.document.close();
|
|
3393
|
+
}
|
|
3198
3394
|
function previewBlob(blob, preview) {
|
|
3199
3395
|
const url = URL.createObjectURL(blob);
|
|
3200
|
-
if (preview) preview
|
|
3396
|
+
if (preview) renderPreview(preview, "PDF preview", `<a class="fallback" href="${url}" target="_self">Open PDF directly</a><iframe title="PDF preview" src="${url}"></iframe>`);
|
|
3201
3397
|
else {
|
|
3202
3398
|
const link = document.createElement("a");
|
|
3203
3399
|
link.href = url;
|
|
@@ -3205,14 +3401,14 @@ function previewBlob(blob, preview) {
|
|
|
3205
3401
|
link.rel = "noopener noreferrer";
|
|
3206
3402
|
link.click();
|
|
3207
3403
|
}
|
|
3208
|
-
window.setTimeout(() => URL.revokeObjectURL(url),
|
|
3404
|
+
window.setTimeout(() => URL.revokeObjectURL(url), 36e5);
|
|
3209
3405
|
}
|
|
3210
3406
|
async function openPdfFromUserGesture(loadPdf) {
|
|
3211
3407
|
const preview = reservePreviewWindow();
|
|
3212
3408
|
try {
|
|
3213
3409
|
previewBlob(await loadPdf(), preview);
|
|
3214
3410
|
} catch (error) {
|
|
3215
|
-
preview
|
|
3411
|
+
if (preview) renderPreview(preview, "PDF unavailable", '<p style="margin:0;padding:32px;color:#fff">The PDF could not be opened. Close this tab and try again.</p>');
|
|
3216
3412
|
throw error;
|
|
3217
3413
|
}
|
|
3218
3414
|
}
|
|
@@ -3370,7 +3566,10 @@ function sandboxScenarios(state) {
|
|
|
3370
3566
|
];
|
|
3371
3567
|
return [];
|
|
3372
3568
|
}
|
|
3373
|
-
function
|
|
3569
|
+
function shouldShowSandboxControls(environment, enabled = false) {
|
|
3570
|
+
return enabled && environment === "sandbox";
|
|
3571
|
+
}
|
|
3572
|
+
function ConnectedBillLifecycle({ appearance, sandboxControls = false, className, style, loadingFallback, errorFallback, onChanged, ...options }) {
|
|
3374
3573
|
const lifecycle = useBillLifecycle(options);
|
|
3375
3574
|
const { data } = lifecycle;
|
|
3376
3575
|
const [tab, setTab] = useState6("details");
|
|
@@ -3419,19 +3618,17 @@ function ConnectedBillLifecycle({ appearance, className, style, loadingFallback,
|
|
|
3419
3618
|
const viewEor = data.lifecycle.actions.find((action) => action.id === "view_eor" && action.enabled);
|
|
3420
3619
|
const supportedActions = /* @__PURE__ */ new Set(["resubmit", "second_review", "post_payment", "close", "reopen"]);
|
|
3421
3620
|
const actions = data.lifecycle.actions.filter((action) => action.enabled && supportedActions.has(action.id));
|
|
3422
|
-
const
|
|
3621
|
+
const showSandboxControls = shouldShowSandboxControls(data.environment, sandboxControls);
|
|
3622
|
+
const simulations = showSandboxControls ? sandboxScenarios(data.lifecycle.state) : [];
|
|
3423
3623
|
return /* @__PURE__ */ jsxs7("section", { className: ["mb-connected-lifecycle", className].filter(Boolean).join(" "), style: mindBillAppearanceStyle(appearance, style), children: [
|
|
3424
3624
|
/* @__PURE__ */ jsx7("style", { children: CONNECTED_LIFECYCLE_STYLES }),
|
|
3425
3625
|
/* @__PURE__ */ jsx7(BillLifecycleProgress, { state: data.lifecycle.state, nativeStatus: data.lifecycle.nativeStatus, submittedAt: data.lifecycle.submittedAt ?? null, agingDays: data.lifecycle.agingDays ?? null, ...appearance ? { appearance } : {} }),
|
|
3426
3626
|
/* @__PURE__ */ jsxs7("header", { className: "mb-lifecycle-head", children: [
|
|
3427
3627
|
/* @__PURE__ */ jsxs7("div", { children: [
|
|
3428
|
-
/* @__PURE__ */
|
|
3429
|
-
|
|
3430
|
-
|
|
3431
|
-
|
|
3432
|
-
] }),
|
|
3433
|
-
/* @__PURE__ */ jsx7("span", { children: billLifecycleDisplayLabel(data.lifecycle.state, data.lifecycle.nativeStatus) })
|
|
3434
|
-
] }),
|
|
3628
|
+
/* @__PURE__ */ jsx7("div", { className: "mb-lifecycle-title", children: /* @__PURE__ */ jsxs7("h2", { children: [
|
|
3629
|
+
"Bill #",
|
|
3630
|
+
data.bill.billNumber
|
|
3631
|
+
] }) }),
|
|
3435
3632
|
/* @__PURE__ */ jsxs7("p", { children: [
|
|
3436
3633
|
"Claim ",
|
|
3437
3634
|
data.injury.claimNumber || "\u2014",
|
|
@@ -3444,52 +3641,28 @@ function ConnectedBillLifecycle({ appearance, className, style, loadingFallback,
|
|
|
3444
3641
|
/* @__PURE__ */ jsx7("button", { type: "button", role: "tab", "aria-selected": tab === "details", onClick: () => setTab("details"), children: "Bill details" }),
|
|
3445
3642
|
/* @__PURE__ */ jsx7("button", { type: "button", role: "tab", "aria-selected": tab === "history", onClick: () => setTab("history"), children: "Bill history" })
|
|
3446
3643
|
] }),
|
|
3447
|
-
data.environment === "sandbox" ? /* @__PURE__ */ jsxs7("section", { className: "mb-lifecycle-simulator", "aria-label": "Sandbox lifecycle simulator", children: [
|
|
3448
|
-
/* @__PURE__ */ jsxs7("div", { children: [
|
|
3449
|
-
/* @__PURE__ */ jsx7("span", { children: "Sandbox demo controls" }),
|
|
3450
|
-
/* @__PURE__ */ jsx7("h3", { children: "Simulate the next payer response" }),
|
|
3451
|
-
/* @__PURE__ */ jsx7("p", { children: "This changes sandbox data only. QME Companion receives the result through the same lifecycle API and components partners use." })
|
|
3452
|
-
] }),
|
|
3453
|
-
simulations.length ? /* @__PURE__ */ jsx7("div", { className: "mb-lifecycle-simulator-actions", children: simulations.map((scenario) => /* @__PURE__ */ jsxs7("button", { type: "button", disabled: lifecycle.isMutating, onClick: () => void complete(`${scenario.label} simulated.`, () => lifecycle.simulateSandbox({ scenario: scenario.id })), children: [
|
|
3454
|
-
/* @__PURE__ */ jsx7("strong", { children: scenario.label }),
|
|
3455
|
-
/* @__PURE__ */ jsx7("span", { children: scenario.detail })
|
|
3456
|
-
] }, scenario.id)) }) : /* @__PURE__ */ jsx7("p", { className: "mb-lifecycle-simulator-idle", children: "No simulated payer transition is needed at this stage. Use the bill action below to continue." })
|
|
3457
|
-
] }) : null,
|
|
3458
3644
|
tab === "details" ? /* @__PURE__ */ jsxs7("div", { className: "mb-lifecycle-tabpanel", role: "tabpanel", children: [
|
|
3459
|
-
/* @__PURE__ */ jsx7(
|
|
3460
|
-
/* @__PURE__ */
|
|
3461
|
-
|
|
3462
|
-
|
|
3463
|
-
/* @__PURE__ */ jsx7("h3", { children: "
|
|
3464
|
-
/* @__PURE__ */ jsx7("p", { children: "The
|
|
3465
|
-
] })
|
|
3466
|
-
/* @__PURE__ */ jsx7("
|
|
3467
|
-
/* @__PURE__ */
|
|
3468
|
-
|
|
3469
|
-
|
|
3470
|
-
] }),
|
|
3471
|
-
/* @__PURE__ */ jsx7("button", { type: "button", className: "mb-lifecycle-button secondary", onClick: () => void lifecycle.openEor(eor).catch(() => void 0), children: "View EOR" })
|
|
3472
|
-
] }, eor.id)) })
|
|
3645
|
+
data.eors.length || data.payments.length || ["processed", "denied", "partially_paid"].includes(data.lifecycle.state) ? /* @__PURE__ */ jsx7(BillExplanationOfReview, { remittance: data.remittance, eors: data.eors, payments: data.payments, submittedAt: data.lifecycle.submittedAt ?? null, onOpenEor: lifecycle.openEor, ...appearance ? { appearance } : {} }) : null,
|
|
3646
|
+
showSandboxControls ? /* @__PURE__ */ jsxs7("section", { className: "mb-lifecycle-simulator", "aria-label": "Sandbox lifecycle simulator", children: [
|
|
3647
|
+
/* @__PURE__ */ jsxs7("div", { children: [
|
|
3648
|
+
/* @__PURE__ */ jsx7("span", { children: "Sandbox demo controls" }),
|
|
3649
|
+
/* @__PURE__ */ jsx7("h3", { children: "Simulate the next payer response" }),
|
|
3650
|
+
/* @__PURE__ */ jsx7("p", { children: "This changes sandbox data only. The host receives the result through the same lifecycle API and components partners use." })
|
|
3651
|
+
] }),
|
|
3652
|
+
simulations.length ? /* @__PURE__ */ jsx7("div", { className: "mb-lifecycle-simulator-actions", children: simulations.map((scenario) => /* @__PURE__ */ jsxs7("button", { type: "button", disabled: lifecycle.isMutating, onClick: () => void complete(`${scenario.label} simulated.`, () => lifecycle.simulateSandbox({ scenario: scenario.id })), children: [
|
|
3653
|
+
/* @__PURE__ */ jsx7("strong", { children: scenario.label }),
|
|
3654
|
+
/* @__PURE__ */ jsx7("span", { children: scenario.detail })
|
|
3655
|
+
] }, scenario.id)) }) : /* @__PURE__ */ jsx7("p", { className: "mb-lifecycle-simulator-idle", children: "No simulated payer transition is needed at this stage. Use the bill action below to continue." })
|
|
3473
3656
|
] }) : null,
|
|
3474
|
-
/* @__PURE__ */ jsx7(
|
|
3475
|
-
viewEor || actions.length ? /* @__PURE__ */ jsx7("button", { type: "button", className: "mb-lifecycle-button secondary mb-lifecycle-actions-trigger", onClick: () => setPanel("actions"), children: "Bill actions" }) : null
|
|
3657
|
+
/* @__PURE__ */ jsx7(BillReadOnlyForm, { data, onOpenAttachment: lifecycle.openAttachment, ...appearance ? { appearance } : {} })
|
|
3476
3658
|
] }) : /* @__PURE__ */ jsx7("div", { className: "mb-lifecycle-tabpanel", role: "tabpanel", children: /* @__PURE__ */ jsx7(BillActivityTimeline, { events: data.activity, ...appearance ? { appearance } : {} }) }),
|
|
3477
|
-
|
|
3478
|
-
/* @__PURE__ */
|
|
3479
|
-
|
|
3480
|
-
|
|
3481
|
-
|
|
3482
|
-
|
|
3483
|
-
|
|
3484
|
-
setPanel("");
|
|
3485
|
-
document.getElementById(`mb-eors-${data.bill.id}`)?.scrollIntoView({ behavior: "smooth" });
|
|
3486
|
-
}, children: viewEor.label }) : null,
|
|
3487
|
-
actions.map((action) => /* @__PURE__ */ jsx7("button", { type: "button", className: action.primary ? "mb-lifecycle-button primary" : "mb-lifecycle-button secondary", onClick: () => {
|
|
3488
|
-
const next = actionPanel(action);
|
|
3489
|
-
if (next) setPanel(next);
|
|
3490
|
-
}, children: action.label }, action.id))
|
|
3491
|
-
] })
|
|
3492
|
-
] }) }) : null,
|
|
3659
|
+
viewEor || actions.length ? /* @__PURE__ */ jsxs7("aside", { className: "mb-lifecycle-actions-sheet", "aria-label": "Bill actions", children: [
|
|
3660
|
+
viewEor && data.eors[0] ? /* @__PURE__ */ jsx7("button", { type: "button", className: "mb-lifecycle-button secondary", onClick: () => void lifecycle.openEor(data.eors[0]).catch(() => void 0), children: viewEor.label }) : null,
|
|
3661
|
+
actions.map((action) => /* @__PURE__ */ jsx7("button", { type: "button", className: action.primary ? "mb-lifecycle-button primary" : "mb-lifecycle-button secondary", onClick: () => {
|
|
3662
|
+
const next = actionPanel(action);
|
|
3663
|
+
if (next) setPanel(next);
|
|
3664
|
+
}, children: action.label }, action.id))
|
|
3665
|
+
] }) : null,
|
|
3493
3666
|
panel === "resubmit" ? /* @__PURE__ */ jsx7(LifecycleDialog, { title: "Correct and resubmit", onClose: () => setPanel(""), children: /* @__PURE__ */ jsxs7("section", { className: "mb-lifecycle-panel", children: [
|
|
3494
3667
|
/* @__PURE__ */ jsxs7("div", { children: [
|
|
3495
3668
|
/* @__PURE__ */ jsx7("h3", { children: "Correct and resubmit" }),
|
|
@@ -3615,9 +3788,9 @@ function ConnectedBillLifecycle({ appearance, className, style, loadingFallback,
|
|
|
3615
3788
|
}
|
|
3616
3789
|
var CONNECTED_LIFECYCLE_STYLES = `
|
|
3617
3790
|
.mb-lifecycle-simulator{display:grid;gap:14px;padding:18px;border:1px solid #b8dadd;border-radius:var(--mb-radius,14px);background:#f2fbfb}.mb-lifecycle-simulator>div:first-child>span{color:var(--mb-accent);font-size:.72rem;font-weight:850;letter-spacing:.09em;text-transform:uppercase}.mb-lifecycle-simulator h3{margin:3px 0 0;font-size:1.05rem}.mb-lifecycle-simulator p{margin:4px 0 0;color:var(--mb-muted)}.mb-lifecycle-simulator-actions{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:10px}.mb-lifecycle-simulator-actions button{min-height:76px;border:1px solid #a9cccf;border-radius:10px;background:var(--mb-surface);color:var(--mb-text);cursor:pointer;padding:12px 14px;text-align:left;font:inherit}.mb-lifecycle-simulator-actions button:hover{border-color:var(--mb-accent);box-shadow:0 3px 14px rgba(23,108,112,.1)}.mb-lifecycle-simulator-actions button:disabled{cursor:not-allowed;opacity:.55}.mb-lifecycle-simulator-actions button strong,.mb-lifecycle-simulator-actions button span{display:block}.mb-lifecycle-simulator-actions button span{margin-top:3px;color:var(--mb-muted);font-size:.83rem}.mb-lifecycle-simulator-idle{padding:10px 12px;border-radius:8px;background:rgba(255,255,255,.72)}
|
|
3618
|
-
.mb-connected-lifecycle{--mb-accent:#176c70;--mb-text:#17282d;--mb-muted:#607176;--mb-border:#d7e0df;--mb-soft:#f4f7f6;--mb-surface:#fff;display:grid;gap:18px;color:var(--mb-text);font:14px/1.45 var(--mb-font,Inter,ui-sans-serif,system-ui,sans-serif)}.mb-connected-lifecycle *{box-sizing:border-box}.mb-lifecycle-head{display:flex;align-items:center;justify-content:space-between;gap:20px}.mb-lifecycle-title{display:flex;align-items:center;flex-wrap:wrap;gap:10px}.mb-lifecycle-title h2{margin:0;font-size:1.7rem}.mb-lifecycle-
|
|
3791
|
+
.mb-connected-lifecycle{--mb-accent:#176c70;--mb-text:#17282d;--mb-muted:#607176;--mb-border:#d7e0df;--mb-soft:#f4f7f6;--mb-surface:#fff;display:grid;gap:18px;color:var(--mb-text);font:14px/1.45 var(--mb-font,Inter,ui-sans-serif,system-ui,sans-serif)}.mb-connected-lifecycle *{box-sizing:border-box}.mb-lifecycle-head{display:flex;align-items:center;justify-content:space-between;gap:20px}.mb-lifecycle-title{display:flex;align-items:center;flex-wrap:wrap;gap:10px}.mb-lifecycle-title h2{margin:0;font-size:1.7rem}.mb-lifecycle-head p{margin:3px 0 0;color:var(--mb-muted)}.mb-lifecycle-tabs{display:grid;grid-template-columns:1fr 1fr;border:1px solid var(--mb-border);border-radius:12px;background:var(--mb-surface);padding:6px}.mb-lifecycle-tabs button{min-height:46px;border:0;border-radius:8px;background:transparent;color:var(--mb-muted);font:inherit;font-size:1rem;font-weight:750;cursor:pointer}.mb-lifecycle-tabs button[aria-selected=true]{background:var(--mb-accent);color:white}.mb-lifecycle-tabpanel{display:grid;gap:18px}.mb-lifecycle-button{min-height:40px;border:1px solid var(--mb-border);border-radius:var(--mb-control-radius,8px);background:var(--mb-input,#fff);color:var(--mb-text);cursor:pointer;font:inherit;font-weight:750;padding:9px 14px}.mb-lifecycle-button.primary{border-color:var(--mb-accent);background:var(--mb-accent);color:var(--mb-accent-contrast,#fff)}.mb-lifecycle-button:disabled{cursor:not-allowed;opacity:.5}.mb-lifecycle-actions-sheet{position:sticky;bottom:12px;z-index:24;display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:9px;padding:10px;border:1px solid var(--mb-border);border-radius:12px;background:color-mix(in srgb,var(--mb-surface) 94%,transparent);box-shadow:0 10px 34px rgba(18,35,43,.16);backdrop-filter:blur(12px)}.mb-lifecycle-card,.mb-lifecycle-panel{padding:20px;border:1px solid var(--mb-border);border-radius:var(--mb-radius,14px);background:var(--mb-surface)}.mb-lifecycle-card header{display:flex;align-items:center;justify-content:space-between;gap:20px}.mb-lifecycle-card h3,.mb-lifecycle-panel h3{margin:0;font-size:1.08rem}.mb-lifecycle-card p,.mb-lifecycle-panel p{margin:3px 0 0;color:var(--mb-muted)}.mb-lifecycle-card header>span{display:grid;place-items:center;min-width:28px;height:28px;border-radius:999px;background:var(--mb-soft);font-weight:750}.mb-lifecycle-documents{list-style:none;margin:14px 0 0;padding:0}.mb-lifecycle-documents li{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px 0;border-top:1px solid var(--mb-border)}.mb-lifecycle-documents li>div{display:grid;gap:3px;min-width:0}.mb-lifecycle-documents li span{color:var(--mb-muted);font-size:.85rem}.mb-lifecycle-dialog-backdrop{position:fixed;z-index:2147483000;inset:0;display:grid;place-items:center;padding:20px;background:rgba(18,35,43,.56);backdrop-filter:blur(3px)}.mb-lifecycle-dialog{position:relative;width:min(760px,100%);max-height:calc(100vh - 40px);overflow:auto;outline:0}.mb-lifecycle-dialog-close{position:absolute;z-index:1;top:12px;right:12px;width:34px;height:34px;border:1px solid var(--mb-border);border-radius:8px;background:var(--mb-surface);color:var(--mb-text);cursor:pointer;font:22px/1 inherit}.mb-lifecycle-panel{display:grid;gap:17px;padding-top:24px;box-shadow:0 24px 70px rgba(18,35,43,.22)}.mb-lifecycle-panel label{display:grid;gap:6px;font-size:.85rem;font-weight:750}.mb-lifecycle-panel label small{color:var(--mb-muted);font-weight:500}.mb-lifecycle-panel input,.mb-lifecycle-panel select,.mb-lifecycle-panel textarea{width:100%;min-height:44px;border:1px solid var(--mb-border);border-radius:var(--mb-control-radius,8px);background:var(--mb-input,#fff);color:var(--mb-text);font:inherit;padding:10px 12px}.mb-lifecycle-panel textarea{min-height:100px;resize:vertical}.mb-lifecycle-fields{display:grid;gap:13px}.mb-lifecycle-fields.two{grid-template-columns:repeat(2,minmax(0,1fr))}.mb-lifecycle-fields .full{grid-column:1/-1}.mb-lifecycle-panel-actions{display:flex;justify-content:flex-end;gap:8px}.mb-lifecycle-packet{display:grid;gap:0;margin:0;padding:0;border:0}.mb-lifecycle-packet legend{margin-bottom:7px;font-size:.85rem;font-weight:800}.mb-lifecycle-packet>label{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:10px;padding:10px 2px;border-top:1px solid var(--mb-border)}.mb-lifecycle-packet>label>input{width:16px;min-height:16px}.mb-lifecycle-packet>label>span{display:grid}.mb-lifecycle-packet button{border:0;background:transparent;color:var(--mb-accent);cursor:pointer;font:inherit}.mb-lifecycle-message,.mb-lifecycle-error,.mb-lifecycle-loading{padding:12px 14px;border-radius:9px}.mb-lifecycle-message.success{background:#edf9f2;color:#217449}.mb-lifecycle-message.error,.mb-lifecycle-error{background:#fff0ef;color:#9d3029}.mb-lifecycle-error{display:flex;align-items:center;gap:12px}.mb-lifecycle-error span{flex:1}.mb-lifecycle-error button{border:1px solid currentColor;border-radius:7px;background:transparent;color:inherit;padding:7px 10px}
|
|
3619
3792
|
.mb-payment-total{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;border-radius:9px;background:var(--mb-soft)}.mb-payment-total strong{font-size:1.12rem}
|
|
3620
|
-
@media(max-width:700px){.mb-lifecycle-head,.mb-lifecycle-
|
|
3793
|
+
@media(max-width:700px){.mb-lifecycle-head,.mb-lifecycle-card header{align-items:stretch;flex-direction:column}.mb-lifecycle-head>.mb-lifecycle-button{width:100%}.mb-lifecycle-actions-sheet{bottom:calc(var(--mb-host-bottom-offset,72px) + env(safe-area-inset-bottom) + 8px);grid-template-columns:repeat(2,minmax(0,1fr))}.mb-lifecycle-actions-sheet .mb-lifecycle-button:last-child:nth-child(odd){grid-column:1/-1}.mb-lifecycle-fields.two{grid-template-columns:1fr}.mb-lifecycle-fields .full{grid-column:auto}.mb-lifecycle-dialog-backdrop{align-items:end;padding:0}.mb-lifecycle-dialog{max-height:92vh}.mb-lifecycle-dialog .mb-lifecycle-panel{border-radius:18px 18px 0 0}.mb-lifecycle-tabs button{font-size:.9rem}.mb-lifecycle-title h2{font-size:1.4rem}}
|
|
3621
3794
|
`;
|
|
3622
3795
|
|
|
3623
3796
|
// src/index.tsx
|
|
@@ -3667,6 +3840,7 @@ export {
|
|
|
3667
3840
|
BILL_SUBMISSION_REQUIRED_FIELDS,
|
|
3668
3841
|
BillActivityTimeline,
|
|
3669
3842
|
BillAgingSummary,
|
|
3843
|
+
BillExplanationOfReview,
|
|
3670
3844
|
BillLifecycleActions,
|
|
3671
3845
|
BillLifecycleProgress,
|
|
3672
3846
|
BillList,
|