update outcomes and treatments
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
<div class="recommendation" *ngFor="let r of recommendations.concat(discouragements); let index = index">
|
||||
<div class="treatment" [style.border-color]="computeScoreColor(r.score, index)"
|
||||
[style.color]="computeScoreColor(r.score, index)"
|
||||
(click)="openTreatmentDetails(r.treatment.code)">{{r.treatment.label}} ({{ r.score }})</div>
|
||||
(click)="openTreatmentDetails(r.treatment.code)">{{r.treatment.label}}</div>
|
||||
</div>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="!hasResults()">
|
||||
|
||||
@@ -24,6 +24,10 @@ export class ResultsComponent implements OnInit {
|
||||
const recommendations = this.engine.getRecommendations(this.answers.answersIndexes);
|
||||
this.recommendations = recommendations.filter((r) => r.score >= 0).sort((r1, r2) => r2.score - r1.score);
|
||||
this.discouragements = recommendations.filter((r) => r.score < 0);
|
||||
|
||||
console.log("Recommendations and scores ---------------------------------------------------------------");
|
||||
recommendations.forEach((r) => console.log(`\t ${r.treatment.label} (${r.score})`))
|
||||
console.log("------------------------------------------------------------------------------------------");
|
||||
}
|
||||
|
||||
openTreatmentDetails = (code: string): void => {
|
||||
|
||||
@@ -42,6 +42,7 @@ export class EngineService {
|
||||
discouraged: row[3].replace('\r', '').replace('_', '').split('')
|
||||
};
|
||||
}
|
||||
console.log("Outcomes", this.OUTCOMES_MAP);
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@@ -119,7 +119,7 @@ export class TreatmentsService {
|
||||
this.TREATMENT_DETAILS.push(currentTreatmentDetails);
|
||||
}
|
||||
|
||||
console.log(this.TREATMENT_DETAILS)
|
||||
console.log("Treatments", this.TREATMENT_DETAILS);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user