Visual authoring for event program

Dear,

At SwissTPH we are developping a tool to generate CDSS from visual representation, recently I had a try on generating metadata for DHIS2.

On the paper it seems to work but I am facing 2 issues:

  • program rule HIDEFIELD just gray out the field
  • on the play server v42 one of my variable to resolved to a not existing id

here is the metadata (don’t look to close at the content it is just to test some features)

Triage_Alg_metadata.json (19.7 KB)

here the original drawing

here to tool: GitHub - SwissTPH/tricc: Tool for rapid implementation of clinical content (TRICC) for CDSS/XFORM

Any idea how I could move forward ?

  • should I use `#vairableID` instead of `#{variableName}` ?
  • is something wrong in my metadata ?

thanks in advance

1 Like

Hi @pmpdelcroix

You are referring to the program rule expression, right? Please use #{variableName} which is what you will find in the UI if you navigate to the program rule expression configuration from the Maintenance app.

If you use the hidefield it should completely hide the field. Could please share steps to reproduce this hidefield expression (in the most basic way) in any of the play.dhis2.org instances?

(As for the repo, I’m not sure how that relates to the DHIS2 metadata question, thanks!)

thank you @Gassim ; the ID resolution issue seems to be gone (likely a cache issue) but the graying out of the field is still present

rule for the second question with hide field `Login app | DHIS2 `

Capture app:
`Login app | DHIS2 `

(not just grayed out, the validation is run on the “hidden fields“ when I expect that rule to be applied only for displayed fields)
[UPDATE]: by removing the mandatory on the program DE definition it seems to work better, but it means I need to double the rule, one for hiding, one for making it mandatory

1 Like

Hi @pmpdelcroix

Thanks for the clarification, so if I understood the issue with IDs was that the API requests were working as expected but when testing in the UI, it was a cache issue that made things appear to be not working. :+1:

Sorry, these type of links to the play instances eventually stop working so next time I will make sure to request either screenshot or written steps.

I suppose that if the rule has the correct expression, the actions don’t need to be separated into several PRs. I wonder what’s causing this? What about the hidefield option, did it work?

Thank you for your feedback

Actually I think it is needed to have 2 PR because the logic is opposed relevance == False to hide and relevance == True to make it mandatory; did I missed something ?

regarding the issue, HIDEFIELD PR does not work properly on mandatory DE; but having them not working at alll will be better than falling back in DISABLEFIELD.

I am still fine-tuning the script because there are constraints that I need to overcome; for instance I need to make empty-section so I can show recommendation message (it is not a data capture so it has no DE); if you have suggestion to show pictures I am all ears.

Br