Skip to content

Commit

Permalink
Iit risk score-enhancment (#276)
Browse files Browse the repository at this point in the history
* Added esm-pharmacy-app monorepo

* Added Listing for Registration location taged phamacies

* fixed spelling

* REmoved default iit risc score from hook

* Added trend chart on iit for ML tab in care pannell

* Mock data made realistic, formated risk score grid display

* Fixed description if risk score and loading state

* Mock data imprroved making it realistic, added risk score description on hover against risk score
  • Loading branch information
Omoshlawi authored Jul 16, 2024
1 parent afe6d23 commit b86850b
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 20 deletions.
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

0 comments on commit b86850b

Please sign in to comment.