@ampath/esm-dha-workflow-app 4.0.0-next.35 → 4.0.0-next.355
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/README.md +19 -0
- package/dist/1149.js +1 -0
- package/dist/1149.js.map +1 -0
- package/dist/1171.js +1 -0
- package/dist/1171.js.map +1 -0
- package/dist/1197.js +1 -0
- package/dist/1239.js +1 -0
- package/dist/1239.js.map +1 -0
- package/dist/1277.js +1 -0
- package/dist/1277.js.map +1 -0
- package/dist/1363.js +1 -0
- package/dist/1363.js.map +1 -0
- package/dist/1551.js +1 -0
- package/dist/1551.js.map +1 -0
- package/dist/1556.js +1 -0
- package/dist/1556.js.map +1 -0
- package/dist/1560.js +1 -0
- package/dist/1560.js.map +1 -0
- package/dist/1925.js +1 -0
- package/dist/1925.js.map +1 -0
- package/dist/1927.js +1 -0
- package/dist/1927.js.map +1 -0
- package/dist/2054.js +1 -0
- package/dist/2054.js.map +1 -0
- package/dist/2093.js +1 -0
- package/dist/2093.js.map +1 -0
- package/dist/2177.js +2 -0
- package/dist/2177.js.map +1 -0
- package/dist/2230.js +1 -0
- package/dist/2230.js.map +1 -0
- package/dist/2493.js +1 -0
- package/dist/2493.js.map +1 -0
- package/dist/3041.js +1 -0
- package/dist/3041.js.map +1 -0
- package/dist/3099.js +1 -0
- package/dist/3101.js +1 -0
- package/dist/3101.js.map +1 -0
- package/dist/313.js +1 -0
- package/dist/313.js.map +1 -0
- package/dist/3184.js +2 -0
- package/dist/3184.js.map +1 -0
- package/dist/3202.js +1 -0
- package/dist/3202.js.map +1 -0
- package/dist/3222.js +1 -0
- package/dist/3222.js.map +1 -0
- package/dist/327.js +1 -0
- package/dist/327.js.map +1 -0
- package/dist/347.js +1 -0
- package/dist/347.js.map +1 -0
- package/dist/3595.js +1 -0
- package/dist/3595.js.map +1 -0
- package/dist/3928.js +1 -0
- package/dist/3928.js.map +1 -0
- package/dist/3939.js +1 -0
- package/dist/3939.js.map +1 -0
- package/dist/4003.js +1 -0
- package/dist/4003.js.map +1 -0
- package/dist/4055.js +1 -0
- package/dist/4205.js +1 -0
- package/dist/4205.js.map +1 -0
- package/dist/4225.js +1 -0
- package/dist/4225.js.map +1 -0
- package/dist/4231.js +1 -0
- package/dist/4231.js.map +1 -0
- package/dist/4300.js +1 -0
- package/dist/4335.js +1 -0
- package/dist/4353.js +1 -0
- package/dist/4353.js.map +1 -0
- package/dist/4431.js +1 -0
- package/dist/4431.js.map +1 -0
- package/dist/4454.js +1 -0
- package/dist/4454.js.map +1 -0
- package/dist/4457.js +2 -0
- package/dist/4457.js.LICENSE.txt +282 -0
- package/dist/4457.js.map +1 -0
- package/dist/4605.js +1 -0
- package/dist/4605.js.map +1 -0
- package/dist/4611.js +1 -0
- package/dist/4611.js.map +1 -0
- package/dist/4652.js +1 -0
- package/dist/4674.js +1 -0
- package/dist/4674.js.map +1 -0
- package/dist/4755.js +1 -0
- package/dist/4755.js.map +1 -0
- package/dist/4856.js +1 -0
- package/dist/4856.js.map +1 -0
- package/dist/4986.js +1 -0
- package/dist/4986.js.map +1 -0
- package/dist/5119.js +1 -0
- package/dist/5119.js.map +1 -0
- package/dist/5167.js +1 -0
- package/dist/5167.js.map +1 -0
- package/dist/5317.js +1 -0
- package/dist/5317.js.map +1 -0
- package/dist/5344.js +1 -0
- package/dist/5344.js.map +1 -0
- package/dist/5380.js +1 -0
- package/dist/5380.js.map +1 -0
- package/dist/5422.js +1 -0
- package/dist/5422.js.map +1 -0
- package/dist/5576.js +1 -0
- package/dist/5576.js.map +1 -0
- package/dist/5724.js +1 -0
- package/dist/5724.js.map +1 -0
- package/dist/5851.js +1 -0
- package/dist/5851.js.map +1 -0
- package/dist/5961.js +1 -0
- package/dist/5961.js.map +1 -0
- package/dist/6177.js +1 -0
- package/dist/6177.js.map +1 -0
- package/dist/6264.js +1 -0
- package/dist/6264.js.map +1 -0
- package/dist/6540.js +2 -0
- package/dist/6540.js.map +1 -0
- package/dist/6606.js +1 -0
- package/dist/6606.js.map +1 -0
- package/dist/6720.js +1 -0
- package/dist/6720.js.map +1 -0
- package/dist/6824.js +1 -0
- package/dist/6824.js.map +1 -0
- package/dist/6942.js +1 -0
- package/dist/6942.js.map +1 -0
- package/dist/71.js +1 -0
- package/dist/71.js.map +1 -0
- package/dist/7207.js +1 -0
- package/dist/7207.js.map +1 -0
- package/dist/7255.js +1 -0
- package/dist/7255.js.map +1 -0
- package/dist/7420.js +1 -0
- package/dist/7420.js.map +1 -0
- package/dist/7521.js +1 -0
- package/dist/7521.js.map +1 -0
- package/dist/7549.js +1 -0
- package/dist/7549.js.map +1 -0
- package/dist/7557.js +1 -0
- package/dist/7557.js.map +1 -0
- package/dist/7717.js +1 -0
- package/dist/7717.js.map +1 -0
- package/dist/7830.js +2 -0
- package/dist/7830.js.map +1 -0
- package/dist/7857.js +1 -0
- package/dist/7857.js.map +1 -0
- package/dist/7941.js +1 -0
- package/dist/7941.js.map +1 -0
- package/dist/8091.js +1 -0
- package/dist/8091.js.map +1 -0
- package/dist/810.js +1 -0
- package/dist/810.js.map +1 -0
- package/dist/8146.js +1 -0
- package/dist/8146.js.map +1 -0
- package/dist/850.js +1 -0
- package/dist/850.js.map +1 -0
- package/dist/8558.js +1 -0
- package/dist/8558.js.map +1 -0
- package/dist/8684.js +1 -0
- package/dist/8684.js.map +1 -0
- package/dist/8895.js +1 -0
- package/dist/8895.js.map +1 -0
- package/dist/9070.js +1 -0
- package/dist/9070.js.map +1 -0
- package/dist/9091.js +1 -0
- package/dist/9091.js.map +1 -0
- package/dist/9093.js +1 -0
- package/dist/9093.js.map +1 -0
- package/dist/9338.js +1 -0
- package/dist/9338.js.map +1 -0
- package/dist/9349.js +1 -0
- package/dist/9349.js.map +1 -0
- package/dist/9418.js +2 -0
- package/dist/9418.js.LICENSE.txt +1 -0
- package/dist/9418.js.map +1 -0
- package/dist/9428.js +1 -0
- package/dist/9428.js.map +1 -0
- package/dist/9583.js +2 -0
- package/dist/9583.js.map +1 -0
- package/dist/9871.js +1 -0
- package/dist/9871.js.map +1 -0
- package/dist/esm-dha-workflow-app.js +1 -1
- package/dist/esm-dha-workflow-app.js.buildmanifest.json +1830 -221
- package/dist/esm-dha-workflow-app.js.map +1 -1
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/dist/routes.json +1 -1
- package/local-config.json +9 -0
- package/package.json +16 -6
- package/src/admissions/admission-request-list/admission-request-list.scss +0 -0
- package/src/admissions/admission-request-list/admission-request-list.tsx +263 -0
- package/src/admissions/admissions-dashboard.component.scss +15 -0
- package/src/admissions/admissions-dashboard.component.tsx +277 -0
- package/src/admissions/admissions.resource.ts +233 -0
- package/src/admissions/admitted-list/admitted-patients-list.tsx +206 -0
- package/src/admissions/awaiting-discharge-list/awaiting-discharge-list.tsx +197 -0
- package/src/admissions/bed-assigment-request/bed-assignment-request-list.tsx +134 -0
- package/src/admissions/constants/index.ts +33 -0
- package/src/admissions/discharged-list/discharged-list.scss +0 -0
- package/src/admissions/discharged-list/discharged-list.tsx +67 -0
- package/src/admissions/form-entry-workspace/form-entry-workspace.tsx +62 -0
- package/src/admissions/inpatient/admission-history/patient-admission-history.tsx +76 -0
- package/src/admissions/inpatient/admission-requests/patient-admission-requests.scss +19 -0
- package/src/admissions/inpatient/admission-requests/patient-admission-requests.tsx +72 -0
- package/src/admissions/inpatient/inpatient-admissions.component.scss +7 -0
- package/src/admissions/inpatient/inpatient-admissions.component.tsx +46 -0
- package/src/admissions/modal/add-bill-items/add-bill-items.modal.scss +17 -0
- package/src/admissions/modal/add-bill-items/add-bill-items.modal.tsx +233 -0
- package/src/admissions/modal/admit-elsewhere/admit-elsewhere.modal.scss +23 -0
- package/src/admissions/modal/admit-elsewhere/admit-elsewhere.modal.tsx +156 -0
- package/src/admissions/modal/admit-patient/admit-patient.modal.scss +0 -0
- package/src/admissions/modal/admit-patient/admit-patient.modal.tsx +111 -0
- package/src/admissions/modal/bed-swap/bed-swap.modal.scss +0 -0
- package/src/admissions/modal/bed-swap/bed-swap.modal.tsx +102 -0
- package/src/admissions/modal/cancel-admission-request/cancel-admission-request.scss +11 -0
- package/src/admissions/modal/cancel-admission-request/cancel-admission-request.tsx +105 -0
- package/src/admissions/modal/discharge/discharge-patient.modal.scss +13 -0
- package/src/admissions/modal/discharge/discharge-patient.modal.tsx +86 -0
- package/src/admissions/types/index.ts +263 -0
- package/src/appointments/appointments.component.scss +6 -0
- package/src/appointments/appointments.component.tsx +8 -1
- package/src/billing/api/billing.api.ts +139 -0
- package/src/billing/billing-claims.resource.ts +916 -0
- package/src/billing/billing-dashboard-link.component.tsx +31 -0
- package/src/billing/billing-dashboard-reset.ts +27 -0
- package/src/billing/billing-root.tsx +42 -0
- package/src/billing/dashboard/billingDashboard.component.scss +0 -0
- package/src/billing/dashboard/billingDashboard.component.tsx +25 -0
- package/src/billing/dashboard/v2/active-visits/active-visits.component.tsx +257 -0
- package/src/billing/dashboard/v2/active-visits/active-visits.resource.ts +85 -0
- package/src/billing/dashboard/v2/active-visits/active-visits.scss +15 -0
- package/src/billing/dashboard/v2/active-visits.component.tsx +102 -0
- package/src/billing/dashboard/v2/admissions/admission-requests-tab.component.tsx +79 -0
- package/src/billing/dashboard/v2/billing-claims-dashboard.component.scss +209 -0
- package/src/billing/dashboard/v2/billing-claims-dashboard.component.tsx +396 -0
- package/src/billing/dashboard/v2/cash-checklist/bill-document.component.scss +90 -0
- package/src/billing/dashboard/v2/cash-checklist/bill-document.component.tsx +101 -0
- package/src/billing/dashboard/v2/cash-checklist/cash-checklist.component.scss +199 -0
- package/src/billing/dashboard/v2/cash-checklist/cash-checklist.component.tsx +361 -0
- package/src/billing/dashboard/v2/cash-checklist/cash-checklist.resource.ts +239 -0
- package/src/billing/dashboard/v2/cash-checklist/payment-drawer.component.scss +246 -0
- package/src/billing/dashboard/v2/cash-checklist/payment-drawer.component.tsx +182 -0
- package/src/billing/dashboard/v2/claim-statuses.ts +143 -0
- package/src/billing/dashboard/v2/claim-visits/claim-diagnosis-details/claim-diagnosis-details.component.scss +0 -0
- package/src/billing/dashboard/v2/claim-visits/claim-diagnosis-details/claim-diagnosis-details.component.tsx +35 -0
- package/src/billing/dashboard/v2/claim-visits/claim-diagnosis-details/claim-diagnosis-panel.component.scss +67 -0
- package/src/billing/dashboard/v2/claim-visits/claim-diagnosis-details/claim-diagnosis-panel.component.tsx +90 -0
- package/src/billing/dashboard/v2/claim-visits/claim-doctors/claim-doctors.scss +28 -0
- package/src/billing/dashboard/v2/claim-visits/claim-doctors/claim-doctors.tsx +36 -0
- package/src/billing/dashboard/v2/claim-visits/claim-history/claim-history.component.scss +119 -0
- package/src/billing/dashboard/v2/claim-visits/claim-history/claim-history.component.tsx +198 -0
- package/src/billing/dashboard/v2/claim-visits/claim-intervention-details/claim-intervention-details.component.scss +5 -0
- package/src/billing/dashboard/v2/claim-visits/claim-intervention-details/claim-intervention-details.component.tsx +160 -0
- package/src/billing/dashboard/v2/claim-visits/claim-intervention-details/claim-intervention-panel.component.scss +105 -0
- package/src/billing/dashboard/v2/claim-visits/claim-intervention-details/claim-intervention-panel.component.tsx +184 -0
- package/src/billing/dashboard/v2/claim-visits/claim-intervention-details/intervention-attachments.component.scss +161 -0
- package/src/billing/dashboard/v2/claim-visits/claim-intervention-details/intervention-attachments.component.tsx +328 -0
- package/src/billing/dashboard/v2/claim-visits/claim-invoice-details/claim-invoice-details.component.tsx +96 -0
- package/src/billing/dashboard/v2/claim-visits/claim-invoice-details/claim-invoice-document.component.tsx +236 -0
- package/src/billing/dashboard/v2/claim-visits/claim-invoice-details/claim-invoice-panel.component.scss +98 -0
- package/src/billing/dashboard/v2/claim-visits/claim-invoice-details/claim-invoice-panel.component.tsx +292 -0
- package/src/billing/dashboard/v2/claim-visits/claim-invoice-line-details/claim-invoice-line-details.component.scss +133 -0
- package/src/billing/dashboard/v2/claim-visits/claim-invoice-line-details/claim-invoice-line-details.component.tsx +217 -0
- package/src/billing/dashboard/v2/claim-visits/claim-visit-details/claim-details-by-token.component.tsx +150 -0
- package/src/billing/dashboard/v2/claim-visits/claim-visit-details/claim-details-page.component.scss +13 -0
- package/src/billing/dashboard/v2/claim-visits/claim-visit-details/claim-details-page.component.tsx +116 -0
- package/src/billing/dashboard/v2/claim-visits/claim-visit-details/claim-visit-details.component.scss +338 -0
- package/src/billing/dashboard/v2/claim-visits/claim-visit-details/claim-visit-details.component.tsx +616 -0
- package/src/billing/dashboard/v2/claim-visits/claim-visits.component.scss +5 -0
- package/src/billing/dashboard/v2/claim-visits/claim-visits.component.tsx +133 -0
- package/src/billing/dashboard/v2/claim-visits/modal/claim-doctors/add-claim-doctor/add-claim-doctor.modal.scss +5 -0
- package/src/billing/dashboard/v2/claim-visits/modal/claim-doctors/add-claim-doctor/add-claim-doctor.modal.tsx +49 -0
- package/src/billing/dashboard/v2/claim-visits/modal/claim-visit-details/claim-visit-details.modal.scss +17 -0
- package/src/billing/dashboard/v2/claim-visits/modal/claim-visit-details/claim-visit-details.modal.tsx +56 -0
- package/src/billing/dashboard/v2/claim-visits/modal/close-claim/close-claim.modal.scss +0 -0
- package/src/billing/dashboard/v2/claim-visits/modal/close-claim/close-claim.modal.tsx +129 -0
- package/src/billing/dashboard/v2/claim-visits/modal/submit-claim/submit-claim.modal.tsx +204 -0
- package/src/billing/dashboard/v2/claim-visits/shared/_empty-state.scss +28 -0
- package/src/billing/dashboard/v2/claim-visits/shared/record-cards.component.scss +298 -0
- package/src/billing/dashboard/v2/claim-visits/shared/record-cards.component.tsx +252 -0
- package/src/billing/dashboard/v2/claim-visits/shared/record-details.workspace.scss +42 -0
- package/src/billing/dashboard/v2/claim-visits/shared/record-details.workspace.tsx +54 -0
- package/src/billing/dashboard/v2/claim-visits/shared/record-table.component.scss +61 -0
- package/src/billing/dashboard/v2/claim-visits/shared/record-table.component.tsx +150 -0
- package/src/billing/dashboard/v2/claim-visits/switch-intervention/switch-intervention.resource.ts +51 -0
- package/src/billing/dashboard/v2/claim-visits/switch-intervention/switch-intervention.workspace.scss +191 -0
- package/src/billing/dashboard/v2/claim-visits/switch-intervention/switch-intervention.workspace.tsx +648 -0
- package/src/billing/dashboard/v2/claim-workspace/claim-workspace.component.scss +595 -0
- package/src/billing/dashboard/v2/claim-workspace/claim-workspace.component.tsx +810 -0
- package/src/billing/dashboard/v2/claim-workspace/claim-workspace.resource.ts +282 -0
- package/src/billing/dashboard/v2/claims-accounting/bill-utils.ts +134 -0
- package/src/billing/dashboard/v2/claims-accounting/claim-detail.component.tsx +346 -0
- package/src/billing/dashboard/v2/claims-accounting/claims-accounting.component.scss +546 -0
- package/src/billing/dashboard/v2/claims-accounting/claims-accounting.component.tsx +206 -0
- package/src/billing/dashboard/v2/claims-accounting/claims-accounting.resource.ts +337 -0
- package/src/billing/dashboard/v2/claims-accounting/invoice-document.component.scss +90 -0
- package/src/billing/dashboard/v2/claims-accounting/invoice-document.component.tsx +90 -0
- package/src/billing/dashboard/v2/claims-accounting/remittances.component.tsx +169 -0
- package/src/billing/dashboard/v2/claims-accounting/remittances.resource.ts +46 -0
- package/src/billing/dashboard/v2/claims-accounting/status-meta.ts +25 -0
- package/src/billing/dashboard/v2/clearance/cash-patients.scss +18 -0
- package/src/billing/dashboard/v2/clearance/cash.component.tsx +145 -0
- package/src/billing/dashboard/v2/clearance/clearance.component.scss +84 -0
- package/src/billing/dashboard/v2/clearance/clearance.component.tsx +225 -0
- package/src/billing/dashboard/v2/clearance/pay-cash.component.tsx +202 -0
- package/src/billing/dashboard/v2/clearance/pay-cash.scss +28 -0
- package/src/billing/dashboard/v2/clearance/prepaid-services.component.tsx +112 -0
- package/src/billing/dashboard/v2/facility-bills/claim-status.ts +249 -0
- package/src/billing/dashboard/v2/facility-bills/facility-bills.component.scss +140 -0
- package/src/billing/dashboard/v2/facility-bills/facility-bills.component.tsx +688 -0
- package/src/billing/dashboard/v2/facility-bills/preauths-datatables/pending-preauths.component.tsx +132 -0
- package/src/billing/dashboard/v2/facility-bills/preauths-datatables/preauth-preview-table.component.tsx +267 -0
- package/src/billing/dashboard/v2/facility-bills/preauths.component.tsx +130 -0
- package/src/billing/dashboard/v2/inpatient-requests/inpatient-requests.component.scss +22 -0
- package/src/billing/dashboard/v2/inpatient-requests/inpatient-requests.component.tsx +389 -0
- package/src/billing/dashboard/v2/inpatient-requests/modal/start-inpatient-claim/start-inpatient-claim.component.scss +0 -0
- package/src/billing/dashboard/v2/inpatient-requests/modal/start-inpatient-claim/start-inpatient-claim.component.tsx +0 -0
- package/src/billing/dashboard/v2/new-facility-bills/bills-table.component.tsx +78 -0
- package/src/billing/dashboard/v2/new-facility-bills/bills-table.scss +18 -0
- package/src/billing/dashboard/v2/new-facility-bills/new-facility-bills.component.tsx +64 -0
- package/src/billing/dashboard/v2/new-facility-bills/new-facility-bills.scss +146 -0
- package/src/billing/dashboard/v2/patient-bill-details/attachments/add-attachments.component.tsx +223 -0
- package/src/billing/dashboard/v2/patient-bill-details/attachments/attachment.component.tsx +157 -0
- package/src/billing/dashboard/v2/patient-bill-details/attachments/attachments.scss +92 -0
- package/src/billing/dashboard/v2/patient-bill-details/attachments/case-summary/case-summary.scss +295 -0
- package/src/billing/dashboard/v2/patient-bill-details/attachments/case-summary/case-summary.tsx +326 -0
- package/src/billing/dashboard/v2/patient-bill-details/attachments/dialysis/dialysis-chart.scss +238 -0
- package/src/billing/dashboard/v2/patient-bill-details/attachments/dialysis/dialysis-chart.tsx +269 -0
- package/src/billing/dashboard/v2/patient-bill-details/attachments/discharge-summary/discharge-summary.scss +96 -0
- package/src/billing/dashboard/v2/patient-bill-details/attachments/discharge-summary/discharge-summary.tsx +124 -0
- package/src/billing/dashboard/v2/patient-bill-details/attachments/final-bill.component.tsx +152 -0
- package/src/billing/dashboard/v2/patient-bill-details/attachments/final-bill.scss +225 -0
- package/src/billing/dashboard/v2/patient-bill-details/attachments/general-discharge-summary/general-discharge-summary.scss +182 -0
- package/src/billing/dashboard/v2/patient-bill-details/attachments/general-discharge-summary/general-discharge-summary.tsx +173 -0
- package/src/billing/dashboard/v2/patient-bill-details/attachments/generate-attachments.component.tsx +371 -0
- package/src/billing/dashboard/v2/patient-bill-details/attachments/invoice.component.tsx +151 -0
- package/src/billing/dashboard/v2/patient-bill-details/attachments/invoice.scss +225 -0
- package/src/billing/dashboard/v2/patient-bill-details/attachments/type.ts +44 -0
- package/src/billing/dashboard/v2/patient-bill-details/bill-details/bill-details.scss +107 -0
- package/src/billing/dashboard/v2/patient-bill-details/bill-details/bill-details.tsx +508 -0
- package/src/billing/dashboard/v2/patient-bill-details/bill-details-page.component.scss +30 -0
- package/src/billing/dashboard/v2/patient-bill-details/bill-details-page.component.tsx +94 -0
- package/src/billing/dashboard/v2/patient-bill-details/claim-details/claim-details-skeleton.component.scss +89 -0
- package/src/billing/dashboard/v2/patient-bill-details/claim-details/claim-details-skeleton.component.tsx +53 -0
- package/src/billing/dashboard/v2/patient-bill-details/claim-details/patient-claim-details.component.scss +32 -0
- package/src/billing/dashboard/v2/patient-bill-details/claim-details/patient-claim-details.component.tsx +215 -0
- package/src/billing/dashboard/v2/patient-bill-details/modals/add-claim-diagnosis/add-claim-diagnosis.modal.scss +0 -0
- package/src/billing/dashboard/v2/patient-bill-details/modals/add-claim-diagnosis/add-claim-diagnosis.modal.tsx +99 -0
- package/src/billing/dashboard/v2/patient-bill-details/modals/add-claim-line/add-claim-line.modal.tsx +187 -0
- package/src/billing/dashboard/v2/patient-bill-details/patient-bill-details.scss +153 -0
- package/src/billing/dashboard/v2/patient-bill-details/patient-bill-details.tsx +458 -0
- package/src/billing/dashboard/v2/patient-bill-details/payment-mode.ts +124 -0
- package/src/billing/dashboard/v2/patient-bill-details/workspaces/add-claim-line/add-claim-line.workspace.scss +27 -0
- package/src/billing/dashboard/v2/patient-bill-details/workspaces/add-claim-line/add-claim-line.workspace.tsx +223 -0
- package/src/billing/dashboard/v2/patient-bill-details/workspaces/bill-item-payment/bill-item-payment.workspace.scss +27 -0
- package/src/billing/dashboard/v2/patient-bill-details/workspaces/bill-item-payment/bill-item-payment.workspace.tsx +109 -0
- package/src/billing/dashboard/v2/preauth/preauth-attachments.component.tsx +389 -0
- package/src/billing/dashboard/v2/preauth/preauth-list.component.scss +38 -0
- package/src/billing/dashboard/v2/preauth/preauth-list.component.tsx +241 -0
- package/src/billing/dashboard/v2/preauth/preauth-status-tag.component.tsx +75 -0
- package/src/billing/dashboard/v2/preauth/preauth-typed-fields.md +125 -0
- package/src/billing/dashboard/v2/preauth/preauth.resource.ts +1067 -0
- package/src/billing/dashboard/v2/preauth/preauth.workspace.scss +91 -0
- package/src/billing/dashboard/v2/preauth/preauth.workspace.tsx +1802 -0
- package/src/billing/dashboard/v2/preauth/preauthorizations-tab.component.tsx +49 -0
- package/src/billing/dashboard/v2/sha-claims/sha-claims-table.component.tsx +36 -0
- package/src/billing/dashboard/v2/sha-claims/sha-claims.component.tsx +60 -0
- package/src/billing/dashboard/v2/sha-claims/sha-claims.scss +8 -0
- package/src/billing/dashboard/v2/shared/dash-board-card/dash-board-card.component.scss +17 -0
- package/src/billing/dashboard/v2/shared/dash-board-card/dash-board-card.component.tsx +15 -0
- package/src/billing/dashboard/v2/shared/empty-state.component.scss +24 -0
- package/src/billing/dashboard/v2/shared/empty-state.component.tsx +13 -0
- package/src/billing/dashboard/v2/shared/scroll-to-top.component.scss +54 -0
- package/src/billing/dashboard/v2/shared/scroll-to-top.component.tsx +54 -0
- package/src/billing/dashboard/v2/shared/table-toolbar.component.scss +77 -0
- package/src/billing/dashboard/v2/shared/table-toolbar.component.tsx +48 -0
- package/src/billing/dashboard/v2/types/index.ts +514 -0
- package/src/billing/dashboard/v3/active-visits/active-visits.component.tsx +256 -0
- package/src/billing/dashboard/v3/active-visits/active-visits.resource.ts +57 -0
- package/src/billing/dashboard/v3/active-visits/active-visits.scss +15 -0
- package/src/billing/dashboard/v3/cash-checklist/bill-document.component.scss +90 -0
- package/src/billing/dashboard/v3/cash-checklist/bill-document.component.tsx +101 -0
- package/src/billing/dashboard/v3/cash-checklist/cash-checklist.component.scss +199 -0
- package/src/billing/dashboard/v3/cash-checklist/cash-checklist.component.tsx +361 -0
- package/src/billing/dashboard/v3/cash-checklist/cash-checklist.resource.ts +240 -0
- package/src/billing/dashboard/v3/cash-checklist/payment-drawer.component.scss +246 -0
- package/src/billing/dashboard/v3/cash-checklist/payment-drawer.component.tsx +182 -0
- package/src/billing/dashboard/v3/claim-visits/claim-diagnosis-details/claim-diagnosis-details.component.scss +0 -0
- package/src/billing/dashboard/v3/claim-visits/claim-diagnosis-details/claim-diagnosis-details.component.tsx +44 -0
- package/src/billing/dashboard/v3/claim-visits/claim-doctors/claim-doctors.scss +5 -0
- package/src/billing/dashboard/v3/claim-visits/claim-doctors/claim-doctors.tsx +42 -0
- package/src/billing/dashboard/v3/claim-visits/claim-documents/claim-documents.scss +10 -0
- package/src/billing/dashboard/v3/claim-visits/claim-documents/claim-documents.tsx +25 -0
- package/src/billing/dashboard/v3/claim-visits/claim-intervention-details/claim-intervention-details.component.tsx +220 -0
- package/src/billing/dashboard/v3/claim-visits/claim-invoice-details/claim-invoice-details.component.scss +6 -0
- package/src/billing/dashboard/v3/claim-visits/claim-invoice-details/claim-invoice-details.component.tsx +85 -0
- package/src/billing/dashboard/v3/claim-visits/claim-invoice-line-details/claim-invoice-line-details.component.scss +0 -0
- package/src/billing/dashboard/v3/claim-visits/claim-invoice-line-details/claim-invoice-line-details.component.tsx +109 -0
- package/src/billing/dashboard/v3/claim-visits/claim-visit-details/claim-visit-details.component.scss +97 -0
- package/src/billing/dashboard/v3/claim-visits/claim-visit-details/claim-visit-details.component.tsx +343 -0
- package/src/billing/dashboard/v3/claim-visits/claim-visits.component.scss +5 -0
- package/src/billing/dashboard/v3/claim-visits/claim-visits.component.tsx +139 -0
- package/src/billing/dashboard/v3/claim-visits/modal/claim-doctors/add-claim-doctor/add-claim-doctor.modal.scss +5 -0
- package/src/billing/dashboard/v3/claim-visits/modal/claim-doctors/add-claim-doctor/add-claim-doctor.modal.tsx +49 -0
- package/src/billing/dashboard/v3/claim-visits/modal/claim-invoice-lines/claim-invoice-lines.modal.scss +7 -0
- package/src/billing/dashboard/v3/claim-visits/modal/claim-invoice-lines/claim-invoice-lines.modal.tsx +35 -0
- package/src/billing/dashboard/v3/claim-visits/modal/claim-visit-details/claim-visit-details.modal.scss +6 -0
- package/src/billing/dashboard/v3/claim-visits/modal/claim-visit-details/claim-visit-details.modal.tsx +33 -0
- package/src/billing/dashboard/v3/claim-visits/modal/close-claim/close-claim.modal.scss +0 -0
- package/src/billing/dashboard/v3/claim-visits/modal/close-claim/close-claim.modal.tsx +129 -0
- package/src/billing/dashboard/v3/claim-visits/modal/submit-claim/submit-claim.modal.tsx +204 -0
- package/src/billing/dashboard/v3/claim-visits/payer-preview/index.scss +140 -0
- package/src/billing/dashboard/v3/claim-visits/payer-preview/payer-preview-tile.component.tsx +55 -0
- package/src/billing/dashboard/v3/claim-visits/payer-preview/payer-preview-workspace.component.tsx +157 -0
- package/src/billing/dashboard/v3/claim-visits/payer-preview/tables/payer-claim-doctors.component.tsx +54 -0
- package/src/billing/dashboard/v3/claim-visits/payer-preview/tables/payer-claim-lines.component.tsx +48 -0
- package/src/billing/dashboard/v3/claim-visits/payer-preview/tables/payer-claim-notes.component.tsx +47 -0
- package/src/billing/dashboard/v3/claim-visits/payer-preview/tables/payer-diagnoses.component.tsx +44 -0
- package/src/billing/dashboard/v3/claim-visits/payer-preview/tables/payer-interventions.component.tsx +44 -0
- package/src/billing/dashboard/v3/claim-visits/switch-intervention/switch-intervention.resource.ts +51 -0
- package/src/billing/dashboard/v3/claim-visits/switch-intervention/switch-intervention.workspace.scss +191 -0
- package/src/billing/dashboard/v3/claim-visits/switch-intervention/switch-intervention.workspace.tsx +648 -0
- package/src/billing/dashboard/v3/claim-workspace/claim-workspace.component.scss +595 -0
- package/src/billing/dashboard/v3/claim-workspace/claim-workspace.component.tsx +810 -0
- package/src/billing/dashboard/v3/claim-workspace/claim-workspace.resource.ts +282 -0
- package/src/billing/dashboard/v3/claims-accounting/bill-utils.ts +134 -0
- package/src/billing/dashboard/v3/claims-accounting/claim-detail.component.tsx +346 -0
- package/src/billing/dashboard/v3/claims-accounting/claims-accounting.component.scss +546 -0
- package/src/billing/dashboard/v3/claims-accounting/claims-accounting.component.tsx +206 -0
- package/src/billing/dashboard/v3/claims-accounting/claims-accounting.resource.ts +337 -0
- package/src/billing/dashboard/v3/claims-accounting/invoice-document.component.scss +90 -0
- package/src/billing/dashboard/v3/claims-accounting/invoice-document.component.tsx +90 -0
- package/src/billing/dashboard/v3/claims-accounting/remittances.component.tsx +169 -0
- package/src/billing/dashboard/v3/claims-accounting/remittances.resource.ts +46 -0
- package/src/billing/dashboard/v3/claims-accounting/status-meta.ts +25 -0
- package/src/billing/dashboard/v3/clearance/clearance.component.scss +100 -0
- package/src/billing/dashboard/v3/clearance/clearance.component.tsx +0 -0
- package/src/billing/dashboard/v3/clearance/prepaid-services.component.tsx +112 -0
- package/src/billing/dashboard/v3/facility-bills/claim-status.ts +243 -0
- package/src/billing/dashboard/v3/facility-bills/facility-bills.component.scss +72 -0
- package/src/billing/dashboard/v3/facility-bills/facility-bills.component.tsx +181 -0
- package/src/billing/dashboard/v3/facility-bills/preauths-datatables/pending-preauths.component.tsx +132 -0
- package/src/billing/dashboard/v3/facility-bills/preauths-datatables/preauth-preview-table.component.tsx +232 -0
- package/src/billing/dashboard/v3/facility-bills/preauths.component.tsx +127 -0
- package/src/billing/dashboard/v3/patient-bill-details/attachments/add-attachments.component.tsx +223 -0
- package/src/billing/dashboard/v3/patient-bill-details/attachments/attachment.component.tsx +157 -0
- package/src/billing/dashboard/v3/patient-bill-details/attachments/attachments.scss +92 -0
- package/src/billing/dashboard/v3/patient-bill-details/attachments/case-summary/case-summary-helper.ts +58 -0
- package/src/billing/dashboard/v3/patient-bill-details/attachments/case-summary/case-summary.scss +295 -0
- package/src/billing/dashboard/v3/patient-bill-details/attachments/case-summary/case-summary.tsx +287 -0
- package/src/billing/dashboard/v3/patient-bill-details/attachments/dialysis/dialysis-chart.scss +238 -0
- package/src/billing/dashboard/v3/patient-bill-details/attachments/dialysis/dialysis-chart.tsx +317 -0
- package/src/billing/dashboard/v3/patient-bill-details/attachments/dialysis/dialysis-helper.ts +94 -0
- package/src/billing/dashboard/v3/patient-bill-details/attachments/discharge-summary/discharge-summary.scss +96 -0
- package/src/billing/dashboard/v3/patient-bill-details/attachments/discharge-summary/discharge-summary.tsx +126 -0
- package/src/billing/dashboard/v3/patient-bill-details/attachments/final-bill.component.tsx +75 -0
- package/src/billing/dashboard/v3/patient-bill-details/attachments/general-discharge-summary/general-discharge-summary.scss +182 -0
- package/src/billing/dashboard/v3/patient-bill-details/attachments/general-discharge-summary/general-discharge-summary.tsx +253 -0
- package/src/billing/dashboard/v3/patient-bill-details/attachments/generate-attachments.component.tsx +345 -0
- package/src/billing/dashboard/v3/patient-bill-details/attachments/invoice.component.tsx +150 -0
- package/src/billing/dashboard/v3/patient-bill-details/attachments/invoice.scss +225 -0
- package/src/billing/dashboard/v3/patient-bill-details/attachments/type.ts +259 -0
- package/src/billing/dashboard/v3/patient-bill-details/bill-details/bill-details.scss +17 -0
- package/src/billing/dashboard/v3/patient-bill-details/bill-details/bill-details.tsx +260 -0
- package/src/billing/dashboard/v3/patient-bill-details/claim-details/patient-claim-details.component.scss +0 -0
- package/src/billing/dashboard/v3/patient-bill-details/claim-details/patient-claim-details.component.tsx +68 -0
- package/src/billing/dashboard/v3/patient-bill-details/modals/add-claim-diagnosis/add-claim-diagnosis.modal.scss +0 -0
- package/src/billing/dashboard/v3/patient-bill-details/modals/add-claim-diagnosis/add-claim-diagnosis.modal.tsx +99 -0
- package/src/billing/dashboard/v3/patient-bill-details/modals/add-claim-line/add-claim-line.modal.scss +14 -0
- package/src/billing/dashboard/v3/patient-bill-details/modals/add-claim-line/add-claim-line.modal.tsx +112 -0
- package/src/billing/dashboard/v3/patient-bill-details/modals/bill-item-payment/bill-item-payment.modal.scss +6 -0
- package/src/billing/dashboard/v3/patient-bill-details/modals/bill-item-payment/bill-item-payment.modal.tsx +139 -0
- package/src/billing/dashboard/v3/patient-bill-details/patient-bill-details.scss +85 -0
- package/src/billing/dashboard/v3/patient-bill-details/patient-bill-details.tsx +343 -0
- package/src/billing/dashboard/v3/patient-bill-details/visit-diagnosis-details/visit-diagnosis-details.component.scss +0 -0
- package/src/billing/dashboard/v3/patient-bill-details/visit-diagnosis-details/visit-diagnosis-details.component.tsx +92 -0
- package/src/billing/dashboard/v3/preauth/elective/elective-authorize.resource.ts +284 -0
- package/src/billing/dashboard/v3/preauth/elective/elective-preauth-request.workspace.scss +125 -0
- package/src/billing/dashboard/v3/preauth/elective/elective-preauth-request.workspace.tsx +1184 -0
- package/src/billing/dashboard/v3/preauth/elective/elective-preauth.component.scss +15 -0
- package/src/billing/dashboard/v3/preauth/elective/elective-preauth.component.tsx +377 -0
- package/src/billing/dashboard/v3/preauth/elective/elective-preauth.resource.ts +1378 -0
- package/src/billing/dashboard/v3/preauth/elective/elective-requests-list.component.tsx +357 -0
- package/src/billing/dashboard/v3/preauth/preauth-attachments.component.tsx +389 -0
- package/src/billing/dashboard/v3/preauth/preauth-list.component.scss +34 -0
- package/src/billing/dashboard/v3/preauth/preauth-list.component.tsx +300 -0
- package/src/billing/dashboard/v3/preauth/preauth-status-tag.component.tsx +75 -0
- package/src/billing/dashboard/v3/preauth/preauth-typed-fields.md +125 -0
- package/src/billing/dashboard/v3/preauth/preauth.resource.ts +1197 -0
- package/src/billing/dashboard/v3/preauth/preauth.workspace.scss +176 -0
- package/src/billing/dashboard/v3/preauth/preauth.workspace.tsx +2266 -0
- package/src/billing/dashboard/v3/preauth/preauthorizations-tab.component.tsx +55 -0
- package/src/billing/dashboard/v3/shared/empty-state.component.scss +25 -0
- package/src/billing/dashboard/v3/shared/empty-state.component.tsx +13 -0
- package/src/billing/dashboard/v3/shared/table-toolbar.component.scss +64 -0
- package/src/billing/dashboard/v3/shared/table-toolbar.component.tsx +48 -0
- package/src/billing/dashboard/v3/types/index.ts +384 -0
- package/src/billing/extensions/generate-order-bill-button/generate-order-bill-button.extension.tsx +55 -0
- package/src/billing/extensions/generate-order-bill-button/generate-order-bill-button.scss +16 -0
- package/src/billing/extensions/visit-billing/visit-billing.extension.scss +0 -0
- package/src/billing/extensions/visit-billing/visit-billing.extension.tsx +509 -0
- package/src/billing/invoice/bill.resource.ts +47 -0
- package/src/billing/invoice/invoice-header/header-card/header-card.scss +17 -0
- package/src/billing/invoice/invoice-header/header-card/header-card.tsx +21 -0
- package/src/billing/invoice/invoice.scss +113 -0
- package/src/billing/invoice/invoice.tsx +1441 -0
- package/src/billing/invoice/line-items/line-items.scss +0 -0
- package/src/billing/invoice/line-items/line-items.tsx +120 -0
- package/src/billing/invoice/modal/delete-bill-item/delete-bill-item.modal.scss +23 -0
- package/src/billing/invoice/modal/delete-bill-item/delete-bill-item.modal.tsx +114 -0
- package/src/billing/invoice/modal/edit-bill-item/edit-bill-item.modal.scss +0 -0
- package/src/billing/invoice/modal/edit-bill-item/edit-bill-item.modal.tsx +122 -0
- package/src/billing/invoice/payment-details/payment-details.scss +0 -0
- package/src/billing/invoice/payment-details/payment-details.tsx +43 -0
- package/src/billing/invoice/print-invoice/print-receipt.component.tsx +44 -0
- package/src/billing/invoice/print-invoice/print-receipt.scss +14 -0
- package/src/billing/maternity-discharge.resource.ts +21 -0
- package/src/billing/types/index.ts +354 -0
- package/src/billing/utils/index.ts +17 -0
- package/src/billing/widgets/billingTotalsRow.component.scss +0 -0
- package/src/billing/widgets/billingTotalsRow.component.tsx +712 -0
- package/src/billing/workspaces/create-order-bill-form-workspace/create-order-bill-form.resource.ts +130 -0
- package/src/billing/workspaces/create-order-bill-form-workspace/create-order-bill-form.scss +58 -0
- package/src/billing/workspaces/create-order-bill-form-workspace/create-order-bill-form.workspace.tsx +656 -0
- package/src/billing/workspaces/create-order-bill-form-workspace/schema.ts +12 -0
- package/src/bookings/bookings.component.scss +7 -0
- package/src/bookings/bookings.component.tsx +35 -0
- package/src/bookings/daily/daily-bookings.resource.ts +2 -1
- package/src/case-summary/case-summary.extension.scss +13 -0
- package/src/case-summary/case-summary.extension.tsx +40 -0
- package/src/case-summary/case-summary.resource.test.ts +69 -0
- package/src/case-summary/case-summary.resource.ts +52 -0
- package/src/case-summary/components/case-summary-printable.component.scss +174 -0
- package/src/case-summary/components/case-summary-printable.component.tsx +288 -0
- package/src/case-summary/components/case-summary-printable.utils.ts +51 -0
- package/src/case-summary/types/case-summary.types.ts +152 -0
- package/src/claims/claims.component.scss +70 -0
- package/src/claims/claims.component.tsx +743 -0
- package/src/claims/claims.resource.ts +1840 -0
- package/src/claims/index.ts +365 -0
- package/src/claims/interventions.resource.ts +131 -0
- package/src/claims/utils.ts +64 -0
- package/src/config-schema.ts +149 -1
- package/src/context/patient-context.tsx +27 -0
- package/src/createDashboardLink.tsx +9 -0
- package/src/dashboard/charts/chart.component.scss +24 -0
- package/src/dashboard/charts/chart.component.tsx +56 -0
- package/src/dashboard/dashboard.component.scss +48 -3
- package/src/dashboard/dashboard.component.tsx +29 -38
- package/src/dashboard/overview/overview.component.scss +40 -59
- package/src/dashboard/overview/overview.component.tsx +55 -41
- package/src/dashboard-meta/accounting-dashboard.meta.ts +6 -0
- package/src/dashboard-meta/admissions-dashboard.meta.ts +6 -0
- package/src/dashboard-meta/billing-dashboard.meta.ts +6 -0
- package/src/dashboard-meta/bookings-dashboard.meta.ts +6 -0
- package/src/dashboard-meta/case-summary.meta.ts +6 -0
- package/src/dashboard-meta/consultation-dashboard.meta.ts +6 -0
- package/src/dashboard-meta/dha-workflow-dashboard.meta.ts +6 -0
- package/src/dashboard-meta/elective-preauth.meta.ts +6 -0
- package/src/dashboard-meta/emt-dashboard.meta.ts +6 -0
- package/src/dashboard-meta/inpatient-admissions.meta.ts +6 -0
- package/src/dashboard-meta/maternity-dashboard.meta.ts +6 -0
- package/src/dashboard-meta/mch-dashboard.meta.ts +6 -0
- package/src/dashboard-meta/pharmacy-dashboard.meta.ts +6 -0
- package/src/dashboard-meta/queue-dashboard.meta.ts +6 -0
- package/src/dashboard-meta/registers-dashboard.meta.ts +6 -0
- package/src/dashboard-meta/registry-dashboard.meta.ts +6 -0
- package/src/dashboard-meta/service-queue-admin.meta.ts +6 -0
- package/src/dashboard-meta/specialized-clinics-dashboard.meta.ts +6 -0
- package/src/dashboard-meta/triage-dashboard.meta.ts +6 -0
- package/src/emt/cr-lookup.resource.test.ts +88 -0
- package/src/emt/cr-lookup.resource.ts +42 -0
- package/src/emt/emt-queue.component.test.tsx +353 -0
- package/src/emt/emt-queue.component.tsx +463 -0
- package/src/emt/emt-queue.scss +85 -0
- package/src/emt/emt.resource.test.ts +247 -0
- package/src/emt/emt.resource.ts +150 -0
- package/src/emt/handover-modal/handover-modal.component.test.tsx +273 -0
- package/src/emt/handover-modal/handover-modal.component.tsx +541 -0
- package/src/emt/handover-modal/handover-modal.scss +113 -0
- package/src/emt/types/emt.types.ts +137 -0
- package/src/index.ts +204 -6
- package/src/mnch/maternity/maternity-queues.component.scss +7 -0
- package/src/mnch/maternity/maternity-queues.component.tsx +32 -0
- package/src/mnch/maternity/queues/triage/maternity-triage.tsx +15 -0
- package/src/mnch/mch/mch-queues.component.scss +10 -0
- package/src/mnch/mch/mch-queues.component.tsx +36 -0
- package/src/mnch/mch/queues/consultation/mch-consultation.tsx +18 -0
- package/src/mnch/mch/queues/triage/mch-triage.tsx +15 -0
- package/src/mnch/mnch-root.tsx +17 -0
- package/src/mortuary/mortuary.component.tsx +13 -0
- package/src/pharmacy/pharmacy.component.scss +16 -0
- package/src/pharmacy/pharmacy.component.tsx +11 -6
- package/src/registers/registers.component.tsx +8 -0
- package/src/registry/drawer/emr-compare.component.scss +263 -0
- package/src/registry/drawer/emr-compare.component.tsx +302 -0
- package/src/registry/drawer/emr-compare.resource.ts +181 -0
- package/src/registry/drawer/emr-create-preview.component.tsx +123 -0
- package/src/registry/drawer/otp-verification-step.component.tsx +398 -0
- package/src/registry/drawer/pomsf-balance.util.test.ts +177 -0
- package/src/registry/drawer/pomsf-balance.util.ts +79 -0
- package/src/registry/drawer/verification.resource.ts +60 -0
- package/src/registry/drawer/workflow-drawer.component.scss +1242 -0
- package/src/registry/drawer/workflow-drawer.component.tsx +1478 -0
- package/src/registry/eligibility/eligibility-details/eligibility-details.scss +38 -0
- package/src/registry/eligibility/eligibility-details/eligibility-details.tsx +101 -0
- package/src/registry/eligibility/eliigibility-tags/eligibility-tags.scss +16 -0
- package/src/registry/eligibility/eliigibility-tags/eligibility-tags.tsx +120 -0
- package/src/registry/eligibility/modal/eligibility-details.modal.scss +0 -0
- package/src/registry/eligibility/modal/eligibility-details.modal.tsx +45 -0
- package/src/registry/hie.resource.ts +466 -0
- package/src/registry/hie.types.ts +63 -0
- package/src/registry/modal/biometrics-verification-modal/biometrics-verification-modal.scss +277 -0
- package/src/registry/modal/biometrics-verification-modal/biometrics-verification-modal.tsx +218 -0
- package/src/registry/modal/biometrics-verification-modal/type.ts +39 -0
- package/src/registry/modal/client-details-modal/client-details-modal.tsx +65 -29
- package/src/registry/modal/otp-modal/otp-whitlisting-modal.component.tsx +809 -0
- package/src/registry/modal/otp-modal/otp-whitlisting-modal.scss +354 -0
- package/src/registry/modal/otp-modal/otp-whitlisting.scss +0 -0
- package/src/registry/modal/otp-verification-modal/claims-consent.scss +72 -0
- package/src/registry/modal/otp-verification-modal/claims-consent.tsx +135 -0
- package/src/registry/modal/otp-verification-modal/extension/claims-consent.extension.tsx +130 -0
- package/src/registry/modal/otp-verification-modal/otp-verification-modal.scss +30 -0
- package/src/registry/modal/otp-verification-modal/otp-verification-modal.tsx +154 -54
- package/src/registry/modal/send-to-triage/payment-details.tsx +120 -0
- package/src/registry/modal/send-to-triage/payment-method.component.tsx +54 -0
- package/src/registry/modal/send-to-triage/send-to-queue.modal.tsx +981 -0
- package/src/registry/modal/send-to-triage/send-to-triage.modal.scss +156 -3
- package/src/registry/modal/send-to-triage/send-to-triage.modal.tsx +1094 -135
- package/src/registry/modal/start-patient-visit/start-patient-visit.modal.scss +34 -0
- package/src/registry/modal/start-patient-visit/start-patient-visit.modal.tsx +231 -0
- package/src/registry/payment-details/payment-options/payment-options.scss +13 -0
- package/src/registry/payment-details/payment-options/payment-options.tsx +61 -14
- package/src/registry/registration-list/registration-list.component.scss +32 -0
- package/src/registry/registration-list/registration-list.component.tsx +103 -0
- package/src/registry/registry-entry.tsx +11 -0
- package/src/registry/registry.component.scss +402 -78
- package/src/registry/registry.component.tsx +602 -222
- package/src/registry/registry.resource.ts +22 -3
- package/src/registry/types/index.ts +118 -9
- package/src/registry/utils/error-handler.ts +54 -0
- package/src/registry/utils/format-dependant-display-data.ts +1 -1
- package/src/registry/utils/hie-client-adapter.ts +7 -4
- package/src/registry/utils/mask-data.ts +40 -0
- package/src/registry/utils/phone-number-formatter.ts +11 -0
- package/src/resources/dashboard.resource.ts +20 -0
- package/src/resources/identifier-types.ts +2 -0
- package/src/resources/patient-resource.ts +6 -1
- package/src/resources/queue.resource.ts +24 -1
- package/src/resources/superset.resource.ts +21 -0
- package/src/resources/visit.resource.ts +19 -1
- package/src/root.component.tsx +10 -5
- package/src/routes.json +477 -23
- package/src/service-queues/admin/queue/modal/create-queue/create-queue.modal.scss +31 -0
- package/src/service-queues/admin/queue/modal/create-queue/create-queue.modal.tsx +153 -0
- package/src/service-queues/admin/queue/modal/edit-queue/edit-queue.modal.scss +0 -0
- package/src/service-queues/admin/queue/modal/edit-queue/edit-queue.modal.tsx +182 -0
- package/src/service-queues/admin/queue/queue-list/queue-list.scss +33 -0
- package/src/service-queues/admin/queue/queue-list/queue-list.tsx +113 -0
- package/src/service-queues/admin/queue-entry/queue-entry-list.component.scss +6 -0
- package/src/service-queues/admin/queue-entry/queue-entry-list.component.tsx +137 -0
- package/src/service-queues/admin/queue-room/modal/create-queue-room/create-queue-room.modal.scss +31 -0
- package/src/service-queues/admin/queue-room/modal/create-queue-room/create-queue-room.modal.tsx +137 -0
- package/src/service-queues/admin/queue-room/modal/edit-queue-room/edit-queue-room.modal.scss +0 -0
- package/src/service-queues/admin/queue-room/modal/edit-queue-room/edit-queue-room.modal.tsx +146 -0
- package/src/service-queues/admin/queue-room/queue-room-list/queue-room-list.scss +22 -0
- package/src/service-queues/admin/queue-room/queue-room-list/queue-room-list.tsx +120 -0
- package/src/service-queues/admin/service-queue-admin-dashboard.component.scss +6 -0
- package/src/service-queues/admin/service-queue-admin-dashboard.component.tsx +34 -0
- package/src/service-queues/consultation/consultation.component.tsx +9 -0
- package/src/service-queues/extensions/service-queue-patient-banner/service-queue-patient-banner.scss +30 -0
- package/src/service-queues/extensions/service-queue-patient-banner/service-queue-patient-banner.tsx +108 -0
- package/src/service-queues/modals/daily-report-patient-list/daily-report-patient-list.scss +26 -0
- package/src/service-queues/modals/daily-report-patient-list/daily-report-patient-list.tsx +110 -0
- package/src/service-queues/modals/move/move-patient.component.scss +1 -1
- package/src/service-queues/modals/move/move-patient.component.tsx +31 -17
- package/src/service-queues/queue-list/check-in.service.ts +26 -0
- package/src/service-queues/queue-list/queue-list.component.scss +37 -0
- package/src/service-queues/queue-list/queue-list.component.tsx +256 -56
- package/src/service-queues/service-queue/service-queue.component.tsx +151 -8
- package/src/service-queues/service-queue/stats/stat-details/stat-details.component.scss +5 -0
- package/src/service-queues/service-queue/stats/stat-details/stat-details.component.tsx +36 -7
- package/src/service-queues/service-queue.tsx +22 -16
- package/src/service-queues/service-queues.resource.ts +197 -1
- package/src/service-queues/service.resource.ts +1 -1
- package/src/shared/constants/concepts.ts +50 -0
- package/src/shared/constants/patient-category.ts +6 -0
- package/src/shared/constants/patient-type.ts +10 -0
- package/src/shared/constants/visit-types.ts +7 -0
- package/src/shared/services/billing.resource.ts +75 -0
- package/src/shared/services/claims.resource.ts +47 -0
- package/src/shared/services/client-payment-mode.resource.ts +27 -0
- package/src/shared/services/client-payment.resource.ts +17 -0
- package/src/shared/services/consultation-clearance.resource.ts +210 -0
- package/src/shared/services/eligibility.resource.ts +20 -0
- package/src/shared/services/encounters.resource.ts +33 -0
- package/src/shared/services/location.resource.ts +9 -0
- package/src/shared/types/index.ts +156 -0
- package/src/shared/ui/aggregate-stat-card/aggregate-stat-card.scss +42 -0
- package/src/shared/ui/aggregate-stat-card/aggregate-stat-card.tsx +42 -0
- package/src/shared/ui/confirm-modal/confirm.modal.scss +18 -0
- package/src/shared/ui/confirm-modal/confirm.modal.tsx +38 -0
- package/src/shared/ui/facility-worker-slot/facility-worker.component-slot.component.scss +39 -0
- package/src/shared/ui/facility-worker-slot/facility-worker.component-slot.component.tsx +19 -0
- package/src/shared/ui/otp-input/otp-input.component.scss +14 -0
- package/src/shared/ui/otp-input/otp-input.component.tsx +97 -0
- package/src/{service-queues/service-queue/stats → shared/ui}/stat-card/stat-card.component.tsx +6 -3
- package/src/shared/ui/timer/timer.component.scss +5 -0
- package/src/shared/ui/timer/timer.component.tsx +40 -0
- package/src/shared/utils/get-base-url.ts +15 -0
- package/src/shared/utils/get-tag-type.ts +75 -0
- package/src/side-nav-menu/mnch-nav-link-config.ts +16 -0
- package/src/side-nav-menu/mnch-nav-links.tsx +42 -0
- package/src/side-nav-menu/nav-link-config.ts +5 -5
- package/src/side-nav-menu/specialized-clinics-nav-link-config.ts +36 -0
- package/src/side-nav-menu/specialized-clinics-nav-links.tsx +42 -0
- package/src/specialized-clinics/critital-care-unit/critical-care-unit-queues.component.scss +7 -0
- package/src/specialized-clinics/critital-care-unit/critical-care-unit-queues.component.tsx +36 -0
- package/src/specialized-clinics/critital-care-unit/queues/consultation/critical-care-unit-consultation.tsx +15 -0
- package/src/specialized-clinics/critital-care-unit/queues/triage/critical-care-unit-triage.tsx +15 -0
- package/src/specialized-clinics/dental/dental-queues.component.scss +7 -0
- package/src/specialized-clinics/dental/dental-queues.component.tsx +36 -0
- package/src/specialized-clinics/dental/queues/consultation/dental-consultation.tsx +15 -0
- package/src/specialized-clinics/dental/queues/triage/dental-triage.tsx +15 -0
- package/src/specialized-clinics/diagnostic-and-imaging/diagnostic-and-imaging.component.scss +7 -0
- package/src/specialized-clinics/diagnostic-and-imaging/diagnostic-and-imaging.component.tsx +36 -0
- package/src/specialized-clinics/diagnostic-and-imaging/queues/consultation/diagnosis-and-imaging-consultation.tsx +15 -0
- package/src/specialized-clinics/diagnostic-and-imaging/queues/triage/diagnosis-and-imaging-triage.tsx +15 -0
- package/src/specialized-clinics/oncology/oncology-queues.component.scss +7 -0
- package/src/specialized-clinics/oncology/oncology-queues.component.tsx +36 -0
- package/src/specialized-clinics/oncology/queues/consultation/oncology-consultation.tsx +15 -0
- package/src/specialized-clinics/oncology/queues/triage/oncology-triage.tsx +15 -0
- package/src/specialized-clinics/ophthalmology/ophthalmology-queues.component.scss +7 -0
- package/src/specialized-clinics/ophthalmology/ophthalmology-queues.component.tsx +36 -0
- package/src/specialized-clinics/ophthalmology/queues/consultation/ophthalmology-consultation.tsx +15 -0
- package/src/specialized-clinics/ophthalmology/queues/triage/ophthalmology-triage.tsx +15 -0
- package/src/specialized-clinics/psychiatry/psychiatry-queues.component.scss +7 -0
- package/src/specialized-clinics/psychiatry/psychiatry-queues.component.tsx +36 -0
- package/src/specialized-clinics/psychiatry/queues/consultation/psychiatry-consultation.tsx +15 -0
- package/src/specialized-clinics/psychiatry/queues/triage/psychiatry-triage.tsx +15 -0
- package/src/specialized-clinics/renal/queues/consultation/dialysis-consultation.tsx +15 -0
- package/src/specialized-clinics/renal/queues/triage/renal-triage.tsx +15 -0
- package/src/specialized-clinics/renal/renal-queues.component.scss +7 -0
- package/src/specialized-clinics/renal/renal-queues.component.tsx +36 -0
- package/src/specialized-clinics/specialized-clinics-root.tsx +27 -0
- package/src/triage/triage.component.scss +6 -0
- package/src/triage/triage.component.tsx +4 -0
- package/src/types/types.ts +56 -1
- package/webpack.config.js +54 -1
- package/dist/104.js +0 -2
- package/dist/104.js.map +0 -1
- package/dist/15.js +0 -1
- package/dist/15.js.map +0 -1
- package/dist/184.js +0 -2
- package/dist/184.js.map +0 -1
- package/dist/197.js +0 -1
- package/dist/246.js +0 -2
- package/dist/246.js.map +0 -1
- package/dist/255.js +0 -1
- package/dist/255.js.map +0 -1
- package/dist/300.js +0 -1
- package/dist/335.js +0 -1
- package/dist/339.js +0 -1
- package/dist/339.js.map +0 -1
- package/dist/353.js +0 -1
- package/dist/353.js.map +0 -1
- package/dist/420.js +0 -1
- package/dist/420.js.map +0 -1
- package/dist/540.js +0 -2
- package/dist/540.js.map +0 -1
- package/dist/55.js +0 -1
- package/dist/652.js +0 -1
- package/dist/709.js +0 -1
- package/dist/709.js.map +0 -1
- package/dist/710.js +0 -2
- package/dist/710.js.map +0 -1
- package/dist/729.js +0 -1
- package/dist/729.js.map +0 -1
- package/dist/752.js +0 -1
- package/dist/752.js.map +0 -1
- package/dist/833.js +0 -1
- package/dist/833.js.map +0 -1
- package/dist/907.js +0 -1
- package/dist/907.js.map +0 -1
- package/dist/91.js +0 -1
- package/dist/91.js.map +0 -1
- package/dist/93.js +0 -1
- package/dist/93.js.map +0 -1
- package/dist/943.js +0 -1
- package/dist/943.js.map +0 -1
- package/dist/99.js +0 -1
- /package/dist/{104.js.LICENSE.txt → 2177.js.LICENSE.txt} +0 -0
- /package/dist/{184.js.LICENSE.txt → 3184.js.LICENSE.txt} +0 -0
- /package/dist/{540.js.LICENSE.txt → 6540.js.LICENSE.txt} +0 -0
- /package/dist/{710.js.LICENSE.txt → 7830.js.LICENSE.txt} +0 -0
- /package/dist/{246.js.LICENSE.txt → 9583.js.LICENSE.txt} +0 -0
- /package/src/{service-queues/service-queue/stats → shared/ui}/stat-card/stat-card.component.scss +0 -0
|
@@ -0,0 +1,1184 @@
|
|
|
1
|
+
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
2
|
+
import {
|
|
3
|
+
Button,
|
|
4
|
+
ButtonSet,
|
|
5
|
+
Checkbox,
|
|
6
|
+
ComboBox,
|
|
7
|
+
DatePicker,
|
|
8
|
+
DatePickerInput,
|
|
9
|
+
Dropdown,
|
|
10
|
+
Form,
|
|
11
|
+
InlineLoading,
|
|
12
|
+
InlineNotification,
|
|
13
|
+
Tag,
|
|
14
|
+
TextArea,
|
|
15
|
+
TextInput,
|
|
16
|
+
} from '@carbon/react';
|
|
17
|
+
import { showSnackbar, useConfig, useSession, Workspace2 } from '@openmrs/esm-framework';
|
|
18
|
+
import type { Workspace2DefinitionProps } from '@openmrs/esm-framework';
|
|
19
|
+
import dayjs from 'dayjs';
|
|
20
|
+
import type { ConfigObject } from '../../../../../config-schema';
|
|
21
|
+
import type { Intervention } from '../../../../../claims/index';
|
|
22
|
+
import {
|
|
23
|
+
preauthFormLabel,
|
|
24
|
+
readSpecialtyFlags,
|
|
25
|
+
} from '../preauth.resource';
|
|
26
|
+
import {
|
|
27
|
+
createElectivePreauthEncounter,
|
|
28
|
+
extractShaCodeFromConcept,
|
|
29
|
+
fetchPatientCrNumber,
|
|
30
|
+
fetchTodaysVisitDiagnoses,
|
|
31
|
+
holdElectivePreauthRequest,
|
|
32
|
+
loadElectiveEncounterForEdit,
|
|
33
|
+
resolveCoverageForConcept,
|
|
34
|
+
searchElectiveConcepts,
|
|
35
|
+
searchElectiveDiagnoses,
|
|
36
|
+
syncElectiveHoldOrderConcept,
|
|
37
|
+
updateElectivePreauthEncounter,
|
|
38
|
+
type ElectiveConceptOption,
|
|
39
|
+
type ElectiveDiagnosisOption,
|
|
40
|
+
type ElectiveEncounterObsProps,
|
|
41
|
+
} from './elective-preauth.resource';
|
|
42
|
+
import styles from './elective-preauth-request.workspace.scss';
|
|
43
|
+
|
|
44
|
+
interface ElectivePreauthRequestWorkspaceProps {
|
|
45
|
+
patientUuid?: string;
|
|
46
|
+
/** When set, workspace edits this encounter (void-and-replace obs). */
|
|
47
|
+
encounterUuid?: string;
|
|
48
|
+
holdId?: number;
|
|
49
|
+
onSuccess?: () => void;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
interface PatientChartGroupProps {
|
|
53
|
+
patientUuid?: string;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
const ANAESTHESIA = ['GENERAL', 'LOCAL', 'SPINAL', 'SEDATION'];
|
|
57
|
+
const FREQUENCY = ['TWICE_A_WEEK', 'ONCE_A_WEEK', 'ONCE_EVERY_2_WEEKS', 'ONCE_EVERY_3_WEEKS', 'ONCE_A_MONTH'];
|
|
58
|
+
const STAGING = ['STAGE_1', 'STAGE_2', 'STAGE_3', 'STAGE_4'];
|
|
59
|
+
const METASTASES = ['LUNG', 'BRAIN', 'LIVER', 'OTHER'];
|
|
60
|
+
const TREATMENT = ['DAY_WARD', 'RECLINING_CHAIR', 'SIDE_ROOM'];
|
|
61
|
+
const LENS = ['FRAMES_LENSES', 'FRAMED', 'CONTACT'];
|
|
62
|
+
const NEW_OR_REPL = ['NEW', 'REPLACEMENT'];
|
|
63
|
+
|
|
64
|
+
const ElectivePreauthRequestWorkspace: React.FC<
|
|
65
|
+
Workspace2DefinitionProps<ElectivePreauthRequestWorkspaceProps, object, PatientChartGroupProps>
|
|
66
|
+
> = ({ closeWorkspace, workspaceProps, groupProps }) => {
|
|
67
|
+
const session = useSession();
|
|
68
|
+
const config = useConfig<ConfigObject>();
|
|
69
|
+
const electiveCfg = config.electivePreauth;
|
|
70
|
+
const locationUuid = session?.sessionLocation?.uuid ?? '';
|
|
71
|
+
const patientUuid = workspaceProps?.patientUuid ?? groupProps?.patientUuid ?? '';
|
|
72
|
+
const providerUuid = session?.currentProvider?.uuid ?? '';
|
|
73
|
+
const editEncounterUuid = (workspaceProps?.encounterUuid ?? '').trim();
|
|
74
|
+
const isEdit = Boolean(editEncounterUuid);
|
|
75
|
+
const plannedServiceObsConceptUuid = electiveCfg?.plannedServiceObsConceptUuid ?? '';
|
|
76
|
+
|
|
77
|
+
const [concepts, setConcepts] = useState<ElectiveConceptOption[]>([]);
|
|
78
|
+
const [loadingConcepts, setLoadingConcepts] = useState(false);
|
|
79
|
+
const [selected, setSelected] = useState<ElectiveConceptOption | null>(null);
|
|
80
|
+
const [resolvedShaCode, setResolvedShaCode] = useState<string | null>(null);
|
|
81
|
+
const [coverage, setCoverage] = useState<Intervention | null>(null);
|
|
82
|
+
const [loadingCoverage, setLoadingCoverage] = useState(false);
|
|
83
|
+
const [coverageError, setCoverageError] = useState<string | null>(null);
|
|
84
|
+
const [loadingEdit, setLoadingEdit] = useState(isEdit);
|
|
85
|
+
const [existingObs, setExistingObs] = useState<ElectiveEncounterObsProps[]>([]);
|
|
86
|
+
const [editHoldId, setEditHoldId] = useState<number | null>(workspaceProps?.holdId ?? null);
|
|
87
|
+
const [editHoldOrderNo, setEditHoldOrderNo] = useState<string | null>(null);
|
|
88
|
+
|
|
89
|
+
const [clinicalIndications, setClinicalIndications] = useState('');
|
|
90
|
+
const [expectedDate, setExpectedDate] = useState<Date | null>(null);
|
|
91
|
+
|
|
92
|
+
// Diagnosis — visible field; prefilled from today's visit when available
|
|
93
|
+
const [diagnosis, setDiagnosis] = useState<ElectiveDiagnosisOption | null>(null);
|
|
94
|
+
const [visitDiagnoses, setVisitDiagnoses] = useState<ElectiveDiagnosisOption[]>([]);
|
|
95
|
+
const [diagnosisItems, setDiagnosisItems] = useState<ElectiveDiagnosisOption[]>([]);
|
|
96
|
+
const [loadingDiagnoses, setLoadingDiagnoses] = useState(false);
|
|
97
|
+
const [searchingDiagnoses, setSearchingDiagnoses] = useState(false);
|
|
98
|
+
const [diagnosisPrefillNote, setDiagnosisPrefillNote] = useState<string | null>(null);
|
|
99
|
+
|
|
100
|
+
// Surgical
|
|
101
|
+
const [chiefComplaint, setChiefComplaint] = useState('');
|
|
102
|
+
const [vitalSigns, setVitalSigns] = useState('');
|
|
103
|
+
const [hpi, setHpi] = useState('');
|
|
104
|
+
const [physicalExam, setPhysicalExam] = useState('');
|
|
105
|
+
const [investigations, setInvestigations] = useState('');
|
|
106
|
+
const [anaesthesia, setAnaesthesia] = useState('');
|
|
107
|
+
const [surgeryDate, setSurgeryDate] = useState<Date | null>(null);
|
|
108
|
+
const [relatedToEmployment, setRelatedToEmployment] = useState(false);
|
|
109
|
+
const [relatedToAccident, setRelatedToAccident] = useState(false);
|
|
110
|
+
const [isCoInsured, setIsCoInsured] = useState(false);
|
|
111
|
+
const [coInsuranceDetails, setCoInsuranceDetails] = useState('');
|
|
112
|
+
|
|
113
|
+
// Renal / oncology shared
|
|
114
|
+
const [sessionsRequired, setSessionsRequired] = useState('');
|
|
115
|
+
const [costPerSession, setCostPerSession] = useState('');
|
|
116
|
+
const [frequency, setFrequency] = useState('');
|
|
117
|
+
const [startDate, setStartDate] = useState<Date | null>(null);
|
|
118
|
+
|
|
119
|
+
// Optical
|
|
120
|
+
const [necessity, setNecessity] = useState('');
|
|
121
|
+
const [lensPrescription, setLensPrescription] = useState('');
|
|
122
|
+
const [newOrReplacement, setNewOrReplacement] = useState('');
|
|
123
|
+
const [lensAmount, setLensAmount] = useState('');
|
|
124
|
+
const [eyeExamAmount, setEyeExamAmount] = useState('');
|
|
125
|
+
const [frameAmount, setFrameAmount] = useState('');
|
|
126
|
+
|
|
127
|
+
// Oncology (shown to match Raise; free-text details fold into clinical indications on save)
|
|
128
|
+
const [carcinomaStaging, setCarcinomaStaging] = useState('');
|
|
129
|
+
const [metastases, setMetastases] = useState('');
|
|
130
|
+
const [treatmentSetting, setTreatmentSetting] = useState('');
|
|
131
|
+
const [comorbidity, setComorbidity] = useState('');
|
|
132
|
+
const [progressReport, setProgressReport] = useState('');
|
|
133
|
+
|
|
134
|
+
const [submitting, setSubmitting] = useState(false);
|
|
135
|
+
const searchSeq = useRef(0);
|
|
136
|
+
const diagnosisSearchSeq = useRef(0);
|
|
137
|
+
|
|
138
|
+
const specialty = useMemo(() => readSpecialtyFlags(coverage), [coverage]);
|
|
139
|
+
const specialtyLabel = useMemo(() => preauthFormLabel(specialty), [specialty]);
|
|
140
|
+
|
|
141
|
+
// Match Raise: clinical indications shown for renal, optical, imaging; elective also always
|
|
142
|
+
// requires them in formRelevant — show a top-level field when surgical-only or oncology-only.
|
|
143
|
+
const showSharedClinicalIndications =
|
|
144
|
+
specialty.requiresRenalPreauth ||
|
|
145
|
+
specialty.requiresOpticalPreauth ||
|
|
146
|
+
specialty.requiresRadiologyPreauth ||
|
|
147
|
+
specialty.requiresOncologyPreauth ||
|
|
148
|
+
(!specialty.requiresSurgicalPreauth &&
|
|
149
|
+
!specialty.requiresRenalPreauth &&
|
|
150
|
+
!specialty.requiresOpticalPreauth &&
|
|
151
|
+
!specialty.requiresRadiologyPreauth &&
|
|
152
|
+
!specialty.requiresOncologyPreauth);
|
|
153
|
+
|
|
154
|
+
// Elective Raise always requires clinicalIndications — for surgical-only, show it above surgical.
|
|
155
|
+
const showElectiveClinicalIndications =
|
|
156
|
+
specialty.requiresSurgicalPreauth || showSharedClinicalIndications;
|
|
157
|
+
|
|
158
|
+
useEffect(() => {
|
|
159
|
+
if (!patientUuid || !locationUuid) {
|
|
160
|
+
setVisitDiagnoses([]);
|
|
161
|
+
setDiagnosisItems([]);
|
|
162
|
+
setDiagnosis(null);
|
|
163
|
+
setDiagnosisPrefillNote(null);
|
|
164
|
+
return;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
let cancelled = false;
|
|
168
|
+
setLoadingDiagnoses(true);
|
|
169
|
+
setDiagnosisPrefillNote(null);
|
|
170
|
+
void fetchTodaysVisitDiagnoses(patientUuid, locationUuid)
|
|
171
|
+
.then(({ options, preferred }) => {
|
|
172
|
+
if (cancelled) return;
|
|
173
|
+
setVisitDiagnoses(options);
|
|
174
|
+
if (preferred?.conceptUuid) {
|
|
175
|
+
const matched =
|
|
176
|
+
options.find((o) => o.conceptUuid === preferred.conceptUuid) ?? preferred;
|
|
177
|
+
const items =
|
|
178
|
+
matched === preferred && !options.some((o) => o.conceptUuid === preferred.conceptUuid)
|
|
179
|
+
? [matched, ...options]
|
|
180
|
+
: options;
|
|
181
|
+
setDiagnosisItems(items);
|
|
182
|
+
setDiagnosis(matched);
|
|
183
|
+
setDiagnosisPrefillNote('Prefilled from today’s visit diagnosis.');
|
|
184
|
+
} else if (options.length > 0) {
|
|
185
|
+
setDiagnosisItems(options);
|
|
186
|
+
setDiagnosisPrefillNote('Select a diagnosis from today’s visit, or search the dictionary.');
|
|
187
|
+
} else {
|
|
188
|
+
setDiagnosisItems([]);
|
|
189
|
+
setDiagnosisPrefillNote('No diagnosis on today’s visit — search the dictionary to add one.');
|
|
190
|
+
}
|
|
191
|
+
})
|
|
192
|
+
.catch(() => {
|
|
193
|
+
if (cancelled) return;
|
|
194
|
+
setVisitDiagnoses([]);
|
|
195
|
+
setDiagnosisItems([]);
|
|
196
|
+
setDiagnosisPrefillNote('Could not load today’s diagnoses — search the dictionary to add one.');
|
|
197
|
+
})
|
|
198
|
+
.finally(() => {
|
|
199
|
+
if (!cancelled) setLoadingDiagnoses(false);
|
|
200
|
+
});
|
|
201
|
+
|
|
202
|
+
return () => {
|
|
203
|
+
cancelled = true;
|
|
204
|
+
};
|
|
205
|
+
}, [patientUuid, locationUuid]);
|
|
206
|
+
|
|
207
|
+
// Prefill when editing an existing elective encounter.
|
|
208
|
+
useEffect(() => {
|
|
209
|
+
if (!isEdit || !editEncounterUuid || !patientUuid) {
|
|
210
|
+
setLoadingEdit(false);
|
|
211
|
+
return;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
let cancelled = false;
|
|
215
|
+
setLoadingEdit(true);
|
|
216
|
+
void (async () => {
|
|
217
|
+
try {
|
|
218
|
+
const model = await loadElectiveEncounterForEdit(
|
|
219
|
+
editEncounterUuid,
|
|
220
|
+
patientUuid,
|
|
221
|
+
plannedServiceObsConceptUuid,
|
|
222
|
+
);
|
|
223
|
+
if (cancelled) return;
|
|
224
|
+
|
|
225
|
+
setExistingObs(model.existingObs);
|
|
226
|
+
if (model.hold?.id) {
|
|
227
|
+
setEditHoldId(model.hold.id);
|
|
228
|
+
setEditHoldOrderNo(model.hold.orderNo ?? null);
|
|
229
|
+
}
|
|
230
|
+
if (model.diagnoses[0]) {
|
|
231
|
+
setDiagnosis(model.diagnoses[0]);
|
|
232
|
+
setDiagnosisItems((prev) => {
|
|
233
|
+
const merged = [model.diagnoses[0], ...prev.filter((d) => d.conceptUuid !== model.diagnoses[0].conceptUuid)];
|
|
234
|
+
return merged;
|
|
235
|
+
});
|
|
236
|
+
setDiagnosisPrefillNote('Loaded from elective encounter diagnosis.');
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
if (model.plannedConcept) {
|
|
240
|
+
setSelected(model.plannedConcept);
|
|
241
|
+
setCoverage(null);
|
|
242
|
+
setCoverageError(null);
|
|
243
|
+
setResolvedShaCode(null);
|
|
244
|
+
const shaCode = extractShaCodeFromConcept(model.plannedConcept);
|
|
245
|
+
if (!shaCode) {
|
|
246
|
+
setCoverageError(`No SHA mapping found for “${model.plannedConcept.display}”.`);
|
|
247
|
+
} else {
|
|
248
|
+
setResolvedShaCode(shaCode);
|
|
249
|
+
setLoadingCoverage(true);
|
|
250
|
+
try {
|
|
251
|
+
const cr = await fetchPatientCrNumber(
|
|
252
|
+
patientUuid,
|
|
253
|
+
electiveCfg?.clientRegistryIdentifierTypeUuid ?? '',
|
|
254
|
+
);
|
|
255
|
+
if (!cr) {
|
|
256
|
+
setCoverageError('Patient needs a Client Registry identifier to check SHA coverage.');
|
|
257
|
+
} else {
|
|
258
|
+
const intervention = await resolveCoverageForConcept(cr, locationUuid, shaCode);
|
|
259
|
+
if (!intervention) {
|
|
260
|
+
setCoverageError(`No SHA coverage found for ${shaCode}.`);
|
|
261
|
+
} else {
|
|
262
|
+
setCoverage(intervention);
|
|
263
|
+
if (!intervention.needsManualPreauthApproval) {
|
|
264
|
+
setCoverageError(
|
|
265
|
+
`${shaCode} does not require elective (manual) preauth. Capture fields are hidden.`,
|
|
266
|
+
);
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
} catch (err) {
|
|
271
|
+
setCoverageError(err instanceof Error ? err.message : 'Coverage lookup failed');
|
|
272
|
+
} finally {
|
|
273
|
+
setLoadingCoverage(false);
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
// Apply form values after concept/coverage so reset does not wipe them.
|
|
279
|
+
const fv = model.formValues;
|
|
280
|
+
if (fv.clinicalIndications) setClinicalIndications(fv.clinicalIndications);
|
|
281
|
+
if (fv.expectedServiceStartDate) {
|
|
282
|
+
const d = dayjs(fv.expectedServiceStartDate);
|
|
283
|
+
if (d.isValid()) setExpectedDate(d.toDate());
|
|
284
|
+
} else if (fv.startDate) {
|
|
285
|
+
const d = dayjs(fv.startDate);
|
|
286
|
+
if (d.isValid()) setExpectedDate(d.toDate());
|
|
287
|
+
}
|
|
288
|
+
if (fv.chiefComplaint) setChiefComplaint(fv.chiefComplaint);
|
|
289
|
+
if (fv.hpi) setHpi(fv.hpi);
|
|
290
|
+
if (fv.physicalExam) setPhysicalExam(fv.physicalExam);
|
|
291
|
+
if (fv.investigations) setInvestigations(fv.investigations);
|
|
292
|
+
if (fv.anaesthesia) setAnaesthesia(fv.anaesthesia);
|
|
293
|
+
if (fv.surgeryDate) {
|
|
294
|
+
const d = dayjs(fv.surgeryDate);
|
|
295
|
+
if (d.isValid()) setSurgeryDate(d.toDate());
|
|
296
|
+
}
|
|
297
|
+
if (fv.relatedToEmployment != null) setRelatedToEmployment(fv.relatedToEmployment);
|
|
298
|
+
if (fv.relatedToAccident != null) setRelatedToAccident(fv.relatedToAccident);
|
|
299
|
+
if (fv.isCoInsured != null) setIsCoInsured(fv.isCoInsured);
|
|
300
|
+
if (fv.coInsuranceDetails) setCoInsuranceDetails(fv.coInsuranceDetails);
|
|
301
|
+
if (fv.sessionsRequired) setSessionsRequired(fv.sessionsRequired);
|
|
302
|
+
if (fv.frequency) setFrequency(fv.frequency);
|
|
303
|
+
if (fv.startDate) {
|
|
304
|
+
const d = dayjs(fv.startDate);
|
|
305
|
+
if (d.isValid()) setStartDate(d.toDate());
|
|
306
|
+
}
|
|
307
|
+
} catch (e) {
|
|
308
|
+
if (!cancelled) {
|
|
309
|
+
setCoverageError(e instanceof Error ? e.message : 'Failed to load encounter for edit');
|
|
310
|
+
}
|
|
311
|
+
} finally {
|
|
312
|
+
if (!cancelled) setLoadingEdit(false);
|
|
313
|
+
}
|
|
314
|
+
})();
|
|
315
|
+
|
|
316
|
+
return () => {
|
|
317
|
+
cancelled = true;
|
|
318
|
+
};
|
|
319
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
320
|
+
}, [isEdit, editEncounterUuid, patientUuid, plannedServiceObsConceptUuid, locationUuid]);
|
|
321
|
+
|
|
322
|
+
const resetCaptureFields = () => {
|
|
323
|
+
setClinicalIndications('');
|
|
324
|
+
setExpectedDate(null);
|
|
325
|
+
setChiefComplaint('');
|
|
326
|
+
setVitalSigns('');
|
|
327
|
+
setHpi('');
|
|
328
|
+
setPhysicalExam('');
|
|
329
|
+
setInvestigations('');
|
|
330
|
+
setAnaesthesia('');
|
|
331
|
+
setSurgeryDate(null);
|
|
332
|
+
setRelatedToEmployment(false);
|
|
333
|
+
setRelatedToAccident(false);
|
|
334
|
+
setIsCoInsured(false);
|
|
335
|
+
setCoInsuranceDetails('');
|
|
336
|
+
setSessionsRequired('');
|
|
337
|
+
setCostPerSession('');
|
|
338
|
+
setFrequency('');
|
|
339
|
+
setStartDate(null);
|
|
340
|
+
setNecessity('');
|
|
341
|
+
setLensPrescription('');
|
|
342
|
+
setNewOrReplacement('');
|
|
343
|
+
setLensAmount('');
|
|
344
|
+
setEyeExamAmount('');
|
|
345
|
+
setFrameAmount('');
|
|
346
|
+
setCarcinomaStaging('');
|
|
347
|
+
setMetastases('');
|
|
348
|
+
setTreatmentSetting('');
|
|
349
|
+
setComorbidity('');
|
|
350
|
+
setProgressReport('');
|
|
351
|
+
};
|
|
352
|
+
|
|
353
|
+
const isDirty = Boolean(
|
|
354
|
+
selected ||
|
|
355
|
+
diagnosis ||
|
|
356
|
+
clinicalIndications.trim() ||
|
|
357
|
+
chiefComplaint.trim() ||
|
|
358
|
+
vitalSigns.trim() ||
|
|
359
|
+
hpi.trim() ||
|
|
360
|
+
physicalExam.trim() ||
|
|
361
|
+
investigations.trim() ||
|
|
362
|
+
anaesthesia ||
|
|
363
|
+
surgeryDate ||
|
|
364
|
+
sessionsRequired.trim() ||
|
|
365
|
+
costPerSession.trim() ||
|
|
366
|
+
frequency ||
|
|
367
|
+
startDate ||
|
|
368
|
+
necessity.trim() ||
|
|
369
|
+
lensPrescription ||
|
|
370
|
+
newOrReplacement ||
|
|
371
|
+
lensAmount.trim() ||
|
|
372
|
+
eyeExamAmount.trim() ||
|
|
373
|
+
frameAmount.trim() ||
|
|
374
|
+
carcinomaStaging ||
|
|
375
|
+
metastases ||
|
|
376
|
+
treatmentSetting ||
|
|
377
|
+
comorbidity.trim() ||
|
|
378
|
+
progressReport.trim() ||
|
|
379
|
+
expectedDate,
|
|
380
|
+
);
|
|
381
|
+
|
|
382
|
+
const onConceptInputChange = useCallback((inputValue: string) => {
|
|
383
|
+
const q = (inputValue ?? '').trim();
|
|
384
|
+
const seq = ++searchSeq.current;
|
|
385
|
+
if (q.length < 2) {
|
|
386
|
+
setConcepts([]);
|
|
387
|
+
setLoadingConcepts(false);
|
|
388
|
+
return;
|
|
389
|
+
}
|
|
390
|
+
setLoadingConcepts(true);
|
|
391
|
+
void searchElectiveConcepts(q)
|
|
392
|
+
.then((list) => {
|
|
393
|
+
if (seq !== searchSeq.current) return;
|
|
394
|
+
setConcepts(list);
|
|
395
|
+
})
|
|
396
|
+
.catch(() => {
|
|
397
|
+
if (seq !== searchSeq.current) return;
|
|
398
|
+
setConcepts([]);
|
|
399
|
+
})
|
|
400
|
+
.finally(() => {
|
|
401
|
+
if (seq !== searchSeq.current) return;
|
|
402
|
+
setLoadingConcepts(false);
|
|
403
|
+
});
|
|
404
|
+
}, []);
|
|
405
|
+
|
|
406
|
+
const onDiagnosisInputChange = useCallback(
|
|
407
|
+
(inputValue: string) => {
|
|
408
|
+
const q = (inputValue ?? '').trim();
|
|
409
|
+
const seq = ++diagnosisSearchSeq.current;
|
|
410
|
+
if (q.length < 2) {
|
|
411
|
+
setDiagnosisItems(visitDiagnoses);
|
|
412
|
+
setSearchingDiagnoses(false);
|
|
413
|
+
return;
|
|
414
|
+
}
|
|
415
|
+
setSearchingDiagnoses(true);
|
|
416
|
+
void searchElectiveDiagnoses(q)
|
|
417
|
+
.then((list) => {
|
|
418
|
+
if (seq !== diagnosisSearchSeq.current) return;
|
|
419
|
+
// Prefer visit hits first when they still match the query text.
|
|
420
|
+
const qLower = q.toLowerCase();
|
|
421
|
+
const fromVisit = visitDiagnoses.filter(
|
|
422
|
+
(d) =>
|
|
423
|
+
d.display.toLowerCase().includes(qLower) ||
|
|
424
|
+
d.icd11Code.toLowerCase().includes(qLower),
|
|
425
|
+
);
|
|
426
|
+
const seen = new Set(fromVisit.map((d) => d.conceptUuid));
|
|
427
|
+
const merged = [...fromVisit, ...list.filter((d) => d.conceptUuid && !seen.has(d.conceptUuid))];
|
|
428
|
+
setDiagnosisItems(merged);
|
|
429
|
+
})
|
|
430
|
+
.catch(() => {
|
|
431
|
+
if (seq !== diagnosisSearchSeq.current) return;
|
|
432
|
+
setDiagnosisItems(visitDiagnoses);
|
|
433
|
+
})
|
|
434
|
+
.finally(() => {
|
|
435
|
+
if (seq !== diagnosisSearchSeq.current) return;
|
|
436
|
+
setSearchingDiagnoses(false);
|
|
437
|
+
});
|
|
438
|
+
},
|
|
439
|
+
[visitDiagnoses],
|
|
440
|
+
);
|
|
441
|
+
|
|
442
|
+
const onSelectConcept = async (item: ElectiveConceptOption | null) => {
|
|
443
|
+
setSelected(item);
|
|
444
|
+
setCoverage(null);
|
|
445
|
+
setCoverageError(null);
|
|
446
|
+
setResolvedShaCode(null);
|
|
447
|
+
resetCaptureFields();
|
|
448
|
+
if (!item || !patientUuid || !locationUuid) return;
|
|
449
|
+
|
|
450
|
+
const shaCode = extractShaCodeFromConcept(item);
|
|
451
|
+
if (!shaCode) {
|
|
452
|
+
setCoverageError(`No SHA mapping found for “${item.display}”.`);
|
|
453
|
+
return;
|
|
454
|
+
}
|
|
455
|
+
setResolvedShaCode(shaCode);
|
|
456
|
+
|
|
457
|
+
setLoadingCoverage(true);
|
|
458
|
+
try {
|
|
459
|
+
const cr = await fetchPatientCrNumber(
|
|
460
|
+
patientUuid,
|
|
461
|
+
electiveCfg?.clientRegistryIdentifierTypeUuid ?? '',
|
|
462
|
+
);
|
|
463
|
+
if (!cr) {
|
|
464
|
+
setCoverageError('Patient needs a Client Registry identifier to check SHA coverage.');
|
|
465
|
+
return;
|
|
466
|
+
}
|
|
467
|
+
const intervention = await resolveCoverageForConcept(cr, locationUuid, shaCode);
|
|
468
|
+
if (!intervention) {
|
|
469
|
+
setCoverageError(`No SHA coverage found for ${shaCode}.`);
|
|
470
|
+
return;
|
|
471
|
+
}
|
|
472
|
+
setCoverage(intervention);
|
|
473
|
+
if (!intervention.needsManualPreauthApproval) {
|
|
474
|
+
setCoverageError(
|
|
475
|
+
`${shaCode} does not require elective (manual) preauth. Capture fields are hidden.`,
|
|
476
|
+
);
|
|
477
|
+
}
|
|
478
|
+
} catch (e) {
|
|
479
|
+
setCoverageError(e instanceof Error ? e.message : 'Coverage lookup failed');
|
|
480
|
+
} finally {
|
|
481
|
+
setLoadingCoverage(false);
|
|
482
|
+
}
|
|
483
|
+
};
|
|
484
|
+
|
|
485
|
+
const showCaptureFields = Boolean(coverage?.needsManualPreauthApproval) && !loadingCoverage;
|
|
486
|
+
|
|
487
|
+
const canSubmit = useMemo(() => {
|
|
488
|
+
if (
|
|
489
|
+
!patientUuid ||
|
|
490
|
+
!locationUuid ||
|
|
491
|
+
!providerUuid ||
|
|
492
|
+
!selected ||
|
|
493
|
+
!coverage?.needsManualPreauthApproval ||
|
|
494
|
+
!expectedDate ||
|
|
495
|
+
!(diagnosis?.conceptUuid ?? '').trim() ||
|
|
496
|
+
submitting
|
|
497
|
+
) {
|
|
498
|
+
return false;
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
// Elective Raise always requires clinical indications (except surgical block uses HPI etc.;
|
|
502
|
+
// still required in formRelevant for isElective).
|
|
503
|
+
if (!clinicalIndications.trim() && !specialty.requiresSurgicalPreauth) {
|
|
504
|
+
return false;
|
|
505
|
+
}
|
|
506
|
+
if (specialty.requiresSurgicalPreauth) {
|
|
507
|
+
if (
|
|
508
|
+
!chiefComplaint.trim() ||
|
|
509
|
+
!hpi.trim() ||
|
|
510
|
+
!physicalExam.trim() ||
|
|
511
|
+
!investigations.trim() ||
|
|
512
|
+
!anaesthesia ||
|
|
513
|
+
!surgeryDate
|
|
514
|
+
) {
|
|
515
|
+
return false;
|
|
516
|
+
}
|
|
517
|
+
// When surgical-only, still require clinical indications for elective hold/raise
|
|
518
|
+
if (!clinicalIndications.trim()) return false;
|
|
519
|
+
}
|
|
520
|
+
if (specialty.requiresRenalPreauth) {
|
|
521
|
+
if (!clinicalIndications.trim() || !sessionsRequired.trim() || !frequency || !startDate) {
|
|
522
|
+
return false;
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
if (specialty.requiresOpticalPreauth || specialty.requiresRadiologyPreauth) {
|
|
526
|
+
if (!clinicalIndications.trim()) return false;
|
|
527
|
+
}
|
|
528
|
+
if (specialty.requiresOpticalPreauth) {
|
|
529
|
+
if (!necessity.trim() || !lensPrescription || !newOrReplacement) return false;
|
|
530
|
+
}
|
|
531
|
+
return true;
|
|
532
|
+
}, [
|
|
533
|
+
patientUuid,
|
|
534
|
+
locationUuid,
|
|
535
|
+
providerUuid,
|
|
536
|
+
selected,
|
|
537
|
+
coverage,
|
|
538
|
+
expectedDate,
|
|
539
|
+
diagnosis,
|
|
540
|
+
submitting,
|
|
541
|
+
clinicalIndications,
|
|
542
|
+
specialty,
|
|
543
|
+
chiefComplaint,
|
|
544
|
+
hpi,
|
|
545
|
+
physicalExam,
|
|
546
|
+
investigations,
|
|
547
|
+
anaesthesia,
|
|
548
|
+
surgeryDate,
|
|
549
|
+
sessionsRequired,
|
|
550
|
+
frequency,
|
|
551
|
+
startDate,
|
|
552
|
+
necessity,
|
|
553
|
+
lensPrescription,
|
|
554
|
+
newOrReplacement,
|
|
555
|
+
]);
|
|
556
|
+
|
|
557
|
+
const buildClinicalIndicationsForSave = () => {
|
|
558
|
+
const parts = [clinicalIndications.trim()].filter(Boolean);
|
|
559
|
+
if (specialty.requiresOncologyPreauth) {
|
|
560
|
+
if (carcinomaStaging) parts.push(`Carcinoma staging: ${carcinomaStaging}`);
|
|
561
|
+
if (metastases) parts.push(`Metastases: ${metastases}`);
|
|
562
|
+
if (treatmentSetting) parts.push(`Treatment setting: ${treatmentSetting}`);
|
|
563
|
+
if (comorbidity.trim()) parts.push(`Comorbidity: ${comorbidity.trim()}`);
|
|
564
|
+
if (progressReport.trim()) parts.push(`Progress report: ${progressReport.trim()}`);
|
|
565
|
+
}
|
|
566
|
+
if (specialty.requiresOpticalPreauth && necessity.trim()) {
|
|
567
|
+
// necessity has its own concept path? Raise sends separately; we keep clinical + necessity text
|
|
568
|
+
}
|
|
569
|
+
if (specialty.requiresSurgicalPreauth && vitalSigns.trim()) {
|
|
570
|
+
parts.push(`Vital signs: ${vitalSigns.trim()}`);
|
|
571
|
+
}
|
|
572
|
+
return parts.join('\n');
|
|
573
|
+
};
|
|
574
|
+
|
|
575
|
+
const onSubmit = async (e: React.FormEvent) => {
|
|
576
|
+
e.preventDefault();
|
|
577
|
+
if (!canSubmit || !selected || !coverage || !expectedDate || !diagnosis?.conceptUuid) return;
|
|
578
|
+
if (!providerUuid) {
|
|
579
|
+
showSnackbar({
|
|
580
|
+
title: 'Missing provider',
|
|
581
|
+
subtitle: 'Your session has no provider. Switch to a provider account and try again.',
|
|
582
|
+
kind: 'error',
|
|
583
|
+
});
|
|
584
|
+
return;
|
|
585
|
+
}
|
|
586
|
+
setSubmitting(true);
|
|
587
|
+
try {
|
|
588
|
+
const captureInput = {
|
|
589
|
+
patientUuid,
|
|
590
|
+
locationUuid,
|
|
591
|
+
encounterTypeUuid: electiveCfg?.encounterTypeUuid ?? '',
|
|
592
|
+
providerUuid,
|
|
593
|
+
encounterRoleUuid: electiveCfg?.encounterRoleUuid,
|
|
594
|
+
plannedServiceObsConceptUuid,
|
|
595
|
+
concept: selected,
|
|
596
|
+
intervention: coverage,
|
|
597
|
+
clinicalIndications: buildClinicalIndicationsForSave(),
|
|
598
|
+
expectedServiceStartDate: expectedDate.toISOString(),
|
|
599
|
+
chiefComplaint,
|
|
600
|
+
hpi,
|
|
601
|
+
physicalExam,
|
|
602
|
+
investigations,
|
|
603
|
+
anaesthesia: specialty.requiresSurgicalPreauth ? anaesthesia : undefined,
|
|
604
|
+
surgeryDate:
|
|
605
|
+
specialty.requiresSurgicalPreauth && surgeryDate
|
|
606
|
+
? surgeryDate.toISOString()
|
|
607
|
+
: undefined,
|
|
608
|
+
relatedToEmployment: specialty.requiresSurgicalPreauth ? relatedToEmployment : undefined,
|
|
609
|
+
relatedToAccident: specialty.requiresSurgicalPreauth ? relatedToAccident : undefined,
|
|
610
|
+
isCoInsured:
|
|
611
|
+
specialty.requiresSurgicalPreauth ||
|
|
612
|
+
specialty.requiresRenalPreauth ||
|
|
613
|
+
specialty.requiresOncologyPreauth
|
|
614
|
+
? isCoInsured
|
|
615
|
+
: undefined,
|
|
616
|
+
coInsuranceDetails: isCoInsured ? coInsuranceDetails : undefined,
|
|
617
|
+
sessionsRequired:
|
|
618
|
+
specialty.requiresRenalPreauth || specialty.requiresOncologyPreauth
|
|
619
|
+
? sessionsRequired
|
|
620
|
+
: undefined,
|
|
621
|
+
frequency: specialty.requiresRenalPreauth ? frequency : undefined,
|
|
622
|
+
startDate:
|
|
623
|
+
(specialty.requiresRenalPreauth || specialty.requiresOncologyPreauth) && startDate
|
|
624
|
+
? startDate.toISOString()
|
|
625
|
+
: undefined,
|
|
626
|
+
necessity: specialty.requiresOpticalPreauth ? necessity : undefined,
|
|
627
|
+
lensPrescription: specialty.requiresOpticalPreauth ? lensPrescription : undefined,
|
|
628
|
+
newOrReplacement: specialty.requiresOpticalPreauth ? newOrReplacement : undefined,
|
|
629
|
+
lensAmount: specialty.requiresOpticalPreauth ? lensAmount : undefined,
|
|
630
|
+
eyeExamAmount: specialty.requiresOpticalPreauth ? eyeExamAmount : undefined,
|
|
631
|
+
frameAmount: specialty.requiresOpticalPreauth ? frameAmount : undefined,
|
|
632
|
+
diagnosis,
|
|
633
|
+
};
|
|
634
|
+
|
|
635
|
+
if (isEdit && editEncounterUuid) {
|
|
636
|
+
await updateElectivePreauthEncounter(editEncounterUuid, captureInput, existingObs);
|
|
637
|
+
if (editHoldId) {
|
|
638
|
+
await syncElectiveHoldOrderConcept({
|
|
639
|
+
holdId: editHoldId,
|
|
640
|
+
encounterUuid: editEncounterUuid,
|
|
641
|
+
conceptUuid: selected.uuid,
|
|
642
|
+
currentOrderNo: editHoldOrderNo,
|
|
643
|
+
});
|
|
644
|
+
}
|
|
645
|
+
showSnackbar({
|
|
646
|
+
title: 'Elective request updated',
|
|
647
|
+
subtitle: 'Encounter obs replaced (voided + new). Order concept saved for Create Order.',
|
|
648
|
+
kind: 'success',
|
|
649
|
+
});
|
|
650
|
+
} else {
|
|
651
|
+
const encounter = await createElectivePreauthEncounter(captureInput);
|
|
652
|
+
|
|
653
|
+
await holdElectivePreauthRequest({
|
|
654
|
+
patientUuid,
|
|
655
|
+
locationUuid,
|
|
656
|
+
encounterUuid: encounter.uuid,
|
|
657
|
+
intervention: coverage,
|
|
658
|
+
expectedServiceStartDate: expectedDate.toISOString(),
|
|
659
|
+
conceptUuid: selected.uuid,
|
|
660
|
+
});
|
|
661
|
+
|
|
662
|
+
showSnackbar({
|
|
663
|
+
title: 'Elective request saved',
|
|
664
|
+
subtitle: 'Preauth encounter created. Accounting can raise from Elective requests.',
|
|
665
|
+
kind: 'success',
|
|
666
|
+
});
|
|
667
|
+
}
|
|
668
|
+
|
|
669
|
+
workspaceProps?.onSuccess?.();
|
|
670
|
+
await closeWorkspace({ discardUnsavedChanges: true });
|
|
671
|
+
} catch (err) {
|
|
672
|
+
showSnackbar({
|
|
673
|
+
title: isEdit ? 'Update failed' : 'Save failed',
|
|
674
|
+
subtitle:
|
|
675
|
+
err instanceof Error
|
|
676
|
+
? err.message
|
|
677
|
+
: isEdit
|
|
678
|
+
? 'Could not update elective preauth encounter'
|
|
679
|
+
: 'Could not save elective preauth encounter',
|
|
680
|
+
kind: 'error',
|
|
681
|
+
});
|
|
682
|
+
} finally {
|
|
683
|
+
setSubmitting(false);
|
|
684
|
+
}
|
|
685
|
+
};
|
|
686
|
+
|
|
687
|
+
const clinicalIndicationsFieldProps = {
|
|
688
|
+
labelText: 'Clinical indications',
|
|
689
|
+
value: clinicalIndications,
|
|
690
|
+
onChange: (e: React.ChangeEvent<HTMLTextAreaElement>) => setClinicalIndications(e.target.value),
|
|
691
|
+
rows: 3,
|
|
692
|
+
};
|
|
693
|
+
|
|
694
|
+
return (
|
|
695
|
+
<Workspace2
|
|
696
|
+
title={isEdit ? 'Edit elective preauth request' : 'Elective preauth request'}
|
|
697
|
+
hasUnsavedChanges={isDirty}
|
|
698
|
+
>
|
|
699
|
+
<Form className={styles.form} onSubmit={(e) => void onSubmit(e)}>
|
|
700
|
+
<div className={styles.body}>
|
|
701
|
+
{loadingEdit ? <InlineLoading description="Loading encounter for edit…" /> : null}
|
|
702
|
+
{!patientUuid ? (
|
|
703
|
+
<InlineNotification
|
|
704
|
+
kind="error"
|
|
705
|
+
lowContrast
|
|
706
|
+
hideCloseButton
|
|
707
|
+
title="Missing patient"
|
|
708
|
+
subtitle="Open this workspace from the patient chart Elective Preauth page."
|
|
709
|
+
/>
|
|
710
|
+
) : null}
|
|
711
|
+
|
|
712
|
+
{patientUuid && !providerUuid ? (
|
|
713
|
+
<InlineNotification
|
|
714
|
+
kind="warning"
|
|
715
|
+
lowContrast
|
|
716
|
+
hideCloseButton
|
|
717
|
+
title="No provider on session"
|
|
718
|
+
subtitle="Log in as a provider user so the encounter can store who captured this request."
|
|
719
|
+
/>
|
|
720
|
+
) : null}
|
|
721
|
+
|
|
722
|
+
<p className={styles.hint}>
|
|
723
|
+
{isEdit
|
|
724
|
+
? 'Update the planned orderable concept and specialty fields. Saving voids replaced obs and creates new ones on the same encounter.'
|
|
725
|
+
: 'Search the concept dictionary, select the orderable concept, then complete the specialty fields that match the Raise preauth form for this intervention.'}
|
|
726
|
+
</p>
|
|
727
|
+
|
|
728
|
+
<ComboBox
|
|
729
|
+
className={styles.field}
|
|
730
|
+
id="elective-ws-intervention-concept"
|
|
731
|
+
titleText="Orderable concept (planned service)"
|
|
732
|
+
helperText="This concept is used when Create Order runs after the preauth is ACTIVE or FINALISED."
|
|
733
|
+
items={concepts}
|
|
734
|
+
itemToString={(item: ElectiveConceptOption | null) => item?.display ?? ''}
|
|
735
|
+
shouldFilterItem={() => true}
|
|
736
|
+
selectedItem={selected}
|
|
737
|
+
onChange={({ selectedItem }) => void onSelectConcept(selectedItem ?? null)}
|
|
738
|
+
onInputChange={onConceptInputChange}
|
|
739
|
+
placeholder="Type at least 2 characters to search concepts…"
|
|
740
|
+
/>
|
|
741
|
+
{loadingConcepts ? <InlineLoading description="Searching concept dictionary…" /> : null}
|
|
742
|
+
|
|
743
|
+
{loadingCoverage ? (
|
|
744
|
+
<InlineLoading
|
|
745
|
+
description={`Resolving ${resolvedShaCode ?? 'SHA code'} and checking coverage…`}
|
|
746
|
+
/>
|
|
747
|
+
) : null}
|
|
748
|
+
|
|
749
|
+
{coverageError && !loadingCoverage ? (
|
|
750
|
+
<InlineNotification
|
|
751
|
+
kind="warning"
|
|
752
|
+
lowContrast
|
|
753
|
+
hideCloseButton
|
|
754
|
+
title="Coverage"
|
|
755
|
+
subtitle={coverageError}
|
|
756
|
+
/>
|
|
757
|
+
) : null}
|
|
758
|
+
|
|
759
|
+
{coverage && !loadingCoverage ? (
|
|
760
|
+
<div className={styles.coverage}>
|
|
761
|
+
<div className={styles.tagRow}>
|
|
762
|
+
<Tag type={coverage.needsManualPreauthApproval ? 'magenta' : 'gray'}>
|
|
763
|
+
{coverage.needsManualPreauthApproval ? 'Elective preauth required' : 'Not elective'}
|
|
764
|
+
</Tag>
|
|
765
|
+
{coverage.needsManualPreauthApproval ? (
|
|
766
|
+
<Tag type="blue">{specialtyLabel} preauth</Tag>
|
|
767
|
+
) : null}
|
|
768
|
+
</div>
|
|
769
|
+
<p>
|
|
770
|
+
<strong>{coverage.code}</strong> — {coverage.name}
|
|
771
|
+
</p>
|
|
772
|
+
<p className={styles.meta}>
|
|
773
|
+
Tariff: {coverage.overallTariff || coverage.kephLevelTarriff || '—'}
|
|
774
|
+
</p>
|
|
775
|
+
</div>
|
|
776
|
+
) : null}
|
|
777
|
+
|
|
778
|
+
{showCaptureFields ? (
|
|
779
|
+
<>
|
|
780
|
+
<ComboBox
|
|
781
|
+
className={styles.field}
|
|
782
|
+
id="elective-ws-diagnosis"
|
|
783
|
+
titleText="Diagnosis"
|
|
784
|
+
helperText={diagnosisPrefillNote ?? undefined}
|
|
785
|
+
items={diagnosisItems}
|
|
786
|
+
itemToString={(item: ElectiveDiagnosisOption | null) =>
|
|
787
|
+
item
|
|
788
|
+
? item.icd11Code
|
|
789
|
+
? `${item.icd11Code} · ${item.display}`
|
|
790
|
+
: item.display
|
|
791
|
+
: ''
|
|
792
|
+
}
|
|
793
|
+
shouldFilterItem={() => true}
|
|
794
|
+
selectedItem={diagnosis}
|
|
795
|
+
onChange={({ selectedItem }) => {
|
|
796
|
+
setDiagnosis(selectedItem ?? null);
|
|
797
|
+
setDiagnosisPrefillNote(null);
|
|
798
|
+
}}
|
|
799
|
+
onInputChange={onDiagnosisInputChange}
|
|
800
|
+
placeholder="Search diagnosis or pick from today’s visit…"
|
|
801
|
+
/>
|
|
802
|
+
{loadingDiagnoses || searchingDiagnoses ? (
|
|
803
|
+
<InlineLoading
|
|
804
|
+
description={
|
|
805
|
+
loadingDiagnoses ? 'Loading today’s diagnoses…' : 'Searching diagnoses…'
|
|
806
|
+
}
|
|
807
|
+
/>
|
|
808
|
+
) : null}
|
|
809
|
+
|
|
810
|
+
<div className={styles.dateField}>
|
|
811
|
+
<DatePicker
|
|
812
|
+
datePickerType="single"
|
|
813
|
+
dateFormat="d/m/Y"
|
|
814
|
+
value={expectedDate ?? undefined}
|
|
815
|
+
onChange={(dates: Date[]) => setExpectedDate(dates?.[0] ?? null)}
|
|
816
|
+
>
|
|
817
|
+
<DatePickerInput
|
|
818
|
+
id="elective-ws-expected-date"
|
|
819
|
+
labelText="Expected service start date"
|
|
820
|
+
placeholder="dd/mm/yyyy"
|
|
821
|
+
/>
|
|
822
|
+
</DatePicker>
|
|
823
|
+
</div>
|
|
824
|
+
|
|
825
|
+
{showElectiveClinicalIndications &&
|
|
826
|
+
!specialty.requiresRenalPreauth &&
|
|
827
|
+
!specialty.requiresOpticalPreauth &&
|
|
828
|
+
!specialty.requiresRadiologyPreauth ? (
|
|
829
|
+
<TextArea
|
|
830
|
+
className={styles.field}
|
|
831
|
+
id="elective-ws-clinical-indications"
|
|
832
|
+
{...clinicalIndicationsFieldProps}
|
|
833
|
+
/>
|
|
834
|
+
) : null}
|
|
835
|
+
|
|
836
|
+
{specialty.requiresSurgicalPreauth ? (
|
|
837
|
+
<section className={styles.section}>
|
|
838
|
+
<h5>Surgical preauth</h5>
|
|
839
|
+
<TextArea
|
|
840
|
+
className={styles.field}
|
|
841
|
+
id="elective-ws-chief-complaint"
|
|
842
|
+
labelText="Chief complaint"
|
|
843
|
+
value={chiefComplaint}
|
|
844
|
+
onChange={(e) => setChiefComplaint(e.target.value)}
|
|
845
|
+
rows={2}
|
|
846
|
+
/>
|
|
847
|
+
<TextInput
|
|
848
|
+
className={styles.field}
|
|
849
|
+
id="elective-ws-vital-signs"
|
|
850
|
+
labelText="Vital signs"
|
|
851
|
+
value={vitalSigns}
|
|
852
|
+
onChange={(e) => setVitalSigns(e.target.value)}
|
|
853
|
+
/>
|
|
854
|
+
<TextArea
|
|
855
|
+
className={styles.field}
|
|
856
|
+
id="elective-ws-hpi"
|
|
857
|
+
labelText="History of present illness"
|
|
858
|
+
value={hpi}
|
|
859
|
+
onChange={(e) => setHpi(e.target.value)}
|
|
860
|
+
rows={2}
|
|
861
|
+
/>
|
|
862
|
+
<TextArea
|
|
863
|
+
className={styles.field}
|
|
864
|
+
id="elective-ws-exam"
|
|
865
|
+
labelText="Physical examination"
|
|
866
|
+
value={physicalExam}
|
|
867
|
+
onChange={(e) => setPhysicalExam(e.target.value)}
|
|
868
|
+
rows={2}
|
|
869
|
+
/>
|
|
870
|
+
<TextArea
|
|
871
|
+
className={styles.field}
|
|
872
|
+
id="elective-ws-investigations"
|
|
873
|
+
labelText="Investigation report details"
|
|
874
|
+
value={investigations}
|
|
875
|
+
onChange={(e) => setInvestigations(e.target.value)}
|
|
876
|
+
rows={2}
|
|
877
|
+
/>
|
|
878
|
+
<div className={styles.row}>
|
|
879
|
+
<Dropdown
|
|
880
|
+
id="elective-ws-anaesthesia"
|
|
881
|
+
titleText="Type of anaesthesia"
|
|
882
|
+
label="Select"
|
|
883
|
+
items={ANAESTHESIA}
|
|
884
|
+
selectedItem={anaesthesia || null}
|
|
885
|
+
onChange={({ selectedItem }) => setAnaesthesia(selectedItem ?? '')}
|
|
886
|
+
/>
|
|
887
|
+
<div className={styles.dateField}>
|
|
888
|
+
<DatePicker
|
|
889
|
+
datePickerType="single"
|
|
890
|
+
dateFormat="d/m/Y"
|
|
891
|
+
value={surgeryDate ?? undefined}
|
|
892
|
+
onChange={(dates: Date[]) => setSurgeryDate(dates?.[0] ?? null)}
|
|
893
|
+
>
|
|
894
|
+
<DatePickerInput
|
|
895
|
+
id="elective-ws-surgery-date"
|
|
896
|
+
labelText="Surgery date"
|
|
897
|
+
placeholder="dd/mm/yyyy"
|
|
898
|
+
/>
|
|
899
|
+
</DatePicker>
|
|
900
|
+
</div>
|
|
901
|
+
</div>
|
|
902
|
+
<div className={styles.row}>
|
|
903
|
+
<Checkbox
|
|
904
|
+
id="elective-ws-related-employment"
|
|
905
|
+
labelText="Related to employment"
|
|
906
|
+
checked={relatedToEmployment}
|
|
907
|
+
onChange={(_, { checked }) => setRelatedToEmployment(checked)}
|
|
908
|
+
/>
|
|
909
|
+
<Checkbox
|
|
910
|
+
id="elective-ws-related-accident"
|
|
911
|
+
labelText="Related to auto/other accident"
|
|
912
|
+
checked={relatedToAccident}
|
|
913
|
+
onChange={(_, { checked }) => setRelatedToAccident(checked)}
|
|
914
|
+
/>
|
|
915
|
+
<Checkbox
|
|
916
|
+
id="elective-ws-surgical-co-insured"
|
|
917
|
+
labelText="Is co-insured"
|
|
918
|
+
checked={isCoInsured}
|
|
919
|
+
onChange={(_, { checked }) => setIsCoInsured(checked)}
|
|
920
|
+
/>
|
|
921
|
+
</div>
|
|
922
|
+
{isCoInsured ? (
|
|
923
|
+
<TextArea
|
|
924
|
+
className={styles.field}
|
|
925
|
+
id="elective-ws-co-insurance-details"
|
|
926
|
+
labelText="Co-insurance details"
|
|
927
|
+
value={coInsuranceDetails}
|
|
928
|
+
onChange={(e) => setCoInsuranceDetails(e.target.value)}
|
|
929
|
+
rows={2}
|
|
930
|
+
/>
|
|
931
|
+
) : null}
|
|
932
|
+
</section>
|
|
933
|
+
) : null}
|
|
934
|
+
|
|
935
|
+
{specialty.requiresRenalPreauth ? (
|
|
936
|
+
<section className={styles.section}>
|
|
937
|
+
<h5>Renal preauth</h5>
|
|
938
|
+
<div className={styles.row}>
|
|
939
|
+
<TextInput
|
|
940
|
+
id="elective-ws-sessions-required"
|
|
941
|
+
labelText="Number of sessions required"
|
|
942
|
+
value={sessionsRequired}
|
|
943
|
+
onChange={(e) => setSessionsRequired(e.target.value)}
|
|
944
|
+
/>
|
|
945
|
+
<TextInput
|
|
946
|
+
id="elective-ws-cost-per-session"
|
|
947
|
+
labelText="Cost per session"
|
|
948
|
+
value={costPerSession}
|
|
949
|
+
onChange={(e) => setCostPerSession(e.target.value)}
|
|
950
|
+
/>
|
|
951
|
+
<Dropdown
|
|
952
|
+
id="elective-ws-frequency"
|
|
953
|
+
titleText="Frequency of sessions"
|
|
954
|
+
label="Select"
|
|
955
|
+
items={FREQUENCY}
|
|
956
|
+
selectedItem={frequency || null}
|
|
957
|
+
onChange={({ selectedItem }) => setFrequency(selectedItem ?? '')}
|
|
958
|
+
/>
|
|
959
|
+
</div>
|
|
960
|
+
<TextArea
|
|
961
|
+
className={styles.field}
|
|
962
|
+
id="elective-ws-renal-indications"
|
|
963
|
+
{...clinicalIndicationsFieldProps}
|
|
964
|
+
/>
|
|
965
|
+
<div className={styles.row}>
|
|
966
|
+
<div className={styles.dateField}>
|
|
967
|
+
<DatePicker
|
|
968
|
+
datePickerType="single"
|
|
969
|
+
dateFormat="d/m/Y"
|
|
970
|
+
value={startDate ?? undefined}
|
|
971
|
+
onChange={(dates: Date[]) => setStartDate(dates?.[0] ?? null)}
|
|
972
|
+
>
|
|
973
|
+
<DatePickerInput
|
|
974
|
+
id="elective-ws-renal-start"
|
|
975
|
+
labelText="Start date"
|
|
976
|
+
placeholder="dd/mm/yyyy"
|
|
977
|
+
/>
|
|
978
|
+
</DatePicker>
|
|
979
|
+
</div>
|
|
980
|
+
<Checkbox
|
|
981
|
+
id="elective-ws-renal-co-insured"
|
|
982
|
+
labelText="Is co-insured"
|
|
983
|
+
checked={isCoInsured}
|
|
984
|
+
onChange={(_, { checked }) => setIsCoInsured(checked)}
|
|
985
|
+
/>
|
|
986
|
+
</div>
|
|
987
|
+
{isCoInsured ? (
|
|
988
|
+
<TextArea
|
|
989
|
+
className={styles.field}
|
|
990
|
+
id="elective-ws-renal-co-insurance-details"
|
|
991
|
+
labelText="Co-insurance details"
|
|
992
|
+
value={coInsuranceDetails}
|
|
993
|
+
onChange={(e) => setCoInsuranceDetails(e.target.value)}
|
|
994
|
+
rows={2}
|
|
995
|
+
/>
|
|
996
|
+
) : null}
|
|
997
|
+
</section>
|
|
998
|
+
) : null}
|
|
999
|
+
|
|
1000
|
+
{specialty.requiresOpticalPreauth ? (
|
|
1001
|
+
<section className={styles.section}>
|
|
1002
|
+
<h5>Optical preauth</h5>
|
|
1003
|
+
<TextArea
|
|
1004
|
+
className={styles.field}
|
|
1005
|
+
id="elective-ws-optical-indications"
|
|
1006
|
+
{...clinicalIndicationsFieldProps}
|
|
1007
|
+
/>
|
|
1008
|
+
<TextArea
|
|
1009
|
+
className={styles.field}
|
|
1010
|
+
id="elective-ws-necessity"
|
|
1011
|
+
labelText="Necessity of service"
|
|
1012
|
+
value={necessity}
|
|
1013
|
+
onChange={(e) => setNecessity(e.target.value)}
|
|
1014
|
+
rows={2}
|
|
1015
|
+
/>
|
|
1016
|
+
<div className={styles.row}>
|
|
1017
|
+
<Dropdown
|
|
1018
|
+
id="elective-ws-lens-rx"
|
|
1019
|
+
titleText="Lens prescription"
|
|
1020
|
+
label="Select"
|
|
1021
|
+
items={LENS}
|
|
1022
|
+
selectedItem={lensPrescription || null}
|
|
1023
|
+
onChange={({ selectedItem }) => setLensPrescription(selectedItem ?? '')}
|
|
1024
|
+
/>
|
|
1025
|
+
<Dropdown
|
|
1026
|
+
id="elective-ws-new-or-repl"
|
|
1027
|
+
titleText="New or replacement"
|
|
1028
|
+
label="Select"
|
|
1029
|
+
items={NEW_OR_REPL}
|
|
1030
|
+
selectedItem={newOrReplacement || null}
|
|
1031
|
+
onChange={({ selectedItem }) => setNewOrReplacement(selectedItem ?? '')}
|
|
1032
|
+
/>
|
|
1033
|
+
</div>
|
|
1034
|
+
<div className={styles.row}>
|
|
1035
|
+
<TextInput
|
|
1036
|
+
id="elective-ws-lens-amount"
|
|
1037
|
+
labelText="Lens amount"
|
|
1038
|
+
value={lensAmount}
|
|
1039
|
+
onChange={(e) => setLensAmount(e.target.value)}
|
|
1040
|
+
/>
|
|
1041
|
+
<TextInput
|
|
1042
|
+
id="elective-ws-eye-exam-amount"
|
|
1043
|
+
labelText="Eye examination amount"
|
|
1044
|
+
value={eyeExamAmount}
|
|
1045
|
+
onChange={(e) => setEyeExamAmount(e.target.value)}
|
|
1046
|
+
/>
|
|
1047
|
+
<TextInput
|
|
1048
|
+
id="elective-ws-frame-amount"
|
|
1049
|
+
labelText="Frame amount"
|
|
1050
|
+
value={frameAmount}
|
|
1051
|
+
onChange={(e) => setFrameAmount(e.target.value)}
|
|
1052
|
+
/>
|
|
1053
|
+
</div>
|
|
1054
|
+
</section>
|
|
1055
|
+
) : null}
|
|
1056
|
+
|
|
1057
|
+
{specialty.requiresOncologyPreauth ? (
|
|
1058
|
+
<section className={styles.section}>
|
|
1059
|
+
<h5>Oncology preauth</h5>
|
|
1060
|
+
<div className={styles.row}>
|
|
1061
|
+
<Dropdown
|
|
1062
|
+
id="elective-ws-carcinoma-staging"
|
|
1063
|
+
titleText="Carcinoma staging"
|
|
1064
|
+
label="Select"
|
|
1065
|
+
items={STAGING}
|
|
1066
|
+
selectedItem={carcinomaStaging || null}
|
|
1067
|
+
onChange={({ selectedItem }) => setCarcinomaStaging(selectedItem ?? '')}
|
|
1068
|
+
/>
|
|
1069
|
+
<Dropdown
|
|
1070
|
+
id="elective-ws-metastases"
|
|
1071
|
+
titleText="Metastases"
|
|
1072
|
+
label="Select"
|
|
1073
|
+
items={METASTASES}
|
|
1074
|
+
selectedItem={metastases || null}
|
|
1075
|
+
onChange={({ selectedItem }) => setMetastases(selectedItem ?? '')}
|
|
1076
|
+
/>
|
|
1077
|
+
<Dropdown
|
|
1078
|
+
id="elective-ws-treatment-setting"
|
|
1079
|
+
titleText="Treatment setting"
|
|
1080
|
+
label="Select"
|
|
1081
|
+
items={TREATMENT}
|
|
1082
|
+
selectedItem={treatmentSetting || null}
|
|
1083
|
+
onChange={({ selectedItem }) => setTreatmentSetting(selectedItem ?? '')}
|
|
1084
|
+
/>
|
|
1085
|
+
</div>
|
|
1086
|
+
<TextArea
|
|
1087
|
+
className={styles.field}
|
|
1088
|
+
id="elective-ws-comorbidity"
|
|
1089
|
+
labelText="Comorbidity"
|
|
1090
|
+
value={comorbidity}
|
|
1091
|
+
onChange={(e) => setComorbidity(e.target.value)}
|
|
1092
|
+
rows={2}
|
|
1093
|
+
/>
|
|
1094
|
+
<TextArea
|
|
1095
|
+
className={styles.field}
|
|
1096
|
+
id="elective-ws-progress-report"
|
|
1097
|
+
labelText="Progress report"
|
|
1098
|
+
value={progressReport}
|
|
1099
|
+
onChange={(e) => setProgressReport(e.target.value)}
|
|
1100
|
+
rows={2}
|
|
1101
|
+
/>
|
|
1102
|
+
<div className={styles.row}>
|
|
1103
|
+
<div className={styles.dateField}>
|
|
1104
|
+
<DatePicker
|
|
1105
|
+
datePickerType="single"
|
|
1106
|
+
dateFormat="d/m/Y"
|
|
1107
|
+
value={startDate ?? undefined}
|
|
1108
|
+
onChange={(dates: Date[]) => setStartDate(dates?.[0] ?? null)}
|
|
1109
|
+
>
|
|
1110
|
+
<DatePickerInput
|
|
1111
|
+
id="elective-ws-oncology-start"
|
|
1112
|
+
labelText="Start date"
|
|
1113
|
+
placeholder="dd/mm/yyyy"
|
|
1114
|
+
/>
|
|
1115
|
+
</DatePicker>
|
|
1116
|
+
</div>
|
|
1117
|
+
</div>
|
|
1118
|
+
<div className={styles.row}>
|
|
1119
|
+
<TextInput
|
|
1120
|
+
id="elective-ws-onc-sessions"
|
|
1121
|
+
labelText="Number of sessions required"
|
|
1122
|
+
value={sessionsRequired}
|
|
1123
|
+
onChange={(e) => setSessionsRequired(e.target.value)}
|
|
1124
|
+
/>
|
|
1125
|
+
<TextInput
|
|
1126
|
+
id="elective-ws-onc-cost"
|
|
1127
|
+
labelText="Cost per session"
|
|
1128
|
+
value={costPerSession}
|
|
1129
|
+
onChange={(e) => setCostPerSession(e.target.value)}
|
|
1130
|
+
/>
|
|
1131
|
+
<Checkbox
|
|
1132
|
+
id="elective-ws-onc-co-insured"
|
|
1133
|
+
labelText="Is co-insured"
|
|
1134
|
+
checked={isCoInsured}
|
|
1135
|
+
onChange={(_, { checked }) => setIsCoInsured(checked)}
|
|
1136
|
+
/>
|
|
1137
|
+
</div>
|
|
1138
|
+
{isCoInsured ? (
|
|
1139
|
+
<TextArea
|
|
1140
|
+
className={styles.field}
|
|
1141
|
+
id="elective-ws-onc-co-insurance-details"
|
|
1142
|
+
labelText="Co-insurance details"
|
|
1143
|
+
value={coInsuranceDetails}
|
|
1144
|
+
onChange={(e) => setCoInsuranceDetails(e.target.value)}
|
|
1145
|
+
rows={2}
|
|
1146
|
+
/>
|
|
1147
|
+
) : null}
|
|
1148
|
+
</section>
|
|
1149
|
+
) : null}
|
|
1150
|
+
|
|
1151
|
+
{specialty.requiresRadiologyPreauth ? (
|
|
1152
|
+
<section className={styles.section}>
|
|
1153
|
+
<h5>Imaging / radiology preauth</h5>
|
|
1154
|
+
<TextArea
|
|
1155
|
+
className={styles.field}
|
|
1156
|
+
id="elective-ws-imaging-indications"
|
|
1157
|
+
{...clinicalIndicationsFieldProps}
|
|
1158
|
+
/>
|
|
1159
|
+
</section>
|
|
1160
|
+
) : null}
|
|
1161
|
+
</>
|
|
1162
|
+
) : null}
|
|
1163
|
+
</div>
|
|
1164
|
+
|
|
1165
|
+
<ButtonSet className={styles.buttonSet}>
|
|
1166
|
+
<Button kind="secondary" onClick={() => void closeWorkspace()}>
|
|
1167
|
+
Cancel
|
|
1168
|
+
</Button>
|
|
1169
|
+
<Button kind="primary" type="submit" disabled={!canSubmit || loadingEdit}>
|
|
1170
|
+
{submitting
|
|
1171
|
+
? isEdit
|
|
1172
|
+
? 'Updating…'
|
|
1173
|
+
: 'Saving…'
|
|
1174
|
+
: isEdit
|
|
1175
|
+
? 'Update elective request'
|
|
1176
|
+
: 'Save elective request'}
|
|
1177
|
+
</Button>
|
|
1178
|
+
</ButtonSet>
|
|
1179
|
+
</Form>
|
|
1180
|
+
</Workspace2>
|
|
1181
|
+
);
|
|
1182
|
+
};
|
|
1183
|
+
|
|
1184
|
+
export default ElectivePreauthRequestWorkspace;
|