diff --git a/client/src/modules/patients/registry/registry.js b/client/src/modules/patients/registry/registry.js
index e4fe74bd93..304901c5f8 100644
--- a/client/src/modules/patients/registry/registry.js
+++ b/client/src/modules/patients/registry/registry.js
@@ -17,17 +17,12 @@ function PatientRegistryController($state, Patients, Notify, AppCache,
Columns, Sorting, bhConstants, GridState, Languages, Export) {
var vm = this;
- // var filter = new Filters();
- // vm.filter = filter;
-
var cacheKey = 'PatientRegistry';
var cache = AppCache(cacheKey);
- // var FILTER_BAR_HEIGHT = bhConstants.grid.FILTER_BAR_HEIGHT;
var state;
vm.search = search;
vm.patientCard = patientCard;
- // vm.filterBarHeight = {};
vm.openColumnConfiguration = openColumnConfiguration;
vm.gridApi = {};
vm.onRemoveFilter = onRemoveFilter;
@@ -190,15 +185,6 @@ function PatientRegistryController($state, Patients, Notify, AppCache,
// startup function. Checks for cached filters and loads them. This behavior could be changed.
function startup() {
-
- // if ($state.params.filters) {
- // // Fix me, generate change dynamically
- // var change = [{ key : $state.params.filters.key, value : $state.params.filters.value }];
-
- // Patients.filters.replaceFilters(change);
- // Patients.cacheFilters();
- // }
-
load(Patients.filters.formatHTTP(true));
vm.latestViewFilters = Patients.filters.formatView();
}
diff --git a/client/src/modules/patients/registry/search.modal.html b/client/src/modules/patients/registry/search.modal.html
index 3d9d2fd695..7ce8b20c8b 100644
--- a/client/src/modules/patients/registry/search.modal.html
+++ b/client/src/modules/patients/registry/search.modal.html
@@ -25,7 +25,7 @@
-
+
diff --git a/test/end-to-end/patient/registry.search.js b/test/end-to-end/patient/registry.search.js
index f62704f733..f1592c1141 100644
--- a/test/end-to-end/patient/registry.search.js
+++ b/test/end-to-end/patient/registry.search.js
@@ -13,6 +13,7 @@ function PatientRegistrySearch() {
let filters;
const parameters = {
+ patientGroup : 'Test Patient Group 2',
name: 'Mock',
name1: 'Patient',
dateRegistrationFrom: '01/01/2015',
@@ -56,7 +57,7 @@ function PatientRegistrySearch() {
// demonstrates that filtering works
it(`should find one patient with name "${parameters.name}"`, () => {
const NUM_MATCHING = 1;
- FU.input('ModalCtrl.params.display_name', parameters.name);
+ FU.input('$ctrl.searchQueries.display_name', parameters.name);
FU.modal.submit();
expectNumberOfGridRows(NUM_MATCHING);
@@ -74,7 +75,7 @@ function PatientRegistrySearch() {
// demonstrates additive filters
it(`should find two "male" patients with name "${parameters.name1}"`, function () {
const NUM_MATCHING = 2;
- FU.input('ModalCtrl.params.display_name', parameters.name1);
+ FU.input('$ctrl.searchQueries.display_name', parameters.name1);
element(by.id('male')).click();
FU.modal.submit();
@@ -84,7 +85,7 @@ function PatientRegistrySearch() {
// demonstrates that additive + time-delimited filtering works
it(`should find one patient with name "${parameters.name1}" registered in the last week`, function () {
const NUM_MATCHING = 0;
- FU.input('ModalCtrl.params.display_name', parameters.name1);
+ FU.input('$ctrl.searchQueries.display_name', parameters.name1);
modal.switchToDefaultFilterTab();
modal.setPeriod('lastWeek');
FU.modal.submit();
@@ -92,6 +93,16 @@ function PatientRegistrySearch() {
expectNumberOfGridRows(NUM_MATCHING);
});
+ it(`should find two patient with patient group "${parameters.patientGroup}" registered in allTime`, function () {
+ const NUM_MATCHING = 2;
+ components.patientGroupSelect.set(parameters.patientGroup);
+ modal.switchToDefaultFilterTab();
+ modal.setPeriod('allTime');
+ FU.modal.submit();
+
+ expectNumberOfGridRows(NUM_MATCHING);
+ });
+
// demonstrates that sex + time-delimited filtering works
it('should find no female patients registered in the last year.', function () {
const NUM_MATCHING = 0;
@@ -129,7 +140,7 @@ function PatientRegistrySearch() {
it('should remember the cached filters', () => {
const NUM_MATCHING = 0;
element(by.id('male')).click();
- FU.input('ModalCtrl.params.display_name', 'Some Non-Existant Patient');
+ FU.input('$ctrl.searchQueries.display_name', 'Some Non-Existant Patient');
modal.switchToDefaultFilterTab();
modal.setPeriod('year');
FU.modal.submit();
diff --git a/test/end-to-end/verificationLinks/verificationLinks.spec.js b/test/end-to-end/verificationLinks/verificationLinks.spec.js
index e63d1561f6..6cf57aa2aa 100644
--- a/test/end-to-end/verificationLinks/verificationLinks.spec.js
+++ b/test/end-to-end/verificationLinks/verificationLinks.spec.js
@@ -32,7 +32,7 @@ describe('Check links', () => {
helpers.navigate('#!/patients/groups');
element.all(by.css('[class="fa fa-list"]')).get(2).click();
- expectNumberOfGridRows(2);
+ expectNumberOfGridRows(4);
});
it('Check link betwen Debtor Groups -> Patient Registry', () => {