My team has been working on revamping the cohort builder. Based on the old cohort builder we have been able to make concept searches.
However, we are having issue implementing the observation search, since different concepts produce different observation component like the image below.
We are trying to figure out which dataset from the concept search determines how the observation component would render (Question or Answer or Both) as can be seen in different screen shots above.
The Concept Datatype is what you should mainly be looking at. So first you would allow the user to choose a concept, and then based on the data type of that concept you would provide different filter options, and use a different Cohort Definition to perform the evaluation
I have been able to make progress by dynamically generating the appropriate form fields base on the datatype of the concept.
From what I understand about your reply @mseaton is that the cohortdefinition I’m to use to make a query is based on the datatype of that concept.
The issues I have now are
only the CodedObsCohortDefinition is exposed
Going through the reporting module, I can only find data definition for
Numeric: NumericObsCohortDefinition
Coded : CodedObsCohortDefinition
Text : TextObsCohortDefinition
Date: DateObsCohortDefinition
DatetimeObsCohortDefinition and BooleanObsCohortDefinition are unaccounted for. I would like to know if there is no implementation of the stated definition, or do I use a different definition to make the query?
Under the hood, Boolean concepts are implemented as coded, with the answers
being true/false, so you may be able to handle those with the coded class.
It’s also possible that the date class in the reporting module will work
for datetime concepts also. Try this, and if it doesn’t work we’ll need to
add another cohort definition class.
Just reminder @darius@mseaton I would really love a reply on how to proceed on the issue related to the data definition keys of the above stated ObsCohortDefinition.
@enahomurphy, if I am understanding you right, you would just need to issue a pull request with new definitions for the above types, like was done recently for the cohort builder in this commit.