Skip to content

Commit

Permalink
Extended appointment-episode filters test for #378
Browse files Browse the repository at this point in the history
  • Loading branch information
mddejong committed Nov 8, 2018
1 parent 3c1fc8e commit 606bf75
Show file tree
Hide file tree
Showing 3 changed files with 101 additions and 14 deletions.
4 changes: 2 additions & 2 deletions tests/classes/Gems/Agenda/AppointmentFilterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public function performFilterTests(array $expectedAppFilters, $test)

// Prepare for matchEpisode() test
if ($appointment->hasEpisode()) {
$expectedEpiFilters[$appointment->getEpisodeId()][] = $filterId;
$expectedEpiFilters[$appointment->getEpisodeId()][$filterId] = $filterId;
}
} else {
$this->fail("Unexepected non-filter return for appointment in $test.");
Expand Down Expand Up @@ -157,7 +157,7 @@ public function performFilterTests(array $expectedAppFilters, $test)
foreach ($filters as $filter) {
if ($filter instanceof AppointmentFilterInterface) {
$filterId = $filter->getFilterId();
$resultsEpiFilters[$epiId][] = $filterId;
$resultsEpiFilters[$epiId][$filterId] = $filterId;

if (! $testFilters[$filterId] instanceof AppointmentFilterInterface) {
if (0 == $testFilters[$filterId]) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ gems__appointments:
gap_id_appointment: 2
gap_id_user: '1'
gap_id_organization: 1
gap_id_episode:
gap_id_episode: 1
gap_manual_edit: 1
gap_code: A
gap_status: AC
Expand All @@ -148,7 +148,7 @@ gems__appointments:
gap_id_appointment: 3
gap_id_user: '1'
gap_id_organization: 1
gap_id_episode:
gap_id_episode: 1
gap_manual_edit: 1
gap_code: A
gap_status: AC
Expand All @@ -170,7 +170,7 @@ gems__appointments:
gap_id_appointment: 4
gap_id_user: '1'
gap_id_organization: 1
gap_id_episode:
gap_id_episode: 2
gap_manual_edit: 1
gap_code: A
gap_status: AC
Expand All @@ -188,6 +188,41 @@ gems__appointments:
gap_changed_by: '1'
gap_created: '2017-08-09'
gap_created_by: '1'
gems__episodes_of_care:
-
gec_episode_of_care_id: 1
gec_id_user: '1'
gec_id_organization: 1
gec_source: 'manual'
gec_manual_edit: 1
gec_status: 'A'
gec_startdate: '2017-08-09'
gec_enddate:
gec_id_attended_by: 1
gec_subject: 'Test app 2 & 3'
gec_comment:
gec_diagnosis:
gec_changed: '2017-08-09'
gec_changed_by: '1'
gec_created: '2017-08-09'
gec_created_by: '1'
-
gec_episode_of_care_id: 2
gec_id_user: '1'
gec_id_organization: 1
gec_source: 'manual'
gec_manual_edit: 1
gec_status: 'A'
gec_startdate: '2017-08-09'
gec_enddate:
gec_id_attended_by: 1
gec_subject: 'Test app 4'
gec_comment:
gec_diagnosis:
gec_changed: '2017-08-09'
gec_changed_by: '1'
gec_created: '2017-08-09'
gec_created_by: '1'
gems__locations:
-
glo_id_location: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ gems__appointments:
gap_id_appointment: 5
gap_id_user: '1'
gap_id_organization: 1
gap_id_episode:
gap_id_episode: 1
gap_manual_edit: 1
gap_code: A
gap_status: AC
Expand All @@ -374,7 +374,7 @@ gems__appointments:
gap_id_appointment: 6
gap_id_user: '1'
gap_id_organization: 1
gap_id_episode:
gap_id_episode: 1
gap_manual_edit: 1
gap_code: A
gap_status: AC
Expand All @@ -396,7 +396,7 @@ gems__appointments:
gap_id_appointment: 7
gap_id_user: '1'
gap_id_organization: 1
gap_id_episode:
gap_id_episode: 1
gap_manual_edit: 1
gap_code: A
gap_status: AC
Expand All @@ -418,7 +418,7 @@ gems__appointments:
gap_id_appointment: 8
gap_id_user: '1'
gap_id_organization: 1
gap_id_episode:
gap_id_episode: 2
gap_manual_edit: 1
gap_code: A
gap_status: AC
Expand All @@ -440,7 +440,7 @@ gems__appointments:
gap_id_appointment: 9
gap_id_user: '1'
gap_id_organization: 1
gap_id_episode:
gap_id_episode: 2
gap_manual_edit: 1
gap_code: A
gap_status: AC
Expand All @@ -462,7 +462,7 @@ gems__appointments:
gap_id_appointment: 10
gap_id_user: '1'
gap_id_organization: 1
gap_id_episode:
gap_id_episode: 2
gap_manual_edit: 1
gap_code: A
gap_status: AC
Expand All @@ -484,7 +484,7 @@ gems__appointments:
gap_id_appointment: 11
gap_id_user: '1'
gap_id_organization: 1
gap_id_episode:
gap_id_episode: 3
gap_manual_edit: 1
gap_code: A
gap_status: AC
Expand All @@ -506,7 +506,7 @@ gems__appointments:
gap_id_appointment: 12
gap_id_user: '1'
gap_id_organization: 1
gap_id_episode:
gap_id_episode: 3
gap_manual_edit: 1
gap_code: A
gap_status: AC
Expand All @@ -528,7 +528,7 @@ gems__appointments:
gap_id_appointment: 13
gap_id_user: '1'
gap_id_organization: 1
gap_id_episode:
gap_id_episode: 3
gap_manual_edit: 1
gap_code: A
gap_status: AC
Expand Down Expand Up @@ -810,6 +810,58 @@ gems__appointments:
gap_changed_by: '1'
gap_created: '2017-08-09'
gap_created_by: '1'
gems__episodes_of_care:
-
gec_episode_of_care_id: 1
gec_id_user: '1'
gec_id_organization: 1
gec_source: 'manual'
gec_manual_edit: 1
gec_status: 'A'
gec_startdate: '2017-08-09'
gec_enddate:
gec_id_attended_by: 1
gec_subject: 'Test app 4, 5, 6'
gec_comment:
gec_diagnosis:
gec_changed: '2017-08-09'
gec_changed_by: '1'
gec_created: '2017-08-09'
gec_created_by: '1'
-
gec_episode_of_care_id: 2
gec_id_user: '1'
gec_id_organization: 1
gec_source: 'manual'
gec_manual_edit: 1
gec_status: 'A'
gec_startdate: '2017-08-09'
gec_enddate:
gec_id_attended_by: 1
gec_subject: 'Test app 7, 8, 9'
gec_comment:
gec_diagnosis:
gec_changed: '2017-08-09'
gec_changed_by: '1'
gec_created: '2017-08-09'
gec_created_by: '1'
-
gec_episode_of_care_id: 3
gec_id_user: '1'
gec_id_organization: 1
gec_source: 'manual'
gec_manual_edit: 1
gec_status: 'A'
gec_startdate: '2017-08-09'
gec_enddate:
gec_id_attended_by: 1
gec_subject: 'Test app 10, 11, 12'
gec_comment:
gec_diagnosis:
gec_changed: '2017-08-09'
gec_changed_by: '1'
gec_created: '2017-08-09'
gec_created_by: '1'
gems__locations:
-
glo_id_location: 1
Expand Down

0 comments on commit 606bf75

Please sign in to comment.