@mindbill/react 0.77.56 → 0.77.57
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 +36 -12
- package/dist/index.js +110 -64
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactElement, CSSProperties, ReactNode } from 'react';
|
|
3
3
|
import * as _mindbill_browser from '@mindbill/browser';
|
|
4
|
-
import { MedicalProviderNetwork, BillReferenceClient, CaClaimFeeQuoteInput, CaClaimFeeQuoteResult, BillCourtesyCopyInput, BillCourtesyCopyPreview, BillCourtesyCopyResult, SubmitBillInput, BillDeliveryOptions as BillDeliveryOptions$1, BillFeeContext, ClaimForm, BillFormData, BillReviewPayerOption, BilledDrug, BillLineFormData, OrganizationClientOptions, BrowserBillSubmissionResult, BillLifecycleSessionProvider, BillReviewPayerListInput, BillReviewPayerPage, BillReviewPayer as BillReviewPayer$1, BillClaimsAdministratorDirectory, BillClaimsAdministratorSource, BillProcedureCodeSearchInput, BillProcedureCodePage, BillFeeQuoteInput, BillFeeQuote, BrowserBillSubmissionDocument, OrganizationProfileData, HistoricalBillReviewData, BillReviewClinician as BillReviewClinician$1, BillLifecycleDelivery, BillReviewAttachment as BillReviewAttachment$1, RfaFollowUp, RfaContact, BillDiagnosisCode,
|
|
4
|
+
import { MedicalProviderNetwork, BillReferenceClient, CaClaimFeeQuoteInput, CaClaimFeeQuoteResult, BillCourtesyCopyInput, BillCourtesyCopyPreview, BillCourtesyCopyResult, SubmitBillInput, BillDeliveryOptions as BillDeliveryOptions$1, BillFeeContext, ClaimForm, BillFormData, BillReviewPayerOption, BilledDrug, BillLineFormData, OrganizationClientOptions, BrowserBillSubmissionResult, BillLifecycleSessionProvider, BillReviewPayerListInput, BillReviewPayerPage, BillReviewPayer as BillReviewPayer$1, BillClaimsAdministratorDirectory, BillClaimsAdministratorSource, BillProcedureCodeSearchInput, BillProcedureCodePage, BillFeeQuoteInput, BillFeeQuote, BrowserBillSubmissionDocument, OrganizationProfileData, HistoricalBillReviewData, BillReviewClinician as BillReviewClinician$1, BillLifecycleDelivery, BillReviewAttachment as BillReviewAttachment$1, RfaRecord, RfaFollowUp, RfaContact, BillDiagnosisCode, RfaListQuery, BillTasksDashboardData, BillTasksAgingBucket, BillHistoryEntry, BillAttemptSummary, ReportBillStatusInput, BillEorDocument, BillPaymentRecord, BillRemittanceSummary, BillLifecycleAction, BillRejection, BillLifecycleData, BillLifecycleClientOptions, BillLifecycleClient, SubmitSecondReviewInput, RfaAuthorizationDestinationOption, ReportAutofillResult, RfaForwardResult } from '@mindbill/browser';
|
|
5
5
|
export { BILL_TASKS_AGING_BUCKETS, BillActivityRecord, BillClaimsAdministratorAuthorizationStatus, BillClaimsAdministratorContact, BillClaimsAdministratorDirectory, BillClaimsAdministratorMailingAddress, BillClaimsAdministratorPattern, BillClaimsAdministratorPayer, BillClaimsAdministratorSource, BillCourtesyCopyInput, BillCourtesyCopyPreview, BillCourtesyCopyResult, BillEorDocument, BillFeeContext, BillFormData, BillFormValue, BillLifecycleAction, BillLifecycleActionId, BillLifecycleClient, BillLifecycleClientOptions, BillLifecycleData, BillLifecycleDelivery, BillLifecycleSession, BillLifecycleSessionProvider, BillLifecycleSessionRequest, BillLineFormData, BillPaymentRecord, BillRejection, BillRemittanceSummary, BillReviewPayerOption, BillReviewPayerSuggestion, BillSubmissionDetail, BillTasksAgingBucket, BillTasksDashboardData, BillTasksDashboardItem, BillTasksDashboardRow, BillTasksDashboardSection, BillTasksDashboardSectionInput, BillTasksDashboardTone, BillTeamNote, BilledDrug, BrowserBillSubmissionResult, CaClaimFeeQuoteInput, CaClaimFeeQuoteResult, ClaimForm, CloseBillInput, HistoricalBillReviewData, MedicalProviderNetwork, PostBillPaymentInput, REPORT_BILL_STATUS_OPTIONS, ReopenBillInput, ReportBillStatusContacts, ReportBillStatusId, ReportBillStatusInput, RfaAuthorizationDestinationOption, RfaCreateDraftInput, RfaRecord, RfaSigningPreview, SECOND_REVIEW_REASON_TEMPLATE, SECOND_REVIEW_WINDOW_DAYS, SecondReviewDeadline, SendDuplicateBillInput, SubmitSecondReviewInput, billTasksAgingBucketIndex, buildBillTasksDashboard, createBillLifecycleClient, reportBillStatusContacts, secondReviewDeadline } from '@mindbill/browser';
|
|
6
6
|
import { MindBillAppearance, MindBillEventDetail, MindBillErrorDetail } from '@mindbill/embed';
|
|
7
7
|
export { MindBillAppearance, MindBillErrorDetail, MindBillEventDetail } from '@mindbill/embed';
|
|
@@ -901,6 +901,39 @@ type TreatmentDraftAppearance = {
|
|
|
901
901
|
disabled?: boolean;
|
|
902
902
|
};
|
|
903
903
|
|
|
904
|
+
type RfaLifecycleControlsProps = OrganizationClientOptions & TreatmentDraftAppearance & {
|
|
905
|
+
rfa: RfaRecord;
|
|
906
|
+
selectedResponseDocumentId?: string;
|
|
907
|
+
/** Opt in only when your server grants rfas:act or rfas:edit, respectively. */
|
|
908
|
+
permissions?: readonly ("act" | "edit")[];
|
|
909
|
+
onUpdated?: (rfa: RfaRecord) => void;
|
|
910
|
+
/** Render as rows inside a host card, without the panel heading or summary notes. */
|
|
911
|
+
rows?: boolean;
|
|
912
|
+
/** Host-provided reading of a response document (for example OCR plus a model). When given, choosing a response
|
|
913
|
+
* prefills its treatment decisions for a person to check. Failures leave the form empty; nothing is saved automatically. */
|
|
914
|
+
readResponse?: (rfaId: string, documentId: string) => Promise<RfaResponseReading>;
|
|
915
|
+
};
|
|
916
|
+
/** What was read from a utilization review response, for a person to check. Nothing here is saved until they confirm. */
|
|
917
|
+
type RfaResponseReading = {
|
|
918
|
+
status: "read" | "unreadable";
|
|
919
|
+
decidedAt?: string;
|
|
920
|
+
items: Array<{
|
|
921
|
+
itemId: string;
|
|
922
|
+
outcome: "approved" | "modified" | "denied" | "not_addressed";
|
|
923
|
+
confident: boolean;
|
|
924
|
+
authorizationNumber?: string;
|
|
925
|
+
authorizedProcedureCode?: string;
|
|
926
|
+
authorizedQuantity?: number;
|
|
927
|
+
authorizedUnits?: number;
|
|
928
|
+
effectiveFrom?: string;
|
|
929
|
+
effectiveTo?: string;
|
|
930
|
+
decisionReason?: string;
|
|
931
|
+
reviewerName?: string;
|
|
932
|
+
reviewerPhone?: string;
|
|
933
|
+
}>;
|
|
934
|
+
};
|
|
935
|
+
declare function RfaLifecycleControls({ sessionEndpoint, getSession, apiBaseUrl, fetch: fetchOverride, ...props }: RfaLifecycleControlsProps): ReactElement;
|
|
936
|
+
|
|
904
937
|
type RfaTaskState = "Due" | "Scheduled" | "Completed";
|
|
905
938
|
type RfaTaskAge = "0-5" | "6-14" | "15-30" | "31+" | "unknown";
|
|
906
939
|
/** Staff task filters, independent from RFA lifecycle/clinical status. */
|
|
@@ -1178,6 +1211,8 @@ type RfaDashboardProps = OrganizationClientOptions & TreatmentDraftAppearance &
|
|
|
1178
1211
|
renderClaimSelector?: (props: RfaClaimSelectorProps) => ReactNode;
|
|
1179
1212
|
/** Host-owned saved provider selection and provider creation. Newly selected providers are resolved through creation context. */
|
|
1180
1213
|
renderProviderSelector?: (props: RfaProviderSelectorProps) => ReactNode;
|
|
1214
|
+
/** Reads a utilization review response so its treatment decisions open prefilled for a person to check. See RfaLifecycleControls. */
|
|
1215
|
+
readRfaResponse?: RfaLifecycleControlsProps["readResponse"];
|
|
1181
1216
|
canManageProviderSignatures?: boolean;
|
|
1182
1217
|
/** Host-owned physician signature setup inside the send dialog (for example draw or upload buttons). `missing` holds the send until
|
|
1183
1218
|
* the host reports a saved signature; leave it undefined when the host cannot tell. Replaces the built-in PNG upload there. */
|
|
@@ -2259,17 +2294,6 @@ type RfaAuthorizationDestinationProps = {
|
|
|
2259
2294
|
/** Choose a destination without sending an RFA or treating email as fax. */
|
|
2260
2295
|
declare function RfaAuthorizationDestination({ contextKey, directory, savedContact, loading, error, disabled, onChange, onSelectionStart, compact, onManualEntry, autoSelectSingle, method, preselectSaved }: RfaAuthorizationDestinationProps): ReactElement;
|
|
2261
2296
|
|
|
2262
|
-
type RfaLifecycleControlsProps = OrganizationClientOptions & TreatmentDraftAppearance & {
|
|
2263
|
-
rfa: RfaRecord;
|
|
2264
|
-
selectedResponseDocumentId?: string;
|
|
2265
|
-
/** Opt in only when your server grants rfas:act or rfas:edit, respectively. */
|
|
2266
|
-
permissions?: readonly ("act" | "edit")[];
|
|
2267
|
-
onUpdated?: (rfa: RfaRecord) => void;
|
|
2268
|
-
/** Render as rows inside a host card, without the panel heading or summary notes. */
|
|
2269
|
-
rows?: boolean;
|
|
2270
|
-
};
|
|
2271
|
-
declare function RfaLifecycleControls({ sessionEndpoint, getSession, apiBaseUrl, fetch: fetchOverride, ...props }: RfaLifecycleControlsProps): ReactElement;
|
|
2272
|
-
|
|
2273
2297
|
type ReportAutofillProps = OrganizationClientOptions & {
|
|
2274
2298
|
/** Use an authenticated host endpoint instead of a MindBill browser session. */
|
|
2275
2299
|
analyzeReport?(file: File): Promise<ReportAutofillResult>;
|
package/dist/index.js
CHANGED
|
@@ -10531,6 +10531,7 @@ function TreatmentDraftShell({ title, description, children, hideHeading = false
|
|
|
10531
10531
|
.mbtd .mbrfa-section-actions{display:flex;gap:12px;align-items:center;margin-top:14px;font-size:12px;color:var(--mb-muted)}
|
|
10532
10532
|
.mbtd .mbrfa-field-hint{font-size:12px;color:var(--mb-muted);font-weight:400}
|
|
10533
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-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}
|
|
10534
10535
|
.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)}
|
|
10535
10536
|
@media(max-width:760px){.mbtd .mbrfa-template-save{grid-template-columns:minmax(0,1fr)}}
|
|
10536
10537
|
.mbtd .mbrfa-form-grid>.mbrfa-row-start{grid-column:1/span 3}.mbtd .mbrfa-form-grid textarea[rows="2"]{min-height:44px}
|
|
@@ -14564,12 +14565,17 @@ var timestamp2 = (form, name) => {
|
|
|
14564
14565
|
};
|
|
14565
14566
|
var label3 = (value) => value.replaceAll("_", " ");
|
|
14566
14567
|
var displayDate = (value) => value ? new Date(value).toLocaleString() : "Not recorded";
|
|
14568
|
+
var localDateTime = (value) => {
|
|
14569
|
+
const date8 = value ? new Date(value) : null;
|
|
14570
|
+
if (!date8 || !Number.isFinite(date8.getTime())) return "";
|
|
14571
|
+
return new Date(date8.getTime() - date8.getTimezoneOffset() * 6e4).toISOString().slice(0, 16);
|
|
14572
|
+
};
|
|
14567
14573
|
function RfaLifecycleControls({ sessionEndpoint, getSession, apiBaseUrl, fetch: fetchOverride, ...props }) {
|
|
14568
14574
|
const options = useMemo12(() => ({ ...sessionEndpoint ? { sessionEndpoint } : {}, ...getSession ? { getSession } : {}, ...apiBaseUrl ? { apiBaseUrl } : {}, ...fetchOverride ? { fetch: fetchOverride } : {} }), [sessionEndpoint, getSession, apiBaseUrl, fetchOverride]);
|
|
14569
14575
|
const identity = useMemo12(() => crypto.randomUUID(), [options]);
|
|
14570
14576
|
return /* @__PURE__ */ jsx47(LifecycleContent, { ...props, options }, `${identity}:${props.rfa.id}`);
|
|
14571
14577
|
}
|
|
14572
|
-
function LifecycleContent({ rfa: providedRfa, options, permissions = [], onUpdated, selectedResponseDocumentId, rows: rows3 = false, ...appearance }) {
|
|
14578
|
+
function LifecycleContent({ rfa: providedRfa, options, permissions = [], onUpdated, selectedResponseDocumentId, rows: rows3 = false, readResponse, ...appearance }) {
|
|
14573
14579
|
const [rfa, setRfa] = useState32(providedRfa);
|
|
14574
14580
|
useEffect27(() => {
|
|
14575
14581
|
setRfa(providedRfa);
|
|
@@ -14587,6 +14593,9 @@ function LifecycleContent({ rfa: providedRfa, options, permissions = [], onUpdat
|
|
|
14587
14593
|
const [responsePdf, setResponsePdf] = useState32(null);
|
|
14588
14594
|
const [previewError, setPreviewError] = useState32("");
|
|
14589
14595
|
const [previewReload, setPreviewReload] = useState32(0);
|
|
14596
|
+
const [reading, setReading] = useState32(null);
|
|
14597
|
+
const [readingBusy, setReadingBusy] = useState32(false);
|
|
14598
|
+
const [readingChecked, setReadingChecked] = useState32(false);
|
|
14590
14599
|
useEffect27(() => {
|
|
14591
14600
|
let active = true;
|
|
14592
14601
|
setResponsePdf(null);
|
|
@@ -14603,6 +14612,27 @@ function LifecycleContent({ rfa: providedRfa, options, permissions = [], onUpdat
|
|
|
14603
14612
|
};
|
|
14604
14613
|
}, [records, rfa.id, responseDocument, rfa.documents, previewReload]);
|
|
14605
14614
|
const [outcomes, setOutcomes] = useState32({});
|
|
14615
|
+
useEffect27(() => {
|
|
14616
|
+
let active = true;
|
|
14617
|
+
setReading(null);
|
|
14618
|
+
setReadingChecked(false);
|
|
14619
|
+
if (!readResponse || !responseDocument || !rfa.documents.some((document2) => document2.id === responseDocument && document2.documentType === "ur_response")) return;
|
|
14620
|
+
setReadingBusy(true);
|
|
14621
|
+
readResponse(rfa.id, responseDocument).then((value) => {
|
|
14622
|
+
if (!active) return;
|
|
14623
|
+
setReading({ documentId: responseDocument, value });
|
|
14624
|
+
if (value.status === "read") setOutcomes(Object.fromEntries(value.items.filter((item) => item.outcome !== "not_addressed").map((item) => [item.itemId, item.outcome])));
|
|
14625
|
+
}).catch(() => {
|
|
14626
|
+
if (active) setReading({ documentId: responseDocument, value: { status: "unreadable", items: [] } });
|
|
14627
|
+
}).finally(() => {
|
|
14628
|
+
if (active) setReadingBusy(false);
|
|
14629
|
+
});
|
|
14630
|
+
return () => {
|
|
14631
|
+
active = false;
|
|
14632
|
+
};
|
|
14633
|
+
}, [readResponse, rfa.id, responseDocument]);
|
|
14634
|
+
const read = reading?.documentId === responseDocument && reading.value.status === "read" ? reading.value : null;
|
|
14635
|
+
const readItem = (itemId) => read?.items.find((item) => item.itemId === itemId);
|
|
14606
14636
|
const alive = useRef24(true);
|
|
14607
14637
|
const pending = useRef24(false);
|
|
14608
14638
|
const keys = useRef24(/* @__PURE__ */ new Map());
|
|
@@ -14808,15 +14838,21 @@ function LifecycleContent({ rfa: providedRfa, options, permissions = [], onUpdat
|
|
|
14808
14838
|
return decision;
|
|
14809
14839
|
});
|
|
14810
14840
|
if (!decisions.length) throw new Error("Choose at least one treatment decision. Other treatments remain pending.");
|
|
14841
|
+
if (read && !readingChecked) throw new Error("Confirm that you checked these decisions against the response.");
|
|
14811
14842
|
if (decisions.some((item) => item.outcome !== "approved") && !text2(data, "imrDocumentId")) throw new Error("An independent medical review form is required for modified or denied treatment.");
|
|
14812
14843
|
return { decidedAt: timestamp2(data, "decidedAt"), responseDocumentId: text2(data, "responseDocumentId"), ...text2(data, "imrDocumentId") ? { imrDocumentId: text2(data, "imrDocumentId") } : {}, decisions };
|
|
14813
14844
|
}, (input, key2) => client.recordDecisions(rfa.id, input, key2)), children: /* @__PURE__ */ jsxs45("fieldset", { disabled, children: [
|
|
14814
14845
|
/* @__PURE__ */ jsx47("legend", { children: "Treatment decisions" }),
|
|
14815
14846
|
/* @__PURE__ */ jsx47("p", { children: "Record only treatments addressed by this response. Unselected treatments remain pending." }),
|
|
14847
|
+
readingBusy ? /* @__PURE__ */ jsx47("p", { role: "status", children: "Reading the response\u2026" }) : read ? /* @__PURE__ */ jsxs45("p", { className: "mbrfa-reading", role: "status", children: [
|
|
14848
|
+
"These decisions were read from the response. Check each one against the document before saving",
|
|
14849
|
+
read.items.some((item) => !item.confident || item.outcome === "not_addressed") ? "; the ones marked in orange need a closer look" : "",
|
|
14850
|
+
"."
|
|
14851
|
+
] }) : reading?.documentId === responseDocument ? /* @__PURE__ */ jsx47("p", { className: "mbrfa-reading", "data-flag": "true", role: "status", children: "This response could not be read automatically. Enter the decisions from the document." }) : null,
|
|
14816
14852
|
/* @__PURE__ */ jsxs45("div", { className: "mbtd-grid", children: [
|
|
14817
14853
|
/* @__PURE__ */ jsxs45("label", { children: [
|
|
14818
14854
|
"Decision time",
|
|
14819
|
-
/* @__PURE__ */ jsx47("input", { type: "datetime-local", name: "decidedAt", required: true })
|
|
14855
|
+
/* @__PURE__ */ jsx47("input", { type: "datetime-local", name: "decidedAt", required: true, defaultValue: localDateTime(read?.decidedAt) }, `decidedAt:${read ? reading.documentId : ""}`)
|
|
14820
14856
|
] }),
|
|
14821
14857
|
/* @__PURE__ */ jsxs45("label", { children: [
|
|
14822
14858
|
"Utilization review response",
|
|
@@ -14827,65 +14863,75 @@ function LifecycleContent({ rfa: providedRfa, options, permissions = [], onUpdat
|
|
|
14827
14863
|
] }),
|
|
14828
14864
|
documentSelect("imrDocumentId", "Independent medical review form", ["imr_form"], false)
|
|
14829
14865
|
] }),
|
|
14830
|
-
pendingItems.map((item) =>
|
|
14831
|
-
|
|
14832
|
-
|
|
14833
|
-
|
|
14834
|
-
|
|
14835
|
-
|
|
14836
|
-
|
|
14837
|
-
|
|
14838
|
-
|
|
14839
|
-
|
|
14840
|
-
|
|
14841
|
-
|
|
14842
|
-
|
|
14843
|
-
|
|
14844
|
-
|
|
14845
|
-
|
|
14846
|
-
|
|
14847
|
-
|
|
14848
|
-
|
|
14849
|
-
"Authorization number",
|
|
14850
|
-
/* @__PURE__ */ jsx47("input", { name: `${item.id}:authorizationNumber`, required: true })
|
|
14851
|
-
] }),
|
|
14852
|
-
/* @__PURE__ */ jsxs45("label", { children: [
|
|
14853
|
-
"Authorized procedure code",
|
|
14854
|
-
/* @__PURE__ */ jsx47("input", { name: `${item.id}:authorizedProcedureCode` })
|
|
14855
|
-
] }),
|
|
14856
|
-
/* @__PURE__ */ jsxs45("label", { children: [
|
|
14857
|
-
"Authorized quantity",
|
|
14858
|
-
/* @__PURE__ */ jsx47("input", { name: `${item.id}:authorizedQuantity`, type: "number", min: "0.001", max: "100000", step: "any" })
|
|
14859
|
-
] }),
|
|
14860
|
-
/* @__PURE__ */ jsxs45("label", { children: [
|
|
14861
|
-
"Authorized units",
|
|
14862
|
-
/* @__PURE__ */ jsx47("input", { name: `${item.id}:authorizedUnits`, type: "number", min: "1", max: "100000" })
|
|
14863
|
-
] }),
|
|
14864
|
-
/* @__PURE__ */ jsxs45("label", { children: [
|
|
14865
|
-
"Effective from",
|
|
14866
|
-
/* @__PURE__ */ jsx47("input", { name: `${item.id}:effectiveFrom`, type: "date" })
|
|
14867
|
-
] }),
|
|
14868
|
-
/* @__PURE__ */ jsxs45("label", { children: [
|
|
14869
|
-
"Effective through",
|
|
14870
|
-
/* @__PURE__ */ jsx47("input", { name: `${item.id}:effectiveTo`, type: "date" })
|
|
14871
|
-
] })
|
|
14872
|
-
] }) : null,
|
|
14873
|
-
outcomes[item.id] !== "approved" ? /* @__PURE__ */ jsxs45(Fragment27, { children: [
|
|
14874
|
-
/* @__PURE__ */ jsxs45("label", { children: [
|
|
14875
|
-
"Decision reason",
|
|
14876
|
-
/* @__PURE__ */ jsx47("textarea", { name: `${item.id}:decisionReason`, required: true })
|
|
14877
|
-
] }),
|
|
14878
|
-
/* @__PURE__ */ jsxs45("label", { children: [
|
|
14879
|
-
"Reviewer name",
|
|
14880
|
-
/* @__PURE__ */ jsx47("input", { name: `${item.id}:reviewerName`, required: true })
|
|
14881
|
-
] }),
|
|
14882
|
-
/* @__PURE__ */ jsxs45("label", { children: [
|
|
14883
|
-
"Reviewer phone",
|
|
14884
|
-
/* @__PURE__ */ jsx47("input", { name: `${item.id}:reviewerPhone`, required: true })
|
|
14866
|
+
pendingItems.map((item) => {
|
|
14867
|
+
const found = readItem(item.id);
|
|
14868
|
+
const flag = read ? !found || found.outcome === "not_addressed" ? "No decision for this treatment was found in the response. It stays pending unless you choose one." : !found.confident ? "This one was hard to read. Check it carefully." : "" : "";
|
|
14869
|
+
const k = `${item.id}:${read ? reading.documentId : ""}`;
|
|
14870
|
+
return /* @__PURE__ */ jsxs45("fieldset", { ...flag ? { "data-flag": "true" } : {}, children: [
|
|
14871
|
+
/* @__PURE__ */ jsxs45("legend", { children: [
|
|
14872
|
+
item.procedureCode || "Treatment",
|
|
14873
|
+
": ",
|
|
14874
|
+
item.serviceDescription
|
|
14875
|
+
] }),
|
|
14876
|
+
flag ? /* @__PURE__ */ jsx47("p", { className: "mbrfa-reading", "data-flag": "true", children: flag }) : null,
|
|
14877
|
+
/* @__PURE__ */ jsxs45("label", { children: [
|
|
14878
|
+
"Decision for ",
|
|
14879
|
+
item.procedureCode || item.serviceDescription,
|
|
14880
|
+
/* @__PURE__ */ jsxs45("select", { value: outcomes[item.id] ?? "", onChange: (event) => setOutcomes((value) => ({ ...value, [item.id]: event.target.value })), children: [
|
|
14881
|
+
/* @__PURE__ */ jsx47("option", { value: "", children: "Leave pending" }),
|
|
14882
|
+
/* @__PURE__ */ jsx47("option", { value: "approved", children: "Approved" }),
|
|
14883
|
+
/* @__PURE__ */ jsx47("option", { value: "modified", children: "Modified" }),
|
|
14884
|
+
/* @__PURE__ */ jsx47("option", { value: "denied", children: "Denied" })
|
|
14885
14885
|
] })
|
|
14886
|
+
] }),
|
|
14887
|
+
outcomes[item.id] ? /* @__PURE__ */ jsxs45("div", { className: "mbtd-grid", children: [
|
|
14888
|
+
outcomes[item.id] !== "denied" ? /* @__PURE__ */ jsxs45(Fragment27, { children: [
|
|
14889
|
+
/* @__PURE__ */ jsxs45("label", { children: [
|
|
14890
|
+
"Authorization number",
|
|
14891
|
+
/* @__PURE__ */ jsx47("input", { name: `${item.id}:authorizationNumber`, defaultValue: found?.authorizationNumber ?? "", required: true })
|
|
14892
|
+
] }),
|
|
14893
|
+
/* @__PURE__ */ jsxs45("label", { children: [
|
|
14894
|
+
"Authorized procedure code",
|
|
14895
|
+
/* @__PURE__ */ jsx47("input", { name: `${item.id}:authorizedProcedureCode`, defaultValue: found?.authorizedProcedureCode ?? "" })
|
|
14896
|
+
] }),
|
|
14897
|
+
/* @__PURE__ */ jsxs45("label", { children: [
|
|
14898
|
+
"Authorized quantity",
|
|
14899
|
+
/* @__PURE__ */ jsx47("input", { name: `${item.id}:authorizedQuantity`, defaultValue: found?.authorizedQuantity ?? "", type: "number", min: "0.001", max: "100000", step: "any" })
|
|
14900
|
+
] }),
|
|
14901
|
+
/* @__PURE__ */ jsxs45("label", { children: [
|
|
14902
|
+
"Authorized units",
|
|
14903
|
+
/* @__PURE__ */ jsx47("input", { name: `${item.id}:authorizedUnits`, defaultValue: found?.authorizedUnits ?? "", type: "number", min: "1", max: "100000" })
|
|
14904
|
+
] }),
|
|
14905
|
+
/* @__PURE__ */ jsxs45("label", { children: [
|
|
14906
|
+
"Effective from",
|
|
14907
|
+
/* @__PURE__ */ jsx47("input", { name: `${item.id}:effectiveFrom`, defaultValue: found?.effectiveFrom ?? "", type: "date" })
|
|
14908
|
+
] }),
|
|
14909
|
+
/* @__PURE__ */ jsxs45("label", { children: [
|
|
14910
|
+
"Effective through",
|
|
14911
|
+
/* @__PURE__ */ jsx47("input", { name: `${item.id}:effectiveTo`, defaultValue: found?.effectiveTo ?? "", type: "date" })
|
|
14912
|
+
] })
|
|
14913
|
+
] }) : null,
|
|
14914
|
+
outcomes[item.id] !== "approved" ? /* @__PURE__ */ jsxs45(Fragment27, { children: [
|
|
14915
|
+
/* @__PURE__ */ jsxs45("label", { children: [
|
|
14916
|
+
"Decision reason",
|
|
14917
|
+
/* @__PURE__ */ jsx47("textarea", { name: `${item.id}:decisionReason`, required: true, defaultValue: found?.decisionReason ?? "" })
|
|
14918
|
+
] }),
|
|
14919
|
+
/* @__PURE__ */ jsxs45("label", { children: [
|
|
14920
|
+
"Reviewer name",
|
|
14921
|
+
/* @__PURE__ */ jsx47("input", { name: `${item.id}:reviewerName`, defaultValue: found?.reviewerName ?? "", required: true })
|
|
14922
|
+
] }),
|
|
14923
|
+
/* @__PURE__ */ jsxs45("label", { children: [
|
|
14924
|
+
"Reviewer phone",
|
|
14925
|
+
/* @__PURE__ */ jsx47("input", { name: `${item.id}:reviewerPhone`, defaultValue: found?.reviewerPhone ?? "", required: true })
|
|
14926
|
+
] })
|
|
14927
|
+
] }) : null
|
|
14886
14928
|
] }) : null
|
|
14887
|
-
] })
|
|
14888
|
-
|
|
14929
|
+
] }, k);
|
|
14930
|
+
}),
|
|
14931
|
+
read ? /* @__PURE__ */ jsxs45("label", { className: "mbrfa-check", children: [
|
|
14932
|
+
/* @__PURE__ */ jsx47("input", { type: "checkbox", checked: readingChecked, onChange: (event) => setReadingChecked(event.target.checked) }),
|
|
14933
|
+
"I checked each decision above against the response document."
|
|
14934
|
+
] }) : null,
|
|
14889
14935
|
/* @__PURE__ */ jsx47("button", { type: "submit", children: "Save treatment decisions" })
|
|
14890
14936
|
] }) })
|
|
14891
14937
|
] }) : null,
|
|
@@ -15125,7 +15171,7 @@ function RfaDashboard({ sessionEndpoint, getSession, apiBaseUrl, fetch: fetchOve
|
|
|
15125
15171
|
const identity = useMemo13(() => ({ client, signatureClient, key: key() }), [client, signatureClient]);
|
|
15126
15172
|
return /* @__PURE__ */ jsx49(RfaDashboardContent, { ...props, ...patientId ? { patientId } : {}, ...claimId ? { claimId } : {}, ...renderingProviderId ? { renderingProviderId } : {}, client, signatureClient, options }, `${identity.key}:${patientId ?? ""}:${claimId ?? ""}:${renderingProviderId ?? ""}`);
|
|
15127
15173
|
}
|
|
15128
|
-
function RfaDashboardContent({ client, signatureClient, options, patientId, claimId, renderingProviderId, initialDraft, initialView = "overview", initialDetailAction, initialOverviewView, initialStatus = "", initialAgingBucket = "", taskPresentation, taskQuery: taskQuery2, renderTaskIdentity, navigation, permissions = [], canCreateClaim = false, renderClaimSelector, renderProviderSelector, officialForm = false, managePracticeHref, onEditPractice, onAddPractice, onEditLocation, treatmentTemplates, onSaveTreatmentTemplate, onManageTreatmentTemplates, savedProfileChanges, manageLocationsHref, onPreviewRequest, onPreviewDraft, canManageProviderSignatures = false, renderSendSignatureSetup, environment = "sandbox", actorReference, onCreated, onContinue, selectedRfaId, selectedTreatmentId, selectedResponseDocumentId: controlledResponseDocumentId, onSelectRfa, getRfaHref, getPatientHref, getClaimHref, getProviderHref, formPreviewUrl, hideBackButton = false, hideHeading = false, layout = "classic", ...appearance }) {
|
|
15174
|
+
function RfaDashboardContent({ client, signatureClient, options, patientId, claimId, renderingProviderId, initialDraft, initialView = "overview", initialDetailAction, initialOverviewView, initialStatus = "", initialAgingBucket = "", taskPresentation, taskQuery: taskQuery2, renderTaskIdentity, navigation, permissions = [], canCreateClaim = false, renderClaimSelector, renderProviderSelector, officialForm = false, managePracticeHref, onEditPractice, onAddPractice, onEditLocation, treatmentTemplates, onSaveTreatmentTemplate, onManageTreatmentTemplates, savedProfileChanges, manageLocationsHref, onPreviewRequest, onPreviewDraft, canManageProviderSignatures = false, renderSendSignatureSetup, readRfaResponse, environment = "sandbox", actorReference, onCreated, onContinue, selectedRfaId, selectedTreatmentId, selectedResponseDocumentId: controlledResponseDocumentId, onSelectRfa, getRfaHref, getPatientHref, getClaimHref, getProviderHref, formPreviewUrl, hideBackButton = false, hideHeading = false, layout = "classic", ...appearance }) {
|
|
15129
15175
|
const active = useRef26(true);
|
|
15130
15176
|
useEffect28(() => {
|
|
15131
15177
|
active.current = true;
|
|
@@ -15311,7 +15357,7 @@ function RfaDashboardContent({ client, signatureClient, options, patientId, clai
|
|
|
15311
15357
|
} }) : selected ? /* @__PURE__ */ jsx49(RfaDetail, { layout, ...initialDetailAction ? { initialAction: initialDetailAction } : {}, ...relatedLinks, ...formPreviewUrl ? { formPreviewUrl } : {}, id: selected, selectedItem, ...selectedResponseDocumentId ? { selectedResponseDocumentId } : {}, client, signatureClient, options, onCopied: (draft2) => {
|
|
15312
15358
|
selectRfa(draft2.id);
|
|
15313
15359
|
onCreated?.(draft2);
|
|
15314
|
-
}, draftFormProps, canManageProviderSignatures, ...renderSendSignatureSetup ? { renderSendSignatureSetup } : {}, permissions, environment, ...actorReference ? { actorReference } : {}, ...onContinue ? { onContinue } : {}, ...appearance.disabled !== void 0 ? { disabled: appearance.disabled } : {} }, selected) : /* @__PURE__ */ jsxs47(Fragment28, { children: [
|
|
15360
|
+
}, draftFormProps, canManageProviderSignatures, ...renderSendSignatureSetup ? { renderSendSignatureSetup } : {}, ...readRfaResponse ? { readRfaResponse } : {}, permissions, environment, ...actorReference ? { actorReference } : {}, ...onContinue ? { onContinue } : {}, ...appearance.disabled !== void 0 ? { disabled: appearance.disabled } : {} }, selected) : /* @__PURE__ */ jsxs47(Fragment28, { children: [
|
|
15315
15361
|
view === "overview" ? /* @__PURE__ */ jsx49(RfaTaskBoard, { ...taskPresentation ? { presentation: taskPresentation } : {}, ...taskQuery2 ? { query: taskQuery2 } : {}, ...renderTaskIdentity ? { renderTaskIdentity } : {}, ...navigation?.getTaskHref ? { getTaskHref: navigation.getTaskHref } : {}, ...navigation?.onNavigate ? { onNavigate: navigation.onNavigate } : {}, embedded: true, ...appearance, ...options, ...patientId ? { patientId } : {}, ...claimId ? { claimId } : {}, ...renderingProviderId ? { renderingProviderId } : {}, permissions: permissions.filter((value) => value === "act"), onSelect: (id, documentId) => selectRfa(id, documentId ? { responseDocumentId: documentId } : void 0) }) : /* @__PURE__ */ jsxs47("div", { className: "mbrfa-filters", children: [
|
|
15316
15362
|
/* @__PURE__ */ jsxs47("label", { className: "mbrfa-search", children: [
|
|
15317
15363
|
"Search requests",
|
|
@@ -15393,7 +15439,7 @@ function RfaDashboardContent({ client, signatureClient, options, patientId, clai
|
|
|
15393
15439
|
] })
|
|
15394
15440
|
] });
|
|
15395
15441
|
}
|
|
15396
|
-
function RfaDetail({ layout, id, selectedItem, selectedResponseDocumentId, client, signatureClient, options, permissions, environment, actorReference, onContinue, disabled, draftFormProps, canManageProviderSignatures, renderSendSignatureSetup, onCopied, getPatientHref, getClaimHref, getProviderHref, formPreviewUrl, initialAction }) {
|
|
15442
|
+
function RfaDetail({ layout, id, selectedItem, selectedResponseDocumentId, client, signatureClient, options, permissions, environment, actorReference, onContinue, disabled, draftFormProps, canManageProviderSignatures, renderSendSignatureSetup, readRfaResponse, onCopied, getPatientHref, getClaimHref, getProviderHref, formPreviewUrl, initialAction }) {
|
|
15397
15443
|
const [rfa, setRfa] = useState34(null);
|
|
15398
15444
|
const [error, setError] = useState34("");
|
|
15399
15445
|
const [busy, setBusy] = useState34(false);
|
|
@@ -15731,7 +15777,7 @@ function RfaDetail({ layout, id, selectedItem, selectedResponseDocumentId, clien
|
|
|
15731
15777
|
" \xB7 Due ",
|
|
15732
15778
|
date7(item.dueAt)
|
|
15733
15779
|
] }, item.id)) }) : null,
|
|
15734
|
-
/* @__PURE__ */ jsx49(RfaLifecycleControls, { rows: true, ...selectedResponseDocumentId ? { selectedResponseDocumentId } : {}, ...options, rfa, disabled: !!locked, permissions: permissions.filter((permission) => permission === "act" || permission === "edit"), onUpdated: adopt })
|
|
15780
|
+
/* @__PURE__ */ jsx49(RfaLifecycleControls, { rows: true, ...selectedResponseDocumentId ? { selectedResponseDocumentId } : {}, ...options, ...readRfaResponse ? { readResponse: readRfaResponse } : {}, rfa, disabled: !!locked, permissions: permissions.filter((permission) => permission === "act" || permission === "edit"), onUpdated: adopt })
|
|
15735
15781
|
] }) : null
|
|
15736
15782
|
] }) }) : /* @__PURE__ */ jsx49(Fragment28, { children: /* @__PURE__ */ jsxs47("div", { id: `${tabId}-details-panel`, role: "tabpanel", "aria-labelledby": `${tabId}-details-tab`, hidden: detailTab !== "details", className: "mbrfa-stack", children: [
|
|
15737
15783
|
/* @__PURE__ */ jsx49(RfaRequestSummary, { rfa, hideTreatments: true, ...getPatientHref ? { getPatientHref } : {}, ...getClaimHref ? { getClaimHref } : {}, ...getProviderHref ? { getProviderHref } : {}, ...rfa.claimsAdminId ? { onViewClaimsAdministrator: () => setDirectoryOpen(true) } : {} }),
|
|
@@ -15858,7 +15904,7 @@ function RfaDetail({ layout, id, selectedItem, selectedResponseDocumentId, clien
|
|
|
15858
15904
|
} }) }),
|
|
15859
15905
|
/* @__PURE__ */ jsxs47("details", { className: "mbrfa-detail-card", open: Boolean(selectedResponseDocumentId), children: [
|
|
15860
15906
|
/* @__PURE__ */ jsx49("summary", { children: "Receipt, responses and follow-up" }),
|
|
15861
|
-
/* @__PURE__ */ jsx49(RfaLifecycleControls, { ...selectedResponseDocumentId ? { selectedResponseDocumentId } : {}, ...options, rfa, disabled: !!locked, permissions: permissions.filter((permission) => permission === "act" || permission === "edit"), onUpdated: adopt })
|
|
15907
|
+
/* @__PURE__ */ jsx49(RfaLifecycleControls, { ...selectedResponseDocumentId ? { selectedResponseDocumentId } : {}, ...options, ...readRfaResponse ? { readResponse: readRfaResponse } : {}, rfa, disabled: !!locked, permissions: permissions.filter((permission) => permission === "act" || permission === "edit"), onUpdated: adopt })
|
|
15862
15908
|
] })
|
|
15863
15909
|
] }) }),
|
|
15864
15910
|
/* @__PURE__ */ jsxs47("div", { hidden: simple && detailTab !== "history", id: `${tabId}-history-panel`, role: detailTab === "history" ? "tabpanel" : void 0, "aria-labelledby": detailTab === "history" ? `${tabId}-history-tab` : void 0, onClick: (event) => {
|