@mindbill/react 0.36.0 → 0.37.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 +5 -18
- package/dist/index.js +86 -32
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { MindBillAppearance, MindBillEventDetail, MindBillErrorDetail } from '@mindbill/embed';
|
|
2
2
|
export { MindBillAppearance, MindBillErrorDetail, MindBillEventDetail } from '@mindbill/embed';
|
|
3
3
|
import { CSSProperties, ReactElement, ReactNode } from 'react';
|
|
4
|
-
import { BillReviewData as BillReviewData$1, BillLifecycleDelivery, BillReviewAttachment as BillReviewAttachment$1, BrowserBillSubmissionResult, BillLifecycleSessionProvider, BillReviewPayer as BillReviewPayer$1, BrowserBillSubmissionDocument, BillDeliveryOptions as BillDeliveryOptions$1, SubmitBillInput, BillTasksDashboardData, BillTasksAgingBucket, BillHistoryEntry, OrganizationProfileData, BillRemittanceSummary, BillEorDocument, BillPaymentRecord, BillLifecycleAction, BillRejection, BillLifecycleData, BillLifecycleClientOptions, BillLifecycleClient } from '@mindbill/browser';
|
|
5
|
-
export { BILL_TASKS_AGING_BUCKETS, BillActivityRecord, BillClaimsAdministratorContact, BillClaimsAdministratorDirectory, BillClaimsAdministratorMailingAddress, BillClaimsAdministratorPattern, BillEorDocument, BillLifecycleAction, BillLifecycleActionId, BillLifecycleClient, BillLifecycleClientOptions, BillLifecycleData, BillLifecycleDelivery, BillLifecycleSession, BillLifecycleSessionProvider, BillLifecycleSessionRequest, BillPaymentRecord, BillRejection, BillRemittanceSummary, BillTasksAgingBucket, BillTasksDashboardData, BillTasksDashboardItem, BillTasksDashboardRow, BillTasksDashboardSection, BillTasksDashboardSectionInput, BillTasksDashboardTone, BrowserBillSubmissionResult, CloseBillInput, PostBillPaymentInput, ReopenBillInput, SubmitSecondReviewInput, billTasksAgingBucketIndex, buildBillTasksDashboard, createBillLifecycleClient } from '@mindbill/browser';
|
|
4
|
+
import { BillReviewData as BillReviewData$1, BillLifecycleDelivery, BillReviewAttachment as BillReviewAttachment$1, BrowserBillSubmissionResult, BillLifecycleSessionProvider, BillReviewPayer as BillReviewPayer$1, BrowserBillSubmissionDocument, BillDeliveryOptions as BillDeliveryOptions$1, SubmitBillInput, BillTasksDashboardData, BillTasksAgingBucket, BillHistoryEntry, ReportBillStatusInput, OrganizationProfileData, BillRemittanceSummary, BillEorDocument, BillPaymentRecord, BillLifecycleAction, BillRejection, BillLifecycleData, BillLifecycleClientOptions, BillLifecycleClient } from '@mindbill/browser';
|
|
5
|
+
export { BILL_TASKS_AGING_BUCKETS, BillActivityRecord, BillClaimsAdministratorContact, BillClaimsAdministratorDirectory, BillClaimsAdministratorMailingAddress, BillClaimsAdministratorPattern, BillEorDocument, BillLifecycleAction, BillLifecycleActionId, BillLifecycleClient, BillLifecycleClientOptions, BillLifecycleData, BillLifecycleDelivery, BillLifecycleSession, BillLifecycleSessionProvider, BillLifecycleSessionRequest, BillPaymentRecord, BillRejection, BillRemittanceSummary, BillTasksAgingBucket, BillTasksDashboardData, BillTasksDashboardItem, BillTasksDashboardRow, BillTasksDashboardSection, BillTasksDashboardSectionInput, BillTasksDashboardTone, BrowserBillSubmissionResult, CloseBillInput, PostBillPaymentInput, REPORT_BILL_STATUS_OPTIONS, ReopenBillInput, ReportBillStatusContacts, ReportBillStatusId, ReportBillStatusInput, SECOND_REVIEW_REASON_TEMPLATE, SECOND_REVIEW_WINDOW_DAYS, SecondReviewDeadline, SendDuplicateBillInput, SubmitSecondReviewInput, billTasksAgingBucketIndex, buildBillTasksDashboard, createBillLifecycleClient, reportBillStatusContacts, secondReviewDeadline } from '@mindbill/browser';
|
|
6
6
|
|
|
7
7
|
type MindBillThemePreset = "mindbill" | "qme-companion" | "orange-bright" | "clinical-blue" | "midnight-cyan";
|
|
8
8
|
type MindBillReactAppearance = MindBillAppearance & {
|
|
@@ -831,21 +831,6 @@ type SurfaceProps$1 = {
|
|
|
831
831
|
className?: string;
|
|
832
832
|
style?: CSSProperties;
|
|
833
833
|
};
|
|
834
|
-
type ReportBillStatusId = "message_left" | "eor_pending" | "eor_sent" | "bill_not_on_file" | "forwarded";
|
|
835
|
-
type ReportBillStatusInput = {
|
|
836
|
-
status: ReportBillStatusId;
|
|
837
|
-
company?: string;
|
|
838
|
-
representativeName?: string;
|
|
839
|
-
representativeRole?: string;
|
|
840
|
-
phone?: string;
|
|
841
|
-
callReference?: string;
|
|
842
|
-
note?: string;
|
|
843
|
-
};
|
|
844
|
-
declare const REPORT_BILL_STATUS_OPTIONS: Array<{
|
|
845
|
-
id: ReportBillStatusId;
|
|
846
|
-
label: string;
|
|
847
|
-
description: string;
|
|
848
|
-
}>;
|
|
849
834
|
type ReportBillStatusDialogProps = SurfaceProps$1 & {
|
|
850
835
|
title?: ReactNode;
|
|
851
836
|
claimsAdmin?: {
|
|
@@ -1069,6 +1054,8 @@ type UseBillLifecycleResult = {
|
|
|
1069
1054
|
postPayment: BillLifecycleClient["postPayment"];
|
|
1070
1055
|
submitSecondReview: BillLifecycleClient["submitSecondReview"];
|
|
1071
1056
|
resubmitBill: BillLifecycleClient["resubmitBill"];
|
|
1057
|
+
sendDuplicateBill: BillLifecycleClient["sendDuplicateBill"];
|
|
1058
|
+
reportBillStatus: BillLifecycleClient["reportBillStatus"];
|
|
1072
1059
|
simulateSandbox: BillLifecycleClient["simulateSandbox"];
|
|
1073
1060
|
};
|
|
1074
1061
|
declare function useBillLifecycle({ billId: providedBillId, sessionEndpoint, getSession, apiBaseUrl, refreshInterval, enabled, fetch: fetchOverride, }: UseBillLifecycleOptions): UseBillLifecycleResult;
|
|
@@ -1100,4 +1087,4 @@ type MindBillWidgetProps = {
|
|
|
1100
1087
|
declare function MindBillBillTimeline(props: MindBillWidgetProps): ReactElement;
|
|
1101
1088
|
declare function MindBillBillReview(props: MindBillWidgetProps): ReactElement;
|
|
1102
1089
|
|
|
1103
|
-
export { BILL_STATUS_AGING_BUCKETS, BILL_SUBMISSION_DIAGNOSIS_QUICK_PICKS, BILL_SUBMISSION_DOCUMENT_TYPES, BILL_SUBMISSION_REPORT_TYPES, BILL_SUBMISSION_REQUIRED_FIELDS, type BillActivityEvent, BillActivityTimeline, type BillActivityTimelineProps, type BillAgingBucket, type BillAgingBucketId, BillAgingSummary, type BillAgingSummaryProps, BillExplanationOfReview, type BillExplanationOfReviewProps, BillHistoryTable, type BillHistoryTableProps, BillLifecycleActions, type BillLifecycleActionsProps, BillLifecycleProgress, type BillLifecycleProgressProps, type BillLifecycleStage, BillList, type BillListProps, BillPayerContactCard, type BillPayerContactCardProps, BillPaymentLedger, type BillPaymentLedgerProps, BillReadOnlyForm, type BillReadOnlyFormProps, BillRejectionNotice, type BillRejectionNoticeProps, BillRemittanceCard, type BillRemittanceCardProps, type BillReviewAttachment, type BillReviewBillingProvider, type BillReviewClinician, type BillReviewData, type BillReviewDocumentType, type BillReviewDraft, type BillReviewFeatures, BillReviewForm, type BillReviewFormProps, type BillReviewLineItem, type BillReviewLocation, type BillReviewPayer, type BillReviewSaveInput, BillSnapshotSummary, type BillSnapshotSummaryProps, type BillStatusAction, type BillStatusAgingCell, BillStatusAgingMatrix, type BillStatusAgingMatrixData, type BillStatusAgingMatrixProps, type BillStatusAgingRow, type BillStatusClient, type BillStatusClientOptions, type BillStatusData, type BillStatusSession, type BillStatusSessionProvider, type BillStatusSessionRequest, BillStatusSummary, type BillStatusSummaryProps, BillSubmissionActions, type BillSubmissionAddress, type BillSubmissionAttachmentReportTypeMode, BillSubmissionAttachmentsSection, BillSubmissionClaimSection, type BillSubmissionDiagnosisOption, type BillSubmissionDocumentType, type BillSubmissionEvaluationType, BillSubmissionForm, type BillSubmissionFormProps, type BillSubmissionFormValue, BillSubmissionHeader, type BillSubmissionInput, type BillSubmissionModifierOption, BillSubmissionPatientSection, type BillSubmissionPostalPlace, type BillSubmissionProcedureOption, BillSubmissionProvidersSection, type BillSubmissionReportTypeOption, type BillSubmissionRibbonItem, type BillSubmissionRoute, type BillSubmissionSectionId, BillSubmissionServiceLinesSection, type BillSubmissionSourceAttachment, type BillSubmissionTaxonomyOption, type BillSubmissionUpload, type BillSubmissionValidation, BillSubmissionsRibbon, type BillSubmissionsRibbonProps, BillTasksDashboard, type BillTasksDashboardCell, type BillTasksDashboardProps, type BillingComponentProps, BillingDashboard, type BillingDashboardBill, type BillingDashboardProps, type BillingDashboardSummary, BillingReport, type BillingReportDimension, type BillingReportProps, type BillingReportRow, BillingSettings, ConnectedBillLifecycle, type ConnectedBillLifecycleProps, ConnectedBillStatus, type ConnectedBillStatusProps, DEFAULT_BILL_SUBMISSION_MODIFIERS, DEFAULT_BILL_SUBMISSION_PROCEDURES, DEFAULT_BILL_SUBMISSION_TAXONOMIES, MED_LEGAL_REPORT_TYPE_CODE, MindBillBillReview, MindBillBillTimeline, type MindBillReactAppearance, type MindBillThemePreset, type MindBillWidgetProps, OrganizationOnboarding, type OrganizationOnboardingProps, PSYCH_QME_DEFAULT_DIAGNOSIS,
|
|
1090
|
+
export { BILL_STATUS_AGING_BUCKETS, BILL_SUBMISSION_DIAGNOSIS_QUICK_PICKS, BILL_SUBMISSION_DOCUMENT_TYPES, BILL_SUBMISSION_REPORT_TYPES, BILL_SUBMISSION_REQUIRED_FIELDS, type BillActivityEvent, BillActivityTimeline, type BillActivityTimelineProps, type BillAgingBucket, type BillAgingBucketId, BillAgingSummary, type BillAgingSummaryProps, BillExplanationOfReview, type BillExplanationOfReviewProps, BillHistoryTable, type BillHistoryTableProps, BillLifecycleActions, type BillLifecycleActionsProps, BillLifecycleProgress, type BillLifecycleProgressProps, type BillLifecycleStage, BillList, type BillListProps, BillPayerContactCard, type BillPayerContactCardProps, BillPaymentLedger, type BillPaymentLedgerProps, BillReadOnlyForm, type BillReadOnlyFormProps, BillRejectionNotice, type BillRejectionNoticeProps, BillRemittanceCard, type BillRemittanceCardProps, type BillReviewAttachment, type BillReviewBillingProvider, type BillReviewClinician, type BillReviewData, type BillReviewDocumentType, type BillReviewDraft, type BillReviewFeatures, BillReviewForm, type BillReviewFormProps, type BillReviewLineItem, type BillReviewLocation, type BillReviewPayer, type BillReviewSaveInput, BillSnapshotSummary, type BillSnapshotSummaryProps, type BillStatusAction, type BillStatusAgingCell, BillStatusAgingMatrix, type BillStatusAgingMatrixData, type BillStatusAgingMatrixProps, type BillStatusAgingRow, type BillStatusClient, type BillStatusClientOptions, type BillStatusData, type BillStatusSession, type BillStatusSessionProvider, type BillStatusSessionRequest, BillStatusSummary, type BillStatusSummaryProps, BillSubmissionActions, type BillSubmissionAddress, type BillSubmissionAttachmentReportTypeMode, BillSubmissionAttachmentsSection, BillSubmissionClaimSection, type BillSubmissionDiagnosisOption, type BillSubmissionDocumentType, type BillSubmissionEvaluationType, BillSubmissionForm, type BillSubmissionFormProps, type BillSubmissionFormValue, BillSubmissionHeader, type BillSubmissionInput, type BillSubmissionModifierOption, BillSubmissionPatientSection, type BillSubmissionPostalPlace, type BillSubmissionProcedureOption, BillSubmissionProvidersSection, type BillSubmissionReportTypeOption, type BillSubmissionRibbonItem, type BillSubmissionRoute, type BillSubmissionSectionId, BillSubmissionServiceLinesSection, type BillSubmissionSourceAttachment, type BillSubmissionTaxonomyOption, type BillSubmissionUpload, type BillSubmissionValidation, BillSubmissionsRibbon, type BillSubmissionsRibbonProps, BillTasksDashboard, type BillTasksDashboardCell, type BillTasksDashboardProps, type BillingComponentProps, BillingDashboard, type BillingDashboardBill, type BillingDashboardProps, type BillingDashboardSummary, BillingReport, type BillingReportDimension, type BillingReportProps, type BillingReportRow, BillingSettings, ConnectedBillLifecycle, type ConnectedBillLifecycleProps, ConnectedBillStatus, type ConnectedBillStatusProps, DEFAULT_BILL_SUBMISSION_MODIFIERS, DEFAULT_BILL_SUBMISSION_PROCEDURES, DEFAULT_BILL_SUBMISSION_TAXONOMIES, MED_LEGAL_REPORT_TYPE_CODE, MindBillBillReview, MindBillBillTimeline, type MindBillReactAppearance, type MindBillThemePreset, type MindBillWidgetProps, OrganizationOnboarding, type OrganizationOnboardingProps, PSYCH_QME_DEFAULT_DIAGNOSIS, ReportBillStatusDialog, type ReportBillStatusDialogProps, SendRouteDialog, type SendRouteDialogProps, type SendRouteSubmission, type UseBillLifecycleOptions, type UseBillLifecycleResult, type UseBillStatusOptions, type UseBillStatusResult, applyBillSubmissionEvaluationDiagnoses, applyBillSubmissionEvaluationModifiers, billActivityEventLabel, billAgingBucket, billAgingDays, billLifecycleDisplayLabel, billLifecycleStage, billSubmissionsRibbonDeliveryLabel, billSubmissionsRibbonFromHistory, buildBillReviewSaveInput, buildBillStatusAgingCsv, buildBillStatusAgingMatrix, buildBillingReportCsv, buildBillingReportRows, calculateBillSubmissionAllowedAmount, claimsAdministratorRecommendations, createBillStatusClient, ensureTrailingBillSubmissionLine, ensureTrailingProcedureLine, exactClaimsAdministratorMatch, extractSendRouteEmail, formatBillSubmissionDate, formatSendRouteFax, mindBillAppearanceStyle, mindBillThemePresets, normalizeClaimsAdministratorName, parseBillSubmissionDate, prepareBillSubmissionDocuments, resolveMindBillAppearance, summarizeBillingDashboard, useBillLifecycle, useBillStatus, validateBillSubmission, visibleBillLifecycleActions };
|
package/dist/index.js
CHANGED
|
@@ -3614,34 +3614,11 @@ function BillSubmissionsRibbon({
|
|
|
3614
3614
|
|
|
3615
3615
|
// src/report-bill-status-dialog.tsx
|
|
3616
3616
|
import { useEffect as useEffect5, useState as useState6 } from "react";
|
|
3617
|
+
import {
|
|
3618
|
+
REPORT_BILL_STATUS_OPTIONS
|
|
3619
|
+
} from "@mindbill/browser";
|
|
3620
|
+
import { REPORT_BILL_STATUS_OPTIONS as REPORT_BILL_STATUS_OPTIONS2 } from "@mindbill/browser";
|
|
3617
3621
|
import { jsx as jsx9, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
3618
|
-
var REPORT_BILL_STATUS_OPTIONS = [
|
|
3619
|
-
{
|
|
3620
|
-
id: "message_left",
|
|
3621
|
-
label: "Message Left Requesting Bill Payment Status",
|
|
3622
|
-
description: "Claims Administrator/Bill Review representative unavailable."
|
|
3623
|
-
},
|
|
3624
|
-
{
|
|
3625
|
-
id: "eor_pending",
|
|
3626
|
-
label: "Explanation of Review (EOR) Pending",
|
|
3627
|
-
description: "Claims Administrator/Bill Review reported the bill is still in process and an EOR has not been generated or sent."
|
|
3628
|
-
},
|
|
3629
|
-
{
|
|
3630
|
-
id: "eor_sent",
|
|
3631
|
-
label: "Explanation of Review (EOR) Sent",
|
|
3632
|
-
description: "Claims Administrator/Bill Review reported sending an EOR to the provider."
|
|
3633
|
-
},
|
|
3634
|
-
{
|
|
3635
|
-
id: "bill_not_on_file",
|
|
3636
|
-
label: "Bill Not On File",
|
|
3637
|
-
description: "Claims Administrator/Bill Review reported not receiving the bill."
|
|
3638
|
-
},
|
|
3639
|
-
{
|
|
3640
|
-
id: "forwarded",
|
|
3641
|
-
label: "Bill Forwarded to Different Payer / Network",
|
|
3642
|
-
description: "Claims Administrator/Bill Review reported forwarding the bill to a different payer."
|
|
3643
|
-
}
|
|
3644
|
-
];
|
|
3645
3622
|
var css7 = `
|
|
3646
3623
|
.mbbs-overlay{position:fixed;inset:0;z-index:1000;display:grid;place-items:center;padding:20px;background:rgba(15,30,40,.45)}
|
|
3647
3624
|
.mbbs{display:grid;gap:18px;width:min(860px,100%);max-height:min(90vh,960px);overflow:auto;overscroll-behavior:contain;padding:24px;border:1px solid var(--mb-border);border-radius:var(--mb-radius);background:var(--mb-surface);color:var(--mb-text);font-family:var(--mb-font);font-size:14px;box-shadow:0 24px 60px rgba(17,38,49,.28)}
|
|
@@ -4930,9 +4907,18 @@ import {
|
|
|
4930
4907
|
import {
|
|
4931
4908
|
DEFAULT_API_BASE_URL as DEFAULT_API_BASE_URL2,
|
|
4932
4909
|
DEFAULT_SESSION_ENDPOINT as DEFAULT_SESSION_ENDPOINT2,
|
|
4933
|
-
|
|
4910
|
+
SECOND_REVIEW_REASON_TEMPLATE,
|
|
4911
|
+
createBillLifecycleClient,
|
|
4912
|
+
reportBillStatusContacts,
|
|
4913
|
+
secondReviewDeadline
|
|
4914
|
+
} from "@mindbill/browser";
|
|
4915
|
+
import {
|
|
4916
|
+
SECOND_REVIEW_REASON_TEMPLATE as SECOND_REVIEW_REASON_TEMPLATE2,
|
|
4917
|
+
SECOND_REVIEW_WINDOW_DAYS,
|
|
4918
|
+
createBillLifecycleClient as createBillLifecycleClient2,
|
|
4919
|
+
reportBillStatusContacts as reportBillStatusContacts2,
|
|
4920
|
+
secondReviewDeadline as secondReviewDeadline2
|
|
4934
4921
|
} from "@mindbill/browser";
|
|
4935
|
-
import { createBillLifecycleClient as createBillLifecycleClient2 } from "@mindbill/browser";
|
|
4936
4922
|
import { Fragment as Fragment9, jsx as jsx13, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
4937
4923
|
var DEFAULT_REFRESH_INTERVAL2 = 6e4;
|
|
4938
4924
|
function reservePreviewWindow() {
|
|
@@ -5078,6 +5064,8 @@ function useBillLifecycle({
|
|
|
5078
5064
|
postPayment: (input) => mutate(() => client.postPayment(input)),
|
|
5079
5065
|
submitSecondReview: (input) => mutate(() => client.submitSecondReview(input)),
|
|
5080
5066
|
resubmitBill: (input) => mutate(() => client.resubmitBill(input)),
|
|
5067
|
+
sendDuplicateBill: (input) => mutate(() => client.sendDuplicateBill(input)),
|
|
5068
|
+
reportBillStatus: (input) => mutate(() => client.reportBillStatus(input)),
|
|
5081
5069
|
simulateSandbox: (input) => mutate(() => client.simulateSandbox(input))
|
|
5082
5070
|
};
|
|
5083
5071
|
}
|
|
@@ -5181,12 +5169,18 @@ function today() {
|
|
|
5181
5169
|
const now = /* @__PURE__ */ new Date();
|
|
5182
5170
|
return new Date(now.getTime() - now.getTimezoneOffset() * 6e4).toISOString().slice(0, 10);
|
|
5183
5171
|
}
|
|
5172
|
+
function usDate(isoDate) {
|
|
5173
|
+
const [year, month, day] = isoDate.split("-");
|
|
5174
|
+
return year && month && day ? `${month}/${day}/${year}` : isoDate;
|
|
5175
|
+
}
|
|
5184
5176
|
function actionPanel(action) {
|
|
5185
5177
|
if (action.id === "resubmit") return "resubmit";
|
|
5186
5178
|
if (action.id === "second_review") return "second_review";
|
|
5187
5179
|
if (action.id === "post_payment") return "payment";
|
|
5188
5180
|
if (action.id === "close") return "close";
|
|
5189
5181
|
if (action.id === "reopen") return "reopen";
|
|
5182
|
+
if (action.id === "send_duplicate") return "send_duplicate";
|
|
5183
|
+
if (action.id === "report_bill_status") return "report_status";
|
|
5190
5184
|
return "";
|
|
5191
5185
|
}
|
|
5192
5186
|
function sandboxScenarios(state) {
|
|
@@ -5212,6 +5206,8 @@ function ConnectedBillLifecycle({ appearance, sandboxControls = false, className
|
|
|
5212
5206
|
const [reason, setReason] = useState10("");
|
|
5213
5207
|
const [payment, setPayment] = useState10({ amount: 0, penaltyAmount: 0, interestAmount: 0, method: "check", checkNumber: "", depositDate: today(), note: "" });
|
|
5214
5208
|
const [review, setReview] = useState10({ reason: "", payerClaimControlNumber: "", disputedAmount: void 0, attachmentIds: [], route: "ebill" });
|
|
5209
|
+
const [duplicateDelivery, setDuplicateDelivery] = useState10(null);
|
|
5210
|
+
const [duplicateDeliveryError, setDuplicateDeliveryError] = useState10("");
|
|
5215
5211
|
const lastData = useRef5(null);
|
|
5216
5212
|
const correctionInitialBill = useMemo8(() => data ? correctionBill(data) : null, [data]);
|
|
5217
5213
|
const correctionAttachments = useMemo8(() => data ? data.bill.attachments.map((attachment) => {
|
|
@@ -5282,13 +5278,23 @@ function ConnectedBillLifecycle({ appearance, sandboxControls = false, className
|
|
|
5282
5278
|
setReason("");
|
|
5283
5279
|
setNotice("Corrected submission sent.");
|
|
5284
5280
|
};
|
|
5281
|
+
const loadDuplicateDelivery = () => {
|
|
5282
|
+
setDuplicateDeliveryError("");
|
|
5283
|
+
if (duplicateDelivery) return;
|
|
5284
|
+
lifecycle.getDeliveryOptions().then((options2) => setDuplicateDelivery(options2)).catch((cause) => setDuplicateDeliveryError(cause instanceof Error ? cause.message : "Delivery options could not be loaded."));
|
|
5285
|
+
};
|
|
5285
5286
|
const viewEor = data.lifecycle.actions.find((action) => action.id === "view_eor" && action.enabled);
|
|
5286
|
-
const supportedActions = /* @__PURE__ */ new Set(["resubmit", "second_review", "post_payment", "close", "reopen"]);
|
|
5287
|
+
const supportedActions = /* @__PURE__ */ new Set(["resubmit", "second_review", "post_payment", "close", "reopen", "send_duplicate", "report_bill_status"]);
|
|
5287
5288
|
const actions = data.lifecycle.actions.filter((action) => action.enabled && supportedActions.has(action.id));
|
|
5288
5289
|
const showSandboxControls = shouldShowSandboxControls(data.environment, sandboxControls);
|
|
5289
5290
|
const simulations = showSandboxControls ? sandboxScenarios(data.lifecycle.state) : [];
|
|
5291
|
+
const ribbonItems = data.history ? billSubmissionsRibbonFromHistory(data.history) : [];
|
|
5292
|
+
const statusContacts = reportBillStatusContacts(data.delivery);
|
|
5293
|
+
const receiptEntries = (data.history ?? []).filter((entry) => entry.kind === "submission" || entry.kind === "ack");
|
|
5294
|
+
const reviewDeadline = secondReviewDeadline(data.eors);
|
|
5290
5295
|
return /* @__PURE__ */ jsxs13("section", { className: ["mb-connected-lifecycle", className].filter(Boolean).join(" "), style: mindBillAppearanceStyle(appearance, style), children: [
|
|
5291
5296
|
/* @__PURE__ */ jsx13("style", { children: CONNECTED_LIFECYCLE_STYLES }),
|
|
5297
|
+
ribbonItems.length >= 2 ? /* @__PURE__ */ jsx13(BillSubmissionsRibbon, { items: ribbonItems, onSelect: () => setTab("history"), ...appearance ? { appearance } : {} }) : null,
|
|
5292
5298
|
data.lifecycle.state.toLowerCase() === "rejected" && data.rejection ? /* @__PURE__ */ jsx13(BillRejectionNotice, { rejection: data.rejection, submittedAt: data.lifecycle.submittedAt ?? null, ...appearance ? { appearance } : {} }) : /* @__PURE__ */ jsx13(BillLifecycleProgress, { state: data.lifecycle.state, nativeStatus: data.lifecycle.nativeStatus, submittedAt: data.lifecycle.submittedAt ?? null, agingDays: data.lifecycle.agingDays ?? null, ...appearance ? { appearance } : {} }),
|
|
5293
5299
|
/* @__PURE__ */ jsxs13("header", { className: "mb-lifecycle-head", children: [
|
|
5294
5300
|
/* @__PURE__ */ jsxs13("div", { children: [
|
|
@@ -5327,7 +5333,10 @@ function ConnectedBillLifecycle({ appearance, sandboxControls = false, className
|
|
|
5327
5333
|
viewEor && data.eors[0] ? /* @__PURE__ */ jsx13("button", { type: "button", className: "mb-lifecycle-button secondary", onClick: () => void lifecycle.openEor(data.eors[0]).catch(() => void 0), children: viewEor.label }) : null,
|
|
5328
5334
|
actions.map((action) => /* @__PURE__ */ jsx13("button", { type: "button", className: action.primary ? "mb-lifecycle-button primary" : "mb-lifecycle-button secondary", onClick: () => {
|
|
5329
5335
|
const next = actionPanel(action);
|
|
5330
|
-
if (next)
|
|
5336
|
+
if (!next) return;
|
|
5337
|
+
if (next === "send_duplicate") loadDuplicateDelivery();
|
|
5338
|
+
if (next === "second_review") setReview((current) => current.reason.trim() ? current : { ...current, reason: SECOND_REVIEW_REASON_TEMPLATE });
|
|
5339
|
+
setPanel(next);
|
|
5331
5340
|
}, children: action.label }, action.id))
|
|
5332
5341
|
] }) : null,
|
|
5333
5342
|
panel === "resubmit" && correctionInitialBill ? /* @__PURE__ */ jsx13(LifecycleDialog, { title: "Correct and resubmit", wide: true, onClose: () => setPanel(""), children: /* @__PURE__ */ jsxs13("section", { className: "mb-lifecycle-correction", children: [
|
|
@@ -5385,6 +5394,13 @@ function ConnectedBillLifecycle({ appearance, sandboxControls = false, className
|
|
|
5385
5394
|
/* @__PURE__ */ jsx13("h3", { children: "Submit Second Review" }),
|
|
5386
5395
|
/* @__PURE__ */ jsx13("p", { children: "Explain the dispute and include the payer control number and supporting documents." })
|
|
5387
5396
|
] }),
|
|
5397
|
+
reviewDeadline ? /* @__PURE__ */ jsxs13("p", { className: "mb-lifecycle-deadline-hint", children: [
|
|
5398
|
+
"Second Review must be requested within 90 days of the denial EOR (dated ",
|
|
5399
|
+
usDate(reviewDeadline.eorDate),
|
|
5400
|
+
") \u2014 file by ",
|
|
5401
|
+
/* @__PURE__ */ jsx13("strong", { children: usDate(reviewDeadline.deadline) }),
|
|
5402
|
+
"."
|
|
5403
|
+
] }) : null,
|
|
5388
5404
|
/* @__PURE__ */ jsxs13("div", { className: "mb-lifecycle-fields two", children: [
|
|
5389
5405
|
/* @__PURE__ */ jsxs13("label", { className: "full", children: [
|
|
5390
5406
|
/* @__PURE__ */ jsx13("span", { children: "Reason" }),
|
|
@@ -5485,6 +5501,39 @@ function ConnectedBillLifecycle({ appearance, sandboxControls = false, className
|
|
|
5485
5501
|
/* @__PURE__ */ jsx13("button", { type: "button", className: "mb-lifecycle-button primary", disabled: lifecycle.isMutating || !reason.trim(), onClick: () => void complete(panel === "close" ? "Bill closed." : "Bill reopened.", () => panel === "close" ? lifecycle.closeBill({ reason }) : lifecycle.reopenBill({ reason })), children: lifecycle.isMutating ? "Saving\u2026" : panel === "close" ? "Close bill" : "Reopen bill" })
|
|
5486
5502
|
] })
|
|
5487
5503
|
] }) }) : null,
|
|
5504
|
+
panel === "send_duplicate" ? duplicateDelivery ? /* @__PURE__ */ jsx13(
|
|
5505
|
+
SendRouteDialog,
|
|
5506
|
+
{
|
|
5507
|
+
title: "Send duplicate bill",
|
|
5508
|
+
delivery: duplicateDelivery,
|
|
5509
|
+
submitting: lifecycle.isMutating,
|
|
5510
|
+
error: lifecycle.error?.message ?? null,
|
|
5511
|
+
onCancel: () => setPanel(""),
|
|
5512
|
+
onConfirm: (submission) => void complete("Duplicate bill sent.", () => lifecycle.sendDuplicateBill(submission))
|
|
5513
|
+
}
|
|
5514
|
+
) : /* @__PURE__ */ jsx13(LifecycleDialog, { title: "Send duplicate bill", onClose: () => setPanel(""), children: /* @__PURE__ */ jsxs13("section", { className: "mb-lifecycle-panel", children: [
|
|
5515
|
+
/* @__PURE__ */ jsxs13("div", { children: [
|
|
5516
|
+
/* @__PURE__ */ jsx13("h3", { children: "Send duplicate bill" }),
|
|
5517
|
+
/* @__PURE__ */ jsx13("p", { children: duplicateDeliveryError || "Loading delivery options\u2026" })
|
|
5518
|
+
] }),
|
|
5519
|
+
/* @__PURE__ */ jsxs13("div", { className: "mb-lifecycle-panel-actions", children: [
|
|
5520
|
+
/* @__PURE__ */ jsx13("button", { type: "button", className: "mb-lifecycle-button secondary", onClick: () => setPanel(""), children: "Cancel" }),
|
|
5521
|
+
duplicateDeliveryError ? /* @__PURE__ */ jsx13("button", { type: "button", className: "mb-lifecycle-button primary", onClick: loadDuplicateDelivery, children: "Try again" }) : null
|
|
5522
|
+
] })
|
|
5523
|
+
] }) }) : null,
|
|
5524
|
+
panel === "report_status" ? /* @__PURE__ */ jsx13(
|
|
5525
|
+
ReportBillStatusDialog,
|
|
5526
|
+
{
|
|
5527
|
+
...statusContacts.claimsAdmin ? { claimsAdmin: statusContacts.claimsAdmin } : {},
|
|
5528
|
+
...statusContacts.billReview ? { billReview: statusContacts.billReview } : {},
|
|
5529
|
+
...receiptEntries.length ? { receipt: /* @__PURE__ */ jsx13(BillHistoryTable, { entries: receiptEntries, ...appearance ? { appearance } : {} }) } : {},
|
|
5530
|
+
submitting: lifecycle.isMutating,
|
|
5531
|
+
error: lifecycle.error?.message ?? null,
|
|
5532
|
+
onCancel: () => setPanel(""),
|
|
5533
|
+
onSave: (input) => void complete("Bill status reported.", () => lifecycle.reportBillStatus(input)),
|
|
5534
|
+
...appearance ? { appearance } : {}
|
|
5535
|
+
}
|
|
5536
|
+
) : null,
|
|
5488
5537
|
notice ? /* @__PURE__ */ jsx13("div", { className: "mb-lifecycle-message success", role: "status", children: notice }) : null,
|
|
5489
5538
|
lifecycle.error ? /* @__PURE__ */ jsx13("div", { className: "mb-lifecycle-message error", role: "alert", children: lifecycle.error.message }) : null
|
|
5490
5539
|
] });
|
|
@@ -5494,6 +5543,7 @@ var CONNECTED_LIFECYCLE_STYLES = `
|
|
|
5494
5543
|
.mb-connected-lifecycle{--mb-accent:#176c70;--mb-text:#17282d;--mb-muted:#607176;--mb-border:#d7e0df;--mb-soft:#f4f7f6;--mb-surface:#fff;display:grid;gap:18px;color:var(--mb-text);font:14px/1.45 var(--mb-font,Inter,ui-sans-serif,system-ui,sans-serif)}.mb-connected-lifecycle *{box-sizing:border-box}.mb-lifecycle-head{display:flex;align-items:center;justify-content:space-between;gap:20px}.mb-lifecycle-title{display:flex;align-items:center;flex-wrap:wrap;gap:10px}.mb-lifecycle-title h2{margin:0;font-size:1.7rem}.mb-lifecycle-head p{margin:3px 0 0;color:var(--mb-muted)}.mb-lifecycle-tabs{display:grid;grid-template-columns:1fr 1fr;border:1px solid var(--mb-border);border-radius:12px;background:var(--mb-surface);padding:6px}.mb-lifecycle-tabs button{min-height:46px;border:0;border-radius:8px;background:transparent;color:var(--mb-muted);font:inherit;font-size:1rem;font-weight:750;cursor:pointer}.mb-lifecycle-tabs button[aria-selected=true]{background:var(--mb-accent);color:white}.mb-lifecycle-tabpanel{display:grid;gap:18px}.mb-lifecycle-button{min-height:40px;border:1px solid var(--mb-border);border-radius:var(--mb-control-radius,8px);background:var(--mb-input,#fff);color:var(--mb-text);cursor:pointer;font:inherit;font-weight:750;padding:9px 14px}.mb-lifecycle-button.primary{border-color:var(--mb-accent);background:var(--mb-accent);color:var(--mb-accent-contrast,#fff)}.mb-lifecycle-button:disabled{cursor:not-allowed;opacity:.5}.mb-lifecycle-actions-sheet{position:sticky;bottom:12px;z-index:24;display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:9px;padding:10px;border:1px solid var(--mb-border);border-radius:12px;background:color-mix(in srgb,var(--mb-surface) 94%,transparent);box-shadow:0 10px 34px rgba(18,35,43,.16);backdrop-filter:blur(12px)}.mb-lifecycle-card,.mb-lifecycle-panel{padding:20px;border:1px solid var(--mb-border);border-radius:var(--mb-radius,14px);background:var(--mb-surface)}.mb-lifecycle-card header{display:flex;align-items:center;justify-content:space-between;gap:20px}.mb-lifecycle-card h3,.mb-lifecycle-panel h3{margin:0;font-size:1.08rem}.mb-lifecycle-card p,.mb-lifecycle-panel p{margin:3px 0 0;color:var(--mb-muted)}.mb-lifecycle-card header>span{display:grid;place-items:center;min-width:28px;height:28px;border-radius:999px;background:var(--mb-soft);font-weight:750}.mb-lifecycle-documents{list-style:none;margin:14px 0 0;padding:0}.mb-lifecycle-documents li{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px 0;border-top:1px solid var(--mb-border)}.mb-lifecycle-documents li>div{display:grid;gap:3px;min-width:0}.mb-lifecycle-documents li span{color:var(--mb-muted);font-size:.85rem}.mb-lifecycle-dialog-backdrop{position:fixed;z-index:2147483000;inset:0;display:grid;place-items:center;padding:20px;background:rgba(18,35,43,.56);backdrop-filter:blur(3px)}.mb-lifecycle-dialog{position:relative;width:min(760px,100%);max-height:calc(100vh - 40px);overflow:auto;outline:0}.mb-lifecycle-dialog-close{position:absolute;z-index:1;top:12px;right:12px;width:34px;height:34px;border:1px solid var(--mb-border);border-radius:8px;background:var(--mb-surface);color:var(--mb-text);cursor:pointer;font:22px/1 inherit}.mb-lifecycle-panel{display:grid;gap:17px;padding-top:24px;box-shadow:0 24px 70px rgba(18,35,43,.22)}.mb-lifecycle-panel label{display:grid;gap:6px;font-size:.85rem;font-weight:750}.mb-lifecycle-panel label small{color:var(--mb-muted);font-weight:500}.mb-lifecycle-panel input,.mb-lifecycle-panel select,.mb-lifecycle-panel textarea{width:100%;min-height:44px;border:1px solid var(--mb-border);border-radius:var(--mb-control-radius,8px);background:var(--mb-input,#fff);color:var(--mb-text);font:inherit;padding:10px 12px}.mb-lifecycle-panel textarea{min-height:100px;resize:vertical}.mb-lifecycle-fields{display:grid;gap:13px}.mb-lifecycle-fields.two{grid-template-columns:repeat(2,minmax(0,1fr))}.mb-lifecycle-fields .full{grid-column:1/-1}.mb-lifecycle-panel-actions{display:flex;justify-content:flex-end;gap:8px}.mb-lifecycle-packet{display:grid;gap:0;margin:0;padding:0;border:0}.mb-lifecycle-packet legend{margin-bottom:7px;font-size:.85rem;font-weight:800}.mb-lifecycle-packet>label{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:10px;padding:10px 2px;border-top:1px solid var(--mb-border)}.mb-lifecycle-packet>label>input{width:16px;min-height:16px}.mb-lifecycle-packet>label>span{display:grid}.mb-lifecycle-packet button{border:0;background:transparent;color:var(--mb-accent);cursor:pointer;font:inherit}.mb-lifecycle-message,.mb-lifecycle-error,.mb-lifecycle-loading{padding:12px 14px;border-radius:9px}.mb-lifecycle-message.success{background:#edf9f2;color:#217449}.mb-lifecycle-message.error,.mb-lifecycle-error{background:#fff0ef;color:#9d3029}.mb-lifecycle-error{display:flex;align-items:center;gap:12px}.mb-lifecycle-error span{flex:1}.mb-lifecycle-error button{border:1px solid currentColor;border-radius:7px;background:transparent;color:inherit;padding:7px 10px}
|
|
5495
5544
|
.mb-lifecycle-dialog.wide{width:min(1280px,100%)}.mb-lifecycle-correction{display:grid;gap:16px;padding:22px;border-radius:var(--mb-radius,14px);background:var(--mb-surface);box-shadow:0 24px 70px rgba(18,35,43,.22)}.mb-lifecycle-correction>header{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding-right:42px}.mb-lifecycle-correction h3{margin:0;font-size:1.2rem}.mb-lifecycle-correction header p{margin:4px 0 0;color:var(--mb-muted)}.mb-lifecycle-correction-reason,.mb-lifecycle-correction-contact{display:grid;gap:4px;padding:13px 15px;border-radius:10px}.mb-lifecycle-correction-reason{border-left:4px solid #c5443f;background:#fff2f1;color:#812d29}.mb-lifecycle-correction-contact{border:1px solid color-mix(in srgb,var(--mb-accent) 35%,var(--mb-border));background:color-mix(in srgb,var(--mb-accent) 7%,var(--mb-surface))}.mb-lifecycle-correction-note{display:grid;gap:6px;font-size:.85rem;font-weight:750}.mb-lifecycle-correction-note textarea{min-height:76px;border:1px solid var(--mb-border);border-radius:var(--mb-control-radius,8px);background:var(--mb-input,#fff);color:var(--mb-text);font:inherit;padding:10px 12px;resize:vertical}
|
|
5496
5545
|
.mb-payment-total{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;border-radius:9px;background:var(--mb-soft)}.mb-payment-total strong{font-size:1.12rem}
|
|
5546
|
+
.mb-lifecycle-deadline-hint{margin:0;padding:10px 12px;border-radius:9px;background:color-mix(in srgb,var(--mb-warning,#8a5c17) 10%,var(--mb-surface));color:var(--mb-warning,#8a5c17);font-size:.85rem}
|
|
5497
5547
|
@media(max-width:700px){.mb-lifecycle-head,.mb-lifecycle-card header{align-items:stretch;flex-direction:column}.mb-lifecycle-head>.mb-lifecycle-button{width:100%}.mb-lifecycle-actions-sheet{bottom:calc(var(--mb-host-bottom-offset,72px) + env(safe-area-inset-bottom) + 8px);grid-template-columns:repeat(2,minmax(0,1fr))}.mb-lifecycle-actions-sheet .mb-lifecycle-button:last-child:nth-child(odd){grid-column:1/-1}.mb-lifecycle-fields.two{grid-template-columns:1fr}.mb-lifecycle-fields .full{grid-column:auto}.mb-lifecycle-dialog-backdrop{align-items:end;padding:0}.mb-lifecycle-dialog{max-height:96vh}.mb-lifecycle-dialog .mb-lifecycle-panel,.mb-lifecycle-correction{border-radius:18px 18px 0 0}.mb-lifecycle-correction{padding:18px 12px}.mb-lifecycle-correction>header{align-items:stretch;flex-direction:column;padding-right:42px}.mb-lifecycle-tabs button{font-size:.9rem}.mb-lifecycle-title h2{font-size:1.4rem}}
|
|
5498
5548
|
`;
|
|
5499
5549
|
|
|
@@ -5583,8 +5633,10 @@ export {
|
|
|
5583
5633
|
MindBillBillTimeline,
|
|
5584
5634
|
OrganizationOnboarding,
|
|
5585
5635
|
PSYCH_QME_DEFAULT_DIAGNOSIS,
|
|
5586
|
-
REPORT_BILL_STATUS_OPTIONS,
|
|
5636
|
+
REPORT_BILL_STATUS_OPTIONS2 as REPORT_BILL_STATUS_OPTIONS,
|
|
5587
5637
|
ReportBillStatusDialog,
|
|
5638
|
+
SECOND_REVIEW_REASON_TEMPLATE2 as SECOND_REVIEW_REASON_TEMPLATE,
|
|
5639
|
+
SECOND_REVIEW_WINDOW_DAYS,
|
|
5588
5640
|
SendRouteDialog,
|
|
5589
5641
|
applyBillSubmissionEvaluationDiagnoses,
|
|
5590
5642
|
applyBillSubmissionEvaluationModifiers,
|
|
@@ -5617,7 +5669,9 @@ export {
|
|
|
5617
5669
|
normalizeClaimsAdministratorName,
|
|
5618
5670
|
parseBillSubmissionDate,
|
|
5619
5671
|
prepareBillSubmissionDocuments,
|
|
5672
|
+
reportBillStatusContacts2 as reportBillStatusContacts,
|
|
5620
5673
|
resolveMindBillAppearance,
|
|
5674
|
+
secondReviewDeadline2 as secondReviewDeadline,
|
|
5621
5675
|
summarizeBillingDashboard,
|
|
5622
5676
|
useBillLifecycle,
|
|
5623
5677
|
useBillStatus,
|