Hallo @All,
I understand that you have addressed this before, and I am feeling quite frustrated with the situation involving free text data elements that have already been employed for data capture. The client has a substantial amount of data in these three important data elements, which currently contain free text values.
I have invested a significant amount of time reading, researching, and reviewing various materials to explore how I can create program indicators from these free text data elements, especially when I am uncertain about what the user might input.
The client expects a solution that operates in a manner similar to SQL code, generating counts by grouping data.
I am feeling quite helpless at the moment and don’t know how to proceed. PLEASE CAN SOMEONE HELP.
Dear @prosper
Thank you for responding. I have already attempted that approach. Allow me to illustrate it with an example. Suppose I wish to count the occurrences of cancer types containing ‘CAR,’ just as you recommended.
The DHIS2 Program indicator will access the ‘Type of Cancer’ data element, which is currently in free text format and it will pick list as shown below: -
Carcinoma
Carcinoid
Carcinosarcoma
Carcinosarcomatoid
Carcinomatosis
Carcinosarcomatosis
Carcinoma in situ
Carcinoid tumor
Carcinoid syndrome
Carcinosarcoma of the uterus
It will then count the instances above and provide a total of 10.
The client is seeking a solution that functions akin to SQL code, using Group BY SQL function to generate distinct counts.
THIS BECAUSE WE CAN NOT KNOW WHAT THE USER MIGHT TYPE SO THAT WE CAN PREPARE FOR THEIR REPORTS. The anticipated outcome will be as follows: -
Please get back to me. I would like to continue brainstorming with you.
Ah, in that case I think you need count(distinct #{dataElement}). I was thinking you wanted to count the number of times that ‘Carcin’ appeared regardless of how it was typed.