Coronary heart disease (CHD) is a disease in which a waxy substance called plaque builds up inside the coronary arteries. These arteries supply oxygen-rich blood to your heart muscle. You can read more information on this at the National Heart Lung and Blood Institute website.
We had this requirement come in from a partner on how we could store all the patient vital data within Dynamics 365 and calculate a risk score. Our example shows how to use North52's business rules engine for Dynamics 365 to set up a Multi-Sheet Decision Table to evaluate the patient's risk score of Coronary Heart Disease.
Each Decision Table Sheet will evaluate specific Risk Factors with a variety of Conditions and decide if that risk factor applies to the patient. A final Decision Table Sheet will then provide a Risk Score based on the individual Risk Factors.
For this article it is assumed that you have at least basic familiarity with Decision Tables and/or have read the following articles:
- Everything you need to know about Decision Table Conditions
- How to set up your Actions!
- Introduction to Multi-Sheet Decision Tables
Rules for Calculating Coronary Heart Disease Risk
The Risk Factors for Coronary Heart Disease are detailed below (taken from American Council on Exercise):
Risk Factor 1: Smoking
Considered a risk if they meet any of the following criteria:
Risk Factor 2: Lifestyle
Considered a risk if the patient doesn't get a minimum amount of weekly exercise
Risk Factor 3: Obesity
Considered a risk if the patient has a BMI rating of 30 or higher along with the a waist measurement of:
Risk Factor 4: Hypertension
Considered a risk if the patient's systolic blood pressure => 140 mm Hg
Risk Factor 5: Dislipidemia
Considered a risk if the patient's low-density lipoprotein cholesterol (LDL-C) >= 130 mg-DL-1
Risk Factor 6: Prediabetes
Considered a risk factor if the patient's fasting plasma glucose => 100 mg-DL-1 but < 126 mg-DL-1
Risk Factor 7: Age
Age is considered a risk factor in men over 45 and women over 55
Risk Factor 8: Family History
Considered a risk if a first-degree male relative over 55,or female relative over 65, suffers from myocardial infraction, coronary revascularization or sudden death
A high-density lipoprotein (HDL-C) reading of > 60 mg-DL-1 is believed to lower the risk of Coronary Heart Disease
In our example the Patient Vitals record contains fields for all these values:
The Multi-Sheet Decision Table will have to evaluate all the above data to calculate the Risk Score.
North52 Decision Suite Solution
The North52 Decision Suite solution works like this:
- A Formula of type Save - Perform Action is created on the Patient Vitals entity
- The Source Properties are set to all the fields used for determining the rules
- The Event is set to Create & Update
- There are 10 Decision Tables Sheets to implement the rules:
- Age - Gender
- High HDL
- Family History
- Risk Score
- Exit this Decision Table on First Match is turned On (checked) for each of the Risk Factor Decision Table Sheets, it is turned Off (unchecked) for the Risk Score Decision Table Sheet
- Exit all Decision Tables on First Match is turned Off (unchecked) on all Decision Table Sheets
Sheet 1: Smoking
Sheet 2: Lifestyle
Sheet 3: Obesity
Sheet 4: Hypertension
Sheet 5: Dyslipidemia
Sheet 6: Prediabetes
Sheet 7: Age - Gender
Sheet 8: Family History
Sheet 9: High HDL
Sheet 10: Risk Score
This table uses a Action-Calculation (Column J) field to keep a running sum of the individual risk factors based on the results of the individual Decision Table Sheets. You can think of this as a variable result which is then used to update the Coronary Artery Disease Risk Score field on the Contact entity.
It first builds up the Risk Score variable and then updates the Coronary Artery Disease Risk field (Column K) on the Patient Vitals record.
Global Calculations Sheet
The Global Calculations Sheet has a single calculation in this Decision Table:
- Age, used to calculate the current age of the related Contact
DateDiff([n52demo_patientvitals.new_contact.birthdate.?], UtcDate(), 'y')
To test this, open up a Patient Vitals record and change any of the fields we've mentioned. You can see the score increase and decrease.
Did you know?
North52 TestShield allows rigorous regression testing of your Dynamics 365 system in-sprint
As well as being scheduled, or triggered from build pipelines, TestShield automated tests can be triggered manually for a quick mid-sprint regression test. This allows for quick testing of alternative ways to implement a requirement and measure the impact on existing processes.
It's quick to clone an existing test and try variations without affecting the original test set up too.