@mindbill/react 0.77.59 → 0.77.61
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 +2 -0
- package/dist/index.js +22 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -979,6 +979,8 @@ type RfaFormDetails = {
|
|
|
979
979
|
physician?: {
|
|
980
980
|
specialty?: string | undefined;
|
|
981
981
|
};
|
|
982
|
+
/** The claim's adjuster, when one is saved on the injury; fills a blank claims administrator Contact Name. */
|
|
983
|
+
adjusterName?: string | undefined;
|
|
982
984
|
/** The organization's own fax line for responses; fills a blank Fax Number. */
|
|
983
985
|
returnFax?: string | undefined;
|
|
984
986
|
/** The organization's monitored e-mail address; fills a blank E-mail Address. */
|
package/dist/index.js
CHANGED
|
@@ -10222,7 +10222,8 @@ function useRfaFormDetails(client, claimId, renderingProviderId, enabled) {
|
|
|
10222
10222
|
void client.getCreationContext({ claimId, renderingProviderId, limit: 1 }).then((context) => {
|
|
10223
10223
|
if (!active) return;
|
|
10224
10224
|
const claim = context.claims.find((value) => value.claimId === claimId), provider = context.renderingProviders.find((value) => value.id === renderingProviderId);
|
|
10225
|
-
|
|
10225
|
+
const adjusterName = claim?.adjusterName;
|
|
10226
|
+
setDetails({ ...adjusterName ? { adjusterName } : {}, ...context.returnFax ? { returnFax: context.returnFax } : {}, ...context.returnEmail ? { returnEmail: context.returnEmail } : {}, ...claim ? { employee: { formName: claim.employeeFormName, dateOfBirth: claim.dateOfBirth, employer: claim.employer } } : {}, ...provider ? { physician: { specialty: provider.specialty } } : {} });
|
|
10226
10227
|
}).catch(() => void 0);
|
|
10227
10228
|
return () => {
|
|
10228
10229
|
active = false;
|
|
@@ -10531,6 +10532,7 @@ function TreatmentDraftShell({ title, description, children, hideHeading = false
|
|
|
10531
10532
|
.mbtd .mbrfa-section-actions{display:flex;gap:12px;align-items:center;margin-top:14px;font-size:12px;color:var(--mb-muted)}
|
|
10532
10533
|
.mbtd .mbrfa-field-hint{font-size:12px;color:var(--mb-muted);font-weight:400}
|
|
10533
10534
|
.mbtd .mbrfa-template-save{display:grid;grid-template-columns:minmax(0,420px);gap:10px 16px;margin-top:10px}.mbtd .mbrfa-template-save>label{display:grid;gap:4px;font-size:12px;color:var(--mb-muted)}.mbtd .mbrfa-template-save>.mbrfa-check{display:flex;flex-direction:row;align-items:center;gap:8px;cursor:pointer}.mbtd .mbrfa-template-save>.mbrfa-check>input{width:16px;height:16px;min-height:16px;margin:0;padding:0;flex:0 0 16px;accent-color:var(--mb-accent)}.mbtd .mbrfa-template-save>:is(.mbrfa-check,.mbrfa-section-actions){grid-column:1/-1;margin-top:0;padding-top:0;border-top:0}
|
|
10535
|
+
.mbtd .mbrfa-dx-suggest{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin:0 0 8px;font-size:12px;color:var(--mb-muted)}.mbtd .mbrfa-dx-suggest button{min-height:28px;padding:2px 10px;border:1px dashed var(--mb-border);border-radius:999px;background:var(--mb-surface);font:inherit;font-size:12px;font-weight:600;color:var(--mb-accent);cursor:pointer}
|
|
10534
10536
|
.mbtd .mbrfa-reading{margin:0 0 10px;padding:8px 12px;border-radius:var(--mb-control-radius);background:color-mix(in srgb,var(--mb-accent) 7%,var(--mb-surface));color:var(--mb-text);font-size:13px}.mbtd .mbrfa-reading[data-flag=true]{background:#fff4e5;color:#7a4a00}.mbtd fieldset[data-flag=true]{border-color:#f0a23b;box-shadow:inset 3px 0 0 #f0a23b}
|
|
10535
10537
|
.mbtd .mbrfa-template-save>.mbrfa-section-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px}.mbtd .mbrfa-template-save>.mbrfa-section-actions>button{flex:0 0 auto;white-space:nowrap}.mbtd .mbrfa-template-save>.mbrfa-section-actions>span{flex:1 0 100%;font-size:12px;color:var(--mb-muted)}
|
|
10536
10538
|
@media(max-width:760px){.mbtd .mbrfa-template-save{grid-template-columns:minmax(0,1fr)}}
|
|
@@ -11417,7 +11419,7 @@ function rfaDecisionSummary(rfa) {
|
|
|
11417
11419
|
if (decided.every((item) => item.outcome === "modified")) return { label: "Modified", tone: "warn" };
|
|
11418
11420
|
return { label: "Partially approved", tone: "warn" };
|
|
11419
11421
|
}
|
|
11420
|
-
var FAX_FAILURES = { busy: "The line was busy", no_answer: "No answer", not_a_fax_machine: "The number did not answer as a fax machine", invalid_number: "The number is not in service", rejected: "The call was rejected", carrier_error: "The fax carrier could not complete the call" };
|
|
11422
|
+
var FAX_FAILURES = { busy: "The line was busy", no_answer: "No answer", not_a_fax_machine: "The number did not answer as a fax machine", invalid_number: "The number is not in service", rejected: "The call was rejected", carrier_error: "The fax carrier could not complete the call", email_rejected: "The e-mail address was refused" };
|
|
11421
11423
|
function rfaFailureReason(transmission) {
|
|
11422
11424
|
const reason = transmission.metadata?.failureReason;
|
|
11423
11425
|
return transmission.status === "failed" && typeof reason === "string" ? FAX_FAILURES[reason] ?? "" : "";
|
|
@@ -13043,6 +13045,13 @@ function RfaDiagnosisFields({ code, description, onChange, search, officialForm
|
|
|
13043
13045
|
} }),
|
|
13044
13046
|
/* @__PURE__ */ jsx39("button", { type: "button", "aria-label": `Remove ${item}`, onClick: () => emit(codes2.filter((_, position) => position !== index), descriptions2.filter((_, position) => position !== index)), children: "\xD7" })
|
|
13045
13047
|
] }, item)) }) : null,
|
|
13048
|
+
codes2.length < 12 && savedCodes.some((saved) => saved && !chosen(saved)) ? /* @__PURE__ */ jsxs37("div", { className: "mbrfa-dx-suggest", role: "group", "aria-label": "Diagnoses saved on this injury", children: [
|
|
13049
|
+
/* @__PURE__ */ jsx39("span", { children: "On this injury:" }),
|
|
13050
|
+
savedCodes.filter((saved) => saved && !chosen(saved)).map((saved) => /* @__PURE__ */ jsxs37("button", { type: "button", "aria-label": `Add ${saved}`, onClick: () => add(`saved:${saved}`), children: [
|
|
13051
|
+
"+ ",
|
|
13052
|
+
saved
|
|
13053
|
+
] }, saved))
|
|
13054
|
+
] }) : null,
|
|
13046
13055
|
codes2.length < 12 ? /* @__PURE__ */ jsx39(RfaIdentitySelect, { label: "ICD-10 Code", placeholder: codes2.length ? "Add another ICD-10 code" : "Enter code", searchPlaceholder: "Search by code or diagnosis", query, onSearch: setQuery, searchable: true, loading: searching && !options.length, error, value: "", options, onSelect: add }) : null
|
|
13047
13056
|
] }) });
|
|
13048
13057
|
}
|
|
@@ -13454,6 +13463,10 @@ function RfaDraftForm({ initialDraft, identity, officialForm = false, formDetail
|
|
|
13454
13463
|
useEffect23(() => {
|
|
13455
13464
|
if (officialForm && returnFax) setDraft((current) => current.requestingPractice?.fax?.trim() ? current : { ...current, requestingPractice: { ...current.requestingPractice, fax: returnFax } });
|
|
13456
13465
|
}, [officialForm, returnFax, savedDraft.requestingPractice?.fax]);
|
|
13466
|
+
const adjusterName = formDetails?.adjusterName;
|
|
13467
|
+
useEffect23(() => {
|
|
13468
|
+
if (officialForm && adjusterName) setDraft((current) => !current.authorizationContact || current.authorizationContact.contactName?.trim() ? current : { ...current, authorizationContact: { ...current.authorizationContact, contactName: adjusterName } });
|
|
13469
|
+
}, [officialForm, adjusterName, savedDraft.authorizationContact?.name, savedDraft.authorizationContact?.contactName]);
|
|
13457
13470
|
const returnEmail = formDetails?.returnEmail;
|
|
13458
13471
|
useEffect23(() => {
|
|
13459
13472
|
if (officialForm && returnEmail && !physicianEmail) setDraft((current) => current.requestingPractice?.email?.trim() ? current : { ...current, requestingPractice: { ...current.requestingPractice, email: returnEmail } });
|
|
@@ -13490,7 +13503,7 @@ function RfaDraftForm({ initialDraft, identity, officialForm = false, formDetail
|
|
|
13490
13503
|
useEffect23(() => {
|
|
13491
13504
|
if (previousClaim.current !== identityKey) {
|
|
13492
13505
|
setAdministratorOverride(null);
|
|
13493
|
-
setDraft((current) => ({ ...current, authorizationContact: null, ...officialForm ? { items: [{ diagnosisCode:
|
|
13506
|
+
setDraft((current) => ({ ...current, authorizationContact: null, ...officialForm ? { items: [{ diagnosisCode: "", serviceDescription: "" }] } : {} }));
|
|
13494
13507
|
previousClaim.current = identityKey;
|
|
13495
13508
|
}
|
|
13496
13509
|
}, [identityKey]);
|
|
@@ -14109,6 +14122,7 @@ function SavedIdentityForm({ client, claimId, renderingProviderId, onSave, canCr
|
|
|
14109
14122
|
const formDetails = {
|
|
14110
14123
|
...claim ? { employee: selectedDetails?.employee ?? { formName: claim.employeeFormName, dateOfBirth: claim.dateOfBirth, employer: claim.employer } } : employeePreview ? { employee: employeePreview } : {},
|
|
14111
14124
|
...provider ? { physician: { specialty: provider.specialty } } : {},
|
|
14125
|
+
...selectedDetails?.adjusterName ?? claim?.adjusterName ? { adjusterName: selectedDetails?.adjusterName ?? claim.adjusterName } : {},
|
|
14112
14126
|
...context?.returnFax ? { returnFax: context.returnFax } : {},
|
|
14113
14127
|
...context?.returnEmail ? { returnEmail: context.returnEmail } : {}
|
|
14114
14128
|
};
|
|
@@ -14150,7 +14164,7 @@ function SavedIdentityForm({ client, claimId, renderingProviderId, onSave, canCr
|
|
|
14150
14164
|
...appearance,
|
|
14151
14165
|
...draftFormProps,
|
|
14152
14166
|
disabled: official ? disabled || addingClaim : disabled || loading || addingClaim || !claim || !provider || !!error,
|
|
14153
|
-
initialDraft: { claimId: "", patientId: "", renderingProviderId: "", employeeName: "", providerName: "", requestType: "new", reviewType: "prospective", items: [{ diagnosisCode: (draftFormProps?.officialForm ?
|
|
14167
|
+
initialDraft: { claimId: "", patientId: "", renderingProviderId: "", employeeName: "", providerName: "", requestType: "new", reviewType: "prospective", items: [{ diagnosisCode: (draftFormProps?.officialForm ? "" : claim?.diagnosisCodes?.[0]) ?? "", serviceDescription: "" }] },
|
|
14154
14168
|
...official ? { formDetails, selectors: { claim: /* @__PURE__ */ jsx44("fieldset", { className: "mbrfa-plain", disabled, children: renderClaimSelector ? claimFields : /* @__PURE__ */ jsx44(RfaPicker, { label: "Patient and claim", children: claimFields }) }), physician: /* @__PURE__ */ jsx44("fieldset", { className: "mbrfa-plain", disabled, children: providerFields }) } } : {},
|
|
14155
14169
|
identity,
|
|
14156
14170
|
supportingDocuments,
|
|
@@ -14246,7 +14260,7 @@ function RfaSendDialog({ rfa, client, documentIds, diagnosisDescriptions, direct
|
|
|
14246
14260
|
const reason = caught instanceof Error ? caught.message : "";
|
|
14247
14261
|
if (!alive.current) return;
|
|
14248
14262
|
if (/saved.signature/i.test(reason)) setSignatureRefused(true);
|
|
14249
|
-
else setError(reason || "The request could not be sent. Nothing was sent; try again.");
|
|
14263
|
+
else setError(/email_rejected/i.test(reason) ? "The mail service refused that e-mail address. Check it, or send another way. Nothing was sent." : /return_fax/i.test(reason) ? "Faxing needs your organization\u2019s return fax line, which is not set up yet. Send by e-mail, or ask MindBill to set up the fax line." : reason || "The request could not be sent. Nothing was sent; try again.");
|
|
14250
14264
|
} finally {
|
|
14251
14265
|
if (alive.current) setBusy("");
|
|
14252
14266
|
}
|
|
@@ -15094,7 +15108,8 @@ function FollowUpForm({ task, selected, editable, disabled, onSave, onReview, ha
|
|
|
15094
15108
|
] }),
|
|
15095
15109
|
/* @__PURE__ */ jsxs45("label", { children: [
|
|
15096
15110
|
"Next follow-up",
|
|
15097
|
-
/* @__PURE__ */ jsx47("input", { type: "datetime-local", name: "snoozedUntil", required: true })
|
|
15111
|
+
/* @__PURE__ */ jsx47("input", { type: "datetime-local", name: "snoozedUntil", required: true, defaultValue: localDateTime(new Date(Date.now() + 2 * 864e5).toISOString()) }),
|
|
15112
|
+
/* @__PURE__ */ jsx47("small", { children: "Two days from now unless you change it." })
|
|
15098
15113
|
] })
|
|
15099
15114
|
] }) : /* @__PURE__ */ jsxs45("label", { children: [
|
|
15100
15115
|
/* @__PURE__ */ jsx47("input", { type: "checkbox", required: true, checked: confirmed, onChange: (event) => setConfirmed(event.target.checked) }),
|
|
@@ -15659,7 +15674,7 @@ function RfaDetail({ layout, id, selectedItem, selectedResponseDocumentId, clien
|
|
|
15659
15674
|
const unsent = rfa && !rfa.submittedAt && ["draft", "ready", "incomplete", "deferred"].includes(rfa.status);
|
|
15660
15675
|
const resendable = !!rfa && rfaCanResend(rfa);
|
|
15661
15676
|
const decision = rfa && !unsent && !["failed", "canceled"].includes(getRfaLifecycleStatus4(rfa)) ? rfaDecisionSummary(rfa) : null;
|
|
15662
|
-
const statusPill = rfa ? /* @__PURE__ */ jsx49(RfaPill, { tone: decision ? decision.tone : rfaLifecycleTone(rfa), children: unsent ? "Draft" : decision ? decision.label : RFA_LIFECYCLE_LABELS5[getRfaLifecycleStatus4(rfa)] }) : null;
|
|
15677
|
+
const statusPill = rfa ? /* @__PURE__ */ jsx49(RfaPill, { tone: decision ? decision.tone : rfaLifecycleTone(rfa), children: unsent && getRfaLifecycleStatus4(rfa) !== "failed" ? "Draft" : decision ? decision.label : RFA_LIFECYCLE_LABELS5[getRfaLifecycleStatus4(rfa)] }) : null;
|
|
15663
15678
|
const reviewable = !!rfa && (!!rfa.submittedAt || ["submitted", "received", "under_review", "information_requested", "approved", "modified", "denied", "mixed", "incomplete", "deferred"].includes(rfa.status));
|
|
15664
15679
|
const openDocument = (documentId, title) => run(async () => {
|
|
15665
15680
|
const blob = await client.getDocument(id, documentId);
|