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

Replace DoB/EDC with 'Derived Age'/'EDC Age' #8990

Open
wants to merge 33 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
195cccb
Replace DoB/EDC with 'Derived Age'/'EDC Age'
Nov 30, 2023
e97f8a2
Changeing the instrument test
Dec 4, 2023
0337d8d
Replace 90000 with 300001
Dec 4, 2023
0d315d4
Revert the last chages on test_instrumentTest.php
Dec 5, 2023
3fd6e15
Replace the css code in candidate_profile
Dec 5, 2023
2e1bd80
Replace safeFindElement with safeClick
Dec 5, 2023
06d0019
modifing new changes
Dec 8, 2023
179df36
Adding DoB to configuration module
Dec 8, 2023
0736b50
Update instrument_list
Dec 14, 2023
67284b1
Adding DoB to RB_Config.sql
Dec 18, 2023
e4c65bc
Fix ConfigSettings for DoB
Dec 18, 2023
056b94f
Update instrument_html.tpl file under smarty
Dec 20, 2023
3cd3888
Update DoB
Feb 26, 2024
adcd615
Update the candidate Test
Feb 28, 2024
3131c21
Update raisinbread and test_instrument files
Apr 9, 2024
a602373
Merge branch 'main' into 2023-11-30_DoB_To_Derived_Age
GeorgeMurad Apr 9, 2024
fb821b1
Update RB_Config.sql
GeorgeMurad Apr 15, 2024
1992c80
change to 300001
kongtiaowang Apr 16, 2024
41a0fd5
fix
kongtiaowang Apr 16, 2024
3591288
fxi
kongtiaowang Apr 16, 2024
203d978
test
kongtiaowang Apr 16, 2024
dbec891
fix
kongtiaowang Apr 16, 2024
1254f71
debug
kongtiaowang Apr 16, 2024
d8f93d2
debug
kongtiaowang Apr 16, 2024
6b3216e
fix
kongtiaowang Apr 16, 2024
83f06d0
phpcs
kongtiaowang Apr 16, 2024
134cc42
phpcs
kongtiaowang Apr 16, 2024
42b8e8b
cs
kongtiaowang Apr 16, 2024
5eab4ba
debug
kongtiaowang Apr 16, 2024
1f62849
cs
kongtiaowang Apr 16, 2024
e6ebfee
rewrite
kongtiaowang Apr 16, 2024
cabdc02
phpcs
kongtiaowang Apr 16, 2024
0148aaa
final cs
kongtiaowang Apr 16, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions modules/candidate_profile/test/candidate_profileTest.php
Expand Up @@ -97,7 +97,7 @@ function testCandidateProfileWithoutProjectPermissions()
*/
function testCandidateProfileInstrumentLink1()
{
$this->safeGet($this->url . "/candidate_profile/900000/");
$this->safeGet($this->url . "/candidate_profile/300001/");
$this->safeFindElement(
WebDriverBy::cssSelector(
"#card2 > div:nth-child(1) >".
GeorgeMurad marked this conversation as resolved.
Show resolved Hide resolved
Expand All @@ -120,7 +120,7 @@ function testCandidateProfileInstrumentLink1()
*/
function testCandidateProfileInstrumentLink2()
{
$this->safeGet($this->url . "/candidate_profile/900000/");
$this->safeGet($this->url . "/candidate_profile/300001/");
$this->safeFindElement(
WebDriverBy::cssSelector(
"#card0 > div:nth-child(1) >".
GeorgeMurad marked this conversation as resolved.
Show resolved Hide resolved
Expand All @@ -136,4 +136,4 @@ function testCandidateProfileInstrumentLink2()
$bodyText
);
}
}
}
12 changes: 12 additions & 0 deletions modules/instrument_list/php/instrument_list.class.inc
Expand Up @@ -296,6 +296,18 @@ class Instrument_List extends \NDB_Menu_Filter

$this->tpl_data['display']
= array_merge($this->candidate->getData(), $this->timePoint->getData());
// DoB to Derived Age
GeorgeMurad marked this conversation as resolved.
Show resolved Hide resolved
$dob = $this->candidate->getData();
$dob_year = abs((date('Y', strtotime($dob['DoB'])) - date('Y')));
$dob_month = abs((date('m', strtotime($dob['DoB'])) - date('m')));
$dob_age = $dob_year . " y / " . $dob_month . " m";
$this->tpl_data['dob_age'] = $dob_age;
// EDC to EDC Age
$edc = $this->candidate->getData();
$edc_year = abs((date('Y', strtotime($edc['EDC'])) - date('Y')));
$edc_month = abs((date('m', strtotime($edc['EDC'])) - date('m')));
$edc_age = $edc_year . " y / " . $edc_month . " m";
$this->tpl_data['edc_age'] = $edc_age;
}

/**
Expand Down
20 changes: 8 additions & 12 deletions modules/instrument_list/templates/menu_instrument_list.tpl
Expand Up @@ -4,13 +4,11 @@
<thead>
<tr class="info">
<th>
DOB
Derived Age
</th>
<th>
EDC Age
</th>
{if $display.EDC!=""}
<th>
EDC
</th>
{/if}
<th>
Biological Sex
</th>
Expand Down Expand Up @@ -57,13 +55,11 @@
<tbody>
<tr>
<td>
{$display.DoB}
{$dob_age}
GeorgeMurad marked this conversation as resolved.
Show resolved Hide resolved
</td>
<td>
{$edc_age}
</td>
{if $display.EDC!=""}
<td>
{$display.EDC}
</td>
{/if}
<td>
{$display.Sex}
</td>
Expand Down
12 changes: 12 additions & 0 deletions modules/timepoint_list/php/timepoint_list.class.inc
Expand Up @@ -80,6 +80,18 @@ class Timepoint_List extends \NDB_Menu
$this->tpl_data['candID'] = $this->candID;
$this->tpl_data['PSCID'] = $candidate->getPSCID();
$this->tpl_data['candidate'] = $candidate->getData();
// convert DoB date to age and months and rename it to Derived Age
$dob = $candidate->getData();
$dob_year = abs((date('Y', strtotime($dob['DoB'])) - date('Y')));
$dob_month = abs((date('m', strtotime($dob['DoB'])) - date('m')));
$dob_age = $dob_year . " y / " . $dob_month . " m";
$this->tpl_data['dob_age'] = $dob_age;
// convert EDC date to age and months and rename it to EDC Age
$edc = $candidate->getData();
$edc_year = abs((date('Y', strtotime($edc['EDC'])) - date('Y')));
$edc_month = abs((date('m', strtotime($edc['EDC'])) - date('m')));
$edc_age = $edc_year . " y / " . $edc_month . " m";
$this->tpl_data['edc_age'] = $edc_age;

$listOfSessionIDs = $candidate->getListOfTimePoints();

Expand Down
20 changes: 8 additions & 12 deletions modules/timepoint_list/templates/menu_timepoint_list.tpl
Expand Up @@ -4,13 +4,11 @@
<thead>
<tr class="info">
<th>
DOB
Derived Age
</th>
<th>
EDC Age
</th>
{if $candidate.EDC!=""}
<th>
EDC
</th>
{/if}
<th>
Biological Sex
</th>
Expand All @@ -28,13 +26,11 @@
<tbody>
<tr>
<td>
{$candidate.DoB}
{$dob_age}
</td>
<td>
{$edc_age}
</td>
{if $candidate.EDC!=""}
<td>
{$candidate.EDC}
</td>
{/if}
<td>
{$candidate.Sex}
</td>
Expand Down