Maintain diagnoses, procedures and service lines¶
A user creates, updates and deletes diagnoses, procedures and service lines on a bill, with code validation and a running services total.
Trigger and screens¶
| Item | Detail |
|---|---|
| Trigger | User edits diagnoses, procedures or service lines in the Bill entry grids |
| Screens | Bill entry |
| Tables | Not traced** |
Steps¶
- Each grid reads its rows: DiagnosisGrid.EditingCustom_Read, ProcedureGrid.EditingCustom_Read and ServiceGrid.EditingPopup_Read. Procedure types are mapped to Principal or Other (BR-SCR-010).
- The reads call
IBillDiagnosisService.GetDiagnoses,IBillProcedureService.GetProceduresandIBillServiceService.GetServices. - When the user keys a code, the screen validates it through DiagnosisGrid.ValidateDiagnosisCode, ProcedureGrid.ValidateProcedureCode or ServiceGrid.ValidateServiceCode.
- The validations call
IDiagnosisService.GetDiagnosis,IProcedureService.GetProcedureandIBillServiceService.GetServiceTypeCode. - Create, update and delete use the
EditingCustom_*andEditingPopup_*actions of each grid, for example ServiceGrid.EditingPopup_Create. Each action calls the Create, Update or Delete method of the matching bill service, and errors are returned throughModelStateWrapper. - The Add service and Edit service windows use the prescribing provider dropdown from ServiceGrid.GetPrescribingProviderCodes.
- After each service change the screen refreshes Services Total from ServiceGrid.GetChargedServicesTotal; the value feeds the submit comparison (BR-SCR-004).
- The Clear actions, DiagnosisGrid.ClearDiagnosesCodes and ProcedureGrid.ClearProcedureCodes, remove all rows through GET requests.
Origin: The reads, validations, changes and total in steps 1–5 are the controller-side calls to
IBillDiagnosisService,IBillProcedureService,IBillServiceService,IDiagnosisServiceandIProcedureServiceinSAIF.SAIFCode.Core†. Per the Legends CLI RAG service,SAIF.SAIFCode.Coreis a contracts-only library and these interfaces' implementations live outside it (most likelySAIF.Services), which this run did not trace*.
Process flow¶
The diagram shows the main path and its decision points.
flowchart TD
A["Grid read"] --> B["User adds or edits a row"]
B --> C["Validate code"]
C --> D{"Code valid?"}
D -->|"No"| X["Show validation message"]
D -->|"Yes"| E["Create or update action"]
E --> F{"Model errors?"}
F -->|"Yes"| X
F -->|"No"| G["Refresh grid and<br>charged services total"]
Failure and edge-case behavior¶
- Invalid codes and model errors are returned to the grid and the row is not saved.
- These endpoints require only an authenticated user and have no role check; see Tech debt.
- Clear deletes data through GET.
Related documentation¶
- Operations and processes
- Business rules
- Hosted endpoints
- Data model
- Architecture
- Tech debt
- Screen catalog
Note: Statements marked with
†are derived from dependency library documentation via the Legends CLI. Statements marked with*were inferred from code structure or contextual evidence. Statements marked with**could not be confirmed; treat as unknown until verified.
Sources¶
- ClaimBillEntry/Controllers/DiagnosisGridController.cs
- ClaimBillEntry/Controllers/ProcedureGridController.cs
- ClaimBillEntry/Controllers/ServiceGridController.cs
- ClaimBillEntry/Classes/AutoMapperBootStrapper.cs