Search concepts by observations

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.

images goes here

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.

We would love for more insight on this. Thanks.

cc: Darius, Dkayiwa

Actually adding @darius and @dkayiwa.

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

  • Coded = CodedObsCohortDefinition
  • Date = DateObsCohortDefinition
  • Numeric = NumericObsCohortDefinition etc

Mike

Thanks for the reply @mseaton, I’ll take a look at the Datatypes. and reach out to you know if I have further questions.

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?

cc @darius @dkayiwa

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.

-Darius (by phone)

Thank you for the reply @darius I’ll work on It base on your feedback and reach to you if any issue arise.

@darius I would also like to point out that there are no definition keys for

  • Numeric: NumericObsCohortDefinition
  • Text : TextObsCohortDefinition
  • Date: DateObsCohortDefinition cc @mseaton

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.