-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #52 from EveCrystali:dev/DiabetesRiskPrediction---…
…Enhance-prediction-quality-#49 Dev/DiabetesRiskPrediction---Enhance-prediction-quality-#49
- Loading branch information
Showing
3 changed files
with
179 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,7 +35,9 @@ | |
</dl> | ||
<hr /> | ||
<h5 class="mt-3">Risque de Diabète</h5> | ||
<p class="text-muted">@Html.DisplayFor(model => model.DiabetesRiskPrediction.DiabetesRisk)</p> | ||
<p class="fw-bold @GetRiskClass(Model.DiabetesRiskPrediction.DiabetesRisk)"> | ||
@Html.DisplayFor(model => model.DiabetesRiskPrediction.DiabetesRisk) | ||
</p> | ||
</div> | ||
|
||
@if (Model.Notes != null) | ||
|
@@ -71,5 +73,19 @@ | |
</div> | ||
|
||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script> | ||
|
||
@functions { | ||
public string GetRiskClass(DiabetesRisk risk) | ||
Check notice on line 78 in Frontend/Views/Patients/Details.cshtml
|
||
{ | ||
return risk switch | ||
{ | ||
DiabetesRisk.None => "text-success", // Vert | ||
DiabetesRisk.Borderline => "text-warning", // Jaune | ||
DiabetesRisk.InDanger => "text-danger", // Rouge clair | ||
DiabetesRisk.EarlyOnset => "bg-danger text-white", // Rouge foncé avec texte blanc | ||
_ => "text-muted" // Couleur par défaut | ||
}; | ||
} | ||
} | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters