Skip to content

Search bills and open a result

A user searches bills by criteria, reads the result grid and opens a bill on the Bill entry screen.

Trigger and screens

Item Detail
Trigger User submits criteria on the Search screen
Screens Search, Bill entry
Tables Not traced**

Steps

  1. The user opens the Search screen (Search.Index) and enters criteria.
  2. The action loads the bill type and bill status lists with IBillEntryService.GetBillTypeCodes and GetBillStatusCodes.
  3. It loads the "Search" grid preferences and pre-fills the claim number from the current web-context value.
  4. The grid calls Search.GetBills.
  5. A search runs only when a bill id, tax id, provider id, SSN, claim number or received date is given (BR-SCR-013). Otherwise the action returns an empty result with the input-error message when ApplyValidation is set.
  6. The action builds a BillEntrySearchCriteria and calls IBillQueryService.GetBillEntryBillsByCriteria.
  7. The action maps the returned items to SearchResultItemViewModel rows with AutoMapper and returns the grid data with the secure, maximum-retrieved and no-results messages.

Origin: Steps 1.1 and 2.2 are the controller-side calls to IBillEntryService and IBillQueryService 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*. 3. Column layout is saved or cleared through BaseController.SavePreferences and BaseController.ClearPreferences. Both actions return nothing. 4. The user opens a result. The client allows only Pending, Entered, Audited or Suspended bills (BR-SCR-001). 5. The browser navigates to Entry/Index/{billId} and the Bill entry screen loads it. 1. Entry.Index loads the diagnosis and procedure type lists through IBillDiagnosisService.GetDiagnosisTypeCodes and IBillProcedureService.GetPrimaryProcedureCodes, and reads the queue count with IBillEntryService.GetClaimBillQueueRemainingCount and the bill type codes with IBillEntryService.GetBillTypeCodes. 2. It sets CanDiscardBill from the CBEDiscardBill permission (BR-SCR-006). 3. The Bill entry screen calls Entry.GetBill, which calls IBillEntryService.GetBill. A bill that is not updateable is refused with "Only Pending, Entered, Audited, or Suspended bills may be opened." (BR-SCR-001). 4. The action calls IClaimInformationService.GetClaimId and GetClaimSecurity. For a conflict claim it requires the ConflictClaim permission (BR-SCR-002). 5. The action maps the bill to the entry view model with AutoMapper and adds the queue count, and the screen displays it.

Origin: Step 5 embeds steps 5–7 of Open a bill from the inbox, which documents this same controller-side sequence in full and is executed on behalf of this operation. Steps 5.1–5.4 are the controller-side calls to IBillDiagnosisService, IBillProcedureService, IBillEntryService and IClaimInformationService in SAIF.SAIFCode.Core† (ClaimBillEntry/Controllers/EntryController.cs); 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*. Step 5.5's mapping is confirmed in ClaimBillEntry/Classes/AutoMapperBootStrapper.cs.

Process flow

The diagram shows the main path and its decision points.

flowchart TD
    A["Enter criteria"] --> B["Search.GetBills"]
    B --> C{"Qualifying criterion given?"}
    C -->|"No"| X["Input-error message"]
    C -->|"Yes"| D["Result grid"]
    D --> E{"Status openable?"}
    E -->|"No"| Y["Show status error"]
    E -->|"Yes"| F["Open Entry/Index/id"]

Failure and edge-case behavior

  • Status or type alone does not qualify, and the input-error message appears when validation is applied (BR-SCR-013).
  • Non-openable bills cannot be opened (BR-SCR-001).

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/SearchController.cs
  • ClaimBillEntry/Controllers/BaseController.cs
  • ClaimBillEntry/Controllers/EntryController.cs
  • ClaimBillEntry/Classes/AutoMapperBootStrapper.cs
  • ClaimBillEntry/js/ClaimBillEntry.search.js