Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.

Commit 60e8bc7

Browse files
authored
Update ASCVD app to support new clinical recommendations (#2)
1 parent 7a2d319 commit 60e8bc7

File tree

6 files changed

+80
-59
lines changed

6 files changed

+80
-59
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# CHANGELOG
22

3+
* 1.1.0
4+
- Update recommendation text to have more clinical value
35
* 1.0.0
46
- Implemented UI design with React
57
- Implemented ASCVD Risk Score algorithm

build/js/bundle.js

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ascvd-risk-app",
3-
"version": "1.0.0",
3+
"version": "1.1.0",
44
"author": "Cerner Corporation, SMART on FHIR",
55
"description": "SMART ASCVD Risk App",
66
"license": "Apache-2.0",

tests/nightwatch/ascvd-risk.spec.js

Lines changed: 29 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -235,31 +235,36 @@ module.exports = {
235235
'Recommendations view with content': (browser) => {
236236
browser
237237
.url(`http://localhost:${browser.globals.webpackDevServerPort}/recommendations.html`)
238-
.assert.containsText('#recSmoker .detail_box__title', 'Quit smoking')
239-
.assert.containsText('#recSmoker .detail_box__description', 'Your risk of heart attack or stroke decreases ' +
240-
'soon after you quit smoking. Blood flow to the heart and brain is vital, and increases ' +
241-
'almost immediately after your last cigarette. Additionally, the rate of plaque build-up ' +
242-
'in your blood vessels decreases. Ask your doctor about smoking cessation aids proven ' +
243-
'to be effective.')
238+
.assert.containsText('#recSmoker .detail_box__title', 'Quit Smoking')
239+
.assert.containsText('#recSmoker .detail_box__description', 'Besides causing cancer and lung disease, smoking ' +
240+
'is a leading cause of stroke and heart attack. Nicotine replacement (patches, gum, lozenges), ' +
241+
'coaching programs, and medications (Chantix, Buproprion) can increase your chances of success. ' +
242+
'See www.smokefree.gov for more information.')
244243
.assert.containsText('#recStatin .detail_box__title', 'Consider a statin')
245-
.assert.containsText('#recStatin .detail_box__description', 'Statins lower LDL (bad) cholesterol ' +
246-
'and raise HDL (good) cholesterol in your blood. Improved cholesterol levels decrease your ' +
247-
'risk for a heart attack or a stroke. Discuss the benefits and risks of statins with ' +
248-
'your doctor.')
249-
.assert.containsText('#recAspirin .detail_box__title', 'Take an aspirin every day')
250-
.assert.containsText('#recAspirin .detail_box__description', 'Taking an aspirin daily can ' +
251-
'reduce your risk of heart attacks and strokes, or reduce the severity of such an event. ' +
252-
'Your doctor can provide guidance on the recommended daily dose that’s right for you.')
253-
.assert.containsText('#recBP .detail_box__title', 'Control your blood pressure')
254-
.assert.containsText('#recBP .detail_box__description', 'High blood pressure stresses your ' +
255-
'body’s blood vessels, weakening them and greatly increasing your risk for heart attack or stroke.' +
256-
' Blood pressure medications, weight control, exercise, and managing your sodium intake can ' +
257-
'all have positive impact on your blood pressure.')
258-
.assert.containsText('#recExercise .detail_box__title', 'Exercise')
259-
.assert.containsText('#recExercise .detail_box__description', 'Regular physical activity helps ' +
260-
'you control your weight, blood pressure, and cholesterol. Be sure to consult your doctor ' +
261-
'before starting an exercise program.')
262-
.click('#recSmoker .detail_box__header')
244+
.assert.containsText('#recStatin .detail_box__description', 'Statins can reduce your risk of heart attack or ' +
245+
'stroke by 25%, even if your cholesterol level is in the “normal” range. The American Heart ' +
246+
'Association and American College of Cardiology recommend statins for people with diabetes, prior ' +
247+
'heart disease or stroke, and people at high risk of developing heart disease.')
248+
.assert.containsText('#recAspirin .detail_box__title', 'Aspirin')
249+
.assert.containsText('#recAspirin .detail_box__description', 'Aspirin can help lower your risk of heart attack ' +
250+
'or stroke by about 10%. Aspirin may increase your risk of bleeding. Talk to your doctor about ' +
251+
'whether you may benefit from taking aspirin daily and what dose may be the best.')
252+
.assert.containsText('#recBP .detail_box__title', 'Control your blood pressure')
253+
.assert.containsText('#recBP .detail_box__description', 'Every 10 point lowering of your systolic blood pressure ' +
254+
'or 5 point lowering of your diastolic blood pressure can lower your risk of heart disease by 21%. High blood ' +
255+
'pressure can be treated with diet, weight loss, and medications. Lowering your sodium intake to 2,400 mg per ' +
256+
'day or even as low as 1,000 mg per day can help lower your blood pressure. Different people benefit from ' +
257+
'different goal blood pressures. Ask your doctor what your goal should be.')
258+
.assert.containsText('#recExercise .detail_box__title', 'Exercise More')
259+
.assert.containsText('#recExercise .detail_box__description', 'The American Heart Association and American College ' +
260+
'of Cardiology recommend 3-4 sessions per week of at least 40 minutes per session of moderate to vigorous ' +
261+
'physical activity. But even small increases in your amount of physical activity can improve your heart health.')
262+
.assert.containsText('#recEating .detail_box__title', 'Eat more Heart-Healthy Food')
263+
.assert.containsText('#recEating .detail_box__description', 'Try to limit your intake of sugar, including sweets ' +
264+
'and sugar sweetened drinks. Eating more vegetables, fruits, whole grains, low-fat dairy, poultry (chicken), ' +
265+
'fish, beans, olive oil and nuts can help lower your risk of heart disease. Try to avoid or reduce trans fat and ' +
266+
'saturated fat, which are high in lard, butter, red meat, and fried foods.')
267+
.click('#recSmoker .detail_box__header')
263268
.assert.hidden('#recSmoker .detail_box__description')
264269
.assert.visible('#recSmoker .detail_box__title');
265270
}

tests/views/Recommendations/Recommendations.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import DetailBox from '../../../components/DetailBox/detail_box';
1414
describe('<Recommendations />', () => {
1515
it('should render at least 4 recommendations', () => {
1616
let wrapper = shallow(<Recommendations />);
17-
expect(wrapper.find(DetailBox)).toHaveLength(5);
17+
expect(wrapper.find(DetailBox).length).toBeGreaterThanOrEqual(4);
1818
});
1919

2020
it('should not render a recommendation to quit smoking if patient is not currently a smoker', () => {
@@ -27,6 +27,6 @@ describe('<Recommendations />', () => {
2727
ASCVDRisk.patientInfo.relatedFactors.smoker = true;
2828
let wrapper = shallow(<Recommendations />);
2929
expect(wrapper.find('.hidden')).toHaveLength(0);
30-
expect(wrapper.find(DetailBox)).toHaveLength(5);
30+
expect(wrapper.find(DetailBox).length).toBeGreaterThan(4);
3131
});
3232
});

views/Recommendations/index.jsx

Lines changed: 39 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -28,44 +28,58 @@ class Recommendations extends React.Component {
2828
render() {
2929
return (
3030
<div className={styles.container}>
31-
<div id={'recSmoker'} className={Recommendations.shouldHide('smoker')}>
31+
<div id={'recStatin'}>
3232
<DetailBox
33-
boxHeader={'Quit smoking'}
34-
boxBody={`Your risk of heart attack or stroke decreases soon after you quit smoking.
35-
Blood flow to the heart and brain is vital, and increases almost immediately after your last
36-
cigarette. Additionally, the rate of plaque build-up in your blood vessels decreases. Ask your
37-
doctor about smoking cessation aids proven to be effective.`}
33+
boxHeader={'Consider a statin'}
34+
boxBody={`Statins can reduce your risk of heart attack or stroke by 25%, even if your
35+
cholesterol level is in the “normal” range. The American Heart Association and American College
36+
of Cardiology recommend statins for people with diabetes, prior heart disease or stroke, and
37+
people at high risk of developing heart disease.`}
3838
/>
3939
</div>
40-
<div id={'recStatin'}>
40+
<div id={'recBP'}>
4141
<DetailBox
42-
boxHeader={'Consider a statin'}
43-
boxBody={`Statins lower LDL (bad) cholesterol and raise HDL (good) cholesterol in your blood.
44-
Improved cholesterol levels decrease your risk for a heart attack or a stroke. Discuss the benefits
45-
and risks of statins with your doctor.`}
42+
boxHeader={'Control your blood pressure'}
43+
boxBody={`Every 10 point lowering of your systolic blood pressure or 5 point lowering of
44+
your diastolic blood pressure can lower your risk of heart disease by 21%. High blood pressure
45+
can be treated with diet, weight loss, and medications. Lowering your sodium intake to 2,400 mg
46+
per day or even as low as 1,000 mg per day can help lower your blood pressure.\n\n Different people
47+
benefit from different goal blood pressures. Ask your doctor what your goal should be.`}
4648
/>
4749
</div>
48-
<div id={'recAspirin'}>
50+
<div id={'recExercise'}>
4951
<DetailBox
50-
boxHeader={'Take an aspirin every day'}
51-
boxBody={`Taking an aspirin daily can reduce your risk of heart attacks and strokes, or reduce
52-
the severity of such an event. Your doctor can provide guidance on the recommended daily dose that’s
53-
right for you.`}
52+
boxHeader={'Exercise More'}
53+
boxBody={`The American Heart Association and American College of Cardiology recommend
54+
3-4 sessions per week of at least 40 minutes per session of moderate to vigorous
55+
physical activity. But even small increases in your amount of physical activity
56+
can improve your heart health.`}
5457
/>
5558
</div>
56-
<div id={'recBP'}>
59+
<div id={'recEating'}>
5760
<DetailBox
58-
boxHeader={'Control your blood pressure'}
59-
boxBody={`High blood pressure stresses your body’s blood vessels, weakening them and greatly
60-
increasing your risk for heart attack or stroke. Blood pressure medications, weight control,
61-
exercise, and managing your sodium intake can all have positive impact on your blood pressure.`}
61+
boxHeader={'Eat more Heart-Healthy Food'}
62+
boxBody={`Try to limit your intake of sugar, including sweets and sugar sweetened drinks.
63+
Eating more vegetables, fruits, whole grains, low-fat dairy, poultry (chicken), fish, beans,
64+
olive oil and nuts can help lower your risk of heart disease. Try to avoid or reduce trans
65+
fat and saturated fat, which are high in lard, butter, red meat, and fried foods.`}
6266
/>
6367
</div>
64-
<div id={'recExercise'}>
68+
<div id={'recSmoker'} className={Recommendations.shouldHide('smoker')}>
69+
<DetailBox
70+
boxHeader={'Quit Smoking'}
71+
boxBody={`Besides causing cancer and lung disease, smoking is a leading cause of stroke and
72+
heart attack. Nicotine replacement (patches, gum, lozenges), coaching programs, and
73+
medications (Chantix, Buproprion) can increase your chances of success. See
74+
www.smokefree.gov for more information.`}
75+
/>
76+
</div>
77+
<div id={'recAspirin'}>
6578
<DetailBox
66-
boxHeader={'Exercise'}
67-
boxBody={`Regular physical activity helps you control your weight, blood pressure, and cholesterol.
68-
Be sure to consult your doctor before starting an exercise program.`}
79+
boxHeader={'Aspirin'}
80+
boxBody={`Aspirin can help lower your risk of heart attack or stroke by about 10%. Aspirin may
81+
increase your risk of bleeding. Talk to your doctor about whether you may benefit from taking
82+
aspirin daily and what dose may be the best.`}
6983
/>
7084
</div>
7185
</div>

0 commit comments

Comments
 (0)