Hello all,
I recently have been working on the JIRA ticket CB-203. You will find in the comments that I have found the reason behind this bug is the new Cohort Builder does not return dead patients with a null death date. This is a behavior that is different from the old cohort builder which returns all dead patients, regardless of whether or not their death date is null. After looking into this, the problem stems from the diedDuringPeriod search parameters setting the date to the current date. When this is sent to the reporting module it only considers patients with death dates before the current day. My first instinct to fix this was to set the date of death to NULL instead of the current date. However, if the death date that is passed in the search parameters is passed as NULL, all patients are returned. This is not the behavior I would expect from the CohortQueryDAO implementation of getPatientsHavingDiedBetweenDates. To go about fixing this issue, I think unit tests should be added for the CohortQueryService to test the functionality of this method because there are currently none. I believe the problem either lies there or somewhere in the integration between the Builtin Library definition and the BirthAndDeathCohortDefinition.
Jasmine