CDSS visual authring

We am working on CDSS Visual authoring tool,

we are currently capable of transforming multiple tabs draw.io diagram into CHT (or ODK, both works)

(see below the details)

if you like this approach of visually authoring content; we are working with partners to have a better tool for authoring because the drawio files needs some IT understanding to make them work (metadata to add on the nodes), feel free to have a look to the “requirements” done so far:


here the rule how to design tricc/README.md at develop · SwissTPH/tricc · GitHub (i did that file quickly don’t look too close at the typos)

there is a draw io demo file tricc/tests/data/demo.drawio at develop · SwissTPH/tricc · GitHub

tricc is actually a library, but there is a cli wrapper if you want to try (call by the vcstudio test- F5)

and you can even build the XLS file with a github action

name: TRICC Workflow

on:
  push:
    branches: [ main ]
  pull_request:
    branches: [ main ]

jobs:
  run-tricc:
    runs-on: ubuntu-latest
    steps:
    - name: Checkout L2 repository
      uses: actions/checkout@v3

    - name: Run TRICC Action
      uses: SwissTPH/tricc/.github/actions/tricc-action@develop
      with:
        input_path: 'L2'
        output_path: 'output'
        output_strategy: 'XLSFormCHTStrategy'
        input_strategy: 'DrawioStrategy'

    - name: Upload output
      uses: actions/upload-artifact@v3
      with:
        name: tricc-output
        path: ${{ github.workspace }}/output
5 Likes

Hi @delcroip

This sounds pretty cool!
Though I’m not exactly certain how this looks (others might not either) and how it’s supposed to work.

It would be super helpful if you could include some screenshots or a video of how this looks in the app.

Thanks!!

Hey @delcroip - I know you’ve been working on this for some time - I share @diana’s exciting about seeing your announcement - thank you for taking the time post it!

I think the requested screenshots or video would be a great beginning for a “Getting Started” guide that goes through the process start to finish. I’m thinking something like CHT’s getting started guide. This would make it a lot more usable by other folks outside of SwisTPH

Thanks again for sharing and I look forward to more updates!

here is how the demo file part of the repo look like

the “upside down houses” have a link to other pages (the form of the node does not matter only the meta data is used)
and this is the result with CHT strategy

type name label hint help default appearance constraint constraint_message relevance disabled required required_message read only calculation repeat_count media::image
begin group inputs Inputs field-list ./source = “user”
hidden source
hidden source_id
string data_load NO_LABEL hidden
hidden task_id Task ID
begin group contact
db:person _id Patient ID db-object
string patient_id Medic ID hidden
string patient_name Patient Name hidden
date date_of_birth Date of birth hidden
string sex Patient Sex hidden
end group
end group
calculate _id label …/inputs/contact/_id
calculate patient_uuid label …/inputs/contact/patient_id
calculate p_name label …/inputs/contact/patient_name
calculate p_age_days label int((today()-date(${date_of_birth})))
calculate p_age_months label int(${id.age_day} div 30.4)
calculate p_age_years label int(${p_age_month} div 12)
calculate p_sex label …/inputs/contact/sex
calculate p_dob Date of birth date(…/inputs/contact/date_of_birth)
begin group aJ8MWjX5gSV_QbW_ORv6 Start field-list
select_one yes_no ask_ohl9Rrx2_dCzlsjSCRpC_4 Get time for some questions 1
note label_ohl9Rrx2_dCzlsjSCRpC_24 You will still get some selected(${ask_ohl9Rrx2_dCzlsjSCRpC_4}, ‘-1’)
end group aJ8MWjX5gSV_QbW_ORv6_0_end Start
begin group Ezl_wZymMgVIo1DcOth5 Dehydration field-list ${path_ektloqsv}>0
select_one list_select_hydration_behaviour select_hydration_behaviour EXAMINE the child’s behaviour/level of conciousness: ${path_ektloqsv}>0 1
select_one list_select_hydration_fluids_reaction select_hydration_fluids_reaction Offer the child fluids to drink. OBSERVE how the child is reacting: ${path_ektloqsv}>0 1
select_one more_info select_hydration_skin_pinch.more_info_optin NO_LABEL ${path_ektloqsv}>0
note select_hydration_skin_pinch.more_info

Skin pinch: ask the mother to hold the infant flat on her lap. Choose a location from the abdomen between the umbilicus and the side of the abdomen, and pinch the skin with your thumb and index finger. The fold should go in the direction of the length of the child’s body and not across the body. It is important to firmly grasp all layers of skin and subcutaneous tissue for one second then release them. Observe if the skin fold disappears: very slowly, over more than 2 seconds; slowly, the fold remains marked even for a brief moment; immediately

Note: in children with severe malnutrition (marasmus) the skin fold may disappear slowly even if the child is not dehydrated. In children who are overweight or have oedema the fold may fade immediately even if the child is dehydrated. Although the skin fold test is less reliable in these children, it must be used to classify their dehydration.

${select_hydration_skin_pinch.more_info_optin} = 1
select_one list_select_hydration_skin_pinch select_hydration_skin_pinch EXAMINE the child’s skin turgor, by assessing the skin pinch. The skin pinch: ${path_ektloqsv}>0 1
select_one more_info ask_hydration_eyes_sunken.more_info_optin NO_LABEL ${path_ektloqsv}>0
note ask_hydration_eyes_sunken.more_info

Sunken eyes: the eyes of a dehydrated infants may appear sunken. Check whether the eyes are sunken. Then ask the mother if she thinks that there is something different in the eyes of her baby. Her opinion helps you determine if the eyes are sunken. 

Note: in severely malnourished infants who are visibly wasted (who have marasmus), the eyes always look sunken even if the child is not dehydrated. Even though sunken eyes is a less reliable sign in a visibly wasted child, it should nevertheless still be used in classifying their dehydration status.

${ask_hydration_eyes_sunken.more_info_optin} = 1
select_one yes_no ask_hydration_eyes_sunken OBSERVE if the child has sunken eyes ${path_ektloqsv}>0 1
end group Ezl_wZymMgVIo1DcOth5_0_end Dehydration
begin group aJ8MWjX5gSV_QbW_ORv6_1 Start field-list
select_multiple list_select_why select_why Why ? .=‘opt_none’ or not(selected(., ‘opt_none’)) None cannot be selected together with choice. ${path_ektloqsv}>0 or (selected(${ask_ohl9Rrx2_dCzlsjSCRpC_4}, ‘-1’)) 1
end group aJ8MWjX5gSV_QbW_ORv6_1_end Start
begin group id_4d3QH9IUq_qOAPruCqUX Other Page field-list ${path_afrywexg}>0 or ${path_xknlsejq}>0
note label_r4Js015B8uJdMtSu4jlG_1 We will discuss how we could make it better ${path_afrywexg}>0 or ${path_xknlsejq}>0
select_one yes_no ask_6xoD8eKaRb6k0O6PRZWF_18 Do you agree to discuss ? ${path_uyxnqkkc}>0 and not(selected(${select_why}, ‘opt_2’)) 1
text label_r4Js015B8uJdMtSu4jlG_4 Please tell us Why selected(${ask_6xoD8eKaRb6k0O6PRZWF_18}, ‘1’) 1
note label_6xoD8eKaRb6k0O6PRZWF_21 Sorry to hear that, but without your feedback we cannot improve … selected(${ask_6xoD8eKaRb6k0O6PRZWF_18}, ‘-1’)
note label_B_ZlT_ww64VhCHJImcwK_2 Next time we could present with a snack ${path_uyxnqkkc}>0 and selected(${select_why}, ‘opt_2’)
end group id_4d3QH9IUq_qOAPruCqUX_0_end Other Page
begin group aJ8MWjX5gSV_QbW_ORv6_3 Start field-list
note label_test_follow Sorry for the bad presentiation ${path_afrywexg}>0
note label_SswGKVnOzA38xykHgvfB_3 Now eat ! ${path_xknlsejq}>0
end group aJ8MWjX5gSV_QbW_ORv6_4_end Start
begin group Ezl_wZymMgVIo1DcOth5_7 Dehydration field-list ${path_ihnhucqi}>0 and (not(${path_ektloqsv}>0 and ${path_ektloqsv}>0))
select_one list_select_hydration_behaviour select_hydration_behaviour_Ii_2 EXAMINE the child’s behaviour/level of conciousness: ${path_ihnhucqi}>0 1
select_one list_select_hydration_fluids_reaction select_hydration_fluids_reaction_Ii_2 Offer the child fluids to drink. OBSERVE how the child is reacting: ${path_ihnhucqi}>0 1
select_one more_info select_hydration_skin_pinch.more_info_Ii_2_optin NO_LABEL ${path_ihnhucqi}>0
note select_hydration_skin_pinch.more_info_Ii_2

Skin pinch: ask the mother to hold the infant flat on her lap. Choose a location from the abdomen between the umbilicus and the side of the abdomen, and pinch the skin with your thumb and index finger. The fold should go in the direction of the length of the child’s body and not across the body. It is important to firmly grasp all layers of skin and subcutaneous tissue for one second then release them. Observe if the skin fold disappears: very slowly, over more than 2 seconds; slowly, the fold remains marked even for a brief moment; immediately

Note: in children with severe malnutrition (marasmus) the skin fold may disappear slowly even if the child is not dehydrated. In children who are overweight or have oedema the fold may fade immediately even if the child is dehydrated. Although the skin fold test is less reliable in these children, it must be used to classify their dehydration.

${select_hydration_skin_pinch.more_info_Ii_2_optin} = 1
select_one list_select_hydration_skin_pinch select_hydration_skin_pinch_Ii_2 EXAMINE the child’s skin turgor, by assessing the skin pinch. The skin pinch: ${path_ihnhucqi}>0 1
select_one more_info ask_hydration_eyes_sunken.more_info_Ii_2_optin NO_LABEL ${path_ihnhucqi}>0
note ask_hydration_eyes_sunken.more_info_Ii_2

Sunken eyes: the eyes of a dehydrated infants may appear sunken. Check whether the eyes are sunken. Then ask the mother if she thinks that there is something different in the eyes of her baby. Her opinion helps you determine if the eyes are sunken. 

Note: in severely malnourished infants who are visibly wasted (who have marasmus), the eyes always look sunken even if the child is not dehydrated. Even though sunken eyes is a less reliable sign in a visibly wasted child, it should nevertheless still be used in classifying their dehydration status.

${ask_hydration_eyes_sunken.more_info_Ii_2_optin} = 1
select_one yes_no ask_hydration_eyes_sunken_Ii_2 OBSERVE if the child has sunken eyes ${path_ihnhucqi}>0 1
end group Ezl_wZymMgVIo1DcOth5_7_end Dehydration
calculate path_ektloqsv path: rcr5j6yTfk1y3pNvIHjA-1::lko_ds_c::Dehydraton 0 number(selected(${ask_ohl9Rrx2_dCzlsjSCRpC_4}, ‘1’))
calculate count_symptoms_dehydration_some_Vv_67 [Count] Some dehydration symptoms 0 number(selected(${select_hydration_behaviour}, ‘opt_2’))+number(selected(${select_hydration_skin_pinch}, ‘opt_2’))+number(selected(${select_hydration_fluids_reaction}, ‘opt_2’))+number(selected(${ask_hydration_eyes_sunken}, ‘1’))
calculate count_symptoms_dehydration_severe_Vv_66 [Count] Severe dehydration symptoms 0 number(selected(${select_hydration_fluids_reaction}, ‘opt_1’))+number(selected(${select_hydration_behaviour}, ‘opt_1’))+number(selected(${ask_hydration_eyes_sunken}, ‘1’))+number(selected(${select_hydration_skin_pinch}, ‘opt_1’))
calculate count_symptoms_dehydration_no_Vv_68 [Count] No dehydration symptoms 0 number(number(selected(${select_hydration_fluids_reaction}, ‘opt_3’) and ‘opt_3’>0))+number(selected(${select_hydration_skin_pinch}, ‘opt_3’))+number(selected(${select_hydration_behaviour}, ‘opt_none’))+number(selected(${ask_hydration_eyes_sunken}, ‘-1’))
calculate path_drbqvehw_Vv_71 path: Vql9d_jFd4LGE3tjmeDY-6::r_nefttfwo::No dehydration 0 number(${path_ektloqsv}>0)
calculate d_dehydration_no_Vv_84 No dehydration 0 number(${path_drbqvehw_Vv_71}>0 and ${count_symptoms_dehydration_no_Vv_68}>=3)
calculate d_dehydration_severe_Vv_97 Severe dehydration 0 number((${path_drbqvehw_Vv_71}>0 and not(${count_symptoms_dehydration_no_Vv_68}>=3)) and ${count_symptoms_dehydration_severe_Vv_66}>=2)
calculate d_referral_Vv_100 Referral 0 number(${d_dehydration_severe_Vv_97}>0)
calculate path_afrywexg path: ohl9Rrx2-dCzlsjSCRpC-59::lko_ds_c::Other page 0 number(selected(${select_why}, ‘opt_1’))
calculate path_xknlsejq path: SswGKVnOzA38xykHgvfB-1::lko_ds_c::Other page 0 number(selected(${select_why}, ‘opt_2’))
calculate path_ihnhucqi path: uIlB_Qza8nY4anC0MrbK-1::lko_ds_c::Dehydraton 0 number(selected(${select_why}, ‘opt_6’))
calculate path_uyxnqkkc path: mMOQrxQqf7DwH8kXFMJP-1::r_rvmcqpdg::[Hungry] 0 number(${path_afrywexg}>0 or ${path_xknlsejq}>0)
calculate count_symptoms_dehydration_severe [Count] Severe dehydration symptoms 0 number(selected(${select_hydration_skin_pinch_Ii_2}, ‘opt_1’))+number(number(${count_symptoms_dehydration_severe_Vv_66}>0))+number(selected(${select_hydration_fluids_reaction_Ii_2}, ‘opt_1’))+number(selected(${ask_hydration_eyes_sunken_Ii_2}, ‘1’))+number(selected(${select_hydration_behaviour_Ii_2}, ‘opt_1’))
calculate count_symptoms_dehydration_some [Count] Some dehydration symptoms 0 number(selected(${select_hydration_skin_pinch_Ii_2}, ‘opt_2’))+number(selected(${select_hydration_fluids_reaction_Ii_2}, ‘opt_2’))+number(selected(${select_hydration_behaviour_Ii_2}, ‘opt_2’))+number(selected(${ask_hydration_eyes_sunken_Ii_2}, ‘1’))+number(number(${count_symptoms_dehydration_some_Vv_67}>0))
calculate count_symptoms_dehydration_no [Count] No dehydration symptoms 0 number(selected(${select_hydration_behaviour_Ii_2}, ‘opt_none’))+number(number(selected(${select_hydration_fluids_reaction_Ii_2}, ‘opt_3’) and ‘opt_3’>0))+number(selected(${ask_hydration_eyes_sunken_Ii_2}, ‘-1’))+number(number(${count_symptoms_dehydration_no_Vv_68}>0))+number(selected(${select_hydration_skin_pinch_Ii_2}, ‘opt_3’))
calculate path_drbqvehw path: Vql9d_jFd4LGE3tjmeDY-6::r_nefttfwo::No dehydration 0 number(${path_ihnhucqi}>0)
calculate d_dehydration_no No dehydration 0 number(${path_drbqvehw}>0 and ${count_symptoms_dehydration_no_Vv_68}>=3)
calculate d_dehydration_some Some dehydration 0 number(((${path_drbqvehw}>0 and not(${count_symptoms_dehydration_no_Vv_68}>=3)) and not(${count_symptoms_dehydration_severe_Vv_66}>=2)) and ${count_symptoms_dehydration_some_Vv_67}>=2 or ((((${path_drbqvehw}>0 and not(${count_symptoms_dehydration_no_Vv_68}>=3)) and not(${count_symptoms_dehydration_severe_Vv_66}>=2)) and not(${count_symptoms_dehydration_some_Vv_67}>=2)) and ${count_symptoms_dehydration_some_Vv_67}=1) and ${count_symptoms_dehydration_severe}=1)
calculate d_dehydration_severe Severe dehydration 0 number((${path_drbqvehw}>0 and not(${count_symptoms_dehydration_no_Vv_68}>=3)) and ${count_symptoms_dehydration_severe_Vv_66}>=2)
calculate d_referral Referral 0 number(${d_dehydration_severe}>0)
calculate d_dehydration_some_Vv_120 Some dehydration 0 number(((${path_drbqvehw_Vv_71}>0 and not(${count_symptoms_dehydration_no_Vv_68}>=3)) and not(${count_symptoms_dehydration_severe_Vv_66}>=2)) and ${count_symptoms_dehydration_some_Vv_67}>=2 or ((((${path_drbqvehw_Vv_71}>0 and not(${count_symptoms_dehydration_no_Vv_68}>=3)) and not(${count_symptoms_dehydration_severe_Vv_66}>=2)) and not(${count_symptoms_dehydration_some_Vv_67}>=2)) and ${count_symptoms_dehydration_some_Vv_67}=1) and ${count_symptoms_dehydration_severe}=1)
select_one tab-label-4 tab_label_4 hidden 0 1

Does that help ?

2 Likes

Thanks for the update @delcroip !