and paste in atlas-demo.ohdsi.org/ in a cohort definition Atlas does not recognice it ???
Long story
Im running Covid19HospitalizationCharacterization on our database.
I get the error:
‘’’
…
Creating characterization for cohort COVID-19 narrow - no prior observation required [SIDIAP]
Cohort with ID 108 appears to be empty. Was it instantiated?Cohort characterization took 0.0591 secs
Error in round(data$mean, 3) : non-numeric argument to mathematical function
…
Traking down I'm sure that is bcs it does not find any patients.
I'm tried to check this by just copy-pasting one of the json cohort definitions in atlas. However, atlas does not recognice it as valid. Same occurs also in atlas-demo.ohdsi.org/.
So, that’s the problem in the UI code: it’s trying to see if the value starts with AT_ and you can’t get a substring from an array object.
To me, this looks like a serialization problem from RJSONIO to a string: sometimes single-value properties become arrays, which is clearly a problem, but in a ‘discussion’ i had about it with the RJSON devs, they say this is by design. I’m not sure how the cohort definitions were serialized into the study package, but that’s where the problem is.
Anyone on the Covid study-a-thon have information about how those cohort definitions were generated/saved?
Update: I tracked down the commit made by @krfeeney. @krfeeney, can you describe how you pushed the study artifacts (cohorts, etc) into the repository? It got corrupted somehow.
I think this is my fault. Currently, ROhdsiWebApi uses jsonlite to write the JSON file. This has this odd behavior. It seems the RJSONIO package works fine, so I’ll switch to that. @Gowtham_Rao and I are close to finalizing ROhdsiWebApi version 1.0.0, and we’ll incorporate this change.
Don’t shoot the messenger. I was migrating @edburn and @anthonysena’s code from a private repo into a public OHDSI repo.
@Javier, if you’re looking COVID-19 cohorts to re-use, I would suggest keeping an eye on Project Charybdis (Characterization) and Project Scylla (Estimation). @Patrick_Ryan@Azza_Shoaibi and team have built an entire new library of phenotypes that will have a bunch more COVID-19 cohorts in it.
Thanks a lot to everyone, Im always so amaze how fast and precise this community always answers.
Thanks @Chris_Knoll, I edited by hand the few squared brakes and now it works.
@schuemie. I this info may help: I also tipically work with jsonlite. I tried to fix the .json file using jsonlite::writeJSON with the flag auto_unbox=TRUE. But still atlas didnt read it.
@krfeeney, Thanks, I’ll have a look. Our data is not the best, last time updated is dec-2018. The corona cases added manually are isolated in time from the rest. The ELT is also inmature. It is just me working on this. I want to characterised our patients so they can be compare to your resutls, so that my colleges see how important OHDSI and i get more help on this
Now the Covid19HospitalizationCharacterization finds my patients but only calcualtes age covariates.
I’m guessing that im missing the ERA_ tables, tanks to @krfeeney links i saw how to calculate them.
The project I work for is FinnGen. We have DNA from 220k Fins and the associated longitudinal data (diagnoses, drugs purchases, and procedures) we identify 250 patiens in our data base that tested positive in COVID-19.
If some how this gentic information could help you we are are happy to colaborate.
This does mean people will need to rerun insertCohortDefinitionSetInPackage using the develop version of ROhdsiWebApi to fix the JSON files. (Or wait a bit. We’re almost done with the new release)