Missouri-BMI / OMOP_ON_P_CDM

Apache License 2.0
0 stars 0 forks source link

Run Achilles on MU OMOP data #78

Closed vasanthi014 closed 2 weeks ago

mosaa commented 1 month ago

make sure to capture the run time and number of queries in SnowFlake

shossain-mizzou commented 1 month ago

@vasanthi014 , we have problem in CROSSWALK.OMOP_PCORNET_VALUESET_MAPPING route. So, when we run any queries eg. count(person_id) it tries to computes the view and getting the error in the prescribing table.

       coalesce(
               case
                   when disp.dispense_route = 'OT' then 44814649
                   else route.source_concept_id
                   end, 0)::INTEGER               AS route_concept_id,

Image

vasanthi014 commented 1 month ago

@shossain-mizzou This should be fixed now. There where 105 non integer values in OMOP_PCORNET_VALUESET_MAPPING table. Please rerun achilles.

@Yaswitha-MU @fyi I deleted the source_concept_id's that are not numeric. I created a _copy table for our reference.

shossain-mizzou commented 1 month ago

@vasanthi014 , still has the issue

shossain-mizzou commented 1 month ago
select coalesce(source_concept_id, 0) ::INTEGER  from CROSSWALK.OMOP_PCORNET_VALUESET_MAPPING                                                   
shossain-mizzou commented 1 month ago

@vasanthi014 , would you use following logic to convert varchar to int?

SELECT COALESCE(TRY_TO_NUMBER(source_concept_id), 0) ::INTEGER 
FROM CROSSWALK.OMOP_PCORNET_VALUESET_MAPPING;
shossain-mizzou commented 1 month ago

https://docs.snowflake.com/en/sql-reference/functions/try_to_decimal

vasanthi014 commented 1 month ago

I replace the empty string with 0, it should work now.

shossain-mizzou commented 1 month ago

@vasanthi014 , would you confirm by running the query?

select count(person_id) from drug_exposure;
vasanthi014 commented 1 month ago

I was changing in the GPC schema, I made change in MU schema now. It took a minute to run but count(person_id) returned results.

shossain-mizzou commented 1 month ago

@vasanthi014, OBSERVATION_PERIOD is empty. Do you know why?

vasanthi014 commented 1 month ago

Fixed it. Do you see any other view missing?

shossain-mizzou commented 1 month ago

MU achilles executed successfully:

[Total Runtime] 26.987465 mins [Total Runtime] 26.987465 mins

vasanthi014 commented 1 month ago

@shossain-mizzou Can you research on the OHDISI forums if we can make ATLAS work with a character PERSON_ID instead of numeric?

shossain-mizzou commented 1 month ago

No they dont have since they are following OMOP CDM schema specification.

vasanthi014 commented 3 weeks ago

@shossain-mizzou Please run Achilles on ATLAS_GPC_DEV database and let me know if you see errors.

vasanthi014 commented 2 weeks ago

https://github.com/Missouri-BMI/OMOP_ON_P_CDM/issues/82