And I run the ACHILLES > Observations
but, there is not the entire data in the Observation table
In my Observation table, these concepts are exist.
So, I open a query in the achilles that create the treemap
and I got found the condition that assign only the ‘LOINC’ vocabulary
In my Observation table, ‘LOINC’ code is only 1 concept. there is also ‘SNOMED’ code. because I use not only LOINC but SNOMED.
In this screenshot, Looks the ‘LOINC’ code must be on the measurement.
So, I thought that I need to fix the condition in the treemap query from "where vocabulary_id = ‘LOINC’ " to "where domain_id = ‘Observation’ "
Is it okay? or any best practices?
And, In the HERACLES result also same results. I found that the sql query seems to same with ACHILLES.
Thanks for finding this and for the through analysis. We took a look at your findings and agree that the query above should be using the “domain_id = ‘Observation’” as the current query excludes other standard concepts from different vocabularies.
Could you make the change to the Achilles script on your local machine and re-run it to ensure that the treemap is regenerated properly? If that works, we can work to merge in your changes into the main Achilles repository. To that end, I’ve created an issue for this on Github here: https://github.com/OHDSI/Achilles/issues/81. Let me know if you need any further help and we’ll get this incorporated into the master code base for the entire community.
@zai I’ve put a pull request in with fixes that should address this across the other domains. @Chris_Knoll let me know if you might have time to do a quick review and hopefully we can merge this work into master.
Thanks @anthonysena. This is a fix that only applies to cdmv5, not cdmv4,
but should be helpful for defining the scope of which concepts should
appear on which reports. The hierarchies for the tree maps still need to
be hard coded to specific vocabularies (eg right now, meddra for
conditions, atc for drugs, loinc for observations and measurements) but
that shouldn’t impose a problem since it’s a left join and concepts that
don’t fall in the hierarchy will still appear.
@anthonysena, on Monday I’ll be merging another PR into Achilles, and then we’ll do this one. We’ll probably have a conflict or two because I think there’s some overlap in the files, however, they are altering different parts of the query, so it could be just fine. I’ll post back here when it’s all merged.
Thanks @Chris_Knoll let me know if I can help with the merge.
@Patrick_Ryan: your comments are spot on and my changes are only in the V5 queries. I’ve left the hierarchies for the tree maps as-is and it does not impose a problem like you mentioned.