@mindbill/react 0.77.52 → 0.77.54
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 -1
- package/dist/index.js +56 -42
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -2242,9 +2242,13 @@ type RfaAuthorizationDestinationProps = {
|
|
|
2242
2242
|
autoSelectSingle?: boolean;
|
|
2243
2243
|
/** Compact mode: offer one "enter manually" choice that hands entry to the host's own fields. */
|
|
2244
2244
|
onManualEntry?: () => void;
|
|
2245
|
+
/** Offer only destinations of this kind (and only that kind of manual entry). */
|
|
2246
|
+
method?: "fax" | "email";
|
|
2247
|
+
/** Start on the destination already saved on the request, so the user reviews it instead of choosing again. */
|
|
2248
|
+
preselectSaved?: boolean;
|
|
2245
2249
|
};
|
|
2246
2250
|
/** Choose a destination without sending an RFA or treating email as fax. */
|
|
2247
|
-
declare function RfaAuthorizationDestination({ contextKey, directory, savedContact, loading, error, disabled, onChange, onSelectionStart, compact, onManualEntry, autoSelectSingle }: RfaAuthorizationDestinationProps): ReactElement;
|
|
2251
|
+
declare function RfaAuthorizationDestination({ contextKey, directory, savedContact, loading, error, disabled, onChange, onSelectionStart, compact, onManualEntry, autoSelectSingle, method, preselectSaved }: RfaAuthorizationDestinationProps): ReactElement;
|
|
2248
2252
|
|
|
2249
2253
|
type RfaLifecycleControlsProps = OrganizationClientOptions & TreatmentDraftAppearance & {
|
|
2250
2254
|
rfa: RfaRecord;
|
package/dist/index.js
CHANGED
|
@@ -10234,12 +10234,14 @@ function useRfaFormDetails(client, claimId, renderingProviderId, enabled) {
|
|
|
10234
10234
|
// src/rfa-authorization-destination.tsx
|
|
10235
10235
|
import { normalizeRfaFax, rfaAuthorizationDestinations, rfaAuthorizationGuidance as rfaAuthorizationGuidance2 } from "@mindbill/browser";
|
|
10236
10236
|
import { Fragment as Fragment13, jsx as jsx24, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
10237
|
-
function RfaAuthorizationDestination({ contextKey, directory, savedContact, loading = false, error, disabled = false, onChange, onSelectionStart, compact = false, onManualEntry, autoSelectSingle = false }) {
|
|
10238
|
-
|
|
10237
|
+
function RfaAuthorizationDestination({ contextKey, directory, savedContact, loading = false, error, disabled = false, onChange, onSelectionStart, compact = false, onManualEntry, autoSelectSingle = false, method, preselectSaved = false }) {
|
|
10238
|
+
let options = loading || error ? [] : rfaAuthorizationDestinations(directory);
|
|
10239
10239
|
const fax = savedContact?.fax ? normalizeRfaFax(savedContact.fax) : null;
|
|
10240
10240
|
const savedLabel = savedContact?.contactName || savedContact?.name || "Saved request contact";
|
|
10241
10241
|
if (fax && !options.some((option) => option.method === "fax" && option.destination === fax)) options.unshift({ method: "fax", destination: fax, label: savedLabel, ...savedContact?.contactName ? { recipientName: savedContact.contactName } : {} });
|
|
10242
10242
|
if (savedContact?.email?.trim() && !options.some((option) => option.method === "email" && option.destination === savedContact.email?.trim())) options.unshift({ method: "email", destination: savedContact.email.trim(), label: savedLabel, ...savedContact?.contactName ? { recipientName: savedContact.contactName } : {} });
|
|
10243
|
+
if (method) options = options.filter((option) => option.method === method);
|
|
10244
|
+
const savedIndex = preselectSaved ? options.findIndex((option) => option.method === "fax" ? option.destination === fax : option.destination === savedContact?.email?.trim()) : -1;
|
|
10243
10245
|
const signature = JSON.stringify([contextKey, directory?.authorizationStatus, options, loading, error]);
|
|
10244
10246
|
const [selection, setSelection] = useState15("");
|
|
10245
10247
|
const [manual, setManual] = useState15("");
|
|
@@ -10250,12 +10252,23 @@ function RfaAuthorizationDestination({ contextKey, directory, savedContact, load
|
|
|
10250
10252
|
callback.current = onChange;
|
|
10251
10253
|
const auto = useRef10(autoSelectSingle);
|
|
10252
10254
|
auto.current = autoSelectSingle;
|
|
10255
|
+
const startAt = useRef10(savedIndex);
|
|
10256
|
+
startAt.current = savedIndex;
|
|
10253
10257
|
useEffect13(() => {
|
|
10254
10258
|
setManual("");
|
|
10255
|
-
|
|
10256
|
-
|
|
10257
|
-
|
|
10258
|
-
|
|
10259
|
+
if (loading) {
|
|
10260
|
+
setSelection("");
|
|
10261
|
+
setContactName("");
|
|
10262
|
+
callback.current(null);
|
|
10263
|
+
return;
|
|
10264
|
+
}
|
|
10265
|
+
const index = startAt.current >= 0 ? startAt.current : auto.current && !needsAdjuster && options.length === 1 ? 0 : -1;
|
|
10266
|
+
const only = index >= 0 ? options[index] : void 0;
|
|
10267
|
+
const name = only?.recipientName ?? (needsAdjuster ? savedContact?.contactName ?? "" : "");
|
|
10268
|
+
const next = only ? String(index) : method && !options.length && !onManualEntry ? method === "email" ? "manual-email" : "manual" : "";
|
|
10269
|
+
setSelection(next);
|
|
10270
|
+
setContactName(name);
|
|
10271
|
+
callback.current(only && !(needsAdjuster && !name.trim()) ? { ...only, ...name.trim() ? { recipientName: name.trim() } : {} } : null);
|
|
10259
10272
|
}, [signature]);
|
|
10260
10273
|
const chosen = selection !== "" ? options[Number(selection)] : void 0;
|
|
10261
10274
|
const emit = (nextSelection, value, name) => {
|
|
@@ -10298,7 +10311,7 @@ function RfaAuthorizationDestination({ contextKey, directory, savedContact, load
|
|
|
10298
10311
|
searchable: true,
|
|
10299
10312
|
disabled: disabled || loading,
|
|
10300
10313
|
value: selection,
|
|
10301
|
-
options: [...options.map((option, index) => ({ id: String(index), .../[a-z]/i.test(option.label) ? { label: option.label, detail: option.method === "fax" ? `Fax ${formatRfaPhone(option.destination)}` : option.destination } : { label: option.method === "fax" ? "Authorization fax" : "Authorization e-mail", detail: option.method === "fax" ? formatRfaPhone(option.destination) : option.destination } })), ...onManualEntry ? [{ id: "manual-entry", action: true, label: needsAdjuster ? "Enter the handling adjuster\u2019s contact manually" : "Enter a different contact manually" }] : [{ id: "manual", label: needsAdjuster ? "Enter the handling adjuster\u2019s fax" : "Enter
|
|
10314
|
+
options: [...options.map((option, index) => ({ id: String(index), .../[a-z]/i.test(option.label) ? { label: option.label, detail: option.method === "fax" ? `Fax ${formatRfaPhone(option.destination)}` : option.destination } : { label: option.method === "fax" ? "Authorization fax" : "Authorization e-mail", detail: option.method === "fax" ? formatRfaPhone(option.destination) : option.destination } })), ...onManualEntry ? [{ id: "manual-entry", action: true, label: needsAdjuster ? "Enter the handling adjuster\u2019s contact manually" : "Enter a different contact manually" }] : [...method === "email" ? [] : [{ id: "manual", action: true, label: needsAdjuster ? "Enter the handling adjuster\u2019s fax" : options.length ? "Enter a different fax number" : "Enter a fax number" }], ...method === "fax" ? [] : [{ id: "manual-email", action: true, label: options.length ? "Enter a different e-mail address" : "Enter an e-mail address" }]]].filter((option) => option.id === selection || `${option.label} ${"detail" in option ? option.detail : ""}`.toLowerCase().includes(query.trim().toLowerCase())),
|
|
10302
10315
|
onSelect: (value) => {
|
|
10303
10316
|
setQuery("");
|
|
10304
10317
|
if (value === "manual-entry") {
|
|
@@ -10330,22 +10343,23 @@ function RfaAuthorizationDestination({ contextKey, directory, savedContact, load
|
|
|
10330
10343
|
emit(selection, manual, event.target.value);
|
|
10331
10344
|
} })
|
|
10332
10345
|
] }) : null,
|
|
10333
|
-
selection === "manual-email" ? /* @__PURE__ */ jsxs22("label", { children: [
|
|
10334
|
-
"Authorization
|
|
10335
|
-
/* @__PURE__ */ jsx24("input", { type: "email", value: manual, onChange: (event) => {
|
|
10346
|
+
selection === "manual-email" ? /* @__PURE__ */ jsxs22("label", { style: { display: "grid", gap: 6, minWidth: 0 }, children: [
|
|
10347
|
+
"Authorization e-mail address",
|
|
10348
|
+
/* @__PURE__ */ jsx24("input", { type: "email", placeholder: "name@example.com", value: manual, onChange: (event) => {
|
|
10336
10349
|
const value = event.target.value;
|
|
10337
10350
|
setManual(value);
|
|
10338
10351
|
emit(selection, value, contactName);
|
|
10339
10352
|
} })
|
|
10340
10353
|
] }) : selection === "manual" ? /* @__PURE__ */ jsxs22("label", { style: { display: "grid", gap: 6, minWidth: 0 }, children: [
|
|
10341
10354
|
"Authorization fax number",
|
|
10342
|
-
/* @__PURE__ */ jsx24("input", { type: "tel", value: manual, onChange: (event) => {
|
|
10343
|
-
const
|
|
10355
|
+
/* @__PURE__ */ jsx24("input", { type: "tel", placeholder: "(555) 555-0100", value: manual, onChange: (event) => {
|
|
10356
|
+
const digits = event.target.value.replace(/\D/g, "").replace(/^1(?=\d{10})/, "").slice(0, 10);
|
|
10357
|
+
const value = digits.length > 6 ? `(${digits.slice(0, 3)}) ${digits.slice(3, 6)}-${digits.slice(6)}` : digits.length > 3 ? `(${digits.slice(0, 3)}) ${digits.slice(3)}` : digits;
|
|
10344
10358
|
setManual(value);
|
|
10345
10359
|
emit(selection, value, contactName);
|
|
10346
10360
|
}, style: { padding: 10, width: "100%", minWidth: 0, boxSizing: "border-box", font: "inherit" } })
|
|
10347
10361
|
] }) : selection !== "" && chosen ? /* @__PURE__ */ jsxs22(Fragment13, { children: [
|
|
10348
|
-
chosen.method === "email" ? /* @__PURE__ */ jsxs22("p", { style: { margin: 0, overflowWrap: "anywhere" }, children: [
|
|
10362
|
+
chosen.method === "email" && !compact ? /* @__PURE__ */ jsxs22("p", { style: { margin: 0, overflowWrap: "anywhere" }, children: [
|
|
10349
10363
|
"Email: ",
|
|
10350
10364
|
chosen.destination,
|
|
10351
10365
|
". Review this recipient before preparing and sending the packet."
|
|
@@ -10517,6 +10531,7 @@ function TreatmentDraftShell({ title, description, children, hideHeading = false
|
|
|
10517
10531
|
.mbtd .mbrfa-section-actions{display:flex;gap:12px;align-items:center;margin-top:14px;font-size:12px;color:var(--mb-muted)}
|
|
10518
10532
|
.mbtd .mbrfa-field-hint{font-size:12px;color:var(--mb-muted);font-weight:400}
|
|
10519
10533
|
.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}
|
|
10534
|
+
.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)}
|
|
10520
10535
|
@media(max-width:760px){.mbtd .mbrfa-template-save{grid-template-columns:minmax(0,1fr)}}
|
|
10521
10536
|
.mbtd .mbrfa-form-grid>.mbrfa-row-start{grid-column:1/span 3}.mbtd .mbrfa-form-grid textarea[rows="2"]{min-height:44px}
|
|
10522
10537
|
.mbtd .mbrfa-dx-list{list-style:none;margin:0 0 8px;padding:0;display:grid;gap:6px}.mbtd .mbrfa-dx-list>li{display:flex;align-items:center;gap:10px;min-height:36px;padding:4px 6px 4px 12px;border:1px solid var(--mb-border);border-radius:var(--mb-control-radius);background:color-mix(in srgb,var(--mb-accent) 5%,var(--mb-surface));font-size:13px}.mbtd .mbrfa-dx-list>li>strong{font-weight:600;white-space:nowrap}.mbtd .mbrfa-dx-list>li>span{flex:1;min-width:0;color:var(--mb-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mbtd .mbrfa-dx-list>li>input{flex:1;min-width:0;min-height:30px;padding:4px 8px}.mbtd .mbrfa-dx-list>li>button{flex:none;width:28px;height:28px;min-height:28px;padding:0;border:0;background:none;color:var(--mb-muted);font-size:18px;line-height:1;cursor:pointer}.mbtd .mbrfa-dx-list>li>button:hover{color:var(--mb-danger,#b42318)}
|
|
@@ -14129,14 +14144,14 @@ var rfaSendDialogCss = `.mbrfa-send-backdrop{position:fixed;z-index:1000;inset:0
|
|
|
14129
14144
|
.mbrfa-send>header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 20px;border-bottom:1px solid var(--mb-border)}.mbrfa-send>header h3{margin:0;font-size:16px}
|
|
14130
14145
|
.mbrfa-send>header button{width:36px;height:36px;min-height:36px;padding:0;border:0;background:none;font-size:22px;line-height:1;cursor:pointer;color:var(--mb-muted)}
|
|
14131
14146
|
.mbrfa-send-body{display:grid;gap:14px;padding:18px 20px;overflow:auto}.mbrfa-send-body p{margin:0}.mbrfa-send-body label{display:grid;gap:5px;font-size:13px}
|
|
14132
|
-
.mbrfa-send-methods{display:flex;flex-wrap:wrap;gap:6px 18px}.mbrfa-send-methods label{display:flex;align-items:center;gap:8px;min-height:36px;cursor:pointer}.mbrfa-send-methods input{width:16px;height:16px;min-height:16px;margin:0;padding:0;accent-color:var(--mb-accent)}
|
|
14147
|
+
.mbrfa-send-methods{display:flex;flex-wrap:wrap;align-items:center;gap:6px 18px}.mbrfa-send-methods>span{font-size:13px;font-weight:600}.mbrfa-send .mb-rfa-destination{margin:0;padding:0;border:0}.mbrfa-send-to{display:grid;gap:5px;min-width:0}.mbrfa-send-to>span{font-size:13px;font-weight:600}.mbrfa-send-to[data-method=email] .mbrfa-guidance{display:none}.mbrfa-send .mb-rfa-destination label{display:grid;gap:5px}.mbrfa-send-methods label{display:flex;align-items:center;gap:8px;min-height:36px;cursor:pointer}.mbrfa-send-methods input{width:16px;height:16px;min-height:16px;margin:0;padding:0;accent-color:var(--mb-accent)}
|
|
14133
14148
|
.mbrfa-send-summary{display:grid;gap:4px;padding:12px 14px;border:1px solid var(--mb-border);border-radius:var(--mb-control-radius);background:color-mix(in srgb,var(--mb-accent) 4%,var(--mb-surface));font-size:13px}.mbrfa-send-summary span{color:var(--mb-muted)}
|
|
14134
14149
|
.mbrfa-send-confirm{display:flex!important;align-items:flex-start;gap:10px;padding-top:4px;cursor:pointer}.mbrfa-send-confirm input{width:16px;height:16px;min-height:16px;margin:3px 0 0;padding:0;flex:none;accent-color:var(--mb-accent)}
|
|
14135
14150
|
.mbrfa-send>footer{display:flex;flex-direction:row-reverse;gap:10px;padding:14px 20px;border-top:1px solid var(--mb-border)}.mbrfa-send>footer>a{margin-right:auto;align-self:center;font-size:13px}
|
|
14136
14151
|
.mbrfa-send [role=alert]{color:var(--mb-danger,#b42318);font-size:13px}
|
|
14137
14152
|
@media(max-width:640px){.mbrfa-send-backdrop{place-items:end stretch;padding:0}.mbrfa-send{width:100%;max-height:92vh;border-radius:var(--mb-radius) var(--mb-radius) 0 0}.mbrfa-send>footer{flex-direction:column}.mbrfa-send>footer>a{margin:0;align-self:center}}`;
|
|
14138
14153
|
function RfaSendDialog({ rfa, client, documentIds, diagnosisDescriptions, directory, directoryLoading, directoryError, environment, canSend, canSign, actorReference, previewUrl, signatureSetup, onUpdated, onSent, onClose }) {
|
|
14139
|
-
const [
|
|
14154
|
+
const [method, setMethod] = useState30(() => !rfa.authorizationContact?.fax?.trim() && rfa.authorizationContact?.email?.trim() ? "email" : "fax");
|
|
14140
14155
|
const [destination, setDestination] = useState30(null);
|
|
14141
14156
|
const [message, setMessage] = useState30("");
|
|
14142
14157
|
const [confirmed, setConfirmed] = useState30(false);
|
|
@@ -14171,9 +14186,9 @@ function RfaSendDialog({ rfa, client, documentIds, diagnosisDescriptions, direct
|
|
|
14171
14186
|
const supporting = rfa.documents.filter((document2) => ["clinical_report", "supporting_record"].includes(document2.documentType) && documentIds.includes(document2.id));
|
|
14172
14187
|
const missingDiagnosis = rfa.items.find((item) => !(diagnosisDescriptions[item.id] ?? item.diagnosisDescription ?? "").trim());
|
|
14173
14188
|
const live = environment === "live";
|
|
14174
|
-
const blocked = !supporting.length ? "Add the report that supports this request (PR-2, Doctor's First Report or narrative) before sending." : missingDiagnosis ? `Add the diagnosis for ${missingDiagnosis.diagnosisCode} (Edit request) before sending.` : !rfa.signedAt && !canSign ? "Sending applies the physician's saved signature, and your account is not set up to do that." :
|
|
14189
|
+
const blocked = !supporting.length ? "Add the report that supports this request (PR-2, Doctor's First Report or narrative) before sending." : missingDiagnosis ? `Add the diagnosis for ${missingDiagnosis.diagnosisCode} (Edit request) before sending.` : !rfa.signedAt && !canSign ? "Sending applies the physician's saved signature, and your account is not set up to do that." : !live ? "This is a sandbox: nothing is faxed or e-mailed." : !canSend ? "Sending requires permission from your organization." : "";
|
|
14175
14190
|
const go = async () => {
|
|
14176
|
-
if (busy || blocked || !confirmed ||
|
|
14191
|
+
if (busy || blocked || !confirmed || !destination) return;
|
|
14177
14192
|
setError("");
|
|
14178
14193
|
try {
|
|
14179
14194
|
let current = latest.current, ids = documentIds;
|
|
@@ -14187,25 +14202,20 @@ function RfaSendDialog({ rfa, client, documentIds, diagnosisDescriptions, direct
|
|
|
14187
14202
|
const form = current.documents.filter((document2) => document2.documentType === "rfa_form" && document2.contentRevision === current.contentRevision).sort((a, b) => (b.createdAt ?? "").localeCompare(a.createdAt ?? ""))[0];
|
|
14188
14203
|
ids = current.documents.filter((document2) => document2.id === form?.id || supporting.some((kept) => kept.id === document2.id)).map((document2) => document2.id);
|
|
14189
14204
|
}
|
|
14190
|
-
setBusy(
|
|
14205
|
+
setBusy("Sending\u2026");
|
|
14191
14206
|
const text3 = message.trim();
|
|
14192
|
-
const packet = await client.prepareDelivery(current.id, { documentIds: ids, channel:
|
|
14193
|
-
if (mode === "download") {
|
|
14194
|
-
const url = URL.createObjectURL(await client.getPacket(current.id, packet.packetId));
|
|
14195
|
-
window.open(url, "_blank", "noopener");
|
|
14196
|
-
setTimeout(() => URL.revokeObjectURL(url), 6e4);
|
|
14197
|
-
if (alive.current) onClose();
|
|
14198
|
-
return;
|
|
14199
|
-
}
|
|
14207
|
+
const packet = await client.prepareDelivery(current.id, { documentIds: ids, channel: destination.method, to: destination.destination, ...destination.recipientName ? { recipientName: destination.recipientName } : {}, ...text3 ? { message: text3 } : {} });
|
|
14200
14208
|
const body = { packetId: packet.packetId, sha256: packet.sha256, channel: destination.method, to: destination.destination, ...destination.recipientName ? { recipientName: destination.recipientName } : {}, ...text3 ? { message: text3 } : {} };
|
|
14201
14209
|
onSent(await client.submit(current.id, body, stable("submit", body)));
|
|
14202
14210
|
} catch (caught) {
|
|
14203
|
-
|
|
14211
|
+
const reason = caught instanceof Error ? caught.message : "";
|
|
14212
|
+
if (alive.current) setError(/saved.signature/i.test(reason) ? `${rfa.providerName} has no saved signature yet. Add it on the physician\u2019s page, then send again. Nothing was sent.` : reason || "The request could not be sent. Nothing was sent; try again.");
|
|
14204
14213
|
} finally {
|
|
14205
14214
|
if (alive.current) setBusy("");
|
|
14206
14215
|
}
|
|
14207
14216
|
};
|
|
14208
|
-
const
|
|
14217
|
+
const attention = destination?.recipientName && /[a-z]/i.test(destination.recipientName) ? destination.recipientName : "";
|
|
14218
|
+
const where = destination ? `${destination.method === "fax" ? `fax ${formatRfaPhone(destination.destination)}` : destination.destination}${attention ? ` (attention ${attention})` : ""}` : "";
|
|
14209
14219
|
return /* @__PURE__ */ jsxs43("div", { className: "mbrfa-send-backdrop", onMouseDown: (event) => {
|
|
14210
14220
|
if (event.target === event.currentTarget && !busy) onClose();
|
|
14211
14221
|
}, children: [
|
|
@@ -14233,34 +14243,38 @@ function RfaSendDialog({ rfa, client, documentIds, diagnosisDescriptions, direct
|
|
|
14233
14243
|
supporting.length === 1 ? "" : "s"
|
|
14234
14244
|
] })
|
|
14235
14245
|
] }),
|
|
14236
|
-
/* @__PURE__ */ jsxs43("div", { className: "mbrfa-send-methods", role: "radiogroup", "aria-label": "
|
|
14246
|
+
/* @__PURE__ */ jsxs43("div", { className: "mbrfa-send-methods", role: "radiogroup", "aria-label": "Send by", children: [
|
|
14247
|
+
/* @__PURE__ */ jsx45("span", { children: "Send by" }),
|
|
14237
14248
|
/* @__PURE__ */ jsxs43("label", { children: [
|
|
14238
|
-
/* @__PURE__ */ jsx45("input", { type: "radio", name: "rfa-send-
|
|
14239
|
-
|
|
14249
|
+
/* @__PURE__ */ jsx45("input", { type: "radio", name: "rfa-send-method", checked: method === "fax", disabled: !!busy, onChange: () => {
|
|
14250
|
+
setMethod("fax");
|
|
14240
14251
|
setConfirmed(false);
|
|
14241
14252
|
} }),
|
|
14242
|
-
"
|
|
14253
|
+
"Fax"
|
|
14243
14254
|
] }),
|
|
14244
14255
|
/* @__PURE__ */ jsxs43("label", { children: [
|
|
14245
|
-
/* @__PURE__ */ jsx45("input", { type: "radio", name: "rfa-send-
|
|
14246
|
-
|
|
14256
|
+
/* @__PURE__ */ jsx45("input", { type: "radio", name: "rfa-send-method", checked: method === "email", disabled: !!busy, onChange: () => {
|
|
14257
|
+
setMethod("email");
|
|
14247
14258
|
setConfirmed(false);
|
|
14248
14259
|
} }),
|
|
14249
|
-
"
|
|
14260
|
+
"E-mail"
|
|
14250
14261
|
] })
|
|
14251
14262
|
] }),
|
|
14252
|
-
|
|
14253
|
-
|
|
14254
|
-
|
|
14255
|
-
|
|
14263
|
+
/* @__PURE__ */ jsxs43("div", { className: "mbrfa-send-to", "data-method": method, children: [
|
|
14264
|
+
/* @__PURE__ */ jsx45("span", { children: "Send to" }),
|
|
14265
|
+
/* @__PURE__ */ jsx45(RfaAuthorizationDestination, { compact: true, preselectSaved: true, autoSelectSingle: true, method, contextKey: `${rfa.id}:${rfa.claimsAdminId ?? "manual"}:${method}`, directory, savedContact: rfa.authorizationContact, loading: directoryLoading, error: directoryError, disabled: !!busy, onChange: (value) => {
|
|
14266
|
+
setDestination(value);
|
|
14267
|
+
setConfirmed(false);
|
|
14268
|
+
} })
|
|
14269
|
+
] }),
|
|
14256
14270
|
/* @__PURE__ */ jsxs43("label", { children: [
|
|
14257
|
-
|
|
14271
|
+
method === "email" ? "E-mail message" : "Cover sheet message",
|
|
14258
14272
|
" (optional)",
|
|
14259
14273
|
/* @__PURE__ */ jsx45("textarea", { disabled: !!busy, maxLength: 1e3, rows: 2, value: message, onChange: (event) => setMessage(event.target.value) })
|
|
14260
14274
|
] }),
|
|
14261
14275
|
signatureSetup,
|
|
14262
14276
|
blocked ? /* @__PURE__ */ jsx45("p", { role: "alert", children: blocked }) : /* @__PURE__ */ jsxs43("label", { className: "mbrfa-send-confirm", children: [
|
|
14263
|
-
/* @__PURE__ */ jsx45("input", { type: "checkbox", checked: confirmed, disabled: !!busy ||
|
|
14277
|
+
/* @__PURE__ */ jsx45("input", { type: "checkbox", checked: confirmed, disabled: !!busy || !destination, onChange: (event) => setConfirmed(event.target.checked) }),
|
|
14264
14278
|
/* @__PURE__ */ jsxs43("span", { children: [
|
|
14265
14279
|
rfa.signedAt ? "I reviewed this request" : /* @__PURE__ */ jsxs43(Fragment25, { children: [
|
|
14266
14280
|
"I reviewed this request and am authorized by ",
|
|
@@ -14277,7 +14291,7 @@ function RfaSendDialog({ rfa, client, documentIds, diagnosisDescriptions, direct
|
|
|
14277
14291
|
error ? /* @__PURE__ */ jsx45("p", { role: "alert", children: error }) : null
|
|
14278
14292
|
] }),
|
|
14279
14293
|
/* @__PURE__ */ jsxs43("footer", { children: [
|
|
14280
|
-
/* @__PURE__ */ jsx45("button", { type: "button", className: "mbtd-primary", disabled: !!busy || !!blocked || !confirmed ||
|
|
14294
|
+
/* @__PURE__ */ jsx45("button", { type: "button", className: "mbtd-primary", disabled: !!busy || !!blocked || !confirmed || !destination, onClick: () => void go(), children: busy || (method === "email" ? "Send e-mail" : "Send fax") }),
|
|
14281
14295
|
/* @__PURE__ */ jsx45("button", { type: "button", disabled: !!busy, onClick: onClose, children: "Cancel" }),
|
|
14282
14296
|
previewUrl ? /* @__PURE__ */ jsx45("a", { href: previewUrl, target: "_blank", rel: "noopener noreferrer", children: "Preview packet" }) : null
|
|
14283
14297
|
] })
|