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

Iit risk score-enhancment #276

Merged
merged 11 commits into from
Jul 16, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,24 @@ const CarePanelRiskScorePlot: React.FC<CarePanelRiskScorePlotProps> = ({ patient
title: 'Risk Score (%)',
percentage: true,
scaleType: ScaleTypes.LINEAR,
includeZero: true,
},
},
curve: 'curveMonotoneX',
height: '400px',
tooltip: {
// Tooltip configuration for displaying descriptions
enabled: true,

valueFormatter(value, label) {
if (label === 'Risk Score (%)') {
return `${value} (${patientRiskScore.find((r) => `${r.riskScore}` === `${value}`)?.description ?? ''})`;
}
return `${value}`;
},
},
};

return (
<div className={styles['risk-score-card']}>
<span className={styles.sectionHeader}>IIT Risk Score Trend</span>
Expand Down
46 changes: 26 additions & 20 deletions packages/esm-care-panel-app/src/iit-risk-score/risk-score.mock.ts
Original file line number Diff line number Diff line change
@@ -1,48 +1,54 @@
export const patientRiskScore = [
{
evaluationDate: '2019-01-01T00:00:00.000Z',
riskScore: 5,
description: 'High Risk',
evaluationDate: '2023-01-12T00:00:00.000Z',
riskScore: 0,
description: 'Low Risk',
riskFactors: 'Poor adherance, Missed appointments, Late drug pickup',
},
{
evaluationDate: '2022-01-05T00:00:00.000Z',
riskScore: 7,
description: 'High Risk',
evaluationDate: '2023-04-10T00:00:00.000Z',
riskScore: 0,
description: 'Low Risk',
riskFactors: 'Poor adherance, Missed appointments, Late drug pickup',
},
{
evaluationDate: '2022-01-08T00:00:00.000Z',
riskScore: 10,
description: 'High Risk',
evaluationDate: '2023-07-06T00:00:00.000Z',
riskScore: 3,
description: 'Medium Risk',
riskFactors: 'Poor adherance, Missed appointments, Late drug pickup',
},
{
evaluationDate: '2023-01-13T00:00:00.000Z',
riskScore: 30,
description: 'High Risk',
evaluationDate: '2023-10-13T00:00:00.000Z',
riskScore: 3,
description: 'Medium Risk',
riskFactors: 'Poor adherance, Missed appointments, Late drug pickup',
},
{
evaluationDate: '2023-01-23T00:00:00.000Z',
riskScore: 23,
description: 'High Risk',
evaluationDate: '2023-11-23T00:00:00.000Z',
riskScore: 3,
description: 'Medium Risk',
riskFactors: 'Poor adherance, Missed appointments, Late drug pickup',
},
{
evaluationDate: '2023-12-17T00:00:00.000Z',
riskScore: 3,
description: 'Medium Risk',
riskFactors: 'Poor adherance, Missed appointments, Late drug pickup',
},
{
evaluationDate: '2024-01-17T00:00:00.000Z',
riskScore: 12,
description: 'High Risk',
riskScore: 3,
description: 'Medium Risk',
riskFactors: 'Poor adherance, Missed appointments, Late drug pickup',
},
{
evaluationDate: '2024-06-17T00:00:00.000Z',
riskScore: 2,
evaluationDate: '2024-04-09T00:00:00.000Z',
riskScore: 11,
description: 'High Risk',
riskFactors: 'Poor adherance, Missed appointments, Late drug pickup',
},
{
evaluationDate: '2024-07-09T00:00:00.000Z',
evaluationDate: '2024-07-07T00:00:00.000Z',
riskScore: 11,
description: 'High Risk',
riskFactors: 'Poor adherance, Missed appointments, Late drug pickup',
Expand Down
Loading