@mindbill/react 0.50.0 → 0.51.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 +42 -1
- package/dist/index.js +946 -765
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -348,7 +348,7 @@ function organizationProfileOptions(profile) {
|
|
|
348
348
|
|
|
349
349
|
// src/index.tsx
|
|
350
350
|
import "@mindbill/embed";
|
|
351
|
-
import { createElement, useEffect as
|
|
351
|
+
import { createElement, useEffect as useEffect16, useRef as useRef11 } from "react";
|
|
352
352
|
|
|
353
353
|
// src/native-bill-review.tsx
|
|
354
354
|
import { sanitizeBillReviewSaveInput } from "@mindbill/browser";
|
|
@@ -5592,19 +5592,198 @@ function NotificationSettingsSession({ adapter, appearance, className, style, on
|
|
|
5592
5592
|
] });
|
|
5593
5593
|
}
|
|
5594
5594
|
|
|
5595
|
+
// src/notification-recipients.tsx
|
|
5596
|
+
import { useEffect as useEffect11, useId as useId4, useRef as useRef6, useState as useState13 } from "react";
|
|
5597
|
+
import { jsx as jsx17, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
5598
|
+
function notificationRecipientInvitation(input, requestId) {
|
|
5599
|
+
const preferences = notificationSettingsUpdate({ ...input, enabled: false }, false);
|
|
5600
|
+
return {
|
|
5601
|
+
requestId,
|
|
5602
|
+
email: input.email.trim().toLowerCase(),
|
|
5603
|
+
audience: input.audience,
|
|
5604
|
+
statusUpdates: preferences.statusUpdates,
|
|
5605
|
+
agingDays: preferences.agingDays,
|
|
5606
|
+
quietHours: preferences.quietHours
|
|
5607
|
+
};
|
|
5608
|
+
}
|
|
5609
|
+
var css12 = `
|
|
5610
|
+
.mbnr{font:14px/1.5 var(--mb-font);color:var(--mb-text);min-width:0}.mbnr *{box-sizing:border-box}.mbnr h2,.mbnr h3,.mbnr p{margin:0}.mbnr h2{font-size:20px}.mbnr h3{font-size:15px}.mbnr-card{border:1px solid var(--mb-border);border-radius:var(--mb-radius);background:var(--mb-surface);padding:24px}.mbnr header{display:flex;gap:16px;justify-content:space-between;align-items:start;margin-bottom:24px}.mbnr-muted{color:var(--mb-muted)}.mbnr header p{margin-top:6px;max-width:65ch}.mbnr-badge{background:var(--mb-soft);padding:4px 9px;border-radius:var(--mb-control-radius);white-space:nowrap;font-size:12px}.mbnr-form{display:grid;gap:16px;padding:20px;background:var(--mb-soft);border-radius:var(--mb-control-radius)}.mbnr-fields{display:grid;grid-template-columns:1fr 1fr;gap:16px}.mbnr label{display:block}.mbnr label>span{display:block;font-weight:600;margin-bottom:6px}.mbnr input[type=email],.mbnr select{width:100%;min-height:44px;background:var(--mb-surface);color:var(--mb-text);font:inherit;border:1px solid var(--mb-border);border-radius:var(--mb-control-radius);padding:10px 12px}.mbnr-check{display:flex!important;gap:10px;align-items:center;min-height:36px}.mbnr input[type=checkbox]{width:17px;height:17px;accent-color:var(--mb-accent)}.mbnr fieldset{border:0;margin:0;padding:0;min-width:0}.mbnr legend{font-weight:600;margin-bottom:6px}.mbnr-days{display:flex;gap:20px;flex-wrap:wrap}.mbnr button{font:inherit;font-weight:600;min-height:44px;padding:10px 14px;border:1px solid var(--mb-border);border-radius:var(--mb-control-radius);background:var(--mb-surface);color:var(--mb-text);cursor:pointer}.mbnr button:disabled{opacity:.5;cursor:not-allowed}.mbnr button.mbnr-primary{background:var(--mb-accent);border-color:var(--mb-accent);color:var(--mb-accent-contrast)}.mbnr :is(input,button,select):focus-visible{outline:2px solid var(--mb-accent);outline-offset:3px}.mbnr-actions{display:flex;gap:12px;flex-wrap:wrap;align-items:center}.mbnr-list{margin-top:28px;display:grid;gap:12px}.mbnr-recipient{border-top:1px solid var(--mb-border);padding-top:16px;display:flex;gap:16px;justify-content:space-between;align-items:start}.mbnr-email{overflow-wrap:anywhere;font-weight:600}.mbnr-state{display:flex;gap:10px;align-items:center;flex-shrink:0}.mbnr-error{color:var(--mb-danger)}.mbnr-notice{margin-top:16px!important}.mbnr-pagination{margin-top:20px}.mbnr-empty{padding:20px 0;color:var(--mb-muted)}@media(max-width:600px){.mbnr-card{padding:18px}.mbnr-form{padding:16px}.mbnr-fields{grid-template-columns:1fr}.mbnr-recipient{flex-direction:column}.mbnr-state{width:100%;justify-content:space-between}.mbnr header{flex-wrap:wrap}}
|
|
5611
|
+
`;
|
|
5612
|
+
function NotificationRecipientsSettings(props) {
|
|
5613
|
+
return /* @__PURE__ */ jsx17(RecipientSettingsSession, { ...props }, props.identityKey);
|
|
5614
|
+
}
|
|
5615
|
+
var ConnectedNotificationRecipientsSettings = NotificationRecipientsSettings;
|
|
5616
|
+
function RecipientSettingsSession({ adapter, appearance, className, style }) {
|
|
5617
|
+
const titleId = useId4();
|
|
5618
|
+
const [snapshot, setSnapshot] = useState13(null);
|
|
5619
|
+
const [email, setEmail] = useState13("");
|
|
5620
|
+
const [audience, setAudience] = useState13("assigned_bills");
|
|
5621
|
+
const [preferences, setPreferences] = useState13(defaultNotificationPreferences);
|
|
5622
|
+
const [offset, setOffset] = useState13(0);
|
|
5623
|
+
const [reload, setReload] = useState13(0);
|
|
5624
|
+
const [busy, setBusy] = useState13(true);
|
|
5625
|
+
const [notice, setNotice] = useState13("");
|
|
5626
|
+
const [failed, setFailed] = useState13(false);
|
|
5627
|
+
const [hasReceipt, setHasReceipt] = useState13(false);
|
|
5628
|
+
const generation = useRef6(0);
|
|
5629
|
+
const pending = useRef6(null);
|
|
5630
|
+
useEffect11(() => {
|
|
5631
|
+
const current = ++generation.current;
|
|
5632
|
+
setBusy(true);
|
|
5633
|
+
setSnapshot(null);
|
|
5634
|
+
void Promise.resolve().then(() => adapter.load(offset)).then((result) => {
|
|
5635
|
+
if (current !== generation.current) return;
|
|
5636
|
+
setSnapshot(result);
|
|
5637
|
+
setBusy(false);
|
|
5638
|
+
}).catch(() => {
|
|
5639
|
+
if (current !== generation.current) return;
|
|
5640
|
+
setBusy(false);
|
|
5641
|
+
setFailed(true);
|
|
5642
|
+
setNotice("Could not load recipients. No settings have been changed.");
|
|
5643
|
+
});
|
|
5644
|
+
return () => {
|
|
5645
|
+
generation.current++;
|
|
5646
|
+
};
|
|
5647
|
+
}, [adapter, offset, reload]);
|
|
5648
|
+
async function mutate(action, invitation = false) {
|
|
5649
|
+
if (busy) return;
|
|
5650
|
+
const current = ++generation.current;
|
|
5651
|
+
setBusy(true);
|
|
5652
|
+
setNotice("");
|
|
5653
|
+
setFailed(false);
|
|
5654
|
+
try {
|
|
5655
|
+
const message = await action();
|
|
5656
|
+
if (current !== generation.current) return;
|
|
5657
|
+
if (invitation) setHasReceipt(true);
|
|
5658
|
+
setNotice(message);
|
|
5659
|
+
setReload((value) => value + 1);
|
|
5660
|
+
} catch {
|
|
5661
|
+
if (current !== generation.current) return;
|
|
5662
|
+
setBusy(false);
|
|
5663
|
+
setFailed(true);
|
|
5664
|
+
setNotice("We couldn't confirm the request. Retry unchanged to check the same invitation, or reload recipients. Do not assume an email was sent.");
|
|
5665
|
+
}
|
|
5666
|
+
}
|
|
5667
|
+
const canInvite = !busy && !!snapshot?.available && !!email.trim() && (preferences.statusUpdates || preferences.agingDays.length > 0);
|
|
5668
|
+
return /* @__PURE__ */ jsxs17("section", { className: `mbnr ${className ?? ""}`, style: { ...mindBillAppearanceStyle(appearance), ...style }, "aria-labelledby": titleId, "aria-busy": busy, children: [
|
|
5669
|
+
/* @__PURE__ */ jsx17("style", { children: css12 }),
|
|
5670
|
+
/* @__PURE__ */ jsxs17("div", { className: "mbnr-card", children: [
|
|
5671
|
+
/* @__PURE__ */ jsxs17("header", { children: [
|
|
5672
|
+
/* @__PURE__ */ jsxs17("div", { children: [
|
|
5673
|
+
/* @__PURE__ */ jsx17("h2", { id: titleId, children: "Notification recipients" }),
|
|
5674
|
+
/* @__PURE__ */ jsx17("p", { className: "mbnr-muted", children: "Add any email address for billing alerts. No MindBill console account is needed. Notifications stay off until the recipient confirms." })
|
|
5675
|
+
] }),
|
|
5676
|
+
/* @__PURE__ */ jsx17("span", { className: "mbnr-badge", children: "Default off" })
|
|
5677
|
+
] }),
|
|
5678
|
+
snapshot?.environment === "sandbox" && /* @__PURE__ */ jsx17("p", { className: "mbnr-notice mbnr-muted", children: "Sandbox preview. No emails are sent." }),
|
|
5679
|
+
snapshot && !snapshot.available && /* @__PURE__ */ jsx17("p", { className: "mbnr-notice mbnr-muted", children: "Email invitations are not available yet. Existing notifications can still be disabled." }),
|
|
5680
|
+
/* @__PURE__ */ jsxs17("form", { className: "mbnr-form", onSubmit: (event) => {
|
|
5681
|
+
event.preventDefault();
|
|
5682
|
+
if (!canInvite) return;
|
|
5683
|
+
const input = notificationRecipientInvitation({ email, audience, ...preferences }, "");
|
|
5684
|
+
const payload = JSON.stringify(input);
|
|
5685
|
+
if (pending.current?.payload !== payload) pending.current = { payload, id: crypto.randomUUID() };
|
|
5686
|
+
const requestId = pending.current.id;
|
|
5687
|
+
void mutate(async () => {
|
|
5688
|
+
const result = await adapter.invite({ ...input, requestId });
|
|
5689
|
+
return result.deliveryStatus === "sandbox_preview" ? "Sandbox invitation prepared. Notifications remain off until recipient confirmation." : result.deliveryStatus === "sent" ? "Invitation sent. Notifications remain off until the recipient confirms." : "Invitation recorded, but email delivery is not confirmed. Notifications remain off. Reload recipients before requesting a new invitation.";
|
|
5690
|
+
}, true);
|
|
5691
|
+
}, children: [
|
|
5692
|
+
/* @__PURE__ */ jsxs17("div", { className: "mbnr-fields", children: [
|
|
5693
|
+
/* @__PURE__ */ jsxs17("label", { children: [
|
|
5694
|
+
/* @__PURE__ */ jsx17("span", { children: "Recipient email" }),
|
|
5695
|
+
/* @__PURE__ */ jsx17("input", { type: "email", autoComplete: "email", required: true, maxLength: 254, value: email, disabled: busy || !snapshot?.available, placeholder: "doctor@example.com", onChange: (event) => setEmail(event.target.value) })
|
|
5696
|
+
] }),
|
|
5697
|
+
/* @__PURE__ */ jsxs17("label", { children: [
|
|
5698
|
+
/* @__PURE__ */ jsx17("span", { children: "Billing access scope" }),
|
|
5699
|
+
/* @__PURE__ */ jsxs17("select", { value: audience, disabled: busy || !snapshot?.available, onChange: (event) => setAudience(event.target.value), children: [
|
|
5700
|
+
/* @__PURE__ */ jsx17("option", { value: "assigned_bills", children: "Assigned bills only" }),
|
|
5701
|
+
/* @__PURE__ */ jsx17("option", { value: "practice", children: "All bills in this practice" })
|
|
5702
|
+
] })
|
|
5703
|
+
] })
|
|
5704
|
+
] }),
|
|
5705
|
+
/* @__PURE__ */ jsxs17("p", { className: "mbnr-muted", children: [
|
|
5706
|
+
audience === "assigned_bills" ? "Your application must assign bills on the server. Without assignments, this recipient receives no alerts." : "The invitation asks for alerts about all bills in this practice, including future bills.",
|
|
5707
|
+
" This does not grant access to the app."
|
|
5708
|
+
] }),
|
|
5709
|
+
/* @__PURE__ */ jsxs17("fieldset", { disabled: busy || !snapshot?.available, children: [
|
|
5710
|
+
/* @__PURE__ */ jsx17("legend", { children: "Alerts to request" }),
|
|
5711
|
+
/* @__PURE__ */ jsxs17("label", { className: "mbnr-check", children: [
|
|
5712
|
+
/* @__PURE__ */ jsx17("input", { type: "checkbox", checked: preferences.statusUpdates, onChange: (event) => setPreferences((value) => ({ ...value, statusUpdates: event.target.checked })) }),
|
|
5713
|
+
"Bill status and payment updates"
|
|
5714
|
+
] }),
|
|
5715
|
+
/* @__PURE__ */ jsx17("p", { className: "mbnr-muted", children: "Reminders while a bill waits for a payer:" }),
|
|
5716
|
+
/* @__PURE__ */ jsx17("div", { className: "mbnr-days", children: [30, 60, 90].map((day) => /* @__PURE__ */ jsxs17("label", { className: "mbnr-check", children: [
|
|
5717
|
+
/* @__PURE__ */ jsx17("input", { type: "checkbox", checked: preferences.agingDays.includes(day), onChange: (event) => setPreferences((value) => ({ ...value, agingDays: event.target.checked ? [...value.agingDays, day] : value.agingDays.filter((item) => item !== day) })) }),
|
|
5718
|
+
day,
|
|
5719
|
+
" days"
|
|
5720
|
+
] }, day)) }),
|
|
5721
|
+
/* @__PURE__ */ jsxs17("label", { className: "mbnr-check", children: [
|
|
5722
|
+
/* @__PURE__ */ jsx17("input", { type: "checkbox", checked: preferences.quietHours, onChange: (event) => setPreferences((value) => ({ ...value, quietHours: event.target.checked })) }),
|
|
5723
|
+
"Quiet hours \xB7 7 pm\u20137 am Pacific"
|
|
5724
|
+
] })
|
|
5725
|
+
] }),
|
|
5726
|
+
/* @__PURE__ */ jsx17("p", { className: "mbnr-muted", children: "Emails contain general alerts, not patient details, reports or attachments. The recipient reviews these choices and can unsubscribe at any time." }),
|
|
5727
|
+
/* @__PURE__ */ jsxs17("div", { className: "mbnr-actions", children: [
|
|
5728
|
+
/* @__PURE__ */ jsx17("button", { type: "submit", className: "mbnr-primary", disabled: !canInvite, children: busy ? "Please wait\u2026" : "Send confirmation invitation" }),
|
|
5729
|
+
hasReceipt && /* @__PURE__ */ jsx17("button", { type: "button", disabled: busy, onClick: () => {
|
|
5730
|
+
pending.current = null;
|
|
5731
|
+
setHasReceipt(false);
|
|
5732
|
+
setEmail("");
|
|
5733
|
+
setPreferences(defaultNotificationPreferences());
|
|
5734
|
+
setNotice("New invitation form. Reinviting the same recipient replaces their previous confirmation link and turns notifications off until they confirm again.");
|
|
5735
|
+
}, children: "Start another invitation" })
|
|
5736
|
+
] })
|
|
5737
|
+
] }),
|
|
5738
|
+
notice && /* @__PURE__ */ jsx17("p", { className: `mbnr-notice ${failed ? "mbnr-error" : "mbnr-muted"}`, role: failed ? "alert" : "status", children: notice }),
|
|
5739
|
+
/* @__PURE__ */ jsxs17("div", { className: "mbnr-list", children: [
|
|
5740
|
+
/* @__PURE__ */ jsx17("h3", { children: "Recipients" }),
|
|
5741
|
+
!snapshot && busy ? /* @__PURE__ */ jsx17("p", { role: "status", children: "Loading recipients\u2026" }) : snapshot?.recipients.length === 0 ? /* @__PURE__ */ jsx17("p", { className: "mbnr-empty", children: "No recipients yet. Nothing is sent until someone accepts an invitation." }) : snapshot?.recipients.map((recipient) => /* @__PURE__ */ jsxs17("div", { className: "mbnr-recipient", children: [
|
|
5742
|
+
/* @__PURE__ */ jsxs17("div", { children: [
|
|
5743
|
+
/* @__PURE__ */ jsx17("p", { className: "mbnr-email", children: recipient.email }),
|
|
5744
|
+
/* @__PURE__ */ jsxs17("p", { className: "mbnr-muted", children: [
|
|
5745
|
+
recipient.audience === "practice" ? "Practice-wide" : `${recipient.assignedBillCount} assigned bills`,
|
|
5746
|
+
" \xB7 ",
|
|
5747
|
+
recipient.statusUpdates ? "Status and payment updates" : "Reminders only",
|
|
5748
|
+
recipient.agingDays.length ? ` \xB7 ${recipient.agingDays.join(" / ")} day reminders` : ""
|
|
5749
|
+
] }),
|
|
5750
|
+
recipient.deliveryStatus === "unknown" && /* @__PURE__ */ jsx17("p", { className: "mbnr-muted", children: "Invitation delivery unconfirmed. No automatic resend." })
|
|
5751
|
+
] }),
|
|
5752
|
+
/* @__PURE__ */ jsxs17("div", { className: "mbnr-state", children: [
|
|
5753
|
+
/* @__PURE__ */ jsx17("span", { className: "mbnr-badge", children: { active: "On", pending_confirmation: "Pending confirmation \xB7 off", expired: "Invitation expired \xB7 off", off: "Off", unavailable: "Delivery unavailable" }[recipient.state] }),
|
|
5754
|
+
recipient.state !== "off" && /* @__PURE__ */ jsx17("button", { type: "button", disabled: busy, onClick: () => void mutate(async () => {
|
|
5755
|
+
await adapter.disable(recipient.externalUserId);
|
|
5756
|
+
return "Notifications disabled and pending invitations revoked.";
|
|
5757
|
+
}), children: "Disable" })
|
|
5758
|
+
] })
|
|
5759
|
+
] }, recipient.externalUserId))
|
|
5760
|
+
] }),
|
|
5761
|
+
/* @__PURE__ */ jsxs17("div", { className: "mbnr-actions mbnr-pagination", children: [
|
|
5762
|
+
/* @__PURE__ */ jsx17("button", { type: "button", disabled: busy, onClick: () => {
|
|
5763
|
+
setNotice("");
|
|
5764
|
+
setFailed(false);
|
|
5765
|
+
setReload((value) => value + 1);
|
|
5766
|
+
}, children: "Reload recipients" }),
|
|
5767
|
+
offset > 0 && /* @__PURE__ */ jsx17("button", { type: "button", disabled: busy, onClick: () => setOffset((value) => Math.max(0, value - 100)), children: "Previous" }),
|
|
5768
|
+
snapshot?.hasMore && /* @__PURE__ */ jsx17("button", { type: "button", disabled: busy, onClick: () => setOffset((value) => value + 100), children: "Next" })
|
|
5769
|
+
] })
|
|
5770
|
+
] })
|
|
5771
|
+
] });
|
|
5772
|
+
}
|
|
5773
|
+
|
|
5595
5774
|
// src/connected-bill-status.tsx
|
|
5596
5775
|
import {
|
|
5597
5776
|
useCallback as useCallback3,
|
|
5598
|
-
useEffect as
|
|
5777
|
+
useEffect as useEffect12,
|
|
5599
5778
|
useMemo as useMemo8,
|
|
5600
|
-
useRef as
|
|
5601
|
-
useState as
|
|
5779
|
+
useRef as useRef7,
|
|
5780
|
+
useState as useState14
|
|
5602
5781
|
} from "react";
|
|
5603
5782
|
import {
|
|
5604
5783
|
DEFAULT_API_BASE_URL as DEFAULT_API_BASE_URL2,
|
|
5605
5784
|
DEFAULT_SESSION_ENDPOINT as DEFAULT_SESSION_ENDPOINT2
|
|
5606
5785
|
} from "@mindbill/browser";
|
|
5607
|
-
import { Fragment as Fragment12, jsx as
|
|
5786
|
+
import { Fragment as Fragment12, jsx as jsx18, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
5608
5787
|
var DEFAULT_REFRESH_INTERVAL = 6e4;
|
|
5609
5788
|
async function responseError2(response, fallback) {
|
|
5610
5789
|
const body = await response.json().catch(() => null);
|
|
@@ -5744,16 +5923,16 @@ function useBillStatus({
|
|
|
5744
5923
|
apiBaseUrl,
|
|
5745
5924
|
...fetchOverride ? { fetch: fetchOverride } : {}
|
|
5746
5925
|
}), [apiBaseUrl, billId, fetchOverride, getSession, sessionEndpoint]);
|
|
5747
|
-
const [data, setData] =
|
|
5748
|
-
const [error, setError] =
|
|
5749
|
-
const [isLoading, setIsLoading] =
|
|
5750
|
-
const [isRefreshing, setIsRefreshing] =
|
|
5751
|
-
const dataRef =
|
|
5752
|
-
const initialDataRef =
|
|
5926
|
+
const [data, setData] = useState14(initialData);
|
|
5927
|
+
const [error, setError] = useState14(null);
|
|
5928
|
+
const [isLoading, setIsLoading] = useState14(enabled && !initialData);
|
|
5929
|
+
const [isRefreshing, setIsRefreshing] = useState14(false);
|
|
5930
|
+
const dataRef = useRef7(initialData);
|
|
5931
|
+
const initialDataRef = useRef7(initialData);
|
|
5753
5932
|
initialDataRef.current = initialData;
|
|
5754
|
-
const activeControllerRef =
|
|
5755
|
-
const requestSequence =
|
|
5756
|
-
|
|
5933
|
+
const activeControllerRef = useRef7(null);
|
|
5934
|
+
const requestSequence = useRef7(0);
|
|
5935
|
+
useEffect12(() => {
|
|
5757
5936
|
const seed = initialDataRef.current;
|
|
5758
5937
|
dataRef.current = seed;
|
|
5759
5938
|
setData(seed);
|
|
@@ -5794,10 +5973,10 @@ function useBillStatus({
|
|
|
5794
5973
|
}
|
|
5795
5974
|
}
|
|
5796
5975
|
}, [billId, client, enabled]);
|
|
5797
|
-
|
|
5976
|
+
useEffect12(() => {
|
|
5798
5977
|
if (enabled) void load();
|
|
5799
5978
|
}, [enabled, load]);
|
|
5800
|
-
|
|
5979
|
+
useEffect12(() => {
|
|
5801
5980
|
if (!enabled || refreshInterval <= 0) return;
|
|
5802
5981
|
const timer = window.setInterval(() => void load(), refreshInterval);
|
|
5803
5982
|
const onFocus = () => void load();
|
|
@@ -5825,17 +6004,17 @@ function ConnectedBillStatus({
|
|
|
5825
6004
|
}) {
|
|
5826
6005
|
const status = useBillStatus(options);
|
|
5827
6006
|
if (status.isLoading && !status.data) {
|
|
5828
|
-
return /* @__PURE__ */
|
|
6007
|
+
return /* @__PURE__ */ jsx18(Fragment12, { children: loadingFallback ?? /* @__PURE__ */ jsx18("div", { role: "status", children: "Loading bill status\u2026" }) });
|
|
5829
6008
|
}
|
|
5830
6009
|
if (status.error && !status.data) {
|
|
5831
|
-
return /* @__PURE__ */
|
|
6010
|
+
return /* @__PURE__ */ jsx18(Fragment12, { children: errorFallback?.(status.error, status.refresh) ?? /* @__PURE__ */ jsxs18("div", { role: "alert", children: [
|
|
5832
6011
|
status.error.message,
|
|
5833
6012
|
" ",
|
|
5834
|
-
/* @__PURE__ */
|
|
6013
|
+
/* @__PURE__ */ jsx18("button", { type: "button", onClick: () => void status.refresh(), children: "Retry" })
|
|
5835
6014
|
] }) });
|
|
5836
6015
|
}
|
|
5837
6016
|
if (!status.data) return null;
|
|
5838
|
-
return /* @__PURE__ */
|
|
6017
|
+
return /* @__PURE__ */ jsx18(
|
|
5839
6018
|
BillStatusSummary,
|
|
5840
6019
|
{
|
|
5841
6020
|
status: status.data.state,
|
|
@@ -5854,8 +6033,8 @@ function ConnectedBillStatus({
|
|
|
5854
6033
|
}
|
|
5855
6034
|
|
|
5856
6035
|
// src/bill-lifecycle-surfaces.tsx
|
|
5857
|
-
import { useEffect as
|
|
5858
|
-
import { Fragment as Fragment13, jsx as
|
|
6036
|
+
import { useEffect as useEffect13, useRef as useRef8, useState as useState15 } from "react";
|
|
6037
|
+
import { Fragment as Fragment13, jsx as jsx19, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
5859
6038
|
function visibleBillLifecycleActions(actions, showUnavailable = false) {
|
|
5860
6039
|
return actions.filter((action) => action.enabled || showUnavailable);
|
|
5861
6040
|
}
|
|
@@ -5870,11 +6049,11 @@ function BillLifecycleActions({
|
|
|
5870
6049
|
}) {
|
|
5871
6050
|
const visible = visibleBillLifecycleActions(actions, showUnavailable);
|
|
5872
6051
|
if (!visible.length) return null;
|
|
5873
|
-
return /* @__PURE__ */
|
|
5874
|
-
/* @__PURE__ */
|
|
5875
|
-
visible.map((action) => /* @__PURE__ */
|
|
5876
|
-
/* @__PURE__ */
|
|
5877
|
-
!action.enabled && action.reason ? /* @__PURE__ */
|
|
6052
|
+
return /* @__PURE__ */ jsxs19("div", { className: classes("mb-lifecycle-actions", className), style: mindBillAppearanceStyle(appearance, style), "aria-label": "Bill actions", children: [
|
|
6053
|
+
/* @__PURE__ */ jsx19("style", { children: lifecycleSurfaceStyles }),
|
|
6054
|
+
visible.map((action) => /* @__PURE__ */ jsxs19("div", { className: "mb-lifecycle-action", children: [
|
|
6055
|
+
/* @__PURE__ */ jsx19("button", { type: "button", className: action.primary ? "mb-action-button is-primary" : "mb-action-button", disabled: disabled || !action.enabled, onClick: () => onAction(action), children: action.label }),
|
|
6056
|
+
!action.enabled && action.reason ? /* @__PURE__ */ jsx19("span", { className: "mb-action-reason", children: action.reason }) : null
|
|
5878
6057
|
] }, action.id))
|
|
5879
6058
|
] });
|
|
5880
6059
|
}
|
|
@@ -5904,18 +6083,18 @@ function defaultFormatDate(createdAt) {
|
|
|
5904
6083
|
return new Intl.DateTimeFormat(void 0, { dateStyle: "medium", timeStyle: "short" }).format(parsed);
|
|
5905
6084
|
}
|
|
5906
6085
|
function BillActivityTimeline({ events, emptyLabel = "No bill activity yet.", appearance, className, style, formatDate = defaultFormatDate }) {
|
|
5907
|
-
return /* @__PURE__ */
|
|
5908
|
-
/* @__PURE__ */
|
|
5909
|
-
/* @__PURE__ */
|
|
5910
|
-
/* @__PURE__ */
|
|
5911
|
-
/* @__PURE__ */
|
|
6086
|
+
return /* @__PURE__ */ jsxs19("section", { className: classes("mb-surface mb-activity", className), style: mindBillAppearanceStyle(appearance, style), "aria-label": "Bill activity", children: [
|
|
6087
|
+
/* @__PURE__ */ jsx19("style", { children: lifecycleSurfaceStyles }),
|
|
6088
|
+
/* @__PURE__ */ jsx19("header", { className: "mb-surface-heading", children: /* @__PURE__ */ jsxs19("div", { children: [
|
|
6089
|
+
/* @__PURE__ */ jsx19("strong", { children: "Bill history" }),
|
|
6090
|
+
/* @__PURE__ */ jsx19("span", { children: "Submission, payer responses, follow-up, and payments." })
|
|
5912
6091
|
] }) }),
|
|
5913
|
-
!events.length ? /* @__PURE__ */
|
|
5914
|
-
/* @__PURE__ */
|
|
5915
|
-
/* @__PURE__ */
|
|
5916
|
-
/* @__PURE__ */
|
|
5917
|
-
event.description ? /* @__PURE__ */
|
|
5918
|
-
/* @__PURE__ */
|
|
6092
|
+
!events.length ? /* @__PURE__ */ jsx19("p", { className: "mb-activity-empty", children: emptyLabel }) : /* @__PURE__ */ jsx19("ol", { className: "mb-activity-list", children: events.map((event) => /* @__PURE__ */ jsxs19("li", { className: "mb-activity-item", children: [
|
|
6093
|
+
/* @__PURE__ */ jsx19("span", { className: "mb-activity-marker", "aria-hidden": "true" }),
|
|
6094
|
+
/* @__PURE__ */ jsxs19("div", { className: "mb-activity-content", children: [
|
|
6095
|
+
/* @__PURE__ */ jsx19("strong", { children: event.title ?? billActivityEventLabel(event.type) }),
|
|
6096
|
+
event.description ? /* @__PURE__ */ jsx19("p", { children: event.description }) : null,
|
|
6097
|
+
/* @__PURE__ */ jsxs19("span", { children: [
|
|
5919
6098
|
formatDate(event.createdAt),
|
|
5920
6099
|
event.actor ? ` \xB7 ${event.actor}` : ""
|
|
5921
6100
|
] })
|
|
@@ -5929,49 +6108,49 @@ function historyDate(iso) {
|
|
|
5929
6108
|
return new Intl.DateTimeFormat("en-US", { month: "2-digit", day: "2-digit", year: "numeric" }).format(parsed);
|
|
5930
6109
|
}
|
|
5931
6110
|
function BillHistoryTable({ entries, selectedEntryId, emptyLabel = "No bill history yet.", appearance, className, style, formatDate = historyDate, documentHref, onOpenDocument }) {
|
|
5932
|
-
const [expanded, setExpanded] =
|
|
5933
|
-
const selectedRowRef =
|
|
5934
|
-
|
|
6111
|
+
const [expanded, setExpanded] = useState15({});
|
|
6112
|
+
const selectedRowRef = useRef8(null);
|
|
6113
|
+
useEffect13(() => {
|
|
5935
6114
|
if (!selectedEntryId) return;
|
|
5936
6115
|
const selected = entries.find((entry) => entry.id === selectedEntryId);
|
|
5937
6116
|
if (selected?.details) setExpanded((current) => current[selectedEntryId] ? current : { ...current, [selectedEntryId]: true });
|
|
5938
6117
|
selectedRowRef.current?.scrollIntoView({ behavior: "smooth", block: "center" });
|
|
5939
6118
|
}, [entries, selectedEntryId]);
|
|
5940
|
-
return /* @__PURE__ */
|
|
5941
|
-
/* @__PURE__ */
|
|
5942
|
-
/* @__PURE__ */
|
|
5943
|
-
/* @__PURE__ */
|
|
5944
|
-
/* @__PURE__ */
|
|
6119
|
+
return /* @__PURE__ */ jsxs19("section", { className: classes("mb-surface mb-history", className), style: mindBillAppearanceStyle(appearance, style), "aria-label": "Bill history", children: [
|
|
6120
|
+
/* @__PURE__ */ jsx19("style", { children: lifecycleSurfaceStyles }),
|
|
6121
|
+
/* @__PURE__ */ jsx19("header", { className: "mb-surface-heading", children: /* @__PURE__ */ jsxs19("div", { children: [
|
|
6122
|
+
/* @__PURE__ */ jsx19("strong", { children: "Bill history" }),
|
|
6123
|
+
/* @__PURE__ */ jsx19("span", { children: "Submissions, payer responses, follow-up, and payments." })
|
|
5945
6124
|
] }) }),
|
|
5946
|
-
!entries.length ? /* @__PURE__ */
|
|
5947
|
-
/* @__PURE__ */
|
|
5948
|
-
/* @__PURE__ */
|
|
5949
|
-
/* @__PURE__ */
|
|
5950
|
-
/* @__PURE__ */
|
|
5951
|
-
/* @__PURE__ */
|
|
6125
|
+
!entries.length ? /* @__PURE__ */ jsx19("p", { className: "mb-activity-empty", children: emptyLabel }) : /* @__PURE__ */ jsxs19("div", { className: "mb-history-table", children: [
|
|
6126
|
+
/* @__PURE__ */ jsxs19("div", { className: "mb-history-head", "aria-hidden": "true", children: [
|
|
6127
|
+
/* @__PURE__ */ jsx19("span", { children: "Date" }),
|
|
6128
|
+
/* @__PURE__ */ jsx19("span", { children: "Action" }),
|
|
6129
|
+
/* @__PURE__ */ jsx19("span", { children: "User" }),
|
|
6130
|
+
/* @__PURE__ */ jsx19("span", { children: "Details" })
|
|
5952
6131
|
] }),
|
|
5953
|
-
/* @__PURE__ */
|
|
6132
|
+
/* @__PURE__ */ jsx19("ul", { className: "mb-history-rows", children: entries.map((entry) => {
|
|
5954
6133
|
const isSelected = entry.id === selectedEntryId;
|
|
5955
6134
|
const expandable = Boolean(entry.details);
|
|
5956
6135
|
const isOpen = expandable && Boolean(expanded[entry.id]);
|
|
5957
6136
|
const details = entry.details;
|
|
5958
|
-
const lineContents = /* @__PURE__ */
|
|
5959
|
-
/* @__PURE__ */
|
|
5960
|
-
/* @__PURE__ */
|
|
5961
|
-
/* @__PURE__ */
|
|
5962
|
-
/* @__PURE__ */
|
|
5963
|
-
expandable ? /* @__PURE__ */
|
|
6137
|
+
const lineContents = /* @__PURE__ */ jsxs19(Fragment13, { children: [
|
|
6138
|
+
/* @__PURE__ */ jsx19("span", { className: "mb-history-date", children: formatDate(entry.date) }),
|
|
6139
|
+
/* @__PURE__ */ jsx19("span", { className: "mb-history-action", children: entry.action }),
|
|
6140
|
+
/* @__PURE__ */ jsx19("span", { className: "mb-history-actor", children: entry.actor ?? "\u2014" }),
|
|
6141
|
+
/* @__PURE__ */ jsxs19("span", { className: "mb-history-summary", children: [
|
|
6142
|
+
expandable ? /* @__PURE__ */ jsx19("i", { className: `mb-history-caret${isOpen ? " is-open" : ""}`, "aria-hidden": "true" }) : null,
|
|
5964
6143
|
entry.summary
|
|
5965
6144
|
] })
|
|
5966
6145
|
] });
|
|
5967
|
-
return /* @__PURE__ */
|
|
6146
|
+
return /* @__PURE__ */ jsxs19(
|
|
5968
6147
|
"li",
|
|
5969
6148
|
{
|
|
5970
6149
|
ref: isSelected ? selectedRowRef : void 0,
|
|
5971
6150
|
className: `mb-history-row is-${entry.tone}${isSelected ? " is-selected" : ""}`,
|
|
5972
6151
|
"aria-current": isSelected ? "true" : void 0,
|
|
5973
6152
|
children: [
|
|
5974
|
-
expandable ? /* @__PURE__ */
|
|
6153
|
+
expandable ? /* @__PURE__ */ jsx19(
|
|
5975
6154
|
"button",
|
|
5976
6155
|
{
|
|
5977
6156
|
type: "button",
|
|
@@ -5980,31 +6159,31 @@ function BillHistoryTable({ entries, selectedEntryId, emptyLabel = "No bill hist
|
|
|
5980
6159
|
onClick: () => setExpanded((current) => ({ ...current, [entry.id]: !current[entry.id] })),
|
|
5981
6160
|
children: lineContents
|
|
5982
6161
|
}
|
|
5983
|
-
) : /* @__PURE__ */
|
|
5984
|
-
isOpen && details ? /* @__PURE__ */
|
|
5985
|
-
details.rows?.length ? /* @__PURE__ */
|
|
5986
|
-
/* @__PURE__ */
|
|
5987
|
-
/* @__PURE__ */
|
|
6162
|
+
) : /* @__PURE__ */ jsx19("div", { className: "mb-history-line", children: lineContents }),
|
|
6163
|
+
isOpen && details ? /* @__PURE__ */ jsxs19("div", { className: "mb-history-details", children: [
|
|
6164
|
+
details.rows?.length ? /* @__PURE__ */ jsx19("dl", { className: "mb-history-kv", children: details.rows.map((row) => /* @__PURE__ */ jsxs19("div", { children: [
|
|
6165
|
+
/* @__PURE__ */ jsx19("dt", { children: row.label }),
|
|
6166
|
+
/* @__PURE__ */ jsx19("dd", { children: row.value })
|
|
5988
6167
|
] }, `${row.label}-${row.value}`)) }) : null,
|
|
5989
|
-
details.documents?.length ? /* @__PURE__ */
|
|
5990
|
-
/* @__PURE__ */
|
|
5991
|
-
/* @__PURE__ */
|
|
6168
|
+
details.documents?.length ? /* @__PURE__ */ jsx19("div", { className: "mb-history-kv", children: /* @__PURE__ */ jsxs19("div", { children: [
|
|
6169
|
+
/* @__PURE__ */ jsx19("dt", { children: "Documents" }),
|
|
6170
|
+
/* @__PURE__ */ jsx19("dd", { children: details.documents.map((doc) => {
|
|
5992
6171
|
const href = documentHref?.(doc) ?? null;
|
|
5993
|
-
return href ? /* @__PURE__ */
|
|
6172
|
+
return href ? /* @__PURE__ */ jsx19("a", { className: "mb-history-doc", href, target: "_blank", rel: "noreferrer", children: doc.filename }, doc.id) : onOpenDocument ? /* @__PURE__ */ jsx19("button", { type: "button", className: "mb-history-doc", onClick: () => void onOpenDocument(doc), children: doc.filename }, doc.id) : /* @__PURE__ */ jsx19("span", { className: "mb-history-doc", children: doc.filename }, doc.id);
|
|
5994
6173
|
}) })
|
|
5995
6174
|
] }) }) : null,
|
|
5996
|
-
details.codes?.length ? /* @__PURE__ */
|
|
5997
|
-
/* @__PURE__ */
|
|
5998
|
-
/* @__PURE__ */
|
|
6175
|
+
details.codes?.length ? /* @__PURE__ */ jsx19("dl", { className: "mb-history-codes", children: details.codes.map((code) => /* @__PURE__ */ jsxs19("div", { children: [
|
|
6176
|
+
/* @__PURE__ */ jsx19("dt", { children: code.code }),
|
|
6177
|
+
/* @__PURE__ */ jsx19("dd", { children: code.text })
|
|
5999
6178
|
] }, code.code)) }) : null,
|
|
6000
|
-
details.complianceDueDates?.length ? /* @__PURE__ */
|
|
6001
|
-
/* @__PURE__ */
|
|
6002
|
-
/* @__PURE__ */
|
|
6003
|
-
/* @__PURE__ */
|
|
6004
|
-
/* @__PURE__ */
|
|
6179
|
+
details.complianceDueDates?.length ? /* @__PURE__ */ jsxs19("div", { className: "mb-history-due", children: [
|
|
6180
|
+
/* @__PURE__ */ jsx19("em", { children: "Compliance Due Dates" }),
|
|
6181
|
+
/* @__PURE__ */ jsx19("dl", { children: details.complianceDueDates.map((due) => /* @__PURE__ */ jsxs19("div", { children: [
|
|
6182
|
+
/* @__PURE__ */ jsx19("dt", { children: formatDate(due.date) }),
|
|
6183
|
+
/* @__PURE__ */ jsx19("dd", { children: due.text })
|
|
6005
6184
|
] }, `${due.date}-${due.text}`)) })
|
|
6006
6185
|
] }) : null,
|
|
6007
|
-
details.text ? /* @__PURE__ */
|
|
6186
|
+
details.text ? /* @__PURE__ */ jsx19("p", { className: "mb-history-text", children: details.text }) : null
|
|
6008
6187
|
] }) : null
|
|
6009
6188
|
]
|
|
6010
6189
|
},
|
|
@@ -6065,15 +6244,15 @@ function BillLifecycleProgress({ state, nativeStatus, submittedAt, agingDays, dr
|
|
|
6065
6244
|
const rejected = state.toLowerCase() === "rejected";
|
|
6066
6245
|
const draft = Boolean(draftStage) && isBillLifecycleDraft(state);
|
|
6067
6246
|
const steps = billLifecycleProgressSteps(state, { draftStage: Boolean(draftStage) });
|
|
6068
|
-
return /* @__PURE__ */
|
|
6069
|
-
/* @__PURE__ */
|
|
6070
|
-
/* @__PURE__ */
|
|
6071
|
-
/* @__PURE__ */
|
|
6072
|
-
/* @__PURE__ */
|
|
6247
|
+
return /* @__PURE__ */ jsxs19("section", { className: classes(`mb-surface mb-progress${rejected ? " is-rejected" : ""}`, className), style: mindBillAppearanceStyle(appearance, style), "aria-label": "Bill lifecycle", children: [
|
|
6248
|
+
/* @__PURE__ */ jsx19("style", { children: lifecycleSurfaceStyles }),
|
|
6249
|
+
/* @__PURE__ */ jsx19("header", { className: "mb-surface-heading", children: /* @__PURE__ */ jsxs19("div", { children: [
|
|
6250
|
+
/* @__PURE__ */ jsx19("strong", { children: billLifecycleDisplayLabel(state, nativeStatus) }),
|
|
6251
|
+
/* @__PURE__ */ jsx19("span", { children: rejected ? "The payer rejected this submission." : draft ? "Not yet sent" : `${submittedAt ? `Submitted ${defaultFormatDate(submittedAt)}` : "Submitted"}${typeof agingDays === "number" ? ` \xB7 ${agingDays} days old` : ""}` })
|
|
6073
6252
|
] }) }),
|
|
6074
|
-
/* @__PURE__ */
|
|
6075
|
-
/* @__PURE__ */
|
|
6076
|
-
/* @__PURE__ */
|
|
6253
|
+
/* @__PURE__ */ jsx19("ol", { className: "mb-progress-list", style: { gridTemplateColumns: `repeat(${steps.length}, minmax(0, 1fr))` }, children: steps.map((step, index) => /* @__PURE__ */ jsxs19("li", { className: `is-${step.status}`, "aria-current": step.status === "current" ? "step" : void 0, children: [
|
|
6254
|
+
/* @__PURE__ */ jsx19("span", { "aria-hidden": "true", children: step.status === "complete" ? "\u2713" : rejected && step.status === "current" ? "!" : index + 1 }),
|
|
6255
|
+
/* @__PURE__ */ jsx19("b", { children: step.label })
|
|
6077
6256
|
] }, step.id)) })
|
|
6078
6257
|
] });
|
|
6079
6258
|
}
|
|
@@ -6087,48 +6266,48 @@ function billRejectionIssueSummary(rejection, count) {
|
|
|
6087
6266
|
function BillRejectionNotice({ rejection, title = "Rejected \u2014 action required", submittedAt, appearance, className, style, formatDate = defaultFormatDate }) {
|
|
6088
6267
|
const issues = rejection.issues?.length ? rejection.issues : [{ code: rejection.code, description: rejection.reason }];
|
|
6089
6268
|
const hasCodes = issues.some((issue) => Boolean(issue.code));
|
|
6090
|
-
return /* @__PURE__ */
|
|
6091
|
-
/* @__PURE__ */
|
|
6092
|
-
/* @__PURE__ */
|
|
6093
|
-
/* @__PURE__ */
|
|
6094
|
-
/* @__PURE__ */
|
|
6095
|
-
/* @__PURE__ */
|
|
6096
|
-
/* @__PURE__ */
|
|
6097
|
-
/* @__PURE__ */
|
|
6269
|
+
return /* @__PURE__ */ jsxs19("section", { className: classes("mb-surface mb-rejection-notice", className), style: mindBillAppearanceStyle(appearance, style), role: "alert", "aria-label": "Bill rejection reasons", children: [
|
|
6270
|
+
/* @__PURE__ */ jsx19("style", { children: lifecycleSurfaceStyles }),
|
|
6271
|
+
/* @__PURE__ */ jsxs19("div", { className: "mb-rejection-overview", children: [
|
|
6272
|
+
/* @__PURE__ */ jsxs19("header", { className: "mb-rejection-heading", children: [
|
|
6273
|
+
/* @__PURE__ */ jsx19("span", { className: "mb-rejection-icon", "aria-hidden": "true", children: "!" }),
|
|
6274
|
+
/* @__PURE__ */ jsxs19("div", { children: [
|
|
6275
|
+
/* @__PURE__ */ jsx19("strong", { children: title }),
|
|
6276
|
+
/* @__PURE__ */ jsxs19("span", { children: [
|
|
6098
6277
|
"Fix the ",
|
|
6099
6278
|
issues.length === 1 ? "issue" : "issues",
|
|
6100
6279
|
" below, then resubmit."
|
|
6101
6280
|
] })
|
|
6102
6281
|
] })
|
|
6103
6282
|
] }),
|
|
6104
|
-
/* @__PURE__ */
|
|
6105
|
-
/* @__PURE__ */
|
|
6106
|
-
/* @__PURE__ */
|
|
6107
|
-
/* @__PURE__ */
|
|
6108
|
-
submittedAt ? /* @__PURE__ */
|
|
6283
|
+
/* @__PURE__ */ jsxs19("ol", { className: "mb-rejection-progress", "aria-label": "Submission status", children: [
|
|
6284
|
+
/* @__PURE__ */ jsxs19("li", { className: "is-complete", children: [
|
|
6285
|
+
/* @__PURE__ */ jsx19("span", { "aria-hidden": "true", children: "\u2713" }),
|
|
6286
|
+
/* @__PURE__ */ jsx19("b", { children: "Sent" }),
|
|
6287
|
+
submittedAt ? /* @__PURE__ */ jsx19("small", { children: formatDate(submittedAt) }) : null
|
|
6109
6288
|
] }),
|
|
6110
|
-
/* @__PURE__ */
|
|
6111
|
-
/* @__PURE__ */
|
|
6112
|
-
/* @__PURE__ */
|
|
6113
|
-
rejection.receivedAt ? /* @__PURE__ */
|
|
6289
|
+
/* @__PURE__ */ jsxs19("li", { className: "is-rejected", "aria-current": "step", children: [
|
|
6290
|
+
/* @__PURE__ */ jsx19("span", { "aria-hidden": "true", children: "!" }),
|
|
6291
|
+
/* @__PURE__ */ jsx19("b", { children: "Rejected" }),
|
|
6292
|
+
rejection.receivedAt ? /* @__PURE__ */ jsx19("small", { children: formatDate(rejection.receivedAt) }) : null
|
|
6114
6293
|
] })
|
|
6115
6294
|
] })
|
|
6116
6295
|
] }),
|
|
6117
|
-
/* @__PURE__ */
|
|
6118
|
-
/* @__PURE__ */
|
|
6119
|
-
/* @__PURE__ */
|
|
6120
|
-
/* @__PURE__ */
|
|
6296
|
+
/* @__PURE__ */ jsxs19("div", { className: "mb-rejection-issues", "aria-label": "Rejection reasons", children: [
|
|
6297
|
+
/* @__PURE__ */ jsxs19("div", { className: "mb-rejection-issues-heading", children: [
|
|
6298
|
+
/* @__PURE__ */ jsxs19("strong", { children: [
|
|
6299
|
+
/* @__PURE__ */ jsx19("span", { "aria-hidden": "true", children: "\u25B3" }),
|
|
6121
6300
|
" Rejection reasons"
|
|
6122
6301
|
] }),
|
|
6123
|
-
/* @__PURE__ */
|
|
6302
|
+
/* @__PURE__ */ jsx19("span", { children: billRejectionIssueSummary(rejection, issues.length) })
|
|
6124
6303
|
] }),
|
|
6125
|
-
/* @__PURE__ */
|
|
6126
|
-
/* @__PURE__ */
|
|
6127
|
-
/* @__PURE__ */
|
|
6128
|
-
issue.code ? /* @__PURE__ */
|
|
6304
|
+
/* @__PURE__ */ jsx19("ol", { "aria-label": `${issues.length} rejection ${issues.length === 1 ? "reason" : "reasons"}`, children: issues.map((issue, index) => /* @__PURE__ */ jsxs19("li", { children: [
|
|
6305
|
+
/* @__PURE__ */ jsx19("span", { className: "mb-rejection-bullet", "aria-hidden": "true" }),
|
|
6306
|
+
/* @__PURE__ */ jsx19("p", { children: issue.description }),
|
|
6307
|
+
issue.code ? /* @__PURE__ */ jsx19("span", { className: "mb-rejection-code", children: issue.code }) : null
|
|
6129
6308
|
] }, `${issue.code ?? "issue"}-${index}`)) }),
|
|
6130
|
-
hasCodes ? /* @__PURE__ */
|
|
6131
|
-
/* @__PURE__ */
|
|
6309
|
+
hasCodes ? /* @__PURE__ */ jsxs19("p", { className: "mb-rejection-code-note", children: [
|
|
6310
|
+
/* @__PURE__ */ jsx19("span", { "aria-hidden": "true", children: "i" }),
|
|
6132
6311
|
" Technical error codes are included for support and auditability."
|
|
6133
6312
|
] }) : null
|
|
6134
6313
|
] })
|
|
@@ -6143,18 +6322,18 @@ function BillSnapshotSummary({ bill, patient, injury, delivery, appearance, clas
|
|
|
6143
6322
|
["Charged", currency(bill.totalCharge)],
|
|
6144
6323
|
["Balance", currency(bill.balanceDue)]
|
|
6145
6324
|
];
|
|
6146
|
-
return /* @__PURE__ */
|
|
6147
|
-
/* @__PURE__ */
|
|
6148
|
-
/* @__PURE__ */
|
|
6149
|
-
/* @__PURE__ */
|
|
6150
|
-
/* @__PURE__ */
|
|
6325
|
+
return /* @__PURE__ */ jsxs19("section", { className: classes("mb-surface mb-snapshot", className), style: mindBillAppearanceStyle(appearance, style), "aria-label": "Bill snapshot", children: [
|
|
6326
|
+
/* @__PURE__ */ jsx19("style", { children: lifecycleSurfaceStyles }),
|
|
6327
|
+
/* @__PURE__ */ jsx19("header", { className: "mb-surface-heading", children: /* @__PURE__ */ jsxs19("div", { children: [
|
|
6328
|
+
/* @__PURE__ */ jsx19("strong", { children: "Bill snapshot" }),
|
|
6329
|
+
/* @__PURE__ */ jsxs19("span", { children: [
|
|
6151
6330
|
"Bill #",
|
|
6152
6331
|
bill.billNumber
|
|
6153
6332
|
] })
|
|
6154
6333
|
] }) }),
|
|
6155
|
-
/* @__PURE__ */
|
|
6156
|
-
/* @__PURE__ */
|
|
6157
|
-
/* @__PURE__ */
|
|
6334
|
+
/* @__PURE__ */ jsx19("dl", { children: values.map(([label, value]) => /* @__PURE__ */ jsxs19("div", { children: [
|
|
6335
|
+
/* @__PURE__ */ jsx19("dt", { children: label }),
|
|
6336
|
+
/* @__PURE__ */ jsx19("dd", { children: value })
|
|
6158
6337
|
] }, label)) })
|
|
6159
6338
|
] });
|
|
6160
6339
|
}
|
|
@@ -6169,140 +6348,140 @@ function BillExplanationOfReview({
|
|
|
6169
6348
|
style
|
|
6170
6349
|
}) {
|
|
6171
6350
|
const rows = payments.length ? payments : [null];
|
|
6172
|
-
return /* @__PURE__ */
|
|
6173
|
-
/* @__PURE__ */
|
|
6174
|
-
/* @__PURE__ */
|
|
6175
|
-
/* @__PURE__ */
|
|
6176
|
-
/* @__PURE__ */
|
|
6351
|
+
return /* @__PURE__ */ jsxs19("section", { className: classes("mb-surface mb-eor-review", className), style: mindBillAppearanceStyle(appearance, style), "aria-label": "Explanation of Review and payments", children: [
|
|
6352
|
+
/* @__PURE__ */ jsx19("style", { children: lifecycleSurfaceStyles }),
|
|
6353
|
+
/* @__PURE__ */ jsx19("header", { className: "mb-surface-heading", children: /* @__PURE__ */ jsxs19("div", { children: [
|
|
6354
|
+
/* @__PURE__ */ jsx19("strong", { children: "Explanation of Review" }),
|
|
6355
|
+
/* @__PURE__ */ jsx19("span", { children: "Payer response and payment reconciliation." })
|
|
6177
6356
|
] }) }),
|
|
6178
|
-
/* @__PURE__ */
|
|
6179
|
-
/* @__PURE__ */
|
|
6180
|
-
/* @__PURE__ */
|
|
6181
|
-
/* @__PURE__ */
|
|
6357
|
+
/* @__PURE__ */ jsxs19("dl", { className: "mb-eor-metrics", children: [
|
|
6358
|
+
/* @__PURE__ */ jsxs19("div", { children: [
|
|
6359
|
+
/* @__PURE__ */ jsx19("dt", { children: "Amount billed" }),
|
|
6360
|
+
/* @__PURE__ */ jsx19("dd", { children: currency(remittance.billedAmount) })
|
|
6182
6361
|
] }),
|
|
6183
|
-
/* @__PURE__ */
|
|
6184
|
-
/* @__PURE__ */
|
|
6185
|
-
/* @__PURE__ */
|
|
6362
|
+
/* @__PURE__ */ jsxs19("div", { children: [
|
|
6363
|
+
/* @__PURE__ */ jsx19("dt", { children: "Payer allowed" }),
|
|
6364
|
+
/* @__PURE__ */ jsx19("dd", { children: remittance.payerAllowedAmount === null ? "\u2014" : currency(remittance.payerAllowedAmount) })
|
|
6186
6365
|
] }),
|
|
6187
|
-
/* @__PURE__ */
|
|
6188
|
-
/* @__PURE__ */
|
|
6189
|
-
/* @__PURE__ */
|
|
6366
|
+
/* @__PURE__ */ jsxs19("div", { children: [
|
|
6367
|
+
/* @__PURE__ */ jsx19("dt", { children: "Payer reported paid" }),
|
|
6368
|
+
/* @__PURE__ */ jsx19("dd", { children: remittance.payerReportedPaid === null ? "\u2014" : currency(remittance.payerReportedPaid) })
|
|
6190
6369
|
] }),
|
|
6191
|
-
/* @__PURE__ */
|
|
6192
|
-
/* @__PURE__ */
|
|
6193
|
-
/* @__PURE__ */
|
|
6370
|
+
/* @__PURE__ */ jsxs19("div", { className: "is-balance", children: [
|
|
6371
|
+
/* @__PURE__ */ jsx19("dt", { children: "Balance due" }),
|
|
6372
|
+
/* @__PURE__ */ jsx19("dd", { children: currency(remittance.balanceDue) })
|
|
6194
6373
|
] }),
|
|
6195
|
-
/* @__PURE__ */
|
|
6196
|
-
/* @__PURE__ */
|
|
6197
|
-
/* @__PURE__ */
|
|
6374
|
+
/* @__PURE__ */ jsxs19("div", { children: [
|
|
6375
|
+
/* @__PURE__ */ jsx19("dt", { children: "Payment posted" }),
|
|
6376
|
+
/* @__PURE__ */ jsx19("dd", { children: currency(remittance.postedPrincipal) })
|
|
6198
6377
|
] }),
|
|
6199
|
-
/* @__PURE__ */
|
|
6200
|
-
/* @__PURE__ */
|
|
6201
|
-
/* @__PURE__ */
|
|
6378
|
+
/* @__PURE__ */ jsxs19("div", { children: [
|
|
6379
|
+
/* @__PURE__ */ jsx19("dt", { children: "Penalty & interest" }),
|
|
6380
|
+
/* @__PURE__ */ jsx19("dd", { children: currency(remittance.postedAdditional) })
|
|
6202
6381
|
] }),
|
|
6203
|
-
/* @__PURE__ */
|
|
6204
|
-
/* @__PURE__ */
|
|
6205
|
-
/* @__PURE__ */
|
|
6382
|
+
/* @__PURE__ */ jsxs19("div", { children: [
|
|
6383
|
+
/* @__PURE__ */ jsx19("dt", { children: "Total received" }),
|
|
6384
|
+
/* @__PURE__ */ jsx19("dd", { children: currency(remittance.totalPostedCash) })
|
|
6206
6385
|
] }),
|
|
6207
|
-
/* @__PURE__ */
|
|
6208
|
-
/* @__PURE__ */
|
|
6209
|
-
/* @__PURE__ */
|
|
6386
|
+
/* @__PURE__ */ jsxs19("div", { children: [
|
|
6387
|
+
/* @__PURE__ */ jsx19("dt", { children: "Expected" }),
|
|
6388
|
+
/* @__PURE__ */ jsx19("dd", { children: currency(remittance.expectedAmount) })
|
|
6210
6389
|
] })
|
|
6211
6390
|
] }),
|
|
6212
|
-
remittance.denialReason ? /* @__PURE__ */
|
|
6213
|
-
/* @__PURE__ */
|
|
6214
|
-
/* @__PURE__ */
|
|
6391
|
+
remittance.denialReason ? /* @__PURE__ */ jsxs19("div", { className: "mb-denial", children: [
|
|
6392
|
+
/* @__PURE__ */ jsx19("strong", { children: "Denial reason" }),
|
|
6393
|
+
/* @__PURE__ */ jsx19("p", { children: remittance.denialReason })
|
|
6215
6394
|
] }) : null,
|
|
6216
|
-
/* @__PURE__ */
|
|
6217
|
-
/* @__PURE__ */
|
|
6218
|
-
/* @__PURE__ */
|
|
6219
|
-
/* @__PURE__ */
|
|
6220
|
-
/* @__PURE__ */
|
|
6221
|
-
/* @__PURE__ */
|
|
6222
|
-
/* @__PURE__ */
|
|
6395
|
+
/* @__PURE__ */ jsx19("div", { className: "mb-eor-table-wrap", children: /* @__PURE__ */ jsxs19("table", { className: "mb-eor-table", children: [
|
|
6396
|
+
/* @__PURE__ */ jsxs19("thead", { children: [
|
|
6397
|
+
/* @__PURE__ */ jsxs19("tr", { className: "mb-eor-groups", children: [
|
|
6398
|
+
/* @__PURE__ */ jsx19("th", { colSpan: 2, children: "Submission" }),
|
|
6399
|
+
/* @__PURE__ */ jsx19("th", { colSpan: 5, children: "EOR payment information" }),
|
|
6400
|
+
/* @__PURE__ */ jsx19("th", { colSpan: 2, children: "EOR post" }),
|
|
6401
|
+
/* @__PURE__ */ jsx19("th", { children: "EOR" })
|
|
6223
6402
|
] }),
|
|
6224
|
-
/* @__PURE__ */
|
|
6225
|
-
/* @__PURE__ */
|
|
6226
|
-
/* @__PURE__ */
|
|
6227
|
-
/* @__PURE__ */
|
|
6228
|
-
/* @__PURE__ */
|
|
6229
|
-
/* @__PURE__ */
|
|
6230
|
-
/* @__PURE__ */
|
|
6231
|
-
/* @__PURE__ */
|
|
6232
|
-
/* @__PURE__ */
|
|
6233
|
-
/* @__PURE__ */
|
|
6234
|
-
/* @__PURE__ */
|
|
6403
|
+
/* @__PURE__ */ jsxs19("tr", { children: [
|
|
6404
|
+
/* @__PURE__ */ jsx19("th", { children: "Submission" }),
|
|
6405
|
+
/* @__PURE__ */ jsx19("th", { children: "Submission payment" }),
|
|
6406
|
+
/* @__PURE__ */ jsx19("th", { children: "Payment method" }),
|
|
6407
|
+
/* @__PURE__ */ jsx19("th", { children: "Reference" }),
|
|
6408
|
+
/* @__PURE__ */ jsx19("th", { children: "Effective date" }),
|
|
6409
|
+
/* @__PURE__ */ jsx19("th", { children: "Payment total" }),
|
|
6410
|
+
/* @__PURE__ */ jsx19("th", { children: "Deposit date" }),
|
|
6411
|
+
/* @__PURE__ */ jsx19("th", { children: "Post date" }),
|
|
6412
|
+
/* @__PURE__ */ jsx19("th", { children: "Source" }),
|
|
6413
|
+
/* @__PURE__ */ jsx19("th", { children: "Document" })
|
|
6235
6414
|
] })
|
|
6236
6415
|
] }),
|
|
6237
|
-
/* @__PURE__ */
|
|
6416
|
+
/* @__PURE__ */ jsx19("tbody", { children: rows.map((payment, index) => {
|
|
6238
6417
|
const eor = eors[index] ?? eors[0];
|
|
6239
|
-
return /* @__PURE__ */
|
|
6240
|
-
/* @__PURE__ */
|
|
6241
|
-
/* @__PURE__ */
|
|
6242
|
-
submittedAt ? /* @__PURE__ */
|
|
6418
|
+
return /* @__PURE__ */ jsxs19("tr", { children: [
|
|
6419
|
+
/* @__PURE__ */ jsxs19("td", { "data-label": "Submission", children: [
|
|
6420
|
+
/* @__PURE__ */ jsx19("strong", { children: "Original bill" }),
|
|
6421
|
+
submittedAt ? /* @__PURE__ */ jsxs19("span", { children: [
|
|
6243
6422
|
"Sent ",
|
|
6244
6423
|
defaultFormatDate(submittedAt)
|
|
6245
6424
|
] }) : null
|
|
6246
6425
|
] }),
|
|
6247
|
-
/* @__PURE__ */
|
|
6248
|
-
/* @__PURE__ */
|
|
6249
|
-
/* @__PURE__ */
|
|
6250
|
-
/* @__PURE__ */
|
|
6251
|
-
/* @__PURE__ */
|
|
6252
|
-
/* @__PURE__ */
|
|
6253
|
-
/* @__PURE__ */
|
|
6254
|
-
/* @__PURE__ */
|
|
6255
|
-
/* @__PURE__ */
|
|
6426
|
+
/* @__PURE__ */ jsx19("td", { "data-label": "Submission payment", children: remittance.payerReportedPaid === null ? "\u2014" : currency(remittance.payerReportedPaid) }),
|
|
6427
|
+
/* @__PURE__ */ jsx19("td", { "data-label": "Payment method", children: payment ? humanize(payment.method) : "\u2014" }),
|
|
6428
|
+
/* @__PURE__ */ jsx19("td", { "data-label": "Reference", children: payment?.checkNumber || "\u2014" }),
|
|
6429
|
+
/* @__PURE__ */ jsx19("td", { "data-label": "Effective date", children: payment ? payment.receivedDate || payment.depositDate || defaultFormatDate(payment.postedAt) : "\u2014" }),
|
|
6430
|
+
/* @__PURE__ */ jsx19("td", { "data-label": "Payment total", children: payment ? currency(payment.amount) : currency(0) }),
|
|
6431
|
+
/* @__PURE__ */ jsx19("td", { "data-label": "Deposit date", children: payment?.depositDate || "Not recorded" }),
|
|
6432
|
+
/* @__PURE__ */ jsx19("td", { "data-label": "Post date", children: payment ? defaultFormatDate(payment.postedAt) : eor ? defaultFormatDate(eor.addedAt) : "\u2014" }),
|
|
6433
|
+
/* @__PURE__ */ jsx19("td", { "data-label": "Source", children: payment ? payment.source.toUpperCase() : eor ? "EOR" : "\u2014" }),
|
|
6434
|
+
/* @__PURE__ */ jsx19("td", { "data-label": "EOR", children: eor && onOpenEor ? /* @__PURE__ */ jsx19("button", { type: "button", className: "mb-eor-link", onClick: () => void onOpenEor(eor), children: eor.filename }) : eor?.filename || "\u2014" })
|
|
6256
6435
|
] }, payment?.id ?? `empty-${index}`);
|
|
6257
6436
|
}) })
|
|
6258
6437
|
] }) }),
|
|
6259
|
-
eors.length > rows.length ? /* @__PURE__ */
|
|
6438
|
+
eors.length > rows.length ? /* @__PURE__ */ jsx19("div", { className: "mb-eor-documents", children: eors.slice(rows.length).map((eor) => /* @__PURE__ */ jsx19("button", { type: "button", onClick: () => void onOpenEor?.(eor), children: eor.filename }, eor.id)) }) : null
|
|
6260
6439
|
] });
|
|
6261
6440
|
}
|
|
6262
6441
|
function BillRemittanceCard({ remittance, appearance, className, style }) {
|
|
6263
|
-
return /* @__PURE__ */
|
|
6264
|
-
/* @__PURE__ */
|
|
6265
|
-
/* @__PURE__ */
|
|
6266
|
-
/* @__PURE__ */
|
|
6267
|
-
/* @__PURE__ */
|
|
6442
|
+
return /* @__PURE__ */ jsxs19("section", { className: classes("mb-surface mb-remittance", className), style: mindBillAppearanceStyle(appearance, style), "aria-label": "Remittance summary", children: [
|
|
6443
|
+
/* @__PURE__ */ jsx19("style", { children: lifecycleSurfaceStyles }),
|
|
6444
|
+
/* @__PURE__ */ jsx19("header", { className: "mb-surface-heading", children: /* @__PURE__ */ jsxs19("div", { children: [
|
|
6445
|
+
/* @__PURE__ */ jsx19("strong", { children: "Remittance" }),
|
|
6446
|
+
/* @__PURE__ */ jsx19("span", { children: "Amounts reported by the payer and posted to the bill." })
|
|
6268
6447
|
] }) }),
|
|
6269
|
-
/* @__PURE__ */
|
|
6270
|
-
/* @__PURE__ */
|
|
6271
|
-
/* @__PURE__ */
|
|
6272
|
-
/* @__PURE__ */
|
|
6448
|
+
/* @__PURE__ */ jsxs19("dl", { children: [
|
|
6449
|
+
/* @__PURE__ */ jsxs19("div", { children: [
|
|
6450
|
+
/* @__PURE__ */ jsx19("dt", { children: "Amount billed" }),
|
|
6451
|
+
/* @__PURE__ */ jsx19("dd", { children: currency(remittance.billedAmount) })
|
|
6273
6452
|
] }),
|
|
6274
|
-
/* @__PURE__ */
|
|
6275
|
-
/* @__PURE__ */
|
|
6276
|
-
/* @__PURE__ */
|
|
6453
|
+
/* @__PURE__ */ jsxs19("div", { children: [
|
|
6454
|
+
/* @__PURE__ */ jsx19("dt", { children: "Expected" }),
|
|
6455
|
+
/* @__PURE__ */ jsx19("dd", { children: currency(remittance.expectedAmount) })
|
|
6277
6456
|
] }),
|
|
6278
|
-
/* @__PURE__ */
|
|
6279
|
-
/* @__PURE__ */
|
|
6280
|
-
/* @__PURE__ */
|
|
6457
|
+
/* @__PURE__ */ jsxs19("div", { children: [
|
|
6458
|
+
/* @__PURE__ */ jsx19("dt", { children: "Payer allowed" }),
|
|
6459
|
+
/* @__PURE__ */ jsx19("dd", { children: remittance.payerAllowedAmount === null ? "\u2014" : currency(remittance.payerAllowedAmount) })
|
|
6281
6460
|
] }),
|
|
6282
|
-
/* @__PURE__ */
|
|
6283
|
-
/* @__PURE__ */
|
|
6284
|
-
/* @__PURE__ */
|
|
6461
|
+
/* @__PURE__ */ jsxs19("div", { children: [
|
|
6462
|
+
/* @__PURE__ */ jsx19("dt", { children: "Payer reported paid" }),
|
|
6463
|
+
/* @__PURE__ */ jsx19("dd", { children: remittance.payerReportedPaid === null ? "\u2014" : currency(remittance.payerReportedPaid) })
|
|
6285
6464
|
] }),
|
|
6286
|
-
/* @__PURE__ */
|
|
6287
|
-
/* @__PURE__ */
|
|
6288
|
-
/* @__PURE__ */
|
|
6465
|
+
/* @__PURE__ */ jsxs19("div", { children: [
|
|
6466
|
+
/* @__PURE__ */ jsx19("dt", { children: "Payment posted" }),
|
|
6467
|
+
/* @__PURE__ */ jsx19("dd", { children: currency(remittance.postedPrincipal) })
|
|
6289
6468
|
] }),
|
|
6290
|
-
/* @__PURE__ */
|
|
6291
|
-
/* @__PURE__ */
|
|
6292
|
-
/* @__PURE__ */
|
|
6469
|
+
/* @__PURE__ */ jsxs19("div", { children: [
|
|
6470
|
+
/* @__PURE__ */ jsx19("dt", { children: "Penalty & interest" }),
|
|
6471
|
+
/* @__PURE__ */ jsx19("dd", { children: currency(remittance.postedAdditional) })
|
|
6293
6472
|
] }),
|
|
6294
|
-
/* @__PURE__ */
|
|
6295
|
-
/* @__PURE__ */
|
|
6296
|
-
/* @__PURE__ */
|
|
6473
|
+
/* @__PURE__ */ jsxs19("div", { children: [
|
|
6474
|
+
/* @__PURE__ */ jsx19("dt", { children: "Total received" }),
|
|
6475
|
+
/* @__PURE__ */ jsx19("dd", { children: currency(remittance.totalPostedCash) })
|
|
6297
6476
|
] }),
|
|
6298
|
-
/* @__PURE__ */
|
|
6299
|
-
/* @__PURE__ */
|
|
6300
|
-
/* @__PURE__ */
|
|
6477
|
+
/* @__PURE__ */ jsxs19("div", { children: [
|
|
6478
|
+
/* @__PURE__ */ jsx19("dt", { children: "Balance due" }),
|
|
6479
|
+
/* @__PURE__ */ jsx19("dd", { children: currency(remittance.balanceDue) })
|
|
6301
6480
|
] })
|
|
6302
6481
|
] }),
|
|
6303
|
-
remittance.denialReason ? /* @__PURE__ */
|
|
6304
|
-
/* @__PURE__ */
|
|
6305
|
-
/* @__PURE__ */
|
|
6482
|
+
remittance.denialReason ? /* @__PURE__ */ jsxs19("div", { className: "mb-denial", children: [
|
|
6483
|
+
/* @__PURE__ */ jsx19("strong", { children: "Denial reason" }),
|
|
6484
|
+
/* @__PURE__ */ jsx19("p", { children: remittance.denialReason })
|
|
6306
6485
|
] }) : null
|
|
6307
6486
|
] });
|
|
6308
6487
|
}
|
|
@@ -6317,72 +6496,72 @@ function BillPayerContactCard({ delivery, appearance, className, style }) {
|
|
|
6317
6496
|
delivery.contacts.portalUrl ? ["Portal", "Open payer portal", delivery.contacts.portalUrl] : null
|
|
6318
6497
|
].filter(Boolean);
|
|
6319
6498
|
if (!delivery.payerName && !contacts2.length) return null;
|
|
6320
|
-
return /* @__PURE__ */
|
|
6321
|
-
/* @__PURE__ */
|
|
6322
|
-
/* @__PURE__ */
|
|
6323
|
-
/* @__PURE__ */
|
|
6324
|
-
/* @__PURE__ */
|
|
6499
|
+
return /* @__PURE__ */ jsxs19("section", { className: classes("mb-surface mb-contacts", className), style: mindBillAppearanceStyle(appearance, style), "aria-label": "Payer contact information", children: [
|
|
6500
|
+
/* @__PURE__ */ jsx19("style", { children: lifecycleSurfaceStyles }),
|
|
6501
|
+
/* @__PURE__ */ jsx19("header", { className: "mb-surface-heading", children: /* @__PURE__ */ jsxs19("div", { children: [
|
|
6502
|
+
/* @__PURE__ */ jsx19("strong", { children: delivery.payerName || "Claims administrator" }),
|
|
6503
|
+
/* @__PURE__ */ jsx19("span", { children: "Billing and follow-up contacts." })
|
|
6325
6504
|
] }) }),
|
|
6326
|
-
!contacts2.length ? /* @__PURE__ */
|
|
6327
|
-
/* @__PURE__ */
|
|
6328
|
-
/* @__PURE__ */
|
|
6505
|
+
!contacts2.length ? /* @__PURE__ */ jsx19("p", { className: "mb-empty", children: "No payer contact details are available." }) : /* @__PURE__ */ jsx19("dl", { children: contacts2.map(([label, value, href]) => /* @__PURE__ */ jsxs19("div", { children: [
|
|
6506
|
+
/* @__PURE__ */ jsx19("dt", { children: label }),
|
|
6507
|
+
/* @__PURE__ */ jsx19("dd", { children: href ? /* @__PURE__ */ jsx19("a", { href, target: label === "Portal" ? "_blank" : void 0, rel: label === "Portal" ? "noreferrer noopener" : void 0, children: value }) : value })
|
|
6329
6508
|
] }, label)) })
|
|
6330
6509
|
] });
|
|
6331
6510
|
}
|
|
6332
6511
|
function BillPaymentLedger({ payments, appearance, className, style }) {
|
|
6333
|
-
return /* @__PURE__ */
|
|
6334
|
-
/* @__PURE__ */
|
|
6335
|
-
/* @__PURE__ */
|
|
6336
|
-
/* @__PURE__ */
|
|
6337
|
-
/* @__PURE__ */
|
|
6512
|
+
return /* @__PURE__ */ jsxs19("section", { className: classes("mb-surface mb-payments", className), style: mindBillAppearanceStyle(appearance, style), "aria-label": "Payment ledger", children: [
|
|
6513
|
+
/* @__PURE__ */ jsx19("style", { children: lifecycleSurfaceStyles }),
|
|
6514
|
+
/* @__PURE__ */ jsx19("header", { className: "mb-surface-heading", children: /* @__PURE__ */ jsxs19("div", { children: [
|
|
6515
|
+
/* @__PURE__ */ jsx19("strong", { children: "Payments" }),
|
|
6516
|
+
/* @__PURE__ */ jsx19("span", { children: "Funds recorded against this bill." })
|
|
6338
6517
|
] }) }),
|
|
6339
|
-
!payments.length ? /* @__PURE__ */
|
|
6518
|
+
!payments.length ? /* @__PURE__ */ jsx19("p", { className: "mb-empty", children: "No payments posted." }) : /* @__PURE__ */ jsx19("div", { className: "mb-payment-list", children: payments.map((payment) => {
|
|
6340
6519
|
const additional = payment.feeAmount ?? 0;
|
|
6341
|
-
return /* @__PURE__ */
|
|
6342
|
-
/* @__PURE__ */
|
|
6343
|
-
/* @__PURE__ */
|
|
6344
|
-
/* @__PURE__ */
|
|
6520
|
+
return /* @__PURE__ */ jsxs19("article", { children: [
|
|
6521
|
+
/* @__PURE__ */ jsxs19("div", { className: "mb-payment-amount", children: [
|
|
6522
|
+
/* @__PURE__ */ jsx19("strong", { children: currency(payment.amount) }),
|
|
6523
|
+
/* @__PURE__ */ jsx19("span", { children: "Total received" })
|
|
6345
6524
|
] }),
|
|
6346
|
-
/* @__PURE__ */
|
|
6347
|
-
/* @__PURE__ */
|
|
6348
|
-
/* @__PURE__ */
|
|
6349
|
-
/* @__PURE__ */
|
|
6525
|
+
/* @__PURE__ */ jsxs19("dl", { children: [
|
|
6526
|
+
/* @__PURE__ */ jsxs19("div", { children: [
|
|
6527
|
+
/* @__PURE__ */ jsx19("dt", { children: "Applied to bill" }),
|
|
6528
|
+
/* @__PURE__ */ jsx19("dd", { children: currency(payment.principalAmount) })
|
|
6350
6529
|
] }),
|
|
6351
|
-
additional > 0 ? /* @__PURE__ */
|
|
6352
|
-
/* @__PURE__ */
|
|
6353
|
-
/* @__PURE__ */
|
|
6530
|
+
additional > 0 ? /* @__PURE__ */ jsxs19("div", { children: [
|
|
6531
|
+
/* @__PURE__ */ jsx19("dt", { children: "Penalty & interest" }),
|
|
6532
|
+
/* @__PURE__ */ jsx19("dd", { children: currency(additional) })
|
|
6354
6533
|
] }) : null,
|
|
6355
|
-
/* @__PURE__ */
|
|
6356
|
-
/* @__PURE__ */
|
|
6357
|
-
/* @__PURE__ */
|
|
6534
|
+
/* @__PURE__ */ jsxs19("div", { children: [
|
|
6535
|
+
/* @__PURE__ */ jsx19("dt", { children: "Method" }),
|
|
6536
|
+
/* @__PURE__ */ jsx19("dd", { children: payment.method.toUpperCase() })
|
|
6358
6537
|
] }),
|
|
6359
|
-
/* @__PURE__ */
|
|
6360
|
-
/* @__PURE__ */
|
|
6361
|
-
/* @__PURE__ */
|
|
6538
|
+
/* @__PURE__ */ jsxs19("div", { children: [
|
|
6539
|
+
/* @__PURE__ */ jsx19("dt", { children: "Reference" }),
|
|
6540
|
+
/* @__PURE__ */ jsx19("dd", { children: payment.checkNumber || "\u2014" })
|
|
6362
6541
|
] }),
|
|
6363
|
-
/* @__PURE__ */
|
|
6364
|
-
/* @__PURE__ */
|
|
6365
|
-
/* @__PURE__ */
|
|
6542
|
+
/* @__PURE__ */ jsxs19("div", { children: [
|
|
6543
|
+
/* @__PURE__ */ jsx19("dt", { children: "Effective date" }),
|
|
6544
|
+
/* @__PURE__ */ jsx19("dd", { children: payment.receivedDate || payment.depositDate || defaultFormatDate(payment.postedAt) })
|
|
6366
6545
|
] }),
|
|
6367
|
-
/* @__PURE__ */
|
|
6368
|
-
/* @__PURE__ */
|
|
6369
|
-
/* @__PURE__ */
|
|
6546
|
+
/* @__PURE__ */ jsxs19("div", { children: [
|
|
6547
|
+
/* @__PURE__ */ jsx19("dt", { children: "Deposit date" }),
|
|
6548
|
+
/* @__PURE__ */ jsx19("dd", { children: payment.depositDate || "Not recorded" })
|
|
6370
6549
|
] }),
|
|
6371
|
-
/* @__PURE__ */
|
|
6372
|
-
/* @__PURE__ */
|
|
6373
|
-
/* @__PURE__ */
|
|
6550
|
+
/* @__PURE__ */ jsxs19("div", { children: [
|
|
6551
|
+
/* @__PURE__ */ jsx19("dt", { children: "Posted" }),
|
|
6552
|
+
/* @__PURE__ */ jsxs19("dd", { children: [
|
|
6374
6553
|
defaultFormatDate(payment.postedAt),
|
|
6375
6554
|
" \xB7 ",
|
|
6376
6555
|
payment.source.toUpperCase()
|
|
6377
6556
|
] })
|
|
6378
6557
|
] }),
|
|
6379
|
-
/* @__PURE__ */
|
|
6380
|
-
/* @__PURE__ */
|
|
6381
|
-
/* @__PURE__ */
|
|
6558
|
+
/* @__PURE__ */ jsxs19("div", { children: [
|
|
6559
|
+
/* @__PURE__ */ jsx19("dt", { children: "Status" }),
|
|
6560
|
+
/* @__PURE__ */ jsx19("dd", { children: humanize(payment.status || "posted") })
|
|
6382
6561
|
] })
|
|
6383
6562
|
] }),
|
|
6384
|
-
payment.feeReason ? /* @__PURE__ */
|
|
6385
|
-
payment.note ? /* @__PURE__ */
|
|
6563
|
+
payment.feeReason ? /* @__PURE__ */ jsx19("p", { children: payment.feeReason }) : null,
|
|
6564
|
+
payment.note ? /* @__PURE__ */ jsx19("p", { children: payment.note }) : null
|
|
6386
6565
|
] }, payment.id);
|
|
6387
6566
|
}) })
|
|
6388
6567
|
] });
|
|
@@ -6439,10 +6618,10 @@ var lifecycleSurfaceStyles = `
|
|
|
6439
6618
|
// src/connected-bill-lifecycle.tsx
|
|
6440
6619
|
import {
|
|
6441
6620
|
useCallback as useCallback4,
|
|
6442
|
-
useEffect as
|
|
6621
|
+
useEffect as useEffect14,
|
|
6443
6622
|
useMemo as useMemo10,
|
|
6444
|
-
useRef as
|
|
6445
|
-
useState as
|
|
6623
|
+
useRef as useRef9,
|
|
6624
|
+
useState as useState17
|
|
6446
6625
|
} from "react";
|
|
6447
6626
|
import {
|
|
6448
6627
|
DEFAULT_API_BASE_URL as DEFAULT_API_BASE_URL3,
|
|
@@ -6453,13 +6632,13 @@ import {
|
|
|
6453
6632
|
} from "@mindbill/browser";
|
|
6454
6633
|
|
|
6455
6634
|
// src/second-review-form.tsx
|
|
6456
|
-
import { useMemo as useMemo9, useState as
|
|
6635
|
+
import { useMemo as useMemo9, useState as useState16 } from "react";
|
|
6457
6636
|
|
|
6458
6637
|
// src/second-review-corrections.ts
|
|
6459
6638
|
import { parseSecondReviewCorrection } from "@mindbill/browser";
|
|
6460
6639
|
|
|
6461
6640
|
// src/second-review-form.tsx
|
|
6462
|
-
import { Fragment as Fragment14, jsx as
|
|
6641
|
+
import { Fragment as Fragment14, jsx as jsx20, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
6463
6642
|
var SECOND_REVIEW_REASON_TEMPLATES = [
|
|
6464
6643
|
{
|
|
6465
6644
|
label: "Med-legal report denied",
|
|
@@ -6494,7 +6673,7 @@ var SECOND_REVIEW_REASON_TEMPLATES = [
|
|
|
6494
6673
|
value: "This service was provided before the claims administrator accepted or denied liability and was authorized under California Labor Code section 5402(c). Please reprocess this service and issue payment."
|
|
6495
6674
|
}
|
|
6496
6675
|
];
|
|
6497
|
-
var
|
|
6676
|
+
var css13 = `
|
|
6498
6677
|
.mb-second-review{display:grid;gap:18px;padding:22px;color:var(--mb-text);font-family:var(--mb-font);background:var(--mb-surface);border:1px solid var(--mb-border);border-radius:var(--mb-radius);box-shadow:var(--mb-shadow)}
|
|
6499
6678
|
.mb-second-review *{box-sizing:border-box}.mb-second-review h3{margin:0;font-size:22px}.mb-second-review p{margin:4px 0 0;color:var(--mb-muted)}
|
|
6500
6679
|
.mb-second-review-deadline{padding:12px 14px;border-radius:var(--mb-control-radius);background:color-mix(in srgb,var(--mb-warning) 10%,var(--mb-surface));color:var(--mb-text)!important}
|
|
@@ -6532,12 +6711,12 @@ function SecondReviewForm({
|
|
|
6532
6711
|
onCancel,
|
|
6533
6712
|
onSubmit
|
|
6534
6713
|
}) {
|
|
6535
|
-
const [lines, setLines] =
|
|
6536
|
-
const [attachmentIds, setAttachmentIds] =
|
|
6537
|
-
const [uploads, setUploads] =
|
|
6538
|
-
const [formError, setFormError] =
|
|
6539
|
-
const [preparing, setPreparing] =
|
|
6540
|
-
const [delivery, setDelivery] =
|
|
6714
|
+
const [lines, setLines] = useState16(() => initialLineDrafts(data));
|
|
6715
|
+
const [attachmentIds, setAttachmentIds] = useState16(() => data.bill.attachments.map((attachment) => attachment.id));
|
|
6716
|
+
const [uploads, setUploads] = useState16([]);
|
|
6717
|
+
const [formError, setFormError] = useState16("");
|
|
6718
|
+
const [preparing, setPreparing] = useState16(false);
|
|
6719
|
+
const [delivery, setDelivery] = useState16(null);
|
|
6541
6720
|
const selectableLines = useMemo9(() => data.bill.lineItems.filter((line) => Boolean(line.id)), [data.bill.lineItems]);
|
|
6542
6721
|
const selected = selectableLines.filter((line) => lines[line.id]?.selected);
|
|
6543
6722
|
const invalidReason = selected.some((line) => !lines[line.id]?.reason.trim());
|
|
@@ -6637,118 +6816,118 @@ function SecondReviewForm({
|
|
|
6637
6816
|
setPreparing(false);
|
|
6638
6817
|
}
|
|
6639
6818
|
};
|
|
6640
|
-
return /* @__PURE__ */
|
|
6641
|
-
/* @__PURE__ */
|
|
6642
|
-
/* @__PURE__ */
|
|
6643
|
-
/* @__PURE__ */
|
|
6644
|
-
/* @__PURE__ */
|
|
6645
|
-
/* @__PURE__ */
|
|
6819
|
+
return /* @__PURE__ */ jsxs20(Fragment14, { children: [
|
|
6820
|
+
/* @__PURE__ */ jsx20("style", { children: css13 }),
|
|
6821
|
+
/* @__PURE__ */ jsxs20("section", { className: "mb-second-review", children: [
|
|
6822
|
+
/* @__PURE__ */ jsxs20("div", { children: [
|
|
6823
|
+
/* @__PURE__ */ jsx20("h3", { children: "Submit Second Review" }),
|
|
6824
|
+
/* @__PURE__ */ jsx20("p", { children: "Select each disputed service and explain why it should be reconsidered." })
|
|
6646
6825
|
] }),
|
|
6647
|
-
/* @__PURE__ */
|
|
6648
|
-
/* @__PURE__ */
|
|
6649
|
-
/* @__PURE__ */
|
|
6826
|
+
/* @__PURE__ */ jsxs20("label", { className: "mb-second-review-template", children: [
|
|
6827
|
+
/* @__PURE__ */ jsx20("span", { className: "mb-second-review-label", children: "Apply a saved reason to selected lines" }),
|
|
6828
|
+
/* @__PURE__ */ jsxs20("select", { className: "mb-second-review-select", defaultValue: "", onChange: (event) => {
|
|
6650
6829
|
applyTemplate(event.target.value);
|
|
6651
6830
|
event.target.value = "";
|
|
6652
6831
|
}, children: [
|
|
6653
|
-
/* @__PURE__ */
|
|
6654
|
-
SECOND_REVIEW_REASON_TEMPLATES.map((template) => /* @__PURE__ */
|
|
6832
|
+
/* @__PURE__ */ jsx20("option", { value: "", children: "Choose a reason template (optional)" }),
|
|
6833
|
+
SECOND_REVIEW_REASON_TEMPLATES.map((template) => /* @__PURE__ */ jsx20("option", { value: template.value, children: template.label }, template.label))
|
|
6655
6834
|
] })
|
|
6656
6835
|
] }),
|
|
6657
|
-
/* @__PURE__ */
|
|
6836
|
+
/* @__PURE__ */ jsxs20("section", { className: "mb-second-review-lines", "aria-label": "Service lines in dispute", children: [
|
|
6658
6837
|
selectableLines.map((line) => {
|
|
6659
6838
|
const draft = lines[line.id];
|
|
6660
|
-
return /* @__PURE__ */
|
|
6661
|
-
/* @__PURE__ */
|
|
6662
|
-
/* @__PURE__ */
|
|
6663
|
-
/* @__PURE__ */
|
|
6664
|
-
/* @__PURE__ */
|
|
6839
|
+
return /* @__PURE__ */ jsxs20("article", { className: "mb-second-review-line", "data-selected": draft?.selected, children: [
|
|
6840
|
+
/* @__PURE__ */ jsxs20("div", { className: "mb-second-review-line-head", children: [
|
|
6841
|
+
/* @__PURE__ */ jsxs20("label", { className: "mb-second-review-check", children: [
|
|
6842
|
+
/* @__PURE__ */ jsx20("input", { type: "checkbox", checked: Boolean(draft?.selected), onChange: (event) => patchLine(line.id, { selected: event.target.checked }) }),
|
|
6843
|
+
/* @__PURE__ */ jsxs20("span", { children: [
|
|
6665
6844
|
line.code,
|
|
6666
6845
|
line.modifiers.length ? `-${line.modifiers.join("-")}` : ""
|
|
6667
6846
|
] })
|
|
6668
6847
|
] }),
|
|
6669
|
-
/* @__PURE__ */
|
|
6670
|
-
/* @__PURE__ */
|
|
6848
|
+
/* @__PURE__ */ jsxs20("span", { className: "mb-second-review-metrics", children: [
|
|
6849
|
+
/* @__PURE__ */ jsxs20("span", { children: [
|
|
6671
6850
|
line.units,
|
|
6672
6851
|
" unit",
|
|
6673
6852
|
line.units === 1 ? "" : "s"
|
|
6674
6853
|
] }),
|
|
6675
|
-
/* @__PURE__ */
|
|
6854
|
+
/* @__PURE__ */ jsx20("span", { children: money6(line.charge) })
|
|
6676
6855
|
] })
|
|
6677
6856
|
] }),
|
|
6678
|
-
draft?.selected ? /* @__PURE__ */
|
|
6679
|
-
/* @__PURE__ */
|
|
6680
|
-
/* @__PURE__ */
|
|
6681
|
-
/* @__PURE__ */
|
|
6857
|
+
draft?.selected ? /* @__PURE__ */ jsxs20(Fragment14, { children: [
|
|
6858
|
+
/* @__PURE__ */ jsxs20("label", { className: "mb-second-review-field", children: [
|
|
6859
|
+
/* @__PURE__ */ jsx20("span", { className: "mb-second-review-label", children: "Reason for requesting Second Review" }),
|
|
6860
|
+
/* @__PURE__ */ jsx20("textarea", { className: "mb-second-review-textarea", required: true, value: draft.reason, onChange: (event) => patchLine(line.id, { reason: event.target.value }) })
|
|
6682
6861
|
] }),
|
|
6683
|
-
/* @__PURE__ */
|
|
6684
|
-
/* @__PURE__ */
|
|
6685
|
-
[["yes", "Yes"], ["no", "No"], ["", "Not specified"]].map(([value, label]) => /* @__PURE__ */
|
|
6686
|
-
/* @__PURE__ */
|
|
6862
|
+
/* @__PURE__ */ jsxs20("div", { className: "mb-second-review-auth", role: "radiogroup", "aria-label": `Service or good ${line.code} authorized`, children: [
|
|
6863
|
+
/* @__PURE__ */ jsx20("strong", { children: "Service/Good Authorized?" }),
|
|
6864
|
+
[["yes", "Yes"], ["no", "No"], ["", "Not specified"]].map(([value, label]) => /* @__PURE__ */ jsxs20("label", { children: [
|
|
6865
|
+
/* @__PURE__ */ jsx20("input", { type: "radio", name: `authorized-${line.id}`, checked: draft.serviceAuthorized === value, onChange: () => patchLine(line.id, { serviceAuthorized: value }) }),
|
|
6687
6866
|
label
|
|
6688
6867
|
] }, label))
|
|
6689
6868
|
] })
|
|
6690
6869
|
] }) : null,
|
|
6691
|
-
draft?.selected ? /* @__PURE__ */
|
|
6692
|
-
/* @__PURE__ */
|
|
6693
|
-
/* @__PURE__ */
|
|
6870
|
+
draft?.selected ? /* @__PURE__ */ jsxs20(Fragment14, { children: [
|
|
6871
|
+
/* @__PURE__ */ jsxs20("label", { className: "mb-second-review-check", children: [
|
|
6872
|
+
/* @__PURE__ */ jsx20("input", { type: "checkbox", checked: draft.correctBilling, onChange: (event) => patchLine(line.id, { correctBilling: event.target.checked, chargeReviewed: false }) }),
|
|
6694
6873
|
"Correct units or modifiers on this submission"
|
|
6695
6874
|
] }),
|
|
6696
|
-
draft.correctBilling ? /* @__PURE__ */
|
|
6697
|
-
/* @__PURE__ */
|
|
6698
|
-
/* @__PURE__ */
|
|
6699
|
-
/* @__PURE__ */
|
|
6700
|
-
/* @__PURE__ */
|
|
6701
|
-
/* @__PURE__ */
|
|
6875
|
+
draft.correctBilling ? /* @__PURE__ */ jsxs20(Fragment14, { children: [
|
|
6876
|
+
/* @__PURE__ */ jsx20("p", { className: "mb-second-review-correction-note", children: "Earlier submissions stay unchanged. Review the charge explicitly; changing units or modifiers does not recalculate it." }),
|
|
6877
|
+
/* @__PURE__ */ jsxs20("div", { className: "mb-second-review-corrections", children: [
|
|
6878
|
+
/* @__PURE__ */ jsxs20("label", { className: "mb-second-review-field", children: [
|
|
6879
|
+
/* @__PURE__ */ jsx20("span", { className: "mb-second-review-label", children: "Corrected units" }),
|
|
6880
|
+
/* @__PURE__ */ jsx20("input", { className: "mb-second-review-select", type: "number", min: "1", max: "10000", step: "1", value: draft.units, onChange: (event) => patchLine(line.id, { units: event.target.value, chargeReviewed: false }) })
|
|
6702
6881
|
] }),
|
|
6703
|
-
/* @__PURE__ */
|
|
6704
|
-
/* @__PURE__ */
|
|
6705
|
-
/* @__PURE__ */
|
|
6882
|
+
/* @__PURE__ */ jsxs20("label", { className: "mb-second-review-field", children: [
|
|
6883
|
+
/* @__PURE__ */ jsx20("span", { className: "mb-second-review-label", children: "Corrected modifiers" }),
|
|
6884
|
+
/* @__PURE__ */ jsx20("input", { className: "mb-second-review-select", placeholder: "95, 93 \u2014 or leave blank", value: draft.modifiers, onChange: (event) => patchLine(line.id, { modifiers: event.target.value, chargeReviewed: false }) })
|
|
6706
6885
|
] }),
|
|
6707
|
-
/* @__PURE__ */
|
|
6708
|
-
/* @__PURE__ */
|
|
6709
|
-
/* @__PURE__ */
|
|
6886
|
+
/* @__PURE__ */ jsxs20("label", { className: "mb-second-review-field", children: [
|
|
6887
|
+
/* @__PURE__ */ jsx20("span", { className: "mb-second-review-label", children: "Corrected charge ($)" }),
|
|
6888
|
+
/* @__PURE__ */ jsx20("input", { className: "mb-second-review-select", type: "number", min: "0", max: "999999.99", step: "0.01", value: draft.charge, onChange: (event) => patchLine(line.id, { charge: event.target.value, chargeReviewed: false }) })
|
|
6710
6889
|
] })
|
|
6711
6890
|
] }),
|
|
6712
|
-
/* @__PURE__ */
|
|
6713
|
-
/* @__PURE__ */
|
|
6891
|
+
/* @__PURE__ */ jsxs20("label", { className: "mb-second-review-check", children: [
|
|
6892
|
+
/* @__PURE__ */ jsx20("input", { type: "checkbox", checked: draft.chargeReviewed, onChange: (event) => patchLine(line.id, { chargeReviewed: event.target.checked }) }),
|
|
6714
6893
|
"I reviewed the corrected charge"
|
|
6715
6894
|
] }),
|
|
6716
|
-
correctionErrors[line.id] ? /* @__PURE__ */
|
|
6895
|
+
correctionErrors[line.id] ? /* @__PURE__ */ jsx20("p", { className: "mb-second-review-correction-note", role: "status", children: correctionErrors[line.id] }) : null
|
|
6717
6896
|
] }) : null
|
|
6718
6897
|
] }) : null
|
|
6719
6898
|
] }, line.id);
|
|
6720
6899
|
}),
|
|
6721
|
-
!selectableLines.length ? /* @__PURE__ */
|
|
6900
|
+
!selectableLines.length ? /* @__PURE__ */ jsx20("div", { className: "mb-second-review-error", children: "This bill has no stable service-line identifiers. Refresh the bill before submitting a Second Review." }) : null
|
|
6722
6901
|
] }),
|
|
6723
|
-
/* @__PURE__ */
|
|
6724
|
-
/* @__PURE__ */
|
|
6725
|
-
data.bill.attachments.map((attachment) => /* @__PURE__ */
|
|
6726
|
-
/* @__PURE__ */
|
|
6727
|
-
/* @__PURE__ */
|
|
6728
|
-
/* @__PURE__ */
|
|
6729
|
-
/* @__PURE__ */
|
|
6902
|
+
/* @__PURE__ */ jsxs20("fieldset", { className: "mb-second-review-packet", children: [
|
|
6903
|
+
/* @__PURE__ */ jsx20("legend", { children: "Supporting packet" }),
|
|
6904
|
+
data.bill.attachments.map((attachment) => /* @__PURE__ */ jsxs20("label", { className: "mb-second-review-document", children: [
|
|
6905
|
+
/* @__PURE__ */ jsx20("input", { type: "checkbox", checked: attachmentIds.includes(attachment.id), onChange: (event) => setAttachmentIds((current) => event.target.checked ? [...current, attachment.id] : current.filter((id) => id !== attachment.id)) }),
|
|
6906
|
+
/* @__PURE__ */ jsxs20("span", { children: [
|
|
6907
|
+
/* @__PURE__ */ jsx20("strong", { children: attachment.filename }),
|
|
6908
|
+
/* @__PURE__ */ jsx20("small", { children: attachment.description || attachment.documentType })
|
|
6730
6909
|
] }),
|
|
6731
|
-
/* @__PURE__ */
|
|
6910
|
+
/* @__PURE__ */ jsx20("button", { className: "mb-second-review-link", type: "button", onClick: () => void openAttachment(attachment).catch(() => void 0), children: "View" })
|
|
6732
6911
|
] }, attachment.id)),
|
|
6733
|
-
/* @__PURE__ */
|
|
6734
|
-
/* @__PURE__ */
|
|
6735
|
-
/* @__PURE__ */
|
|
6736
|
-
/* @__PURE__ */
|
|
6912
|
+
/* @__PURE__ */ jsxs20("label", { className: "mb-second-review-upload", children: [
|
|
6913
|
+
/* @__PURE__ */ jsx20("input", { type: "file", accept: "application/pdf,.pdf", multiple: true, onChange: addUploads }),
|
|
6914
|
+
/* @__PURE__ */ jsxs20("span", { children: [
|
|
6915
|
+
/* @__PURE__ */ jsx20("strong", { children: "Choose one or more PDF files" }),
|
|
6737
6916
|
" to attach"
|
|
6738
6917
|
] })
|
|
6739
6918
|
] }),
|
|
6740
|
-
uploads.map((upload, index) => /* @__PURE__ */
|
|
6741
|
-
/* @__PURE__ */
|
|
6742
|
-
/* @__PURE__ */
|
|
6919
|
+
uploads.map((upload, index) => /* @__PURE__ */ jsxs20("div", { className: "mb-second-review-uploaded", children: [
|
|
6920
|
+
/* @__PURE__ */ jsx20("span", { children: upload.file.name }),
|
|
6921
|
+
/* @__PURE__ */ jsx20("button", { className: "mb-second-review-link", type: "button", onClick: () => setUploads((current) => current.filter((_, itemIndex) => itemIndex !== index)), children: "Remove" })
|
|
6743
6922
|
] }, `${upload.file.name}-${index}`))
|
|
6744
6923
|
] }),
|
|
6745
|
-
formError || error?.message ? /* @__PURE__ */
|
|
6746
|
-
/* @__PURE__ */
|
|
6747
|
-
/* @__PURE__ */
|
|
6748
|
-
/* @__PURE__ */
|
|
6924
|
+
formError || error?.message ? /* @__PURE__ */ jsx20("div", { className: "mb-second-review-error", role: "alert", children: formError || error?.message }) : null,
|
|
6925
|
+
/* @__PURE__ */ jsxs20("div", { className: "mb-second-review-actions", children: [
|
|
6926
|
+
/* @__PURE__ */ jsx20("button", { className: "mb-second-review-button secondary", type: "button", disabled: submitting || preparing, onClick: onCancel, children: "Cancel" }),
|
|
6927
|
+
/* @__PURE__ */ jsx20("button", { className: "mb-second-review-button primary", type: "button", disabled: submitting || preparing || !selected.length || invalidReason || invalidCorrection, onClick: () => void continueToDelivery(), children: preparing ? "Preparing\u2026" : "Continue to delivery" })
|
|
6749
6928
|
] })
|
|
6750
6929
|
] }),
|
|
6751
|
-
delivery ? /* @__PURE__ */
|
|
6930
|
+
delivery ? /* @__PURE__ */ jsx20(SendRouteDialog, { title: "Confirm Second Review delivery", delivery, submitting: submitting || preparing, error: formError || error?.message || null, onCancel: () => setDelivery(null), onConfirm: (route) => void submit(route) }) : null
|
|
6752
6931
|
] });
|
|
6753
6932
|
}
|
|
6754
6933
|
|
|
@@ -6760,7 +6939,7 @@ import {
|
|
|
6760
6939
|
reportBillStatusContacts as reportBillStatusContacts2,
|
|
6761
6940
|
secondReviewDeadline as secondReviewDeadline2
|
|
6762
6941
|
} from "@mindbill/browser";
|
|
6763
|
-
import { Fragment as Fragment15, jsx as
|
|
6942
|
+
import { Fragment as Fragment15, jsx as jsx21, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
6764
6943
|
var DEFAULT_REFRESH_INTERVAL2 = 6e4;
|
|
6765
6944
|
function billTeamNotes(data) {
|
|
6766
6945
|
const notes = data.notes ?? [];
|
|
@@ -6808,12 +6987,12 @@ function useBillLifecycle({
|
|
|
6808
6987
|
enabled = true,
|
|
6809
6988
|
fetch: fetchOverride
|
|
6810
6989
|
}) {
|
|
6811
|
-
const [data, setData] =
|
|
6812
|
-
const [error, setError] =
|
|
6813
|
-
const [isLoading, setIsLoading] =
|
|
6814
|
-
const [isRefreshing, setIsRefreshing] =
|
|
6815
|
-
const [isMutating, setIsMutating] =
|
|
6816
|
-
const mounted =
|
|
6990
|
+
const [data, setData] = useState17(null);
|
|
6991
|
+
const [error, setError] = useState17(null);
|
|
6992
|
+
const [isLoading, setIsLoading] = useState17(enabled);
|
|
6993
|
+
const [isRefreshing, setIsRefreshing] = useState17(false);
|
|
6994
|
+
const [isMutating, setIsMutating] = useState17(false);
|
|
6995
|
+
const mounted = useRef9(true);
|
|
6817
6996
|
const client = useMemo10(() => createBillLifecycleClient({
|
|
6818
6997
|
billId: providedBillId,
|
|
6819
6998
|
sessionEndpoint,
|
|
@@ -6821,12 +7000,12 @@ function useBillLifecycle({
|
|
|
6821
7000
|
apiBaseUrl,
|
|
6822
7001
|
fetch: fetchOverride
|
|
6823
7002
|
}), [apiBaseUrl, fetchOverride, getSession, providedBillId, sessionEndpoint]);
|
|
6824
|
-
|
|
7003
|
+
useEffect14(() => {
|
|
6825
7004
|
setData(null);
|
|
6826
7005
|
setError(null);
|
|
6827
7006
|
setIsLoading(enabled);
|
|
6828
7007
|
}, [enabled, providedBillId]);
|
|
6829
|
-
|
|
7008
|
+
useEffect14(() => {
|
|
6830
7009
|
mounted.current = true;
|
|
6831
7010
|
return () => {
|
|
6832
7011
|
mounted.current = false;
|
|
@@ -6850,7 +7029,7 @@ function useBillLifecycle({
|
|
|
6850
7029
|
}
|
|
6851
7030
|
}
|
|
6852
7031
|
}, [client, enabled]);
|
|
6853
|
-
|
|
7032
|
+
useEffect14(() => {
|
|
6854
7033
|
if (!enabled) return;
|
|
6855
7034
|
void refresh();
|
|
6856
7035
|
const interval = refreshInterval > 0 ? window.setInterval(() => void refresh(), refreshInterval) : null;
|
|
@@ -6953,10 +7132,10 @@ function useBillLifecycle({
|
|
|
6953
7132
|
};
|
|
6954
7133
|
}
|
|
6955
7134
|
function LifecycleDialog({ children, title, wide = false, onClose }) {
|
|
6956
|
-
const dialog =
|
|
6957
|
-
const onCloseRef =
|
|
7135
|
+
const dialog = useRef9(null);
|
|
7136
|
+
const onCloseRef = useRef9(onClose);
|
|
6958
7137
|
onCloseRef.current = onClose;
|
|
6959
|
-
|
|
7138
|
+
useEffect14(() => {
|
|
6960
7139
|
const previous = document.activeElement;
|
|
6961
7140
|
dialog.current?.focus();
|
|
6962
7141
|
const onKeyDown = (event) => event.key === "Escape" && onCloseRef.current();
|
|
@@ -6966,8 +7145,8 @@ function LifecycleDialog({ children, title, wide = false, onClose }) {
|
|
|
6966
7145
|
previous?.focus();
|
|
6967
7146
|
};
|
|
6968
7147
|
}, []);
|
|
6969
|
-
return /* @__PURE__ */
|
|
6970
|
-
/* @__PURE__ */
|
|
7148
|
+
return /* @__PURE__ */ jsx21("div", { className: "mb-lifecycle-dialog-backdrop", onMouseDown: (event) => event.currentTarget === event.target && onClose(), children: /* @__PURE__ */ jsxs21("div", { ref: dialog, className: ["mb-lifecycle-dialog", wide ? "wide" : ""].filter(Boolean).join(" "), role: "dialog", "aria-modal": "true", "aria-label": title, tabIndex: -1, children: [
|
|
7149
|
+
/* @__PURE__ */ jsx21("button", { type: "button", className: "mb-lifecycle-dialog-close", "aria-label": "Close", onClick: onClose, children: "\xD7" }),
|
|
6971
7150
|
children
|
|
6972
7151
|
] }) });
|
|
6973
7152
|
}
|
|
@@ -7006,22 +7185,22 @@ function correctionRejectionSummary(rejection) {
|
|
|
7006
7185
|
function CorrectionRejectionReason({ rejection }) {
|
|
7007
7186
|
const summary = correctionRejectionSummary(rejection);
|
|
7008
7187
|
const details = rejection.issues?.filter((issue) => issue.description.trim() !== summary.description || Boolean(issue.code?.trim() && issue.code.trim() !== summary.code)) ?? [];
|
|
7009
|
-
return /* @__PURE__ */
|
|
7010
|
-
summary.code ? /* @__PURE__ */
|
|
7011
|
-
/* @__PURE__ */
|
|
7012
|
-
/* @__PURE__ */
|
|
7013
|
-
summary.clearinghouseDetail ? /* @__PURE__ */
|
|
7014
|
-
/* @__PURE__ */
|
|
7188
|
+
return /* @__PURE__ */ jsxs21("div", { className: "mb-lifecycle-correction-reason", role: "alert", children: [
|
|
7189
|
+
summary.code ? /* @__PURE__ */ jsxs21("div", { className: "mb-lifecycle-correction-reason-code", children: [
|
|
7190
|
+
/* @__PURE__ */ jsx21("span", { children: "Rejection code" }),
|
|
7191
|
+
/* @__PURE__ */ jsx21("code", { children: summary.code }),
|
|
7192
|
+
summary.clearinghouseDetail ? /* @__PURE__ */ jsxs21("small", { children: [
|
|
7193
|
+
/* @__PURE__ */ jsx21("span", { children: "Clearinghouse detail" }),
|
|
7015
7194
|
summary.clearinghouseDetail
|
|
7016
7195
|
] }) : null
|
|
7017
7196
|
] }) : null,
|
|
7018
|
-
/* @__PURE__ */
|
|
7019
|
-
/* @__PURE__ */
|
|
7020
|
-
/* @__PURE__ */
|
|
7197
|
+
/* @__PURE__ */ jsxs21("div", { className: "mb-lifecycle-correction-reason-description", children: [
|
|
7198
|
+
/* @__PURE__ */ jsx21("span", { children: "Reason" }),
|
|
7199
|
+
/* @__PURE__ */ jsx21("strong", { children: summary.description })
|
|
7021
7200
|
] }),
|
|
7022
|
-
details.length ? /* @__PURE__ */
|
|
7023
|
-
issue.code ? /* @__PURE__ */
|
|
7024
|
-
/* @__PURE__ */
|
|
7201
|
+
details.length ? /* @__PURE__ */ jsx21("ul", { "aria-label": "Additional rejection details", children: details.map((issue, index) => /* @__PURE__ */ jsxs21("li", { children: [
|
|
7202
|
+
issue.code ? /* @__PURE__ */ jsx21("code", { children: issue.code }) : null,
|
|
7203
|
+
/* @__PURE__ */ jsx21("span", { children: issue.description })
|
|
7025
7204
|
] }, `${issue.code || "issue"}-${index}`)) }) : null
|
|
7026
7205
|
] });
|
|
7027
7206
|
}
|
|
@@ -7062,16 +7241,16 @@ function CorrectionVerificationContact({ delivery }) {
|
|
|
7062
7241
|
{ label: "Mail", values: mailingAddresses }
|
|
7063
7242
|
].filter((method) => method.values.length);
|
|
7064
7243
|
if (!methods.length) return null;
|
|
7065
|
-
return /* @__PURE__ */
|
|
7066
|
-
/* @__PURE__ */
|
|
7067
|
-
/* @__PURE__ */
|
|
7244
|
+
return /* @__PURE__ */ jsxs21("aside", { className: "mb-lifecycle-correction-contact", children: [
|
|
7245
|
+
/* @__PURE__ */ jsx21("strong", { children: "Need to verify the rejected information?" }),
|
|
7246
|
+
/* @__PURE__ */ jsxs21("span", { children: [
|
|
7068
7247
|
"Contact ",
|
|
7069
7248
|
delivery.payerName,
|
|
7070
7249
|
" using any available method:"
|
|
7071
7250
|
] }),
|
|
7072
|
-
/* @__PURE__ */
|
|
7073
|
-
/* @__PURE__ */
|
|
7074
|
-
/* @__PURE__ */
|
|
7251
|
+
/* @__PURE__ */ jsx21("dl", { children: methods.map((method) => /* @__PURE__ */ jsxs21("div", { children: [
|
|
7252
|
+
/* @__PURE__ */ jsx21("dt", { children: method.label }),
|
|
7253
|
+
/* @__PURE__ */ jsx21("dd", { children: /* @__PURE__ */ jsx21("ul", { children: method.values.map((value) => /* @__PURE__ */ jsx21("li", { children: method.href ? /* @__PURE__ */ jsx21("a", { href: method.href(value), ...method.label === "Portal" ? { target: "_blank", rel: "noreferrer" } : {}, children: value }) : value }, value)) }) })
|
|
7075
7254
|
] }, method.label)) })
|
|
7076
7255
|
] });
|
|
7077
7256
|
}
|
|
@@ -7190,22 +7369,22 @@ function shouldShowSandboxControls(environment, enabled = false) {
|
|
|
7190
7369
|
function ConnectedBillLifecycle({ appearance, actorName, claimsAdministratorHint, claimsAdministratorSources, courtesyCopyRecipientOptions: courtesyCopyRecipientOptions2 = [], sandboxControls = false, className, style, loadingFallback, errorFallback, onChanged, ...options }) {
|
|
7191
7370
|
const lifecycle = useBillLifecycle(options);
|
|
7192
7371
|
const { data } = lifecycle;
|
|
7193
|
-
const [tab, setTab] =
|
|
7194
|
-
const [selectedSubmissionId, setSelectedSubmissionId] =
|
|
7195
|
-
const [panel, setPanel] =
|
|
7196
|
-
const [notice, setNotice] =
|
|
7197
|
-
const [note, setNote] =
|
|
7198
|
-
const [reason, setReason] =
|
|
7199
|
-
const [correctionError, setCorrectionError] =
|
|
7200
|
-
const [newBillError, setNewBillError] =
|
|
7201
|
-
const [payment, setPayment] =
|
|
7202
|
-
const [duplicateError, setDuplicateError] =
|
|
7372
|
+
const [tab, setTab] = useState17("details");
|
|
7373
|
+
const [selectedSubmissionId, setSelectedSubmissionId] = useState17();
|
|
7374
|
+
const [panel, setPanel] = useState17("");
|
|
7375
|
+
const [notice, setNotice] = useState17("");
|
|
7376
|
+
const [note, setNote] = useState17("");
|
|
7377
|
+
const [reason, setReason] = useState17("");
|
|
7378
|
+
const [correctionError, setCorrectionError] = useState17("");
|
|
7379
|
+
const [newBillError, setNewBillError] = useState17("");
|
|
7380
|
+
const [payment, setPayment] = useState17({ amount: 0, penaltyAmount: 0, interestAmount: 0, method: "check", checkNumber: "", depositDate: today(), note: "" });
|
|
7381
|
+
const [duplicateError, setDuplicateError] = useState17("");
|
|
7203
7382
|
const currentAttemptKey = data?.attempts?.find((attempt) => attempt.isCurrent)?.id ?? data?.history?.filter((entry) => entry.kind === "submission").at(-1)?.id ?? data?.bill.id;
|
|
7204
|
-
|
|
7383
|
+
useEffect14(() => {
|
|
7205
7384
|
setPanel("");
|
|
7206
7385
|
}, [currentAttemptKey]);
|
|
7207
7386
|
const actor = actorName?.trim() ? { actorName: actorName.trim() } : {};
|
|
7208
|
-
const lastData =
|
|
7387
|
+
const lastData = useRef9(null);
|
|
7209
7388
|
const correctionInitialBill = useMemo10(() => data ? correctionBill(data) : null, [data]);
|
|
7210
7389
|
const correctionAttachments = useMemo10(() => data ? data.bill.attachments.map((attachment) => {
|
|
7211
7390
|
const documentType = correctionDocumentType(attachment.documentType);
|
|
@@ -7221,7 +7400,7 @@ function ConnectedBillLifecycle({ appearance, actorName, claimsAdministratorHint
|
|
|
7221
7400
|
};
|
|
7222
7401
|
}) : [], [data, lifecycle]);
|
|
7223
7402
|
const correctionAttentionFields = useMemo10(() => data?.rejection?.issues?.flatMap((issue) => issue.fieldPaths || []).filter((path, index, fields) => fields.indexOf(path) === index) || [], [data]);
|
|
7224
|
-
|
|
7403
|
+
useEffect14(() => {
|
|
7225
7404
|
if (!data || data === lastData.current) return;
|
|
7226
7405
|
lastData.current = data;
|
|
7227
7406
|
onChanged?.(data);
|
|
@@ -7233,13 +7412,13 @@ function ConnectedBillLifecycle({ appearance, actorName, claimsAdministratorHint
|
|
|
7233
7412
|
interestAmount: 0
|
|
7234
7413
|
}));
|
|
7235
7414
|
}, [data, onChanged]);
|
|
7236
|
-
if (lifecycle.isLoading && !data) return /* @__PURE__ */
|
|
7415
|
+
if (lifecycle.isLoading && !data) return /* @__PURE__ */ jsx21(Fragment15, { children: loadingFallback ?? /* @__PURE__ */ jsx21("div", { className: "mb-lifecycle-loading", children: "Loading bill\u2026" }) });
|
|
7237
7416
|
if (!data) {
|
|
7238
7417
|
const error = lifecycle.error ?? new Error("Bill could not be loaded.");
|
|
7239
|
-
return /* @__PURE__ */
|
|
7240
|
-
/* @__PURE__ */
|
|
7241
|
-
/* @__PURE__ */
|
|
7242
|
-
/* @__PURE__ */
|
|
7418
|
+
return /* @__PURE__ */ jsx21(Fragment15, { children: errorFallback?.(error, lifecycle.refresh) ?? /* @__PURE__ */ jsxs21("div", { className: "mb-lifecycle-error", role: "alert", children: [
|
|
7419
|
+
/* @__PURE__ */ jsx21("strong", { children: "Billing is unavailable." }),
|
|
7420
|
+
/* @__PURE__ */ jsx21("span", { children: error.message }),
|
|
7421
|
+
/* @__PURE__ */ jsx21("button", { type: "button", onClick: () => void lifecycle.refresh(), children: "Try again" })
|
|
7243
7422
|
] }) });
|
|
7244
7423
|
}
|
|
7245
7424
|
const complete = async (message, task) => {
|
|
@@ -7362,121 +7541,121 @@ function ConnectedBillLifecycle({ appearance, actorName, claimsAdministratorHint
|
|
|
7362
7541
|
const statusContacts = reportBillStatusContacts(data.delivery);
|
|
7363
7542
|
const receiptEntries = (data.history ?? []).filter((entry) => entry.kind === "submission" || entry.kind === "ack");
|
|
7364
7543
|
const reviewDeadline = secondReviewDeadline(data.eors);
|
|
7365
|
-
return /* @__PURE__ */
|
|
7366
|
-
/* @__PURE__ */
|
|
7367
|
-
ribbonItems.length >= 2 ? /* @__PURE__ */
|
|
7544
|
+
return /* @__PURE__ */ jsxs21("section", { className: ["mb-connected-lifecycle", className].filter(Boolean).join(" "), style: mindBillAppearanceStyle(appearance, style), children: [
|
|
7545
|
+
/* @__PURE__ */ jsx21("style", { children: CONNECTED_LIFECYCLE_STYLES }),
|
|
7546
|
+
ribbonItems.length >= 2 ? /* @__PURE__ */ jsx21(BillSubmissionsRibbon, { items: ribbonItems, onSelect: (item) => {
|
|
7368
7547
|
setSelectedSubmissionId(item.id);
|
|
7369
7548
|
setTab("details");
|
|
7370
7549
|
setPanel("");
|
|
7371
7550
|
}, ...appearance ? { appearance } : {} }) : null,
|
|
7372
|
-
historical ? null : data.lifecycle.state.toLowerCase() === "rejected" && data.rejection ? /* @__PURE__ */
|
|
7373
|
-
/* @__PURE__ */
|
|
7374
|
-
/* @__PURE__ */
|
|
7375
|
-
/* @__PURE__ */
|
|
7376
|
-
/* @__PURE__ */
|
|
7551
|
+
historical ? null : data.lifecycle.state.toLowerCase() === "rejected" && data.rejection ? /* @__PURE__ */ jsx21(BillRejectionNotice, { rejection: data.rejection, submittedAt: data.lifecycle.submittedAt ?? null, ...appearance ? { appearance } : {} }) : /* @__PURE__ */ jsx21(BillLifecycleProgress, { state: data.lifecycle.state, nativeStatus: data.lifecycle.nativeStatus, submittedAt: data.lifecycle.submittedAt ?? null, agingDays: data.lifecycle.agingDays ?? null, ...appearance ? { appearance } : {} }),
|
|
7552
|
+
/* @__PURE__ */ jsxs21("header", { className: "mb-lifecycle-head", children: [
|
|
7553
|
+
/* @__PURE__ */ jsxs21("div", { children: [
|
|
7554
|
+
/* @__PURE__ */ jsx21("div", { className: "mb-lifecycle-title", children: /* @__PURE__ */ jsx21("h2", { children: historical && !selectedAttempt ? "Previous submission" : `Bill #${historical ? selectedAttempt?.billNumber : data.bill.billNumber}` }) }),
|
|
7555
|
+
/* @__PURE__ */ jsxs21("p", { children: [
|
|
7377
7556
|
displayedData ? `Claim ${displayedData.injury.claimNumber || "\u2014"}` : "Previous submission",
|
|
7378
7557
|
lifecycle.isRefreshing ? " \xB7 Refreshing\u2026" : ""
|
|
7379
7558
|
] })
|
|
7380
7559
|
] }),
|
|
7381
|
-
!historical ? /* @__PURE__ */
|
|
7382
|
-
/* @__PURE__ */
|
|
7383
|
-
/* @__PURE__ */
|
|
7560
|
+
!historical ? /* @__PURE__ */ jsxs21(Fragment15, { children: [
|
|
7561
|
+
/* @__PURE__ */ jsx21("button", { type: "button", className: "mb-lifecycle-button primary", disabled: lifecycle.isMutating, onClick: () => void lifecycle.downloadPacket().catch(() => void 0), children: "Download packet" }),
|
|
7562
|
+
/* @__PURE__ */ jsx21("button", { type: "button", className: "mb-lifecycle-button secondary", disabled: lifecycle.isMutating, onClick: () => setPanel("courtesy_copy"), children: "Forward copy" })
|
|
7384
7563
|
] }) : null
|
|
7385
7564
|
] }),
|
|
7386
|
-
/* @__PURE__ */
|
|
7387
|
-
/* @__PURE__ */
|
|
7388
|
-
/* @__PURE__ */
|
|
7565
|
+
/* @__PURE__ */ jsxs21("div", { className: "mb-lifecycle-tabs", role: "tablist", "aria-label": "Bill view", children: [
|
|
7566
|
+
/* @__PURE__ */ jsx21("button", { type: "button", role: "tab", "aria-selected": tab === "details", onClick: () => setTab("details"), children: "Bill details" }),
|
|
7567
|
+
/* @__PURE__ */ jsx21("button", { type: "button", role: "tab", "aria-selected": tab === "history", onClick: () => setTab("history"), children: "Bill history" })
|
|
7389
7568
|
] }),
|
|
7390
|
-
tab === "details" ? /* @__PURE__ */
|
|
7391
|
-
selectedAttempt && ribbonItems.length >= 2 ? /* @__PURE__ */
|
|
7392
|
-
/* @__PURE__ */
|
|
7393
|
-
/* @__PURE__ */
|
|
7394
|
-
/* @__PURE__ */
|
|
7395
|
-
/* @__PURE__ */
|
|
7569
|
+
tab === "details" ? /* @__PURE__ */ jsxs21("div", { className: "mb-lifecycle-tabpanel", role: "tabpanel", children: [
|
|
7570
|
+
selectedAttempt && ribbonItems.length >= 2 ? /* @__PURE__ */ jsxs21("section", { className: "mb-lifecycle-attempt-detail", "aria-label": "Selected submission detail", children: [
|
|
7571
|
+
/* @__PURE__ */ jsxs21("header", { children: [
|
|
7572
|
+
/* @__PURE__ */ jsxs21("div", { children: [
|
|
7573
|
+
/* @__PURE__ */ jsx21("span", { children: "Selected submission" }),
|
|
7574
|
+
/* @__PURE__ */ jsx21("h3", { children: selectedAttempt.label })
|
|
7396
7575
|
] }),
|
|
7397
|
-
/* @__PURE__ */
|
|
7576
|
+
/* @__PURE__ */ jsx21("strong", { children: selectedAttempt.isCurrent ? "Current" : "Previous" })
|
|
7398
7577
|
] }),
|
|
7399
|
-
/* @__PURE__ */
|
|
7400
|
-
/* @__PURE__ */
|
|
7401
|
-
/* @__PURE__ */
|
|
7402
|
-
/* @__PURE__ */
|
|
7578
|
+
/* @__PURE__ */ jsxs21("dl", { children: [
|
|
7579
|
+
/* @__PURE__ */ jsxs21("div", { children: [
|
|
7580
|
+
/* @__PURE__ */ jsx21("dt", { children: "Bill" }),
|
|
7581
|
+
/* @__PURE__ */ jsxs21("dd", { children: [
|
|
7403
7582
|
"#",
|
|
7404
7583
|
selectedAttempt.billNumber || data.bill.billNumber
|
|
7405
7584
|
] })
|
|
7406
7585
|
] }),
|
|
7407
|
-
/* @__PURE__ */
|
|
7408
|
-
/* @__PURE__ */
|
|
7409
|
-
/* @__PURE__ */
|
|
7586
|
+
/* @__PURE__ */ jsxs21("div", { children: [
|
|
7587
|
+
/* @__PURE__ */ jsx21("dt", { children: "Delivery" }),
|
|
7588
|
+
/* @__PURE__ */ jsx21("dd", { children: selectedAttempt.deliveryLabel || "\u2014" })
|
|
7410
7589
|
] }),
|
|
7411
|
-
/* @__PURE__ */
|
|
7412
|
-
/* @__PURE__ */
|
|
7413
|
-
/* @__PURE__ */
|
|
7590
|
+
/* @__PURE__ */ jsxs21("div", { children: [
|
|
7591
|
+
/* @__PURE__ */ jsx21("dt", { children: "Sent" }),
|
|
7592
|
+
/* @__PURE__ */ jsx21("dd", { children: selectedAttempt.sentAt ? new Date(selectedAttempt.sentAt).toLocaleString() : "\u2014" })
|
|
7414
7593
|
] }),
|
|
7415
|
-
/* @__PURE__ */
|
|
7416
|
-
/* @__PURE__ */
|
|
7417
|
-
/* @__PURE__ */
|
|
7594
|
+
/* @__PURE__ */ jsxs21("div", { children: [
|
|
7595
|
+
/* @__PURE__ */ jsx21("dt", { children: "Status" }),
|
|
7596
|
+
/* @__PURE__ */ jsx21("dd", { children: selectedAttempt.status || selectedAttempt.ackLabel || "Submitted" })
|
|
7418
7597
|
] }),
|
|
7419
|
-
selectedAttempt.complianceLabel ? /* @__PURE__ */
|
|
7420
|
-
/* @__PURE__ */
|
|
7421
|
-
/* @__PURE__ */
|
|
7598
|
+
selectedAttempt.complianceLabel ? /* @__PURE__ */ jsxs21("div", { children: [
|
|
7599
|
+
/* @__PURE__ */ jsx21("dt", { children: selectedAttempt.complianceLabel }),
|
|
7600
|
+
/* @__PURE__ */ jsx21("dd", { children: selectedAttempt.complianceAt ? new Date(selectedAttempt.complianceAt).toLocaleDateString() : "\u2014" })
|
|
7422
7601
|
] }) : null
|
|
7423
7602
|
] })
|
|
7424
7603
|
] }) : null,
|
|
7425
|
-
!historical && (data.eors.length || data.payments.length || ["processed", "denied", "partially_paid"].includes(data.lifecycle.state)) ? /* @__PURE__ */
|
|
7426
|
-
showSandboxControls ? /* @__PURE__ */
|
|
7427
|
-
/* @__PURE__ */
|
|
7428
|
-
/* @__PURE__ */
|
|
7429
|
-
/* @__PURE__ */
|
|
7430
|
-
/* @__PURE__ */
|
|
7604
|
+
!historical && (data.eors.length || data.payments.length || ["processed", "denied", "partially_paid"].includes(data.lifecycle.state)) ? /* @__PURE__ */ jsx21(BillExplanationOfReview, { remittance: data.remittance, eors: data.eors, payments: data.payments, submittedAt: data.lifecycle.submittedAt ?? null, onOpenEor: lifecycle.openEor, ...appearance ? { appearance } : {} }) : null,
|
|
7605
|
+
showSandboxControls ? /* @__PURE__ */ jsxs21("section", { className: "mb-lifecycle-simulator", "aria-label": "Sandbox lifecycle simulator", children: [
|
|
7606
|
+
/* @__PURE__ */ jsxs21("div", { children: [
|
|
7607
|
+
/* @__PURE__ */ jsx21("span", { children: "Sandbox demo controls" }),
|
|
7608
|
+
/* @__PURE__ */ jsx21("h3", { children: "Simulate the next payer response" }),
|
|
7609
|
+
/* @__PURE__ */ jsx21("p", { children: "This changes sandbox data only. The host receives the result through the same lifecycle API and components partners use." })
|
|
7431
7610
|
] }),
|
|
7432
|
-
simulations.length ? /* @__PURE__ */
|
|
7433
|
-
/* @__PURE__ */
|
|
7434
|
-
/* @__PURE__ */
|
|
7435
|
-
] }, scenario.id)) }) : /* @__PURE__ */
|
|
7611
|
+
simulations.length ? /* @__PURE__ */ jsx21("div", { className: "mb-lifecycle-simulator-actions", children: simulations.map((scenario) => /* @__PURE__ */ jsxs21("button", { type: "button", disabled: lifecycle.isMutating, onClick: () => void complete(`${scenario.label} simulated.`, () => lifecycle.simulateSandbox({ scenario: scenario.id })), children: [
|
|
7612
|
+
/* @__PURE__ */ jsx21("strong", { children: scenario.label }),
|
|
7613
|
+
/* @__PURE__ */ jsx21("span", { children: scenario.detail })
|
|
7614
|
+
] }, scenario.id)) }) : /* @__PURE__ */ jsx21("p", { className: "mb-lifecycle-simulator-idle", children: "No simulated payer transition is needed at this stage. Use the bill action below to continue." })
|
|
7436
7615
|
] }) : null,
|
|
7437
|
-
historical ? /* @__PURE__ */
|
|
7438
|
-
displayedData ? /* @__PURE__ */
|
|
7439
|
-
historical && selectedAttempt ? /* @__PURE__ */
|
|
7440
|
-
/* @__PURE__ */
|
|
7441
|
-
/* @__PURE__ */
|
|
7442
|
-
selectedDetail?.artifacts?.length ? selectedDetail.artifacts.map((artifact) => /* @__PURE__ */
|
|
7616
|
+
historical ? /* @__PURE__ */ jsx21("p", { className: "mb-lifecycle-card", children: selectedDetail?.source === "submission_snapshot" ? "Saved as submitted. This previous submission is read-only; payment balances and current actions are shown on the current bill." : displayedData ? "Historical bill record. An exact as-submitted snapshot was not recorded for this older attempt; these are the stored bill values, not a guaranteed copy of the original packet." : "Detailed values were not saved for this historical submission. Select the current submission to see the current bill. We will not substitute current data for this older attempt." }) : null,
|
|
7617
|
+
displayedData ? /* @__PURE__ */ jsx21(BillReadOnlyForm, { data: displayedData, ...!historical ? { onOpenAttachment: lifecycle.openAttachment } : {}, ...appearance ? { appearance } : {} }, activeSubmissionId) : null,
|
|
7618
|
+
historical && selectedAttempt ? /* @__PURE__ */ jsxs21("section", { className: "mb-lifecycle-card", "aria-label": "Retained submission files", children: [
|
|
7619
|
+
/* @__PURE__ */ jsx21("h3", { children: "Retained submission files" }),
|
|
7620
|
+
/* @__PURE__ */ jsx21("p", { children: "Exact files saved for this submission. These downloads do not include a regenerated current bill or a later EOR." }),
|
|
7621
|
+
selectedDetail?.artifacts?.length ? selectedDetail.artifacts.map((artifact) => /* @__PURE__ */ jsxs21("button", { type: "button", className: "mb-lifecycle-button secondary", onClick: () => void lifecycle.downloadSubmissionArtifact(selectedAttempt.id, artifact.id, artifact.label).catch(() => void 0), children: [
|
|
7443
7622
|
"Download ",
|
|
7444
7623
|
artifact.kind === "submitted_edi" ? "submitted EDI" : "submitted attachment",
|
|
7445
7624
|
": ",
|
|
7446
7625
|
artifact.label
|
|
7447
|
-
] }, artifact.id)) : /* @__PURE__ */
|
|
7626
|
+
] }, artifact.id)) : /* @__PURE__ */ jsx21("p", { children: "No retained files are available for this submission." })
|
|
7448
7627
|
] }) : null,
|
|
7449
|
-
!historical ? /* @__PURE__ */
|
|
7450
|
-
/* @__PURE__ */
|
|
7451
|
-
/* @__PURE__ */
|
|
7452
|
-
/* @__PURE__ */
|
|
7453
|
-
/* @__PURE__ */
|
|
7628
|
+
!historical ? /* @__PURE__ */ jsxs21("section", { className: "mb-lifecycle-notes", "aria-label": "Bill notes", children: [
|
|
7629
|
+
/* @__PURE__ */ jsxs21("header", { children: [
|
|
7630
|
+
/* @__PURE__ */ jsxs21("div", { children: [
|
|
7631
|
+
/* @__PURE__ */ jsx21("h3", { children: "Team notes" }),
|
|
7632
|
+
/* @__PURE__ */ jsx21("p", { children: "Shared with your workspace\u2019s billing team. Never sent to the payer." })
|
|
7454
7633
|
] }),
|
|
7455
|
-
/* @__PURE__ */
|
|
7634
|
+
/* @__PURE__ */ jsx21("span", { children: billNotes.length })
|
|
7456
7635
|
] }),
|
|
7457
|
-
billNotes.length ? /* @__PURE__ */
|
|
7458
|
-
/* @__PURE__ */
|
|
7459
|
-
/* @__PURE__ */
|
|
7636
|
+
billNotes.length ? /* @__PURE__ */ jsx21("ol", { children: billNotes.map((entry) => /* @__PURE__ */ jsxs21("li", { children: [
|
|
7637
|
+
/* @__PURE__ */ jsx21("p", { children: entry.summary }),
|
|
7638
|
+
/* @__PURE__ */ jsxs21("small", { children: [
|
|
7460
7639
|
entry.actor || "System",
|
|
7461
7640
|
" \xB7 ",
|
|
7462
7641
|
usDate(entry.date)
|
|
7463
7642
|
] })
|
|
7464
|
-
] }, entry.id)) }) : /* @__PURE__ */
|
|
7465
|
-
/* @__PURE__ */
|
|
7643
|
+
] }, entry.id)) }) : /* @__PURE__ */ jsx21("p", { className: "mb-lifecycle-notes-empty", children: "No notes yet." }),
|
|
7644
|
+
/* @__PURE__ */ jsxs21("form", { onSubmit: (event) => {
|
|
7466
7645
|
event.preventDefault();
|
|
7467
7646
|
void addNote();
|
|
7468
7647
|
}, children: [
|
|
7469
|
-
/* @__PURE__ */
|
|
7470
|
-
/* @__PURE__ */
|
|
7471
|
-
/* @__PURE__ */
|
|
7648
|
+
/* @__PURE__ */ jsxs21("label", { children: [
|
|
7649
|
+
/* @__PURE__ */ jsx21("span", { children: "Add a note" }),
|
|
7650
|
+
/* @__PURE__ */ jsx21("textarea", { value: note, maxLength: 2e3, placeholder: "Add context for the billing team\u2026", onChange: (event) => setNote(event.target.value) })
|
|
7472
7651
|
] }),
|
|
7473
|
-
/* @__PURE__ */
|
|
7652
|
+
/* @__PURE__ */ jsx21("button", { type: "submit", className: "mb-lifecycle-button primary", disabled: lifecycle.isMutating || !note.trim(), children: lifecycle.isMutating ? "Adding\u2026" : "Add note" })
|
|
7474
7653
|
] })
|
|
7475
7654
|
] }) : null
|
|
7476
|
-
] }) : /* @__PURE__ */
|
|
7477
|
-
!historical && (viewEor || actions.length) ? /* @__PURE__ */
|
|
7478
|
-
viewEor && data.eors[0] ? /* @__PURE__ */
|
|
7479
|
-
actions.map((action) => /* @__PURE__ */
|
|
7655
|
+
] }) : /* @__PURE__ */ jsx21("div", { className: "mb-lifecycle-tabpanel", role: "tabpanel", children: data.history?.length ? /* @__PURE__ */ jsx21(BillHistoryTable, { entries: data.history, ...!historical ? { onOpenDocument: lifecycle.openAttachment } : {}, ...appearance ? { appearance } : {} }) : /* @__PURE__ */ jsx21(BillActivityTimeline, { events: data.activity, ...appearance ? { appearance } : {} }) }),
|
|
7656
|
+
!historical && (viewEor || actions.length) ? /* @__PURE__ */ jsxs21("aside", { className: "mb-lifecycle-actions-sheet", "aria-label": "Bill actions", children: [
|
|
7657
|
+
viewEor && data.eors[0] ? /* @__PURE__ */ jsx21("button", { type: "button", className: "mb-lifecycle-button secondary", onClick: () => void lifecycle.openEor(data.eors[0]).catch(() => void 0), children: viewEor.label }) : null,
|
|
7658
|
+
actions.map((action) => /* @__PURE__ */ jsx21("button", { type: "button", className: action.primary ? "mb-lifecycle-button primary" : "mb-lifecycle-button secondary", onClick: () => {
|
|
7480
7659
|
const next = actionPanel(action);
|
|
7481
7660
|
if (!next) return;
|
|
7482
7661
|
if (next === "resubmit") setCorrectionError("");
|
|
@@ -7485,37 +7664,37 @@ function ConnectedBillLifecycle({ appearance, actorName, claimsAdministratorHint
|
|
|
7485
7664
|
setPanel(next);
|
|
7486
7665
|
}, children: action.label }, action.id))
|
|
7487
7666
|
] }) : null,
|
|
7488
|
-
activePanel === "courtesy_copy" ? /* @__PURE__ */
|
|
7667
|
+
activePanel === "courtesy_copy" ? /* @__PURE__ */ jsx21(LifecycleDialog, { title: "Forward courtesy copy", wide: true, onClose: () => setPanel(""), children: /* @__PURE__ */ jsx21(BillCourtesyCopyForm, { documents: data.bill.attachments, recipientOptions: courtesyCopyRecipientOptions2, subject: `Courtesy copy \u2014 bill #${data.bill.billNumber}`, environment: data.environment, onPreview: lifecycle.previewCourtesyCopy, onSend: lifecycle.sendCourtesyCopy, onSent: () => {
|
|
7489
7668
|
void lifecycle.refresh();
|
|
7490
7669
|
}, ...appearance ? { appearance } : {} }) }) : null,
|
|
7491
|
-
activePanel === "ibr" ? /* @__PURE__ */
|
|
7492
|
-
/* @__PURE__ */
|
|
7493
|
-
/* @__PURE__ */
|
|
7494
|
-
lifecycle.error ? /* @__PURE__ */
|
|
7495
|
-
/* @__PURE__ */
|
|
7496
|
-
/* @__PURE__ */
|
|
7497
|
-
/* @__PURE__ */
|
|
7670
|
+
activePanel === "ibr" ? /* @__PURE__ */ jsx21(LifecycleDialog, { title: "Prepare Independent Bill Review packet", onClose: () => setPanel(""), children: /* @__PURE__ */ jsxs21("section", { className: "mb-lifecycle-panel", children: [
|
|
7671
|
+
/* @__PURE__ */ jsx21("header", { style: { paddingRight: 44 }, children: /* @__PURE__ */ jsx21("h3", { children: "Prepare Independent Bill Review packet" }) }),
|
|
7672
|
+
/* @__PURE__ */ jsx21("p", { children: "Download a PDF packet for self-filing Independent Bill Review (IBR). Preparing this packet does not file the review, send it to a payer, or change the bill status." }),
|
|
7673
|
+
lifecycle.error ? /* @__PURE__ */ jsx21("p", { role: "alert", className: "mb-lifecycle-message error", children: lifecycle.error.message }) : null,
|
|
7674
|
+
/* @__PURE__ */ jsxs21("div", { className: "mb-lifecycle-panel-actions", children: [
|
|
7675
|
+
/* @__PURE__ */ jsx21("button", { type: "button", className: "mb-lifecycle-button secondary", disabled: lifecycle.isMutating, onClick: () => setPanel(""), children: "Cancel" }),
|
|
7676
|
+
/* @__PURE__ */ jsx21("button", { type: "button", className: "mb-lifecycle-button primary", disabled: lifecycle.isMutating, onClick: () => void lifecycle.downloadIbrPacket().then(() => {
|
|
7498
7677
|
setPanel("");
|
|
7499
7678
|
setNotice("IBR packet prepared for self-filing. The review has not been filed.");
|
|
7500
7679
|
}).catch(() => void 0), children: lifecycle.isMutating ? "Preparing\u2026" : "Prepare IBR packet" })
|
|
7501
7680
|
] })
|
|
7502
7681
|
] }) }) : null,
|
|
7503
|
-
activePanel === "resubmit" && correctionInitialBill ? /* @__PURE__ */
|
|
7504
|
-
/* @__PURE__ */
|
|
7505
|
-
/* @__PURE__ */
|
|
7506
|
-
/* @__PURE__ */
|
|
7682
|
+
activePanel === "resubmit" && correctionInitialBill ? /* @__PURE__ */ jsx21(LifecycleDialog, { title: "Correct and resubmit", wide: true, onClose: () => setPanel(""), children: /* @__PURE__ */ jsxs21("section", { className: "mb-lifecycle-correction", children: [
|
|
7683
|
+
/* @__PURE__ */ jsx21("header", { children: /* @__PURE__ */ jsxs21("div", { children: [
|
|
7684
|
+
/* @__PURE__ */ jsx21("h3", { children: "Correct and resubmit" }),
|
|
7685
|
+
/* @__PURE__ */ jsx21("p", { children: "Review the rejected snapshot, correct the highlighted information, and submit a new immutable attempt under this bill." })
|
|
7507
7686
|
] }) }),
|
|
7508
|
-
data.environment === "live" ? /* @__PURE__ */
|
|
7509
|
-
/* @__PURE__ */
|
|
7510
|
-
/* @__PURE__ */
|
|
7687
|
+
data.environment === "live" ? /* @__PURE__ */ jsxs21("div", { className: "mb-lifecycle-live-warning", children: [
|
|
7688
|
+
/* @__PURE__ */ jsx21("strong", { children: "Live clearinghouse submission" }),
|
|
7689
|
+
/* @__PURE__ */ jsx21("span", { children: "Resubmitting sends a real bill. Confirm the corrected information before continuing." })
|
|
7511
7690
|
] }) : null,
|
|
7512
|
-
data.rejection ? /* @__PURE__ */
|
|
7513
|
-
/* @__PURE__ */
|
|
7514
|
-
/* @__PURE__ */
|
|
7515
|
-
/* @__PURE__ */
|
|
7516
|
-
/* @__PURE__ */
|
|
7691
|
+
data.rejection ? /* @__PURE__ */ jsx21(CorrectionRejectionReason, { rejection: data.rejection }) : null,
|
|
7692
|
+
/* @__PURE__ */ jsx21(CorrectionVerificationContact, { delivery: data.delivery }),
|
|
7693
|
+
/* @__PURE__ */ jsxs21("label", { className: "mb-lifecycle-correction-note", children: [
|
|
7694
|
+
/* @__PURE__ */ jsx21("span", { children: "Correction note (optional)" }),
|
|
7695
|
+
/* @__PURE__ */ jsx21("textarea", { value: reason, placeholder: "What changed before resubmission?", onChange: (event) => setReason(event.target.value) })
|
|
7517
7696
|
] }),
|
|
7518
|
-
/* @__PURE__ */
|
|
7697
|
+
/* @__PURE__ */ jsx21(
|
|
7519
7698
|
BillSubmissionForm,
|
|
7520
7699
|
{
|
|
7521
7700
|
className: "mbsf-lifecycle-correction",
|
|
@@ -7541,18 +7720,18 @@ function ConnectedBillLifecycle({ appearance, actorName, claimsAdministratorHint
|
|
|
7541
7720
|
...appearance ? { appearance } : {}
|
|
7542
7721
|
}
|
|
7543
7722
|
),
|
|
7544
|
-
correctionError ? /* @__PURE__ */
|
|
7723
|
+
correctionError ? /* @__PURE__ */ jsx21("div", { className: "mb-lifecycle-message error", role: "alert", children: correctionError }) : null
|
|
7545
7724
|
] }) }) : null,
|
|
7546
|
-
activePanel === "submit_new_bill" && correctionInitialBill ? /* @__PURE__ */
|
|
7547
|
-
/* @__PURE__ */
|
|
7548
|
-
/* @__PURE__ */
|
|
7549
|
-
/* @__PURE__ */
|
|
7725
|
+
activePanel === "submit_new_bill" && correctionInitialBill ? /* @__PURE__ */ jsx21(LifecycleDialog, { title: "Submit New Bill", wide: true, onClose: () => setPanel(""), children: /* @__PURE__ */ jsxs21("section", { className: "mb-lifecycle-correction", children: [
|
|
7726
|
+
/* @__PURE__ */ jsx21("header", { children: /* @__PURE__ */ jsxs21("div", { children: [
|
|
7727
|
+
/* @__PURE__ */ jsx21("h3", { children: "Submit New Bill" }),
|
|
7728
|
+
/* @__PURE__ */ jsx21("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." })
|
|
7550
7729
|
] }) }),
|
|
7551
|
-
/* @__PURE__ */
|
|
7552
|
-
/* @__PURE__ */
|
|
7553
|
-
/* @__PURE__ */
|
|
7730
|
+
/* @__PURE__ */ jsxs21("label", { className: "mb-lifecycle-correction-note", children: [
|
|
7731
|
+
/* @__PURE__ */ jsx21("span", { children: "Submission note (optional)" }),
|
|
7732
|
+
/* @__PURE__ */ jsx21("textarea", { value: reason, placeholder: "Why is a new bill being submitted?", onChange: (event) => setReason(event.target.value) })
|
|
7554
7733
|
] }),
|
|
7555
|
-
/* @__PURE__ */
|
|
7734
|
+
/* @__PURE__ */ jsx21(
|
|
7556
7735
|
BillSubmissionForm,
|
|
7557
7736
|
{
|
|
7558
7737
|
className: "mbsf-lifecycle-correction",
|
|
@@ -7577,10 +7756,10 @@ function ConnectedBillLifecycle({ appearance, actorName, claimsAdministratorHint
|
|
|
7577
7756
|
...appearance ? { appearance } : {}
|
|
7578
7757
|
}
|
|
7579
7758
|
),
|
|
7580
|
-
newBillError ? /* @__PURE__ */
|
|
7759
|
+
newBillError ? /* @__PURE__ */ jsx21("div", { className: "mb-lifecycle-message error", role: "alert", children: newBillError }) : null
|
|
7581
7760
|
] }) }) : null,
|
|
7582
|
-
activePanel === "second_review" ? /* @__PURE__ */
|
|
7583
|
-
/* @__PURE__ */
|
|
7761
|
+
activePanel === "second_review" ? /* @__PURE__ */ jsxs21(LifecycleDialog, { title: "Submit Second Review", wide: true, onClose: () => setPanel(""), children: [
|
|
7762
|
+
/* @__PURE__ */ jsx21(
|
|
7584
7763
|
SecondReviewForm,
|
|
7585
7764
|
{
|
|
7586
7765
|
data,
|
|
@@ -7593,86 +7772,86 @@ function ConnectedBillLifecycle({ appearance, actorName, claimsAdministratorHint
|
|
|
7593
7772
|
onSubmit: (input) => complete("Second Review submitted.", () => lifecycle.submitSecondReview({ ...input, ...actor }))
|
|
7594
7773
|
}
|
|
7595
7774
|
),
|
|
7596
|
-
reviewDeadline ? /* @__PURE__ */
|
|
7775
|
+
reviewDeadline ? /* @__PURE__ */ jsxs21("p", { className: "mb-lifecycle-deadline-hint", children: [
|
|
7597
7776
|
"Second Review must be requested within 90 days of the denial EOR (dated ",
|
|
7598
7777
|
usDate(reviewDeadline.eorDate),
|
|
7599
7778
|
") \u2014 file by ",
|
|
7600
|
-
/* @__PURE__ */
|
|
7779
|
+
/* @__PURE__ */ jsx21("strong", { children: usDate(reviewDeadline.deadline) }),
|
|
7601
7780
|
"."
|
|
7602
7781
|
] }) : null
|
|
7603
7782
|
] }) : null,
|
|
7604
|
-
activePanel === "payment" ? /* @__PURE__ */
|
|
7605
|
-
/* @__PURE__ */
|
|
7606
|
-
/* @__PURE__ */
|
|
7607
|
-
/* @__PURE__ */
|
|
7783
|
+
activePanel === "payment" ? /* @__PURE__ */ jsx21(LifecycleDialog, { title: "Post payment", onClose: () => setPanel(""), children: /* @__PURE__ */ jsxs21("section", { className: "mb-lifecycle-panel", children: [
|
|
7784
|
+
/* @__PURE__ */ jsxs21("div", { children: [
|
|
7785
|
+
/* @__PURE__ */ jsx21("h3", { children: "Post payment" }),
|
|
7786
|
+
/* @__PURE__ */ jsx21("p", { children: "Record a full or partial payment, plus any penalty and interest received." })
|
|
7608
7787
|
] }),
|
|
7609
|
-
/* @__PURE__ */
|
|
7610
|
-
/* @__PURE__ */
|
|
7611
|
-
/* @__PURE__ */
|
|
7612
|
-
/* @__PURE__ */
|
|
7788
|
+
/* @__PURE__ */ jsxs21("div", { className: "mb-lifecycle-fields two", children: [
|
|
7789
|
+
/* @__PURE__ */ jsxs21("label", { children: [
|
|
7790
|
+
/* @__PURE__ */ jsx21("span", { children: "Amount applied to bill" }),
|
|
7791
|
+
/* @__PURE__ */ jsx21("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) })) })
|
|
7613
7792
|
] }),
|
|
7614
|
-
/* @__PURE__ */
|
|
7615
|
-
/* @__PURE__ */
|
|
7616
|
-
/* @__PURE__ */
|
|
7793
|
+
/* @__PURE__ */ jsxs21("label", { children: [
|
|
7794
|
+
/* @__PURE__ */ jsx21("span", { children: "Penalty" }),
|
|
7795
|
+
/* @__PURE__ */ jsx21("input", { type: "number", min: "0", step: "0.01", value: payment.penaltyAmount || "", placeholder: "0.00", onChange: (event) => setPayment((current) => ({ ...current, penaltyAmount: Number(event.target.value) })) })
|
|
7617
7796
|
] }),
|
|
7618
|
-
/* @__PURE__ */
|
|
7619
|
-
/* @__PURE__ */
|
|
7620
|
-
/* @__PURE__ */
|
|
7797
|
+
/* @__PURE__ */ jsxs21("label", { children: [
|
|
7798
|
+
/* @__PURE__ */ jsx21("span", { children: "Interest" }),
|
|
7799
|
+
/* @__PURE__ */ jsx21("input", { type: "number", min: "0", step: "0.01", value: payment.interestAmount || "", placeholder: "0.00", onChange: (event) => setPayment((current) => ({ ...current, interestAmount: Number(event.target.value) })) })
|
|
7621
7800
|
] }),
|
|
7622
|
-
/* @__PURE__ */
|
|
7623
|
-
/* @__PURE__ */
|
|
7624
|
-
/* @__PURE__ */
|
|
7625
|
-
/* @__PURE__ */
|
|
7626
|
-
/* @__PURE__ */
|
|
7801
|
+
/* @__PURE__ */ jsxs21("label", { children: [
|
|
7802
|
+
/* @__PURE__ */ jsx21("span", { children: "Method" }),
|
|
7803
|
+
/* @__PURE__ */ jsxs21("select", { value: payment.method, onChange: (event) => setPayment((current) => ({ ...current, method: event.target.value })), children: [
|
|
7804
|
+
/* @__PURE__ */ jsx21("option", { value: "check", children: "Check" }),
|
|
7805
|
+
/* @__PURE__ */ jsx21("option", { value: "eft", children: "EFT" })
|
|
7627
7806
|
] })
|
|
7628
7807
|
] }),
|
|
7629
|
-
/* @__PURE__ */
|
|
7630
|
-
/* @__PURE__ */
|
|
7631
|
-
/* @__PURE__ */
|
|
7808
|
+
/* @__PURE__ */ jsxs21("label", { children: [
|
|
7809
|
+
/* @__PURE__ */ jsx21("span", { children: payment.method === "check" ? "Check number" : "EFT reference" }),
|
|
7810
|
+
/* @__PURE__ */ jsx21("input", { value: payment.checkNumber, onChange: (event) => setPayment((current) => ({ ...current, checkNumber: event.target.value })) })
|
|
7632
7811
|
] }),
|
|
7633
|
-
/* @__PURE__ */
|
|
7634
|
-
/* @__PURE__ */
|
|
7635
|
-
/* @__PURE__ */
|
|
7812
|
+
/* @__PURE__ */ jsxs21("label", { children: [
|
|
7813
|
+
/* @__PURE__ */ jsx21("span", { children: "Deposit date" }),
|
|
7814
|
+
/* @__PURE__ */ jsx21("input", { required: true, value: payment.depositDate, placeholder: "MM/DD/YYYY", onChange: (event) => setPayment((current) => ({ ...current, depositDate: event.target.value })) })
|
|
7636
7815
|
] }),
|
|
7637
|
-
/* @__PURE__ */
|
|
7638
|
-
/* @__PURE__ */
|
|
7639
|
-
/* @__PURE__ */
|
|
7816
|
+
/* @__PURE__ */ jsxs21("label", { className: "full", children: [
|
|
7817
|
+
/* @__PURE__ */ jsx21("span", { children: "Note (optional)" }),
|
|
7818
|
+
/* @__PURE__ */ jsx21("input", { value: payment.note, onChange: (event) => setPayment((current) => ({ ...current, note: event.target.value })) })
|
|
7640
7819
|
] })
|
|
7641
7820
|
] }),
|
|
7642
|
-
/* @__PURE__ */
|
|
7643
|
-
/* @__PURE__ */
|
|
7644
|
-
/* @__PURE__ */
|
|
7821
|
+
/* @__PURE__ */ jsxs21("div", { className: "mb-payment-total", children: [
|
|
7822
|
+
/* @__PURE__ */ jsx21("span", { children: "Total received" }),
|
|
7823
|
+
/* @__PURE__ */ jsx21("strong", { children: new Intl.NumberFormat(void 0, { style: "currency", currency: "USD" }).format(payment.amount + (payment.penaltyAmount ?? 0) + (payment.interestAmount ?? 0)) })
|
|
7645
7824
|
] }),
|
|
7646
|
-
/* @__PURE__ */
|
|
7647
|
-
/* @__PURE__ */
|
|
7648
|
-
/* @__PURE__ */
|
|
7825
|
+
/* @__PURE__ */ jsxs21("div", { className: "mb-lifecycle-panel-actions", children: [
|
|
7826
|
+
/* @__PURE__ */ jsx21("button", { type: "button", className: "mb-lifecycle-button secondary", onClick: () => setPanel(""), children: "Cancel" }),
|
|
7827
|
+
/* @__PURE__ */ jsx21("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" })
|
|
7649
7828
|
] })
|
|
7650
7829
|
] }) }) : null,
|
|
7651
|
-
activePanel === "close" || activePanel === "reopen" ? /* @__PURE__ */
|
|
7652
|
-
/* @__PURE__ */
|
|
7653
|
-
/* @__PURE__ */
|
|
7654
|
-
/* @__PURE__ */
|
|
7830
|
+
activePanel === "close" || activePanel === "reopen" ? /* @__PURE__ */ jsx21(LifecycleDialog, { title: activePanel === "close" ? "Close bill" : "Reopen bill", onClose: () => setPanel(""), children: /* @__PURE__ */ jsxs21("section", { className: "mb-lifecycle-panel", children: [
|
|
7831
|
+
/* @__PURE__ */ jsxs21("div", { children: [
|
|
7832
|
+
/* @__PURE__ */ jsx21("h3", { children: activePanel === "close" ? "Close bill" : "Reopen bill" }),
|
|
7833
|
+
/* @__PURE__ */ jsx21("p", { children: activePanel === "close" ? "The immutable submission and history remain available." : "Return this bill to active follow-up without changing the submitted snapshot." })
|
|
7655
7834
|
] }),
|
|
7656
|
-
/* @__PURE__ */
|
|
7657
|
-
/* @__PURE__ */
|
|
7658
|
-
/* @__PURE__ */
|
|
7835
|
+
/* @__PURE__ */ jsxs21("label", { children: [
|
|
7836
|
+
/* @__PURE__ */ jsx21("span", { children: "Reason" }),
|
|
7837
|
+
/* @__PURE__ */ jsx21("textarea", { required: true, value: reason, onChange: (event) => setReason(event.target.value) })
|
|
7659
7838
|
] }),
|
|
7660
|
-
/* @__PURE__ */
|
|
7661
|
-
/* @__PURE__ */
|
|
7662
|
-
/* @__PURE__ */
|
|
7839
|
+
/* @__PURE__ */ jsxs21("div", { className: "mb-lifecycle-panel-actions", children: [
|
|
7840
|
+
/* @__PURE__ */ jsx21("button", { type: "button", className: "mb-lifecycle-button secondary", onClick: () => setPanel(""), children: "Cancel" }),
|
|
7841
|
+
/* @__PURE__ */ jsx21("button", { type: "button", className: "mb-lifecycle-button primary", disabled: lifecycle.isMutating || !reason.trim(), onClick: () => void complete(activePanel === "close" ? "Bill closed." : "Bill reopened.", () => activePanel === "close" ? lifecycle.closeBill({ reason, ...actor }) : lifecycle.reopenBill({ reason, ...actor })), children: lifecycle.isMutating ? "Saving\u2026" : activePanel === "close" ? "Close bill" : "Reopen bill" })
|
|
7663
7842
|
] })
|
|
7664
7843
|
] }) }) : null,
|
|
7665
|
-
activePanel === "send_duplicate" && correctionInitialBill ? /* @__PURE__ */
|
|
7666
|
-
/* @__PURE__ */
|
|
7667
|
-
/* @__PURE__ */
|
|
7668
|
-
/* @__PURE__ */
|
|
7844
|
+
activePanel === "send_duplicate" && correctionInitialBill ? /* @__PURE__ */ jsx21(LifecycleDialog, { title: "Send duplicate bill", wide: true, onClose: () => setPanel(""), children: /* @__PURE__ */ jsxs21("section", { className: "mb-lifecycle-correction", children: [
|
|
7845
|
+
/* @__PURE__ */ jsx21("header", { children: /* @__PURE__ */ jsxs21("div", { children: [
|
|
7846
|
+
/* @__PURE__ */ jsx21("h3", { children: "Send duplicate bill" }),
|
|
7847
|
+
/* @__PURE__ */ jsx21("p", { children: "Review and edit any bill field before creating a duplicate submission. The original bill and its history stay unchanged." })
|
|
7669
7848
|
] }) }),
|
|
7670
|
-
data.environment === "live" ? /* @__PURE__ */
|
|
7671
|
-
/* @__PURE__ */
|
|
7672
|
-
/* @__PURE__ */
|
|
7849
|
+
data.environment === "live" ? /* @__PURE__ */ jsxs21("div", { className: "mb-lifecycle-live-warning", children: [
|
|
7850
|
+
/* @__PURE__ */ jsx21("strong", { children: "Live clearinghouse submission" }),
|
|
7851
|
+
/* @__PURE__ */ jsx21("span", { children: "The duplicate will be sent only after you confirm its delivery route in the next dialog." })
|
|
7673
7852
|
] }) : null,
|
|
7674
|
-
/* @__PURE__ */
|
|
7675
|
-
/* @__PURE__ */
|
|
7853
|
+
/* @__PURE__ */ jsx21(CorrectionVerificationContact, { delivery: data.delivery }),
|
|
7854
|
+
/* @__PURE__ */ jsx21(
|
|
7676
7855
|
BillSubmissionForm,
|
|
7677
7856
|
{
|
|
7678
7857
|
className: "mbsf-lifecycle-correction",
|
|
@@ -7697,15 +7876,15 @@ function ConnectedBillLifecycle({ appearance, actorName, claimsAdministratorHint
|
|
|
7697
7876
|
...appearance ? { appearance } : {}
|
|
7698
7877
|
}
|
|
7699
7878
|
),
|
|
7700
|
-
duplicateError ? /* @__PURE__ */
|
|
7879
|
+
duplicateError ? /* @__PURE__ */ jsx21("div", { className: "mb-lifecycle-message error", role: "alert", children: duplicateError }) : null
|
|
7701
7880
|
] }) }) : null,
|
|
7702
|
-
activePanel === "report_status" ? /* @__PURE__ */
|
|
7881
|
+
activePanel === "report_status" ? /* @__PURE__ */ jsx21(
|
|
7703
7882
|
ReportBillStatusDialog,
|
|
7704
7883
|
{
|
|
7705
7884
|
...data.delivery.directory ? { directory: data.delivery.directory } : {},
|
|
7706
7885
|
...statusContacts.claimsAdmin ? { claimsAdmin: statusContacts.claimsAdmin } : {},
|
|
7707
7886
|
...statusContacts.billReview ? { billReview: statusContacts.billReview } : {},
|
|
7708
|
-
...receiptEntries.length ? { receipt: /* @__PURE__ */
|
|
7887
|
+
...receiptEntries.length ? { receipt: /* @__PURE__ */ jsx21(BillHistoryTable, { entries: receiptEntries, onOpenDocument: lifecycle.openAttachment, ...appearance ? { appearance } : {} }) } : {},
|
|
7709
7888
|
submitting: lifecycle.isMutating,
|
|
7710
7889
|
error: lifecycle.error?.message ?? null,
|
|
7711
7890
|
onCancel: () => setPanel(""),
|
|
@@ -7713,8 +7892,8 @@ function ConnectedBillLifecycle({ appearance, actorName, claimsAdministratorHint
|
|
|
7713
7892
|
...appearance ? { appearance } : {}
|
|
7714
7893
|
}
|
|
7715
7894
|
) : null,
|
|
7716
|
-
notice ? /* @__PURE__ */
|
|
7717
|
-
lifecycle.error ? /* @__PURE__ */
|
|
7895
|
+
notice ? /* @__PURE__ */ jsx21("div", { className: "mb-lifecycle-message success", role: "status", children: notice }) : null,
|
|
7896
|
+
lifecycle.error ? /* @__PURE__ */ jsx21("div", { className: "mb-lifecycle-message error", role: "alert", children: lifecycle.error.message }) : null
|
|
7718
7897
|
] });
|
|
7719
7898
|
}
|
|
7720
7899
|
var CONNECTED_LIFECYCLE_STYLES = `
|
|
@@ -7732,14 +7911,14 @@ var CONNECTED_LIFECYCLE_STYLES = `
|
|
|
7732
7911
|
// src/connected-billing-workspace.tsx
|
|
7733
7912
|
import {
|
|
7734
7913
|
useCallback as useCallback5,
|
|
7735
|
-
useEffect as
|
|
7914
|
+
useEffect as useEffect15,
|
|
7736
7915
|
useLayoutEffect,
|
|
7737
7916
|
useMemo as useMemo11,
|
|
7738
|
-
useRef as
|
|
7739
|
-
useState as
|
|
7917
|
+
useRef as useRef10,
|
|
7918
|
+
useState as useState18
|
|
7740
7919
|
} from "react";
|
|
7741
|
-
import { Fragment as Fragment16, jsx as
|
|
7742
|
-
var
|
|
7920
|
+
import { Fragment as Fragment16, jsx as jsx22, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
7921
|
+
var css14 = `
|
|
7743
7922
|
.mbow-select{max-width:100%}
|
|
7744
7923
|
.mbow{color:var(--mb-text);font:14px/1.45 var(--mb-font);background:var(--mb-soft);border-radius:var(--mb-radius);padding:20px}.mbow,.mbow *{box-sizing:border-box}.mbow h2,.mbow h3,.mbow p{margin:0}.mbow a{color:var(--mb-accent)}
|
|
7745
7924
|
.mbow-workspace{width:100%;height:100%;max-height:var(--mbow-available-height,100dvh);min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
|
|
@@ -7757,10 +7936,10 @@ function money7(value) {
|
|
|
7757
7936
|
}
|
|
7758
7937
|
function RenderingProviderFilter({ value, options, onChange }) {
|
|
7759
7938
|
if (!options && !value) return null;
|
|
7760
|
-
return /* @__PURE__ */
|
|
7761
|
-
/* @__PURE__ */
|
|
7762
|
-
value && !options?.some((option) => option.id === value) ? /* @__PURE__ */
|
|
7763
|
-
options?.map((option) => /* @__PURE__ */
|
|
7939
|
+
return /* @__PURE__ */ jsxs22("select", { className: "mbow-select", "aria-label": "Rendering provider filter", value, onChange: (event) => onChange(event.target.value), children: [
|
|
7940
|
+
/* @__PURE__ */ jsx22("option", { value: "", children: "All rendering providers" }),
|
|
7941
|
+
value && !options?.some((option) => option.id === value) ? /* @__PURE__ */ jsx22("option", { value, children: "Selected rendering provider" }) : null,
|
|
7942
|
+
options?.map((option) => /* @__PURE__ */ jsx22("option", { value: option.id, children: option.name }, option.id))
|
|
7764
7943
|
] });
|
|
7765
7944
|
}
|
|
7766
7945
|
function shortDate(value) {
|
|
@@ -7776,14 +7955,14 @@ function defaultRange(days = 29) {
|
|
|
7776
7955
|
return { from: iso(from), to: iso(to) };
|
|
7777
7956
|
}
|
|
7778
7957
|
function Surface({ appearance, className = "", style, children, surfaceRef }) {
|
|
7779
|
-
return /* @__PURE__ */
|
|
7780
|
-
/* @__PURE__ */
|
|
7958
|
+
return /* @__PURE__ */ jsxs22("div", { ref: surfaceRef, className: `mbow ${className}`.trim(), style: mindBillAppearanceStyle(appearance, style), children: [
|
|
7959
|
+
/* @__PURE__ */ jsx22("style", { children: css14 }),
|
|
7781
7960
|
children
|
|
7782
7961
|
] });
|
|
7783
7962
|
}
|
|
7784
7963
|
function useAvailableViewportHeight() {
|
|
7785
|
-
const workspaceRef =
|
|
7786
|
-
const [availableHeight, setAvailableHeight] =
|
|
7964
|
+
const workspaceRef = useRef10(null);
|
|
7965
|
+
const [availableHeight, setAvailableHeight] = useState18(null);
|
|
7787
7966
|
useLayoutEffect(() => {
|
|
7788
7967
|
const element = workspaceRef.current;
|
|
7789
7968
|
if (!element || typeof window === "undefined") return;
|
|
@@ -7818,11 +7997,11 @@ function BillSearchContent({
|
|
|
7818
7997
|
onSelectBill,
|
|
7819
7998
|
heading
|
|
7820
7999
|
}) {
|
|
7821
|
-
const [query, setQuery] =
|
|
7822
|
-
const [draft, setDraft] =
|
|
7823
|
-
const [result, setResult] =
|
|
7824
|
-
const [error, setError] =
|
|
7825
|
-
const [loading, setLoading] =
|
|
8000
|
+
const [query, setQuery] = useState18({ age: "all", page: 1, pageSize: 25, sort: "submitted_desc", ...initialQuery, status: initialQuery?.status === "submitted" ? "sent" : initialQuery?.status ?? "all" });
|
|
8001
|
+
const [draft, setDraft] = useState18(initialQuery?.q ?? "");
|
|
8002
|
+
const [result, setResult] = useState18(null);
|
|
8003
|
+
const [error, setError] = useState18(null);
|
|
8004
|
+
const [loading, setLoading] = useState18(true);
|
|
7826
8005
|
const load = useCallback5(async (signal) => {
|
|
7827
8006
|
setLoading(true);
|
|
7828
8007
|
setError(null);
|
|
@@ -7834,78 +8013,78 @@ function BillSearchContent({
|
|
|
7834
8013
|
if (!signal?.aborted) setLoading(false);
|
|
7835
8014
|
}
|
|
7836
8015
|
}, [client, query]);
|
|
7837
|
-
|
|
8016
|
+
useEffect15(() => {
|
|
7838
8017
|
const controller = new AbortController();
|
|
7839
8018
|
void load(controller.signal);
|
|
7840
8019
|
return () => controller.abort();
|
|
7841
8020
|
}, [load]);
|
|
7842
8021
|
const update = (next) => setQuery((current) => ({ ...current, ...next, page: next.page ?? 1 }));
|
|
7843
8022
|
const pageCount = Math.max(1, Math.ceil((result?.total ?? 0) / (result?.pageSize ?? 25)));
|
|
7844
|
-
return /* @__PURE__ */
|
|
7845
|
-
heading ? /* @__PURE__ */
|
|
7846
|
-
/* @__PURE__ */
|
|
8023
|
+
return /* @__PURE__ */ jsxs22(Fragment16, { children: [
|
|
8024
|
+
heading ? /* @__PURE__ */ jsx22("div", { className: "mbow-head", children: /* @__PURE__ */ jsx22("div", { children: typeof heading === "string" ? /* @__PURE__ */ jsx22("h2", { children: heading }) : heading }) }) : null,
|
|
8025
|
+
/* @__PURE__ */ jsxs22("form", { className: "mbow-toolbar", onSubmit: (event) => {
|
|
7847
8026
|
event.preventDefault();
|
|
7848
8027
|
update({ q: draft.trim() });
|
|
7849
8028
|
}, children: [
|
|
7850
|
-
/* @__PURE__ */
|
|
7851
|
-
/* @__PURE__ */
|
|
7852
|
-
/* @__PURE__ */
|
|
7853
|
-
/* @__PURE__ */
|
|
7854
|
-
/* @__PURE__ */
|
|
7855
|
-
/* @__PURE__ */
|
|
7856
|
-
/* @__PURE__ */
|
|
7857
|
-
/* @__PURE__ */
|
|
7858
|
-
/* @__PURE__ */
|
|
7859
|
-
/* @__PURE__ */
|
|
7860
|
-
/* @__PURE__ */
|
|
8029
|
+
/* @__PURE__ */ jsx22("input", { className: "mbow-input", value: draft, onChange: (event) => setDraft(event.target.value), placeholder: "Search patient, bill ID, claim, or external ID\u2026", "aria-label": "Search bills" }),
|
|
8030
|
+
/* @__PURE__ */ jsxs22("select", { className: "mbow-select", value: query.status ?? "all", onChange: (event) => update({ status: event.target.value }), "aria-label": "Bill status", children: [
|
|
8031
|
+
/* @__PURE__ */ jsx22("option", { value: "all", children: "All statuses" }),
|
|
8032
|
+
/* @__PURE__ */ jsx22("option", { value: "incomplete", children: "Incomplete" }),
|
|
8033
|
+
/* @__PURE__ */ jsx22("option", { value: "sent", children: "Sent" }),
|
|
8034
|
+
/* @__PURE__ */ jsx22("option", { value: "accepted", children: "Accepted" }),
|
|
8035
|
+
/* @__PURE__ */ jsx22("option", { value: "accepted_no_response", children: "Accepted \u2014 response overdue" }),
|
|
8036
|
+
/* @__PURE__ */ jsx22("option", { value: "rejected", children: "Rejected" }),
|
|
8037
|
+
/* @__PURE__ */ jsx22("option", { value: "processed", children: "Processed" }),
|
|
8038
|
+
/* @__PURE__ */ jsx22("option", { value: "paid", children: "Paid" }),
|
|
8039
|
+
/* @__PURE__ */ jsx22("option", { value: "closed", children: "Closed" })
|
|
7861
8040
|
] }),
|
|
7862
|
-
/* @__PURE__ */
|
|
7863
|
-
/* @__PURE__ */
|
|
7864
|
-
/* @__PURE__ */
|
|
7865
|
-
/* @__PURE__ */
|
|
7866
|
-
/* @__PURE__ */
|
|
7867
|
-
/* @__PURE__ */
|
|
7868
|
-
/* @__PURE__ */
|
|
7869
|
-
/* @__PURE__ */
|
|
8041
|
+
/* @__PURE__ */ jsxs22("select", { className: "mbow-select", value: query.age ?? "all", onChange: (event) => update({ age: event.target.value }), "aria-label": "A/R age", children: [
|
|
8042
|
+
/* @__PURE__ */ jsx22("option", { value: "all", children: "All A/R ages" }),
|
|
8043
|
+
/* @__PURE__ */ jsx22("option", { value: "0-30", children: "0\u201330 days" }),
|
|
8044
|
+
/* @__PURE__ */ jsx22("option", { value: "31-60", children: "31\u201360 days" }),
|
|
8045
|
+
/* @__PURE__ */ jsx22("option", { value: "61-90", children: "61\u201390 days" }),
|
|
8046
|
+
/* @__PURE__ */ jsx22("option", { value: "91+", children: "91+ days" }),
|
|
8047
|
+
/* @__PURE__ */ jsx22("option", { value: "91-180", children: "91\u2013180 days" }),
|
|
8048
|
+
/* @__PURE__ */ jsx22("option", { value: "181+", children: "181+ days" })
|
|
7870
8049
|
] }),
|
|
7871
|
-
/* @__PURE__ */
|
|
7872
|
-
/* @__PURE__ */
|
|
8050
|
+
/* @__PURE__ */ jsx22("button", { className: "mbow-button", type: "submit", children: "Search" }),
|
|
8051
|
+
/* @__PURE__ */ jsx22(RenderingProviderFilter, { value: query.renderingProviderId ?? "", options: result?.filters?.renderingProviders, onChange: (value) => update({ renderingProviderId: value }) })
|
|
7873
8052
|
] }),
|
|
7874
|
-
/* @__PURE__ */
|
|
7875
|
-
loading ? /* @__PURE__ */
|
|
8053
|
+
/* @__PURE__ */ jsxs22("div", { className: "mbow-card mbow-scroll", children: [
|
|
8054
|
+
loading ? /* @__PURE__ */ jsx22("div", { className: "mbow-state", role: "status", children: "Loading bills\u2026" }) : error ? /* @__PURE__ */ jsxs22("div", { className: "mbow-state mbow-error", role: "alert", children: [
|
|
7876
8055
|
error.message,
|
|
7877
8056
|
" ",
|
|
7878
|
-
/* @__PURE__ */
|
|
7879
|
-
] }) : result?.items.length === 0 ? /* @__PURE__ */
|
|
7880
|
-
/* @__PURE__ */
|
|
7881
|
-
/* @__PURE__ */
|
|
7882
|
-
/* @__PURE__ */
|
|
7883
|
-
/* @__PURE__ */
|
|
7884
|
-
/* @__PURE__ */
|
|
7885
|
-
/* @__PURE__ */
|
|
7886
|
-
/* @__PURE__ */
|
|
7887
|
-
/* @__PURE__ */
|
|
7888
|
-
/* @__PURE__ */
|
|
8057
|
+
/* @__PURE__ */ jsx22("button", { className: "mbow-button", type: "button", onClick: () => void load(), children: "Retry" })
|
|
8058
|
+
] }) : result?.items.length === 0 ? /* @__PURE__ */ jsx22("div", { className: "mbow-state", children: "No bills match these filters." }) : /* @__PURE__ */ jsxs22("table", { className: "mbow-table", children: [
|
|
8059
|
+
/* @__PURE__ */ jsx22("thead", { children: /* @__PURE__ */ jsxs22("tr", { children: [
|
|
8060
|
+
/* @__PURE__ */ jsx22("th", { children: "Bill" }),
|
|
8061
|
+
/* @__PURE__ */ jsx22("th", { children: "Patient" }),
|
|
8062
|
+
/* @__PURE__ */ jsx22("th", { children: "DOS" }),
|
|
8063
|
+
/* @__PURE__ */ jsx22("th", { children: "Codes" }),
|
|
8064
|
+
/* @__PURE__ */ jsx22("th", { children: "Claims administrator" }),
|
|
8065
|
+
/* @__PURE__ */ jsx22("th", { children: "Status" }),
|
|
8066
|
+
/* @__PURE__ */ jsx22("th", { children: "Submitted / A/R age" }),
|
|
8067
|
+
/* @__PURE__ */ jsx22("th", { className: "mbow-money", children: "Balance due" })
|
|
7889
8068
|
] }) }),
|
|
7890
|
-
/* @__PURE__ */
|
|
7891
|
-
/* @__PURE__ */
|
|
8069
|
+
/* @__PURE__ */ jsx22("tbody", { children: result?.items.map((bill) => /* @__PURE__ */ jsxs22("tr", { className: onSelectBill ? "clickable" : "", onClick: () => onSelectBill?.(bill), children: [
|
|
8070
|
+
/* @__PURE__ */ jsxs22("td", { className: "mbow-strong", children: [
|
|
7892
8071
|
"#",
|
|
7893
8072
|
bill.billNumber
|
|
7894
8073
|
] }),
|
|
7895
|
-
/* @__PURE__ */
|
|
7896
|
-
/* @__PURE__ */
|
|
7897
|
-
/* @__PURE__ */
|
|
7898
|
-
/* @__PURE__ */
|
|
7899
|
-
/* @__PURE__ */
|
|
7900
|
-
/* @__PURE__ */
|
|
8074
|
+
/* @__PURE__ */ jsx22("td", { children: bill.patientName }),
|
|
8075
|
+
/* @__PURE__ */ jsx22("td", { children: shortDate(bill.dateOfService) }),
|
|
8076
|
+
/* @__PURE__ */ jsx22("td", { children: bill.procedureCodes.join(", ") || "\u2014" }),
|
|
8077
|
+
/* @__PURE__ */ jsx22("td", { children: bill.claimsAdministrator || "\u2014" }),
|
|
8078
|
+
/* @__PURE__ */ jsx22("td", { children: /* @__PURE__ */ jsx22("span", { className: `mbow-badge ${bill.status.tone ?? ""}`, children: bill.status.label }) }),
|
|
8079
|
+
/* @__PURE__ */ jsxs22("td", { children: [
|
|
7901
8080
|
shortDate(bill.submittedAt),
|
|
7902
|
-
/* @__PURE__ */
|
|
8081
|
+
/* @__PURE__ */ jsx22("div", { className: "mbow-muted", children: bill.arAgeDays == null ? "\u2014" : `${bill.arAgeDays} days` })
|
|
7903
8082
|
] }),
|
|
7904
|
-
/* @__PURE__ */
|
|
8083
|
+
/* @__PURE__ */ jsx22("td", { className: "mbow-money mbow-strong", children: money7(bill.balanceDue) })
|
|
7905
8084
|
] }, bill.id)) })
|
|
7906
8085
|
] }),
|
|
7907
|
-
result && !loading && !error ? /* @__PURE__ */
|
|
7908
|
-
/* @__PURE__ */
|
|
8086
|
+
result && !loading && !error ? /* @__PURE__ */ jsxs22("div", { className: "mbow-pager", children: [
|
|
8087
|
+
/* @__PURE__ */ jsxs22("span", { children: [
|
|
7909
8088
|
"Showing ",
|
|
7910
8089
|
result.total === 0 ? 0 : (result.page - 1) * result.pageSize + 1,
|
|
7911
8090
|
"\u2013",
|
|
@@ -7913,14 +8092,14 @@ function BillSearchContent({
|
|
|
7913
8092
|
" of ",
|
|
7914
8093
|
result.total
|
|
7915
8094
|
] }),
|
|
7916
|
-
/* @__PURE__ */
|
|
7917
|
-
/* @__PURE__ */
|
|
8095
|
+
/* @__PURE__ */ jsxs22("span", { children: [
|
|
8096
|
+
/* @__PURE__ */ jsx22("button", { className: "mbow-button", type: "button", disabled: result.page <= 1, onClick: () => update({ page: result.page - 1 }), children: "Previous" }),
|
|
7918
8097
|
" ",
|
|
7919
8098
|
result.page,
|
|
7920
8099
|
" / ",
|
|
7921
8100
|
pageCount,
|
|
7922
8101
|
" ",
|
|
7923
|
-
/* @__PURE__ */
|
|
8102
|
+
/* @__PURE__ */ jsx22("button", { className: "mbow-button", type: "button", disabled: result.page >= pageCount, onClick: () => update({ page: result.page + 1 }), children: "Next" })
|
|
7924
8103
|
] })
|
|
7925
8104
|
] }) : null
|
|
7926
8105
|
] })
|
|
@@ -7928,7 +8107,7 @@ function BillSearchContent({
|
|
|
7928
8107
|
}
|
|
7929
8108
|
function ConnectedBillSearch({ appearance, className, style, initialQuery, onSelectBill, heading = "All bills", ...options }) {
|
|
7930
8109
|
const client = useClient(options);
|
|
7931
|
-
return /* @__PURE__ */
|
|
8110
|
+
return /* @__PURE__ */ jsx22(Surface, { appearance, className, style, children: /* @__PURE__ */ jsx22(BillSearchContent, { client, initialQuery, onSelectBill, heading }) });
|
|
7932
8111
|
}
|
|
7933
8112
|
function taskQuery(cell) {
|
|
7934
8113
|
const [taskType, taskLabel] = cell.rowId.split("::", 2);
|
|
@@ -7939,11 +8118,11 @@ function taskQuery(cell) {
|
|
|
7939
8118
|
return { status: "all", taskSection: cell.sectionId, ...taskType ? { taskType } : {}, ...taskLabel ? { taskLabel } : {}, ...age ? { age } : {} };
|
|
7940
8119
|
}
|
|
7941
8120
|
function BillTasksContent({ client, onDrillDown, appearance }) {
|
|
7942
|
-
const [claimsAdminId, setClaimsAdminId] =
|
|
7943
|
-
const [renderingProviderId, setRenderingProviderId] =
|
|
7944
|
-
const [result, setResult] =
|
|
7945
|
-
const [error, setError] =
|
|
7946
|
-
const [loading, setLoading] =
|
|
8121
|
+
const [claimsAdminId, setClaimsAdminId] = useState18("");
|
|
8122
|
+
const [renderingProviderId, setRenderingProviderId] = useState18("");
|
|
8123
|
+
const [result, setResult] = useState18(null);
|
|
8124
|
+
const [error, setError] = useState18(null);
|
|
8125
|
+
const [loading, setLoading] = useState18(true);
|
|
7947
8126
|
const load = useCallback5(async (signal) => {
|
|
7948
8127
|
setLoading(true);
|
|
7949
8128
|
setError(null);
|
|
@@ -7955,32 +8134,32 @@ function BillTasksContent({ client, onDrillDown, appearance }) {
|
|
|
7955
8134
|
if (!signal?.aborted) setLoading(false);
|
|
7956
8135
|
}
|
|
7957
8136
|
}, [claimsAdminId, renderingProviderId, client]);
|
|
7958
|
-
|
|
8137
|
+
useEffect15(() => {
|
|
7959
8138
|
const controller = new AbortController();
|
|
7960
8139
|
void load(controller.signal);
|
|
7961
8140
|
return () => controller.abort();
|
|
7962
8141
|
}, [load]);
|
|
7963
|
-
if (loading && !result) return /* @__PURE__ */
|
|
7964
|
-
if (error && !result) return /* @__PURE__ */
|
|
7965
|
-
if (!result) return /* @__PURE__ */
|
|
8142
|
+
if (loading && !result) return /* @__PURE__ */ jsx22("div", { className: "mbow-state", children: "Loading bill tasks\u2026" });
|
|
8143
|
+
if (error && !result) return /* @__PURE__ */ jsx22("div", { className: "mbow-state mbow-error", children: error.message });
|
|
8144
|
+
if (!result) return /* @__PURE__ */ jsx22(Fragment16, {});
|
|
7966
8145
|
const selectionProps = loading || error ? {} : {
|
|
7967
8146
|
onSelectCell: (cell) => onDrillDown?.({ ...taskQuery(cell), ...claimsAdminId ? { claimsAdministrator: claimsAdminId } : {}, ...renderingProviderId ? { renderingProviderId } : {} })
|
|
7968
8147
|
};
|
|
7969
|
-
return /* @__PURE__ */
|
|
7970
|
-
/* @__PURE__ */
|
|
8148
|
+
return /* @__PURE__ */ jsxs22(Fragment16, { children: [
|
|
8149
|
+
/* @__PURE__ */ jsxs22("p", { className: "mbow-task-note", children: [
|
|
7971
8150
|
"Open follow-up work grouped by task and age. ",
|
|
7972
8151
|
result.waiting ? "Sent and accepted bills waiting for a payer are shown below." : "Find sent and accepted bills in All bills."
|
|
7973
8152
|
] }),
|
|
7974
|
-
loading ? /* @__PURE__ */
|
|
7975
|
-
error ? /* @__PURE__ */
|
|
7976
|
-
/* @__PURE__ */
|
|
7977
|
-
/* @__PURE__ */
|
|
7978
|
-
/* @__PURE__ */
|
|
7979
|
-
result.filters.claimsAdministrators.map((item) => /* @__PURE__ */
|
|
8153
|
+
loading ? /* @__PURE__ */ jsx22("p", { role: "status", children: "Updating bill tasks\u2026" }) : null,
|
|
8154
|
+
error ? /* @__PURE__ */ jsx22("p", { role: "alert", className: "mbow-error", children: error.message }) : null,
|
|
8155
|
+
/* @__PURE__ */ jsx22(BillTasksDashboard, { data: result.dashboard, appearance: appearance ?? { preset: "mindbill" }, toolbar: /* @__PURE__ */ jsxs22("div", { className: "mbow-toolbar", children: [
|
|
8156
|
+
/* @__PURE__ */ jsxs22("select", { "aria-label": "Claims administrator filter", className: "mbow-select", value: claimsAdminId, onChange: (event) => setClaimsAdminId(event.target.value), children: [
|
|
8157
|
+
/* @__PURE__ */ jsx22("option", { value: "", children: "All claims administrators" }),
|
|
8158
|
+
result.filters.claimsAdministrators.map((item) => /* @__PURE__ */ jsx22("option", { value: item.id, children: item.name }, item.id))
|
|
7980
8159
|
] }),
|
|
7981
|
-
/* @__PURE__ */
|
|
8160
|
+
/* @__PURE__ */ jsx22(RenderingProviderFilter, { value: renderingProviderId, options: result.filters.renderingProviders, onChange: setRenderingProviderId })
|
|
7982
8161
|
] }), ...selectionProps }),
|
|
7983
|
-
result.waiting ? /* @__PURE__ */
|
|
8162
|
+
result.waiting ? /* @__PURE__ */ jsx22(
|
|
7984
8163
|
BillTasksDashboard,
|
|
7985
8164
|
{
|
|
7986
8165
|
data: result.waiting,
|
|
@@ -7998,28 +8177,28 @@ function BillTasksContent({ client, onDrillDown, appearance }) {
|
|
|
7998
8177
|
}
|
|
7999
8178
|
function ConnectedBillTasksDashboard({ appearance, className, style, onDrillDown, ...options }) {
|
|
8000
8179
|
const client = useClient(options);
|
|
8001
|
-
return /* @__PURE__ */
|
|
8180
|
+
return /* @__PURE__ */ jsx22(Surface, { appearance, className, style, children: /* @__PURE__ */ jsx22(BillTasksContent, { client, onDrillDown, appearance }) });
|
|
8002
8181
|
}
|
|
8003
8182
|
function RangeToolbar({ from, to, setFrom, setTo }) {
|
|
8004
|
-
return /* @__PURE__ */
|
|
8005
|
-
/* @__PURE__ */
|
|
8183
|
+
return /* @__PURE__ */ jsxs22("div", { className: "mbow-toolbar", children: [
|
|
8184
|
+
/* @__PURE__ */ jsxs22("label", { children: [
|
|
8006
8185
|
"From ",
|
|
8007
|
-
/* @__PURE__ */
|
|
8186
|
+
/* @__PURE__ */ jsx22("input", { className: "mbow-input", type: "date", value: from, onChange: (event) => setFrom(event.target.value) })
|
|
8008
8187
|
] }),
|
|
8009
|
-
/* @__PURE__ */
|
|
8188
|
+
/* @__PURE__ */ jsxs22("label", { children: [
|
|
8010
8189
|
"To ",
|
|
8011
|
-
/* @__PURE__ */
|
|
8190
|
+
/* @__PURE__ */ jsx22("input", { className: "mbow-input", type: "date", value: to, onChange: (event) => setTo(event.target.value) })
|
|
8012
8191
|
] })
|
|
8013
8192
|
] });
|
|
8014
8193
|
}
|
|
8015
8194
|
function ConnectedServiceLineItemsReport({ appearance, className, style, initialFrom, initialTo, onSelectBill, ...options }) {
|
|
8016
8195
|
const defaults = useMemo11(() => defaultRange(), []);
|
|
8017
8196
|
const client = useClient(options);
|
|
8018
|
-
const [from, setFrom] =
|
|
8019
|
-
const [to, setTo] =
|
|
8020
|
-
const [data, setData] =
|
|
8021
|
-
const [error, setError] =
|
|
8022
|
-
|
|
8197
|
+
const [from, setFrom] = useState18(initialFrom ?? defaults.from);
|
|
8198
|
+
const [to, setTo] = useState18(initialTo ?? defaults.to);
|
|
8199
|
+
const [data, setData] = useState18(null);
|
|
8200
|
+
const [error, setError] = useState18(null);
|
|
8201
|
+
useEffect15(() => {
|
|
8023
8202
|
const controller = new AbortController();
|
|
8024
8203
|
setError(null);
|
|
8025
8204
|
void client.getServiceLineItems({ from, to }, controller.signal).then(setData).catch((cause) => {
|
|
@@ -8027,64 +8206,64 @@ function ConnectedServiceLineItemsReport({ appearance, className, style, initial
|
|
|
8027
8206
|
});
|
|
8028
8207
|
return () => controller.abort();
|
|
8029
8208
|
}, [client, from, to]);
|
|
8030
|
-
return /* @__PURE__ */
|
|
8031
|
-
/* @__PURE__ */
|
|
8032
|
-
/* @__PURE__ */
|
|
8033
|
-
/* @__PURE__ */
|
|
8209
|
+
return /* @__PURE__ */ jsxs22(Surface, { appearance, className, style, children: [
|
|
8210
|
+
/* @__PURE__ */ jsx22("div", { className: "mbow-head", children: /* @__PURE__ */ jsxs22("div", { children: [
|
|
8211
|
+
/* @__PURE__ */ jsx22("h2", { children: "Original submissions by procedure" }),
|
|
8212
|
+
/* @__PURE__ */ jsx22("p", { className: "mbow-sub", children: "First payer submission for each patient and date of service." })
|
|
8034
8213
|
] }) }),
|
|
8035
|
-
/* @__PURE__ */
|
|
8036
|
-
error ? /* @__PURE__ */
|
|
8037
|
-
/* @__PURE__ */
|
|
8038
|
-
/* @__PURE__ */
|
|
8039
|
-
/* @__PURE__ */
|
|
8040
|
-
/* @__PURE__ */
|
|
8041
|
-
/* @__PURE__ */
|
|
8214
|
+
/* @__PURE__ */ jsx22(RangeToolbar, { from, to, setFrom, setTo }),
|
|
8215
|
+
error ? /* @__PURE__ */ jsx22("div", { className: "mbow-state mbow-error", children: error.message }) : !data ? /* @__PURE__ */ jsx22("div", { className: "mbow-state", children: "Loading report\u2026" }) : /* @__PURE__ */ jsxs22(Fragment16, { children: [
|
|
8216
|
+
/* @__PURE__ */ jsxs22("div", { className: "mbow-metrics", children: [
|
|
8217
|
+
/* @__PURE__ */ jsx22(Metric, { label: "Original bills", value: String(data.totalBills) }),
|
|
8218
|
+
/* @__PURE__ */ jsx22(Metric, { label: "Service lines", value: String(data.totalLines) }),
|
|
8219
|
+
/* @__PURE__ */ jsx22(Metric, { label: "Total billed", value: money7(data.totalBilled) }),
|
|
8220
|
+
/* @__PURE__ */ jsx22(Metric, { label: "Report window", value: data.windowLabel })
|
|
8042
8221
|
] }),
|
|
8043
|
-
/* @__PURE__ */
|
|
8044
|
-
/* @__PURE__ */
|
|
8045
|
-
/* @__PURE__ */
|
|
8046
|
-
/* @__PURE__ */
|
|
8047
|
-
/* @__PURE__ */
|
|
8048
|
-
/* @__PURE__ */
|
|
8049
|
-
/* @__PURE__ */
|
|
8050
|
-
/* @__PURE__ */
|
|
8222
|
+
/* @__PURE__ */ jsxs22("div", { className: "mbow-card mbow-scroll", children: [
|
|
8223
|
+
/* @__PURE__ */ jsx22("div", { className: "mbow-section-head", children: /* @__PURE__ */ jsx22("h3", { children: "Procedure summary" }) }),
|
|
8224
|
+
/* @__PURE__ */ jsxs22("table", { className: "mbow-table", children: [
|
|
8225
|
+
/* @__PURE__ */ jsx22("thead", { children: /* @__PURE__ */ jsxs22("tr", { children: [
|
|
8226
|
+
/* @__PURE__ */ jsx22("th", { children: "Procedure code" }),
|
|
8227
|
+
/* @__PURE__ */ jsx22("th", { children: "Bills" }),
|
|
8228
|
+
/* @__PURE__ */ jsx22("th", { children: "Service lines" }),
|
|
8229
|
+
/* @__PURE__ */ jsx22("th", { className: "mbow-money", children: "Total billed" })
|
|
8051
8230
|
] }) }),
|
|
8052
|
-
/* @__PURE__ */
|
|
8053
|
-
/* @__PURE__ */
|
|
8054
|
-
/* @__PURE__ */
|
|
8055
|
-
/* @__PURE__ */
|
|
8056
|
-
/* @__PURE__ */
|
|
8231
|
+
/* @__PURE__ */ jsx22("tbody", { children: data.cptRows.map((row) => /* @__PURE__ */ jsxs22("tr", { children: [
|
|
8232
|
+
/* @__PURE__ */ jsx22("td", { className: "mbow-strong", children: row.code }),
|
|
8233
|
+
/* @__PURE__ */ jsx22("td", { children: row.bills }),
|
|
8234
|
+
/* @__PURE__ */ jsx22("td", { children: row.lines }),
|
|
8235
|
+
/* @__PURE__ */ jsx22("td", { className: "mbow-money", children: money7(row.billed) })
|
|
8057
8236
|
] }, row.code)) })
|
|
8058
8237
|
] })
|
|
8059
8238
|
] }),
|
|
8060
|
-
/* @__PURE__ */
|
|
8061
|
-
/* @__PURE__ */
|
|
8062
|
-
/* @__PURE__ */
|
|
8063
|
-
/* @__PURE__ */
|
|
8064
|
-
/* @__PURE__ */
|
|
8065
|
-
/* @__PURE__ */
|
|
8066
|
-
/* @__PURE__ */
|
|
8067
|
-
/* @__PURE__ */
|
|
8068
|
-
/* @__PURE__ */
|
|
8069
|
-
/* @__PURE__ */
|
|
8070
|
-
/* @__PURE__ */
|
|
8071
|
-
/* @__PURE__ */
|
|
8239
|
+
/* @__PURE__ */ jsxs22("div", { className: "mbow-card mbow-scroll", style: { marginTop: 16 }, children: [
|
|
8240
|
+
/* @__PURE__ */ jsx22("div", { className: "mbow-section-head", children: /* @__PURE__ */ jsx22("h3", { children: "All original bills" }) }),
|
|
8241
|
+
/* @__PURE__ */ jsxs22("table", { className: "mbow-table", children: [
|
|
8242
|
+
/* @__PURE__ */ jsx22("thead", { children: /* @__PURE__ */ jsxs22("tr", { children: [
|
|
8243
|
+
/* @__PURE__ */ jsx22("th", { children: "Bill" }),
|
|
8244
|
+
/* @__PURE__ */ jsx22("th", { children: "First submitted" }),
|
|
8245
|
+
/* @__PURE__ */ jsx22("th", { children: "Patient \xB7 Claim" }),
|
|
8246
|
+
/* @__PURE__ */ jsx22("th", { children: "DOS" }),
|
|
8247
|
+
/* @__PURE__ */ jsx22("th", { children: "Claims administrator" }),
|
|
8248
|
+
/* @__PURE__ */ jsx22("th", { children: "Codes" }),
|
|
8249
|
+
/* @__PURE__ */ jsx22("th", { className: "mbow-money", children: "Billed" }),
|
|
8250
|
+
/* @__PURE__ */ jsx22("th", { children: "Status" })
|
|
8072
8251
|
] }) }),
|
|
8073
|
-
/* @__PURE__ */
|
|
8074
|
-
/* @__PURE__ */
|
|
8252
|
+
/* @__PURE__ */ jsx22("tbody", { children: data.billRows.map((row) => /* @__PURE__ */ jsxs22("tr", { className: onSelectBill ? "clickable" : "", onClick: () => onSelectBill?.(row.billId), children: [
|
|
8253
|
+
/* @__PURE__ */ jsxs22("td", { className: "mbow-strong", children: [
|
|
8075
8254
|
"#",
|
|
8076
8255
|
row.billNumber
|
|
8077
8256
|
] }),
|
|
8078
|
-
/* @__PURE__ */
|
|
8079
|
-
/* @__PURE__ */
|
|
8257
|
+
/* @__PURE__ */ jsx22("td", { children: shortDate(row.submittedDate) }),
|
|
8258
|
+
/* @__PURE__ */ jsxs22("td", { children: [
|
|
8080
8259
|
row.patient,
|
|
8081
|
-
/* @__PURE__ */
|
|
8260
|
+
/* @__PURE__ */ jsx22("div", { className: "mbow-muted", children: row.claim })
|
|
8082
8261
|
] }),
|
|
8083
|
-
/* @__PURE__ */
|
|
8084
|
-
/* @__PURE__ */
|
|
8085
|
-
/* @__PURE__ */
|
|
8086
|
-
/* @__PURE__ */
|
|
8087
|
-
/* @__PURE__ */
|
|
8262
|
+
/* @__PURE__ */ jsx22("td", { children: shortDate(row.dos) }),
|
|
8263
|
+
/* @__PURE__ */ jsx22("td", { children: row.claimsAdmin }),
|
|
8264
|
+
/* @__PURE__ */ jsx22("td", { children: row.codes.join(", ") }),
|
|
8265
|
+
/* @__PURE__ */ jsx22("td", { className: "mbow-money", children: money7(row.billed) }),
|
|
8266
|
+
/* @__PURE__ */ jsx22("td", { children: row.status })
|
|
8088
8267
|
] }, row.billId)) })
|
|
8089
8268
|
] })
|
|
8090
8269
|
] })
|
|
@@ -8092,19 +8271,19 @@ function ConnectedServiceLineItemsReport({ appearance, className, style, initial
|
|
|
8092
8271
|
] });
|
|
8093
8272
|
}
|
|
8094
8273
|
function Metric({ label, value }) {
|
|
8095
|
-
return /* @__PURE__ */
|
|
8096
|
-
/* @__PURE__ */
|
|
8097
|
-
/* @__PURE__ */
|
|
8274
|
+
return /* @__PURE__ */ jsxs22("div", { className: "mbow-metric", children: [
|
|
8275
|
+
/* @__PURE__ */ jsx22("span", { children: label }),
|
|
8276
|
+
/* @__PURE__ */ jsx22("strong", { children: value })
|
|
8098
8277
|
] });
|
|
8099
8278
|
}
|
|
8100
8279
|
function ConnectedProductivityReport({ appearance, className, style, initialFrom, initialTo, ...options }) {
|
|
8101
8280
|
const defaults = useMemo11(() => defaultRange(13), []);
|
|
8102
8281
|
const client = useClient(options);
|
|
8103
|
-
const [from, setFrom] =
|
|
8104
|
-
const [to, setTo] =
|
|
8105
|
-
const [data, setData] =
|
|
8106
|
-
const [error, setError] =
|
|
8107
|
-
|
|
8282
|
+
const [from, setFrom] = useState18(initialFrom ?? defaults.from);
|
|
8283
|
+
const [to, setTo] = useState18(initialTo ?? defaults.to);
|
|
8284
|
+
const [data, setData] = useState18(null);
|
|
8285
|
+
const [error, setError] = useState18(null);
|
|
8286
|
+
useEffect15(() => {
|
|
8108
8287
|
const controller = new AbortController();
|
|
8109
8288
|
setError(null);
|
|
8110
8289
|
void client.getProductivity({ from, to }, controller.signal).then(setData).catch((cause) => {
|
|
@@ -8113,41 +8292,41 @@ function ConnectedProductivityReport({ appearance, className, style, initialFrom
|
|
|
8113
8292
|
return () => controller.abort();
|
|
8114
8293
|
}, [client, from, to]);
|
|
8115
8294
|
const maxSent = data ? Math.max(1, ...Object.values(data.sentTotal)) : 1;
|
|
8116
|
-
return /* @__PURE__ */
|
|
8117
|
-
/* @__PURE__ */
|
|
8118
|
-
/* @__PURE__ */
|
|
8119
|
-
/* @__PURE__ */
|
|
8295
|
+
return /* @__PURE__ */ jsxs22(Surface, { appearance, className, style, children: [
|
|
8296
|
+
/* @__PURE__ */ jsx22("div", { className: "mbow-head", children: /* @__PURE__ */ jsxs22("div", { children: [
|
|
8297
|
+
/* @__PURE__ */ jsx22("h2", { children: "Productivity" }),
|
|
8298
|
+
/* @__PURE__ */ jsx22("p", { className: "mbow-sub", children: "Bills created and sent per biller, plus accepted-first-try rate." })
|
|
8120
8299
|
] }) }),
|
|
8121
|
-
/* @__PURE__ */
|
|
8122
|
-
error ? /* @__PURE__ */
|
|
8123
|
-
/* @__PURE__ */
|
|
8124
|
-
/* @__PURE__ */
|
|
8125
|
-
/* @__PURE__ */
|
|
8126
|
-
/* @__PURE__ */
|
|
8127
|
-
/* @__PURE__ */
|
|
8300
|
+
/* @__PURE__ */ jsx22(RangeToolbar, { from, to, setFrom, setTo }),
|
|
8301
|
+
error ? /* @__PURE__ */ jsx22("div", { className: "mbow-state mbow-error", children: error.message }) : !data ? /* @__PURE__ */ jsx22("div", { className: "mbow-state", children: "Loading report\u2026" }) : /* @__PURE__ */ jsxs22(Fragment16, { children: [
|
|
8302
|
+
/* @__PURE__ */ jsxs22("div", { className: "mbow-metrics", children: [
|
|
8303
|
+
/* @__PURE__ */ jsx22(Metric, { label: "Bills created", value: String(data.totalCreated) }),
|
|
8304
|
+
/* @__PURE__ */ jsx22(Metric, { label: "Transmissions", value: String(data.totalSent) }),
|
|
8305
|
+
/* @__PURE__ */ jsx22(Metric, { label: "Bills submitted", value: String(data.totalSubmitted) }),
|
|
8306
|
+
/* @__PURE__ */ jsx22(Metric, { label: "Accepted first try", value: data.totalSubmitted ? `${Math.round(data.totalClean / data.totalSubmitted * 100)}%` : "\u2014" })
|
|
8128
8307
|
] }),
|
|
8129
|
-
/* @__PURE__ */
|
|
8130
|
-
/* @__PURE__ */
|
|
8131
|
-
/* @__PURE__ */
|
|
8132
|
-
/* @__PURE__ */
|
|
8133
|
-
/* @__PURE__ */
|
|
8134
|
-
/* @__PURE__ */
|
|
8135
|
-
/* @__PURE__ */
|
|
8136
|
-
/* @__PURE__ */
|
|
8137
|
-
/* @__PURE__ */
|
|
8138
|
-
/* @__PURE__ */
|
|
8308
|
+
/* @__PURE__ */ jsxs22("div", { className: "mbow-card mbow-scroll", children: [
|
|
8309
|
+
/* @__PURE__ */ jsx22("div", { className: "mbow-section-head", children: /* @__PURE__ */ jsx22("h3", { children: "Per-biller summary" }) }),
|
|
8310
|
+
/* @__PURE__ */ jsxs22("table", { className: "mbow-table", children: [
|
|
8311
|
+
/* @__PURE__ */ jsx22("thead", { children: /* @__PURE__ */ jsxs22("tr", { children: [
|
|
8312
|
+
/* @__PURE__ */ jsx22("th", { children: "Biller" }),
|
|
8313
|
+
/* @__PURE__ */ jsx22("th", { children: "Created" }),
|
|
8314
|
+
/* @__PURE__ */ jsx22("th", { children: "Transmissions" }),
|
|
8315
|
+
/* @__PURE__ */ jsx22("th", { children: "Submitted" }),
|
|
8316
|
+
/* @__PURE__ */ jsx22("th", { children: "Accepted first try" }),
|
|
8317
|
+
/* @__PURE__ */ jsx22("th", { children: "Volume" })
|
|
8139
8318
|
] }) }),
|
|
8140
|
-
/* @__PURE__ */
|
|
8319
|
+
/* @__PURE__ */ jsx22("tbody", { children: data.billers.map((biller) => {
|
|
8141
8320
|
const sent = data.sentTotal[biller.name] ?? 0;
|
|
8142
8321
|
const submitted = data.submittedTotal[biller.name] ?? 0;
|
|
8143
8322
|
const clean = data.cleanTotal[biller.name] ?? 0;
|
|
8144
|
-
return /* @__PURE__ */
|
|
8145
|
-
/* @__PURE__ */
|
|
8146
|
-
/* @__PURE__ */
|
|
8147
|
-
/* @__PURE__ */
|
|
8148
|
-
/* @__PURE__ */
|
|
8149
|
-
/* @__PURE__ */
|
|
8150
|
-
/* @__PURE__ */
|
|
8323
|
+
return /* @__PURE__ */ jsxs22("tr", { children: [
|
|
8324
|
+
/* @__PURE__ */ jsx22("td", { className: "mbow-strong", children: biller.name }),
|
|
8325
|
+
/* @__PURE__ */ jsx22("td", { children: data.createdTotal[biller.name] ?? 0 }),
|
|
8326
|
+
/* @__PURE__ */ jsx22("td", { children: sent }),
|
|
8327
|
+
/* @__PURE__ */ jsx22("td", { children: submitted }),
|
|
8328
|
+
/* @__PURE__ */ jsx22("td", { children: submitted ? `${Math.round(clean / submitted * 100)}%` : "\u2014" }),
|
|
8329
|
+
/* @__PURE__ */ jsx22("td", { children: /* @__PURE__ */ jsx22("div", { className: "mbow-bar", children: /* @__PURE__ */ jsx22("i", { style: { width: `${sent / maxSent * 100}%` } }) }) })
|
|
8151
8330
|
] }, biller.name);
|
|
8152
8331
|
}) })
|
|
8153
8332
|
] })
|
|
@@ -8157,43 +8336,43 @@ function ConnectedProductivityReport({ appearance, className, style, initialFrom
|
|
|
8157
8336
|
}
|
|
8158
8337
|
function ConnectedBillingWorkspace({ appearance, className, style, initialView = "tasks", onCreateBill, onPostPayment, sandboxControls = false, getCourtesyCopyRecipientOptions, ...options }) {
|
|
8159
8338
|
const client = useClient(options);
|
|
8160
|
-
const [view, setView] =
|
|
8161
|
-
const [billQuery, setBillQuery] =
|
|
8162
|
-
const [selectedBillId, setSelectedBillId] =
|
|
8339
|
+
const [view, setView] = useState18(initialView);
|
|
8340
|
+
const [billQuery, setBillQuery] = useState18({ status: "all" });
|
|
8341
|
+
const [selectedBillId, setSelectedBillId] = useState18(null);
|
|
8163
8342
|
const { workspaceRef, availableHeight } = useAvailableViewportHeight();
|
|
8164
8343
|
const workspaceClassName = ["mbow-workspace", className].filter(Boolean).join(" ");
|
|
8165
8344
|
const hasExplicitHeight = style?.height != null || style?.maxHeight != null;
|
|
8166
8345
|
const workspaceStyle = availableHeight == null || hasExplicitHeight ? style : { ...style, maxHeight: availableHeight };
|
|
8167
|
-
if (selectedBillId) return /* @__PURE__ */
|
|
8168
|
-
/* @__PURE__ */
|
|
8169
|
-
/* @__PURE__ */
|
|
8346
|
+
if (selectedBillId) return /* @__PURE__ */ jsxs22(Surface, { surfaceRef: workspaceRef, appearance, className: workspaceClassName, style: workspaceStyle, children: [
|
|
8347
|
+
/* @__PURE__ */ jsx22("button", { className: "mbow-button mbow-back", type: "button", onClick: () => setSelectedBillId(null), children: "\u2190 Back to bills" }),
|
|
8348
|
+
/* @__PURE__ */ jsx22(ConnectedBillLifecycle, { billId: selectedBillId, sandboxControls, courtesyCopyRecipientOptions: getCourtesyCopyRecipientOptions?.(selectedBillId) ?? [], ...options, ...appearance ? { appearance } : {} })
|
|
8170
8349
|
] });
|
|
8171
8350
|
const selectView = (next) => {
|
|
8172
8351
|
setView(next);
|
|
8173
8352
|
setSelectedBillId(null);
|
|
8174
8353
|
};
|
|
8175
8354
|
const appearanceProps = appearance ? { appearance } : {};
|
|
8176
|
-
return /* @__PURE__ */
|
|
8177
|
-
/* @__PURE__ */
|
|
8178
|
-
/* @__PURE__ */
|
|
8179
|
-
/* @__PURE__ */
|
|
8180
|
-
/* @__PURE__ */
|
|
8355
|
+
return /* @__PURE__ */ jsxs22(Surface, { surfaceRef: workspaceRef, appearance, className: workspaceClassName, style: workspaceStyle, children: [
|
|
8356
|
+
/* @__PURE__ */ jsxs22("div", { className: "mbow-head", children: [
|
|
8357
|
+
/* @__PURE__ */ jsxs22("div", { children: [
|
|
8358
|
+
/* @__PURE__ */ jsx22("h2", { children: "Billing" }),
|
|
8359
|
+
/* @__PURE__ */ jsx22("p", { className: "mbow-sub", children: "Follow up on open work or find any bill and its current status." })
|
|
8181
8360
|
] }),
|
|
8182
|
-
onCreateBill ? /* @__PURE__ */
|
|
8361
|
+
onCreateBill ? /* @__PURE__ */ jsx22("div", { className: "mbow-actions", children: /* @__PURE__ */ jsx22("button", { className: "mbow-button primary", type: "button", onClick: onCreateBill, children: "+ Add bill" }) }) : null
|
|
8183
8362
|
] }),
|
|
8184
|
-
/* @__PURE__ */
|
|
8185
|
-
view === "tasks" ? /* @__PURE__ */
|
|
8363
|
+
/* @__PURE__ */ jsx22("div", { className: "mbow-tabs", role: "tablist", children: [["tasks", "Bill tasks"], ["bills", "All bills"], ["procedures", "Procedures"], ["productivity", "Productivity"], ["payments", "Payment review"]].map(([id, label]) => /* @__PURE__ */ jsx22("button", { className: `mbow-tab ${view === id ? "active" : ""}`, type: "button", role: "tab", "aria-selected": view === id, onClick: () => selectView(id), children: label }, id)) }),
|
|
8364
|
+
view === "tasks" ? /* @__PURE__ */ jsx22(BillTasksContent, { client, onDrillDown: (query) => {
|
|
8186
8365
|
setBillQuery(query);
|
|
8187
8366
|
setView("bills");
|
|
8188
|
-
}, appearance }) : view === "bills" ? /* @__PURE__ */
|
|
8367
|
+
}, appearance }) : view === "bills" ? /* @__PURE__ */ jsx22(BillSearchContent, { client, initialQuery: billQuery, onSelectBill: (bill) => setSelectedBillId(bill.id) }) : view === "procedures" ? /* @__PURE__ */ jsx22(ConnectedServiceLineItemsReport, { ...options, ...appearanceProps, onSelectBill: setSelectedBillId }) : view === "payments" ? /* @__PURE__ */ jsx22(ConnectedPaymentReview, { ...options, ...appearanceProps, ...onPostPayment ? { onPostPayment } : {}, onSelectBill: setSelectedBillId }) : /* @__PURE__ */ jsx22(ConnectedProductivityReport, { ...options, ...appearanceProps })
|
|
8189
8368
|
] });
|
|
8190
8369
|
}
|
|
8191
8370
|
|
|
8192
8371
|
// src/index.tsx
|
|
8193
8372
|
function widget(tagName, props) {
|
|
8194
|
-
const ref =
|
|
8373
|
+
const ref = useRef11(null);
|
|
8195
8374
|
const { onMindBill, onMindBillError } = props;
|
|
8196
|
-
|
|
8375
|
+
useEffect16(() => {
|
|
8197
8376
|
const element = ref.current;
|
|
8198
8377
|
if (!element) return;
|
|
8199
8378
|
const handleEvent = (event) => onMindBill?.(event);
|
|
@@ -8272,6 +8451,7 @@ export {
|
|
|
8272
8451
|
ConnectedBillStatus,
|
|
8273
8452
|
ConnectedBillTasksDashboard,
|
|
8274
8453
|
ConnectedBillingWorkspace,
|
|
8454
|
+
ConnectedNotificationRecipientsSettings,
|
|
8275
8455
|
ConnectedNotificationSettings,
|
|
8276
8456
|
ConnectedPaymentReview,
|
|
8277
8457
|
ConnectedProductivityReport,
|
|
@@ -8282,6 +8462,7 @@ export {
|
|
|
8282
8462
|
MED_LEGAL_REPORT_TYPE_CODE,
|
|
8283
8463
|
MindBillBillReview,
|
|
8284
8464
|
MindBillBillTimeline,
|
|
8465
|
+
NotificationRecipientsSettings,
|
|
8285
8466
|
NotificationSettings,
|
|
8286
8467
|
OrganizationOnboarding,
|
|
8287
8468
|
PSYCH_QME_DEFAULT_DIAGNOSIS,
|