Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove 'Scan done' field from 'Start visit' menu #8955

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 0 additions & 28 deletions modules/next_stage/php/next_stage.class.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
6 changes: 0 additions & 6 deletions modules/next_stage/templates/form_next_stage.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,6 @@
</div>
{/if}

{if $form.scan_done.html != ""}
<div class="form-group row">
<label class="col-sm-2">Scan Done:</label>
<div class="col-sm-4 col-md-3">{$form.scan_done.html}</div>
</div>
{/if}
<div class="form-group row">
<div class="col-sm-offset-2 col-sm-4 col-md-3"><input class="btn btn-primary col-xs-12" type="submit" name="fire_away" value="Start {$stage}" onClick="this.form.submit(); this.disabled=true;"/></div>
</div>
Expand Down
8 changes: 0 additions & 8 deletions modules/next_stage/test/next_stageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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")
Expand Down
Loading