Closed LAMaglan closed 2 years ago
Hello,
All "conceptsets" must exist in the "concept_set_domains" list.
Can you please run the file "to_run.R" up to line 44 and then type in the console
concept_set_pregnancy[concept_set_pregnancy %notin% names(concept_set_domains)]
?
should print out the concepts that are not in concept_set_domains, if you send them to me later I'll try to figure out the problem!
Many thank!
When running:
concept_set_pregnancy[concept_set_pregnancy %notin% names(concept_set_domains)]
I get:
"fetal_nuchal_translucency", "amniocentesis", "Chorionic_Vllus_Sampling", "others".
(this is also the cases where a for loop in a later step, step_03_02_T2.2_internal_consistency_for_conceptsets.R
gives errors)
thank you very much, we found the problem, the fixed version is updated in GH.
the files we have modified are the following:
could you please replace them in your folder and run the script again?
thanks again, Giorgio
Great! This problem seems to be fixed - the code you asked me to run now returns nothing (character(0)
).
It does not seem like these updated scripts were pushed to the github-repo yet (at least in the version_3.0 branch)
but received in e-mail.
you're right, I actually pushed to the wrong branch. Thanks for notifying it I will fix it right away
There is an error when
if (concept_set_domains[[conceptset]] == "Diagnosis"){}
lines are run in the for loops in "04_algorithms_pregnancy.R" https://github.com/ARS-toscana/ConcePTIONAlgorithmPregnancies/blob/version_3.0/p_parameters_pregnancy/04_algorithms_pregnancy.Rfor (conceptset in concept_set_pregnancy){}
(see screenshot)
It seems this is because some of the "conceptset"s do not necessarily exist in
concept_set_domains
, and therefore throws a logical rather than TRUE/FALSE. One solution is to wrap this in another if block:This (or other) solutions needs to be implemented in each of the for loops evaluating "Diagnosis" in "04_algorithms_pregnancy.R" (see screenshot for full example for the first occurrence in line 57)