@mindbill/react 0.45.0 → 0.46.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 +442 -403
- package/dist/index.js +263 -90
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,5 +1,45 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
+
// src/billing-profile-options.ts
|
|
4
|
+
function organizationProfileOptions(profile) {
|
|
5
|
+
return {
|
|
6
|
+
billingProviders: profile.billingProviders.map((provider) => ({
|
|
7
|
+
id: provider.id,
|
|
8
|
+
label: provider.name,
|
|
9
|
+
value: {
|
|
10
|
+
name: provider.name,
|
|
11
|
+
taxId: provider.taxId,
|
|
12
|
+
npi: provider.npi,
|
|
13
|
+
...provider.phone !== void 0 ? { phone: provider.phone } : {},
|
|
14
|
+
address: { line1: provider.billingStreet ?? "", city: provider.billingCity ?? "", state: provider.billingState ?? "", postalCode: provider.billingZip ?? "" }
|
|
15
|
+
}
|
|
16
|
+
})),
|
|
17
|
+
renderingProviders: (profile.renderingProviders ?? []).filter((provider) => provider.active !== false).map((provider) => ({
|
|
18
|
+
id: provider.id,
|
|
19
|
+
label: provider.name,
|
|
20
|
+
value: {
|
|
21
|
+
name: provider.name,
|
|
22
|
+
npi: provider.npi,
|
|
23
|
+
...provider.specialty !== void 0 ? { specialty: provider.specialty } : {},
|
|
24
|
+
...provider.taxonomy !== void 0 ? { taxonomy: provider.taxonomy } : {},
|
|
25
|
+
...provider.licenseNumber !== void 0 ? { licenseNumber: provider.licenseNumber } : {},
|
|
26
|
+
...provider.licenseState !== void 0 ? { licenseState: provider.licenseState } : {},
|
|
27
|
+
...provider.isQME !== void 0 ? { isQme: provider.isQME } : {},
|
|
28
|
+
...provider.isAME !== void 0 ? { isAme: provider.isAME } : {}
|
|
29
|
+
}
|
|
30
|
+
})),
|
|
31
|
+
serviceLocations: profile.locations.filter((location) => location.active !== false).map((location) => ({
|
|
32
|
+
id: location.id,
|
|
33
|
+
label: location.nickname || location.name,
|
|
34
|
+
value: {
|
|
35
|
+
name: location.name,
|
|
36
|
+
placeOfServiceCode: location.posCode ?? "",
|
|
37
|
+
address: { line1: location.street, city: location.city, state: location.state, postalCode: location.zip }
|
|
38
|
+
}
|
|
39
|
+
}))
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
|
|
3
43
|
// src/index.tsx
|
|
4
44
|
import "@mindbill/embed";
|
|
5
45
|
import { createElement, useEffect as useEffect12, useRef as useRef8 } from "react";
|
|
@@ -99,8 +139,8 @@ var mindBillThemePresets = {
|
|
|
99
139
|
textColor: "#05092e",
|
|
100
140
|
mutedColor: "#596078",
|
|
101
141
|
borderColor: "#d9dae1",
|
|
102
|
-
borderRadius: "
|
|
103
|
-
controlRadius: "
|
|
142
|
+
borderRadius: "10px",
|
|
143
|
+
controlRadius: "6px",
|
|
104
144
|
shadow: "0 1px 2px rgba(5,9,46,.04)",
|
|
105
145
|
dangerColor: "#b42318",
|
|
106
146
|
successColor: "#167a58",
|
|
@@ -114,6 +154,7 @@ function resolveMindBillAppearance(appearance) {
|
|
|
114
154
|
}
|
|
115
155
|
function mindBillAppearanceStyle(appearance, style) {
|
|
116
156
|
const resolved = resolveMindBillAppearance(appearance);
|
|
157
|
+
const dashboard = resolved.dashboard;
|
|
117
158
|
return {
|
|
118
159
|
"--mb-accent": resolved.accentColor,
|
|
119
160
|
"--mb-accent-contrast": resolved.accentTextColor,
|
|
@@ -130,6 +171,25 @@ function mindBillAppearanceStyle(appearance, style) {
|
|
|
130
171
|
"--mb-danger": resolved.dangerColor,
|
|
131
172
|
"--mb-success": resolved.successColor,
|
|
132
173
|
"--mb-warning": resolved.warningColor,
|
|
174
|
+
"--mbtk-border": dashboard?.borderColor ?? "var(--mb-border)",
|
|
175
|
+
"--mbtk-border-width": dashboard?.borderWidth ?? "1px",
|
|
176
|
+
"--mbtk-radius": dashboard?.borderRadius ?? "var(--mb-radius)",
|
|
177
|
+
"--mbtk-section-gap": dashboard?.sectionGap ?? "16px",
|
|
178
|
+
"--mbtk-row-height": dashboard?.rowMinHeight ?? "44px",
|
|
179
|
+
// Brand accents can be intentionally pale. Counts remain legible on a surface.
|
|
180
|
+
"--mbtk-link": dashboard?.linkColor ?? "var(--mb-text)",
|
|
181
|
+
"--mbtk-violet": dashboard?.sectionColors?.violet ?? "var(--mb-accent)",
|
|
182
|
+
"--mbtk-red": dashboard?.sectionColors?.red ?? "var(--mb-danger)",
|
|
183
|
+
"--mbtk-blue": dashboard?.sectionColors?.blue ?? "var(--mb-accent)",
|
|
184
|
+
"--mbtk-green": dashboard?.sectionColors?.green ?? "var(--mb-success)",
|
|
185
|
+
"--mbtk-amber": dashboard?.sectionColors?.amber ?? "var(--mb-warning)",
|
|
186
|
+
"--mbtk-neutral": dashboard?.sectionColors?.neutral ?? "var(--mb-muted)",
|
|
187
|
+
"--mbtk-aging-text": dashboard?.agingTextColor ?? "var(--mb-text)",
|
|
188
|
+
"--mbtk-aging-radius": dashboard?.agingRadius ?? "var(--mb-control-radius)",
|
|
189
|
+
...Object.fromEntries(Array.from({ length: 5 }, (_, index) => [
|
|
190
|
+
`--mbtk-aging-${index + 1}`,
|
|
191
|
+
dashboard?.agingColors?.[index] ?? `color-mix(in srgb,var(--mb-accent) ${6 + index * 4}%,var(--mb-surface))`
|
|
192
|
+
])),
|
|
133
193
|
...style
|
|
134
194
|
};
|
|
135
195
|
}
|
|
@@ -2564,6 +2624,8 @@ function BillSubmissionForm({
|
|
|
2564
2624
|
getSession,
|
|
2565
2625
|
sessionEndpoint,
|
|
2566
2626
|
apiBaseUrl,
|
|
2627
|
+
profileOptions,
|
|
2628
|
+
profileDisplay = "expanded",
|
|
2567
2629
|
fetch: fetchOverride,
|
|
2568
2630
|
onListClaimsAdministrators,
|
|
2569
2631
|
onSearchClaimsAdministrators,
|
|
@@ -2593,6 +2655,7 @@ function BillSubmissionForm({
|
|
|
2593
2655
|
children
|
|
2594
2656
|
}) {
|
|
2595
2657
|
const [bill, setBill] = useState5(() => cloneInitialBill(initialBill));
|
|
2658
|
+
const [providerEditing, setProviderEditing] = useState5(false);
|
|
2596
2659
|
const [selectedIds, setSelectedIds] = useState5(() => attachments.map((item) => item.id));
|
|
2597
2660
|
const [removedSourceIds, setRemovedSourceIds] = useState5([]);
|
|
2598
2661
|
const [uploads, setUploads] = useState5([]);
|
|
@@ -3084,36 +3147,55 @@ function BillSubmissionForm({
|
|
|
3084
3147
|
] })
|
|
3085
3148
|
] })
|
|
3086
3149
|
] });
|
|
3150
|
+
const compactProviders = profileDisplay === "compact";
|
|
3151
|
+
const providerErrors = Object.keys(errors).some((path) => /^(billingProvider|renderingProvider|serviceLocation)\./.test(path));
|
|
3087
3152
|
const providersSection = /* @__PURE__ */ jsxs5("fieldset", { className: "mbsf-card", disabled: locked, children: [
|
|
3088
3153
|
/* @__PURE__ */ jsx5("legend", { className: "mbsf-legend", children: "Providers & place of service" }),
|
|
3089
|
-
/* @__PURE__ */
|
|
3090
|
-
|
|
3091
|
-
/* @__PURE__ */
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
/* @__PURE__ */ jsx5(
|
|
3102
|
-
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
-
/* @__PURE__ */ jsx5("
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
|
|
3154
|
+
/* @__PURE__ */ jsx5("div", { className: "mbsf-grid", children: [["billingProviders", "billingProvider", "Billing provider"], ["renderingProviders", "renderingProvider", "Rendering provider"], ["serviceLocations", "serviceLocation", "Service location"]].map(([collection, key, label]) => {
|
|
3155
|
+
const options = profileOptions?.[collection];
|
|
3156
|
+
return options?.length ? /* @__PURE__ */ jsxs5(Field2, { label: `Saved ${label.toLowerCase()}`, children: [
|
|
3157
|
+
/* @__PURE__ */ jsx5(ComboBox, { ariaLabel: `Saved ${label.toLowerCase()}`, disabled: locked, value: "", placeholder: bill[key]?.name || `Choose ${label.toLowerCase()}\u2026`, options: options.map(({ id, label: optionLabel }) => ({ id, label: optionLabel })), onSelect: ({ id }) => {
|
|
3158
|
+
const option = options.find((candidate) => candidate.id === id);
|
|
3159
|
+
if (option) setBill((current) => ({ ...current, [key]: structuredClone(option.value) }));
|
|
3160
|
+
} }),
|
|
3161
|
+
/* @__PURE__ */ jsx5("small", { className: "mbsf-help", children: bill[key]?.name ? `Current: ${bill[key]?.name}` : "Select a profile or enter details below." })
|
|
3162
|
+
] }, key) : null;
|
|
3163
|
+
}) }),
|
|
3164
|
+
compactProviders ? /* @__PURE__ */ jsx5("p", { className: "mbsf-help", children: [bill.billingProvider?.name, bill.renderingProvider?.name, bill.serviceLocation?.name].filter(Boolean).join(" \xB7 ") || "Enter provider details or choose saved profiles." }) : null,
|
|
3165
|
+
/* @__PURE__ */ jsxs5("details", { open: !compactProviders || providerEditing || providerErrors, children: [
|
|
3166
|
+
/* @__PURE__ */ jsx5("summary", { hidden: !compactProviders, onClick: (event) => {
|
|
3167
|
+
event.preventDefault();
|
|
3168
|
+
setProviderEditing((current) => !current);
|
|
3169
|
+
}, style: { cursor: "pointer", marginBottom: 12 }, children: "Review or edit provider details" }),
|
|
3170
|
+
/* @__PURE__ */ jsxs5("div", { className: "mbsf-grid", children: [
|
|
3171
|
+
/* @__PURE__ */ jsx5("h4", { className: "mbsf-subhead", children: "Billing provider" }),
|
|
3172
|
+
/* @__PURE__ */ jsx5(Field2, { path: "billingProvider.name", label: "Billing provider name", required: true, error: errors["billingProvider.name"], children: text(bill.billingProvider?.name, (name) => setBill((c) => ({ ...c, billingProvider: { ...c.billingProvider, name } }))) }),
|
|
3173
|
+
/* @__PURE__ */ jsx5(Field2, { path: "billingProvider.taxId", label: "Tax ID (EIN / SSN)", required: true, error: errors["billingProvider.taxId"], children: text(bill.billingProvider?.taxId, (taxId) => setBill((c) => ({ ...c, billingProvider: { ...c.billingProvider, taxId } })), { inputMode: "numeric" }) }),
|
|
3174
|
+
/* @__PURE__ */ jsx5(Field2, { path: "billingProvider.npi", label: "Billing provider NPI", required: true, error: errors["billingProvider.npi"], children: text(bill.billingProvider?.npi, (npi) => setBill((c) => ({ ...c, billingProvider: { ...c.billingProvider, npi } })), { inputMode: "numeric", maxLength: 10 }) }),
|
|
3175
|
+
/* @__PURE__ */ jsx5(Field2, { path: "billingProvider.phone", label: "Billing provider phone", required: true, error: errors["billingProvider.phone"], children: text(bill.billingProvider?.phone, (phone) => setBill((c) => ({ ...c, billingProvider: { ...c.billingProvider, phone } })), { type: "tel" }) }),
|
|
3176
|
+
/* @__PURE__ */ jsx5(Field2, { path: "billingProvider.address.line1", label: "Billing address line 1", required: true, span: true, error: errors["billingProvider.address.line1"], children: text(bill.billingProvider?.address?.line1, (line1) => setBill((c) => ({ ...c, billingProvider: { ...c.billingProvider, address: { line1, line2: c.billingProvider?.address?.line2 ?? "", city: c.billingProvider?.address?.city ?? "", state: c.billingProvider?.address?.state ?? "", postalCode: c.billingProvider?.address?.postalCode ?? "" } } }))) }),
|
|
3177
|
+
/* @__PURE__ */ jsx5(Field2, { label: "Billing address line 2 (optional)", span: true, children: text(bill.billingProvider?.address?.line2, (line2) => setBill((c) => ({ ...c, billingProvider: { ...c.billingProvider, address: { line1: c.billingProvider?.address?.line1 ?? "", line2, city: c.billingProvider?.address?.city ?? "", state: c.billingProvider?.address?.state ?? "", postalCode: c.billingProvider?.address?.postalCode ?? "" } } }))) }),
|
|
3178
|
+
/* @__PURE__ */ jsx5(Field2, { path: "billingProvider.address.city", label: "Billing city", required: true, error: errors["billingProvider.address.city"], children: text(bill.billingProvider?.address?.city, (city) => setBill((c) => ({ ...c, billingProvider: { ...c.billingProvider, address: { line1: c.billingProvider?.address?.line1 ?? "", line2: c.billingProvider?.address?.line2 ?? "", city, state: c.billingProvider?.address?.state ?? "", postalCode: c.billingProvider?.address?.postalCode ?? "" } } }))) }),
|
|
3179
|
+
/* @__PURE__ */ jsx5(Field2, { path: "billingProvider.address.state", label: "Billing state", required: true, error: errors["billingProvider.address.state"], children: text(bill.billingProvider?.address?.state, (state) => setBill((c) => ({ ...c, billingProvider: { ...c.billingProvider, address: { line1: c.billingProvider?.address?.line1 ?? "", line2: c.billingProvider?.address?.line2 ?? "", city: c.billingProvider?.address?.city ?? "", state: state.toUpperCase(), postalCode: c.billingProvider?.address?.postalCode ?? "" } } })), { maxLength: 2 }) }),
|
|
3180
|
+
/* @__PURE__ */ jsx5(Field2, { path: "billingProvider.address.postalCode", label: "Billing ZIP", required: true, error: errors["billingProvider.address.postalCode"], children: text(bill.billingProvider?.address?.postalCode, (postalCode) => setBill((c) => ({ ...c, billingProvider: { ...c.billingProvider, address: { line1: c.billingProvider?.address?.line1 ?? "", line2: c.billingProvider?.address?.line2 ?? "", city: c.billingProvider?.address?.city ?? "", state: c.billingProvider?.address?.state ?? "", postalCode } } }))) }),
|
|
3181
|
+
/* @__PURE__ */ jsx5("h4", { className: "mbsf-subhead", children: "Rendering provider" }),
|
|
3182
|
+
/* @__PURE__ */ jsx5(Field2, { path: "renderingProvider.name", label: "Rendering provider name", required: true, error: errors["renderingProvider.name"], children: text(bill.renderingProvider?.name, (name) => setBill((c) => ({ ...c, renderingProvider: { ...c.renderingProvider, name } }))) }),
|
|
3183
|
+
/* @__PURE__ */ jsx5(Field2, { path: "renderingProvider.npi", label: "Rendering provider NPI", required: true, error: errors["renderingProvider.npi"], children: text(bill.renderingProvider?.npi, (npi) => setBill((c) => ({ ...c, renderingProvider: { ...c.renderingProvider, npi } })), { inputMode: "numeric", maxLength: 10 }) }),
|
|
3184
|
+
/* @__PURE__ */ jsxs5(Field2, { path: "renderingProvider.taxonomy", label: "Rendering taxonomy", required: true, error: errors["renderingProvider.taxonomy"], children: [
|
|
3185
|
+
/* @__PURE__ */ jsx5(ComboBox, { ariaLabel: "Rendering taxonomy", invalid: Boolean(errors["renderingProvider.taxonomy"]), disabled: locked, preserveValueOnOpen: true, value: bill.renderingProvider?.taxonomy ?? "", placeholder: "Search specialty name or taxonomy code\u2026", options: taxonomies.map((item) => ({ id: item.code, label: item.description, detail: item.code })), createOption: (query) => {
|
|
3186
|
+
const code = query.trim().toUpperCase();
|
|
3187
|
+
return /^[A-Z0-9]{10}$/.test(code) ? { id: code, label: code, detail: "Use this taxonomy code" } : null;
|
|
3188
|
+
}, onSelect: (option) => setBill((c) => ({ ...c, renderingProvider: { ...c.renderingProvider, taxonomy: option.id } })) }),
|
|
3189
|
+
/* @__PURE__ */ jsx5("small", { className: "mbsf-help", children: "Search by specialty name or 10-character taxonomy code." })
|
|
3190
|
+
] }),
|
|
3191
|
+
/* @__PURE__ */ jsx5("h4", { className: "mbsf-subhead", children: "Service facility" }),
|
|
3192
|
+
/* @__PURE__ */ jsx5(Field2, { path: "serviceLocation.placeOfServiceCode", label: "Place of service code", required: true, error: errors["serviceLocation.placeOfServiceCode"], children: text(bill.serviceLocation?.placeOfServiceCode, (placeOfServiceCode) => setBill((c) => ({ ...c, serviceLocation: { ...c.serviceLocation, placeOfServiceCode } })), { inputMode: "numeric", maxLength: 2, placeholder: "11" }) }),
|
|
3193
|
+
/* @__PURE__ */ jsx5(Field2, { path: "serviceLocation.address.line1", label: "Service address line 1", required: true, span: true, error: errors["serviceLocation.address.line1"], children: text(bill.serviceLocation?.address?.line1, (line1) => setBill((c) => ({ ...c, serviceLocation: { ...c.serviceLocation, address: { line1, line2: c.serviceLocation?.address?.line2 ?? "", city: c.serviceLocation?.address?.city ?? "", state: c.serviceLocation?.address?.state ?? "", postalCode: c.serviceLocation?.address?.postalCode ?? "" } } }))) }),
|
|
3194
|
+
/* @__PURE__ */ jsx5(Field2, { label: "Service address line 2 (optional)", span: true, children: text(bill.serviceLocation?.address?.line2, (line2) => setBill((c) => ({ ...c, serviceLocation: { ...c.serviceLocation, address: { line1: c.serviceLocation?.address?.line1 ?? "", line2, city: c.serviceLocation?.address?.city ?? "", state: c.serviceLocation?.address?.state ?? "", postalCode: c.serviceLocation?.address?.postalCode ?? "" } } }))) }),
|
|
3195
|
+
/* @__PURE__ */ jsx5(Field2, { path: "serviceLocation.address.city", label: "Service city", required: true, error: errors["serviceLocation.address.city"], children: text(bill.serviceLocation?.address?.city, (city) => setBill((c) => ({ ...c, serviceLocation: { ...c.serviceLocation, address: { line1: c.serviceLocation?.address?.line1 ?? "", line2: c.serviceLocation?.address?.line2 ?? "", city, state: c.serviceLocation?.address?.state ?? "", postalCode: c.serviceLocation?.address?.postalCode ?? "" } } }))) }),
|
|
3196
|
+
/* @__PURE__ */ jsx5(Field2, { path: "serviceLocation.address.state", label: "Service state", required: true, error: errors["serviceLocation.address.state"], children: text(bill.serviceLocation?.address?.state, (state) => setBill((c) => ({ ...c, serviceLocation: { ...c.serviceLocation, address: { line1: c.serviceLocation?.address?.line1 ?? "", line2: c.serviceLocation?.address?.line2 ?? "", city: c.serviceLocation?.address?.city ?? "", state: state.toUpperCase(), postalCode: c.serviceLocation?.address?.postalCode ?? "" } } })), { maxLength: 2 }) }),
|
|
3197
|
+
/* @__PURE__ */ jsx5(Field2, { path: "serviceLocation.address.postalCode", label: "Service ZIP", required: true, error: errors["serviceLocation.address.postalCode"], children: text(bill.serviceLocation?.address?.postalCode, (postalCode) => setBill((c) => ({ ...c, serviceLocation: { ...c.serviceLocation, address: { line1: c.serviceLocation?.address?.line1 ?? "", line2: c.serviceLocation?.address?.line2 ?? "", city: c.serviceLocation?.address?.city ?? "", state: c.serviceLocation?.address?.state ?? "", postalCode } } }))) })
|
|
3198
|
+
] })
|
|
3117
3199
|
] })
|
|
3118
3200
|
] });
|
|
3119
3201
|
const serviceLinesSection = /* @__PURE__ */ jsxs5("fieldset", { className: "mbsf-card", disabled: locked, children: [
|
|
@@ -3705,37 +3787,29 @@ import {
|
|
|
3705
3787
|
buildBillTasksDashboard
|
|
3706
3788
|
} from "@mindbill/browser";
|
|
3707
3789
|
import { Fragment as Fragment6, jsx as jsx8, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
3708
|
-
var TONES = {
|
|
3709
|
-
violet: "#7c53c3",
|
|
3710
|
-
red: "#cf4437",
|
|
3711
|
-
blue: "#2f7fd1",
|
|
3712
|
-
green: "#2c9a5b",
|
|
3713
|
-
amber: "#d9931f",
|
|
3714
|
-
neutral: "#8195a1"
|
|
3715
|
-
};
|
|
3716
|
-
var BUCKET_PILL_BASES = ["#2c9a5b", "#1f9aa8", "#dcbb28", "#e08a2e", "#d75d8a"];
|
|
3717
3790
|
var css6 = `
|
|
3718
3791
|
.mbtk{color:var(--mb-text);font-family:var(--mb-font);font-size:14px}.mbtk *{box-sizing:border-box}.mbtk h2,.mbtk p{margin:0}
|
|
3719
3792
|
.mbtk-heading{margin-bottom:14px}.mbtk-heading h2{font-size:24px}
|
|
3720
3793
|
.mbtk-toolbar{margin-bottom:14px}
|
|
3721
|
-
.mbtk-section{margin-bottom:
|
|
3722
|
-
.mbtk-section.is-grand{border-color:var(--mb-border)}
|
|
3794
|
+
.mbtk-section{margin-bottom:var(--mbtk-section-gap);border:var(--mbtk-border-width) solid var(--mbtk-border);border-radius:var(--mbtk-radius);background:var(--mb-surface);box-shadow:var(--mb-shadow);overflow:hidden}
|
|
3723
3795
|
.mbtk-grid{display:grid;grid-template-columns:var(--mbtk-cols);gap:0 10px;align-items:center;padding:0 16px}
|
|
3724
|
-
.mbtk-head{padding:12px 16px;border-bottom:1px solid
|
|
3796
|
+
.mbtk-head{padding:12px 16px;border-bottom:1px solid var(--mb-border)}
|
|
3725
3797
|
.mbtk-title{display:flex;align-items:center;gap:9px;min-width:0}
|
|
3726
3798
|
.mbtk-dot{flex:0 0 auto;width:11px;height:11px;border-radius:50%;background:var(--mbtk-tone,var(--mb-muted))}
|
|
3727
3799
|
.mbtk-title-text{min-width:0}
|
|
3728
3800
|
.mbtk-title-text strong{display:block;font-size:15.5px;line-height:1.3}
|
|
3729
3801
|
.mbtk-basis{display:block;color:var(--mb-muted);font-size:12px;line-height:1.35}
|
|
3730
|
-
.mbtk-pill{justify-self:stretch;padding:5px 6px;border-radius:
|
|
3802
|
+
.mbtk-pill{justify-self:stretch;padding:5px 6px;border-radius:var(--mbtk-aging-radius);background:var(--mb-soft);background:var(--mbtk-pill);color:var(--mbtk-aging-text);font-size:11px;font-weight:750;line-height:1.25;text-align:center;white-space:nowrap}
|
|
3731
3803
|
.mbtk-colhead{justify-self:stretch;color:var(--mb-muted);font-size:11px;font-weight:800;letter-spacing:.05em;text-transform:uppercase;text-align:center;white-space:nowrap}
|
|
3732
|
-
.mbtk-row{border-top:1px solid color-mix(in srgb,var(--mb-border) 60%,transparent);min-height:
|
|
3804
|
+
.mbtk-row{border-top:1px solid color-mix(in srgb,var(--mb-border) 60%,transparent);min-height:var(--mbtk-row-height)}
|
|
3733
3805
|
.mbtk-row:first-of-type{border-top:0}
|
|
3734
3806
|
.mbtk-rowlabel{color:var(--mb-muted);font-size:13px;line-height:1.35;padding:9px 0;overflow-wrap:anywhere}
|
|
3735
3807
|
.mbtk-count{text-align:center;font-variant-numeric:tabular-nums}
|
|
3736
3808
|
.mbtk-zero{color:var(--mb-muted)}
|
|
3737
|
-
.mbtk-
|
|
3809
|
+
.mbtk-bal{display:block;color:var(--mb-muted);font-size:11px;font-weight:550;line-height:1.35;white-space:nowrap;font-variant-numeric:tabular-nums}
|
|
3810
|
+
.mbtk-link{border:0;background:none;padding:6px 8px;min-height:44px;min-width:44px;color:var(--mbtk-link);font:inherit;font-weight:750;font-variant-numeric:tabular-nums;cursor:pointer;border-radius:var(--mb-control-radius)}
|
|
3738
3811
|
.mbtk-link:hover{text-decoration:underline;background:color-mix(in srgb,var(--mb-accent) 8%,transparent)}
|
|
3812
|
+
.mbtk-link:focus-visible{outline:2px solid var(--mbtk-link);outline-offset:2px;text-decoration:underline}
|
|
3739
3813
|
.mbtk-total{text-align:center}
|
|
3740
3814
|
.mbtk-totals{background:var(--mb-soft);border-top:1px solid var(--mb-border);font-weight:760}
|
|
3741
3815
|
.mbtk-totals .mbtk-rowlabel{color:var(--mb-text);font-weight:760}
|
|
@@ -3745,17 +3819,26 @@ var css6 = `
|
|
|
3745
3819
|
.mbtk-footnote{margin-top:12px;color:var(--mb-muted);font-size:12.5px}
|
|
3746
3820
|
@media(max-width:760px){.mbtk-pill,.mbtk-colhead,.mbtk-count{display:none}.mbtk-grid{grid-template-columns:minmax(0,1fr) auto}}
|
|
3747
3821
|
`;
|
|
3748
|
-
|
|
3822
|
+
var USD = new Intl.NumberFormat("en-US", { style: "currency", currency: "USD" });
|
|
3823
|
+
function cellBody(count, balance) {
|
|
3824
|
+
return /* @__PURE__ */ jsxs8(Fragment6, { children: [
|
|
3825
|
+
/* @__PURE__ */ jsx8("span", { children: count }),
|
|
3826
|
+
count > 0 && balance !== void 0 && Number.isFinite(balance) ? /* @__PURE__ */ jsx8("span", { className: "mbtk-bal", children: USD.format(balance) }) : null
|
|
3827
|
+
] });
|
|
3828
|
+
}
|
|
3829
|
+
function cellButton(key, count, className, label, onSelect, balance) {
|
|
3830
|
+
const ariaLabel = count > 0 && balance !== void 0 && Number.isFinite(balance) ? `${label} \xB7 ${USD.format(balance)} due` : label;
|
|
3749
3831
|
if (count > 0 && onSelect) {
|
|
3750
|
-
return /* @__PURE__ */ jsx8("span", { className, children: /* @__PURE__ */ jsx8("button", { type: "button", className: "mbtk-link", "aria-label":
|
|
3832
|
+
return /* @__PURE__ */ jsx8("span", { className, children: /* @__PURE__ */ jsx8("button", { type: "button", className: "mbtk-link", "aria-label": ariaLabel, onClick: onSelect, children: cellBody(count, balance) }) }, key);
|
|
3751
3833
|
}
|
|
3752
|
-
return /* @__PURE__ */ jsx8("span", { className: `${className}${count === 0 ? " mbtk-zero" : ""}`, children: count }, key);
|
|
3834
|
+
return /* @__PURE__ */ jsx8("span", { className: `${className}${count === 0 ? " mbtk-zero" : ""}`, children: cellBody(count, balance) }, key);
|
|
3753
3835
|
}
|
|
3754
3836
|
function TaskRow({
|
|
3755
3837
|
sectionId,
|
|
3756
3838
|
row,
|
|
3757
3839
|
buckets,
|
|
3758
|
-
onSelectCell
|
|
3840
|
+
onSelectCell,
|
|
3841
|
+
itemLabel
|
|
3759
3842
|
}) {
|
|
3760
3843
|
const allRefs = row.refs.flat();
|
|
3761
3844
|
return /* @__PURE__ */ jsxs8("div", { className: "mbtk-grid mbtk-row", children: [
|
|
@@ -3766,16 +3849,18 @@ function TaskRow({
|
|
|
3766
3849
|
bucket.id,
|
|
3767
3850
|
count,
|
|
3768
3851
|
"mbtk-count",
|
|
3769
|
-
`${row.label} \xB7 ${bucket.label}: ${count}
|
|
3770
|
-
onSelectCell ? () => onSelectCell({ sectionId, rowId: row.id, bucketId: bucket.id, refs: row.refs[index] ?? [], count }) : null
|
|
3852
|
+
`${row.label} \xB7 ${bucket.label}: ${count} ${itemLabel}`,
|
|
3853
|
+
onSelectCell ? () => onSelectCell({ sectionId, rowId: row.id, bucketId: bucket.id, refs: row.refs[index] ?? [], count }) : null,
|
|
3854
|
+
row.balances?.[index]
|
|
3771
3855
|
);
|
|
3772
3856
|
}),
|
|
3773
3857
|
cellButton(
|
|
3774
3858
|
"task-total",
|
|
3775
3859
|
row.total,
|
|
3776
3860
|
"mbtk-total",
|
|
3777
|
-
`${row.label} \xB7 all ages: ${row.total}
|
|
3778
|
-
onSelectCell ? () => onSelectCell({ sectionId, rowId: row.id, bucketId: null, refs: allRefs, count: row.total }) : null
|
|
3861
|
+
`${row.label} \xB7 all ages: ${row.total} ${itemLabel}`,
|
|
3862
|
+
onSelectCell ? () => onSelectCell({ sectionId, rowId: row.id, bucketId: null, refs: allRefs, count: row.total }) : null,
|
|
3863
|
+
row.balanceTotal
|
|
3779
3864
|
)
|
|
3780
3865
|
] });
|
|
3781
3866
|
}
|
|
@@ -3783,13 +3868,15 @@ function SectionCard({
|
|
|
3783
3868
|
section,
|
|
3784
3869
|
buckets,
|
|
3785
3870
|
emptyLabel,
|
|
3786
|
-
onSelectCell
|
|
3871
|
+
onSelectCell,
|
|
3872
|
+
totalLabel,
|
|
3873
|
+
itemLabel
|
|
3787
3874
|
}) {
|
|
3788
3875
|
return /* @__PURE__ */ jsxs8(
|
|
3789
3876
|
"section",
|
|
3790
3877
|
{
|
|
3791
3878
|
className: "mbtk-section",
|
|
3792
|
-
style: { "--mbtk-tone":
|
|
3879
|
+
style: { "--mbtk-tone": `var(--mbtk-${section.tone})` },
|
|
3793
3880
|
"aria-label": section.label,
|
|
3794
3881
|
children: [
|
|
3795
3882
|
/* @__PURE__ */ jsxs8("div", { className: "mbtk-grid mbtk-head", children: [
|
|
@@ -3807,19 +3894,19 @@ function SectionCard({
|
|
|
3807
3894
|
"span",
|
|
3808
3895
|
{
|
|
3809
3896
|
className: "mbtk-pill",
|
|
3810
|
-
style: { "--mbtk-pill":
|
|
3897
|
+
style: { "--mbtk-pill": `var(--mbtk-aging-${Math.min(index + 1, 5)})` },
|
|
3811
3898
|
children: bucket.label
|
|
3812
3899
|
},
|
|
3813
3900
|
bucket.id
|
|
3814
3901
|
)),
|
|
3815
|
-
/* @__PURE__ */ jsx8("span", { className: "mbtk-colhead", children:
|
|
3902
|
+
/* @__PURE__ */ jsx8("span", { className: "mbtk-colhead", children: totalLabel })
|
|
3816
3903
|
] }),
|
|
3817
3904
|
section.empty ? /* @__PURE__ */ jsx8("p", { className: "mbtk-empty", children: emptyLabel }) : /* @__PURE__ */ jsxs8(Fragment6, { children: [
|
|
3818
|
-
section.rows.map((row) => /* @__PURE__ */ jsx8(TaskRow, { sectionId: section.id, row, buckets, onSelectCell }, row.id)),
|
|
3905
|
+
section.rows.map((row) => /* @__PURE__ */ jsx8(TaskRow, { sectionId: section.id, row, buckets, onSelectCell, itemLabel }, row.id)),
|
|
3819
3906
|
/* @__PURE__ */ jsxs8("div", { className: "mbtk-grid mbtk-row mbtk-totals", children: [
|
|
3820
3907
|
/* @__PURE__ */ jsx8("span", { className: "mbtk-rowlabel", children: "Total" }),
|
|
3821
|
-
buckets.map((bucket, index) => /* @__PURE__ */ jsx8("span", { className: "mbtk-count", children: section.totals[index] ?? 0 }, bucket.id)),
|
|
3822
|
-
/* @__PURE__ */ jsx8("span", { className: "mbtk-total", children: section.total })
|
|
3908
|
+
buckets.map((bucket, index) => /* @__PURE__ */ jsx8("span", { className: "mbtk-count", children: cellBody(section.totals[index] ?? 0, section.balanceTotals?.[index]) }, bucket.id)),
|
|
3909
|
+
/* @__PURE__ */ jsx8("span", { className: "mbtk-total", children: cellBody(section.total, section.balanceTotal) })
|
|
3823
3910
|
] })
|
|
3824
3911
|
] })
|
|
3825
3912
|
]
|
|
@@ -3831,6 +3918,8 @@ function BillTasksDashboard({
|
|
|
3831
3918
|
buckets = BILL_TASKS_AGING_BUCKETS,
|
|
3832
3919
|
heading,
|
|
3833
3920
|
grandTotalLabel = "Bill Tasks Total",
|
|
3921
|
+
totalLabel = "Task Total",
|
|
3922
|
+
itemLabel = "tasks",
|
|
3834
3923
|
emptyLabel = "No Tasks",
|
|
3835
3924
|
onSelectCell,
|
|
3836
3925
|
toolbar,
|
|
@@ -3855,14 +3944,16 @@ function BillTasksDashboard({
|
|
|
3855
3944
|
section,
|
|
3856
3945
|
buckets,
|
|
3857
3946
|
emptyLabel,
|
|
3858
|
-
onSelectCell
|
|
3947
|
+
onSelectCell,
|
|
3948
|
+
totalLabel,
|
|
3949
|
+
itemLabel
|
|
3859
3950
|
},
|
|
3860
3951
|
section.id
|
|
3861
3952
|
)),
|
|
3862
3953
|
/* @__PURE__ */ jsx8("section", { className: "mbtk-section is-grand", "aria-label": grandTotalLabel, children: /* @__PURE__ */ jsxs8("div", { className: "mbtk-grid mbtk-row mbtk-grand mbtk-totals", children: [
|
|
3863
3954
|
/* @__PURE__ */ jsx8("span", { className: "mbtk-rowlabel", children: grandTotalLabel }),
|
|
3864
|
-
buckets.map((bucket, index) => /* @__PURE__ */ jsx8("span", { className: "mbtk-count", children: data.grandTotals[index] ?? 0 }, bucket.id)),
|
|
3865
|
-
/* @__PURE__ */ jsx8("span", { className: "mbtk-total", children: data.grandTotal })
|
|
3955
|
+
buckets.map((bucket, index) => /* @__PURE__ */ jsx8("span", { className: "mbtk-count", children: cellBody(data.grandTotals[index] ?? 0, data.grandBalanceTotals?.[index]) }, bucket.id)),
|
|
3956
|
+
/* @__PURE__ */ jsx8("span", { className: "mbtk-total", children: cellBody(data.grandTotal, data.grandBalanceTotal) })
|
|
3866
3957
|
] }) }),
|
|
3867
3958
|
footnote ? /* @__PURE__ */ jsx8("p", { className: "mbtk-footnote", children: footnote }) : null
|
|
3868
3959
|
]
|
|
@@ -4401,13 +4492,14 @@ function ReportBillStatusDialog({
|
|
|
4401
4492
|
}
|
|
4402
4493
|
|
|
4403
4494
|
// src/organization-onboarding.tsx
|
|
4404
|
-
import { useCallback as useCallback2, useEffect as useEffect7, useMemo as useMemo6, useRef as useRef3, useState as useState8 } from "react";
|
|
4495
|
+
import { useCallback as useCallback2, useEffect as useEffect7, useId as useId2, useMemo as useMemo6, useRef as useRef3, useState as useState8 } from "react";
|
|
4405
4496
|
import {
|
|
4406
4497
|
createOrganizationClient
|
|
4407
4498
|
} from "@mindbill/browser";
|
|
4408
4499
|
import { Fragment as Fragment9, jsx as jsx11, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
4409
4500
|
var STEPS = [
|
|
4410
4501
|
{ id: "practice", label: "Practice & billing" },
|
|
4502
|
+
{ id: "rendering", label: "Rendering providers" },
|
|
4411
4503
|
{ id: "locations", label: "Locations" },
|
|
4412
4504
|
{ id: "w9", label: "W-9" },
|
|
4413
4505
|
{ id: "review", label: "Review" }
|
|
@@ -4419,13 +4511,13 @@ var css9 = `
|
|
|
4419
4511
|
.mbob-steps{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:20px}
|
|
4420
4512
|
.mbob-step{display:inline-flex;align-items:center;gap:7px;border:1px solid var(--mb-border);border-radius:999px;background:var(--mb-surface);padding:7px 13px;color:var(--mb-muted);font:inherit;font-size:13px;font-weight:700;cursor:pointer}
|
|
4421
4513
|
.mbob-step[data-active=true]{border-color:var(--mb-accent);color:var(--mb-accent);background:color-mix(in srgb,var(--mb-accent) 8%,var(--mb-surface))}
|
|
4422
|
-
.mbob-step[data-done=true] i{color
|
|
4514
|
+
.mbob-step[data-done=true] i{color:var(--mb-success);font-style:normal}
|
|
4423
4515
|
.mbob-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px 22px}.mbob-span{grid-column:1/-1}
|
|
4424
4516
|
.mbob-field{display:grid;gap:7px;font-size:13px;font-weight:720}
|
|
4425
|
-
.mbob-field input{width:100%;min-height:44px;border:1px solid var(--mb-border);border-radius:var(--mb-control-radius);background:var(--mb-input);padding:10px 12px;color:var(--mb-text);font:inherit;font-weight:450}
|
|
4517
|
+
.mbob-field input,.mbob-field select{width:100%;min-height:44px;border:1px solid var(--mb-border);border-radius:var(--mb-control-radius);background:var(--mb-input);padding:10px 12px;color:var(--mb-text);font:inherit;font-weight:450}
|
|
4426
4518
|
.mbob-field input:focus{outline:3px solid color-mix(in srgb,var(--mb-accent) 22%,transparent);border-color:var(--mb-accent)}
|
|
4427
4519
|
.mbob-subhead{margin:20px 0 12px!important;padding-top:16px;border-top:1px solid var(--mb-border);font-size:15px}
|
|
4428
|
-
.mbob-loc{display:grid;grid-template-columns:
|
|
4520
|
+
.mbob-loc{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;align-items:end;border-top:1px solid color-mix(in srgb,var(--mb-border) 60%,transparent);padding:16px 0}
|
|
4429
4521
|
.mbob-loc:first-of-type{border-top:0}
|
|
4430
4522
|
.mbob-primary{display:inline-flex;align-items:center;gap:6px;font-size:12px;color:var(--mb-muted);white-space:nowrap;padding-bottom:12px}
|
|
4431
4523
|
.mbob-remove{border:0;background:transparent;color:var(--mb-muted);font-size:20px;cursor:pointer;padding-bottom:8px}
|
|
@@ -4433,21 +4525,22 @@ var css9 = `
|
|
|
4433
4525
|
.mbob-drop{display:grid;place-content:center;gap:6px;min-height:150px;border:2px dashed color-mix(in srgb,var(--mb-muted) 55%,transparent);border-radius:var(--mb-control-radius);text-align:center;cursor:pointer;position:relative}
|
|
4434
4526
|
.mbob-drop input{position:absolute;inset:0;opacity:0;cursor:pointer}
|
|
4435
4527
|
.mbob-drop span{color:var(--mb-muted);font-size:13px}
|
|
4436
|
-
.mbob-w9-current{display:flex;align-items:center;justify-content:space-between;gap:12px;border:1px solid
|
|
4528
|
+
.mbob-w9-current{display:flex;align-items:center;justify-content:space-between;gap:12px;border:1px solid color-mix(in srgb,var(--mb-success) 35%,var(--mb-border));border-radius:var(--mb-control-radius);background:color-mix(in srgb,var(--mb-success) 8%,var(--mb-surface));padding:12px 14px;margin-bottom:14px}
|
|
4437
4529
|
.mbob-w9-current span{color:var(--mb-muted);font-size:13px}
|
|
4438
4530
|
.mbob-check{display:grid;gap:9px}
|
|
4439
4531
|
.mbob-check-item{display:flex;align-items:center;gap:10px;border:1px solid var(--mb-border);border-radius:var(--mb-control-radius);padding:11px 14px}
|
|
4440
|
-
.mbob-check-item[data-complete=true]{border-color
|
|
4532
|
+
.mbob-check-item[data-complete=true]{border-color:color-mix(in srgb,var(--mb-success) 35%,var(--mb-border));background:color-mix(in srgb,var(--mb-success) 8%,var(--mb-surface))}
|
|
4441
4533
|
.mbob-check-item i{font-style:normal}
|
|
4442
4534
|
.mbob-actions{display:flex;justify-content:space-between;align-items:center;gap:14px;margin-top:20px}
|
|
4443
4535
|
.mbob-save{min-width:170px;border:0;border-radius:var(--mb-control-radius);background:var(--mb-accent);color:var(--mb-accent-contrast);padding:12px 22px;font:inherit;font-weight:780;cursor:pointer}
|
|
4444
4536
|
.mbob-save:disabled{opacity:.6;cursor:wait}
|
|
4445
4537
|
.mbob-error{margin-top:14px;border-left:4px solid var(--mb-danger);border-radius:var(--mb-control-radius);background:color-mix(in srgb,var(--mb-danger) 8%,var(--mb-surface));padding:12px 14px;color:var(--mb-danger)}
|
|
4446
4538
|
.mbob-status{color:var(--mb-muted)}
|
|
4447
|
-
.mbob-done{color
|
|
4539
|
+
.mbob-done{color:var(--mb-success);font-weight:750}
|
|
4448
4540
|
@media(max-width:820px){.mbob-grid{grid-template-columns:1fr}.mbob-span{grid-column:auto}.mbob-loc{grid-template-columns:1fr 1fr;align-items:center}.mbob-loc>*{grid-column:auto}}
|
|
4449
4541
|
`;
|
|
4450
4542
|
var blankLocation = () => ({ name: "", street: "", city: "", state: "", zip: "", isPrimary: false });
|
|
4543
|
+
var blankRendering = () => ({ name: "", npi: "", specialty: "", taxonomy: "", active: true });
|
|
4451
4544
|
async function fileToBase64(file) {
|
|
4452
4545
|
const buffer = new Uint8Array(await file.arrayBuffer());
|
|
4453
4546
|
let binary = "";
|
|
@@ -4482,6 +4575,8 @@ function OrganizationOnboarding({
|
|
|
4482
4575
|
const [identity, setIdentity] = useState8({ name: "", legalName: "", taxId: "", npi: "", phone: "", email: "" });
|
|
4483
4576
|
const [provider, setProvider] = useState8({ name: "", taxId: "", npi: "", billType: "Professional", phone: "", billingStreet: "", billingCity: "", billingState: "", billingZip: "" });
|
|
4484
4577
|
const [locations, setLocations] = useState8([blankLocation()]);
|
|
4578
|
+
const [rendering, setRendering] = useState8(blankRendering);
|
|
4579
|
+
const primaryGroup = useId2();
|
|
4485
4580
|
const [w9File, setW9File] = useState8(null);
|
|
4486
4581
|
const [saving, setSaving] = useState8(false);
|
|
4487
4582
|
const [error, setError] = useState8(null);
|
|
@@ -4498,6 +4593,7 @@ function OrganizationOnboarding({
|
|
|
4498
4593
|
email: next.practiceIdentity.email ?? current.email
|
|
4499
4594
|
}));
|
|
4500
4595
|
if (next.billingProviders[0]) setProvider({ billType: "Professional", ...next.billingProviders[0] });
|
|
4596
|
+
if (next.renderingProviders?.[0]) setRendering({ ...next.renderingProviders[0] });
|
|
4501
4597
|
if (next.locations.length) setLocations(next.locations.map((item) => ({ ...item })));
|
|
4502
4598
|
if (next.onboarding.complete && !completedFired.current) {
|
|
4503
4599
|
completedFired.current = true;
|
|
@@ -4530,7 +4626,7 @@ function OrganizationOnboarding({
|
|
|
4530
4626
|
setSavedStep((current) => ({ ...current, [stepId]: true }));
|
|
4531
4627
|
onSaved?.(next);
|
|
4532
4628
|
if (variant === "onboarding") {
|
|
4533
|
-
const order =
|
|
4629
|
+
const order = STEPS.map((item) => item.id);
|
|
4534
4630
|
const nextStep = order[order.indexOf(stepId) + 1];
|
|
4535
4631
|
if (nextStep) setStep(nextStep);
|
|
4536
4632
|
}
|
|
@@ -4542,10 +4638,15 @@ function OrganizationOnboarding({
|
|
|
4542
4638
|
setSaving(false);
|
|
4543
4639
|
}
|
|
4544
4640
|
};
|
|
4545
|
-
const savePractice = () => run(() =>
|
|
4546
|
-
|
|
4547
|
-
|
|
4548
|
-
|
|
4641
|
+
const savePractice = () => run(() => {
|
|
4642
|
+
if ([identity.taxId, provider.taxId].some((value) => /^\d{3}-\d{2}-\d{4}$/.test(value.trim()))) {
|
|
4643
|
+
throw new Error("Saved organization profiles support EINs only. Do not enter an SSN.");
|
|
4644
|
+
}
|
|
4645
|
+
return client.saveBillingProfile({
|
|
4646
|
+
practiceIdentity: identity,
|
|
4647
|
+
...provider.name.trim() || provider.taxId.trim() || provider.npi.trim() ? { billingProviders: [provider] } : {}
|
|
4648
|
+
});
|
|
4649
|
+
}, "practice");
|
|
4549
4650
|
const saveLocations = () => run(() => client.saveLocations(locations.filter((item) => item.name.trim() || item.street.trim())), "locations");
|
|
4550
4651
|
const saveW9 = () => run(async () => {
|
|
4551
4652
|
if (!w9File) throw new Error("Choose the practice W-9 PDF first.");
|
|
@@ -4560,6 +4661,7 @@ function OrganizationOnboarding({
|
|
|
4560
4661
|
return { ...item, ...patch };
|
|
4561
4662
|
}));
|
|
4562
4663
|
const practiceSection = /* @__PURE__ */ jsxs11("div", { children: [
|
|
4664
|
+
/* @__PURE__ */ jsx11("p", { className: "mbob-status", children: "Save business EINs only. Do not enter an SSN; saved personal tax IDs are not supported by this settings flow." }),
|
|
4563
4665
|
/* @__PURE__ */ jsxs11("div", { className: "mbob-grid", children: [
|
|
4564
4666
|
field("Practice name", identity.name, (name) => setIdentity((c) => ({ ...c, name }))),
|
|
4565
4667
|
field("Legal name", identity.legalName, (legalName) => setIdentity((c) => ({ ...c, legalName }))),
|
|
@@ -4569,9 +4671,16 @@ function OrganizationOnboarding({
|
|
|
4569
4671
|
field("Email", identity.email, (email) => setIdentity((c) => ({ ...c, email })))
|
|
4570
4672
|
] }),
|
|
4571
4673
|
/* @__PURE__ */ jsx11("h3", { className: "mbob-subhead", children: "Billing provider (pay-to)" }),
|
|
4674
|
+
/* @__PURE__ */ jsxs11("label", { className: "mbob-field", children: [
|
|
4675
|
+
"Saved billing provider",
|
|
4676
|
+
/* @__PURE__ */ jsxs11("select", { disabled: saving, value: provider.id ?? "", onChange: (event) => setProvider({ ...profile?.billingProviders.find((item) => item.id === event.target.value) ?? { name: "", taxId: "", npi: "" } }), children: [
|
|
4677
|
+
/* @__PURE__ */ jsx11("option", { value: "", children: "Add a billing provider" }),
|
|
4678
|
+
profile?.billingProviders.map((item) => /* @__PURE__ */ jsx11("option", { value: item.id, children: item.name }, item.id))
|
|
4679
|
+
] })
|
|
4680
|
+
] }),
|
|
4572
4681
|
/* @__PURE__ */ jsxs11("div", { className: "mbob-grid", children: [
|
|
4573
4682
|
field("Billing provider name", provider.name, (name) => setProvider((c) => ({ ...c, name }))),
|
|
4574
|
-
field("Billing tax ID", provider.taxId, (taxId) => setProvider((c) => ({ ...c, taxId }))),
|
|
4683
|
+
field("Billing tax ID (EIN only)", provider.taxId, (taxId) => setProvider((c) => ({ ...c, taxId }))),
|
|
4575
4684
|
field("Billing NPI", provider.npi, (npi) => setProvider((c) => ({ ...c, npi }))),
|
|
4576
4685
|
field("Billing phone", provider.phone ?? "", (phone) => setProvider((c) => ({ ...c, phone }))),
|
|
4577
4686
|
field("Street", provider.billingStreet ?? "", (billingStreet) => setProvider((c) => ({ ...c, billingStreet })), true),
|
|
@@ -4584,18 +4693,47 @@ function OrganizationOnboarding({
|
|
|
4584
4693
|
/* @__PURE__ */ jsx11("button", { className: "mbob-save", type: "button", disabled: saving, onClick: savePractice, children: saving ? "Saving\u2026" : "Save practice" })
|
|
4585
4694
|
] })
|
|
4586
4695
|
] });
|
|
4696
|
+
const renderingSection = /* @__PURE__ */ jsxs11("div", { children: [
|
|
4697
|
+
/* @__PURE__ */ jsxs11("label", { className: "mbob-field", children: [
|
|
4698
|
+
"Saved rendering provider",
|
|
4699
|
+
/* @__PURE__ */ jsxs11("select", { disabled: saving, value: rendering.id ?? "", onChange: (event) => setRendering({ ...profile?.renderingProviders?.find((item) => item.id === event.target.value) ?? blankRendering() }), children: [
|
|
4700
|
+
/* @__PURE__ */ jsx11("option", { value: "", children: "Add a rendering provider" }),
|
|
4701
|
+
profile?.renderingProviders?.map((item) => /* @__PURE__ */ jsxs11("option", { value: item.id, children: [
|
|
4702
|
+
item.name,
|
|
4703
|
+
item.active === false ? " (inactive)" : ""
|
|
4704
|
+
] }, item.id))
|
|
4705
|
+
] })
|
|
4706
|
+
] }),
|
|
4707
|
+
/* @__PURE__ */ jsxs11("div", { className: "mbob-grid", style: { marginTop: 16 }, children: [
|
|
4708
|
+
field("Rendering provider name", rendering.name, (name) => setRendering((c) => ({ ...c, name }))),
|
|
4709
|
+
field("Rendering NPI", rendering.npi, (npi) => setRendering((c) => ({ ...c, npi }))),
|
|
4710
|
+
field("Taxonomy", rendering.taxonomy ?? "", (taxonomy) => setRendering((c) => ({ ...c, taxonomy }))),
|
|
4711
|
+
field("Specialty", rendering.specialty ?? "", (specialty) => setRendering((c) => ({ ...c, specialty }))),
|
|
4712
|
+
field("License number", rendering.licenseNumber ?? "", (licenseNumber) => setRendering((c) => ({ ...c, licenseNumber }))),
|
|
4713
|
+
field("License state", rendering.licenseState ?? "", (licenseState) => setRendering((c) => ({ ...c, licenseState: licenseState.toUpperCase().slice(0, 2) }))),
|
|
4714
|
+
/* @__PURE__ */ jsxs11("label", { children: [
|
|
4715
|
+
/* @__PURE__ */ jsx11("input", { disabled: saving, type: "checkbox", checked: rendering.active !== false, onChange: (event) => setRendering((c) => ({ ...c, active: event.target.checked })) }),
|
|
4716
|
+
" Available for new bills"
|
|
4717
|
+
] })
|
|
4718
|
+
] }),
|
|
4719
|
+
/* @__PURE__ */ jsxs11("div", { className: "mbob-actions", children: [
|
|
4720
|
+
/* @__PURE__ */ jsx11("span", { className: "mbob-status", children: savedStep["rendering"] ? "Saved to MindBill." : "Saved profiles do not change previously submitted bills." }),
|
|
4721
|
+
/* @__PURE__ */ jsx11("button", { className: "mbob-save", type: "button", disabled: saving || !rendering.name.trim(), onClick: () => run(() => client.saveBillingProfile({ renderingProviders: [rendering] }), "rendering"), children: saving ? "Saving\u2026" : "Save rendering provider" })
|
|
4722
|
+
] })
|
|
4723
|
+
] });
|
|
4587
4724
|
const locationsSection = /* @__PURE__ */ jsxs11("div", { children: [
|
|
4588
4725
|
locations.map((location, index) => /* @__PURE__ */ jsxs11("div", { className: "mbob-loc", children: [
|
|
4589
|
-
field("Name", location.name, (name) => setLocation(index, { name })),
|
|
4726
|
+
field("Name", location.name ?? "", (name) => setLocation(index, { name })),
|
|
4590
4727
|
field("Street", location.street, (street) => setLocation(index, { street })),
|
|
4591
4728
|
field("City", location.city, (city) => setLocation(index, { city })),
|
|
4592
4729
|
field("State", location.state, (state) => setLocation(index, { state: state.toUpperCase().slice(0, 2) })),
|
|
4593
4730
|
field("ZIP", location.zip, (zip) => setLocation(index, { zip })),
|
|
4731
|
+
field("Place of service code", location.posCode ?? "", (posCode) => setLocation(index, { posCode }), false, "11"),
|
|
4594
4732
|
/* @__PURE__ */ jsxs11("label", { className: "mbob-primary", children: [
|
|
4595
|
-
/* @__PURE__ */ jsx11("input", { type: "radio", name:
|
|
4733
|
+
/* @__PURE__ */ jsx11("input", { disabled: saving || location.active === false, type: "radio", name: primaryGroup, checked: location.isPrimary === true, onChange: () => setLocation(index, { isPrimary: true }) }),
|
|
4596
4734
|
" Primary"
|
|
4597
4735
|
] }),
|
|
4598
|
-
/* @__PURE__ */ jsx11("button", { className: "mbob-remove", type: "button", "aria-label": "Remove location", onClick: () => setLocations((current) => current.filter((_, itemIndex) => itemIndex !== index)), children: "\xD7" })
|
|
4736
|
+
location.id ? /* @__PURE__ */ jsx11("button", { className: "mbob-secondary", disabled: saving, type: "button", onClick: () => setLocation(index, { active: location.active === false, ...location.active !== false ? { isPrimary: false } : {} }), children: location.active === false ? "Restore" : "Archive" }) : /* @__PURE__ */ jsx11("button", { className: "mbob-remove", disabled: saving, type: "button", "aria-label": "Remove location", onClick: () => setLocations((current) => current.filter((_, itemIndex) => itemIndex !== index)), children: "\xD7" })
|
|
4599
4737
|
] }, location.id ?? index)),
|
|
4600
4738
|
/* @__PURE__ */ jsx11("button", { className: "mbob-add", type: "button", onClick: () => setLocations((current) => [...current, blankLocation()]), children: "+ Add location" }),
|
|
4601
4739
|
/* @__PURE__ */ jsxs11("div", { className: "mbob-actions", children: [
|
|
@@ -4631,7 +4769,7 @@ function OrganizationOnboarding({
|
|
|
4631
4769
|
] }, item.id)),
|
|
4632
4770
|
profile?.onboarding.complete ? /* @__PURE__ */ jsx11("p", { className: "mbob-done", children: "Billing setup is complete \u2014 bills submitted from your product carry this profile automatically." }) : /* @__PURE__ */ jsx11("p", { className: "mbob-status", children: "Items above complete themselves as each section is saved." })
|
|
4633
4771
|
] });
|
|
4634
|
-
const sections = { practice: practiceSection, locations: locationsSection, w9: w9Section, review: reviewSection };
|
|
4772
|
+
const sections = { practice: practiceSection, rendering: renderingSection, locations: locationsSection, w9: w9Section, review: reviewSection };
|
|
4635
4773
|
return /* @__PURE__ */ jsxs11("div", { className: `mbob ${className}`.trim(), style: { ...mindBillAppearanceStyle(appearance), ...style }, children: [
|
|
4636
4774
|
/* @__PURE__ */ jsx11("style", { children: css9 }),
|
|
4637
4775
|
/* @__PURE__ */ jsxs11("div", { className: "mbob-card", children: [
|
|
@@ -4648,6 +4786,8 @@ function OrganizationOnboarding({
|
|
|
4648
4786
|
sections[step]
|
|
4649
4787
|
] }) : /* @__PURE__ */ jsxs11(Fragment9, { children: [
|
|
4650
4788
|
practiceSection,
|
|
4789
|
+
/* @__PURE__ */ jsx11("h3", { className: "mbob-subhead", children: "Rendering providers" }),
|
|
4790
|
+
renderingSection,
|
|
4651
4791
|
/* @__PURE__ */ jsx11("h3", { className: "mbob-subhead", children: "Locations" }),
|
|
4652
4792
|
locationsSection,
|
|
4653
4793
|
/* @__PURE__ */ jsx11("h3", { className: "mbob-subhead", children: "Practice W-9" }),
|
|
@@ -6790,7 +6930,17 @@ function createBillingOperationsClient({
|
|
|
6790
6930
|
pendingSessionSignal = null;
|
|
6791
6931
|
},
|
|
6792
6932
|
getBills(query = {}, signal) {
|
|
6793
|
-
|
|
6933
|
+
const { claimsAdministrator, taskType, taskSection: _taskSection, sort, status, ...filters } = query;
|
|
6934
|
+
void _taskSection;
|
|
6935
|
+
const sortKey = sort?.startsWith("balance_") ? "balanceDue" : sort?.startsWith("patient_") ? "patient" : sort ? "submitted" : void 0;
|
|
6936
|
+
return get(`/partner/v2/browser/bills${queryString({
|
|
6937
|
+
...filters,
|
|
6938
|
+
status: status === "submitted" ? "sent" : status,
|
|
6939
|
+
claimsAdminId: claimsAdministrator,
|
|
6940
|
+
taskKind: taskType,
|
|
6941
|
+
sort: sortKey,
|
|
6942
|
+
dir: sort ? sort.endsWith("_asc") ? "asc" : "desc" : void 0
|
|
6943
|
+
})}`, signal);
|
|
6794
6944
|
},
|
|
6795
6945
|
getBillTasks(claimsAdministrator, signal) {
|
|
6796
6946
|
return get(
|
|
@@ -6882,7 +7032,7 @@ function BillSearchContent({
|
|
|
6882
7032
|
onSelectBill,
|
|
6883
7033
|
heading
|
|
6884
7034
|
}) {
|
|
6885
|
-
const [query, setQuery] = useState13({
|
|
7035
|
+
const [query, setQuery] = useState13({ age: "all", page: 1, pageSize: 25, sort: "submitted_desc", ...initialQuery, status: initialQuery?.status === "submitted" ? "sent" : initialQuery?.status ?? "all" });
|
|
6886
7036
|
const [draft, setDraft] = useState13(initialQuery?.q ?? "");
|
|
6887
7037
|
const [result, setResult] = useState13(null);
|
|
6888
7038
|
const [error, setError] = useState13(null);
|
|
@@ -6915,8 +7065,9 @@ function BillSearchContent({
|
|
|
6915
7065
|
/* @__PURE__ */ jsxs16("select", { className: "mbow-select", value: query.status ?? "all", onChange: (event) => update({ status: event.target.value }), "aria-label": "Bill status", children: [
|
|
6916
7066
|
/* @__PURE__ */ jsx16("option", { value: "all", children: "All statuses" }),
|
|
6917
7067
|
/* @__PURE__ */ jsx16("option", { value: "incomplete", children: "Incomplete" }),
|
|
6918
|
-
/* @__PURE__ */ jsx16("option", { value: "
|
|
7068
|
+
/* @__PURE__ */ jsx16("option", { value: "sent", children: "Sent" }),
|
|
6919
7069
|
/* @__PURE__ */ jsx16("option", { value: "accepted", children: "Accepted" }),
|
|
7070
|
+
/* @__PURE__ */ jsx16("option", { value: "accepted_no_response", children: "Accepted \u2014 response overdue" }),
|
|
6920
7071
|
/* @__PURE__ */ jsx16("option", { value: "rejected", children: "Rejected" }),
|
|
6921
7072
|
/* @__PURE__ */ jsx16("option", { value: "processed", children: "Processed" }),
|
|
6922
7073
|
/* @__PURE__ */ jsx16("option", { value: "paid", children: "Paid" }),
|
|
@@ -6934,7 +7085,7 @@ function BillSearchContent({
|
|
|
6934
7085
|
/* @__PURE__ */ jsx16("button", { className: "mbow-button", type: "submit", children: "Search" })
|
|
6935
7086
|
] }),
|
|
6936
7087
|
/* @__PURE__ */ jsxs16("div", { className: "mbow-card mbow-scroll", children: [
|
|
6937
|
-
loading
|
|
7088
|
+
loading ? /* @__PURE__ */ jsx16("div", { className: "mbow-state", role: "status", children: "Loading bills\u2026" }) : error ? /* @__PURE__ */ jsxs16("div", { className: "mbow-state mbow-error", role: "alert", children: [
|
|
6938
7089
|
error.message,
|
|
6939
7090
|
" ",
|
|
6940
7091
|
/* @__PURE__ */ jsx16("button", { className: "mbow-button", type: "button", onClick: () => void load(), children: "Retry" })
|
|
@@ -6966,7 +7117,7 @@ function BillSearchContent({
|
|
|
6966
7117
|
/* @__PURE__ */ jsx16("td", { className: "mbow-money mbow-strong", children: money6(bill.balanceDue) })
|
|
6967
7118
|
] }, bill.id)) })
|
|
6968
7119
|
] }),
|
|
6969
|
-
result ? /* @__PURE__ */ jsxs16("div", { className: "mbow-pager", children: [
|
|
7120
|
+
result && !loading && !error ? /* @__PURE__ */ jsxs16("div", { className: "mbow-pager", children: [
|
|
6970
7121
|
/* @__PURE__ */ jsxs16("span", { children: [
|
|
6971
7122
|
"Showing ",
|
|
6972
7123
|
result.total === 0 ? 0 : (result.page - 1) * result.pageSize + 1,
|
|
@@ -6995,6 +7146,9 @@ function ConnectedBillSearch({ appearance, className, style, initialQuery, onSel
|
|
|
6995
7146
|
function taskQuery(cell) {
|
|
6996
7147
|
const [taskType, taskLabel] = cell.rowId.split("::", 2);
|
|
6997
7148
|
const age = cell.bucketId === "1-30" ? "0-30" : cell.bucketId;
|
|
7149
|
+
if (cell.sectionId === "waiting_sent" || cell.sectionId === "waiting_accepted") {
|
|
7150
|
+
return { status: cell.rowId, ...age ? { age } : {} };
|
|
7151
|
+
}
|
|
6998
7152
|
return { status: "all", taskSection: cell.sectionId, ...taskType ? { taskType } : {}, ...taskLabel ? { taskLabel } : {}, ...age ? { age } : {} };
|
|
6999
7153
|
}
|
|
7000
7154
|
function BillTasksContent({ client, onDrillDown, appearance }) {
|
|
@@ -7021,16 +7175,34 @@ function BillTasksContent({ client, onDrillDown, appearance }) {
|
|
|
7021
7175
|
if (loading && !result) return /* @__PURE__ */ jsx16("div", { className: "mbow-state", children: "Loading bill tasks\u2026" });
|
|
7022
7176
|
if (error && !result) return /* @__PURE__ */ jsx16("div", { className: "mbow-state mbow-error", children: error.message });
|
|
7023
7177
|
if (!result) return /* @__PURE__ */ jsx16(Fragment14, {});
|
|
7178
|
+
const selectionProps = loading || error ? {} : {
|
|
7179
|
+
onSelectCell: (cell) => onDrillDown?.({ ...taskQuery(cell), ...claimsAdminId ? { claimsAdministrator: claimsAdminId } : {} })
|
|
7180
|
+
};
|
|
7024
7181
|
return /* @__PURE__ */ jsxs16(Fragment14, { children: [
|
|
7025
7182
|
/* @__PURE__ */ jsxs16("p", { className: "mbow-task-note", children: [
|
|
7026
|
-
"Open follow-up work
|
|
7027
|
-
|
|
7028
|
-
"."
|
|
7183
|
+
"Open follow-up work grouped by task and age. ",
|
|
7184
|
+
result.waiting ? "Sent and accepted bills waiting for a payer are shown below." : "Find sent and accepted bills in All bills."
|
|
7029
7185
|
] }),
|
|
7030
|
-
|
|
7186
|
+
loading ? /* @__PURE__ */ jsx16("p", { role: "status", children: "Updating bill tasks\u2026" }) : null,
|
|
7187
|
+
error ? /* @__PURE__ */ jsx16("p", { role: "alert", className: "mbow-error", children: error.message }) : null,
|
|
7188
|
+
/* @__PURE__ */ jsx16(BillTasksDashboard, { data: result.dashboard, appearance: appearance ?? { preset: "mindbill" }, toolbar: /* @__PURE__ */ jsxs16("select", { "aria-label": "Claims administrator filter", className: "mbow-select", value: claimsAdminId, onChange: (event) => setClaimsAdminId(event.target.value), children: [
|
|
7031
7189
|
/* @__PURE__ */ jsx16("option", { value: "", children: "All claims administrators" }),
|
|
7032
7190
|
result.filters.claimsAdministrators.map((item) => /* @__PURE__ */ jsx16("option", { value: item.id, children: item.name }, item.id))
|
|
7033
|
-
] }),
|
|
7191
|
+
] }), ...selectionProps }),
|
|
7192
|
+
result.waiting ? /* @__PURE__ */ jsx16(
|
|
7193
|
+
BillTasksDashboard,
|
|
7194
|
+
{
|
|
7195
|
+
data: result.waiting,
|
|
7196
|
+
appearance: appearance ?? { preset: "mindbill" },
|
|
7197
|
+
heading: "Bills waiting for payer",
|
|
7198
|
+
totalLabel: "Bill Total",
|
|
7199
|
+
itemLabel: "bills",
|
|
7200
|
+
grandTotalLabel: "Waiting Bills Total",
|
|
7201
|
+
emptyLabel: "No waiting bills",
|
|
7202
|
+
...selectionProps,
|
|
7203
|
+
footnote: "Waiting bills can also have overdue follow-up tasks above. These bill totals are separate from task totals."
|
|
7204
|
+
}
|
|
7205
|
+
) : null
|
|
7034
7206
|
] });
|
|
7035
7207
|
}
|
|
7036
7208
|
function ConnectedBillTasksDashboard({ appearance, className, style, onDrillDown, ...options }) {
|
|
@@ -7357,6 +7529,7 @@ export {
|
|
|
7357
7529
|
mindBillAppearanceStyle,
|
|
7358
7530
|
mindBillThemePresets,
|
|
7359
7531
|
normalizeClaimsAdministratorName,
|
|
7532
|
+
organizationProfileOptions,
|
|
7360
7533
|
parseBillSubmissionDate,
|
|
7361
7534
|
prepareBillSubmissionDocuments,
|
|
7362
7535
|
reportBillStatusContacts2 as reportBillStatusContacts,
|