@mindbill/react 0.48.1 → 0.49.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 +61 -3
- package/dist/index.js +1000 -770
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
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 useEffect14, useRef as useRef10 } from "react";
|
|
352
352
|
|
|
353
353
|
// src/native-bill-review.tsx
|
|
354
354
|
import { sanitizeBillReviewSaveInput } from "@mindbill/browser";
|
|
@@ -5028,19 +5028,193 @@ function BillingSettings(props) {
|
|
|
5028
5028
|
);
|
|
5029
5029
|
}
|
|
5030
5030
|
|
|
5031
|
+
// src/notification-settings.tsx
|
|
5032
|
+
import { useEffect as useEffect9, useId as useId3, useRef as useRef5, useState as useState10 } from "react";
|
|
5033
|
+
import { Fragment as Fragment11, jsx as jsx14, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
5034
|
+
function defaultNotificationPreferences() {
|
|
5035
|
+
return { enabled: false, statusUpdates: false, agingDays: [], quietHours: true };
|
|
5036
|
+
}
|
|
5037
|
+
function notificationSettingsUpdate(preferences, consent) {
|
|
5038
|
+
return {
|
|
5039
|
+
enabled: preferences.enabled === true,
|
|
5040
|
+
statusUpdates: preferences.statusUpdates === true,
|
|
5041
|
+
agingDays: [30, 60, 90].filter((day) => preferences.agingDays.includes(day)),
|
|
5042
|
+
quietHours: preferences.quietHours === true,
|
|
5043
|
+
consent: consent === true
|
|
5044
|
+
};
|
|
5045
|
+
}
|
|
5046
|
+
function notificationSettingsNeedsConsent(previous, next) {
|
|
5047
|
+
if (!next.enabled) return false;
|
|
5048
|
+
if (!previous?.enabled || previous.statusUpdates !== next.statusUpdates || previous.quietHours !== next.quietHours) return true;
|
|
5049
|
+
return JSON.stringify(notificationSettingsUpdate(previous, false).agingDays) !== JSON.stringify(notificationSettingsUpdate(next, false).agingDays);
|
|
5050
|
+
}
|
|
5051
|
+
var css10 = `
|
|
5052
|
+
.mbns{color:var(--mb-text);font-family:var(--mb-font);font-size:14px;line-height:1.5;min-width:0}.mbns *{box-sizing:border-box}.mbns h2,.mbns p{margin:0}.mbns-card{padding:24px;background:var(--mb-surface);border:1px solid var(--mb-border);border-radius:var(--mb-radius);box-shadow:var(--mb-shadow)}
|
|
5053
|
+
.mbns-header{display:flex;gap:16px;align-items:flex-start;justify-content:space-between;margin-bottom:24px}.mbns h2{font-size:20px;line-height:1.3;font-weight:700}.mbns-muted{color:var(--mb-muted)}.mbns-header p{margin-top:6px;max-width:56ch}.mbns-badge{flex-shrink:0;background:var(--mb-soft);color:var(--mb-muted);padding:4px 9px;border-radius:var(--mb-control-radius);font-size:12px;font-weight:650}
|
|
5054
|
+
.mbns-account{padding:14px 16px;background:var(--mb-soft);border-radius:var(--mb-control-radius);margin-bottom:20px;overflow-wrap:anywhere}.mbns-account strong{display:block;font-weight:650}.mbns-account p{margin-top:3px;font-size:13px}
|
|
5055
|
+
.mbns-check{display:flex;gap:12px;align-items:flex-start;cursor:pointer;min-height:44px;padding:8px 0}.mbns-check input{flex-shrink:0;margin:3px 0 0;width:18px;height:18px;accent-color:var(--mb-accent)}.mbns-check strong{display:block;font-weight:650}.mbns-check small{display:block;color:var(--mb-muted);font-size:13px;margin-top:2px}.mbns fieldset{margin:14px 0 0;padding:16px 0 0;border:0;border-top:1px solid var(--mb-border);min-width:0}.mbns legend{padding:0 8px 0 0;font-size:13px;font-weight:650}.mbns-days{display:flex;flex-wrap:wrap;gap:8px 24px}.mbns-consent{border-top:1px solid var(--mb-border);margin-top:16px;padding-top:16px}.mbns-actions{display:flex;gap:12px;flex-wrap:wrap;align-items:center;margin-top:24px;padding-top:20px;border-top:1px solid var(--mb-border)}
|
|
5056
|
+
.mbns button{font:inherit;min-height:44px;padding:10px 16px;border:1px solid var(--mb-border);border-radius:var(--mb-control-radius);background:var(--mb-surface);color:var(--mb-text);font-weight:650;cursor:pointer}.mbns button.mbns-save{background:var(--mb-accent);border-color:var(--mb-accent);color:var(--mb-accent-contrast)}.mbns button:disabled{opacity:.5;cursor:not-allowed}.mbns input:focus-visible,.mbns button:focus-visible{outline:2px solid var(--mb-accent);outline-offset:3px}.mbns-notice{margin-top:16px!important;color:var(--mb-muted)}.mbns-error{color:var(--mb-danger)}.mbns :disabled+span{opacity:.6}@media(max-width:540px){.mbns-card{padding:18px}.mbns-header{gap:8px}.mbns-actions button{flex:1 1 auto}.mbns-days{gap:4px 18px}}
|
|
5057
|
+
`;
|
|
5058
|
+
function NotificationSettings(props) {
|
|
5059
|
+
return /* @__PURE__ */ jsx14(NotificationSettingsSession, { ...props }, props.identityKey);
|
|
5060
|
+
}
|
|
5061
|
+
var ConnectedNotificationSettings = NotificationSettings;
|
|
5062
|
+
function NotificationSettingsSession({ adapter, appearance, className, style, onSaved }) {
|
|
5063
|
+
const titleId = useId3();
|
|
5064
|
+
const [snapshot, setSnapshot] = useState10(null);
|
|
5065
|
+
const [draft, setDraft] = useState10(defaultNotificationPreferences);
|
|
5066
|
+
const [consent, setConsent] = useState10(false);
|
|
5067
|
+
const [phase, setPhase] = useState10("loading");
|
|
5068
|
+
const [notice, setNotice] = useState10("");
|
|
5069
|
+
const [failed, setFailed] = useState10(false);
|
|
5070
|
+
const [reload, setReload] = useState10(0);
|
|
5071
|
+
const request = useRef5(0);
|
|
5072
|
+
useEffect9(() => {
|
|
5073
|
+
const current = ++request.current;
|
|
5074
|
+
setPhase("loading");
|
|
5075
|
+
setSnapshot(null);
|
|
5076
|
+
setDraft(defaultNotificationPreferences());
|
|
5077
|
+
setConsent(false);
|
|
5078
|
+
setNotice("");
|
|
5079
|
+
setFailed(false);
|
|
5080
|
+
void Promise.resolve().then(() => adapter.load()).then((result) => {
|
|
5081
|
+
if (current !== request.current) return;
|
|
5082
|
+
setSnapshot(result);
|
|
5083
|
+
setDraft(result.preferences ?? defaultNotificationPreferences());
|
|
5084
|
+
setPhase("ready");
|
|
5085
|
+
}).catch(() => {
|
|
5086
|
+
if (current !== request.current) return;
|
|
5087
|
+
setPhase("error");
|
|
5088
|
+
});
|
|
5089
|
+
return () => {
|
|
5090
|
+
request.current++;
|
|
5091
|
+
};
|
|
5092
|
+
}, [adapter, reload]);
|
|
5093
|
+
const needsConsent = notificationSettingsNeedsConsent(snapshot?.preferences ?? null, draft);
|
|
5094
|
+
const hasCategory = draft.statusUpdates || draft.agingDays.length > 0;
|
|
5095
|
+
const changed = JSON.stringify(notificationSettingsUpdate(draft, false)) !== JSON.stringify(notificationSettingsUpdate(snapshot?.preferences ?? defaultNotificationPreferences(), false));
|
|
5096
|
+
const busy = phase !== "ready";
|
|
5097
|
+
const canSave = !busy && changed && (!draft.enabled || !!snapshot?.canEnable && hasCategory && (!needsConsent || consent));
|
|
5098
|
+
const update = (value) => {
|
|
5099
|
+
setDraft((previous) => ({ ...previous, ...value }));
|
|
5100
|
+
setConsent(false);
|
|
5101
|
+
setNotice("");
|
|
5102
|
+
setFailed(false);
|
|
5103
|
+
};
|
|
5104
|
+
const save = async (unsubscribe) => {
|
|
5105
|
+
if (busy || !unsubscribe && !canSave) return;
|
|
5106
|
+
const current = ++request.current;
|
|
5107
|
+
setPhase("saving");
|
|
5108
|
+
setNotice("");
|
|
5109
|
+
setFailed(false);
|
|
5110
|
+
try {
|
|
5111
|
+
const result = await (unsubscribe ? adapter.unsubscribe() : adapter.save(notificationSettingsUpdate(draft, consent)));
|
|
5112
|
+
if (current !== request.current) return;
|
|
5113
|
+
setSnapshot(result);
|
|
5114
|
+
setDraft(result.preferences ?? defaultNotificationPreferences());
|
|
5115
|
+
setConsent(false);
|
|
5116
|
+
setPhase("ready");
|
|
5117
|
+
setNotice(result.preferences?.enabled ? "Notification preferences saved." : "Email notifications are off.");
|
|
5118
|
+
try {
|
|
5119
|
+
onSaved?.(result);
|
|
5120
|
+
} catch {
|
|
5121
|
+
}
|
|
5122
|
+
} catch {
|
|
5123
|
+
if (current !== request.current) return;
|
|
5124
|
+
setPhase("ready");
|
|
5125
|
+
setConsent(false);
|
|
5126
|
+
setFailed(true);
|
|
5127
|
+
setNotice("We couldn't confirm your changes. Retry, or reload settings to check their current state.");
|
|
5128
|
+
}
|
|
5129
|
+
};
|
|
5130
|
+
return /* @__PURE__ */ jsxs14("section", { className: `mbns ${className ?? ""}`, style: { ...mindBillAppearanceStyle(appearance), ...style }, "aria-labelledby": titleId, "aria-busy": phase === "loading" || phase === "saving", children: [
|
|
5131
|
+
/* @__PURE__ */ jsx14("style", { children: css10 }),
|
|
5132
|
+
/* @__PURE__ */ jsxs14("div", { className: "mbns-card", children: [
|
|
5133
|
+
/* @__PURE__ */ jsxs14("header", { className: "mbns-header", children: [
|
|
5134
|
+
/* @__PURE__ */ jsxs14("div", { children: [
|
|
5135
|
+
/* @__PURE__ */ jsx14("h2", { id: titleId, children: "Email notifications" }),
|
|
5136
|
+
/* @__PURE__ */ jsx14("p", { className: "mbns-muted", children: "Choose which billing updates reach your inbox. Notifications are off until you opt in." })
|
|
5137
|
+
] }),
|
|
5138
|
+
/* @__PURE__ */ jsx14("span", { className: "mbns-badge", children: !snapshot ? "\u2014" : snapshot.preferences?.enabled ? "On" : "Off" })
|
|
5139
|
+
] }),
|
|
5140
|
+
phase === "loading" ? /* @__PURE__ */ jsx14("p", { role: "status", className: "mbns-muted", children: "Loading notification preferences\u2026" }) : phase === "error" ? /* @__PURE__ */ jsxs14("div", { children: [
|
|
5141
|
+
/* @__PURE__ */ jsx14("p", { role: "alert", className: "mbns-error", children: "We couldn't load your preferences. No settings have been changed." }),
|
|
5142
|
+
/* @__PURE__ */ jsx14("div", { className: "mbns-actions", children: /* @__PURE__ */ jsx14("button", { type: "button", onClick: () => setReload((value) => value + 1), children: "Retry loading" }) })
|
|
5143
|
+
] }) : snapshot ? /* @__PURE__ */ jsxs14(Fragment11, { children: [
|
|
5144
|
+
/* @__PURE__ */ jsxs14("div", { className: "mbns-account", children: [
|
|
5145
|
+
/* @__PURE__ */ jsx14("strong", { children: snapshot.email || "No verified email address" }),
|
|
5146
|
+
/* @__PURE__ */ jsxs14("p", { className: "mbns-muted", children: [
|
|
5147
|
+
snapshot.audience === "practice" ? "Updates for this practice's bills" : "Updates only for bills assigned to you",
|
|
5148
|
+
". Your application manages this address and access."
|
|
5149
|
+
] })
|
|
5150
|
+
] }),
|
|
5151
|
+
snapshot.environment === "sandbox" && /* @__PURE__ */ jsx14("p", { className: "mbns-notice", children: "Sandbox preview only. No notification emails will be sent." }),
|
|
5152
|
+
!snapshot.canEnable && /* @__PURE__ */ jsx14("p", { className: "mbns-notice", children: "Notifications aren't available for this account yet. Ask your administrator to confirm email verification, billing access and notification availability. You can still turn existing notifications off." }),
|
|
5153
|
+
/* @__PURE__ */ jsxs14("label", { className: "mbns-check", children: [
|
|
5154
|
+
/* @__PURE__ */ jsx14("input", { type: "checkbox", checked: draft.enabled, disabled: busy || !snapshot.canEnable && !draft.enabled, onChange: (event) => update({ enabled: event.target.checked }) }),
|
|
5155
|
+
/* @__PURE__ */ jsxs14("span", { children: [
|
|
5156
|
+
/* @__PURE__ */ jsx14("strong", { children: "Send me billing updates" }),
|
|
5157
|
+
/* @__PURE__ */ jsx14("small", { children: "Emails contain a general alert, not patient details or attachments." })
|
|
5158
|
+
] })
|
|
5159
|
+
] }),
|
|
5160
|
+
/* @__PURE__ */ jsxs14("fieldset", { disabled: busy || !draft.enabled || !snapshot.canEnable, children: [
|
|
5161
|
+
/* @__PURE__ */ jsx14("legend", { children: "Updates to receive" }),
|
|
5162
|
+
/* @__PURE__ */ jsxs14("label", { className: "mbns-check", children: [
|
|
5163
|
+
/* @__PURE__ */ jsx14("input", { type: "checkbox", checked: draft.statusUpdates, onChange: (event) => update({ statusUpdates: event.target.checked }) }),
|
|
5164
|
+
/* @__PURE__ */ jsxs14("span", { children: [
|
|
5165
|
+
/* @__PURE__ */ jsx14("strong", { children: "Bill status changes" }),
|
|
5166
|
+
/* @__PURE__ */ jsx14("small", { children: "Follow accepted, rejected, processed and payment updates." })
|
|
5167
|
+
] })
|
|
5168
|
+
] }),
|
|
5169
|
+
/* @__PURE__ */ jsx14("p", { className: "mbns-muted", children: "Remind me when a bill is still waiting for a payer:" }),
|
|
5170
|
+
/* @__PURE__ */ jsx14("div", { className: "mbns-days", children: [30, 60, 90].map((day) => /* @__PURE__ */ jsxs14("label", { className: "mbns-check", children: [
|
|
5171
|
+
/* @__PURE__ */ jsx14("input", { type: "checkbox", checked: draft.agingDays.includes(day), onChange: (event) => update({ agingDays: event.target.checked ? [...draft.agingDays, day] : draft.agingDays.filter((value) => value !== day) }) }),
|
|
5172
|
+
/* @__PURE__ */ jsxs14("span", { children: [
|
|
5173
|
+
day,
|
|
5174
|
+
" days"
|
|
5175
|
+
] })
|
|
5176
|
+
] }, day)) }),
|
|
5177
|
+
/* @__PURE__ */ jsxs14("label", { className: "mbns-check", children: [
|
|
5178
|
+
/* @__PURE__ */ jsx14("input", { type: "checkbox", checked: draft.quietHours, onChange: (event) => update({ quietHours: event.target.checked }) }),
|
|
5179
|
+
/* @__PURE__ */ jsxs14("span", { children: [
|
|
5180
|
+
/* @__PURE__ */ jsx14("strong", { children: "Quiet hours" }),
|
|
5181
|
+
/* @__PURE__ */ jsx14("small", { children: "Hold emails from 7 pm to 7 am Pacific time." })
|
|
5182
|
+
] })
|
|
5183
|
+
] })
|
|
5184
|
+
] }),
|
|
5185
|
+
draft.enabled && !hasCategory && /* @__PURE__ */ jsx14("p", { className: "mbns-notice", children: "Select at least one update type to enable notifications." }),
|
|
5186
|
+
needsConsent && /* @__PURE__ */ jsxs14("label", { className: "mbns-check mbns-consent", children: [
|
|
5187
|
+
/* @__PURE__ */ jsx14("input", { type: "checkbox", checked: consent, disabled: busy || !snapshot.canEnable, onChange: (event) => setConsent(event.target.checked) }),
|
|
5188
|
+
/* @__PURE__ */ jsxs14("span", { children: [
|
|
5189
|
+
"I agree to receive the selected billing emails ",
|
|
5190
|
+
snapshot.audience === "practice" ? "for this practice" : "for bills assigned to me",
|
|
5191
|
+
" at the address above. I can unsubscribe at any time."
|
|
5192
|
+
] })
|
|
5193
|
+
] }),
|
|
5194
|
+
/* @__PURE__ */ jsxs14("div", { className: "mbns-actions", children: [
|
|
5195
|
+
/* @__PURE__ */ jsx14("button", { type: "button", className: "mbns-save", disabled: !canSave, onClick: () => void save(false), children: phase === "saving" ? "Saving\u2026" : "Save preferences" }),
|
|
5196
|
+
snapshot.preferences?.enabled && /* @__PURE__ */ jsx14("button", { type: "button", disabled: busy, onClick: () => void save(true), children: "Unsubscribe from all" }),
|
|
5197
|
+
failed && /* @__PURE__ */ jsx14("button", { type: "button", disabled: busy, onClick: () => setReload((value) => value + 1), children: "Reload settings" })
|
|
5198
|
+
] }),
|
|
5199
|
+
notice && /* @__PURE__ */ jsx14("p", { className: `mbns-notice ${failed ? "mbns-error" : ""}`, role: failed ? "alert" : "status", children: notice })
|
|
5200
|
+
] }) : null
|
|
5201
|
+
] })
|
|
5202
|
+
] });
|
|
5203
|
+
}
|
|
5204
|
+
|
|
5031
5205
|
// src/connected-bill-status.tsx
|
|
5032
5206
|
import {
|
|
5033
5207
|
useCallback as useCallback3,
|
|
5034
|
-
useEffect as
|
|
5208
|
+
useEffect as useEffect10,
|
|
5035
5209
|
useMemo as useMemo7,
|
|
5036
|
-
useRef as
|
|
5037
|
-
useState as
|
|
5210
|
+
useRef as useRef6,
|
|
5211
|
+
useState as useState11
|
|
5038
5212
|
} from "react";
|
|
5039
5213
|
import {
|
|
5040
5214
|
DEFAULT_API_BASE_URL,
|
|
5041
5215
|
DEFAULT_SESSION_ENDPOINT
|
|
5042
5216
|
} from "@mindbill/browser";
|
|
5043
|
-
import { Fragment as
|
|
5217
|
+
import { Fragment as Fragment12, jsx as jsx15, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
5044
5218
|
var DEFAULT_REFRESH_INTERVAL = 6e4;
|
|
5045
5219
|
async function responseError(response, fallback) {
|
|
5046
5220
|
const body = await response.json().catch(() => null);
|
|
@@ -5180,16 +5354,16 @@ function useBillStatus({
|
|
|
5180
5354
|
apiBaseUrl,
|
|
5181
5355
|
...fetchOverride ? { fetch: fetchOverride } : {}
|
|
5182
5356
|
}), [apiBaseUrl, billId, fetchOverride, getSession, sessionEndpoint]);
|
|
5183
|
-
const [data, setData] =
|
|
5184
|
-
const [error, setError] =
|
|
5185
|
-
const [isLoading, setIsLoading] =
|
|
5186
|
-
const [isRefreshing, setIsRefreshing] =
|
|
5187
|
-
const dataRef =
|
|
5188
|
-
const initialDataRef =
|
|
5357
|
+
const [data, setData] = useState11(initialData);
|
|
5358
|
+
const [error, setError] = useState11(null);
|
|
5359
|
+
const [isLoading, setIsLoading] = useState11(enabled && !initialData);
|
|
5360
|
+
const [isRefreshing, setIsRefreshing] = useState11(false);
|
|
5361
|
+
const dataRef = useRef6(initialData);
|
|
5362
|
+
const initialDataRef = useRef6(initialData);
|
|
5189
5363
|
initialDataRef.current = initialData;
|
|
5190
|
-
const activeControllerRef =
|
|
5191
|
-
const requestSequence =
|
|
5192
|
-
|
|
5364
|
+
const activeControllerRef = useRef6(null);
|
|
5365
|
+
const requestSequence = useRef6(0);
|
|
5366
|
+
useEffect10(() => {
|
|
5193
5367
|
const seed = initialDataRef.current;
|
|
5194
5368
|
dataRef.current = seed;
|
|
5195
5369
|
setData(seed);
|
|
@@ -5230,10 +5404,10 @@ function useBillStatus({
|
|
|
5230
5404
|
}
|
|
5231
5405
|
}
|
|
5232
5406
|
}, [billId, client, enabled]);
|
|
5233
|
-
|
|
5407
|
+
useEffect10(() => {
|
|
5234
5408
|
if (enabled) void load();
|
|
5235
5409
|
}, [enabled, load]);
|
|
5236
|
-
|
|
5410
|
+
useEffect10(() => {
|
|
5237
5411
|
if (!enabled || refreshInterval <= 0) return;
|
|
5238
5412
|
const timer = window.setInterval(() => void load(), refreshInterval);
|
|
5239
5413
|
const onFocus = () => void load();
|
|
@@ -5261,17 +5435,17 @@ function ConnectedBillStatus({
|
|
|
5261
5435
|
}) {
|
|
5262
5436
|
const status = useBillStatus(options);
|
|
5263
5437
|
if (status.isLoading && !status.data) {
|
|
5264
|
-
return /* @__PURE__ */
|
|
5438
|
+
return /* @__PURE__ */ jsx15(Fragment12, { children: loadingFallback ?? /* @__PURE__ */ jsx15("div", { role: "status", children: "Loading bill status\u2026" }) });
|
|
5265
5439
|
}
|
|
5266
5440
|
if (status.error && !status.data) {
|
|
5267
|
-
return /* @__PURE__ */
|
|
5441
|
+
return /* @__PURE__ */ jsx15(Fragment12, { children: errorFallback?.(status.error, status.refresh) ?? /* @__PURE__ */ jsxs15("div", { role: "alert", children: [
|
|
5268
5442
|
status.error.message,
|
|
5269
5443
|
" ",
|
|
5270
|
-
/* @__PURE__ */
|
|
5444
|
+
/* @__PURE__ */ jsx15("button", { type: "button", onClick: () => void status.refresh(), children: "Retry" })
|
|
5271
5445
|
] }) });
|
|
5272
5446
|
}
|
|
5273
5447
|
if (!status.data) return null;
|
|
5274
|
-
return /* @__PURE__ */
|
|
5448
|
+
return /* @__PURE__ */ jsx15(
|
|
5275
5449
|
BillStatusSummary,
|
|
5276
5450
|
{
|
|
5277
5451
|
status: status.data.state,
|
|
@@ -5290,8 +5464,8 @@ function ConnectedBillStatus({
|
|
|
5290
5464
|
}
|
|
5291
5465
|
|
|
5292
5466
|
// src/bill-lifecycle-surfaces.tsx
|
|
5293
|
-
import { useEffect as
|
|
5294
|
-
import { Fragment as
|
|
5467
|
+
import { useEffect as useEffect11, useRef as useRef7, useState as useState12 } from "react";
|
|
5468
|
+
import { Fragment as Fragment13, jsx as jsx16, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
5295
5469
|
function visibleBillLifecycleActions(actions, showUnavailable = false) {
|
|
5296
5470
|
return actions.filter((action) => action.enabled || showUnavailable);
|
|
5297
5471
|
}
|
|
@@ -5306,11 +5480,11 @@ function BillLifecycleActions({
|
|
|
5306
5480
|
}) {
|
|
5307
5481
|
const visible = visibleBillLifecycleActions(actions, showUnavailable);
|
|
5308
5482
|
if (!visible.length) return null;
|
|
5309
|
-
return /* @__PURE__ */
|
|
5310
|
-
/* @__PURE__ */
|
|
5311
|
-
visible.map((action) => /* @__PURE__ */
|
|
5312
|
-
/* @__PURE__ */
|
|
5313
|
-
!action.enabled && action.reason ? /* @__PURE__ */
|
|
5483
|
+
return /* @__PURE__ */ jsxs16("div", { className: classes("mb-lifecycle-actions", className), style: mindBillAppearanceStyle(appearance, style), "aria-label": "Bill actions", children: [
|
|
5484
|
+
/* @__PURE__ */ jsx16("style", { children: lifecycleSurfaceStyles }),
|
|
5485
|
+
visible.map((action) => /* @__PURE__ */ jsxs16("div", { className: "mb-lifecycle-action", children: [
|
|
5486
|
+
/* @__PURE__ */ jsx16("button", { type: "button", className: action.primary ? "mb-action-button is-primary" : "mb-action-button", disabled: disabled || !action.enabled, onClick: () => onAction(action), children: action.label }),
|
|
5487
|
+
!action.enabled && action.reason ? /* @__PURE__ */ jsx16("span", { className: "mb-action-reason", children: action.reason }) : null
|
|
5314
5488
|
] }, action.id))
|
|
5315
5489
|
] });
|
|
5316
5490
|
}
|
|
@@ -5340,18 +5514,18 @@ function defaultFormatDate(createdAt) {
|
|
|
5340
5514
|
return new Intl.DateTimeFormat(void 0, { dateStyle: "medium", timeStyle: "short" }).format(parsed);
|
|
5341
5515
|
}
|
|
5342
5516
|
function BillActivityTimeline({ events, emptyLabel = "No bill activity yet.", appearance, className, style, formatDate = defaultFormatDate }) {
|
|
5343
|
-
return /* @__PURE__ */
|
|
5344
|
-
/* @__PURE__ */
|
|
5345
|
-
/* @__PURE__ */
|
|
5346
|
-
/* @__PURE__ */
|
|
5347
|
-
/* @__PURE__ */
|
|
5517
|
+
return /* @__PURE__ */ jsxs16("section", { className: classes("mb-surface mb-activity", className), style: mindBillAppearanceStyle(appearance, style), "aria-label": "Bill activity", children: [
|
|
5518
|
+
/* @__PURE__ */ jsx16("style", { children: lifecycleSurfaceStyles }),
|
|
5519
|
+
/* @__PURE__ */ jsx16("header", { className: "mb-surface-heading", children: /* @__PURE__ */ jsxs16("div", { children: [
|
|
5520
|
+
/* @__PURE__ */ jsx16("strong", { children: "Bill history" }),
|
|
5521
|
+
/* @__PURE__ */ jsx16("span", { children: "Submission, payer responses, follow-up, and payments." })
|
|
5348
5522
|
] }) }),
|
|
5349
|
-
!events.length ? /* @__PURE__ */
|
|
5350
|
-
/* @__PURE__ */
|
|
5351
|
-
/* @__PURE__ */
|
|
5352
|
-
/* @__PURE__ */
|
|
5353
|
-
event.description ? /* @__PURE__ */
|
|
5354
|
-
/* @__PURE__ */
|
|
5523
|
+
!events.length ? /* @__PURE__ */ jsx16("p", { className: "mb-activity-empty", children: emptyLabel }) : /* @__PURE__ */ jsx16("ol", { className: "mb-activity-list", children: events.map((event) => /* @__PURE__ */ jsxs16("li", { className: "mb-activity-item", children: [
|
|
5524
|
+
/* @__PURE__ */ jsx16("span", { className: "mb-activity-marker", "aria-hidden": "true" }),
|
|
5525
|
+
/* @__PURE__ */ jsxs16("div", { className: "mb-activity-content", children: [
|
|
5526
|
+
/* @__PURE__ */ jsx16("strong", { children: event.title ?? billActivityEventLabel(event.type) }),
|
|
5527
|
+
event.description ? /* @__PURE__ */ jsx16("p", { children: event.description }) : null,
|
|
5528
|
+
/* @__PURE__ */ jsxs16("span", { children: [
|
|
5355
5529
|
formatDate(event.createdAt),
|
|
5356
5530
|
event.actor ? ` \xB7 ${event.actor}` : ""
|
|
5357
5531
|
] })
|
|
@@ -5365,49 +5539,49 @@ function historyDate(iso) {
|
|
|
5365
5539
|
return new Intl.DateTimeFormat("en-US", { month: "2-digit", day: "2-digit", year: "numeric" }).format(parsed);
|
|
5366
5540
|
}
|
|
5367
5541
|
function BillHistoryTable({ entries, selectedEntryId, emptyLabel = "No bill history yet.", appearance, className, style, formatDate = historyDate, documentHref, onOpenDocument }) {
|
|
5368
|
-
const [expanded, setExpanded] =
|
|
5369
|
-
const selectedRowRef =
|
|
5370
|
-
|
|
5542
|
+
const [expanded, setExpanded] = useState12({});
|
|
5543
|
+
const selectedRowRef = useRef7(null);
|
|
5544
|
+
useEffect11(() => {
|
|
5371
5545
|
if (!selectedEntryId) return;
|
|
5372
5546
|
const selected = entries.find((entry) => entry.id === selectedEntryId);
|
|
5373
5547
|
if (selected?.details) setExpanded((current) => current[selectedEntryId] ? current : { ...current, [selectedEntryId]: true });
|
|
5374
5548
|
selectedRowRef.current?.scrollIntoView({ behavior: "smooth", block: "center" });
|
|
5375
5549
|
}, [entries, selectedEntryId]);
|
|
5376
|
-
return /* @__PURE__ */
|
|
5377
|
-
/* @__PURE__ */
|
|
5378
|
-
/* @__PURE__ */
|
|
5379
|
-
/* @__PURE__ */
|
|
5380
|
-
/* @__PURE__ */
|
|
5550
|
+
return /* @__PURE__ */ jsxs16("section", { className: classes("mb-surface mb-history", className), style: mindBillAppearanceStyle(appearance, style), "aria-label": "Bill history", children: [
|
|
5551
|
+
/* @__PURE__ */ jsx16("style", { children: lifecycleSurfaceStyles }),
|
|
5552
|
+
/* @__PURE__ */ jsx16("header", { className: "mb-surface-heading", children: /* @__PURE__ */ jsxs16("div", { children: [
|
|
5553
|
+
/* @__PURE__ */ jsx16("strong", { children: "Bill history" }),
|
|
5554
|
+
/* @__PURE__ */ jsx16("span", { children: "Submissions, payer responses, follow-up, and payments." })
|
|
5381
5555
|
] }) }),
|
|
5382
|
-
!entries.length ? /* @__PURE__ */
|
|
5383
|
-
/* @__PURE__ */
|
|
5384
|
-
/* @__PURE__ */
|
|
5385
|
-
/* @__PURE__ */
|
|
5386
|
-
/* @__PURE__ */
|
|
5387
|
-
/* @__PURE__ */
|
|
5556
|
+
!entries.length ? /* @__PURE__ */ jsx16("p", { className: "mb-activity-empty", children: emptyLabel }) : /* @__PURE__ */ jsxs16("div", { className: "mb-history-table", children: [
|
|
5557
|
+
/* @__PURE__ */ jsxs16("div", { className: "mb-history-head", "aria-hidden": "true", children: [
|
|
5558
|
+
/* @__PURE__ */ jsx16("span", { children: "Date" }),
|
|
5559
|
+
/* @__PURE__ */ jsx16("span", { children: "Action" }),
|
|
5560
|
+
/* @__PURE__ */ jsx16("span", { children: "User" }),
|
|
5561
|
+
/* @__PURE__ */ jsx16("span", { children: "Details" })
|
|
5388
5562
|
] }),
|
|
5389
|
-
/* @__PURE__ */
|
|
5563
|
+
/* @__PURE__ */ jsx16("ul", { className: "mb-history-rows", children: entries.map((entry) => {
|
|
5390
5564
|
const isSelected = entry.id === selectedEntryId;
|
|
5391
5565
|
const expandable = Boolean(entry.details);
|
|
5392
5566
|
const isOpen = expandable && Boolean(expanded[entry.id]);
|
|
5393
5567
|
const details = entry.details;
|
|
5394
|
-
const lineContents = /* @__PURE__ */
|
|
5395
|
-
/* @__PURE__ */
|
|
5396
|
-
/* @__PURE__ */
|
|
5397
|
-
/* @__PURE__ */
|
|
5398
|
-
/* @__PURE__ */
|
|
5399
|
-
expandable ? /* @__PURE__ */
|
|
5568
|
+
const lineContents = /* @__PURE__ */ jsxs16(Fragment13, { children: [
|
|
5569
|
+
/* @__PURE__ */ jsx16("span", { className: "mb-history-date", children: formatDate(entry.date) }),
|
|
5570
|
+
/* @__PURE__ */ jsx16("span", { className: "mb-history-action", children: entry.action }),
|
|
5571
|
+
/* @__PURE__ */ jsx16("span", { className: "mb-history-actor", children: entry.actor ?? "\u2014" }),
|
|
5572
|
+
/* @__PURE__ */ jsxs16("span", { className: "mb-history-summary", children: [
|
|
5573
|
+
expandable ? /* @__PURE__ */ jsx16("i", { className: `mb-history-caret${isOpen ? " is-open" : ""}`, "aria-hidden": "true" }) : null,
|
|
5400
5574
|
entry.summary
|
|
5401
5575
|
] })
|
|
5402
5576
|
] });
|
|
5403
|
-
return /* @__PURE__ */
|
|
5577
|
+
return /* @__PURE__ */ jsxs16(
|
|
5404
5578
|
"li",
|
|
5405
5579
|
{
|
|
5406
5580
|
ref: isSelected ? selectedRowRef : void 0,
|
|
5407
5581
|
className: `mb-history-row is-${entry.tone}${isSelected ? " is-selected" : ""}`,
|
|
5408
5582
|
"aria-current": isSelected ? "true" : void 0,
|
|
5409
5583
|
children: [
|
|
5410
|
-
expandable ? /* @__PURE__ */
|
|
5584
|
+
expandable ? /* @__PURE__ */ jsx16(
|
|
5411
5585
|
"button",
|
|
5412
5586
|
{
|
|
5413
5587
|
type: "button",
|
|
@@ -5416,31 +5590,31 @@ function BillHistoryTable({ entries, selectedEntryId, emptyLabel = "No bill hist
|
|
|
5416
5590
|
onClick: () => setExpanded((current) => ({ ...current, [entry.id]: !current[entry.id] })),
|
|
5417
5591
|
children: lineContents
|
|
5418
5592
|
}
|
|
5419
|
-
) : /* @__PURE__ */
|
|
5420
|
-
isOpen && details ? /* @__PURE__ */
|
|
5421
|
-
details.rows?.length ? /* @__PURE__ */
|
|
5422
|
-
/* @__PURE__ */
|
|
5423
|
-
/* @__PURE__ */
|
|
5593
|
+
) : /* @__PURE__ */ jsx16("div", { className: "mb-history-line", children: lineContents }),
|
|
5594
|
+
isOpen && details ? /* @__PURE__ */ jsxs16("div", { className: "mb-history-details", children: [
|
|
5595
|
+
details.rows?.length ? /* @__PURE__ */ jsx16("dl", { className: "mb-history-kv", children: details.rows.map((row) => /* @__PURE__ */ jsxs16("div", { children: [
|
|
5596
|
+
/* @__PURE__ */ jsx16("dt", { children: row.label }),
|
|
5597
|
+
/* @__PURE__ */ jsx16("dd", { children: row.value })
|
|
5424
5598
|
] }, `${row.label}-${row.value}`)) }) : null,
|
|
5425
|
-
details.documents?.length ? /* @__PURE__ */
|
|
5426
|
-
/* @__PURE__ */
|
|
5427
|
-
/* @__PURE__ */
|
|
5599
|
+
details.documents?.length ? /* @__PURE__ */ jsx16("div", { className: "mb-history-kv", children: /* @__PURE__ */ jsxs16("div", { children: [
|
|
5600
|
+
/* @__PURE__ */ jsx16("dt", { children: "Documents" }),
|
|
5601
|
+
/* @__PURE__ */ jsx16("dd", { children: details.documents.map((doc) => {
|
|
5428
5602
|
const href = documentHref?.(doc) ?? null;
|
|
5429
|
-
return href ? /* @__PURE__ */
|
|
5603
|
+
return href ? /* @__PURE__ */ jsx16("a", { className: "mb-history-doc", href, target: "_blank", rel: "noreferrer", children: doc.filename }, doc.id) : onOpenDocument ? /* @__PURE__ */ jsx16("button", { type: "button", className: "mb-history-doc", onClick: () => void onOpenDocument(doc), children: doc.filename }, doc.id) : /* @__PURE__ */ jsx16("span", { className: "mb-history-doc", children: doc.filename }, doc.id);
|
|
5430
5604
|
}) })
|
|
5431
5605
|
] }) }) : null,
|
|
5432
|
-
details.codes?.length ? /* @__PURE__ */
|
|
5433
|
-
/* @__PURE__ */
|
|
5434
|
-
/* @__PURE__ */
|
|
5606
|
+
details.codes?.length ? /* @__PURE__ */ jsx16("dl", { className: "mb-history-codes", children: details.codes.map((code) => /* @__PURE__ */ jsxs16("div", { children: [
|
|
5607
|
+
/* @__PURE__ */ jsx16("dt", { children: code.code }),
|
|
5608
|
+
/* @__PURE__ */ jsx16("dd", { children: code.text })
|
|
5435
5609
|
] }, code.code)) }) : null,
|
|
5436
|
-
details.complianceDueDates?.length ? /* @__PURE__ */
|
|
5437
|
-
/* @__PURE__ */
|
|
5438
|
-
/* @__PURE__ */
|
|
5439
|
-
/* @__PURE__ */
|
|
5440
|
-
/* @__PURE__ */
|
|
5610
|
+
details.complianceDueDates?.length ? /* @__PURE__ */ jsxs16("div", { className: "mb-history-due", children: [
|
|
5611
|
+
/* @__PURE__ */ jsx16("em", { children: "Compliance Due Dates" }),
|
|
5612
|
+
/* @__PURE__ */ jsx16("dl", { children: details.complianceDueDates.map((due) => /* @__PURE__ */ jsxs16("div", { children: [
|
|
5613
|
+
/* @__PURE__ */ jsx16("dt", { children: formatDate(due.date) }),
|
|
5614
|
+
/* @__PURE__ */ jsx16("dd", { children: due.text })
|
|
5441
5615
|
] }, `${due.date}-${due.text}`)) })
|
|
5442
5616
|
] }) : null,
|
|
5443
|
-
details.text ? /* @__PURE__ */
|
|
5617
|
+
details.text ? /* @__PURE__ */ jsx16("p", { className: "mb-history-text", children: details.text }) : null
|
|
5444
5618
|
] }) : null
|
|
5445
5619
|
]
|
|
5446
5620
|
},
|
|
@@ -5501,15 +5675,15 @@ function BillLifecycleProgress({ state, nativeStatus, submittedAt, agingDays, dr
|
|
|
5501
5675
|
const rejected = state.toLowerCase() === "rejected";
|
|
5502
5676
|
const draft = Boolean(draftStage) && isBillLifecycleDraft(state);
|
|
5503
5677
|
const steps = billLifecycleProgressSteps(state, { draftStage: Boolean(draftStage) });
|
|
5504
|
-
return /* @__PURE__ */
|
|
5505
|
-
/* @__PURE__ */
|
|
5506
|
-
/* @__PURE__ */
|
|
5507
|
-
/* @__PURE__ */
|
|
5508
|
-
/* @__PURE__ */
|
|
5678
|
+
return /* @__PURE__ */ jsxs16("section", { className: classes(`mb-surface mb-progress${rejected ? " is-rejected" : ""}`, className), style: mindBillAppearanceStyle(appearance, style), "aria-label": "Bill lifecycle", children: [
|
|
5679
|
+
/* @__PURE__ */ jsx16("style", { children: lifecycleSurfaceStyles }),
|
|
5680
|
+
/* @__PURE__ */ jsx16("header", { className: "mb-surface-heading", children: /* @__PURE__ */ jsxs16("div", { children: [
|
|
5681
|
+
/* @__PURE__ */ jsx16("strong", { children: billLifecycleDisplayLabel(state, nativeStatus) }),
|
|
5682
|
+
/* @__PURE__ */ jsx16("span", { children: rejected ? "The payer rejected this submission." : draft ? "Not yet sent" : `${submittedAt ? `Submitted ${defaultFormatDate(submittedAt)}` : "Submitted"}${typeof agingDays === "number" ? ` \xB7 ${agingDays} days old` : ""}` })
|
|
5509
5683
|
] }) }),
|
|
5510
|
-
/* @__PURE__ */
|
|
5511
|
-
/* @__PURE__ */
|
|
5512
|
-
/* @__PURE__ */
|
|
5684
|
+
/* @__PURE__ */ jsx16("ol", { className: "mb-progress-list", style: { gridTemplateColumns: `repeat(${steps.length}, minmax(0, 1fr))` }, children: steps.map((step, index) => /* @__PURE__ */ jsxs16("li", { className: `is-${step.status}`, "aria-current": step.status === "current" ? "step" : void 0, children: [
|
|
5685
|
+
/* @__PURE__ */ jsx16("span", { "aria-hidden": "true", children: step.status === "complete" ? "\u2713" : rejected && step.status === "current" ? "!" : index + 1 }),
|
|
5686
|
+
/* @__PURE__ */ jsx16("b", { children: step.label })
|
|
5513
5687
|
] }, step.id)) })
|
|
5514
5688
|
] });
|
|
5515
5689
|
}
|
|
@@ -5523,48 +5697,48 @@ function billRejectionIssueSummary(rejection, count) {
|
|
|
5523
5697
|
function BillRejectionNotice({ rejection, title = "Rejected \u2014 action required", submittedAt, appearance, className, style, formatDate = defaultFormatDate }) {
|
|
5524
5698
|
const issues = rejection.issues?.length ? rejection.issues : [{ code: rejection.code, description: rejection.reason }];
|
|
5525
5699
|
const hasCodes = issues.some((issue) => Boolean(issue.code));
|
|
5526
|
-
return /* @__PURE__ */
|
|
5527
|
-
/* @__PURE__ */
|
|
5528
|
-
/* @__PURE__ */
|
|
5529
|
-
/* @__PURE__ */
|
|
5530
|
-
/* @__PURE__ */
|
|
5531
|
-
/* @__PURE__ */
|
|
5532
|
-
/* @__PURE__ */
|
|
5533
|
-
/* @__PURE__ */
|
|
5700
|
+
return /* @__PURE__ */ jsxs16("section", { className: classes("mb-surface mb-rejection-notice", className), style: mindBillAppearanceStyle(appearance, style), role: "alert", "aria-label": "Bill rejection reasons", children: [
|
|
5701
|
+
/* @__PURE__ */ jsx16("style", { children: lifecycleSurfaceStyles }),
|
|
5702
|
+
/* @__PURE__ */ jsxs16("div", { className: "mb-rejection-overview", children: [
|
|
5703
|
+
/* @__PURE__ */ jsxs16("header", { className: "mb-rejection-heading", children: [
|
|
5704
|
+
/* @__PURE__ */ jsx16("span", { className: "mb-rejection-icon", "aria-hidden": "true", children: "!" }),
|
|
5705
|
+
/* @__PURE__ */ jsxs16("div", { children: [
|
|
5706
|
+
/* @__PURE__ */ jsx16("strong", { children: title }),
|
|
5707
|
+
/* @__PURE__ */ jsxs16("span", { children: [
|
|
5534
5708
|
"Fix the ",
|
|
5535
5709
|
issues.length === 1 ? "issue" : "issues",
|
|
5536
5710
|
" below, then resubmit."
|
|
5537
5711
|
] })
|
|
5538
5712
|
] })
|
|
5539
5713
|
] }),
|
|
5540
|
-
/* @__PURE__ */
|
|
5541
|
-
/* @__PURE__ */
|
|
5542
|
-
/* @__PURE__ */
|
|
5543
|
-
/* @__PURE__ */
|
|
5544
|
-
submittedAt ? /* @__PURE__ */
|
|
5714
|
+
/* @__PURE__ */ jsxs16("ol", { className: "mb-rejection-progress", "aria-label": "Submission status", children: [
|
|
5715
|
+
/* @__PURE__ */ jsxs16("li", { className: "is-complete", children: [
|
|
5716
|
+
/* @__PURE__ */ jsx16("span", { "aria-hidden": "true", children: "\u2713" }),
|
|
5717
|
+
/* @__PURE__ */ jsx16("b", { children: "Sent" }),
|
|
5718
|
+
submittedAt ? /* @__PURE__ */ jsx16("small", { children: formatDate(submittedAt) }) : null
|
|
5545
5719
|
] }),
|
|
5546
|
-
/* @__PURE__ */
|
|
5547
|
-
/* @__PURE__ */
|
|
5548
|
-
/* @__PURE__ */
|
|
5549
|
-
rejection.receivedAt ? /* @__PURE__ */
|
|
5720
|
+
/* @__PURE__ */ jsxs16("li", { className: "is-rejected", "aria-current": "step", children: [
|
|
5721
|
+
/* @__PURE__ */ jsx16("span", { "aria-hidden": "true", children: "!" }),
|
|
5722
|
+
/* @__PURE__ */ jsx16("b", { children: "Rejected" }),
|
|
5723
|
+
rejection.receivedAt ? /* @__PURE__ */ jsx16("small", { children: formatDate(rejection.receivedAt) }) : null
|
|
5550
5724
|
] })
|
|
5551
5725
|
] })
|
|
5552
5726
|
] }),
|
|
5553
|
-
/* @__PURE__ */
|
|
5554
|
-
/* @__PURE__ */
|
|
5555
|
-
/* @__PURE__ */
|
|
5556
|
-
/* @__PURE__ */
|
|
5727
|
+
/* @__PURE__ */ jsxs16("div", { className: "mb-rejection-issues", "aria-label": "Rejection reasons", children: [
|
|
5728
|
+
/* @__PURE__ */ jsxs16("div", { className: "mb-rejection-issues-heading", children: [
|
|
5729
|
+
/* @__PURE__ */ jsxs16("strong", { children: [
|
|
5730
|
+
/* @__PURE__ */ jsx16("span", { "aria-hidden": "true", children: "\u25B3" }),
|
|
5557
5731
|
" Rejection reasons"
|
|
5558
5732
|
] }),
|
|
5559
|
-
/* @__PURE__ */
|
|
5733
|
+
/* @__PURE__ */ jsx16("span", { children: billRejectionIssueSummary(rejection, issues.length) })
|
|
5560
5734
|
] }),
|
|
5561
|
-
/* @__PURE__ */
|
|
5562
|
-
/* @__PURE__ */
|
|
5563
|
-
/* @__PURE__ */
|
|
5564
|
-
issue.code ? /* @__PURE__ */
|
|
5735
|
+
/* @__PURE__ */ jsx16("ol", { "aria-label": `${issues.length} rejection ${issues.length === 1 ? "reason" : "reasons"}`, children: issues.map((issue, index) => /* @__PURE__ */ jsxs16("li", { children: [
|
|
5736
|
+
/* @__PURE__ */ jsx16("span", { className: "mb-rejection-bullet", "aria-hidden": "true" }),
|
|
5737
|
+
/* @__PURE__ */ jsx16("p", { children: issue.description }),
|
|
5738
|
+
issue.code ? /* @__PURE__ */ jsx16("span", { className: "mb-rejection-code", children: issue.code }) : null
|
|
5565
5739
|
] }, `${issue.code ?? "issue"}-${index}`)) }),
|
|
5566
|
-
hasCodes ? /* @__PURE__ */
|
|
5567
|
-
/* @__PURE__ */
|
|
5740
|
+
hasCodes ? /* @__PURE__ */ jsxs16("p", { className: "mb-rejection-code-note", children: [
|
|
5741
|
+
/* @__PURE__ */ jsx16("span", { "aria-hidden": "true", children: "i" }),
|
|
5568
5742
|
" Technical error codes are included for support and auditability."
|
|
5569
5743
|
] }) : null
|
|
5570
5744
|
] })
|
|
@@ -5579,18 +5753,18 @@ function BillSnapshotSummary({ bill, patient, injury, delivery, appearance, clas
|
|
|
5579
5753
|
["Charged", currency(bill.totalCharge)],
|
|
5580
5754
|
["Balance", currency(bill.balanceDue)]
|
|
5581
5755
|
];
|
|
5582
|
-
return /* @__PURE__ */
|
|
5583
|
-
/* @__PURE__ */
|
|
5584
|
-
/* @__PURE__ */
|
|
5585
|
-
/* @__PURE__ */
|
|
5586
|
-
/* @__PURE__ */
|
|
5756
|
+
return /* @__PURE__ */ jsxs16("section", { className: classes("mb-surface mb-snapshot", className), style: mindBillAppearanceStyle(appearance, style), "aria-label": "Bill snapshot", children: [
|
|
5757
|
+
/* @__PURE__ */ jsx16("style", { children: lifecycleSurfaceStyles }),
|
|
5758
|
+
/* @__PURE__ */ jsx16("header", { className: "mb-surface-heading", children: /* @__PURE__ */ jsxs16("div", { children: [
|
|
5759
|
+
/* @__PURE__ */ jsx16("strong", { children: "Bill snapshot" }),
|
|
5760
|
+
/* @__PURE__ */ jsxs16("span", { children: [
|
|
5587
5761
|
"Bill #",
|
|
5588
5762
|
bill.billNumber
|
|
5589
5763
|
] })
|
|
5590
5764
|
] }) }),
|
|
5591
|
-
/* @__PURE__ */
|
|
5592
|
-
/* @__PURE__ */
|
|
5593
|
-
/* @__PURE__ */
|
|
5765
|
+
/* @__PURE__ */ jsx16("dl", { children: values.map(([label, value]) => /* @__PURE__ */ jsxs16("div", { children: [
|
|
5766
|
+
/* @__PURE__ */ jsx16("dt", { children: label }),
|
|
5767
|
+
/* @__PURE__ */ jsx16("dd", { children: value })
|
|
5594
5768
|
] }, label)) })
|
|
5595
5769
|
] });
|
|
5596
5770
|
}
|
|
@@ -5605,140 +5779,140 @@ function BillExplanationOfReview({
|
|
|
5605
5779
|
style
|
|
5606
5780
|
}) {
|
|
5607
5781
|
const rows = payments.length ? payments : [null];
|
|
5608
|
-
return /* @__PURE__ */
|
|
5609
|
-
/* @__PURE__ */
|
|
5610
|
-
/* @__PURE__ */
|
|
5611
|
-
/* @__PURE__ */
|
|
5612
|
-
/* @__PURE__ */
|
|
5782
|
+
return /* @__PURE__ */ jsxs16("section", { className: classes("mb-surface mb-eor-review", className), style: mindBillAppearanceStyle(appearance, style), "aria-label": "Explanation of Review and payments", children: [
|
|
5783
|
+
/* @__PURE__ */ jsx16("style", { children: lifecycleSurfaceStyles }),
|
|
5784
|
+
/* @__PURE__ */ jsx16("header", { className: "mb-surface-heading", children: /* @__PURE__ */ jsxs16("div", { children: [
|
|
5785
|
+
/* @__PURE__ */ jsx16("strong", { children: "Explanation of Review" }),
|
|
5786
|
+
/* @__PURE__ */ jsx16("span", { children: "Payer response and payment reconciliation." })
|
|
5613
5787
|
] }) }),
|
|
5614
|
-
/* @__PURE__ */
|
|
5615
|
-
/* @__PURE__ */
|
|
5616
|
-
/* @__PURE__ */
|
|
5617
|
-
/* @__PURE__ */
|
|
5788
|
+
/* @__PURE__ */ jsxs16("dl", { className: "mb-eor-metrics", children: [
|
|
5789
|
+
/* @__PURE__ */ jsxs16("div", { children: [
|
|
5790
|
+
/* @__PURE__ */ jsx16("dt", { children: "Amount billed" }),
|
|
5791
|
+
/* @__PURE__ */ jsx16("dd", { children: currency(remittance.billedAmount) })
|
|
5618
5792
|
] }),
|
|
5619
|
-
/* @__PURE__ */
|
|
5620
|
-
/* @__PURE__ */
|
|
5621
|
-
/* @__PURE__ */
|
|
5793
|
+
/* @__PURE__ */ jsxs16("div", { children: [
|
|
5794
|
+
/* @__PURE__ */ jsx16("dt", { children: "Payer allowed" }),
|
|
5795
|
+
/* @__PURE__ */ jsx16("dd", { children: remittance.payerAllowedAmount === null ? "\u2014" : currency(remittance.payerAllowedAmount) })
|
|
5622
5796
|
] }),
|
|
5623
|
-
/* @__PURE__ */
|
|
5624
|
-
/* @__PURE__ */
|
|
5625
|
-
/* @__PURE__ */
|
|
5797
|
+
/* @__PURE__ */ jsxs16("div", { children: [
|
|
5798
|
+
/* @__PURE__ */ jsx16("dt", { children: "Payer reported paid" }),
|
|
5799
|
+
/* @__PURE__ */ jsx16("dd", { children: remittance.payerReportedPaid === null ? "\u2014" : currency(remittance.payerReportedPaid) })
|
|
5626
5800
|
] }),
|
|
5627
|
-
/* @__PURE__ */
|
|
5628
|
-
/* @__PURE__ */
|
|
5629
|
-
/* @__PURE__ */
|
|
5801
|
+
/* @__PURE__ */ jsxs16("div", { className: "is-balance", children: [
|
|
5802
|
+
/* @__PURE__ */ jsx16("dt", { children: "Balance due" }),
|
|
5803
|
+
/* @__PURE__ */ jsx16("dd", { children: currency(remittance.balanceDue) })
|
|
5630
5804
|
] }),
|
|
5631
|
-
/* @__PURE__ */
|
|
5632
|
-
/* @__PURE__ */
|
|
5633
|
-
/* @__PURE__ */
|
|
5805
|
+
/* @__PURE__ */ jsxs16("div", { children: [
|
|
5806
|
+
/* @__PURE__ */ jsx16("dt", { children: "Payment posted" }),
|
|
5807
|
+
/* @__PURE__ */ jsx16("dd", { children: currency(remittance.postedPrincipal) })
|
|
5634
5808
|
] }),
|
|
5635
|
-
/* @__PURE__ */
|
|
5636
|
-
/* @__PURE__ */
|
|
5637
|
-
/* @__PURE__ */
|
|
5809
|
+
/* @__PURE__ */ jsxs16("div", { children: [
|
|
5810
|
+
/* @__PURE__ */ jsx16("dt", { children: "Penalty & interest" }),
|
|
5811
|
+
/* @__PURE__ */ jsx16("dd", { children: currency(remittance.postedAdditional) })
|
|
5638
5812
|
] }),
|
|
5639
|
-
/* @__PURE__ */
|
|
5640
|
-
/* @__PURE__ */
|
|
5641
|
-
/* @__PURE__ */
|
|
5813
|
+
/* @__PURE__ */ jsxs16("div", { children: [
|
|
5814
|
+
/* @__PURE__ */ jsx16("dt", { children: "Total received" }),
|
|
5815
|
+
/* @__PURE__ */ jsx16("dd", { children: currency(remittance.totalPostedCash) })
|
|
5642
5816
|
] }),
|
|
5643
|
-
/* @__PURE__ */
|
|
5644
|
-
/* @__PURE__ */
|
|
5645
|
-
/* @__PURE__ */
|
|
5817
|
+
/* @__PURE__ */ jsxs16("div", { children: [
|
|
5818
|
+
/* @__PURE__ */ jsx16("dt", { children: "Expected" }),
|
|
5819
|
+
/* @__PURE__ */ jsx16("dd", { children: currency(remittance.expectedAmount) })
|
|
5646
5820
|
] })
|
|
5647
5821
|
] }),
|
|
5648
|
-
remittance.denialReason ? /* @__PURE__ */
|
|
5649
|
-
/* @__PURE__ */
|
|
5650
|
-
/* @__PURE__ */
|
|
5822
|
+
remittance.denialReason ? /* @__PURE__ */ jsxs16("div", { className: "mb-denial", children: [
|
|
5823
|
+
/* @__PURE__ */ jsx16("strong", { children: "Denial reason" }),
|
|
5824
|
+
/* @__PURE__ */ jsx16("p", { children: remittance.denialReason })
|
|
5651
5825
|
] }) : null,
|
|
5652
|
-
/* @__PURE__ */
|
|
5653
|
-
/* @__PURE__ */
|
|
5654
|
-
/* @__PURE__ */
|
|
5655
|
-
/* @__PURE__ */
|
|
5656
|
-
/* @__PURE__ */
|
|
5657
|
-
/* @__PURE__ */
|
|
5658
|
-
/* @__PURE__ */
|
|
5826
|
+
/* @__PURE__ */ jsx16("div", { className: "mb-eor-table-wrap", children: /* @__PURE__ */ jsxs16("table", { className: "mb-eor-table", children: [
|
|
5827
|
+
/* @__PURE__ */ jsxs16("thead", { children: [
|
|
5828
|
+
/* @__PURE__ */ jsxs16("tr", { className: "mb-eor-groups", children: [
|
|
5829
|
+
/* @__PURE__ */ jsx16("th", { colSpan: 2, children: "Submission" }),
|
|
5830
|
+
/* @__PURE__ */ jsx16("th", { colSpan: 5, children: "EOR payment information" }),
|
|
5831
|
+
/* @__PURE__ */ jsx16("th", { colSpan: 2, children: "EOR post" }),
|
|
5832
|
+
/* @__PURE__ */ jsx16("th", { children: "EOR" })
|
|
5659
5833
|
] }),
|
|
5660
|
-
/* @__PURE__ */
|
|
5661
|
-
/* @__PURE__ */
|
|
5662
|
-
/* @__PURE__ */
|
|
5663
|
-
/* @__PURE__ */
|
|
5664
|
-
/* @__PURE__ */
|
|
5665
|
-
/* @__PURE__ */
|
|
5666
|
-
/* @__PURE__ */
|
|
5667
|
-
/* @__PURE__ */
|
|
5668
|
-
/* @__PURE__ */
|
|
5669
|
-
/* @__PURE__ */
|
|
5670
|
-
/* @__PURE__ */
|
|
5834
|
+
/* @__PURE__ */ jsxs16("tr", { children: [
|
|
5835
|
+
/* @__PURE__ */ jsx16("th", { children: "Submission" }),
|
|
5836
|
+
/* @__PURE__ */ jsx16("th", { children: "Submission payment" }),
|
|
5837
|
+
/* @__PURE__ */ jsx16("th", { children: "Payment method" }),
|
|
5838
|
+
/* @__PURE__ */ jsx16("th", { children: "Reference" }),
|
|
5839
|
+
/* @__PURE__ */ jsx16("th", { children: "Effective date" }),
|
|
5840
|
+
/* @__PURE__ */ jsx16("th", { children: "Payment total" }),
|
|
5841
|
+
/* @__PURE__ */ jsx16("th", { children: "Deposit date" }),
|
|
5842
|
+
/* @__PURE__ */ jsx16("th", { children: "Post date" }),
|
|
5843
|
+
/* @__PURE__ */ jsx16("th", { children: "Source" }),
|
|
5844
|
+
/* @__PURE__ */ jsx16("th", { children: "Document" })
|
|
5671
5845
|
] })
|
|
5672
5846
|
] }),
|
|
5673
|
-
/* @__PURE__ */
|
|
5847
|
+
/* @__PURE__ */ jsx16("tbody", { children: rows.map((payment, index) => {
|
|
5674
5848
|
const eor = eors[index] ?? eors[0];
|
|
5675
|
-
return /* @__PURE__ */
|
|
5676
|
-
/* @__PURE__ */
|
|
5677
|
-
/* @__PURE__ */
|
|
5678
|
-
submittedAt ? /* @__PURE__ */
|
|
5849
|
+
return /* @__PURE__ */ jsxs16("tr", { children: [
|
|
5850
|
+
/* @__PURE__ */ jsxs16("td", { "data-label": "Submission", children: [
|
|
5851
|
+
/* @__PURE__ */ jsx16("strong", { children: "Original bill" }),
|
|
5852
|
+
submittedAt ? /* @__PURE__ */ jsxs16("span", { children: [
|
|
5679
5853
|
"Sent ",
|
|
5680
5854
|
defaultFormatDate(submittedAt)
|
|
5681
5855
|
] }) : null
|
|
5682
5856
|
] }),
|
|
5683
|
-
/* @__PURE__ */
|
|
5684
|
-
/* @__PURE__ */
|
|
5685
|
-
/* @__PURE__ */
|
|
5686
|
-
/* @__PURE__ */
|
|
5687
|
-
/* @__PURE__ */
|
|
5688
|
-
/* @__PURE__ */
|
|
5689
|
-
/* @__PURE__ */
|
|
5690
|
-
/* @__PURE__ */
|
|
5691
|
-
/* @__PURE__ */
|
|
5857
|
+
/* @__PURE__ */ jsx16("td", { "data-label": "Submission payment", children: remittance.payerReportedPaid === null ? "\u2014" : currency(remittance.payerReportedPaid) }),
|
|
5858
|
+
/* @__PURE__ */ jsx16("td", { "data-label": "Payment method", children: payment ? humanize(payment.method) : "\u2014" }),
|
|
5859
|
+
/* @__PURE__ */ jsx16("td", { "data-label": "Reference", children: payment?.checkNumber || "\u2014" }),
|
|
5860
|
+
/* @__PURE__ */ jsx16("td", { "data-label": "Effective date", children: payment ? payment.receivedDate || payment.depositDate || defaultFormatDate(payment.postedAt) : "\u2014" }),
|
|
5861
|
+
/* @__PURE__ */ jsx16("td", { "data-label": "Payment total", children: payment ? currency(payment.amount) : currency(0) }),
|
|
5862
|
+
/* @__PURE__ */ jsx16("td", { "data-label": "Deposit date", children: payment?.depositDate || "Not recorded" }),
|
|
5863
|
+
/* @__PURE__ */ jsx16("td", { "data-label": "Post date", children: payment ? defaultFormatDate(payment.postedAt) : eor ? defaultFormatDate(eor.addedAt) : "\u2014" }),
|
|
5864
|
+
/* @__PURE__ */ jsx16("td", { "data-label": "Source", children: payment ? payment.source.toUpperCase() : eor ? "EOR" : "\u2014" }),
|
|
5865
|
+
/* @__PURE__ */ jsx16("td", { "data-label": "EOR", children: eor && onOpenEor ? /* @__PURE__ */ jsx16("button", { type: "button", className: "mb-eor-link", onClick: () => void onOpenEor(eor), children: eor.filename }) : eor?.filename || "\u2014" })
|
|
5692
5866
|
] }, payment?.id ?? `empty-${index}`);
|
|
5693
5867
|
}) })
|
|
5694
5868
|
] }) }),
|
|
5695
|
-
eors.length > rows.length ? /* @__PURE__ */
|
|
5869
|
+
eors.length > rows.length ? /* @__PURE__ */ jsx16("div", { className: "mb-eor-documents", children: eors.slice(rows.length).map((eor) => /* @__PURE__ */ jsx16("button", { type: "button", onClick: () => void onOpenEor?.(eor), children: eor.filename }, eor.id)) }) : null
|
|
5696
5870
|
] });
|
|
5697
5871
|
}
|
|
5698
5872
|
function BillRemittanceCard({ remittance, appearance, className, style }) {
|
|
5699
|
-
return /* @__PURE__ */
|
|
5700
|
-
/* @__PURE__ */
|
|
5701
|
-
/* @__PURE__ */
|
|
5702
|
-
/* @__PURE__ */
|
|
5703
|
-
/* @__PURE__ */
|
|
5873
|
+
return /* @__PURE__ */ jsxs16("section", { className: classes("mb-surface mb-remittance", className), style: mindBillAppearanceStyle(appearance, style), "aria-label": "Remittance summary", children: [
|
|
5874
|
+
/* @__PURE__ */ jsx16("style", { children: lifecycleSurfaceStyles }),
|
|
5875
|
+
/* @__PURE__ */ jsx16("header", { className: "mb-surface-heading", children: /* @__PURE__ */ jsxs16("div", { children: [
|
|
5876
|
+
/* @__PURE__ */ jsx16("strong", { children: "Remittance" }),
|
|
5877
|
+
/* @__PURE__ */ jsx16("span", { children: "Amounts reported by the payer and posted to the bill." })
|
|
5704
5878
|
] }) }),
|
|
5705
|
-
/* @__PURE__ */
|
|
5706
|
-
/* @__PURE__ */
|
|
5707
|
-
/* @__PURE__ */
|
|
5708
|
-
/* @__PURE__ */
|
|
5879
|
+
/* @__PURE__ */ jsxs16("dl", { children: [
|
|
5880
|
+
/* @__PURE__ */ jsxs16("div", { children: [
|
|
5881
|
+
/* @__PURE__ */ jsx16("dt", { children: "Amount billed" }),
|
|
5882
|
+
/* @__PURE__ */ jsx16("dd", { children: currency(remittance.billedAmount) })
|
|
5709
5883
|
] }),
|
|
5710
|
-
/* @__PURE__ */
|
|
5711
|
-
/* @__PURE__ */
|
|
5712
|
-
/* @__PURE__ */
|
|
5884
|
+
/* @__PURE__ */ jsxs16("div", { children: [
|
|
5885
|
+
/* @__PURE__ */ jsx16("dt", { children: "Expected" }),
|
|
5886
|
+
/* @__PURE__ */ jsx16("dd", { children: currency(remittance.expectedAmount) })
|
|
5713
5887
|
] }),
|
|
5714
|
-
/* @__PURE__ */
|
|
5715
|
-
/* @__PURE__ */
|
|
5716
|
-
/* @__PURE__ */
|
|
5888
|
+
/* @__PURE__ */ jsxs16("div", { children: [
|
|
5889
|
+
/* @__PURE__ */ jsx16("dt", { children: "Payer allowed" }),
|
|
5890
|
+
/* @__PURE__ */ jsx16("dd", { children: remittance.payerAllowedAmount === null ? "\u2014" : currency(remittance.payerAllowedAmount) })
|
|
5717
5891
|
] }),
|
|
5718
|
-
/* @__PURE__ */
|
|
5719
|
-
/* @__PURE__ */
|
|
5720
|
-
/* @__PURE__ */
|
|
5892
|
+
/* @__PURE__ */ jsxs16("div", { children: [
|
|
5893
|
+
/* @__PURE__ */ jsx16("dt", { children: "Payer reported paid" }),
|
|
5894
|
+
/* @__PURE__ */ jsx16("dd", { children: remittance.payerReportedPaid === null ? "\u2014" : currency(remittance.payerReportedPaid) })
|
|
5721
5895
|
] }),
|
|
5722
|
-
/* @__PURE__ */
|
|
5723
|
-
/* @__PURE__ */
|
|
5724
|
-
/* @__PURE__ */
|
|
5896
|
+
/* @__PURE__ */ jsxs16("div", { children: [
|
|
5897
|
+
/* @__PURE__ */ jsx16("dt", { children: "Payment posted" }),
|
|
5898
|
+
/* @__PURE__ */ jsx16("dd", { children: currency(remittance.postedPrincipal) })
|
|
5725
5899
|
] }),
|
|
5726
|
-
/* @__PURE__ */
|
|
5727
|
-
/* @__PURE__ */
|
|
5728
|
-
/* @__PURE__ */
|
|
5900
|
+
/* @__PURE__ */ jsxs16("div", { children: [
|
|
5901
|
+
/* @__PURE__ */ jsx16("dt", { children: "Penalty & interest" }),
|
|
5902
|
+
/* @__PURE__ */ jsx16("dd", { children: currency(remittance.postedAdditional) })
|
|
5729
5903
|
] }),
|
|
5730
|
-
/* @__PURE__ */
|
|
5731
|
-
/* @__PURE__ */
|
|
5732
|
-
/* @__PURE__ */
|
|
5904
|
+
/* @__PURE__ */ jsxs16("div", { children: [
|
|
5905
|
+
/* @__PURE__ */ jsx16("dt", { children: "Total received" }),
|
|
5906
|
+
/* @__PURE__ */ jsx16("dd", { children: currency(remittance.totalPostedCash) })
|
|
5733
5907
|
] }),
|
|
5734
|
-
/* @__PURE__ */
|
|
5735
|
-
/* @__PURE__ */
|
|
5736
|
-
/* @__PURE__ */
|
|
5908
|
+
/* @__PURE__ */ jsxs16("div", { children: [
|
|
5909
|
+
/* @__PURE__ */ jsx16("dt", { children: "Balance due" }),
|
|
5910
|
+
/* @__PURE__ */ jsx16("dd", { children: currency(remittance.balanceDue) })
|
|
5737
5911
|
] })
|
|
5738
5912
|
] }),
|
|
5739
|
-
remittance.denialReason ? /* @__PURE__ */
|
|
5740
|
-
/* @__PURE__ */
|
|
5741
|
-
/* @__PURE__ */
|
|
5913
|
+
remittance.denialReason ? /* @__PURE__ */ jsxs16("div", { className: "mb-denial", children: [
|
|
5914
|
+
/* @__PURE__ */ jsx16("strong", { children: "Denial reason" }),
|
|
5915
|
+
/* @__PURE__ */ jsx16("p", { children: remittance.denialReason })
|
|
5742
5916
|
] }) : null
|
|
5743
5917
|
] });
|
|
5744
5918
|
}
|
|
@@ -5753,72 +5927,72 @@ function BillPayerContactCard({ delivery, appearance, className, style }) {
|
|
|
5753
5927
|
delivery.contacts.portalUrl ? ["Portal", "Open payer portal", delivery.contacts.portalUrl] : null
|
|
5754
5928
|
].filter(Boolean);
|
|
5755
5929
|
if (!delivery.payerName && !contacts2.length) return null;
|
|
5756
|
-
return /* @__PURE__ */
|
|
5757
|
-
/* @__PURE__ */
|
|
5758
|
-
/* @__PURE__ */
|
|
5759
|
-
/* @__PURE__ */
|
|
5760
|
-
/* @__PURE__ */
|
|
5930
|
+
return /* @__PURE__ */ jsxs16("section", { className: classes("mb-surface mb-contacts", className), style: mindBillAppearanceStyle(appearance, style), "aria-label": "Payer contact information", children: [
|
|
5931
|
+
/* @__PURE__ */ jsx16("style", { children: lifecycleSurfaceStyles }),
|
|
5932
|
+
/* @__PURE__ */ jsx16("header", { className: "mb-surface-heading", children: /* @__PURE__ */ jsxs16("div", { children: [
|
|
5933
|
+
/* @__PURE__ */ jsx16("strong", { children: delivery.payerName || "Claims administrator" }),
|
|
5934
|
+
/* @__PURE__ */ jsx16("span", { children: "Billing and follow-up contacts." })
|
|
5761
5935
|
] }) }),
|
|
5762
|
-
!contacts2.length ? /* @__PURE__ */
|
|
5763
|
-
/* @__PURE__ */
|
|
5764
|
-
/* @__PURE__ */
|
|
5936
|
+
!contacts2.length ? /* @__PURE__ */ jsx16("p", { className: "mb-empty", children: "No payer contact details are available." }) : /* @__PURE__ */ jsx16("dl", { children: contacts2.map(([label, value, href]) => /* @__PURE__ */ jsxs16("div", { children: [
|
|
5937
|
+
/* @__PURE__ */ jsx16("dt", { children: label }),
|
|
5938
|
+
/* @__PURE__ */ jsx16("dd", { children: href ? /* @__PURE__ */ jsx16("a", { href, target: label === "Portal" ? "_blank" : void 0, rel: label === "Portal" ? "noreferrer noopener" : void 0, children: value }) : value })
|
|
5765
5939
|
] }, label)) })
|
|
5766
5940
|
] });
|
|
5767
5941
|
}
|
|
5768
5942
|
function BillPaymentLedger({ payments, appearance, className, style }) {
|
|
5769
|
-
return /* @__PURE__ */
|
|
5770
|
-
/* @__PURE__ */
|
|
5771
|
-
/* @__PURE__ */
|
|
5772
|
-
/* @__PURE__ */
|
|
5773
|
-
/* @__PURE__ */
|
|
5943
|
+
return /* @__PURE__ */ jsxs16("section", { className: classes("mb-surface mb-payments", className), style: mindBillAppearanceStyle(appearance, style), "aria-label": "Payment ledger", children: [
|
|
5944
|
+
/* @__PURE__ */ jsx16("style", { children: lifecycleSurfaceStyles }),
|
|
5945
|
+
/* @__PURE__ */ jsx16("header", { className: "mb-surface-heading", children: /* @__PURE__ */ jsxs16("div", { children: [
|
|
5946
|
+
/* @__PURE__ */ jsx16("strong", { children: "Payments" }),
|
|
5947
|
+
/* @__PURE__ */ jsx16("span", { children: "Funds recorded against this bill." })
|
|
5774
5948
|
] }) }),
|
|
5775
|
-
!payments.length ? /* @__PURE__ */
|
|
5949
|
+
!payments.length ? /* @__PURE__ */ jsx16("p", { className: "mb-empty", children: "No payments posted." }) : /* @__PURE__ */ jsx16("div", { className: "mb-payment-list", children: payments.map((payment) => {
|
|
5776
5950
|
const additional = payment.feeAmount ?? 0;
|
|
5777
|
-
return /* @__PURE__ */
|
|
5778
|
-
/* @__PURE__ */
|
|
5779
|
-
/* @__PURE__ */
|
|
5780
|
-
/* @__PURE__ */
|
|
5951
|
+
return /* @__PURE__ */ jsxs16("article", { children: [
|
|
5952
|
+
/* @__PURE__ */ jsxs16("div", { className: "mb-payment-amount", children: [
|
|
5953
|
+
/* @__PURE__ */ jsx16("strong", { children: currency(payment.amount) }),
|
|
5954
|
+
/* @__PURE__ */ jsx16("span", { children: "Total received" })
|
|
5781
5955
|
] }),
|
|
5782
|
-
/* @__PURE__ */
|
|
5783
|
-
/* @__PURE__ */
|
|
5784
|
-
/* @__PURE__ */
|
|
5785
|
-
/* @__PURE__ */
|
|
5956
|
+
/* @__PURE__ */ jsxs16("dl", { children: [
|
|
5957
|
+
/* @__PURE__ */ jsxs16("div", { children: [
|
|
5958
|
+
/* @__PURE__ */ jsx16("dt", { children: "Applied to bill" }),
|
|
5959
|
+
/* @__PURE__ */ jsx16("dd", { children: currency(payment.principalAmount) })
|
|
5786
5960
|
] }),
|
|
5787
|
-
additional > 0 ? /* @__PURE__ */
|
|
5788
|
-
/* @__PURE__ */
|
|
5789
|
-
/* @__PURE__ */
|
|
5961
|
+
additional > 0 ? /* @__PURE__ */ jsxs16("div", { children: [
|
|
5962
|
+
/* @__PURE__ */ jsx16("dt", { children: "Penalty & interest" }),
|
|
5963
|
+
/* @__PURE__ */ jsx16("dd", { children: currency(additional) })
|
|
5790
5964
|
] }) : null,
|
|
5791
|
-
/* @__PURE__ */
|
|
5792
|
-
/* @__PURE__ */
|
|
5793
|
-
/* @__PURE__ */
|
|
5965
|
+
/* @__PURE__ */ jsxs16("div", { children: [
|
|
5966
|
+
/* @__PURE__ */ jsx16("dt", { children: "Method" }),
|
|
5967
|
+
/* @__PURE__ */ jsx16("dd", { children: payment.method.toUpperCase() })
|
|
5794
5968
|
] }),
|
|
5795
|
-
/* @__PURE__ */
|
|
5796
|
-
/* @__PURE__ */
|
|
5797
|
-
/* @__PURE__ */
|
|
5969
|
+
/* @__PURE__ */ jsxs16("div", { children: [
|
|
5970
|
+
/* @__PURE__ */ jsx16("dt", { children: "Reference" }),
|
|
5971
|
+
/* @__PURE__ */ jsx16("dd", { children: payment.checkNumber || "\u2014" })
|
|
5798
5972
|
] }),
|
|
5799
|
-
/* @__PURE__ */
|
|
5800
|
-
/* @__PURE__ */
|
|
5801
|
-
/* @__PURE__ */
|
|
5973
|
+
/* @__PURE__ */ jsxs16("div", { children: [
|
|
5974
|
+
/* @__PURE__ */ jsx16("dt", { children: "Effective date" }),
|
|
5975
|
+
/* @__PURE__ */ jsx16("dd", { children: payment.receivedDate || payment.depositDate || defaultFormatDate(payment.postedAt) })
|
|
5802
5976
|
] }),
|
|
5803
|
-
/* @__PURE__ */
|
|
5804
|
-
/* @__PURE__ */
|
|
5805
|
-
/* @__PURE__ */
|
|
5977
|
+
/* @__PURE__ */ jsxs16("div", { children: [
|
|
5978
|
+
/* @__PURE__ */ jsx16("dt", { children: "Deposit date" }),
|
|
5979
|
+
/* @__PURE__ */ jsx16("dd", { children: payment.depositDate || "Not recorded" })
|
|
5806
5980
|
] }),
|
|
5807
|
-
/* @__PURE__ */
|
|
5808
|
-
/* @__PURE__ */
|
|
5809
|
-
/* @__PURE__ */
|
|
5981
|
+
/* @__PURE__ */ jsxs16("div", { children: [
|
|
5982
|
+
/* @__PURE__ */ jsx16("dt", { children: "Posted" }),
|
|
5983
|
+
/* @__PURE__ */ jsxs16("dd", { children: [
|
|
5810
5984
|
defaultFormatDate(payment.postedAt),
|
|
5811
5985
|
" \xB7 ",
|
|
5812
5986
|
payment.source.toUpperCase()
|
|
5813
5987
|
] })
|
|
5814
5988
|
] }),
|
|
5815
|
-
/* @__PURE__ */
|
|
5816
|
-
/* @__PURE__ */
|
|
5817
|
-
/* @__PURE__ */
|
|
5989
|
+
/* @__PURE__ */ jsxs16("div", { children: [
|
|
5990
|
+
/* @__PURE__ */ jsx16("dt", { children: "Status" }),
|
|
5991
|
+
/* @__PURE__ */ jsx16("dd", { children: humanize(payment.status || "posted") })
|
|
5818
5992
|
] })
|
|
5819
5993
|
] }),
|
|
5820
|
-
payment.feeReason ? /* @__PURE__ */
|
|
5821
|
-
payment.note ? /* @__PURE__ */
|
|
5994
|
+
payment.feeReason ? /* @__PURE__ */ jsx16("p", { children: payment.feeReason }) : null,
|
|
5995
|
+
payment.note ? /* @__PURE__ */ jsx16("p", { children: payment.note }) : null
|
|
5822
5996
|
] }, payment.id);
|
|
5823
5997
|
}) })
|
|
5824
5998
|
] });
|
|
@@ -5867,6 +6041,7 @@ var lifecycleSurfaceStyles = `
|
|
|
5867
6041
|
.mb-history-due dl>div{display:grid;grid-template-columns:96px minmax(0,1fr);gap:12px;border-top:1px solid color-mix(in srgb,var(--mb-border) 60%,transparent);padding-top:4px}
|
|
5868
6042
|
.mb-history-due dt{font-weight:750}.mb-history-due dd{margin:0}
|
|
5869
6043
|
.mb-history-text{margin:8px 0 0;color:var(--mb-text);white-space:pre-wrap}
|
|
6044
|
+
@media(max-width:500px){.mb-eor-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.mb-eor-metrics>div:nth-child(n){border-top:1px solid var(--mb-border);border-left:1px solid var(--mb-border)}.mb-eor-metrics>div:nth-child(-n+2){border-top:0}.mb-eor-metrics>div:nth-child(odd){border-left:0}.mb-eor-metrics dd{overflow-wrap:anywhere}}
|
|
5870
6045
|
@media(max-width:700px){.mb-history-head{display:none}.mb-history-line{grid-template-columns:1fr;gap:2px;padding:10px 12px}.mb-history-details{padding:4px 12px 12px}.mb-history-kv>div,.mb-history-due dl>div{grid-template-columns:1fr}}
|
|
5871
6046
|
@media(max-width:700px){.mb-surface.mb-progress{padding:16px 10px}.mb-progress-list{grid-template-columns:repeat(4,minmax(0,1fr))}.mb-progress-list li{display:grid;grid-template-columns:1fr;align-items:start;gap:6px;text-align:center;font-size:10px;min-width:0}.mb-progress-list li b{font-size:10px;white-space:nowrap}.mb-progress-list li:not(:last-child)::after{left:calc(50% + 12px);right:calc(-50% + 12px);top:11px;bottom:auto;width:auto;height:2px}.mb-progress-list li>span{grid-row:auto;width:24px;height:24px;font-size:11px}.mb-rejection-notice{padding:18px 14px 14px}.mb-rejection-overview{grid-template-columns:1fr;gap:18px}.mb-rejection-heading strong{font-size:17px}.mb-rejection-icon{width:36px;height:36px}.mb-rejection-progress{margin:0 0 4px}.mb-rejection-issues-heading{align-items:flex-start;flex-direction:column;gap:4px}.mb-rejection-issues-heading>span{text-align:left}.mb-rejection-issues li{grid-template-columns:8px minmax(0,1fr);gap:8px 10px}.mb-rejection-code{grid-column:2;justify-self:start}.mb-snapshot dl,.mb-remittance dl,.mb-contacts dl{grid-template-columns:1fr 1fr}.mb-snapshot dl>div,.mb-remittance dl>div,.mb-contacts dl>div{border:0;border-top:1px solid var(--mb-border);padding:10px 0}.mb-snapshot dl>div:nth-child(-n+2),.mb-remittance dl>div:nth-child(-n+2),.mb-contacts dl>div:nth-child(-n+2){border-top:0}.mb-payment-list article{grid-template-columns:1fr}.mb-payment-list article>dl{grid-template-columns:1fr 1fr}}
|
|
5872
6047
|
`;
|
|
@@ -5874,10 +6049,10 @@ var lifecycleSurfaceStyles = `
|
|
|
5874
6049
|
// src/connected-bill-lifecycle.tsx
|
|
5875
6050
|
import {
|
|
5876
6051
|
useCallback as useCallback4,
|
|
5877
|
-
useEffect as
|
|
6052
|
+
useEffect as useEffect12,
|
|
5878
6053
|
useMemo as useMemo9,
|
|
5879
|
-
useRef as
|
|
5880
|
-
useState as
|
|
6054
|
+
useRef as useRef8,
|
|
6055
|
+
useState as useState14
|
|
5881
6056
|
} from "react";
|
|
5882
6057
|
import {
|
|
5883
6058
|
DEFAULT_API_BASE_URL as DEFAULT_API_BASE_URL2,
|
|
@@ -5888,29 +6063,13 @@ import {
|
|
|
5888
6063
|
} from "@mindbill/browser";
|
|
5889
6064
|
|
|
5890
6065
|
// src/second-review-form.tsx
|
|
5891
|
-
import { useMemo as useMemo8, useState as
|
|
6066
|
+
import { useMemo as useMemo8, useState as useState13 } from "react";
|
|
5892
6067
|
|
|
5893
6068
|
// src/second-review-corrections.ts
|
|
5894
|
-
|
|
5895
|
-
if (!draft.correctBilling) return void 0;
|
|
5896
|
-
const units = Number(draft.units);
|
|
5897
|
-
const charge = Number(draft.charge);
|
|
5898
|
-
const modifiers = draft.modifiers.trim().toUpperCase().split(/[\s,]+/).filter(Boolean);
|
|
5899
|
-
if (!draft.units.trim() || !Number.isInteger(units) || units < 1 || units > 1e4) {
|
|
5900
|
-
throw new Error("Corrected units must be a whole number from 1 to 10,000.");
|
|
5901
|
-
}
|
|
5902
|
-
if (modifiers.length > 4 || new Set(modifiers).size !== modifiers.length || modifiers.some((value) => !/^[A-Z0-9]{2}$/.test(value))) {
|
|
5903
|
-
throw new Error("Enter up to four unique two-character modifiers, separated by commas. Leave blank to remove modifiers.");
|
|
5904
|
-
}
|
|
5905
|
-
if (!draft.charge.trim() || !Number.isFinite(charge) || charge < 0 || charge > 999999.99 || Math.abs(charge * 100 - Math.round(charge * 100)) > 1e-6) {
|
|
5906
|
-
throw new Error("Enter the corrected charge in dollars and cents.");
|
|
5907
|
-
}
|
|
5908
|
-
if (!draft.chargeReviewed) throw new Error("Confirm that you reviewed the corrected charge. It is not recalculated automatically.");
|
|
5909
|
-
return { units, modifiers, charge };
|
|
5910
|
-
}
|
|
6069
|
+
import { parseSecondReviewCorrection } from "@mindbill/browser";
|
|
5911
6070
|
|
|
5912
6071
|
// src/second-review-form.tsx
|
|
5913
|
-
import { Fragment as
|
|
6072
|
+
import { Fragment as Fragment14, jsx as jsx17, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
5914
6073
|
var SECOND_REVIEW_REASON_TEMPLATES = [
|
|
5915
6074
|
{
|
|
5916
6075
|
label: "Med-legal report denied",
|
|
@@ -5945,7 +6104,7 @@ var SECOND_REVIEW_REASON_TEMPLATES = [
|
|
|
5945
6104
|
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."
|
|
5946
6105
|
}
|
|
5947
6106
|
];
|
|
5948
|
-
var
|
|
6107
|
+
var css11 = `
|
|
5949
6108
|
.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)}
|
|
5950
6109
|
.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)}
|
|
5951
6110
|
.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}
|
|
@@ -5983,12 +6142,12 @@ function SecondReviewForm({
|
|
|
5983
6142
|
onCancel,
|
|
5984
6143
|
onSubmit
|
|
5985
6144
|
}) {
|
|
5986
|
-
const [lines, setLines] =
|
|
5987
|
-
const [attachmentIds, setAttachmentIds] =
|
|
5988
|
-
const [uploads, setUploads] =
|
|
5989
|
-
const [formError, setFormError] =
|
|
5990
|
-
const [preparing, setPreparing] =
|
|
5991
|
-
const [delivery, setDelivery] =
|
|
6145
|
+
const [lines, setLines] = useState13(() => initialLineDrafts(data));
|
|
6146
|
+
const [attachmentIds, setAttachmentIds] = useState13(() => data.bill.attachments.map((attachment) => attachment.id));
|
|
6147
|
+
const [uploads, setUploads] = useState13([]);
|
|
6148
|
+
const [formError, setFormError] = useState13("");
|
|
6149
|
+
const [preparing, setPreparing] = useState13(false);
|
|
6150
|
+
const [delivery, setDelivery] = useState13(null);
|
|
5992
6151
|
const selectableLines = useMemo8(() => data.bill.lineItems.filter((line) => Boolean(line.id)), [data.bill.lineItems]);
|
|
5993
6152
|
const selected = selectableLines.filter((line) => lines[line.id]?.selected);
|
|
5994
6153
|
const invalidReason = selected.some((line) => !lines[line.id]?.reason.trim());
|
|
@@ -6088,118 +6247,118 @@ function SecondReviewForm({
|
|
|
6088
6247
|
setPreparing(false);
|
|
6089
6248
|
}
|
|
6090
6249
|
};
|
|
6091
|
-
return /* @__PURE__ */
|
|
6092
|
-
/* @__PURE__ */
|
|
6093
|
-
/* @__PURE__ */
|
|
6094
|
-
/* @__PURE__ */
|
|
6095
|
-
/* @__PURE__ */
|
|
6096
|
-
/* @__PURE__ */
|
|
6250
|
+
return /* @__PURE__ */ jsxs17(Fragment14, { children: [
|
|
6251
|
+
/* @__PURE__ */ jsx17("style", { children: css11 }),
|
|
6252
|
+
/* @__PURE__ */ jsxs17("section", { className: "mb-second-review", children: [
|
|
6253
|
+
/* @__PURE__ */ jsxs17("div", { children: [
|
|
6254
|
+
/* @__PURE__ */ jsx17("h3", { children: "Submit Second Review" }),
|
|
6255
|
+
/* @__PURE__ */ jsx17("p", { children: "Select each disputed service and explain why it should be reconsidered." })
|
|
6097
6256
|
] }),
|
|
6098
|
-
/* @__PURE__ */
|
|
6099
|
-
/* @__PURE__ */
|
|
6100
|
-
/* @__PURE__ */
|
|
6257
|
+
/* @__PURE__ */ jsxs17("label", { className: "mb-second-review-template", children: [
|
|
6258
|
+
/* @__PURE__ */ jsx17("span", { className: "mb-second-review-label", children: "Apply a saved reason to selected lines" }),
|
|
6259
|
+
/* @__PURE__ */ jsxs17("select", { className: "mb-second-review-select", defaultValue: "", onChange: (event) => {
|
|
6101
6260
|
applyTemplate(event.target.value);
|
|
6102
6261
|
event.target.value = "";
|
|
6103
6262
|
}, children: [
|
|
6104
|
-
/* @__PURE__ */
|
|
6105
|
-
SECOND_REVIEW_REASON_TEMPLATES.map((template) => /* @__PURE__ */
|
|
6263
|
+
/* @__PURE__ */ jsx17("option", { value: "", children: "Choose a reason template (optional)" }),
|
|
6264
|
+
SECOND_REVIEW_REASON_TEMPLATES.map((template) => /* @__PURE__ */ jsx17("option", { value: template.value, children: template.label }, template.label))
|
|
6106
6265
|
] })
|
|
6107
6266
|
] }),
|
|
6108
|
-
/* @__PURE__ */
|
|
6267
|
+
/* @__PURE__ */ jsxs17("section", { className: "mb-second-review-lines", "aria-label": "Service lines in dispute", children: [
|
|
6109
6268
|
selectableLines.map((line) => {
|
|
6110
6269
|
const draft = lines[line.id];
|
|
6111
|
-
return /* @__PURE__ */
|
|
6112
|
-
/* @__PURE__ */
|
|
6113
|
-
/* @__PURE__ */
|
|
6114
|
-
/* @__PURE__ */
|
|
6115
|
-
/* @__PURE__ */
|
|
6270
|
+
return /* @__PURE__ */ jsxs17("article", { className: "mb-second-review-line", "data-selected": draft?.selected, children: [
|
|
6271
|
+
/* @__PURE__ */ jsxs17("div", { className: "mb-second-review-line-head", children: [
|
|
6272
|
+
/* @__PURE__ */ jsxs17("label", { className: "mb-second-review-check", children: [
|
|
6273
|
+
/* @__PURE__ */ jsx17("input", { type: "checkbox", checked: Boolean(draft?.selected), onChange: (event) => patchLine(line.id, { selected: event.target.checked }) }),
|
|
6274
|
+
/* @__PURE__ */ jsxs17("span", { children: [
|
|
6116
6275
|
line.code,
|
|
6117
6276
|
line.modifiers.length ? `-${line.modifiers.join("-")}` : ""
|
|
6118
6277
|
] })
|
|
6119
6278
|
] }),
|
|
6120
|
-
/* @__PURE__ */
|
|
6121
|
-
/* @__PURE__ */
|
|
6279
|
+
/* @__PURE__ */ jsxs17("span", { className: "mb-second-review-metrics", children: [
|
|
6280
|
+
/* @__PURE__ */ jsxs17("span", { children: [
|
|
6122
6281
|
line.units,
|
|
6123
6282
|
" unit",
|
|
6124
6283
|
line.units === 1 ? "" : "s"
|
|
6125
6284
|
] }),
|
|
6126
|
-
/* @__PURE__ */
|
|
6285
|
+
/* @__PURE__ */ jsx17("span", { children: money5(line.charge) })
|
|
6127
6286
|
] })
|
|
6128
6287
|
] }),
|
|
6129
|
-
draft?.selected ? /* @__PURE__ */
|
|
6130
|
-
/* @__PURE__ */
|
|
6131
|
-
/* @__PURE__ */
|
|
6132
|
-
/* @__PURE__ */
|
|
6288
|
+
draft?.selected ? /* @__PURE__ */ jsxs17(Fragment14, { children: [
|
|
6289
|
+
/* @__PURE__ */ jsxs17("label", { className: "mb-second-review-field", children: [
|
|
6290
|
+
/* @__PURE__ */ jsx17("span", { className: "mb-second-review-label", children: "Reason for requesting Second Review" }),
|
|
6291
|
+
/* @__PURE__ */ jsx17("textarea", { className: "mb-second-review-textarea", required: true, value: draft.reason, onChange: (event) => patchLine(line.id, { reason: event.target.value }) })
|
|
6133
6292
|
] }),
|
|
6134
|
-
/* @__PURE__ */
|
|
6135
|
-
/* @__PURE__ */
|
|
6136
|
-
[["yes", "Yes"], ["no", "No"], ["", "Not specified"]].map(([value, label]) => /* @__PURE__ */
|
|
6137
|
-
/* @__PURE__ */
|
|
6293
|
+
/* @__PURE__ */ jsxs17("div", { className: "mb-second-review-auth", role: "radiogroup", "aria-label": `Service or good ${line.code} authorized`, children: [
|
|
6294
|
+
/* @__PURE__ */ jsx17("strong", { children: "Service/Good Authorized?" }),
|
|
6295
|
+
[["yes", "Yes"], ["no", "No"], ["", "Not specified"]].map(([value, label]) => /* @__PURE__ */ jsxs17("label", { children: [
|
|
6296
|
+
/* @__PURE__ */ jsx17("input", { type: "radio", name: `authorized-${line.id}`, checked: draft.serviceAuthorized === value, onChange: () => patchLine(line.id, { serviceAuthorized: value }) }),
|
|
6138
6297
|
label
|
|
6139
6298
|
] }, label))
|
|
6140
6299
|
] })
|
|
6141
6300
|
] }) : null,
|
|
6142
|
-
draft?.selected ? /* @__PURE__ */
|
|
6143
|
-
/* @__PURE__ */
|
|
6144
|
-
/* @__PURE__ */
|
|
6301
|
+
draft?.selected ? /* @__PURE__ */ jsxs17(Fragment14, { children: [
|
|
6302
|
+
/* @__PURE__ */ jsxs17("label", { className: "mb-second-review-check", children: [
|
|
6303
|
+
/* @__PURE__ */ jsx17("input", { type: "checkbox", checked: draft.correctBilling, onChange: (event) => patchLine(line.id, { correctBilling: event.target.checked, chargeReviewed: false }) }),
|
|
6145
6304
|
"Correct units or modifiers on this submission"
|
|
6146
6305
|
] }),
|
|
6147
|
-
draft.correctBilling ? /* @__PURE__ */
|
|
6148
|
-
/* @__PURE__ */
|
|
6149
|
-
/* @__PURE__ */
|
|
6150
|
-
/* @__PURE__ */
|
|
6151
|
-
/* @__PURE__ */
|
|
6152
|
-
/* @__PURE__ */
|
|
6306
|
+
draft.correctBilling ? /* @__PURE__ */ jsxs17(Fragment14, { children: [
|
|
6307
|
+
/* @__PURE__ */ jsx17("p", { className: "mb-second-review-correction-note", children: "Earlier submissions stay unchanged. Review the charge explicitly; changing units or modifiers does not recalculate it." }),
|
|
6308
|
+
/* @__PURE__ */ jsxs17("div", { className: "mb-second-review-corrections", children: [
|
|
6309
|
+
/* @__PURE__ */ jsxs17("label", { className: "mb-second-review-field", children: [
|
|
6310
|
+
/* @__PURE__ */ jsx17("span", { className: "mb-second-review-label", children: "Corrected units" }),
|
|
6311
|
+
/* @__PURE__ */ jsx17("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 }) })
|
|
6153
6312
|
] }),
|
|
6154
|
-
/* @__PURE__ */
|
|
6155
|
-
/* @__PURE__ */
|
|
6156
|
-
/* @__PURE__ */
|
|
6313
|
+
/* @__PURE__ */ jsxs17("label", { className: "mb-second-review-field", children: [
|
|
6314
|
+
/* @__PURE__ */ jsx17("span", { className: "mb-second-review-label", children: "Corrected modifiers" }),
|
|
6315
|
+
/* @__PURE__ */ jsx17("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 }) })
|
|
6157
6316
|
] }),
|
|
6158
|
-
/* @__PURE__ */
|
|
6159
|
-
/* @__PURE__ */
|
|
6160
|
-
/* @__PURE__ */
|
|
6317
|
+
/* @__PURE__ */ jsxs17("label", { className: "mb-second-review-field", children: [
|
|
6318
|
+
/* @__PURE__ */ jsx17("span", { className: "mb-second-review-label", children: "Corrected charge ($)" }),
|
|
6319
|
+
/* @__PURE__ */ jsx17("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 }) })
|
|
6161
6320
|
] })
|
|
6162
6321
|
] }),
|
|
6163
|
-
/* @__PURE__ */
|
|
6164
|
-
/* @__PURE__ */
|
|
6322
|
+
/* @__PURE__ */ jsxs17("label", { className: "mb-second-review-check", children: [
|
|
6323
|
+
/* @__PURE__ */ jsx17("input", { type: "checkbox", checked: draft.chargeReviewed, onChange: (event) => patchLine(line.id, { chargeReviewed: event.target.checked }) }),
|
|
6165
6324
|
"I reviewed the corrected charge"
|
|
6166
6325
|
] }),
|
|
6167
|
-
correctionErrors[line.id] ? /* @__PURE__ */
|
|
6326
|
+
correctionErrors[line.id] ? /* @__PURE__ */ jsx17("p", { className: "mb-second-review-correction-note", role: "status", children: correctionErrors[line.id] }) : null
|
|
6168
6327
|
] }) : null
|
|
6169
6328
|
] }) : null
|
|
6170
6329
|
] }, line.id);
|
|
6171
6330
|
}),
|
|
6172
|
-
!selectableLines.length ? /* @__PURE__ */
|
|
6331
|
+
!selectableLines.length ? /* @__PURE__ */ jsx17("div", { className: "mb-second-review-error", children: "This bill has no stable service-line identifiers. Refresh the bill before submitting a Second Review." }) : null
|
|
6173
6332
|
] }),
|
|
6174
|
-
/* @__PURE__ */
|
|
6175
|
-
/* @__PURE__ */
|
|
6176
|
-
data.bill.attachments.map((attachment) => /* @__PURE__ */
|
|
6177
|
-
/* @__PURE__ */
|
|
6178
|
-
/* @__PURE__ */
|
|
6179
|
-
/* @__PURE__ */
|
|
6180
|
-
/* @__PURE__ */
|
|
6333
|
+
/* @__PURE__ */ jsxs17("fieldset", { className: "mb-second-review-packet", children: [
|
|
6334
|
+
/* @__PURE__ */ jsx17("legend", { children: "Supporting packet" }),
|
|
6335
|
+
data.bill.attachments.map((attachment) => /* @__PURE__ */ jsxs17("label", { className: "mb-second-review-document", children: [
|
|
6336
|
+
/* @__PURE__ */ jsx17("input", { type: "checkbox", checked: attachmentIds.includes(attachment.id), onChange: (event) => setAttachmentIds((current) => event.target.checked ? [...current, attachment.id] : current.filter((id) => id !== attachment.id)) }),
|
|
6337
|
+
/* @__PURE__ */ jsxs17("span", { children: [
|
|
6338
|
+
/* @__PURE__ */ jsx17("strong", { children: attachment.filename }),
|
|
6339
|
+
/* @__PURE__ */ jsx17("small", { children: attachment.description || attachment.documentType })
|
|
6181
6340
|
] }),
|
|
6182
|
-
/* @__PURE__ */
|
|
6341
|
+
/* @__PURE__ */ jsx17("button", { className: "mb-second-review-link", type: "button", onClick: () => void openAttachment(attachment).catch(() => void 0), children: "View" })
|
|
6183
6342
|
] }, attachment.id)),
|
|
6184
|
-
/* @__PURE__ */
|
|
6185
|
-
/* @__PURE__ */
|
|
6186
|
-
/* @__PURE__ */
|
|
6187
|
-
/* @__PURE__ */
|
|
6343
|
+
/* @__PURE__ */ jsxs17("label", { className: "mb-second-review-upload", children: [
|
|
6344
|
+
/* @__PURE__ */ jsx17("input", { type: "file", accept: "application/pdf,.pdf", multiple: true, onChange: addUploads }),
|
|
6345
|
+
/* @__PURE__ */ jsxs17("span", { children: [
|
|
6346
|
+
/* @__PURE__ */ jsx17("strong", { children: "Choose one or more PDF files" }),
|
|
6188
6347
|
" to attach"
|
|
6189
6348
|
] })
|
|
6190
6349
|
] }),
|
|
6191
|
-
uploads.map((upload, index) => /* @__PURE__ */
|
|
6192
|
-
/* @__PURE__ */
|
|
6193
|
-
/* @__PURE__ */
|
|
6350
|
+
uploads.map((upload, index) => /* @__PURE__ */ jsxs17("div", { className: "mb-second-review-uploaded", children: [
|
|
6351
|
+
/* @__PURE__ */ jsx17("span", { children: upload.file.name }),
|
|
6352
|
+
/* @__PURE__ */ jsx17("button", { className: "mb-second-review-link", type: "button", onClick: () => setUploads((current) => current.filter((_, itemIndex) => itemIndex !== index)), children: "Remove" })
|
|
6194
6353
|
] }, `${upload.file.name}-${index}`))
|
|
6195
6354
|
] }),
|
|
6196
|
-
formError || error?.message ? /* @__PURE__ */
|
|
6197
|
-
/* @__PURE__ */
|
|
6198
|
-
/* @__PURE__ */
|
|
6199
|
-
/* @__PURE__ */
|
|
6355
|
+
formError || error?.message ? /* @__PURE__ */ jsx17("div", { className: "mb-second-review-error", role: "alert", children: formError || error?.message }) : null,
|
|
6356
|
+
/* @__PURE__ */ jsxs17("div", { className: "mb-second-review-actions", children: [
|
|
6357
|
+
/* @__PURE__ */ jsx17("button", { className: "mb-second-review-button secondary", type: "button", disabled: submitting || preparing, onClick: onCancel, children: "Cancel" }),
|
|
6358
|
+
/* @__PURE__ */ jsx17("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" })
|
|
6200
6359
|
] })
|
|
6201
6360
|
] }),
|
|
6202
|
-
delivery ? /* @__PURE__ */
|
|
6361
|
+
delivery ? /* @__PURE__ */ jsx17(SendRouteDialog, { title: "Confirm Second Review delivery", delivery, submitting: submitting || preparing, error: formError || error?.message || null, onCancel: () => setDelivery(null), onConfirm: (route) => void submit(route) }) : null
|
|
6203
6362
|
] });
|
|
6204
6363
|
}
|
|
6205
6364
|
|
|
@@ -6211,7 +6370,7 @@ import {
|
|
|
6211
6370
|
reportBillStatusContacts as reportBillStatusContacts2,
|
|
6212
6371
|
secondReviewDeadline as secondReviewDeadline2
|
|
6213
6372
|
} from "@mindbill/browser";
|
|
6214
|
-
import { Fragment as
|
|
6373
|
+
import { Fragment as Fragment15, jsx as jsx18, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
6215
6374
|
var DEFAULT_REFRESH_INTERVAL2 = 6e4;
|
|
6216
6375
|
function billTeamNotes(data) {
|
|
6217
6376
|
const notes = data.notes ?? [];
|
|
@@ -6259,12 +6418,12 @@ function useBillLifecycle({
|
|
|
6259
6418
|
enabled = true,
|
|
6260
6419
|
fetch: fetchOverride
|
|
6261
6420
|
}) {
|
|
6262
|
-
const [data, setData] =
|
|
6263
|
-
const [error, setError] =
|
|
6264
|
-
const [isLoading, setIsLoading] =
|
|
6265
|
-
const [isRefreshing, setIsRefreshing] =
|
|
6266
|
-
const [isMutating, setIsMutating] =
|
|
6267
|
-
const mounted =
|
|
6421
|
+
const [data, setData] = useState14(null);
|
|
6422
|
+
const [error, setError] = useState14(null);
|
|
6423
|
+
const [isLoading, setIsLoading] = useState14(enabled);
|
|
6424
|
+
const [isRefreshing, setIsRefreshing] = useState14(false);
|
|
6425
|
+
const [isMutating, setIsMutating] = useState14(false);
|
|
6426
|
+
const mounted = useRef8(true);
|
|
6268
6427
|
const client = useMemo9(() => createBillLifecycleClient({
|
|
6269
6428
|
billId: providedBillId,
|
|
6270
6429
|
sessionEndpoint,
|
|
@@ -6272,12 +6431,12 @@ function useBillLifecycle({
|
|
|
6272
6431
|
apiBaseUrl,
|
|
6273
6432
|
fetch: fetchOverride
|
|
6274
6433
|
}), [apiBaseUrl, fetchOverride, getSession, providedBillId, sessionEndpoint]);
|
|
6275
|
-
|
|
6434
|
+
useEffect12(() => {
|
|
6276
6435
|
setData(null);
|
|
6277
6436
|
setError(null);
|
|
6278
6437
|
setIsLoading(enabled);
|
|
6279
6438
|
}, [enabled, providedBillId]);
|
|
6280
|
-
|
|
6439
|
+
useEffect12(() => {
|
|
6281
6440
|
mounted.current = true;
|
|
6282
6441
|
return () => {
|
|
6283
6442
|
mounted.current = false;
|
|
@@ -6301,7 +6460,7 @@ function useBillLifecycle({
|
|
|
6301
6460
|
}
|
|
6302
6461
|
}
|
|
6303
6462
|
}, [client, enabled]);
|
|
6304
|
-
|
|
6463
|
+
useEffect12(() => {
|
|
6305
6464
|
if (!enabled) return;
|
|
6306
6465
|
void refresh();
|
|
6307
6466
|
const interval = refreshInterval > 0 ? window.setInterval(() => void refresh(), refreshInterval) : null;
|
|
@@ -6343,6 +6502,35 @@ function useBillLifecycle({
|
|
|
6343
6502
|
throw nextError;
|
|
6344
6503
|
}
|
|
6345
6504
|
}, [client]);
|
|
6505
|
+
const downloadSubmissionArtifact = useCallback4(async (attemptId, artifactId, label) => {
|
|
6506
|
+
setError(null);
|
|
6507
|
+
try {
|
|
6508
|
+
const blob = await client.getSubmissionArtifact(attemptId, artifactId);
|
|
6509
|
+
const url = URL.createObjectURL(blob);
|
|
6510
|
+
const link = document.createElement("a");
|
|
6511
|
+
link.href = url;
|
|
6512
|
+
link.download = label.replace(/[\\/]/g, "_");
|
|
6513
|
+
link.click();
|
|
6514
|
+
setTimeout(() => URL.revokeObjectURL(url), 6e4);
|
|
6515
|
+
} catch (cause) {
|
|
6516
|
+
const nextError = cause instanceof Error ? cause : new Error("Submission file could not be downloaded.");
|
|
6517
|
+
if (mounted.current) setError(nextError);
|
|
6518
|
+
throw nextError;
|
|
6519
|
+
}
|
|
6520
|
+
}, [client]);
|
|
6521
|
+
const downloadIbrPacket = useCallback4(async () => {
|
|
6522
|
+
setError(null);
|
|
6523
|
+
setIsMutating(true);
|
|
6524
|
+
try {
|
|
6525
|
+
await openPdfFromUserGesture(() => client.prepareIbrPacket());
|
|
6526
|
+
} catch (cause) {
|
|
6527
|
+
const nextError = cause instanceof Error ? cause : new Error("IBR packet could not be prepared.");
|
|
6528
|
+
if (mounted.current) setError(nextError);
|
|
6529
|
+
throw nextError;
|
|
6530
|
+
} finally {
|
|
6531
|
+
if (mounted.current) setIsMutating(false);
|
|
6532
|
+
}
|
|
6533
|
+
}, [client]);
|
|
6346
6534
|
return {
|
|
6347
6535
|
billId: providedBillId,
|
|
6348
6536
|
data,
|
|
@@ -6358,6 +6546,8 @@ function useBillLifecycle({
|
|
|
6358
6546
|
openAttachment,
|
|
6359
6547
|
openEor,
|
|
6360
6548
|
downloadPacket,
|
|
6549
|
+
downloadSubmissionArtifact,
|
|
6550
|
+
downloadIbrPacket,
|
|
6361
6551
|
addNote: (input) => mutate(() => client.addNote(input)),
|
|
6362
6552
|
previewCourtesyCopy: (input) => client.previewCourtesyCopy(input),
|
|
6363
6553
|
sendCourtesyCopy: (input, key) => client.sendCourtesyCopy(input, key),
|
|
@@ -6373,10 +6563,10 @@ function useBillLifecycle({
|
|
|
6373
6563
|
};
|
|
6374
6564
|
}
|
|
6375
6565
|
function LifecycleDialog({ children, title, wide = false, onClose }) {
|
|
6376
|
-
const dialog =
|
|
6377
|
-
const onCloseRef =
|
|
6566
|
+
const dialog = useRef8(null);
|
|
6567
|
+
const onCloseRef = useRef8(onClose);
|
|
6378
6568
|
onCloseRef.current = onClose;
|
|
6379
|
-
|
|
6569
|
+
useEffect12(() => {
|
|
6380
6570
|
const previous = document.activeElement;
|
|
6381
6571
|
dialog.current?.focus();
|
|
6382
6572
|
const onKeyDown = (event) => event.key === "Escape" && onCloseRef.current();
|
|
@@ -6386,8 +6576,8 @@ function LifecycleDialog({ children, title, wide = false, onClose }) {
|
|
|
6386
6576
|
previous?.focus();
|
|
6387
6577
|
};
|
|
6388
6578
|
}, []);
|
|
6389
|
-
return /* @__PURE__ */
|
|
6390
|
-
/* @__PURE__ */
|
|
6579
|
+
return /* @__PURE__ */ jsx18("div", { className: "mb-lifecycle-dialog-backdrop", onMouseDown: (event) => event.currentTarget === event.target && onClose(), children: /* @__PURE__ */ jsxs18("div", { ref: dialog, className: ["mb-lifecycle-dialog", wide ? "wide" : ""].filter(Boolean).join(" "), role: "dialog", "aria-modal": "true", "aria-label": title, tabIndex: -1, children: [
|
|
6580
|
+
/* @__PURE__ */ jsx18("button", { type: "button", className: "mb-lifecycle-dialog-close", "aria-label": "Close", onClick: onClose, children: "\xD7" }),
|
|
6391
6581
|
children
|
|
6392
6582
|
] }) });
|
|
6393
6583
|
}
|
|
@@ -6426,22 +6616,22 @@ function correctionRejectionSummary(rejection) {
|
|
|
6426
6616
|
function CorrectionRejectionReason({ rejection }) {
|
|
6427
6617
|
const summary = correctionRejectionSummary(rejection);
|
|
6428
6618
|
const details = rejection.issues?.filter((issue) => issue.description.trim() !== summary.description || Boolean(issue.code?.trim() && issue.code.trim() !== summary.code)) ?? [];
|
|
6429
|
-
return /* @__PURE__ */
|
|
6430
|
-
summary.code ? /* @__PURE__ */
|
|
6431
|
-
/* @__PURE__ */
|
|
6432
|
-
/* @__PURE__ */
|
|
6433
|
-
summary.clearinghouseDetail ? /* @__PURE__ */
|
|
6434
|
-
/* @__PURE__ */
|
|
6619
|
+
return /* @__PURE__ */ jsxs18("div", { className: "mb-lifecycle-correction-reason", role: "alert", children: [
|
|
6620
|
+
summary.code ? /* @__PURE__ */ jsxs18("div", { className: "mb-lifecycle-correction-reason-code", children: [
|
|
6621
|
+
/* @__PURE__ */ jsx18("span", { children: "Rejection code" }),
|
|
6622
|
+
/* @__PURE__ */ jsx18("code", { children: summary.code }),
|
|
6623
|
+
summary.clearinghouseDetail ? /* @__PURE__ */ jsxs18("small", { children: [
|
|
6624
|
+
/* @__PURE__ */ jsx18("span", { children: "Clearinghouse detail" }),
|
|
6435
6625
|
summary.clearinghouseDetail
|
|
6436
6626
|
] }) : null
|
|
6437
6627
|
] }) : null,
|
|
6438
|
-
/* @__PURE__ */
|
|
6439
|
-
/* @__PURE__ */
|
|
6440
|
-
/* @__PURE__ */
|
|
6628
|
+
/* @__PURE__ */ jsxs18("div", { className: "mb-lifecycle-correction-reason-description", children: [
|
|
6629
|
+
/* @__PURE__ */ jsx18("span", { children: "Reason" }),
|
|
6630
|
+
/* @__PURE__ */ jsx18("strong", { children: summary.description })
|
|
6441
6631
|
] }),
|
|
6442
|
-
details.length ? /* @__PURE__ */
|
|
6443
|
-
issue.code ? /* @__PURE__ */
|
|
6444
|
-
/* @__PURE__ */
|
|
6632
|
+
details.length ? /* @__PURE__ */ jsx18("ul", { "aria-label": "Additional rejection details", children: details.map((issue, index) => /* @__PURE__ */ jsxs18("li", { children: [
|
|
6633
|
+
issue.code ? /* @__PURE__ */ jsx18("code", { children: issue.code }) : null,
|
|
6634
|
+
/* @__PURE__ */ jsx18("span", { children: issue.description })
|
|
6445
6635
|
] }, `${issue.code || "issue"}-${index}`)) }) : null
|
|
6446
6636
|
] });
|
|
6447
6637
|
}
|
|
@@ -6482,16 +6672,16 @@ function CorrectionVerificationContact({ delivery }) {
|
|
|
6482
6672
|
{ label: "Mail", values: mailingAddresses }
|
|
6483
6673
|
].filter((method) => method.values.length);
|
|
6484
6674
|
if (!methods.length) return null;
|
|
6485
|
-
return /* @__PURE__ */
|
|
6486
|
-
/* @__PURE__ */
|
|
6487
|
-
/* @__PURE__ */
|
|
6675
|
+
return /* @__PURE__ */ jsxs18("aside", { className: "mb-lifecycle-correction-contact", children: [
|
|
6676
|
+
/* @__PURE__ */ jsx18("strong", { children: "Need to verify the rejected information?" }),
|
|
6677
|
+
/* @__PURE__ */ jsxs18("span", { children: [
|
|
6488
6678
|
"Contact ",
|
|
6489
6679
|
delivery.payerName,
|
|
6490
6680
|
" using any available method:"
|
|
6491
6681
|
] }),
|
|
6492
|
-
/* @__PURE__ */
|
|
6493
|
-
/* @__PURE__ */
|
|
6494
|
-
/* @__PURE__ */
|
|
6682
|
+
/* @__PURE__ */ jsx18("dl", { children: methods.map((method) => /* @__PURE__ */ jsxs18("div", { children: [
|
|
6683
|
+
/* @__PURE__ */ jsx18("dt", { children: method.label }),
|
|
6684
|
+
/* @__PURE__ */ jsx18("dd", { children: /* @__PURE__ */ jsx18("ul", { children: method.values.map((value) => /* @__PURE__ */ jsx18("li", { children: method.href ? /* @__PURE__ */ jsx18("a", { href: method.href(value), ...method.label === "Portal" ? { target: "_blank", rel: "noreferrer" } : {}, children: value }) : value }, value)) }) })
|
|
6495
6685
|
] }, method.label)) })
|
|
6496
6686
|
] });
|
|
6497
6687
|
}
|
|
@@ -6585,6 +6775,7 @@ function actionPanel(action) {
|
|
|
6585
6775
|
if (action.id === "resubmit") return "resubmit";
|
|
6586
6776
|
if (action.id === "submit_new_bill") return "submit_new_bill";
|
|
6587
6777
|
if (action.id === "second_review") return "second_review";
|
|
6778
|
+
if (action.id === "independent_bill_review") return "ibr";
|
|
6588
6779
|
if (action.id === "post_payment") return "payment";
|
|
6589
6780
|
if (action.id === "close") return "close";
|
|
6590
6781
|
if (action.id === "reopen") return "reopen";
|
|
@@ -6609,22 +6800,22 @@ function shouldShowSandboxControls(environment, enabled = false) {
|
|
|
6609
6800
|
function ConnectedBillLifecycle({ appearance, actorName, claimsAdministratorHint, claimsAdministratorSources, courtesyCopyRecipientOptions: courtesyCopyRecipientOptions2 = [], sandboxControls = false, className, style, loadingFallback, errorFallback, onChanged, ...options }) {
|
|
6610
6801
|
const lifecycle = useBillLifecycle(options);
|
|
6611
6802
|
const { data } = lifecycle;
|
|
6612
|
-
const [tab, setTab] =
|
|
6613
|
-
const [selectedSubmissionId, setSelectedSubmissionId] =
|
|
6614
|
-
const [panel, setPanel] =
|
|
6615
|
-
const [notice, setNotice] =
|
|
6616
|
-
const [note, setNote] =
|
|
6617
|
-
const [reason, setReason] =
|
|
6618
|
-
const [correctionError, setCorrectionError] =
|
|
6619
|
-
const [newBillError, setNewBillError] =
|
|
6620
|
-
const [payment, setPayment] =
|
|
6621
|
-
const [duplicateError, setDuplicateError] =
|
|
6803
|
+
const [tab, setTab] = useState14("details");
|
|
6804
|
+
const [selectedSubmissionId, setSelectedSubmissionId] = useState14();
|
|
6805
|
+
const [panel, setPanel] = useState14("");
|
|
6806
|
+
const [notice, setNotice] = useState14("");
|
|
6807
|
+
const [note, setNote] = useState14("");
|
|
6808
|
+
const [reason, setReason] = useState14("");
|
|
6809
|
+
const [correctionError, setCorrectionError] = useState14("");
|
|
6810
|
+
const [newBillError, setNewBillError] = useState14("");
|
|
6811
|
+
const [payment, setPayment] = useState14({ amount: 0, penaltyAmount: 0, interestAmount: 0, method: "check", checkNumber: "", depositDate: today(), note: "" });
|
|
6812
|
+
const [duplicateError, setDuplicateError] = useState14("");
|
|
6622
6813
|
const currentAttemptKey = data?.attempts?.find((attempt) => attempt.isCurrent)?.id ?? data?.history?.filter((entry) => entry.kind === "submission").at(-1)?.id ?? data?.bill.id;
|
|
6623
|
-
|
|
6814
|
+
useEffect12(() => {
|
|
6624
6815
|
setPanel("");
|
|
6625
6816
|
}, [currentAttemptKey]);
|
|
6626
6817
|
const actor = actorName?.trim() ? { actorName: actorName.trim() } : {};
|
|
6627
|
-
const lastData =
|
|
6818
|
+
const lastData = useRef8(null);
|
|
6628
6819
|
const correctionInitialBill = useMemo9(() => data ? correctionBill(data) : null, [data]);
|
|
6629
6820
|
const correctionAttachments = useMemo9(() => data ? data.bill.attachments.map((attachment) => {
|
|
6630
6821
|
const documentType = correctionDocumentType(attachment.documentType);
|
|
@@ -6640,7 +6831,7 @@ function ConnectedBillLifecycle({ appearance, actorName, claimsAdministratorHint
|
|
|
6640
6831
|
};
|
|
6641
6832
|
}) : [], [data, lifecycle]);
|
|
6642
6833
|
const correctionAttentionFields = useMemo9(() => data?.rejection?.issues?.flatMap((issue) => issue.fieldPaths || []).filter((path, index, fields) => fields.indexOf(path) === index) || [], [data]);
|
|
6643
|
-
|
|
6834
|
+
useEffect12(() => {
|
|
6644
6835
|
if (!data || data === lastData.current) return;
|
|
6645
6836
|
lastData.current = data;
|
|
6646
6837
|
onChanged?.(data);
|
|
@@ -6652,13 +6843,13 @@ function ConnectedBillLifecycle({ appearance, actorName, claimsAdministratorHint
|
|
|
6652
6843
|
interestAmount: 0
|
|
6653
6844
|
}));
|
|
6654
6845
|
}, [data, onChanged]);
|
|
6655
|
-
if (lifecycle.isLoading && !data) return /* @__PURE__ */
|
|
6846
|
+
if (lifecycle.isLoading && !data) return /* @__PURE__ */ jsx18(Fragment15, { children: loadingFallback ?? /* @__PURE__ */ jsx18("div", { className: "mb-lifecycle-loading", children: "Loading bill\u2026" }) });
|
|
6656
6847
|
if (!data) {
|
|
6657
6848
|
const error = lifecycle.error ?? new Error("Bill could not be loaded.");
|
|
6658
|
-
return /* @__PURE__ */
|
|
6659
|
-
/* @__PURE__ */
|
|
6660
|
-
/* @__PURE__ */
|
|
6661
|
-
/* @__PURE__ */
|
|
6849
|
+
return /* @__PURE__ */ jsx18(Fragment15, { children: errorFallback?.(error, lifecycle.refresh) ?? /* @__PURE__ */ jsxs18("div", { className: "mb-lifecycle-error", role: "alert", children: [
|
|
6850
|
+
/* @__PURE__ */ jsx18("strong", { children: "Billing is unavailable." }),
|
|
6851
|
+
/* @__PURE__ */ jsx18("span", { children: error.message }),
|
|
6852
|
+
/* @__PURE__ */ jsx18("button", { type: "button", onClick: () => void lifecycle.refresh(), children: "Try again" })
|
|
6662
6853
|
] }) });
|
|
6663
6854
|
}
|
|
6664
6855
|
const complete = async (message, task) => {
|
|
@@ -6765,7 +6956,7 @@ function ConnectedBillLifecycle({ appearance, actorName, claimsAdministratorHint
|
|
|
6765
6956
|
setNotice("Duplicate bill sent.");
|
|
6766
6957
|
};
|
|
6767
6958
|
const viewEor = data.lifecycle.actions.find((action) => action.id === "view_eor" && action.enabled);
|
|
6768
|
-
const supportedActions = /* @__PURE__ */ new Set(["resubmit", "submit_new_bill", "second_review", "post_payment", "close", "reopen", "send_duplicate", "report_bill_status"]);
|
|
6959
|
+
const supportedActions = /* @__PURE__ */ new Set(["resubmit", "submit_new_bill", "second_review", "independent_bill_review", "post_payment", "close", "reopen", "send_duplicate", "report_bill_status"]);
|
|
6769
6960
|
const actions = data.lifecycle.actions.filter((action) => action.enabled && supportedActions.has(action.id));
|
|
6770
6961
|
const mappedRibbonItems = data.history ? billSubmissionsRibbonFromHistory(data.history, data.attempts) : [];
|
|
6771
6962
|
const activeSubmissionId = (mappedRibbonItems.some((item) => item.id === selectedSubmissionId) ? selectedSubmissionId : null) ?? mappedRibbonItems.find((item) => item.active)?.id ?? mappedRibbonItems[mappedRibbonItems.length - 1]?.id;
|
|
@@ -6781,111 +6972,121 @@ function ConnectedBillLifecycle({ appearance, actorName, claimsAdministratorHint
|
|
|
6781
6972
|
const statusContacts = reportBillStatusContacts(data.delivery);
|
|
6782
6973
|
const receiptEntries = (data.history ?? []).filter((entry) => entry.kind === "submission" || entry.kind === "ack");
|
|
6783
6974
|
const reviewDeadline = secondReviewDeadline(data.eors);
|
|
6784
|
-
return /* @__PURE__ */
|
|
6785
|
-
/* @__PURE__ */
|
|
6786
|
-
ribbonItems.length >= 2 ? /* @__PURE__ */
|
|
6975
|
+
return /* @__PURE__ */ jsxs18("section", { className: ["mb-connected-lifecycle", className].filter(Boolean).join(" "), style: mindBillAppearanceStyle(appearance, style), children: [
|
|
6976
|
+
/* @__PURE__ */ jsx18("style", { children: CONNECTED_LIFECYCLE_STYLES }),
|
|
6977
|
+
ribbonItems.length >= 2 ? /* @__PURE__ */ jsx18(BillSubmissionsRibbon, { items: ribbonItems, onSelect: (item) => {
|
|
6787
6978
|
setSelectedSubmissionId(item.id);
|
|
6788
6979
|
setTab("details");
|
|
6789
6980
|
setPanel("");
|
|
6790
6981
|
}, ...appearance ? { appearance } : {} }) : null,
|
|
6791
|
-
historical ? null : data.lifecycle.state.toLowerCase() === "rejected" && data.rejection ? /* @__PURE__ */
|
|
6792
|
-
/* @__PURE__ */
|
|
6793
|
-
/* @__PURE__ */
|
|
6794
|
-
/* @__PURE__ */
|
|
6795
|
-
/* @__PURE__ */
|
|
6982
|
+
historical ? null : data.lifecycle.state.toLowerCase() === "rejected" && data.rejection ? /* @__PURE__ */ jsx18(BillRejectionNotice, { rejection: data.rejection, submittedAt: data.lifecycle.submittedAt ?? null, ...appearance ? { appearance } : {} }) : /* @__PURE__ */ jsx18(BillLifecycleProgress, { state: data.lifecycle.state, nativeStatus: data.lifecycle.nativeStatus, submittedAt: data.lifecycle.submittedAt ?? null, agingDays: data.lifecycle.agingDays ?? null, ...appearance ? { appearance } : {} }),
|
|
6983
|
+
/* @__PURE__ */ jsxs18("header", { className: "mb-lifecycle-head", children: [
|
|
6984
|
+
/* @__PURE__ */ jsxs18("div", { children: [
|
|
6985
|
+
/* @__PURE__ */ jsx18("div", { className: "mb-lifecycle-title", children: /* @__PURE__ */ jsx18("h2", { children: historical && !selectedAttempt ? "Previous submission" : `Bill #${historical ? selectedAttempt?.billNumber : data.bill.billNumber}` }) }),
|
|
6986
|
+
/* @__PURE__ */ jsxs18("p", { children: [
|
|
6796
6987
|
displayedData ? `Claim ${displayedData.injury.claimNumber || "\u2014"}` : "Previous submission",
|
|
6797
6988
|
lifecycle.isRefreshing ? " \xB7 Refreshing\u2026" : ""
|
|
6798
6989
|
] })
|
|
6799
6990
|
] }),
|
|
6800
|
-
!historical ? /* @__PURE__ */
|
|
6801
|
-
/* @__PURE__ */
|
|
6802
|
-
/* @__PURE__ */
|
|
6991
|
+
!historical ? /* @__PURE__ */ jsxs18(Fragment15, { children: [
|
|
6992
|
+
/* @__PURE__ */ jsx18("button", { type: "button", className: "mb-lifecycle-button primary", disabled: lifecycle.isMutating, onClick: () => void lifecycle.downloadPacket().catch(() => void 0), children: "Download packet" }),
|
|
6993
|
+
/* @__PURE__ */ jsx18("button", { type: "button", className: "mb-lifecycle-button secondary", disabled: lifecycle.isMutating, onClick: () => setPanel("courtesy_copy"), children: "Forward copy" })
|
|
6803
6994
|
] }) : null
|
|
6804
6995
|
] }),
|
|
6805
|
-
/* @__PURE__ */
|
|
6806
|
-
/* @__PURE__ */
|
|
6807
|
-
/* @__PURE__ */
|
|
6996
|
+
/* @__PURE__ */ jsxs18("div", { className: "mb-lifecycle-tabs", role: "tablist", "aria-label": "Bill view", children: [
|
|
6997
|
+
/* @__PURE__ */ jsx18("button", { type: "button", role: "tab", "aria-selected": tab === "details", onClick: () => setTab("details"), children: "Bill details" }),
|
|
6998
|
+
/* @__PURE__ */ jsx18("button", { type: "button", role: "tab", "aria-selected": tab === "history", onClick: () => setTab("history"), children: "Bill history" })
|
|
6808
6999
|
] }),
|
|
6809
|
-
tab === "details" ? /* @__PURE__ */
|
|
6810
|
-
selectedAttempt && ribbonItems.length >= 2 ? /* @__PURE__ */
|
|
6811
|
-
/* @__PURE__ */
|
|
6812
|
-
/* @__PURE__ */
|
|
6813
|
-
/* @__PURE__ */
|
|
6814
|
-
/* @__PURE__ */
|
|
7000
|
+
tab === "details" ? /* @__PURE__ */ jsxs18("div", { className: "mb-lifecycle-tabpanel", role: "tabpanel", children: [
|
|
7001
|
+
selectedAttempt && ribbonItems.length >= 2 ? /* @__PURE__ */ jsxs18("section", { className: "mb-lifecycle-attempt-detail", "aria-label": "Selected submission detail", children: [
|
|
7002
|
+
/* @__PURE__ */ jsxs18("header", { children: [
|
|
7003
|
+
/* @__PURE__ */ jsxs18("div", { children: [
|
|
7004
|
+
/* @__PURE__ */ jsx18("span", { children: "Selected submission" }),
|
|
7005
|
+
/* @__PURE__ */ jsx18("h3", { children: selectedAttempt.label })
|
|
6815
7006
|
] }),
|
|
6816
|
-
/* @__PURE__ */
|
|
7007
|
+
/* @__PURE__ */ jsx18("strong", { children: selectedAttempt.isCurrent ? "Current" : "Previous" })
|
|
6817
7008
|
] }),
|
|
6818
|
-
/* @__PURE__ */
|
|
6819
|
-
/* @__PURE__ */
|
|
6820
|
-
/* @__PURE__ */
|
|
6821
|
-
/* @__PURE__ */
|
|
7009
|
+
/* @__PURE__ */ jsxs18("dl", { children: [
|
|
7010
|
+
/* @__PURE__ */ jsxs18("div", { children: [
|
|
7011
|
+
/* @__PURE__ */ jsx18("dt", { children: "Bill" }),
|
|
7012
|
+
/* @__PURE__ */ jsxs18("dd", { children: [
|
|
6822
7013
|
"#",
|
|
6823
7014
|
selectedAttempt.billNumber || data.bill.billNumber
|
|
6824
7015
|
] })
|
|
6825
7016
|
] }),
|
|
6826
|
-
/* @__PURE__ */
|
|
6827
|
-
/* @__PURE__ */
|
|
6828
|
-
/* @__PURE__ */
|
|
7017
|
+
/* @__PURE__ */ jsxs18("div", { children: [
|
|
7018
|
+
/* @__PURE__ */ jsx18("dt", { children: "Delivery" }),
|
|
7019
|
+
/* @__PURE__ */ jsx18("dd", { children: selectedAttempt.deliveryLabel || "\u2014" })
|
|
6829
7020
|
] }),
|
|
6830
|
-
/* @__PURE__ */
|
|
6831
|
-
/* @__PURE__ */
|
|
6832
|
-
/* @__PURE__ */
|
|
7021
|
+
/* @__PURE__ */ jsxs18("div", { children: [
|
|
7022
|
+
/* @__PURE__ */ jsx18("dt", { children: "Sent" }),
|
|
7023
|
+
/* @__PURE__ */ jsx18("dd", { children: selectedAttempt.sentAt ? new Date(selectedAttempt.sentAt).toLocaleString() : "\u2014" })
|
|
6833
7024
|
] }),
|
|
6834
|
-
/* @__PURE__ */
|
|
6835
|
-
/* @__PURE__ */
|
|
6836
|
-
/* @__PURE__ */
|
|
7025
|
+
/* @__PURE__ */ jsxs18("div", { children: [
|
|
7026
|
+
/* @__PURE__ */ jsx18("dt", { children: "Status" }),
|
|
7027
|
+
/* @__PURE__ */ jsx18("dd", { children: selectedAttempt.status || selectedAttempt.ackLabel || "Submitted" })
|
|
6837
7028
|
] }),
|
|
6838
|
-
selectedAttempt.complianceLabel ? /* @__PURE__ */
|
|
6839
|
-
/* @__PURE__ */
|
|
6840
|
-
/* @__PURE__ */
|
|
7029
|
+
selectedAttempt.complianceLabel ? /* @__PURE__ */ jsxs18("div", { children: [
|
|
7030
|
+
/* @__PURE__ */ jsx18("dt", { children: selectedAttempt.complianceLabel }),
|
|
7031
|
+
/* @__PURE__ */ jsx18("dd", { children: selectedAttempt.complianceAt ? new Date(selectedAttempt.complianceAt).toLocaleDateString() : "\u2014" })
|
|
6841
7032
|
] }) : null
|
|
6842
7033
|
] })
|
|
6843
7034
|
] }) : null,
|
|
6844
|
-
!historical && (data.eors.length || data.payments.length || ["processed", "denied", "partially_paid"].includes(data.lifecycle.state)) ? /* @__PURE__ */
|
|
6845
|
-
showSandboxControls ? /* @__PURE__ */
|
|
6846
|
-
/* @__PURE__ */
|
|
6847
|
-
/* @__PURE__ */
|
|
6848
|
-
/* @__PURE__ */
|
|
6849
|
-
/* @__PURE__ */
|
|
7035
|
+
!historical && (data.eors.length || data.payments.length || ["processed", "denied", "partially_paid"].includes(data.lifecycle.state)) ? /* @__PURE__ */ jsx18(BillExplanationOfReview, { remittance: data.remittance, eors: data.eors, payments: data.payments, submittedAt: data.lifecycle.submittedAt ?? null, onOpenEor: lifecycle.openEor, ...appearance ? { appearance } : {} }) : null,
|
|
7036
|
+
showSandboxControls ? /* @__PURE__ */ jsxs18("section", { className: "mb-lifecycle-simulator", "aria-label": "Sandbox lifecycle simulator", children: [
|
|
7037
|
+
/* @__PURE__ */ jsxs18("div", { children: [
|
|
7038
|
+
/* @__PURE__ */ jsx18("span", { children: "Sandbox demo controls" }),
|
|
7039
|
+
/* @__PURE__ */ jsx18("h3", { children: "Simulate the next payer response" }),
|
|
7040
|
+
/* @__PURE__ */ jsx18("p", { children: "This changes sandbox data only. The host receives the result through the same lifecycle API and components partners use." })
|
|
6850
7041
|
] }),
|
|
6851
|
-
simulations.length ? /* @__PURE__ */
|
|
6852
|
-
/* @__PURE__ */
|
|
6853
|
-
/* @__PURE__ */
|
|
6854
|
-
] }, scenario.id)) }) : /* @__PURE__ */
|
|
7042
|
+
simulations.length ? /* @__PURE__ */ jsx18("div", { className: "mb-lifecycle-simulator-actions", children: simulations.map((scenario) => /* @__PURE__ */ jsxs18("button", { type: "button", disabled: lifecycle.isMutating, onClick: () => void complete(`${scenario.label} simulated.`, () => lifecycle.simulateSandbox({ scenario: scenario.id })), children: [
|
|
7043
|
+
/* @__PURE__ */ jsx18("strong", { children: scenario.label }),
|
|
7044
|
+
/* @__PURE__ */ jsx18("span", { children: scenario.detail })
|
|
7045
|
+
] }, scenario.id)) }) : /* @__PURE__ */ jsx18("p", { className: "mb-lifecycle-simulator-idle", children: "No simulated payer transition is needed at this stage. Use the bill action below to continue." })
|
|
7046
|
+
] }) : null,
|
|
7047
|
+
historical ? /* @__PURE__ */ jsx18("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,
|
|
7048
|
+
displayedData ? /* @__PURE__ */ jsx18(BillReadOnlyForm, { data: displayedData, ...!historical ? { onOpenAttachment: lifecycle.openAttachment } : {}, ...appearance ? { appearance } : {} }, activeSubmissionId) : null,
|
|
7049
|
+
historical && selectedAttempt ? /* @__PURE__ */ jsxs18("section", { className: "mb-lifecycle-card", "aria-label": "Retained submission files", children: [
|
|
7050
|
+
/* @__PURE__ */ jsx18("h3", { children: "Retained submission files" }),
|
|
7051
|
+
/* @__PURE__ */ jsx18("p", { children: "Exact files saved for this submission. These downloads do not include a regenerated current bill or a later EOR." }),
|
|
7052
|
+
selectedDetail?.artifacts?.length ? selectedDetail.artifacts.map((artifact) => /* @__PURE__ */ jsxs18("button", { type: "button", className: "mb-lifecycle-button secondary", onClick: () => void lifecycle.downloadSubmissionArtifact(selectedAttempt.id, artifact.id, artifact.label).catch(() => void 0), children: [
|
|
7053
|
+
"Download ",
|
|
7054
|
+
artifact.kind === "submitted_edi" ? "submitted EDI" : "submitted attachment",
|
|
7055
|
+
": ",
|
|
7056
|
+
artifact.label
|
|
7057
|
+
] }, artifact.id)) : /* @__PURE__ */ jsx18("p", { children: "No retained files are available for this submission." })
|
|
6855
7058
|
] }) : null,
|
|
6856
|
-
historical ? /* @__PURE__ */
|
|
6857
|
-
|
|
6858
|
-
|
|
6859
|
-
|
|
6860
|
-
|
|
6861
|
-
/* @__PURE__ */ jsx17("h3", { children: "Team notes" }),
|
|
6862
|
-
/* @__PURE__ */ jsx17("p", { children: "Shared with your workspace\u2019s billing team. Never sent to the payer." })
|
|
7059
|
+
!historical ? /* @__PURE__ */ jsxs18("section", { className: "mb-lifecycle-notes", "aria-label": "Bill notes", children: [
|
|
7060
|
+
/* @__PURE__ */ jsxs18("header", { children: [
|
|
7061
|
+
/* @__PURE__ */ jsxs18("div", { children: [
|
|
7062
|
+
/* @__PURE__ */ jsx18("h3", { children: "Team notes" }),
|
|
7063
|
+
/* @__PURE__ */ jsx18("p", { children: "Shared with your workspace\u2019s billing team. Never sent to the payer." })
|
|
6863
7064
|
] }),
|
|
6864
|
-
/* @__PURE__ */
|
|
7065
|
+
/* @__PURE__ */ jsx18("span", { children: billNotes.length })
|
|
6865
7066
|
] }),
|
|
6866
|
-
billNotes.length ? /* @__PURE__ */
|
|
6867
|
-
/* @__PURE__ */
|
|
6868
|
-
/* @__PURE__ */
|
|
7067
|
+
billNotes.length ? /* @__PURE__ */ jsx18("ol", { children: billNotes.map((entry) => /* @__PURE__ */ jsxs18("li", { children: [
|
|
7068
|
+
/* @__PURE__ */ jsx18("p", { children: entry.summary }),
|
|
7069
|
+
/* @__PURE__ */ jsxs18("small", { children: [
|
|
6869
7070
|
entry.actor || "System",
|
|
6870
7071
|
" \xB7 ",
|
|
6871
7072
|
usDate(entry.date)
|
|
6872
7073
|
] })
|
|
6873
|
-
] }, entry.id)) }) : /* @__PURE__ */
|
|
6874
|
-
/* @__PURE__ */
|
|
7074
|
+
] }, entry.id)) }) : /* @__PURE__ */ jsx18("p", { className: "mb-lifecycle-notes-empty", children: "No notes yet." }),
|
|
7075
|
+
/* @__PURE__ */ jsxs18("form", { onSubmit: (event) => {
|
|
6875
7076
|
event.preventDefault();
|
|
6876
7077
|
void addNote();
|
|
6877
7078
|
}, children: [
|
|
6878
|
-
/* @__PURE__ */
|
|
6879
|
-
/* @__PURE__ */
|
|
6880
|
-
/* @__PURE__ */
|
|
7079
|
+
/* @__PURE__ */ jsxs18("label", { children: [
|
|
7080
|
+
/* @__PURE__ */ jsx18("span", { children: "Add a note" }),
|
|
7081
|
+
/* @__PURE__ */ jsx18("textarea", { value: note, maxLength: 2e3, placeholder: "Add context for the billing team\u2026", onChange: (event) => setNote(event.target.value) })
|
|
6881
7082
|
] }),
|
|
6882
|
-
/* @__PURE__ */
|
|
7083
|
+
/* @__PURE__ */ jsx18("button", { type: "submit", className: "mb-lifecycle-button primary", disabled: lifecycle.isMutating || !note.trim(), children: lifecycle.isMutating ? "Adding\u2026" : "Add note" })
|
|
6883
7084
|
] })
|
|
6884
7085
|
] }) : null
|
|
6885
|
-
] }) : /* @__PURE__ */
|
|
6886
|
-
!historical && (viewEor || actions.length) ? /* @__PURE__ */
|
|
6887
|
-
viewEor && data.eors[0] ? /* @__PURE__ */
|
|
6888
|
-
actions.map((action) => /* @__PURE__ */
|
|
7086
|
+
] }) : /* @__PURE__ */ jsx18("div", { className: "mb-lifecycle-tabpanel", role: "tabpanel", children: data.history?.length ? /* @__PURE__ */ jsx18(BillHistoryTable, { entries: data.history, ...!historical ? { onOpenDocument: lifecycle.openAttachment } : {}, ...appearance ? { appearance } : {} }) : /* @__PURE__ */ jsx18(BillActivityTimeline, { events: data.activity, ...appearance ? { appearance } : {} }) }),
|
|
7087
|
+
!historical && (viewEor || actions.length) ? /* @__PURE__ */ jsxs18("aside", { className: "mb-lifecycle-actions-sheet", "aria-label": "Bill actions", children: [
|
|
7088
|
+
viewEor && data.eors[0] ? /* @__PURE__ */ jsx18("button", { type: "button", className: "mb-lifecycle-button secondary", onClick: () => void lifecycle.openEor(data.eors[0]).catch(() => void 0), children: viewEor.label }) : null,
|
|
7089
|
+
actions.map((action) => /* @__PURE__ */ jsx18("button", { type: "button", className: action.primary ? "mb-lifecycle-button primary" : "mb-lifecycle-button secondary", onClick: () => {
|
|
6889
7090
|
const next = actionPanel(action);
|
|
6890
7091
|
if (!next) return;
|
|
6891
7092
|
if (next === "resubmit") setCorrectionError("");
|
|
@@ -6894,25 +7095,37 @@ function ConnectedBillLifecycle({ appearance, actorName, claimsAdministratorHint
|
|
|
6894
7095
|
setPanel(next);
|
|
6895
7096
|
}, children: action.label }, action.id))
|
|
6896
7097
|
] }) : null,
|
|
6897
|
-
activePanel === "courtesy_copy" ? /* @__PURE__ */
|
|
7098
|
+
activePanel === "courtesy_copy" ? /* @__PURE__ */ jsx18(LifecycleDialog, { title: "Forward courtesy copy", wide: true, onClose: () => setPanel(""), children: /* @__PURE__ */ jsx18(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: () => {
|
|
6898
7099
|
void lifecycle.refresh();
|
|
6899
7100
|
}, ...appearance ? { appearance } : {} }) }) : null,
|
|
6900
|
-
activePanel === "
|
|
6901
|
-
/* @__PURE__ */
|
|
6902
|
-
|
|
6903
|
-
|
|
7101
|
+
activePanel === "ibr" ? /* @__PURE__ */ jsx18(LifecycleDialog, { title: "Prepare Independent Bill Review packet", onClose: () => setPanel(""), children: /* @__PURE__ */ jsxs18("section", { className: "mb-lifecycle-panel", children: [
|
|
7102
|
+
/* @__PURE__ */ jsx18("header", { style: { paddingRight: 44 }, children: /* @__PURE__ */ jsx18("h3", { children: "Prepare Independent Bill Review packet" }) }),
|
|
7103
|
+
/* @__PURE__ */ jsx18("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." }),
|
|
7104
|
+
lifecycle.error ? /* @__PURE__ */ jsx18("p", { role: "alert", className: "mb-lifecycle-message error", children: lifecycle.error.message }) : null,
|
|
7105
|
+
/* @__PURE__ */ jsxs18("div", { className: "mb-lifecycle-panel-actions", children: [
|
|
7106
|
+
/* @__PURE__ */ jsx18("button", { type: "button", className: "mb-lifecycle-button secondary", disabled: lifecycle.isMutating, onClick: () => setPanel(""), children: "Cancel" }),
|
|
7107
|
+
/* @__PURE__ */ jsx18("button", { type: "button", className: "mb-lifecycle-button primary", disabled: lifecycle.isMutating, onClick: () => void lifecycle.downloadIbrPacket().then(() => {
|
|
7108
|
+
setPanel("");
|
|
7109
|
+
setNotice("IBR packet prepared for self-filing. The review has not been filed.");
|
|
7110
|
+
}).catch(() => void 0), children: lifecycle.isMutating ? "Preparing\u2026" : "Prepare IBR packet" })
|
|
7111
|
+
] })
|
|
7112
|
+
] }) }) : null,
|
|
7113
|
+
activePanel === "resubmit" && correctionInitialBill ? /* @__PURE__ */ jsx18(LifecycleDialog, { title: "Correct and resubmit", wide: true, onClose: () => setPanel(""), children: /* @__PURE__ */ jsxs18("section", { className: "mb-lifecycle-correction", children: [
|
|
7114
|
+
/* @__PURE__ */ jsx18("header", { children: /* @__PURE__ */ jsxs18("div", { children: [
|
|
7115
|
+
/* @__PURE__ */ jsx18("h3", { children: "Correct and resubmit" }),
|
|
7116
|
+
/* @__PURE__ */ jsx18("p", { children: "Review the rejected snapshot, correct the highlighted information, and submit a new immutable attempt under this bill." })
|
|
6904
7117
|
] }) }),
|
|
6905
|
-
data.environment === "live" ? /* @__PURE__ */
|
|
6906
|
-
/* @__PURE__ */
|
|
6907
|
-
/* @__PURE__ */
|
|
7118
|
+
data.environment === "live" ? /* @__PURE__ */ jsxs18("div", { className: "mb-lifecycle-live-warning", children: [
|
|
7119
|
+
/* @__PURE__ */ jsx18("strong", { children: "Live clearinghouse submission" }),
|
|
7120
|
+
/* @__PURE__ */ jsx18("span", { children: "Resubmitting sends a real bill. Confirm the corrected information before continuing." })
|
|
6908
7121
|
] }) : null,
|
|
6909
|
-
data.rejection ? /* @__PURE__ */
|
|
6910
|
-
/* @__PURE__ */
|
|
6911
|
-
/* @__PURE__ */
|
|
6912
|
-
/* @__PURE__ */
|
|
6913
|
-
/* @__PURE__ */
|
|
7122
|
+
data.rejection ? /* @__PURE__ */ jsx18(CorrectionRejectionReason, { rejection: data.rejection }) : null,
|
|
7123
|
+
/* @__PURE__ */ jsx18(CorrectionVerificationContact, { delivery: data.delivery }),
|
|
7124
|
+
/* @__PURE__ */ jsxs18("label", { className: "mb-lifecycle-correction-note", children: [
|
|
7125
|
+
/* @__PURE__ */ jsx18("span", { children: "Correction note (optional)" }),
|
|
7126
|
+
/* @__PURE__ */ jsx18("textarea", { value: reason, placeholder: "What changed before resubmission?", onChange: (event) => setReason(event.target.value) })
|
|
6914
7127
|
] }),
|
|
6915
|
-
/* @__PURE__ */
|
|
7128
|
+
/* @__PURE__ */ jsx18(
|
|
6916
7129
|
BillSubmissionForm,
|
|
6917
7130
|
{
|
|
6918
7131
|
className: "mbsf-lifecycle-correction",
|
|
@@ -6938,18 +7151,18 @@ function ConnectedBillLifecycle({ appearance, actorName, claimsAdministratorHint
|
|
|
6938
7151
|
...appearance ? { appearance } : {}
|
|
6939
7152
|
}
|
|
6940
7153
|
),
|
|
6941
|
-
correctionError ? /* @__PURE__ */
|
|
7154
|
+
correctionError ? /* @__PURE__ */ jsx18("div", { className: "mb-lifecycle-message error", role: "alert", children: correctionError }) : null
|
|
6942
7155
|
] }) }) : null,
|
|
6943
|
-
activePanel === "submit_new_bill" && correctionInitialBill ? /* @__PURE__ */
|
|
6944
|
-
/* @__PURE__ */
|
|
6945
|
-
/* @__PURE__ */
|
|
6946
|
-
/* @__PURE__ */
|
|
7156
|
+
activePanel === "submit_new_bill" && correctionInitialBill ? /* @__PURE__ */ jsx18(LifecycleDialog, { title: "Submit New Bill", wide: true, onClose: () => setPanel(""), children: /* @__PURE__ */ jsxs18("section", { className: "mb-lifecycle-correction", children: [
|
|
7157
|
+
/* @__PURE__ */ jsx18("header", { children: /* @__PURE__ */ jsxs18("div", { children: [
|
|
7158
|
+
/* @__PURE__ */ jsx18("h3", { children: "Submit New Bill" }),
|
|
7159
|
+
/* @__PURE__ */ jsx18("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." })
|
|
6947
7160
|
] }) }),
|
|
6948
|
-
/* @__PURE__ */
|
|
6949
|
-
/* @__PURE__ */
|
|
6950
|
-
/* @__PURE__ */
|
|
7161
|
+
/* @__PURE__ */ jsxs18("label", { className: "mb-lifecycle-correction-note", children: [
|
|
7162
|
+
/* @__PURE__ */ jsx18("span", { children: "Submission note (optional)" }),
|
|
7163
|
+
/* @__PURE__ */ jsx18("textarea", { value: reason, placeholder: "Why is a new bill being submitted?", onChange: (event) => setReason(event.target.value) })
|
|
6951
7164
|
] }),
|
|
6952
|
-
/* @__PURE__ */
|
|
7165
|
+
/* @__PURE__ */ jsx18(
|
|
6953
7166
|
BillSubmissionForm,
|
|
6954
7167
|
{
|
|
6955
7168
|
className: "mbsf-lifecycle-correction",
|
|
@@ -6974,10 +7187,10 @@ function ConnectedBillLifecycle({ appearance, actorName, claimsAdministratorHint
|
|
|
6974
7187
|
...appearance ? { appearance } : {}
|
|
6975
7188
|
}
|
|
6976
7189
|
),
|
|
6977
|
-
newBillError ? /* @__PURE__ */
|
|
7190
|
+
newBillError ? /* @__PURE__ */ jsx18("div", { className: "mb-lifecycle-message error", role: "alert", children: newBillError }) : null
|
|
6978
7191
|
] }) }) : null,
|
|
6979
|
-
activePanel === "second_review" ? /* @__PURE__ */
|
|
6980
|
-
/* @__PURE__ */
|
|
7192
|
+
activePanel === "second_review" ? /* @__PURE__ */ jsxs18(LifecycleDialog, { title: "Submit Second Review", wide: true, onClose: () => setPanel(""), children: [
|
|
7193
|
+
/* @__PURE__ */ jsx18(
|
|
6981
7194
|
SecondReviewForm,
|
|
6982
7195
|
{
|
|
6983
7196
|
data,
|
|
@@ -6990,86 +7203,86 @@ function ConnectedBillLifecycle({ appearance, actorName, claimsAdministratorHint
|
|
|
6990
7203
|
onSubmit: (input) => complete("Second Review submitted.", () => lifecycle.submitSecondReview({ ...input, ...actor }))
|
|
6991
7204
|
}
|
|
6992
7205
|
),
|
|
6993
|
-
reviewDeadline ? /* @__PURE__ */
|
|
7206
|
+
reviewDeadline ? /* @__PURE__ */ jsxs18("p", { className: "mb-lifecycle-deadline-hint", children: [
|
|
6994
7207
|
"Second Review must be requested within 90 days of the denial EOR (dated ",
|
|
6995
7208
|
usDate(reviewDeadline.eorDate),
|
|
6996
7209
|
") \u2014 file by ",
|
|
6997
|
-
/* @__PURE__ */
|
|
7210
|
+
/* @__PURE__ */ jsx18("strong", { children: usDate(reviewDeadline.deadline) }),
|
|
6998
7211
|
"."
|
|
6999
7212
|
] }) : null
|
|
7000
7213
|
] }) : null,
|
|
7001
|
-
activePanel === "payment" ? /* @__PURE__ */
|
|
7002
|
-
/* @__PURE__ */
|
|
7003
|
-
/* @__PURE__ */
|
|
7004
|
-
/* @__PURE__ */
|
|
7214
|
+
activePanel === "payment" ? /* @__PURE__ */ jsx18(LifecycleDialog, { title: "Post payment", onClose: () => setPanel(""), children: /* @__PURE__ */ jsxs18("section", { className: "mb-lifecycle-panel", children: [
|
|
7215
|
+
/* @__PURE__ */ jsxs18("div", { children: [
|
|
7216
|
+
/* @__PURE__ */ jsx18("h3", { children: "Post payment" }),
|
|
7217
|
+
/* @__PURE__ */ jsx18("p", { children: "Record a full or partial payment, plus any penalty and interest received." })
|
|
7005
7218
|
] }),
|
|
7006
|
-
/* @__PURE__ */
|
|
7007
|
-
/* @__PURE__ */
|
|
7008
|
-
/* @__PURE__ */
|
|
7009
|
-
/* @__PURE__ */
|
|
7219
|
+
/* @__PURE__ */ jsxs18("div", { className: "mb-lifecycle-fields two", children: [
|
|
7220
|
+
/* @__PURE__ */ jsxs18("label", { children: [
|
|
7221
|
+
/* @__PURE__ */ jsx18("span", { children: "Amount applied to bill" }),
|
|
7222
|
+
/* @__PURE__ */ jsx18("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) })) })
|
|
7010
7223
|
] }),
|
|
7011
|
-
/* @__PURE__ */
|
|
7012
|
-
/* @__PURE__ */
|
|
7013
|
-
/* @__PURE__ */
|
|
7224
|
+
/* @__PURE__ */ jsxs18("label", { children: [
|
|
7225
|
+
/* @__PURE__ */ jsx18("span", { children: "Penalty" }),
|
|
7226
|
+
/* @__PURE__ */ jsx18("input", { type: "number", min: "0", step: "0.01", value: payment.penaltyAmount || "", placeholder: "0.00", onChange: (event) => setPayment((current) => ({ ...current, penaltyAmount: Number(event.target.value) })) })
|
|
7014
7227
|
] }),
|
|
7015
|
-
/* @__PURE__ */
|
|
7016
|
-
/* @__PURE__ */
|
|
7017
|
-
/* @__PURE__ */
|
|
7228
|
+
/* @__PURE__ */ jsxs18("label", { children: [
|
|
7229
|
+
/* @__PURE__ */ jsx18("span", { children: "Interest" }),
|
|
7230
|
+
/* @__PURE__ */ jsx18("input", { type: "number", min: "0", step: "0.01", value: payment.interestAmount || "", placeholder: "0.00", onChange: (event) => setPayment((current) => ({ ...current, interestAmount: Number(event.target.value) })) })
|
|
7018
7231
|
] }),
|
|
7019
|
-
/* @__PURE__ */
|
|
7020
|
-
/* @__PURE__ */
|
|
7021
|
-
/* @__PURE__ */
|
|
7022
|
-
/* @__PURE__ */
|
|
7023
|
-
/* @__PURE__ */
|
|
7232
|
+
/* @__PURE__ */ jsxs18("label", { children: [
|
|
7233
|
+
/* @__PURE__ */ jsx18("span", { children: "Method" }),
|
|
7234
|
+
/* @__PURE__ */ jsxs18("select", { value: payment.method, onChange: (event) => setPayment((current) => ({ ...current, method: event.target.value })), children: [
|
|
7235
|
+
/* @__PURE__ */ jsx18("option", { value: "check", children: "Check" }),
|
|
7236
|
+
/* @__PURE__ */ jsx18("option", { value: "eft", children: "EFT" })
|
|
7024
7237
|
] })
|
|
7025
7238
|
] }),
|
|
7026
|
-
/* @__PURE__ */
|
|
7027
|
-
/* @__PURE__ */
|
|
7028
|
-
/* @__PURE__ */
|
|
7239
|
+
/* @__PURE__ */ jsxs18("label", { children: [
|
|
7240
|
+
/* @__PURE__ */ jsx18("span", { children: payment.method === "check" ? "Check number" : "EFT reference" }),
|
|
7241
|
+
/* @__PURE__ */ jsx18("input", { value: payment.checkNumber, onChange: (event) => setPayment((current) => ({ ...current, checkNumber: event.target.value })) })
|
|
7029
7242
|
] }),
|
|
7030
|
-
/* @__PURE__ */
|
|
7031
|
-
/* @__PURE__ */
|
|
7032
|
-
/* @__PURE__ */
|
|
7243
|
+
/* @__PURE__ */ jsxs18("label", { children: [
|
|
7244
|
+
/* @__PURE__ */ jsx18("span", { children: "Deposit date" }),
|
|
7245
|
+
/* @__PURE__ */ jsx18("input", { required: true, value: payment.depositDate, placeholder: "MM/DD/YYYY", onChange: (event) => setPayment((current) => ({ ...current, depositDate: event.target.value })) })
|
|
7033
7246
|
] }),
|
|
7034
|
-
/* @__PURE__ */
|
|
7035
|
-
/* @__PURE__ */
|
|
7036
|
-
/* @__PURE__ */
|
|
7247
|
+
/* @__PURE__ */ jsxs18("label", { className: "full", children: [
|
|
7248
|
+
/* @__PURE__ */ jsx18("span", { children: "Note (optional)" }),
|
|
7249
|
+
/* @__PURE__ */ jsx18("input", { value: payment.note, onChange: (event) => setPayment((current) => ({ ...current, note: event.target.value })) })
|
|
7037
7250
|
] })
|
|
7038
7251
|
] }),
|
|
7039
|
-
/* @__PURE__ */
|
|
7040
|
-
/* @__PURE__ */
|
|
7041
|
-
/* @__PURE__ */
|
|
7252
|
+
/* @__PURE__ */ jsxs18("div", { className: "mb-payment-total", children: [
|
|
7253
|
+
/* @__PURE__ */ jsx18("span", { children: "Total received" }),
|
|
7254
|
+
/* @__PURE__ */ jsx18("strong", { children: new Intl.NumberFormat(void 0, { style: "currency", currency: "USD" }).format(payment.amount + (payment.penaltyAmount ?? 0) + (payment.interestAmount ?? 0)) })
|
|
7042
7255
|
] }),
|
|
7043
|
-
/* @__PURE__ */
|
|
7044
|
-
/* @__PURE__ */
|
|
7045
|
-
/* @__PURE__ */
|
|
7256
|
+
/* @__PURE__ */ jsxs18("div", { className: "mb-lifecycle-panel-actions", children: [
|
|
7257
|
+
/* @__PURE__ */ jsx18("button", { type: "button", className: "mb-lifecycle-button secondary", onClick: () => setPanel(""), children: "Cancel" }),
|
|
7258
|
+
/* @__PURE__ */ jsx18("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" })
|
|
7046
7259
|
] })
|
|
7047
7260
|
] }) }) : null,
|
|
7048
|
-
activePanel === "close" || activePanel === "reopen" ? /* @__PURE__ */
|
|
7049
|
-
/* @__PURE__ */
|
|
7050
|
-
/* @__PURE__ */
|
|
7051
|
-
/* @__PURE__ */
|
|
7261
|
+
activePanel === "close" || activePanel === "reopen" ? /* @__PURE__ */ jsx18(LifecycleDialog, { title: activePanel === "close" ? "Close bill" : "Reopen bill", onClose: () => setPanel(""), children: /* @__PURE__ */ jsxs18("section", { className: "mb-lifecycle-panel", children: [
|
|
7262
|
+
/* @__PURE__ */ jsxs18("div", { children: [
|
|
7263
|
+
/* @__PURE__ */ jsx18("h3", { children: activePanel === "close" ? "Close bill" : "Reopen bill" }),
|
|
7264
|
+
/* @__PURE__ */ jsx18("p", { children: activePanel === "close" ? "The immutable submission and history remain available." : "Return this bill to active follow-up without changing the submitted snapshot." })
|
|
7052
7265
|
] }),
|
|
7053
|
-
/* @__PURE__ */
|
|
7054
|
-
/* @__PURE__ */
|
|
7055
|
-
/* @__PURE__ */
|
|
7266
|
+
/* @__PURE__ */ jsxs18("label", { children: [
|
|
7267
|
+
/* @__PURE__ */ jsx18("span", { children: "Reason" }),
|
|
7268
|
+
/* @__PURE__ */ jsx18("textarea", { required: true, value: reason, onChange: (event) => setReason(event.target.value) })
|
|
7056
7269
|
] }),
|
|
7057
|
-
/* @__PURE__ */
|
|
7058
|
-
/* @__PURE__ */
|
|
7059
|
-
/* @__PURE__ */
|
|
7270
|
+
/* @__PURE__ */ jsxs18("div", { className: "mb-lifecycle-panel-actions", children: [
|
|
7271
|
+
/* @__PURE__ */ jsx18("button", { type: "button", className: "mb-lifecycle-button secondary", onClick: () => setPanel(""), children: "Cancel" }),
|
|
7272
|
+
/* @__PURE__ */ jsx18("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" })
|
|
7060
7273
|
] })
|
|
7061
7274
|
] }) }) : null,
|
|
7062
|
-
activePanel === "send_duplicate" && correctionInitialBill ? /* @__PURE__ */
|
|
7063
|
-
/* @__PURE__ */
|
|
7064
|
-
/* @__PURE__ */
|
|
7065
|
-
/* @__PURE__ */
|
|
7275
|
+
activePanel === "send_duplicate" && correctionInitialBill ? /* @__PURE__ */ jsx18(LifecycleDialog, { title: "Send duplicate bill", wide: true, onClose: () => setPanel(""), children: /* @__PURE__ */ jsxs18("section", { className: "mb-lifecycle-correction", children: [
|
|
7276
|
+
/* @__PURE__ */ jsx18("header", { children: /* @__PURE__ */ jsxs18("div", { children: [
|
|
7277
|
+
/* @__PURE__ */ jsx18("h3", { children: "Send duplicate bill" }),
|
|
7278
|
+
/* @__PURE__ */ jsx18("p", { children: "Review and edit any bill field before creating a duplicate submission. The original bill and its history stay unchanged." })
|
|
7066
7279
|
] }) }),
|
|
7067
|
-
data.environment === "live" ? /* @__PURE__ */
|
|
7068
|
-
/* @__PURE__ */
|
|
7069
|
-
/* @__PURE__ */
|
|
7280
|
+
data.environment === "live" ? /* @__PURE__ */ jsxs18("div", { className: "mb-lifecycle-live-warning", children: [
|
|
7281
|
+
/* @__PURE__ */ jsx18("strong", { children: "Live clearinghouse submission" }),
|
|
7282
|
+
/* @__PURE__ */ jsx18("span", { children: "The duplicate will be sent only after you confirm its delivery route in the next dialog." })
|
|
7070
7283
|
] }) : null,
|
|
7071
|
-
/* @__PURE__ */
|
|
7072
|
-
/* @__PURE__ */
|
|
7284
|
+
/* @__PURE__ */ jsx18(CorrectionVerificationContact, { delivery: data.delivery }),
|
|
7285
|
+
/* @__PURE__ */ jsx18(
|
|
7073
7286
|
BillSubmissionForm,
|
|
7074
7287
|
{
|
|
7075
7288
|
className: "mbsf-lifecycle-correction",
|
|
@@ -7094,15 +7307,15 @@ function ConnectedBillLifecycle({ appearance, actorName, claimsAdministratorHint
|
|
|
7094
7307
|
...appearance ? { appearance } : {}
|
|
7095
7308
|
}
|
|
7096
7309
|
),
|
|
7097
|
-
duplicateError ? /* @__PURE__ */
|
|
7310
|
+
duplicateError ? /* @__PURE__ */ jsx18("div", { className: "mb-lifecycle-message error", role: "alert", children: duplicateError }) : null
|
|
7098
7311
|
] }) }) : null,
|
|
7099
|
-
activePanel === "report_status" ? /* @__PURE__ */
|
|
7312
|
+
activePanel === "report_status" ? /* @__PURE__ */ jsx18(
|
|
7100
7313
|
ReportBillStatusDialog,
|
|
7101
7314
|
{
|
|
7102
7315
|
...data.delivery.directory ? { directory: data.delivery.directory } : {},
|
|
7103
7316
|
...statusContacts.claimsAdmin ? { claimsAdmin: statusContacts.claimsAdmin } : {},
|
|
7104
7317
|
...statusContacts.billReview ? { billReview: statusContacts.billReview } : {},
|
|
7105
|
-
...receiptEntries.length ? { receipt: /* @__PURE__ */
|
|
7318
|
+
...receiptEntries.length ? { receipt: /* @__PURE__ */ jsx18(BillHistoryTable, { entries: receiptEntries, onOpenDocument: lifecycle.openAttachment, ...appearance ? { appearance } : {} }) } : {},
|
|
7106
7319
|
submitting: lifecycle.isMutating,
|
|
7107
7320
|
error: lifecycle.error?.message ?? null,
|
|
7108
7321
|
onCancel: () => setPanel(""),
|
|
@@ -7110,11 +7323,12 @@ function ConnectedBillLifecycle({ appearance, actorName, claimsAdministratorHint
|
|
|
7110
7323
|
...appearance ? { appearance } : {}
|
|
7111
7324
|
}
|
|
7112
7325
|
) : null,
|
|
7113
|
-
notice ? /* @__PURE__ */
|
|
7114
|
-
lifecycle.error ? /* @__PURE__ */
|
|
7326
|
+
notice ? /* @__PURE__ */ jsx18("div", { className: "mb-lifecycle-message success", role: "status", children: notice }) : null,
|
|
7327
|
+
lifecycle.error ? /* @__PURE__ */ jsx18("div", { className: "mb-lifecycle-message error", role: "alert", children: lifecycle.error.message }) : null
|
|
7115
7328
|
] });
|
|
7116
7329
|
}
|
|
7117
7330
|
var CONNECTED_LIFECYCLE_STYLES = `
|
|
7331
|
+
.mb-connected-lifecycle{grid-template-columns:minmax(0,1fr);min-width:0}.mb-lifecycle-tabpanel{min-width:0;grid-template-columns:minmax(0,1fr)}.mb-lifecycle-tabpanel>*{min-width:0}
|
|
7118
7332
|
.mb-lifecycle-attempt-detail{display:grid;gap:15px;padding:18px;border:1px solid color-mix(in srgb,var(--mb-accent) 38%,var(--mb-border));border-radius:var(--mb-radius,14px);background:color-mix(in srgb,var(--mb-accent) 5%,var(--mb-surface))}.mb-lifecycle-attempt-detail>header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.mb-lifecycle-attempt-detail>header span{color:var(--mb-accent);font-size:.72rem;font-weight:850;letter-spacing:.08em;text-transform:uppercase}.mb-lifecycle-attempt-detail h3{margin:3px 0 0;font-size:1.08rem}.mb-lifecycle-attempt-detail>header>strong{padding:4px 9px;border:1px solid color-mix(in srgb,var(--mb-accent) 35%,var(--mb-border));border-radius:999px;background:var(--mb-surface);color:var(--mb-accent);font-size:.75rem}.mb-lifecycle-attempt-detail dl{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:0}.mb-lifecycle-attempt-detail dl>div{display:grid;gap:2px;min-width:0}.mb-lifecycle-attempt-detail dt{color:var(--mb-muted);font-size:.7rem;font-weight:800;letter-spacing:.06em;text-transform:uppercase}.mb-lifecycle-attempt-detail dd{min-width:0;margin:0;font-weight:700;overflow-wrap:anywhere}
|
|
7119
7333
|
.mb-lifecycle-notes{display:grid;gap:14px;padding:20px;border:1px solid var(--mb-border);border-radius:var(--mb-radius,14px);background:var(--mb-surface)}.mb-lifecycle-notes>header{display:flex;align-items:center;justify-content:space-between;gap:16px}.mb-lifecycle-notes h3{margin:0;font-size:1.08rem}.mb-lifecycle-notes header p{margin:3px 0 0;color:var(--mb-muted)}.mb-lifecycle-notes>header>span{display:grid;place-items:center;min-width:28px;height:28px;border-radius:999px;background:var(--mb-soft);font-weight:750}.mb-lifecycle-notes ol{display:grid;gap:9px;margin:0;padding:0;list-style:none}.mb-lifecycle-notes li{padding:11px 13px;border-left:3px solid color-mix(in srgb,var(--mb-accent) 52%,var(--mb-border));border-radius:0 8px 8px 0;background:var(--mb-soft)}.mb-lifecycle-notes li p{margin:0;white-space:pre-wrap}.mb-lifecycle-notes li small{display:block;margin-top:4px;color:var(--mb-muted)}.mb-lifecycle-notes-empty{margin:0;color:var(--mb-muted)}.mb-lifecycle-notes form{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:10px}.mb-lifecycle-notes label{display:grid;gap:6px;font-size:.82rem;font-weight:750}.mb-lifecycle-notes textarea{width:100%;min-height:76px;padding:10px 12px;border:1px solid var(--mb-border);border-radius:var(--mb-control-radius,8px);background:var(--mb-input,#fff);color:var(--mb-text);font:inherit;resize:vertical}
|
|
7120
7334
|
.mb-lifecycle-simulator{display:grid;gap:14px;padding:18px;border:1px solid #b8dadd;border-radius:var(--mb-radius,14px);background:#f2fbfb}.mb-lifecycle-simulator>div:first-child>span{color:var(--mb-accent);font-size:.72rem;font-weight:850;letter-spacing:.09em;text-transform:uppercase}.mb-lifecycle-simulator h3{margin:3px 0 0;font-size:1.05rem}.mb-lifecycle-simulator p{margin:4px 0 0;color:var(--mb-muted)}.mb-lifecycle-simulator-actions{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:10px}.mb-lifecycle-simulator-actions button{min-height:76px;border:1px solid #a9cccf;border-radius:10px;background:var(--mb-surface);color:var(--mb-text);cursor:pointer;padding:12px 14px;text-align:left;font:inherit}.mb-lifecycle-simulator-actions button:hover{border-color:var(--mb-accent);box-shadow:0 3px 14px rgba(23,108,112,.1)}.mb-lifecycle-simulator-actions button:disabled{cursor:not-allowed;opacity:.55}.mb-lifecycle-simulator-actions button strong,.mb-lifecycle-simulator-actions button span{display:block}.mb-lifecycle-simulator-actions button span{margin-top:3px;color:var(--mb-muted);font-size:.83rem}.mb-lifecycle-simulator-idle{padding:10px 12px;border-radius:8px;background:rgba(255,255,255,.72)}
|
|
@@ -7128,11 +7342,11 @@ var CONNECTED_LIFECYCLE_STYLES = `
|
|
|
7128
7342
|
// src/connected-billing-workspace.tsx
|
|
7129
7343
|
import {
|
|
7130
7344
|
useCallback as useCallback5,
|
|
7131
|
-
useEffect as
|
|
7345
|
+
useEffect as useEffect13,
|
|
7132
7346
|
useLayoutEffect,
|
|
7133
7347
|
useMemo as useMemo10,
|
|
7134
|
-
useRef as
|
|
7135
|
-
useState as
|
|
7348
|
+
useRef as useRef9,
|
|
7349
|
+
useState as useState15
|
|
7136
7350
|
} from "react";
|
|
7137
7351
|
|
|
7138
7352
|
// src/billing-operations-client.ts
|
|
@@ -7251,9 +7465,9 @@ function createBillingOperationsClient({
|
|
|
7251
7465
|
dir: sort ? sort.endsWith("_asc") ? "asc" : "desc" : void 0
|
|
7252
7466
|
})}`, signal);
|
|
7253
7467
|
},
|
|
7254
|
-
getBillTasks(claimsAdministrator, signal) {
|
|
7468
|
+
getBillTasks(claimsAdministrator, signal, renderingProviderId) {
|
|
7255
7469
|
return get(
|
|
7256
|
-
`/partner/v2/bill-tasks${queryString({ claimsAdminId: claimsAdministrator })}`,
|
|
7470
|
+
`/partner/v2/bill-tasks${queryString({ claimsAdminId: claimsAdministrator, renderingProviderId })}`,
|
|
7257
7471
|
signal
|
|
7258
7472
|
);
|
|
7259
7473
|
},
|
|
@@ -7270,9 +7484,10 @@ function createBillingOperationsClient({
|
|
|
7270
7484
|
}
|
|
7271
7485
|
|
|
7272
7486
|
// src/connected-billing-workspace.tsx
|
|
7273
|
-
import { Fragment as
|
|
7274
|
-
var
|
|
7275
|
-
.mbow
|
|
7487
|
+
import { Fragment as Fragment16, jsx as jsx19, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
7488
|
+
var css12 = `
|
|
7489
|
+
.mbow-select{max-width:100%}
|
|
7490
|
+
.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)}
|
|
7276
7491
|
.mbow-workspace{width:100%;height:100%;max-height:var(--mbow-available-height,100dvh);min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
|
|
7277
7492
|
.mbow-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:18px}.mbow-head h2{font-size:24px;line-height:1.2}.mbow-sub{color:var(--mb-muted);margin-top:4px!important}.mbow-actions{display:flex;gap:8px;flex-wrap:wrap}
|
|
7278
7493
|
.mbow-button,.mbow-input,.mbow-select{min-height:38px;border:1px solid var(--mb-border);border-radius:var(--mb-control-radius);background:var(--mb-input);color:var(--mb-text);font:inherit}.mbow-button{padding:7px 12px;cursor:pointer;font-weight:650}.mbow-button:hover{border-color:var(--mb-accent)}.mbow-button.primary{background:var(--mb-accent);border-color:var(--mb-accent);color:var(--mb-accent-contrast)}.mbow-button:disabled{opacity:.55;cursor:not-allowed}.mbow-input,.mbow-select{padding:7px 10px}.mbow-input{min-width:260px;flex:1}
|
|
@@ -7286,6 +7501,14 @@ var css11 = `
|
|
|
7286
7501
|
function money6(value) {
|
|
7287
7502
|
return new Intl.NumberFormat("en-US", { style: "currency", currency: "USD" }).format(value);
|
|
7288
7503
|
}
|
|
7504
|
+
function RenderingProviderFilter({ value, options, onChange }) {
|
|
7505
|
+
if (!options && !value) return null;
|
|
7506
|
+
return /* @__PURE__ */ jsxs19("select", { className: "mbow-select", "aria-label": "Rendering provider filter", value, onChange: (event) => onChange(event.target.value), children: [
|
|
7507
|
+
/* @__PURE__ */ jsx19("option", { value: "", children: "All rendering providers" }),
|
|
7508
|
+
value && !options?.some((option) => option.id === value) ? /* @__PURE__ */ jsx19("option", { value, children: "Selected rendering provider" }) : null,
|
|
7509
|
+
options?.map((option) => /* @__PURE__ */ jsx19("option", { value: option.id, children: option.name }, option.id))
|
|
7510
|
+
] });
|
|
7511
|
+
}
|
|
7289
7512
|
function shortDate(value) {
|
|
7290
7513
|
if (!value) return "\u2014";
|
|
7291
7514
|
const date2 = /* @__PURE__ */ new Date(`${value.slice(0, 10)}T12:00:00`);
|
|
@@ -7299,14 +7522,14 @@ function defaultRange(days = 29) {
|
|
|
7299
7522
|
return { from: iso(from), to: iso(to) };
|
|
7300
7523
|
}
|
|
7301
7524
|
function Surface({ appearance, className = "", style, children, surfaceRef }) {
|
|
7302
|
-
return /* @__PURE__ */
|
|
7303
|
-
/* @__PURE__ */
|
|
7525
|
+
return /* @__PURE__ */ jsxs19("div", { ref: surfaceRef, className: `mbow ${className}`.trim(), style: mindBillAppearanceStyle(appearance, style), children: [
|
|
7526
|
+
/* @__PURE__ */ jsx19("style", { children: css12 }),
|
|
7304
7527
|
children
|
|
7305
7528
|
] });
|
|
7306
7529
|
}
|
|
7307
7530
|
function useAvailableViewportHeight() {
|
|
7308
|
-
const workspaceRef =
|
|
7309
|
-
const [availableHeight, setAvailableHeight] =
|
|
7531
|
+
const workspaceRef = useRef9(null);
|
|
7532
|
+
const [availableHeight, setAvailableHeight] = useState15(null);
|
|
7310
7533
|
useLayoutEffect(() => {
|
|
7311
7534
|
const element = workspaceRef.current;
|
|
7312
7535
|
if (!element || typeof window === "undefined") return;
|
|
@@ -7341,11 +7564,11 @@ function BillSearchContent({
|
|
|
7341
7564
|
onSelectBill,
|
|
7342
7565
|
heading
|
|
7343
7566
|
}) {
|
|
7344
|
-
const [query, setQuery] =
|
|
7345
|
-
const [draft, setDraft] =
|
|
7346
|
-
const [result, setResult] =
|
|
7347
|
-
const [error, setError] =
|
|
7348
|
-
const [loading, setLoading] =
|
|
7567
|
+
const [query, setQuery] = useState15({ age: "all", page: 1, pageSize: 25, sort: "submitted_desc", ...initialQuery, status: initialQuery?.status === "submitted" ? "sent" : initialQuery?.status ?? "all" });
|
|
7568
|
+
const [draft, setDraft] = useState15(initialQuery?.q ?? "");
|
|
7569
|
+
const [result, setResult] = useState15(null);
|
|
7570
|
+
const [error, setError] = useState15(null);
|
|
7571
|
+
const [loading, setLoading] = useState15(true);
|
|
7349
7572
|
const load = useCallback5(async (signal) => {
|
|
7350
7573
|
setLoading(true);
|
|
7351
7574
|
setError(null);
|
|
@@ -7357,77 +7580,78 @@ function BillSearchContent({
|
|
|
7357
7580
|
if (!signal?.aborted) setLoading(false);
|
|
7358
7581
|
}
|
|
7359
7582
|
}, [client, query]);
|
|
7360
|
-
|
|
7583
|
+
useEffect13(() => {
|
|
7361
7584
|
const controller = new AbortController();
|
|
7362
7585
|
void load(controller.signal);
|
|
7363
7586
|
return () => controller.abort();
|
|
7364
7587
|
}, [load]);
|
|
7365
7588
|
const update = (next) => setQuery((current) => ({ ...current, ...next, page: next.page ?? 1 }));
|
|
7366
7589
|
const pageCount = Math.max(1, Math.ceil((result?.total ?? 0) / (result?.pageSize ?? 25)));
|
|
7367
|
-
return /* @__PURE__ */
|
|
7368
|
-
heading ? /* @__PURE__ */
|
|
7369
|
-
/* @__PURE__ */
|
|
7590
|
+
return /* @__PURE__ */ jsxs19(Fragment16, { children: [
|
|
7591
|
+
heading ? /* @__PURE__ */ jsx19("div", { className: "mbow-head", children: /* @__PURE__ */ jsx19("div", { children: typeof heading === "string" ? /* @__PURE__ */ jsx19("h2", { children: heading }) : heading }) }) : null,
|
|
7592
|
+
/* @__PURE__ */ jsxs19("form", { className: "mbow-toolbar", onSubmit: (event) => {
|
|
7370
7593
|
event.preventDefault();
|
|
7371
7594
|
update({ q: draft.trim() });
|
|
7372
7595
|
}, children: [
|
|
7373
|
-
/* @__PURE__ */
|
|
7374
|
-
/* @__PURE__ */
|
|
7375
|
-
/* @__PURE__ */
|
|
7376
|
-
/* @__PURE__ */
|
|
7377
|
-
/* @__PURE__ */
|
|
7378
|
-
/* @__PURE__ */
|
|
7379
|
-
/* @__PURE__ */
|
|
7380
|
-
/* @__PURE__ */
|
|
7381
|
-
/* @__PURE__ */
|
|
7382
|
-
/* @__PURE__ */
|
|
7383
|
-
/* @__PURE__ */
|
|
7596
|
+
/* @__PURE__ */ jsx19("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" }),
|
|
7597
|
+
/* @__PURE__ */ jsxs19("select", { className: "mbow-select", value: query.status ?? "all", onChange: (event) => update({ status: event.target.value }), "aria-label": "Bill status", children: [
|
|
7598
|
+
/* @__PURE__ */ jsx19("option", { value: "all", children: "All statuses" }),
|
|
7599
|
+
/* @__PURE__ */ jsx19("option", { value: "incomplete", children: "Incomplete" }),
|
|
7600
|
+
/* @__PURE__ */ jsx19("option", { value: "sent", children: "Sent" }),
|
|
7601
|
+
/* @__PURE__ */ jsx19("option", { value: "accepted", children: "Accepted" }),
|
|
7602
|
+
/* @__PURE__ */ jsx19("option", { value: "accepted_no_response", children: "Accepted \u2014 response overdue" }),
|
|
7603
|
+
/* @__PURE__ */ jsx19("option", { value: "rejected", children: "Rejected" }),
|
|
7604
|
+
/* @__PURE__ */ jsx19("option", { value: "processed", children: "Processed" }),
|
|
7605
|
+
/* @__PURE__ */ jsx19("option", { value: "paid", children: "Paid" }),
|
|
7606
|
+
/* @__PURE__ */ jsx19("option", { value: "closed", children: "Closed" })
|
|
7384
7607
|
] }),
|
|
7385
|
-
/* @__PURE__ */
|
|
7386
|
-
/* @__PURE__ */
|
|
7387
|
-
/* @__PURE__ */
|
|
7388
|
-
/* @__PURE__ */
|
|
7389
|
-
/* @__PURE__ */
|
|
7390
|
-
/* @__PURE__ */
|
|
7391
|
-
/* @__PURE__ */
|
|
7392
|
-
/* @__PURE__ */
|
|
7608
|
+
/* @__PURE__ */ jsxs19("select", { className: "mbow-select", value: query.age ?? "all", onChange: (event) => update({ age: event.target.value }), "aria-label": "A/R age", children: [
|
|
7609
|
+
/* @__PURE__ */ jsx19("option", { value: "all", children: "All A/R ages" }),
|
|
7610
|
+
/* @__PURE__ */ jsx19("option", { value: "0-30", children: "0\u201330 days" }),
|
|
7611
|
+
/* @__PURE__ */ jsx19("option", { value: "31-60", children: "31\u201360 days" }),
|
|
7612
|
+
/* @__PURE__ */ jsx19("option", { value: "61-90", children: "61\u201390 days" }),
|
|
7613
|
+
/* @__PURE__ */ jsx19("option", { value: "91+", children: "91+ days" }),
|
|
7614
|
+
/* @__PURE__ */ jsx19("option", { value: "91-180", children: "91\u2013180 days" }),
|
|
7615
|
+
/* @__PURE__ */ jsx19("option", { value: "181+", children: "181+ days" })
|
|
7393
7616
|
] }),
|
|
7394
|
-
/* @__PURE__ */
|
|
7617
|
+
/* @__PURE__ */ jsx19("button", { className: "mbow-button", type: "submit", children: "Search" }),
|
|
7618
|
+
/* @__PURE__ */ jsx19(RenderingProviderFilter, { value: query.renderingProviderId ?? "", options: result?.filters?.renderingProviders, onChange: (value) => update({ renderingProviderId: value }) })
|
|
7395
7619
|
] }),
|
|
7396
|
-
/* @__PURE__ */
|
|
7397
|
-
loading ? /* @__PURE__ */
|
|
7620
|
+
/* @__PURE__ */ jsxs19("div", { className: "mbow-card mbow-scroll", children: [
|
|
7621
|
+
loading ? /* @__PURE__ */ jsx19("div", { className: "mbow-state", role: "status", children: "Loading bills\u2026" }) : error ? /* @__PURE__ */ jsxs19("div", { className: "mbow-state mbow-error", role: "alert", children: [
|
|
7398
7622
|
error.message,
|
|
7399
7623
|
" ",
|
|
7400
|
-
/* @__PURE__ */
|
|
7401
|
-
] }) : result?.items.length === 0 ? /* @__PURE__ */
|
|
7402
|
-
/* @__PURE__ */
|
|
7403
|
-
/* @__PURE__ */
|
|
7404
|
-
/* @__PURE__ */
|
|
7405
|
-
/* @__PURE__ */
|
|
7406
|
-
/* @__PURE__ */
|
|
7407
|
-
/* @__PURE__ */
|
|
7408
|
-
/* @__PURE__ */
|
|
7409
|
-
/* @__PURE__ */
|
|
7410
|
-
/* @__PURE__ */
|
|
7624
|
+
/* @__PURE__ */ jsx19("button", { className: "mbow-button", type: "button", onClick: () => void load(), children: "Retry" })
|
|
7625
|
+
] }) : result?.items.length === 0 ? /* @__PURE__ */ jsx19("div", { className: "mbow-state", children: "No bills match these filters." }) : /* @__PURE__ */ jsxs19("table", { className: "mbow-table", children: [
|
|
7626
|
+
/* @__PURE__ */ jsx19("thead", { children: /* @__PURE__ */ jsxs19("tr", { children: [
|
|
7627
|
+
/* @__PURE__ */ jsx19("th", { children: "Bill" }),
|
|
7628
|
+
/* @__PURE__ */ jsx19("th", { children: "Patient" }),
|
|
7629
|
+
/* @__PURE__ */ jsx19("th", { children: "DOS" }),
|
|
7630
|
+
/* @__PURE__ */ jsx19("th", { children: "Codes" }),
|
|
7631
|
+
/* @__PURE__ */ jsx19("th", { children: "Claims administrator" }),
|
|
7632
|
+
/* @__PURE__ */ jsx19("th", { children: "Status" }),
|
|
7633
|
+
/* @__PURE__ */ jsx19("th", { children: "Submitted / A/R age" }),
|
|
7634
|
+
/* @__PURE__ */ jsx19("th", { className: "mbow-money", children: "Balance due" })
|
|
7411
7635
|
] }) }),
|
|
7412
|
-
/* @__PURE__ */
|
|
7413
|
-
/* @__PURE__ */
|
|
7636
|
+
/* @__PURE__ */ jsx19("tbody", { children: result?.items.map((bill) => /* @__PURE__ */ jsxs19("tr", { className: onSelectBill ? "clickable" : "", onClick: () => onSelectBill?.(bill), children: [
|
|
7637
|
+
/* @__PURE__ */ jsxs19("td", { className: "mbow-strong", children: [
|
|
7414
7638
|
"#",
|
|
7415
7639
|
bill.billNumber
|
|
7416
7640
|
] }),
|
|
7417
|
-
/* @__PURE__ */
|
|
7418
|
-
/* @__PURE__ */
|
|
7419
|
-
/* @__PURE__ */
|
|
7420
|
-
/* @__PURE__ */
|
|
7421
|
-
/* @__PURE__ */
|
|
7422
|
-
/* @__PURE__ */
|
|
7641
|
+
/* @__PURE__ */ jsx19("td", { children: bill.patientName }),
|
|
7642
|
+
/* @__PURE__ */ jsx19("td", { children: shortDate(bill.dateOfService) }),
|
|
7643
|
+
/* @__PURE__ */ jsx19("td", { children: bill.procedureCodes.join(", ") || "\u2014" }),
|
|
7644
|
+
/* @__PURE__ */ jsx19("td", { children: bill.claimsAdministrator || "\u2014" }),
|
|
7645
|
+
/* @__PURE__ */ jsx19("td", { children: /* @__PURE__ */ jsx19("span", { className: `mbow-badge ${bill.status.tone ?? ""}`, children: bill.status.label }) }),
|
|
7646
|
+
/* @__PURE__ */ jsxs19("td", { children: [
|
|
7423
7647
|
shortDate(bill.submittedAt),
|
|
7424
|
-
/* @__PURE__ */
|
|
7648
|
+
/* @__PURE__ */ jsx19("div", { className: "mbow-muted", children: bill.arAgeDays == null ? "\u2014" : `${bill.arAgeDays} days` })
|
|
7425
7649
|
] }),
|
|
7426
|
-
/* @__PURE__ */
|
|
7650
|
+
/* @__PURE__ */ jsx19("td", { className: "mbow-money mbow-strong", children: money6(bill.balanceDue) })
|
|
7427
7651
|
] }, bill.id)) })
|
|
7428
7652
|
] }),
|
|
7429
|
-
result && !loading && !error ? /* @__PURE__ */
|
|
7430
|
-
/* @__PURE__ */
|
|
7653
|
+
result && !loading && !error ? /* @__PURE__ */ jsxs19("div", { className: "mbow-pager", children: [
|
|
7654
|
+
/* @__PURE__ */ jsxs19("span", { children: [
|
|
7431
7655
|
"Showing ",
|
|
7432
7656
|
result.total === 0 ? 0 : (result.page - 1) * result.pageSize + 1,
|
|
7433
7657
|
"\u2013",
|
|
@@ -7435,14 +7659,14 @@ function BillSearchContent({
|
|
|
7435
7659
|
" of ",
|
|
7436
7660
|
result.total
|
|
7437
7661
|
] }),
|
|
7438
|
-
/* @__PURE__ */
|
|
7439
|
-
/* @__PURE__ */
|
|
7662
|
+
/* @__PURE__ */ jsxs19("span", { children: [
|
|
7663
|
+
/* @__PURE__ */ jsx19("button", { className: "mbow-button", type: "button", disabled: result.page <= 1, onClick: () => update({ page: result.page - 1 }), children: "Previous" }),
|
|
7440
7664
|
" ",
|
|
7441
7665
|
result.page,
|
|
7442
7666
|
" / ",
|
|
7443
7667
|
pageCount,
|
|
7444
7668
|
" ",
|
|
7445
|
-
/* @__PURE__ */
|
|
7669
|
+
/* @__PURE__ */ jsx19("button", { className: "mbow-button", type: "button", disabled: result.page >= pageCount, onClick: () => update({ page: result.page + 1 }), children: "Next" })
|
|
7446
7670
|
] })
|
|
7447
7671
|
] }) : null
|
|
7448
7672
|
] })
|
|
@@ -7450,7 +7674,7 @@ function BillSearchContent({
|
|
|
7450
7674
|
}
|
|
7451
7675
|
function ConnectedBillSearch({ appearance, className, style, initialQuery, onSelectBill, heading = "All bills", ...options }) {
|
|
7452
7676
|
const client = useClient(options);
|
|
7453
|
-
return /* @__PURE__ */
|
|
7677
|
+
return /* @__PURE__ */ jsx19(Surface, { appearance, className, style, children: /* @__PURE__ */ jsx19(BillSearchContent, { client, initialQuery, onSelectBill, heading }) });
|
|
7454
7678
|
}
|
|
7455
7679
|
function taskQuery(cell) {
|
|
7456
7680
|
const [taskType, taskLabel] = cell.rowId.split("::", 2);
|
|
@@ -7461,44 +7685,48 @@ function taskQuery(cell) {
|
|
|
7461
7685
|
return { status: "all", taskSection: cell.sectionId, ...taskType ? { taskType } : {}, ...taskLabel ? { taskLabel } : {}, ...age ? { age } : {} };
|
|
7462
7686
|
}
|
|
7463
7687
|
function BillTasksContent({ client, onDrillDown, appearance }) {
|
|
7464
|
-
const [claimsAdminId, setClaimsAdminId] =
|
|
7465
|
-
const [
|
|
7466
|
-
const [
|
|
7467
|
-
const [
|
|
7688
|
+
const [claimsAdminId, setClaimsAdminId] = useState15("");
|
|
7689
|
+
const [renderingProviderId, setRenderingProviderId] = useState15("");
|
|
7690
|
+
const [result, setResult] = useState15(null);
|
|
7691
|
+
const [error, setError] = useState15(null);
|
|
7692
|
+
const [loading, setLoading] = useState15(true);
|
|
7468
7693
|
const load = useCallback5(async (signal) => {
|
|
7469
7694
|
setLoading(true);
|
|
7470
7695
|
setError(null);
|
|
7471
7696
|
try {
|
|
7472
|
-
setResult(await client.getBillTasks(claimsAdminId || void 0, signal));
|
|
7697
|
+
setResult(await client.getBillTasks(claimsAdminId || void 0, signal, renderingProviderId || void 0));
|
|
7473
7698
|
} catch (cause) {
|
|
7474
7699
|
if (!signal?.aborted) setError(cause instanceof Error ? cause : new Error("Bill tasks could not be loaded."));
|
|
7475
7700
|
} finally {
|
|
7476
7701
|
if (!signal?.aborted) setLoading(false);
|
|
7477
7702
|
}
|
|
7478
|
-
}, [claimsAdminId, client]);
|
|
7479
|
-
|
|
7703
|
+
}, [claimsAdminId, renderingProviderId, client]);
|
|
7704
|
+
useEffect13(() => {
|
|
7480
7705
|
const controller = new AbortController();
|
|
7481
7706
|
void load(controller.signal);
|
|
7482
7707
|
return () => controller.abort();
|
|
7483
7708
|
}, [load]);
|
|
7484
|
-
if (loading && !result) return /* @__PURE__ */
|
|
7485
|
-
if (error && !result) return /* @__PURE__ */
|
|
7486
|
-
if (!result) return /* @__PURE__ */
|
|
7709
|
+
if (loading && !result) return /* @__PURE__ */ jsx19("div", { className: "mbow-state", children: "Loading bill tasks\u2026" });
|
|
7710
|
+
if (error && !result) return /* @__PURE__ */ jsx19("div", { className: "mbow-state mbow-error", children: error.message });
|
|
7711
|
+
if (!result) return /* @__PURE__ */ jsx19(Fragment16, {});
|
|
7487
7712
|
const selectionProps = loading || error ? {} : {
|
|
7488
|
-
onSelectCell: (cell) => onDrillDown?.({ ...taskQuery(cell), ...claimsAdminId ? { claimsAdministrator: claimsAdminId } : {} })
|
|
7713
|
+
onSelectCell: (cell) => onDrillDown?.({ ...taskQuery(cell), ...claimsAdminId ? { claimsAdministrator: claimsAdminId } : {}, ...renderingProviderId ? { renderingProviderId } : {} })
|
|
7489
7714
|
};
|
|
7490
|
-
return /* @__PURE__ */
|
|
7491
|
-
/* @__PURE__ */
|
|
7715
|
+
return /* @__PURE__ */ jsxs19(Fragment16, { children: [
|
|
7716
|
+
/* @__PURE__ */ jsxs19("p", { className: "mbow-task-note", children: [
|
|
7492
7717
|
"Open follow-up work grouped by task and age. ",
|
|
7493
7718
|
result.waiting ? "Sent and accepted bills waiting for a payer are shown below." : "Find sent and accepted bills in All bills."
|
|
7494
7719
|
] }),
|
|
7495
|
-
loading ? /* @__PURE__ */
|
|
7496
|
-
error ? /* @__PURE__ */
|
|
7497
|
-
/* @__PURE__ */
|
|
7498
|
-
/* @__PURE__ */
|
|
7499
|
-
|
|
7720
|
+
loading ? /* @__PURE__ */ jsx19("p", { role: "status", children: "Updating bill tasks\u2026" }) : null,
|
|
7721
|
+
error ? /* @__PURE__ */ jsx19("p", { role: "alert", className: "mbow-error", children: error.message }) : null,
|
|
7722
|
+
/* @__PURE__ */ jsx19(BillTasksDashboard, { data: result.dashboard, appearance: appearance ?? { preset: "mindbill" }, toolbar: /* @__PURE__ */ jsxs19("div", { className: "mbow-toolbar", children: [
|
|
7723
|
+
/* @__PURE__ */ jsxs19("select", { "aria-label": "Claims administrator filter", className: "mbow-select", value: claimsAdminId, onChange: (event) => setClaimsAdminId(event.target.value), children: [
|
|
7724
|
+
/* @__PURE__ */ jsx19("option", { value: "", children: "All claims administrators" }),
|
|
7725
|
+
result.filters.claimsAdministrators.map((item) => /* @__PURE__ */ jsx19("option", { value: item.id, children: item.name }, item.id))
|
|
7726
|
+
] }),
|
|
7727
|
+
/* @__PURE__ */ jsx19(RenderingProviderFilter, { value: renderingProviderId, options: result.filters.renderingProviders, onChange: setRenderingProviderId })
|
|
7500
7728
|
] }), ...selectionProps }),
|
|
7501
|
-
result.waiting ? /* @__PURE__ */
|
|
7729
|
+
result.waiting ? /* @__PURE__ */ jsx19(
|
|
7502
7730
|
BillTasksDashboard,
|
|
7503
7731
|
{
|
|
7504
7732
|
data: result.waiting,
|
|
@@ -7516,28 +7744,28 @@ function BillTasksContent({ client, onDrillDown, appearance }) {
|
|
|
7516
7744
|
}
|
|
7517
7745
|
function ConnectedBillTasksDashboard({ appearance, className, style, onDrillDown, ...options }) {
|
|
7518
7746
|
const client = useClient(options);
|
|
7519
|
-
return /* @__PURE__ */
|
|
7747
|
+
return /* @__PURE__ */ jsx19(Surface, { appearance, className, style, children: /* @__PURE__ */ jsx19(BillTasksContent, { client, onDrillDown, appearance }) });
|
|
7520
7748
|
}
|
|
7521
7749
|
function RangeToolbar({ from, to, setFrom, setTo }) {
|
|
7522
|
-
return /* @__PURE__ */
|
|
7523
|
-
/* @__PURE__ */
|
|
7750
|
+
return /* @__PURE__ */ jsxs19("div", { className: "mbow-toolbar", children: [
|
|
7751
|
+
/* @__PURE__ */ jsxs19("label", { children: [
|
|
7524
7752
|
"From ",
|
|
7525
|
-
/* @__PURE__ */
|
|
7753
|
+
/* @__PURE__ */ jsx19("input", { className: "mbow-input", type: "date", value: from, onChange: (event) => setFrom(event.target.value) })
|
|
7526
7754
|
] }),
|
|
7527
|
-
/* @__PURE__ */
|
|
7755
|
+
/* @__PURE__ */ jsxs19("label", { children: [
|
|
7528
7756
|
"To ",
|
|
7529
|
-
/* @__PURE__ */
|
|
7757
|
+
/* @__PURE__ */ jsx19("input", { className: "mbow-input", type: "date", value: to, onChange: (event) => setTo(event.target.value) })
|
|
7530
7758
|
] })
|
|
7531
7759
|
] });
|
|
7532
7760
|
}
|
|
7533
7761
|
function ConnectedServiceLineItemsReport({ appearance, className, style, initialFrom, initialTo, onSelectBill, ...options }) {
|
|
7534
7762
|
const defaults = useMemo10(() => defaultRange(), []);
|
|
7535
7763
|
const client = useClient(options);
|
|
7536
|
-
const [from, setFrom] =
|
|
7537
|
-
const [to, setTo] =
|
|
7538
|
-
const [data, setData] =
|
|
7539
|
-
const [error, setError] =
|
|
7540
|
-
|
|
7764
|
+
const [from, setFrom] = useState15(initialFrom ?? defaults.from);
|
|
7765
|
+
const [to, setTo] = useState15(initialTo ?? defaults.to);
|
|
7766
|
+
const [data, setData] = useState15(null);
|
|
7767
|
+
const [error, setError] = useState15(null);
|
|
7768
|
+
useEffect13(() => {
|
|
7541
7769
|
const controller = new AbortController();
|
|
7542
7770
|
setError(null);
|
|
7543
7771
|
void client.getServiceLineItems({ from, to }, controller.signal).then(setData).catch((cause) => {
|
|
@@ -7545,64 +7773,64 @@ function ConnectedServiceLineItemsReport({ appearance, className, style, initial
|
|
|
7545
7773
|
});
|
|
7546
7774
|
return () => controller.abort();
|
|
7547
7775
|
}, [client, from, to]);
|
|
7548
|
-
return /* @__PURE__ */
|
|
7549
|
-
/* @__PURE__ */
|
|
7550
|
-
/* @__PURE__ */
|
|
7551
|
-
/* @__PURE__ */
|
|
7776
|
+
return /* @__PURE__ */ jsxs19(Surface, { appearance, className, style, children: [
|
|
7777
|
+
/* @__PURE__ */ jsx19("div", { className: "mbow-head", children: /* @__PURE__ */ jsxs19("div", { children: [
|
|
7778
|
+
/* @__PURE__ */ jsx19("h2", { children: "Original submissions by procedure" }),
|
|
7779
|
+
/* @__PURE__ */ jsx19("p", { className: "mbow-sub", children: "First payer submission for each patient and date of service." })
|
|
7552
7780
|
] }) }),
|
|
7553
|
-
/* @__PURE__ */
|
|
7554
|
-
error ? /* @__PURE__ */
|
|
7555
|
-
/* @__PURE__ */
|
|
7556
|
-
/* @__PURE__ */
|
|
7557
|
-
/* @__PURE__ */
|
|
7558
|
-
/* @__PURE__ */
|
|
7559
|
-
/* @__PURE__ */
|
|
7781
|
+
/* @__PURE__ */ jsx19(RangeToolbar, { from, to, setFrom, setTo }),
|
|
7782
|
+
error ? /* @__PURE__ */ jsx19("div", { className: "mbow-state mbow-error", children: error.message }) : !data ? /* @__PURE__ */ jsx19("div", { className: "mbow-state", children: "Loading report\u2026" }) : /* @__PURE__ */ jsxs19(Fragment16, { children: [
|
|
7783
|
+
/* @__PURE__ */ jsxs19("div", { className: "mbow-metrics", children: [
|
|
7784
|
+
/* @__PURE__ */ jsx19(Metric, { label: "Original bills", value: String(data.totalBills) }),
|
|
7785
|
+
/* @__PURE__ */ jsx19(Metric, { label: "Service lines", value: String(data.totalLines) }),
|
|
7786
|
+
/* @__PURE__ */ jsx19(Metric, { label: "Total billed", value: money6(data.totalBilled) }),
|
|
7787
|
+
/* @__PURE__ */ jsx19(Metric, { label: "Report window", value: data.windowLabel })
|
|
7560
7788
|
] }),
|
|
7561
|
-
/* @__PURE__ */
|
|
7562
|
-
/* @__PURE__ */
|
|
7563
|
-
/* @__PURE__ */
|
|
7564
|
-
/* @__PURE__ */
|
|
7565
|
-
/* @__PURE__ */
|
|
7566
|
-
/* @__PURE__ */
|
|
7567
|
-
/* @__PURE__ */
|
|
7568
|
-
/* @__PURE__ */
|
|
7789
|
+
/* @__PURE__ */ jsxs19("div", { className: "mbow-card mbow-scroll", children: [
|
|
7790
|
+
/* @__PURE__ */ jsx19("div", { className: "mbow-section-head", children: /* @__PURE__ */ jsx19("h3", { children: "Procedure summary" }) }),
|
|
7791
|
+
/* @__PURE__ */ jsxs19("table", { className: "mbow-table", children: [
|
|
7792
|
+
/* @__PURE__ */ jsx19("thead", { children: /* @__PURE__ */ jsxs19("tr", { children: [
|
|
7793
|
+
/* @__PURE__ */ jsx19("th", { children: "Procedure code" }),
|
|
7794
|
+
/* @__PURE__ */ jsx19("th", { children: "Bills" }),
|
|
7795
|
+
/* @__PURE__ */ jsx19("th", { children: "Service lines" }),
|
|
7796
|
+
/* @__PURE__ */ jsx19("th", { className: "mbow-money", children: "Total billed" })
|
|
7569
7797
|
] }) }),
|
|
7570
|
-
/* @__PURE__ */
|
|
7571
|
-
/* @__PURE__ */
|
|
7572
|
-
/* @__PURE__ */
|
|
7573
|
-
/* @__PURE__ */
|
|
7574
|
-
/* @__PURE__ */
|
|
7798
|
+
/* @__PURE__ */ jsx19("tbody", { children: data.cptRows.map((row) => /* @__PURE__ */ jsxs19("tr", { children: [
|
|
7799
|
+
/* @__PURE__ */ jsx19("td", { className: "mbow-strong", children: row.code }),
|
|
7800
|
+
/* @__PURE__ */ jsx19("td", { children: row.bills }),
|
|
7801
|
+
/* @__PURE__ */ jsx19("td", { children: row.lines }),
|
|
7802
|
+
/* @__PURE__ */ jsx19("td", { className: "mbow-money", children: money6(row.billed) })
|
|
7575
7803
|
] }, row.code)) })
|
|
7576
7804
|
] })
|
|
7577
7805
|
] }),
|
|
7578
|
-
/* @__PURE__ */
|
|
7579
|
-
/* @__PURE__ */
|
|
7580
|
-
/* @__PURE__ */
|
|
7581
|
-
/* @__PURE__ */
|
|
7582
|
-
/* @__PURE__ */
|
|
7583
|
-
/* @__PURE__ */
|
|
7584
|
-
/* @__PURE__ */
|
|
7585
|
-
/* @__PURE__ */
|
|
7586
|
-
/* @__PURE__ */
|
|
7587
|
-
/* @__PURE__ */
|
|
7588
|
-
/* @__PURE__ */
|
|
7589
|
-
/* @__PURE__ */
|
|
7806
|
+
/* @__PURE__ */ jsxs19("div", { className: "mbow-card mbow-scroll", style: { marginTop: 16 }, children: [
|
|
7807
|
+
/* @__PURE__ */ jsx19("div", { className: "mbow-section-head", children: /* @__PURE__ */ jsx19("h3", { children: "All original bills" }) }),
|
|
7808
|
+
/* @__PURE__ */ jsxs19("table", { className: "mbow-table", children: [
|
|
7809
|
+
/* @__PURE__ */ jsx19("thead", { children: /* @__PURE__ */ jsxs19("tr", { children: [
|
|
7810
|
+
/* @__PURE__ */ jsx19("th", { children: "Bill" }),
|
|
7811
|
+
/* @__PURE__ */ jsx19("th", { children: "First submitted" }),
|
|
7812
|
+
/* @__PURE__ */ jsx19("th", { children: "Patient \xB7 Claim" }),
|
|
7813
|
+
/* @__PURE__ */ jsx19("th", { children: "DOS" }),
|
|
7814
|
+
/* @__PURE__ */ jsx19("th", { children: "Claims administrator" }),
|
|
7815
|
+
/* @__PURE__ */ jsx19("th", { children: "Codes" }),
|
|
7816
|
+
/* @__PURE__ */ jsx19("th", { className: "mbow-money", children: "Billed" }),
|
|
7817
|
+
/* @__PURE__ */ jsx19("th", { children: "Status" })
|
|
7590
7818
|
] }) }),
|
|
7591
|
-
/* @__PURE__ */
|
|
7592
|
-
/* @__PURE__ */
|
|
7819
|
+
/* @__PURE__ */ jsx19("tbody", { children: data.billRows.map((row) => /* @__PURE__ */ jsxs19("tr", { className: onSelectBill ? "clickable" : "", onClick: () => onSelectBill?.(row.billId), children: [
|
|
7820
|
+
/* @__PURE__ */ jsxs19("td", { className: "mbow-strong", children: [
|
|
7593
7821
|
"#",
|
|
7594
7822
|
row.billNumber
|
|
7595
7823
|
] }),
|
|
7596
|
-
/* @__PURE__ */
|
|
7597
|
-
/* @__PURE__ */
|
|
7824
|
+
/* @__PURE__ */ jsx19("td", { children: shortDate(row.submittedDate) }),
|
|
7825
|
+
/* @__PURE__ */ jsxs19("td", { children: [
|
|
7598
7826
|
row.patient,
|
|
7599
|
-
/* @__PURE__ */
|
|
7827
|
+
/* @__PURE__ */ jsx19("div", { className: "mbow-muted", children: row.claim })
|
|
7600
7828
|
] }),
|
|
7601
|
-
/* @__PURE__ */
|
|
7602
|
-
/* @__PURE__ */
|
|
7603
|
-
/* @__PURE__ */
|
|
7604
|
-
/* @__PURE__ */
|
|
7605
|
-
/* @__PURE__ */
|
|
7829
|
+
/* @__PURE__ */ jsx19("td", { children: shortDate(row.dos) }),
|
|
7830
|
+
/* @__PURE__ */ jsx19("td", { children: row.claimsAdmin }),
|
|
7831
|
+
/* @__PURE__ */ jsx19("td", { children: row.codes.join(", ") }),
|
|
7832
|
+
/* @__PURE__ */ jsx19("td", { className: "mbow-money", children: money6(row.billed) }),
|
|
7833
|
+
/* @__PURE__ */ jsx19("td", { children: row.status })
|
|
7606
7834
|
] }, row.billId)) })
|
|
7607
7835
|
] })
|
|
7608
7836
|
] })
|
|
@@ -7610,19 +7838,19 @@ function ConnectedServiceLineItemsReport({ appearance, className, style, initial
|
|
|
7610
7838
|
] });
|
|
7611
7839
|
}
|
|
7612
7840
|
function Metric({ label, value }) {
|
|
7613
|
-
return /* @__PURE__ */
|
|
7614
|
-
/* @__PURE__ */
|
|
7615
|
-
/* @__PURE__ */
|
|
7841
|
+
return /* @__PURE__ */ jsxs19("div", { className: "mbow-metric", children: [
|
|
7842
|
+
/* @__PURE__ */ jsx19("span", { children: label }),
|
|
7843
|
+
/* @__PURE__ */ jsx19("strong", { children: value })
|
|
7616
7844
|
] });
|
|
7617
7845
|
}
|
|
7618
7846
|
function ConnectedProductivityReport({ appearance, className, style, initialFrom, initialTo, ...options }) {
|
|
7619
7847
|
const defaults = useMemo10(() => defaultRange(13), []);
|
|
7620
7848
|
const client = useClient(options);
|
|
7621
|
-
const [from, setFrom] =
|
|
7622
|
-
const [to, setTo] =
|
|
7623
|
-
const [data, setData] =
|
|
7624
|
-
const [error, setError] =
|
|
7625
|
-
|
|
7849
|
+
const [from, setFrom] = useState15(initialFrom ?? defaults.from);
|
|
7850
|
+
const [to, setTo] = useState15(initialTo ?? defaults.to);
|
|
7851
|
+
const [data, setData] = useState15(null);
|
|
7852
|
+
const [error, setError] = useState15(null);
|
|
7853
|
+
useEffect13(() => {
|
|
7626
7854
|
const controller = new AbortController();
|
|
7627
7855
|
setError(null);
|
|
7628
7856
|
void client.getProductivity({ from, to }, controller.signal).then(setData).catch((cause) => {
|
|
@@ -7631,41 +7859,41 @@ function ConnectedProductivityReport({ appearance, className, style, initialFrom
|
|
|
7631
7859
|
return () => controller.abort();
|
|
7632
7860
|
}, [client, from, to]);
|
|
7633
7861
|
const maxSent = data ? Math.max(1, ...Object.values(data.sentTotal)) : 1;
|
|
7634
|
-
return /* @__PURE__ */
|
|
7635
|
-
/* @__PURE__ */
|
|
7636
|
-
/* @__PURE__ */
|
|
7637
|
-
/* @__PURE__ */
|
|
7862
|
+
return /* @__PURE__ */ jsxs19(Surface, { appearance, className, style, children: [
|
|
7863
|
+
/* @__PURE__ */ jsx19("div", { className: "mbow-head", children: /* @__PURE__ */ jsxs19("div", { children: [
|
|
7864
|
+
/* @__PURE__ */ jsx19("h2", { children: "Productivity" }),
|
|
7865
|
+
/* @__PURE__ */ jsx19("p", { className: "mbow-sub", children: "Bills created and sent per biller, plus accepted-first-try rate." })
|
|
7638
7866
|
] }) }),
|
|
7639
|
-
/* @__PURE__ */
|
|
7640
|
-
error ? /* @__PURE__ */
|
|
7641
|
-
/* @__PURE__ */
|
|
7642
|
-
/* @__PURE__ */
|
|
7643
|
-
/* @__PURE__ */
|
|
7644
|
-
/* @__PURE__ */
|
|
7645
|
-
/* @__PURE__ */
|
|
7867
|
+
/* @__PURE__ */ jsx19(RangeToolbar, { from, to, setFrom, setTo }),
|
|
7868
|
+
error ? /* @__PURE__ */ jsx19("div", { className: "mbow-state mbow-error", children: error.message }) : !data ? /* @__PURE__ */ jsx19("div", { className: "mbow-state", children: "Loading report\u2026" }) : /* @__PURE__ */ jsxs19(Fragment16, { children: [
|
|
7869
|
+
/* @__PURE__ */ jsxs19("div", { className: "mbow-metrics", children: [
|
|
7870
|
+
/* @__PURE__ */ jsx19(Metric, { label: "Bills created", value: String(data.totalCreated) }),
|
|
7871
|
+
/* @__PURE__ */ jsx19(Metric, { label: "Transmissions", value: String(data.totalSent) }),
|
|
7872
|
+
/* @__PURE__ */ jsx19(Metric, { label: "Bills submitted", value: String(data.totalSubmitted) }),
|
|
7873
|
+
/* @__PURE__ */ jsx19(Metric, { label: "Accepted first try", value: data.totalSubmitted ? `${Math.round(data.totalClean / data.totalSubmitted * 100)}%` : "\u2014" })
|
|
7646
7874
|
] }),
|
|
7647
|
-
/* @__PURE__ */
|
|
7648
|
-
/* @__PURE__ */
|
|
7649
|
-
/* @__PURE__ */
|
|
7650
|
-
/* @__PURE__ */
|
|
7651
|
-
/* @__PURE__ */
|
|
7652
|
-
/* @__PURE__ */
|
|
7653
|
-
/* @__PURE__ */
|
|
7654
|
-
/* @__PURE__ */
|
|
7655
|
-
/* @__PURE__ */
|
|
7656
|
-
/* @__PURE__ */
|
|
7875
|
+
/* @__PURE__ */ jsxs19("div", { className: "mbow-card mbow-scroll", children: [
|
|
7876
|
+
/* @__PURE__ */ jsx19("div", { className: "mbow-section-head", children: /* @__PURE__ */ jsx19("h3", { children: "Per-biller summary" }) }),
|
|
7877
|
+
/* @__PURE__ */ jsxs19("table", { className: "mbow-table", children: [
|
|
7878
|
+
/* @__PURE__ */ jsx19("thead", { children: /* @__PURE__ */ jsxs19("tr", { children: [
|
|
7879
|
+
/* @__PURE__ */ jsx19("th", { children: "Biller" }),
|
|
7880
|
+
/* @__PURE__ */ jsx19("th", { children: "Created" }),
|
|
7881
|
+
/* @__PURE__ */ jsx19("th", { children: "Transmissions" }),
|
|
7882
|
+
/* @__PURE__ */ jsx19("th", { children: "Submitted" }),
|
|
7883
|
+
/* @__PURE__ */ jsx19("th", { children: "Accepted first try" }),
|
|
7884
|
+
/* @__PURE__ */ jsx19("th", { children: "Volume" })
|
|
7657
7885
|
] }) }),
|
|
7658
|
-
/* @__PURE__ */
|
|
7886
|
+
/* @__PURE__ */ jsx19("tbody", { children: data.billers.map((biller) => {
|
|
7659
7887
|
const sent = data.sentTotal[biller.name] ?? 0;
|
|
7660
7888
|
const submitted = data.submittedTotal[biller.name] ?? 0;
|
|
7661
7889
|
const clean = data.cleanTotal[biller.name] ?? 0;
|
|
7662
|
-
return /* @__PURE__ */
|
|
7663
|
-
/* @__PURE__ */
|
|
7664
|
-
/* @__PURE__ */
|
|
7665
|
-
/* @__PURE__ */
|
|
7666
|
-
/* @__PURE__ */
|
|
7667
|
-
/* @__PURE__ */
|
|
7668
|
-
/* @__PURE__ */
|
|
7890
|
+
return /* @__PURE__ */ jsxs19("tr", { children: [
|
|
7891
|
+
/* @__PURE__ */ jsx19("td", { className: "mbow-strong", children: biller.name }),
|
|
7892
|
+
/* @__PURE__ */ jsx19("td", { children: data.createdTotal[biller.name] ?? 0 }),
|
|
7893
|
+
/* @__PURE__ */ jsx19("td", { children: sent }),
|
|
7894
|
+
/* @__PURE__ */ jsx19("td", { children: submitted }),
|
|
7895
|
+
/* @__PURE__ */ jsx19("td", { children: submitted ? `${Math.round(clean / submitted * 100)}%` : "\u2014" }),
|
|
7896
|
+
/* @__PURE__ */ jsx19("td", { children: /* @__PURE__ */ jsx19("div", { className: "mbow-bar", children: /* @__PURE__ */ jsx19("i", { style: { width: `${sent / maxSent * 100}%` } }) }) })
|
|
7669
7897
|
] }, biller.name);
|
|
7670
7898
|
}) })
|
|
7671
7899
|
] })
|
|
@@ -7673,45 +7901,45 @@ function ConnectedProductivityReport({ appearance, className, style, initialFrom
|
|
|
7673
7901
|
] })
|
|
7674
7902
|
] });
|
|
7675
7903
|
}
|
|
7676
|
-
function ConnectedBillingWorkspace({ appearance, className, style, initialView = "tasks", onCreateBill, getCourtesyCopyRecipientOptions, ...options }) {
|
|
7904
|
+
function ConnectedBillingWorkspace({ appearance, className, style, initialView = "tasks", onCreateBill, sandboxControls = false, getCourtesyCopyRecipientOptions, ...options }) {
|
|
7677
7905
|
const client = useClient(options);
|
|
7678
|
-
const [view, setView] =
|
|
7679
|
-
const [billQuery, setBillQuery] =
|
|
7680
|
-
const [selectedBillId, setSelectedBillId] =
|
|
7906
|
+
const [view, setView] = useState15(initialView);
|
|
7907
|
+
const [billQuery, setBillQuery] = useState15({ status: "all" });
|
|
7908
|
+
const [selectedBillId, setSelectedBillId] = useState15(null);
|
|
7681
7909
|
const { workspaceRef, availableHeight } = useAvailableViewportHeight();
|
|
7682
7910
|
const workspaceClassName = ["mbow-workspace", className].filter(Boolean).join(" ");
|
|
7683
7911
|
const hasExplicitHeight = style?.height != null || style?.maxHeight != null;
|
|
7684
7912
|
const workspaceStyle = availableHeight == null || hasExplicitHeight ? style : { ...style, maxHeight: availableHeight };
|
|
7685
|
-
if (selectedBillId) return /* @__PURE__ */
|
|
7686
|
-
/* @__PURE__ */
|
|
7687
|
-
/* @__PURE__ */
|
|
7913
|
+
if (selectedBillId) return /* @__PURE__ */ jsxs19(Surface, { surfaceRef: workspaceRef, appearance, className: workspaceClassName, style: workspaceStyle, children: [
|
|
7914
|
+
/* @__PURE__ */ jsx19("button", { className: "mbow-button mbow-back", type: "button", onClick: () => setSelectedBillId(null), children: "\u2190 Back to bills" }),
|
|
7915
|
+
/* @__PURE__ */ jsx19(ConnectedBillLifecycle, { billId: selectedBillId, sandboxControls, courtesyCopyRecipientOptions: getCourtesyCopyRecipientOptions?.(selectedBillId) ?? [], ...options, ...appearance ? { appearance } : {} })
|
|
7688
7916
|
] });
|
|
7689
7917
|
const selectView = (next) => {
|
|
7690
7918
|
setView(next);
|
|
7691
7919
|
setSelectedBillId(null);
|
|
7692
7920
|
};
|
|
7693
7921
|
const appearanceProps = appearance ? { appearance } : {};
|
|
7694
|
-
return /* @__PURE__ */
|
|
7695
|
-
/* @__PURE__ */
|
|
7696
|
-
/* @__PURE__ */
|
|
7697
|
-
/* @__PURE__ */
|
|
7698
|
-
/* @__PURE__ */
|
|
7922
|
+
return /* @__PURE__ */ jsxs19(Surface, { surfaceRef: workspaceRef, appearance, className: workspaceClassName, style: workspaceStyle, children: [
|
|
7923
|
+
/* @__PURE__ */ jsxs19("div", { className: "mbow-head", children: [
|
|
7924
|
+
/* @__PURE__ */ jsxs19("div", { children: [
|
|
7925
|
+
/* @__PURE__ */ jsx19("h2", { children: "Billing" }),
|
|
7926
|
+
/* @__PURE__ */ jsx19("p", { className: "mbow-sub", children: "Follow up on open work or find any bill and its current status." })
|
|
7699
7927
|
] }),
|
|
7700
|
-
onCreateBill ? /* @__PURE__ */
|
|
7928
|
+
onCreateBill ? /* @__PURE__ */ jsx19("div", { className: "mbow-actions", children: /* @__PURE__ */ jsx19("button", { className: "mbow-button primary", type: "button", onClick: onCreateBill, children: "+ Add bill" }) }) : null
|
|
7701
7929
|
] }),
|
|
7702
|
-
/* @__PURE__ */
|
|
7703
|
-
view === "tasks" ? /* @__PURE__ */
|
|
7930
|
+
/* @__PURE__ */ jsx19("div", { className: "mbow-tabs", role: "tablist", children: [["tasks", "Bill tasks"], ["bills", "All bills"], ["procedures", "Procedures"], ["productivity", "Productivity"]].map(([id, label]) => /* @__PURE__ */ jsx19("button", { className: `mbow-tab ${view === id ? "active" : ""}`, type: "button", role: "tab", "aria-selected": view === id, onClick: () => selectView(id), children: label }, id)) }),
|
|
7931
|
+
view === "tasks" ? /* @__PURE__ */ jsx19(BillTasksContent, { client, onDrillDown: (query) => {
|
|
7704
7932
|
setBillQuery(query);
|
|
7705
7933
|
setView("bills");
|
|
7706
|
-
}, appearance }) : view === "bills" ? /* @__PURE__ */
|
|
7934
|
+
}, appearance }) : view === "bills" ? /* @__PURE__ */ jsx19(BillSearchContent, { client, initialQuery: billQuery, onSelectBill: (bill) => setSelectedBillId(bill.id) }) : view === "procedures" ? /* @__PURE__ */ jsx19(ConnectedServiceLineItemsReport, { ...options, ...appearanceProps, onSelectBill: setSelectedBillId }) : /* @__PURE__ */ jsx19(ConnectedProductivityReport, { ...options, ...appearanceProps })
|
|
7707
7935
|
] });
|
|
7708
7936
|
}
|
|
7709
7937
|
|
|
7710
7938
|
// src/index.tsx
|
|
7711
7939
|
function widget(tagName, props) {
|
|
7712
|
-
const ref =
|
|
7940
|
+
const ref = useRef10(null);
|
|
7713
7941
|
const { onMindBill, onMindBillError } = props;
|
|
7714
|
-
|
|
7942
|
+
useEffect14(() => {
|
|
7715
7943
|
const element = ref.current;
|
|
7716
7944
|
if (!element) return;
|
|
7717
7945
|
const handleEvent = (event) => onMindBill?.(event);
|
|
@@ -7790,6 +8018,7 @@ export {
|
|
|
7790
8018
|
ConnectedBillStatus,
|
|
7791
8019
|
ConnectedBillTasksDashboard,
|
|
7792
8020
|
ConnectedBillingWorkspace,
|
|
8021
|
+
ConnectedNotificationSettings,
|
|
7793
8022
|
ConnectedProductivityReport,
|
|
7794
8023
|
ConnectedServiceLineItemsReport,
|
|
7795
8024
|
DEFAULT_BILL_SUBMISSION_MODIFIERS,
|
|
@@ -7798,6 +8027,7 @@ export {
|
|
|
7798
8027
|
MED_LEGAL_REPORT_TYPE_CODE,
|
|
7799
8028
|
MindBillBillReview,
|
|
7800
8029
|
MindBillBillTimeline,
|
|
8030
|
+
NotificationSettings,
|
|
7801
8031
|
OrganizationOnboarding,
|
|
7802
8032
|
PSYCH_QME_DEFAULT_DIAGNOSIS,
|
|
7803
8033
|
REPORT_BILL_STATUS_OPTIONS2 as REPORT_BILL_STATUS_OPTIONS,
|