Skip to content

Commit

Permalink
Addressing failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffersoncasimir committed Feb 12, 2025
1 parent 81de941 commit 0adbe28
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class CnvProvisioner extends \LORIS\Data\Provisioners\DBObjectProvisioner
FROM session s
JOIN candidate c ON c.ID=s.CandidateID
GROUP BY
c.CandID) AS cohort ON (cohort.CandidateID = candidate.ID)
c.CandID) AS cohort ON (cohort.CandID = candidate.CandID)
LEFT JOIN psc ON (psc.CenterID = candidate.RegistrationCenterID)
JOIN CNV ON (candidate.ID = CNV.CandidateID)
LEFT JOIN genotyping_platform
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class MethylationProvisioner extends \LORIS\Data\Provisioners\DBObjectProvisione
FROM session s
JOIN candidate c ON c.ID=s.CandidateID
GROUP BY
c.CandID) AS cohort ON (cohort.CandidateID = candidate.ID)
c.CandID) AS cohort ON (cohort.CandID = candidate.CandID)
LEFT JOIN psc ON (psc.CenterID = candidate.RegistrationCenterID)
LEFT JOIN genomic_sample_candidate_rel gscr
ON (gscr.CandidateID = candidate.ID)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ class ProfileProvisioner extends \LORIS\Data\Provisioners\DBObjectProvisioner
genomicfileid
FROM
genomic_candidate_files_rel gcfr
JOIN
candidate c ON c.ID=gcfr.CandidateID THEN
WHERE
candidate.ID = gcfr.CandidateID) THEN
'Y'
ELSE
'N'
Expand All @@ -48,8 +48,8 @@ class ProfileProvisioner extends \LORIS\Data\Provisioners\DBObjectProvisioner
snpid
FROM
SNP_candidate_rel scr
JOIN
candidate c ON c.ID=scr.CandidateID THEN
WHERE
candidate.ID = scr.CandidateID) THEN
'Y'
ELSE
'N'
Expand All @@ -58,19 +58,19 @@ class ProfileProvisioner extends \LORIS\Data\Provisioners\DBObjectProvisioner
cnvid
FROM
CNV cnv
JOIN
candidate c ON c.ID=cnv.CandidateID THEN
WHERE
candidate.ID = cnv.CandidateID) THEN
'Y'
ELSE
'N'
END AS _CNV, CASE WHEN EXISTS (
SELECT
cpg_name
FROM
genomic_sample_candidate_rel
genomic_sample_candidate_rel gscr
LEFT JOIN genomic_cpg USING (sample_label)
WHERE
candid = candidate.candid) THEN
candidate.ID = gscr.CandidateID) THEN
'Y'
ELSE
'N'
Expand All @@ -84,7 +84,7 @@ class ProfileProvisioner extends \LORIS\Data\Provisioners\DBObjectProvisioner
FROM session s
JOIN candidate c ON c.ID=s.CandidateID
GROUP BY
c.CandID) AS cohort ON (cohort.CandidateID = candidate.ID)
c.CandID) AS cohort ON (cohort.CandID = candidate.CandID)
LEFT JOIN cohort AS subproj
ON (cohort.CohortID = subproj.CohortID)
LEFT JOIN psc ON (psc.CenterID = candidate.RegistrationCenterID)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class SnpProvisioner extends \LORIS\Data\Provisioners\DBObjectProvisioner
FROM session s
JOIN candidate c ON c.ID=s.CandidateID
GROUP BY
c.CandID) AS cohort ON (cohort.CandidateID = candidate.ID)
c.CandID) AS cohort ON (cohort.CandID = candidate.CandID)
LEFT JOIN cohort AS subproj
ON (cohort.CohortID = subproj.CohortID)
LEFT JOIN psc ON (psc.CenterID = candidate.RegistrationCenterID)
Expand Down
9 changes: 6 additions & 3 deletions modules/imaging_browser/test/imaging_browserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ public function setUp(): void
$this->DB->insert(
"candidate",
[
'ID' => 1,
'CandID' => '000001',
'PSCID' => 'DCC0001',
'RegistrationCenterID' => 1,
Expand All @@ -98,6 +99,7 @@ public function setUp(): void
$this->DB->insert(
"candidate",
[
'ID' => 2,
'CandID' => '000002',
'PSCID' => 'AOL0002',
'RegistrationCenterID' => 253,
Expand All @@ -110,6 +112,7 @@ public function setUp(): void
$this->DB->insert(
"candidate",
[
'ID' => 3,
'CandID' => 000003,
'PSCID' => 'BOL0003',
'RegistrationCenterID' => 254,
Expand All @@ -123,7 +126,7 @@ public function setUp(): void
'session',
[
'ID' => 999997,
'CandID' => 000001,
'CandidateID' => 1,
'Visit_label' => 'Test0',
'CenterID' => 1,
'ProjectID' => 1,
Expand All @@ -137,7 +140,7 @@ public function setUp(): void
'session',
[
'ID' => 999998,
'CandID' => 000002,
'CandidateID' => 2,
'Visit_label' => 'Test1',
'CenterID' => 253,
'ProjectID' => 1,
Expand All @@ -151,7 +154,7 @@ public function setUp(): void
'session',
[
'ID' => 999999,
'CandID' => 000003,
'CandidateID' => 3,
'Visit_label' => 'Test2',
'CenterID' => 254,
'ProjectID' => 1,
Expand Down
2 changes: 1 addition & 1 deletion php/libraries/Candidate.class.inc
Original file line number Diff line number Diff line change
Expand Up @@ -1292,7 +1292,7 @@ class Candidate implements \LORIS\StudyEntities\AccessibleResource,
s.CenterID as SCenterID, s.ID as sessionID
FROM candidate c LEFT JOIN session s ON (s.CandidateID=c.ID)
WHERE c.Active='Y' AND COALESCE(s.Active, 'Y')='Y'
AND c.CandID IN (SELECT ID FROM accesscandidates)
AND c.CandID IN (SELECT CandID FROM accesscandidates)
ORDER BY c.CandID",
[]
);
Expand Down
1 change: 1 addition & 0 deletions test/unittests/CandidateTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1199,6 +1199,7 @@ public function testParticipantStatusDescription()
]
]
);
echo "PSCID CandID: " . $this->_candidate->getPSCID() . ' ' . $this->_candidate->getCandID();
$result = $this->_candidate->getParticipantStatusDescription($this->_DB);
$this->_DB->run("DROP TEMPORARY TABLE participant_status_options");
$this->_DB->run("DROP TEMPORARY TABLE participant_status");
Expand Down

0 comments on commit 0adbe28

Please sign in to comment.