Skip to content

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

  1. 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).
  2. The reads call IBillDiagnosisService.GetDiagnoses, IBillProcedureService.GetProcedures and IBillServiceService.GetServices.
  3. When the user keys a code, the screen validates it through DiagnosisGrid.ValidateDiagnosisCode, ProcedureGrid.ValidateProcedureCode or ServiceGrid.ValidateServiceCode.
  4. The validations call IDiagnosisService.GetDiagnosis, IProcedureService.GetProcedure and IBillServiceService.GetServiceTypeCode.
  5. Create, update and delete use the EditingCustom_* and EditingPopup_* 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 through ModelStateWrapper.
  6. The Add service and Edit service windows use the prescribing provider dropdown from ServiceGrid.GetPrescribingProviderCodes.
  7. After each service change the screen refreshes Services Total from ServiceGrid.GetChargedServicesTotal; the value feeds the submit comparison (BR-SCR-004).
  8. 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, IDiagnosisService and IProcedureService in SAIF.SAIFCode.Core†. Per the Legends CLI RAG service, SAIF.SAIFCode.Core is a contracts-only library and these interfaces' implementations live outside it (most likely SAIF.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.

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