diff --git a/CHANGELOG.md b/CHANGELOG.md index d93757ece0..9d099bce03 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ About changelog [here](https://keepachangelog.com/en/1.0.0/) - Log users' activity to file by specifying `USERS_ACTIVITY_LOG_PATH` parameter in app config - `Mean MT coverage`, `Mean chrom 14 coverage` and `Estimated mtDNA copy number` on MT coverage file from chanjo2 if available - In ClinVar multistep form, preselect ACMG criteria according to the variant's ACMG classification, if available +- Subject id search from caseS page (supporting multiple sample types e.g.) - adding indexes to speed up caseS queries ### Changed - Documentation for OMICS variants and updating a case - Include both creation and deletion dates in gene panels pages diff --git a/scout/adapter/mongo/case.py b/scout/adapter/mongo/case.py index fa52f78d8a..dcaabd5592 100644 --- a/scout/adapter/mongo/case.py +++ b/scout/adapter/mongo/case.py @@ -167,6 +167,7 @@ def _set_case_name_query(self, query: Dict[str, Any], query_term: str): query["$or"] = [ {"display_name": case_name_regex}, {"individuals.display_name": case_name_regex}, + {"individuals.subject_id": case_name_regex}, {"_id": case_name_regex}, ] diff --git a/scout/constants/indexes.py b/scout/constants/indexes.py index 1081923840..0318bfc14c 100644 --- a/scout/constants/indexes.py +++ b/scout/constants/indexes.py @@ -145,11 +145,18 @@ "case": [ IndexModel([("synopsis", TEXT)], default_language="english", name="synopsis_text"), IndexModel([("causatives", ASCENDING)], name="causatives"), + IndexModel([("suspects", ASCENDING)], name="suspects"), IndexModel( [("collaborators", ASCENDING), ("status", ASCENDING), ("updated_at", ASCENDING)], name="collaborators_status_updated_at", ), - IndexModel([("owner", ASCENDING), ("display_name", ASCENDING)], name="owner_display_name"), + IndexModel( + [ + ("owner", ASCENDING), + ("display_name", ASCENDING), + ], + name="owner_display_name", + ), ], "managed_variant": [ IndexModel(