OHDSI / PheValuator

An R package for evaluating phenotype algorithms.
https://ohdsi.github.io/PheValuator/
17 stars 6 forks source link

Cannot change working directory #14

Closed SSMK-wq closed 4 years ago

SSMK-wq commented 4 years ago

Hello Everyone,

I tried the PheValuator package and with the help of @jswerdel was able to overcome the issues while execution and I guess I am encountering another error after feature extraction. The below is from Error Report.txt

`DBMS: postgresql

Error: cannot change working directory

SQL: SELECT * FROM ( SELECT row_id, covariate_id, covariate_value FROM cov_1 UNION ALL SELECT row_id, covariate_id, covariate_value FROM cov_2 UNION ALL SELECT row_id, covariate_id, covariate_value FROM cov_3 UNION ALL SELECT row_id, covariate_id, covariate_value FROM cov_4 UNION ALL SELECT row_id, covariate_id, covariate_value FROM cov_5 UNION ALL SELECT row_id, covariate_id, covariate_value FROM cov_6 UNION ALL SELECT row_id, covariate_id, covariate_value FROM cov_7 UNION ALL SELECT row_id, covariate_id, covariate_value FROM cov_8 UNION ALL SELECT row_id, covariate_id, covariate_value FROM cov_9 UNION ALL SELECT row_id, covariate_id, covariate_value FROM cov_10 UNION ALL SELECT row_id, covariate_id, covariate_value FROM cov_11 UNION ALL SELECT row_id, covariate_id, covariate_value FROM cov_12 UNION ALL SELECT row_id, covariate_id, covariate_value FROM cov_13 UNION ALL SELECT row_id, covariate_id, covariate_value FROM cov_14 UNION ALL SELECT row_id, covariate_id, covariate_value FROM cov_15 UNION ALL SELECT row_id, covariate_id, covariate_value FROM cov_16 UNION ALL SELECT row_id, covariate_id, covariate_value FROM cov_17 UNION ALL SELECT row_id, covariate_id, covariate_value FROM cov_18 UNION ALL SELECT row_id, covariate_id, covariate_value FROM cov_19 UNION ALL SELECT row_id, covariate_id, covariate_value FROM cov_20 UNION ALL SELECT row_id, covariate_id, covariate_value FROM cov_21 UNION ALL SELECT row_id, covariate_id, covariate_value FROM cov_22 ) all_covariates;`

My temp table tables are generated as well.

Can help me understand what's the issue? Where is this table located and how can I resolve this error? Which file should I look into to fix this issue?

jswerdel commented 4 years ago

This usually occurs when the directory for the large ff files doesn't exist. For example, is you used: image does the directory c:/temp/ff/ exist?

SSMK-wq commented 4 years ago

Hi @jswerdel ,

You are right. It was due to the path issue.

But May I ask you another question. Not sure whether it is related to PheValuator.

When PheVal does Feature Extraction with the help of another package, how is the finally we have 21 covariates as shown above?

Let's take subject_id = 123. He has corresponding records in Drug, Conditions, Measurement, Visit and Observation table.

Similarly, we have another subject_id = 456, He also has corresponding records in Drug, Conditions, Measurement, Visit and Observation table.

Both the subjects might have different conditions, measurements , visit duration, no of visits and observations etc.

Does PheVal build the feature by converting all variables into binary type?

If subject_id = 123 has Chest pain, Cholesterol reading and subject_id = 456 has Gestational diabetes, SysBP

Will the feature extraction works like below

image

For the measurement columns, does it generates like this? How does it treat measurement values?

jswerdel commented 4 years ago

In the current version, features such as conditions and observations become binary, yes/no. The measurement values are not used but the presence of measurements and whether measurements are above/below normal levels (if your ETL includes that information in the conversion) are included. Visit count is included as a value.