@mindbill/react 0.77.43 → 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.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)}
@@ -13475,39 +13478,41 @@ function RfaDraftForm({ initialDraft, identity, officialForm = false, formDetail
13475
13478
  setAdministratorOverride({ id });
13476
13479
  update({ authorizationContact });
13477
13480
  } }),
13478
- draft2.items.map((item, index) => /* @__PURE__ */ jsxs41("fieldset", { disabled: locked, children: [
13479
- /* @__PURE__ */ jsxs41("legend", { children: [
13480
- "Requested Treatment",
13481
- draft2.items.length > 1 ? ` ${index + 1}` : ""
13482
- ] }),
13483
- 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,
13484
- /* @__PURE__ */ jsxs41("div", { className: "mbrfa-form-grid", children: [
13485
- /* @__PURE__ */ jsx43(RfaDiagnosisFields, { officialForm: true, code: item.diagnosisCode, ...item.diagnosisDescription !== void 0 ? { description: item.diagnosisDescription } : {}, ...searchDiagnosisCodes ? { search: searchDiagnosisCodes } : {}, onChange: (value) => updateItem(index, value) }),
13486
- /* @__PURE__ */ jsxs41("label", { className: "mbrfa-s3 mbrfa-row-start", children: [
13487
- /* @__PURE__ */ jsxs41("span", { children: [
13488
- "Service/Good Requested",
13489
- /* @__PURE__ */ jsx43(RfaRequired, {})
13490
- ] }),
13491
- /* @__PURE__ */ jsx43("textarea", { rows: 2, required: true, maxLength: 1e3, value: item.serviceDescription, onChange: (event) => updateItem(index, { serviceDescription: event.target.value }) })
13492
- ] }),
13493
- /* @__PURE__ */ jsxs41("label", { className: "mbrfa-s1", children: [
13494
- /* @__PURE__ */ jsx43("span", { children: "CPT/HCPCS Code" }),
13495
- /* @__PURE__ */ jsx43("input", { placeholder: "Optional", maxLength: 16, value: item.procedureCode ?? "", onChange: (event) => updateItem(index, { procedureCode: event.target.value }) })
13496
- ] }),
13497
- /* @__PURE__ */ jsxs41("label", { className: "mbrfa-s2", children: [
13498
- /* @__PURE__ */ jsx43("span", { children: "Other Information" }),
13499
- /* @__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 } }) })
13500
- ] })
13501
- ] }),
13502
- /* @__PURE__ */ jsxs41("div", { className: "mbtd-actions", children: [
13503
- 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,
13504
- draft2.items.length > 1 ? /* @__PURE__ */ jsxs41("button", { type: "button", onClick: () => update({ items: draft2.items.filter((_, position) => position !== index) }), children: [
13505
- "Remove requested treatment ",
13506
- index + 1
13507
- ] }) : 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" })
13508
13514
  ] })
13509
- ] }, index)),
13510
- /* @__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
+ ] }),
13511
13516
  supportingDocumentFields,
13512
13517
  saveError,
13513
13518
  /* @__PURE__ */ jsxs41("div", { className: "mbtd-actions", children: [