@@ -850,14 +850,14 @@ func TestErrorForRetrieveDataBySourceIdAndCohortIdAndConceptIdsOrderedByPersonId
850
850
tests .FixSomething (models .Results , "cohort" , "cohort_definition_id" )
851
851
}
852
852
853
- func TestRetrieveCohortOverlapStatsWithoutFilteringOnConceptValue (t * testing.T ) {
853
+ func TestRetrieveCohortOverlapStats (t * testing.T ) {
854
854
// Tests if we get the expected overlap
855
855
setUp (t )
856
856
caseCohortId := secondLargestCohort .Id
857
857
controlCohortId := secondLargestCohort .Id // to ensure we get some overlap, just repeat the same here...
858
858
otherFilterConceptIds := []int64 {}
859
859
filterCohortPairs := []utils.CustomDichotomousVariableDef {}
860
- stats , _ := cohortDataModel .RetrieveCohortOverlapStatsWithoutFilteringOnConceptValue (testSourceId , caseCohortId , controlCohortId ,
860
+ stats , _ := cohortDataModel .RetrieveCohortOverlapStats (testSourceId , caseCohortId , controlCohortId ,
861
861
otherFilterConceptIds , filterCohortPairs )
862
862
// basic test:
863
863
if stats .CaseControlOverlap != int64 (secondLargestCohort .CohortSize ) {
@@ -874,7 +874,7 @@ func TestRetrieveCohortOverlapStatsWithoutFilteringOnConceptValue(t *testing.T)
874
874
ProvidedName : "test" },
875
875
}
876
876
// then we expect overlap of 5 for extendedCopyOfSecondLargestCohort and largestCohort:
877
- stats , _ = cohortDataModel .RetrieveCohortOverlapStatsWithoutFilteringOnConceptValue (testSourceId , caseCohortId , controlCohortId ,
877
+ stats , _ = cohortDataModel .RetrieveCohortOverlapStats (testSourceId , caseCohortId , controlCohortId ,
878
878
otherFilterConceptIds , filterCohortPairs )
879
879
if stats .CaseControlOverlap != 5 {
880
880
t .Errorf ("Expected nr persons to be %d, found %d" , 5 , stats .CaseControlOverlap )
@@ -887,7 +887,7 @@ func TestRetrieveCohortOverlapStatsWithoutFilteringOnConceptValue(t *testing.T)
887
887
otherFilterConceptIds = []int64 {histogramConceptId } // extra filter, to cover this part of the code...
888
888
// then we expect overlap of 5 for extendedCopyOfSecondLargestCohort and largestCohort (the filter on histogramConceptId should not matter
889
889
// since all in largestCohort have an observation for this concept id):
890
- stats2 , _ := cohortDataModel .RetrieveCohortOverlapStatsWithoutFilteringOnConceptValue (testSourceId , caseCohortId , controlCohortId ,
890
+ stats2 , _ := cohortDataModel .RetrieveCohortOverlapStats (testSourceId , caseCohortId , controlCohortId ,
891
891
otherFilterConceptIds , filterCohortPairs )
892
892
if stats2 .CaseControlOverlap != stats .CaseControlOverlap {
893
893
t .Errorf ("Expected nr persons to be %d, found %d" , stats .CaseControlOverlap , stats2 .CaseControlOverlap )
@@ -898,7 +898,7 @@ func TestRetrieveCohortOverlapStatsWithoutFilteringOnConceptValue(t *testing.T)
898
898
otherFilterConceptIds = []int64 {histogramConceptId , dummyContinuousConceptId }
899
899
// all other arguments are the same as test above, and we expect overlap of 0, showing the otherFilterConceptIds
900
900
// had the expected effect:
901
- stats3 , _ := cohortDataModel .RetrieveCohortOverlapStatsWithoutFilteringOnConceptValue (testSourceId , caseCohortId , controlCohortId ,
901
+ stats3 , _ := cohortDataModel .RetrieveCohortOverlapStats (testSourceId , caseCohortId , controlCohortId ,
902
902
otherFilterConceptIds , filterCohortPairs )
903
903
if stats3 .CaseControlOverlap != 0 {
904
904
t .Errorf ("Expected nr persons to be 0, found %d" , stats3 .CaseControlOverlap )
0 commit comments