Commit 9a7f31c
authored
[DQT] Fix visit list filtering in candidate matching (aces#10438)
## Description
Fixes a bug where DQT filters did not apply visit list criteria when
matching candidates. The `getCandidateMatches()` method was not passing
the `$visitlist` parameter to `buildQueryFromCriteria()`, and the visit
filtering logic in `buildQueryFromCriteria()` was incorrectly adding a
duplicate session table join.
## Changes
- **src/Data/Query/SQLQueryEngine.php**:
- Pass `$visitlist` parameter to `buildQueryFromCriteria()` in
`getCandidateMatches()` method
- Remove duplicate session table join from `buildQueryFromCriteria()` -
the session table is already joined by `getFieldNameFromDict()` when
querying session-scoped fields
- **modules/dataquery/php/query.class.inc**: Remove FIXME comment and
simplify visit list assignment since functionality is now verified
## Testing Instructions
1. Navigate to the Data Query Tool
2. Select fields with session scope
3. Add a filter on a parameter and select only a subset of visits (e.g.,
only "V1" and "V2")
4. Run the query
5. Verify that results only include data from the specified visits
6. Compare with results when all visits are selected - should see
different candidate counts
## Related Issues
Resolves aces#104351 parent 70e76a5 commit 9a7f31c
3 files changed
Lines changed: 14 additions & 9 deletions
File tree
- modules
- dataquery/php
- imaging_browser/php
- src/Data/Query
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
761 | 761 | | |
762 | 762 | | |
763 | 763 | | |
764 | | - | |
765 | | - | |
766 | | - | |
767 | | - | |
768 | | - | |
| 764 | + | |
769 | 765 | | |
770 | 766 | | |
771 | 767 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
375 | 375 | | |
376 | 376 | | |
377 | 377 | | |
378 | | - | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
379 | 382 | | |
380 | 383 | | |
381 | 384 | | |
| |||
392 | 395 | | |
393 | 396 | | |
394 | 397 | | |
395 | | - | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
396 | 402 | | |
397 | 403 | | |
398 | 404 | | |
| |||
544 | 550 | | |
545 | 551 | | |
546 | 552 | | |
547 | | - | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
548 | 557 | | |
549 | 558 | | |
550 | 559 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
119 | | - | |
| 119 | + | |
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
| |||
0 commit comments