@mindbill/react 0.77.42 → 0.77.44

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 CHANGED
@@ -1010,6 +1010,8 @@ type RfaDraftFormProps = TreatmentDraftAppearance & RfaContactDirectoryProps & {
1010
1010
  selectors?: RfaFormSelectors;
1011
1011
  /** Open the host's in-place editor for the selected practice or location (null adds a location). The form reloads saved values when focus returns. */
1012
1012
  onEditPractice?: (practiceId: string) => void;
1013
+ /** Opens the host's editor for a new practice; adds an "Add new practice" choice to the practice list. */
1014
+ onAddPractice?: () => void;
1013
1015
  onEditLocation?: (locationId: string | null, practiceId: string) => void;
1014
1016
  /** Saved sets of requested treatments offered in the Requested Treatment section (official form). */
1015
1017
  treatmentTemplates?: RfaTreatmentTemplate[] | undefined;
@@ -1057,7 +1059,7 @@ type RfaDraftFormProps = TreatmentDraftAppearance & RfaContactDirectoryProps & {
1057
1059
  /** Remove blank optional item fields, retaining an explicitly cleared return fax. */
1058
1060
  declare function normalizeRfaDraft(draft: RfaDraftInput): RfaDraftInput;
1059
1061
  declare function validateRfaDraft(draft: RfaDraftInput): string | null;
1060
- declare function RfaDraftForm({ initialDraft, identity, officialForm, formDetails, selectors, onEditPractice, onEditLocation, treatmentTemplates, onSaveTreatmentTemplate, onManageTreatmentTemplates, managePracticeHref, manageLocationsHref, onRefreshProfile, profilePending, onReview, onPreview, searchClaimsAdministrators, getClaimsAdministratorDirectory, embedded, onSave, onBack, mode, searchDiagnosisCodes, organizationProfile, savedDiagnosisCodes, supportingDocuments, disabled, ...appearance }: RfaDraftFormProps): ReactElement;
1062
+ declare function RfaDraftForm({ initialDraft, identity, officialForm, formDetails, selectors, onEditPractice, onAddPractice, onEditLocation, treatmentTemplates, onSaveTreatmentTemplate, onManageTreatmentTemplates, managePracticeHref, manageLocationsHref, onRefreshProfile, profilePending, onReview, onPreview, searchClaimsAdministrators, getClaimsAdministratorDirectory, embedded, onSave, onBack, mode, searchDiagnosisCodes, organizationProfile, savedDiagnosisCodes, supportingDocuments, disabled, ...appearance }: RfaDraftFormProps): ReactElement;
1061
1063
 
1062
1064
  /** A saved set of requested treatments. Diagnoses stay with the claim, so templates do not carry them. */
1063
1065
  type RfaTreatmentTemplate = {
@@ -1134,6 +1136,8 @@ type RfaDashboardProps = OrganizationClientOptions & TreatmentDraftAppearance &
1134
1136
  officialForm?: boolean;
1135
1137
  /** Host in-place editors for the selected practice or location (official form). */
1136
1138
  onEditPractice?: (practiceId: string) => void;
1139
+ /** Opens the host's editor for a new practice; adds an "Add new practice" choice to the practice list. */
1140
+ onAddPractice?: () => void;
1137
1141
  onEditLocation?: (locationId: string | null, practiceId: string) => void;
1138
1142
  /** Saved sets of requested treatments for the official form, with host-owned saving and management. */
1139
1143
  treatmentTemplates?: RfaTreatmentTemplate[];
package/dist/index.js CHANGED
@@ -10508,6 +10508,9 @@ function TreatmentDraftShell({ title, description, children, hideHeading = false
10508
10508
  .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}
10509
10509
  @media(max-width:760px){.mbtd .mbrfa-template-save{grid-template-columns:minmax(0,1fr)}}
10510
10510
  .mbtd .mbrfa-form-grid>.mbrfa-row-start{grid-column:1/span 3}.mbtd .mbrfa-form-grid textarea[rows="2"]{min-height:44px}
10511
+ .mbtd .mbrfa-treatments{display:grid;gap:14px}.mbtd .mbrfa-treatment+.mbrfa-treatment{padding-top:16px;border-top:1px solid var(--mb-border)}
10512
+ .mbtd .mbrfa-treatment-head{display:flex;align-items:center;gap:14px;margin-bottom:10px;font-size:13px}.mbtd .mbrfa-treatment-head>strong{font-weight:600;margin-right:auto}.mbtd button.mbrfa-link.mbrfa-link.mbrfa-treatment-remove{color:var(--mb-danger,#b42318)}
10513
+ .mbtd .mbrfa-add-treatment{display:block;width:100%;min-height:44px;border:1px dashed color-mix(in srgb,var(--mb-accent) 55%,var(--mb-border));background:color-mix(in srgb,var(--mb-accent) 5%,var(--mb-surface));color:var(--mb-accent);font-weight:600;text-align:center;cursor:pointer}.mbtd .mbrfa-add-treatment:hover:not(:disabled){background:color-mix(in srgb,var(--mb-accent) 10%,var(--mb-surface))}
10511
10514
  .mbtd .mbrfa-option-group{display:grid;gap:4px;grid-column:1/-1}.mbtd .mbrfa-option-group+.mbrfa-option-group{margin-top:6px;padding-top:14px;border-top:1px solid var(--mb-border)}.mbtd .mbrfa-option-group>span{font-size:12px;font-weight:600;color:var(--mb-muted)}.mbtd .mbrfa-option-group>span>small{margin-left:10px;font-weight:400}
10512
10515
  .mbtd .mbrfa-docs{display:grid;gap:10px}
10513
10516
  .mbtd .mbrfa-doc{display:flex;align-items:center;gap:12px;padding:10px 14px;border:1px solid var(--mb-border);border-radius:var(--mb-control-radius);background:var(--mb-surface)}.mbtd .mbrfa-doc>span{display:grid;min-width:0;flex:1}.mbtd .mbrfa-doc strong{font-size:14px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mbtd .mbrfa-doc small{font-size:12px;color:var(--mb-muted)}.mbtd .mbrfa-doc>button{border:0;background:none;min-height:32px;width:32px;padding:0;font-size:20px;line-height:1;color:var(--mb-muted)}.mbtd .mbrfa-doc>button:hover{color:var(--mb-text)}
@@ -12681,7 +12684,7 @@ function RfaClaimSetup({ client, disabled, onCreated, onCancel }) {
12681
12684
  // src/rfa-practice-picker.tsx
12682
12685
  import { useEffect as useEffect20, useRef as useRef18, useState as useState23 } from "react";
12683
12686
  import { Fragment as Fragment21, jsx as jsx38, jsxs as jsxs36 } from "react/jsx-runtime";
12684
- function RfaPracticePicker({ profile, value, onChange, managePracticeHref, manageLocationsHref, onEditPractice, onEditLocation, onChosen }) {
12687
+ function RfaPracticePicker({ profile, value, onChange, managePracticeHref, manageLocationsHref, onEditPractice, onAddPractice, onEditLocation, onChosen }) {
12685
12688
  const practices = profile?.billingProviders ?? [];
12686
12689
  const [practice, setPractice] = useState23(() => practices.find((item) => item.name === value?.name)?.id ?? "");
12687
12690
  const [location, setLocation] = useState23(() => practice ? (profile?.locations ?? []).find((item) => item.active !== false && item.street === value?.address && (!item.billingProviderId || item.billingProviderId === practice))?.id ?? "" : "");
@@ -12714,26 +12717,46 @@ function RfaPracticePicker({ profile, value, onChange, managePracticeHref, manag
12714
12717
  if (onlyPractice) choosePractice(onlyPractice);
12715
12718
  }, [onlyPractice]);
12716
12719
  const locations = (profile?.locations ?? []).filter((item) => item.active !== false && (item.billingProviderId ? item.billingProviderId === practice : practices.length <= 1));
12720
+ const adding = useRef18(null);
12721
+ const practiceIds = practices.map((item) => item.id).join("|"), locationIds = locations.map((item) => item.id).join("|");
12722
+ useEffect20(() => {
12723
+ const pending = adding.current;
12724
+ if (!pending) return;
12725
+ const added = (pending.kind === "practice" ? practices : locations).find((item) => !pending.known.includes(item.id));
12726
+ if (!added) return;
12727
+ adding.current = null;
12728
+ if (pending.kind === "practice") choosePractice(added.id);
12729
+ else chooseLocation(added.id);
12730
+ }, [practiceIds, locationIds]);
12731
+ const chooseLocation = (id) => {
12732
+ const chosen = locations.find((item) => item.id === id);
12733
+ if (!chosen) return;
12734
+ setLocation(id);
12735
+ setLocationQuery("");
12736
+ onChosen?.();
12737
+ onChange({ ...value, ...located(chosen, practices.find((item) => item.id === practice)?.phone) });
12738
+ };
12739
+ const ADD = "__add__";
12717
12740
  return /* @__PURE__ */ jsxs36(Fragment21, { children: [
12718
12741
  /* @__PURE__ */ jsxs36(RfaPicker, { label: "Practice", children: [
12719
- /* @__PURE__ */ jsx38(RfaIdentitySelect, { label: "Saved practice", placeholder: "Choose a practice", searchPlaceholder: "Search practices", query: practiceQuery, onSearch: setPracticeQuery, searchable: true, value: practice, options: practices.filter((item) => item.id === practice || item.name.toLowerCase().includes(practiceQuery.toLowerCase())).map((item) => ({ id: item.id, label: item.name })), onSelect: choosePractice }),
12742
+ /* @__PURE__ */ jsx38(RfaIdentitySelect, { label: "Saved practice", placeholder: "Choose a practice", searchPlaceholder: "Search practices", query: practiceQuery, onSearch: setPracticeQuery, searchable: true, value: practice, options: [...practices.filter((item) => item.id === practice || item.name.toLowerCase().includes(practiceQuery.toLowerCase())).map((item) => ({ id: item.id, label: item.name })), ...onAddPractice ? [{ id: ADD, label: "Add new practice", action: true }] : []], onSelect: (id) => {
12743
+ if (id !== ADD) return choosePractice(id);
12744
+ adding.current = { kind: "practice", known: practices.map((item) => item.id) };
12745
+ onAddPractice?.();
12746
+ } }),
12720
12747
  /* @__PURE__ */ jsxs36("span", { className: "mbrfa-picker-links", children: [
12721
12748
  onEditPractice && practice ? /* @__PURE__ */ jsx38("button", { type: "button", className: "mbrfa-link", onClick: () => onEditPractice(practice), children: "Edit practice" }) : null,
12722
12749
  managePracticeHref ? /* @__PURE__ */ jsx38("a", { className: "mbrfa-link-out", href: managePracticeHref, target: "_blank", rel: "noopener noreferrer", children: onEditPractice ? "Manage practices \u2197" : "Add / manage practices" }) : null
12723
12750
  ] })
12724
12751
  ] }),
12725
12752
  /* @__PURE__ */ jsxs36(RfaPicker, { label: "Practice location", children: [
12726
- /* @__PURE__ */ jsx38(RfaIdentitySelect, { label: "Practice location", placeholder: practice ? "Choose a location" : "Choose a practice first", searchPlaceholder: "Search locations", query: locationQuery, onSearch: setLocationQuery, searchable: true, disabled: !practice, value: location, options: locations.filter((item) => item.id === location || item.name.toLowerCase().includes(locationQuery.toLowerCase())).map((item) => ({ id: item.id, label: item.name, detail: `${item.street}, ${item.city}` })), onSelect: (id) => {
12727
- const chosen = locations.find((item) => item.id === id);
12728
- if (!chosen) return;
12729
- setLocation(id);
12730
- setLocationQuery("");
12731
- onChosen?.();
12732
- onChange({ ...value, ...located(chosen, practices.find((item) => item.id === practice)?.phone) });
12753
+ /* @__PURE__ */ jsx38(RfaIdentitySelect, { label: "Practice location", placeholder: practice ? "Choose a location" : "Choose a practice first", searchPlaceholder: "Search locations", query: locationQuery, onSearch: setLocationQuery, searchable: true, disabled: !practice, value: location, options: [...locations.filter((item) => item.id === location || item.name.toLowerCase().includes(locationQuery.toLowerCase())).map((item) => ({ id: item.id, label: item.name, detail: `${item.street}, ${item.city}` })), ...onEditLocation && practice ? [{ id: ADD, label: "Add new location", action: true }] : []], onSelect: (id) => {
12754
+ if (id !== ADD) return chooseLocation(id);
12755
+ adding.current = { kind: "location", known: locations.map((item) => item.id) };
12756
+ onEditLocation?.(null, practice);
12733
12757
  } }),
12734
12758
  /* @__PURE__ */ jsxs36("span", { className: "mbrfa-picker-links", children: [
12735
12759
  onEditLocation && practice && location ? /* @__PURE__ */ jsx38("button", { type: "button", className: "mbrfa-link", onClick: () => onEditLocation(location, practice), children: "Edit location" }) : null,
12736
- onEditLocation && practice ? /* @__PURE__ */ jsx38("button", { type: "button", className: "mbrfa-link", onClick: () => onEditLocation(null, practice), children: "Add location" }) : null,
12737
12760
  manageLocationsHref ? /* @__PURE__ */ jsx38("a", { className: "mbrfa-link-out", href: manageLocationsHref, target: "_blank", rel: "noopener noreferrer", children: onEditLocation ? "Manage locations \u2197" : "Add / manage locations" }) : null
12738
12761
  ] })
12739
12762
  ] })
@@ -13242,7 +13265,7 @@ function validateRfaDraft(draft2) {
13242
13265
  }
13243
13266
  return null;
13244
13267
  }
13245
- function RfaDraftForm({ initialDraft, identity, officialForm = false, formDetails, selectors, onEditPractice, onEditLocation, treatmentTemplates, onSaveTreatmentTemplate, onManageTreatmentTemplates, managePracticeHref, manageLocationsHref, onRefreshProfile, profilePending = false, onReview, onPreview, searchClaimsAdministrators, getClaimsAdministratorDirectory, embedded = false, onSave, onBack, mode = "create", searchDiagnosisCodes, organizationProfile, savedDiagnosisCodes = [], supportingDocuments, disabled = false, ...appearance }) {
13268
+ function RfaDraftForm({ initialDraft, identity, officialForm = false, formDetails, selectors, onEditPractice, onAddPractice, onEditLocation, treatmentTemplates, onSaveTreatmentTemplate, onManageTreatmentTemplates, managePracticeHref, manageLocationsHref, onRefreshProfile, profilePending = false, onReview, onPreview, searchClaimsAdministrators, getClaimsAdministratorDirectory, embedded = false, onSave, onBack, mode = "create", searchDiagnosisCodes, organizationProfile, savedDiagnosisCodes = [], supportingDocuments, disabled = false, ...appearance }) {
13246
13269
  const [savedDraft, setDraft] = useState28(() => normalizeRfaDraft(initialDraft));
13247
13270
  useEffect23(() => {
13248
13271
  if (identity) setDraft((current) => {
@@ -13433,7 +13456,7 @@ function RfaDraftForm({ initialDraft, identity, officialForm = false, formDetail
13433
13456
  /* @__PURE__ */ jsx43("legend", { children: "Requesting Physician Information" }),
13434
13457
  /* @__PURE__ */ jsxs41("div", { className: "mbrfa-pickers", "data-columns": selectors?.physician ? 3 : 2, children: [
13435
13458
  selectors?.physician ? /* @__PURE__ */ jsx43(RfaPicker, { required: true, label: "Requesting physician", children: selectors.physician }) : null,
13436
- /* @__PURE__ */ jsx43(RfaPracticePicker, { profile: organizationProfile, value: draft2.requestingPractice, onChange: (requestingPractice) => update({ requestingPractice }), ...managePracticeHref ? { managePracticeHref } : {}, ...manageLocationsHref ? { manageLocationsHref } : {}, onEditPractice, onEditLocation, onChosen: () => setPracticeManual(false) })
13459
+ /* @__PURE__ */ jsx43(RfaPracticePicker, { profile: organizationProfile, value: draft2.requestingPractice, onChange: (requestingPractice) => update({ requestingPractice }), ...managePracticeHref ? { managePracticeHref } : {}, ...manageLocationsHref ? { manageLocationsHref } : {}, onEditPractice, onAddPractice, onEditLocation, onChosen: () => setPracticeManual(false) })
13437
13460
  ] }),
13438
13461
  /* @__PURE__ */ jsx43("fieldset", { className: "mbrfa-plain", disabled: locked, children: /* @__PURE__ */ jsx43(
13439
13462
  RfaOfficialContactFields,
@@ -13455,39 +13478,41 @@ function RfaDraftForm({ initialDraft, identity, officialForm = false, formDetail
13455
13478
  setAdministratorOverride({ id });
13456
13479
  update({ authorizationContact });
13457
13480
  } }),
13458
- draft2.items.map((item, index) => /* @__PURE__ */ jsxs41("fieldset", { disabled: locked, children: [
13459
- /* @__PURE__ */ jsxs41("legend", { children: [
13460
- "Requested Treatment",
13461
- draft2.items.length > 1 ? ` ${index + 1}` : ""
13462
- ] }),
13463
- index === 0 && (treatmentTemplates || onSaveTreatmentTemplate) ? /* @__PURE__ */ jsx43(RfaTemplateBar, { templates: treatmentTemplates ?? [], items: draft2.items, renderingProviderId: draft2.renderingProviderId, physicianName: draft2.providerName, disabled: locked, onApply: (items) => update({ items }), onSave: onSaveTreatmentTemplate, onManage: onManageTreatmentTemplates }) : null,
13464
- /* @__PURE__ */ jsxs41("div", { className: "mbrfa-form-grid", children: [
13465
- /* @__PURE__ */ jsx43(RfaDiagnosisFields, { officialForm: true, code: item.diagnosisCode, ...item.diagnosisDescription !== void 0 ? { description: item.diagnosisDescription } : {}, ...searchDiagnosisCodes ? { search: searchDiagnosisCodes } : {}, onChange: (value) => updateItem(index, value) }),
13466
- /* @__PURE__ */ jsxs41("label", { className: "mbrfa-s3 mbrfa-row-start", children: [
13467
- /* @__PURE__ */ jsxs41("span", { children: [
13468
- "Service/Good Requested",
13469
- /* @__PURE__ */ jsx43(RfaRequired, {})
13470
- ] }),
13471
- /* @__PURE__ */ jsx43("textarea", { rows: 2, required: true, maxLength: 1e3, value: item.serviceDescription, onChange: (event) => updateItem(index, { serviceDescription: event.target.value }) })
13472
- ] }),
13473
- /* @__PURE__ */ jsxs41("label", { className: "mbrfa-s1", children: [
13474
- /* @__PURE__ */ jsx43("span", { children: "CPT/HCPCS Code" }),
13475
- /* @__PURE__ */ jsx43("input", { placeholder: "Optional", maxLength: 16, value: item.procedureCode ?? "", onChange: (event) => updateItem(index, { procedureCode: event.target.value }) })
13476
- ] }),
13477
- /* @__PURE__ */ jsxs41("label", { className: "mbrfa-s2", children: [
13478
- /* @__PURE__ */ jsx43("span", { children: "Other Information" }),
13479
- /* @__PURE__ */ jsx43("textarea", { rows: 2, placeholder: "Frequency, duration, quantity, etc. (optional)", maxLength: 2e3, value: typeof item.metadata?.otherInformation === "string" ? item.metadata.otherInformation : [item.quantity !== void 0 ? `Quantity: ${item.quantity}` : "", item.units !== void 0 ? `Units: ${item.units}` : "", item.frequency, item.duration, item.requestedFrom ? `From: ${item.requestedFrom}` : "", item.requestedTo ? `Through: ${item.requestedTo}` : ""].filter(Boolean).join("; "), onChange: (event) => updateItem(index, { metadata: { ...item.metadata, otherInformation: event.target.value } }) })
13480
- ] })
13481
- ] }),
13482
- /* @__PURE__ */ jsxs41("div", { className: "mbtd-actions", children: [
13483
- index > 0 && draft2.items[0]?.diagnosisCode ? /* @__PURE__ */ jsx43("button", { type: "button", onClick: () => updateItem(index, { diagnosisCode: draft2.items[0].diagnosisCode, diagnosisDescription: draft2.items[0].diagnosisDescription ?? "" }), children: "Copy diagnosis from first treatment" }) : null,
13484
- draft2.items.length > 1 ? /* @__PURE__ */ jsxs41("button", { type: "button", onClick: () => update({ items: draft2.items.filter((_, position) => position !== index) }), children: [
13485
- "Remove requested treatment ",
13486
- index + 1
13487
- ] }) : null
13481
+ /* @__PURE__ */ jsxs41("fieldset", { disabled: locked, children: [
13482
+ /* @__PURE__ */ jsx43("legend", { children: "Requested Treatment" }),
13483
+ treatmentTemplates || onSaveTreatmentTemplate ? /* @__PURE__ */ jsx43(RfaTemplateBar, { templates: treatmentTemplates ?? [], items: draft2.items, renderingProviderId: draft2.renderingProviderId, physicianName: draft2.providerName, disabled: locked, onApply: (items) => update({ items }), onSave: onSaveTreatmentTemplate, onManage: onManageTreatmentTemplates }) : null,
13484
+ /* @__PURE__ */ jsxs41("div", { className: "mbrfa-treatments", children: [
13485
+ draft2.items.map((item, index) => /* @__PURE__ */ jsxs41("div", { className: "mbrfa-treatment", role: "group", "aria-label": `Treatment ${index + 1}`, children: [
13486
+ draft2.items.length > 1 ? /* @__PURE__ */ jsxs41("div", { className: "mbrfa-treatment-head", children: [
13487
+ /* @__PURE__ */ jsxs41("strong", { children: [
13488
+ "Treatment ",
13489
+ index + 1
13490
+ ] }),
13491
+ index > 0 && draft2.items[0]?.diagnosisCode ? /* @__PURE__ */ jsx43("button", { type: "button", className: "mbrfa-link", onClick: () => updateItem(index, { diagnosisCode: draft2.items[0].diagnosisCode, diagnosisDescription: draft2.items[0].diagnosisDescription ?? "" }), children: "Copy diagnosis from first treatment" }) : null,
13492
+ /* @__PURE__ */ jsx43("button", { type: "button", className: "mbrfa-link mbrfa-treatment-remove", "aria-label": `Remove treatment ${index + 1}`, onClick: () => update({ items: draft2.items.filter((_, position) => position !== index) }), children: "Remove" })
13493
+ ] }) : null,
13494
+ /* @__PURE__ */ jsxs41("div", { className: "mbrfa-form-grid", children: [
13495
+ /* @__PURE__ */ jsx43(RfaDiagnosisFields, { officialForm: true, code: item.diagnosisCode, ...item.diagnosisDescription !== void 0 ? { description: item.diagnosisDescription } : {}, ...searchDiagnosisCodes ? { search: searchDiagnosisCodes } : {}, onChange: (value) => updateItem(index, value) }),
13496
+ /* @__PURE__ */ jsxs41("label", { className: "mbrfa-s3 mbrfa-row-start", children: [
13497
+ /* @__PURE__ */ jsxs41("span", { children: [
13498
+ "Service/Good Requested",
13499
+ /* @__PURE__ */ jsx43(RfaRequired, {})
13500
+ ] }),
13501
+ /* @__PURE__ */ jsx43("textarea", { rows: 2, required: true, maxLength: 1e3, value: item.serviceDescription, onChange: (event) => updateItem(index, { serviceDescription: event.target.value }) })
13502
+ ] }),
13503
+ /* @__PURE__ */ jsxs41("label", { className: "mbrfa-s1", children: [
13504
+ /* @__PURE__ */ jsx43("span", { children: "CPT/HCPCS Code" }),
13505
+ /* @__PURE__ */ jsx43("input", { placeholder: "Optional", maxLength: 16, value: item.procedureCode ?? "", onChange: (event) => updateItem(index, { procedureCode: event.target.value }) })
13506
+ ] }),
13507
+ /* @__PURE__ */ jsxs41("label", { className: "mbrfa-s2", children: [
13508
+ /* @__PURE__ */ jsx43("span", { children: "Other Information" }),
13509
+ /* @__PURE__ */ jsx43("textarea", { rows: 2, placeholder: "Frequency, duration, quantity, etc. (optional)", maxLength: 2e3, value: typeof item.metadata?.otherInformation === "string" ? item.metadata.otherInformation : [item.quantity !== void 0 ? `Quantity: ${item.quantity}` : "", item.units !== void 0 ? `Units: ${item.units}` : "", item.frequency, item.duration, item.requestedFrom ? `From: ${item.requestedFrom}` : "", item.requestedTo ? `Through: ${item.requestedTo}` : ""].filter(Boolean).join("; "), onChange: (event) => updateItem(index, { metadata: { ...item.metadata, otherInformation: event.target.value } }) })
13510
+ ] })
13511
+ ] })
13512
+ ] }, index)),
13513
+ /* @__PURE__ */ jsx43("button", { type: "button", className: "mbrfa-add-treatment", disabled: locked || draft2.items.length >= 100, onClick: () => update({ items: [...draft2.items, { diagnosisCode: "", serviceDescription: "" }] }), children: "+ Add another treatment" })
13488
13514
  ] })
13489
- ] }, index)),
13490
- /* @__PURE__ */ jsx43("div", { children: /* @__PURE__ */ jsx43("button", { type: "button", disabled: locked || draft2.items.length >= 100, onClick: () => update({ items: [...draft2.items, { diagnosisCode: "", serviceDescription: "" }] }), children: "Add requested treatment" }) }),
13515
+ ] }),
13491
13516
  supportingDocumentFields,
13492
13517
  saveError,
13493
13518
  /* @__PURE__ */ jsxs41("div", { className: "mbtd-actions", children: [
@@ -14577,7 +14602,7 @@ function RfaDashboard({ sessionEndpoint, getSession, apiBaseUrl, fetch: fetchOve
14577
14602
  const identity = useMemo12(() => ({ client, signatureClient, key: key() }), [client, signatureClient]);
14578
14603
  return /* @__PURE__ */ jsx47(RfaDashboardContent, { ...props, ...patientId ? { patientId } : {}, ...claimId ? { claimId } : {}, ...renderingProviderId ? { renderingProviderId } : {}, client, signatureClient, options }, `${identity.key}:${patientId ?? ""}:${claimId ?? ""}:${renderingProviderId ?? ""}`);
14579
14604
  }
14580
- function RfaDashboardContent({ client, signatureClient, options, patientId, claimId, renderingProviderId, initialDraft, initialView = "overview", initialOverviewView, initialStatus = "", initialAgingBucket = "", taskPresentation, taskQuery: taskQuery2, renderTaskIdentity, navigation, permissions = [], canCreateClaim = false, renderClaimSelector, renderProviderSelector, officialForm = false, managePracticeHref, onEditPractice, onEditLocation, treatmentTemplates, onSaveTreatmentTemplate, onManageTreatmentTemplates, savedProfileChanges, manageLocationsHref, onPreviewRequest, canManageProviderSignatures = false, environment = "sandbox", actorReference, onCreated, onContinue, selectedRfaId, selectedTreatmentId, selectedResponseDocumentId: controlledResponseDocumentId, onSelectRfa, getRfaHref, getPatientHref, getClaimHref, getProviderHref, formPreviewUrl, hideBackButton = false, hideHeading = false, layout = "classic", ...appearance }) {
14605
+ function RfaDashboardContent({ client, signatureClient, options, patientId, claimId, renderingProviderId, initialDraft, initialView = "overview", 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, canManageProviderSignatures = false, environment = "sandbox", actorReference, onCreated, onContinue, selectedRfaId, selectedTreatmentId, selectedResponseDocumentId: controlledResponseDocumentId, onSelectRfa, getRfaHref, getPatientHref, getClaimHref, getProviderHref, formPreviewUrl, hideBackButton = false, hideHeading = false, layout = "classic", ...appearance }) {
14581
14606
  const active = useRef23(true);
14582
14607
  useEffect26(() => {
14583
14608
  active.current = true;
@@ -14593,7 +14618,7 @@ function RfaDashboardContent({ client, signatureClient, options, patientId, clai
14593
14618
  const merge = (current, saved) => saved?.length ? [...current.map((item) => saved.find((next) => next.id === item.id) ?? item), ...saved.filter((next) => !current.some((item) => item.id === next.id))] : current;
14594
14619
  setProfile((current) => current ? { ...current, billingProviders: merge(current.billingProviders, savedProfileChanges.billingProviders), locations: merge(current.locations, savedProfileChanges.locations) } : current);
14595
14620
  }, [savedProfileChanges]);
14596
- const draftFormProps = { officialForm, profilePending: !profile && !profileSettled, ...officialForm && (treatmentTemplates || onSaveTreatmentTemplate) ? { treatmentTemplates: treatmentTemplates ?? [], onSaveTreatmentTemplate, onManageTreatmentTemplates } : {}, ...onEditPractice ? { onEditPractice } : {}, ...onEditLocation ? { onEditLocation } : {}, ...managePracticeHref ? { managePracticeHref } : {}, ...manageLocationsHref ? { manageLocationsHref } : {}, onRefreshProfile: async () => {
14621
+ const draftFormProps = { officialForm, profilePending: !profile && !profileSettled, ...officialForm && (treatmentTemplates || onSaveTreatmentTemplate) ? { treatmentTemplates: treatmentTemplates ?? [], onSaveTreatmentTemplate, onManageTreatmentTemplates } : {}, ...onEditPractice ? { onEditPractice } : {}, ...onAddPractice ? { onAddPractice } : {}, ...onEditLocation ? { onEditLocation } : {}, ...managePracticeHref ? { managePracticeHref } : {}, ...manageLocationsHref ? { manageLocationsHref } : {}, onRefreshProfile: async () => {
14597
14622
  const next = await createOrganizationClient4(options).getBillingProfile();
14598
14623
  if (active.current) setProfile(next);
14599
14624
  }, ...client.searchClaimsAdministrators ? { searchClaimsAdministrators: client.searchClaimsAdministrators } : {}, ...client.getClaimsAdministratorDirectory ? { getClaimsAdministratorDirectory: client.getClaimsAdministratorDirectory } : {}, searchDiagnosisCodes: references.searchDiagnosisCodes, ...profile ? { organizationProfile: profile } : {} };