ccb-hms / nhanes-database

3 stars 4 forks source link

Wrong Metadata.QuestionnaireVariables #158

Open deepayan opened 6 months ago

deepayan commented 6 months ago

Apologies if this is one of the bugs fixed in 4.0.1, which is not on dockerhub yet:

> all_var <- phonto::nhanesQuery("select * from Metadata.QuestionnaireVariables")
> str(all_var)
'data.frame':   50530 obs. of  11 variables:
 $ Variable      : chr  "SEQN" "WTSA2YR" "URX1NP" "URD1NPLC" ...
 $ TableName     : chr  "AA_H" "AA_H" "AA_H" "AA_H" ...
 $ Description   : chr  "Respondent sequence number" "Subsample A Weights" "1-Aminonaphthalene urine (pg/mL)" "1-Aminonaphthalene urine Comment Code" ...
 $ Target        : chr  "" "" "" "" ...
 $ SasLabel      : chr  "Respondent sequence number" "Subsample A Weights" "1-Aminonaphthalene urine (pg/mL)" "1-Aminonaphthalene urine Comment Code" ...
 $ UseConstraints: chr  "Both males and females 6 YEARS - 150 YEARS" "Both males and females 6 YEARS - 150 YEARS" "Both males and females 6 YEARS - 150 YEARS" "Both males and females 6 YEARS - 150 YEARS" ...
 $ ProcessedText : chr  "" "" "" "" ...
 $ Tags          : chr  "-" "Subsample A Weights" "1-Aminonaphthalene urine (pg/mL)" "1-Aminonaphthalene urine" ...
 $ VariableID    : chr  "" "" "" "comment" ...
 $ IsPhenotype   : chr  "FALSE" "TRUE" "TRUE" "TRUE" ...
 $ OntologyMapped: chr  "FALSE" "FALSE" "TRUE" "TRUE" ...

The content of Target and UseConstraints fields are wrong, and possibly others (UseConstraints seems to have what Target should have).