Skip to content

Commit

Permalink
Merge pull request aces#1 from zaliqarosli/2021_07_27_diagnosis_evolu…
Browse files Browse the repository at this point in the history
…tion

update 2021 07 27 diagnosis evolution
  • Loading branch information
jesscall authored Jun 22, 2022
2 parents 7bf61cc + df9af3e commit 8645ba0
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 23 deletions.
40 changes: 20 additions & 20 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 28 additions & 2 deletions modules/candidate_parameters/jsx/DiagnosisEvolution.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,14 +153,40 @@ class DiagnosisEvolution extends Component {
return <Loader/>;
}

const latestDiagnosis = this.state.data.latestProjectDiagnosis.length > 0 ?
const latestConfirmedProjectDiagnosisIDs =
this.state.data.latestConfirmedProjectDiagnosis.length > 0 ?
this.state.data.latestConfirmedProjectDiagnosis.map((item) => {
return item.DxEvolutionID;
}) : null;

const latestProjectDiagnosisIDs =
this.state.data.latestProjectDiagnosis.length > 0 ?
this.state.data.latestProjectDiagnosis.map((item) => {
return item.DxEvolutionID;
}) : null;

// Unset diagnosis in latest project diagnosis list if it also exists
// in the confirmed latest project diagnosis list
let latestProjectDiagnosis = this.state.data.latestProjectDiagnosis;
if (latestConfirmedProjectDiagnosisIDs != null) {
latestProjectDiagnosisIDs.map((dxEvolutionID, index) => {
if (latestConfirmedProjectDiagnosisIDs.find(
(element) => (element === dxEvolutionID)
) != undefined
) {
latestProjectDiagnosis.splice(index, 1);
}
});
}

const latestDiagnosis = latestProjectDiagnosis.length > 0 ?
<div className='col-md-10'>
<h3>Latest Diagnosis</h3>
<p>This diagnosis is <strong style={{color: 'red'}}>
unconfirmed</strong>.
A confirmed diagnosis is one that belongs to an approved visit.
</p>
{this.renderLatestDiagnosis(this.state.data.latestProjectDiagnosis)}
{this.renderLatestDiagnosis(latestProjectDiagnosis)}
</div>
: null;
const latestConfirmedDiagnosis =
Expand Down
1 change: 1 addition & 0 deletions readthedocs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
mkdocs==1.1
jinja2<3.1.0
./readthedocs/plugins/mkdocs-root-plugin
2 changes: 1 addition & 1 deletion tools/generic_includes.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
$client = new NDB_Client();
$client->makeCommandLine();
$client->initialize($configFile);
$DB = Database::singleton();
$DB = \NDB_Factory::singleton()->database();
$config = NDB_Config::singleton();
$lorisInstance = new \LORIS\LorisInstance(
$DB,
Expand Down

0 comments on commit 8645ba0

Please # to comment.