having one ordinal element with 3 different conditions that every conditions change the value in the element
Closed this issue · 4 comments
GDL2 Editor version
In the guideline "MAGGIC Risk Calculator for Heart Failure" there are 2 elements Age and SBP. The value of these element will change based on different conditions. Also this condition is also based on one other element "EF" in the guideline.
For instance: if EF<30 then value of different range of age is something and if EF>30 then values will be different from previous one.
The question is: In the archetype should I have different elements based on each condition or should I consider the conditions in the Rule?
link to resources:
https://www.mdcalc.com/maggic-risk-calculator-heart-failure#evidence
@MaryamRazavi the modeling on the archetype depends on how you want to tackle this in the guideline. There are several way to do this but I would recommend that you go for the simplest solution.
The elements that don't depend on EF can be Ordinals with their respectives scores.
The elements that depend on EF can be Count. Then in the guideline your first rules would be to establish what will be the score for SBP and Age based on EF + age/sbp limits.
You would also need to define two Quantity elements for Age and SBP that can be used as input
Finally your total score would look something like this:
ordinal1Value + ordinal2Value + SBPcountValue + ordinal3Value + AgeCountValue + etc...
@KalliamvakosKon what about EF element type?
It is ordinal in the guideline.
I put EF as Ordinal and Age and BP as quantity.
Then I noticed that EF has 6 different ranges(<20, 20-24,25-29, 30-34,35-39,>=40) itself.
The values for BP based on EF, there, EF has 3 different ranges (<30, 30-39, >=40).
I think there should be a way to have Age, SBP and EF as Quantity and be able to categorize age and BP based on the EF and establish a score for each.
This is not clear for me how to deal with in rule action part! which operator is suitable here?
Other way is:
I put all the element as ordinal even those elements which are dependent on EF, and let user decide about right input.
Hi Maryam,
I agree with Kostas that there are several ways to handle the rules and the one he suggested was indeed the simplest. That way, you don't need to create too many elements in the archetype.
I believe that you and Kostas have also considered the following suggestion that I write here. At least this is what I imagine how I would like to model it. Even though it isn't the simplest, but prefer to model the "extra points" stuffs as ordinal so that it will be easier to ensure all the rules are covered when using gdl2 without having to go back and forth to the original article for comparison.
You might be able to set up the elements accordingly, for example:
- Age
- Ejection fraction
- Extra points for age, an ordinal type element based on 7 age groups classification in the article (<55, 55-59, 60-64, and so on)
Then you can set the rules, for example:
If age < 55 AND Ejection Fraction <30, THEN set value for extra points for age: 0 (based on the ordinal) and so on.
And I think you can apply the same approach to the systolic BP element as well.
As for the input elements, I think it's still manageable to use the quantity type elements, you can even use the existing archetypes so that you don't need to create them anymore and risking of cluttering your newly created archetype for the MAGGIC risk. This is in consideration that the quantity input value is not included in the scoring, so you can stick to the elements that are included in this particular MAGGIC risk archetype.
- Age, quantity type, can be found in basic_demography.v1 archetype
- Ejection fraction (EF), quantity type, can be found in observation.imaging_exam-echocardiography.v1 archetype.
- Systolic blood pressure (SBP), quantity type, can be found in observation.blood_pressure.v1 archetype
- BMI archetype, quantity type, in body_mass_index.v1
The guideline seems challenging and fun to model. You can do it, Maryam! =)
@MaryamRazavi again if you want to keep the simplicity to the max I would suggest you go for the same approach as the ones for SBP and Age
You need the EF quantity to be able to make the logic for the SBP and Age. Then you need a count for the score regarding the EF limits.
To differentiate between them you can call the EF quantity as "Ejection fraction (EF)" and the count something like "EF assessment"