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¶
- The user opens the Search screen (
Search.Index) and enters criteria. - The action loads the bill type and bill status lists with
IBillEntryService.GetBillTypeCodesandGetBillStatusCodes. - It loads the "Search" grid preferences and pre-fills the claim number from the current web-context value.
- The grid calls Search.GetBills.
- 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
ApplyValidationis set. - The action builds a
BillEntrySearchCriteriaand callsIBillQueryService.GetBillEntryBillsByCriteria. - The action maps the returned items to
SearchResultItemViewModelrows 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
IBillEntryServiceandIBillQueryServiceinSAIF.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*. 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 toEntry/Index/{billId}and the Bill entry screen loads it. 1.Entry.Indexloads the diagnosis and procedure type lists throughIBillDiagnosisService.GetDiagnosisTypeCodesandIBillProcedureService.GetPrimaryProcedureCodes, and reads the queue count withIBillEntryService.GetClaimBillQueueRemainingCountand the bill type codes withIBillEntryService.GetBillTypeCodes. 2. It setsCanDiscardBillfrom theCBEDiscardBillpermission (BR-SCR-006). 3. The Bill entry screen calls Entry.GetBill, which callsIBillEntryService.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 callsIClaimInformationService.GetClaimIdandGetClaimSecurity. For a conflict claim it requires theConflictClaimpermission (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,IBillEntryServiceandIClaimInformationServiceinSAIF.SAIFCode.Core† (ClaimBillEntry/Controllers/EntryController.cs); 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*. Step 5.5's mapping is confirmed inClaimBillEntry/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).
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/SearchController.cs
- ClaimBillEntry/Controllers/BaseController.cs
- ClaimBillEntry/Controllers/EntryController.cs
- ClaimBillEntry/Classes/AutoMapperBootStrapper.cs
- ClaimBillEntry/js/ClaimBillEntry.search.js