From 62792e4568035aa12f7c4b1c1e54b62a48cba935 Mon Sep 17 00:00:00 2001 From: George Murad Date: Wed, 15 Nov 2023 13:01:09 -0500 Subject: [PATCH 1/3] Remove 'Scan done' field from 'Start visit' menu --- modules/next_stage/templates/form_next_stage.tpl | 6 ------ 1 file changed, 6 deletions(-) diff --git a/modules/next_stage/templates/form_next_stage.tpl b/modules/next_stage/templates/form_next_stage.tpl index 9847f17c1b6..c5cce822353 100644 --- a/modules/next_stage/templates/form_next_stage.tpl +++ b/modules/next_stage/templates/form_next_stage.tpl @@ -26,12 +26,6 @@ {/if} - {if $form.scan_done.html != ""} -
- -
{$form.scan_done.html}
-
- {/if}
From 0eedc72930a914de01b18da0440cb73c7d5b416b Mon Sep 17 00:00:00 2001 From: George Murad Date: Thu, 16 Nov 2023 12:56:37 -0500 Subject: [PATCH 2/3] Remove scan done sections from next_stageTest.php --- modules/next_stage/test/next_stageTest.php | 8 -------- 1 file changed, 8 deletions(-) diff --git a/modules/next_stage/test/next_stageTest.php b/modules/next_stage/test/next_stageTest.php index 528e6c52c15..de175644391 100644 --- a/modules/next_stage/test/next_stageTest.php +++ b/modules/next_stage/test/next_stageTest.php @@ -158,10 +158,6 @@ function testNextStageDateError() $this->webDriver->executescript( "document.getElementsByClassName('input-date')[1].value='2015-01-02'" ); - $scanDone = $this->safeFindElement( - WebDriverBy::Name("scan_done") - ); - $scanDone->sendKeys("No"); $Cohort = $this->safeFindElement( WebDriverBy::Name("CohortID") @@ -196,10 +192,6 @@ function testNextStageSuccess() $this->webDriver->executescript( "document.getElementsByClassName('input-date')[1].value='2015-01-01'" ); - $scanDone = $this->safeFindElement( - WebDriverBy::Name("scan_done") - ); - $scanDone->sendKeys("No"); $Cohort = $this->safeFindElement( WebDriverBy::Name("CohortID") From 2e60a9aad8747218391afb2cb2b0b43fbc1f0906 Mon Sep 17 00:00:00 2001 From: George Murad Date: Thu, 16 Nov 2023 14:25:38 -0500 Subject: [PATCH 3/3] Remove scan done from next_stage.class.inc --- modules/next_stage/php/next_stage.class.inc | 28 --------------------- 1 file changed, 28 deletions(-) diff --git a/modules/next_stage/php/next_stage.class.inc b/modules/next_stage/php/next_stage.class.inc index 6bce90c1757..1d6bfeaf60f 100644 --- a/modules/next_stage/php/next_stage.class.inc +++ b/modules/next_stage/php/next_stage.class.inc @@ -91,15 +91,6 @@ class Next_Stage extends \NDB_Form ); } - // set scan done if applicable - if (isset($values['scan_done'])) { - $timePoint->setData( - [ - 'Scan_done' => $values['scan_done'], - ] - ); - } - // create a new battery object && new battery $battery = new \NDB_BVL_Battery; $candidate =& \Candidate::singleton($timePoint->getCandID()); @@ -163,20 +154,6 @@ class Next_Stage extends \NDB_Form $stage = $timePoint->getNextStage(); $this->tpl_data['stage'] = $stage; - // add form elements - if ($stage == 'Visit' && $config->getSetting('useScanDone')!='false') { - $this->addSelect( - 'scan_done', - 'Scan Done', - [ - '' => null, - 'Y' => 'Yes', - 'N' => 'No', - ] - ); - $this->addRule('scan_done', 'Scan done is required', 'required'); - } - $dateAttributes = ['class' => 'form-control input-sm input-date']; // add dates @@ -253,11 +230,6 @@ class Next_Stage extends \NDB_Form // must be > DOB - ONLY WHEN starting Visit stage $date = $values['date1'] ?? ''; - if (empty($values['scan_done']) - && $config->getSetting('useScanDone')!='false' - ) { - $errors['scan_done'] = 'Scan done is required'; - } if ($config->getSetting('useScreening')=="true" && $config->getSetting('screeningAfterVisit')!="true" && strcmp($date, $timePoint->getData('Date_screening')) < 0