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

[instrument] Fix data type of getCandID function #9228

Merged
merged 1 commit into from
May 2, 2024
Merged
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
11 changes: 7 additions & 4 deletions php/libraries/NDB_BVL_Instrument.class.inc
Original file line number Diff line number Diff line change
Expand Up @@ -2380,7 +2380,7 @@ abstract class NDB_BVL_Instrument extends NDB_Page
$confirmed = $timepoint->getVisitStatus() === 'Pass' ? 'Y' : 'N';

$set = [
'CandID' => $this->getCandID(),
'CandID' => $this->getCandID()->__toString(),
'DxEvolutionID' => $dxEvolutionID,
'Diagnosis' => json_encode($diagnosis),
'Confirmed' => $confirmed
Expand Down Expand Up @@ -2491,9 +2491,9 @@ abstract class NDB_BVL_Instrument extends NDB_Page
/**
* Get the candidate's CandID
*
* @return string|null The candidate's CandID
* @return ?CandID The candidate's CandID
*/
function getCandID() : ?string
function getCandID() : ?CandID
{
$db = $this->loris->getDatabaseConnection();
$CommentID = $this->getCommentID();
Expand All @@ -2505,7 +2505,10 @@ abstract class NDB_BVL_Instrument extends NDB_Page
WHERE f.CommentID=:CID",
['CID' => $CommentID]
);
return $candID;
if ($candID === null) {
return null;
}
return new CandID($candID);

}

Expand Down
Loading