This study is part of the joint PIONEER - EHDEN - OHDSI studyathon in March 2021, and aims to advance understanding of clinical management and outcomes of watchful waiting in prostate cancer.
SELECT C.person_id, C.procedure_occurrence_id as event_id, C.procedure_date as start_date, (C.procedure_date + NUMTODSINTERVAL(1, 'day')) as END_DATE,
C.procedure_concept_id as TARGET_CONCEPT_ID, C.visit_occurrence_id,
C.procedure_date as sort_date
FROM (SELECT de.*
FROM OMOP.DRUG_EXPOSURE de
JOIN cgh7i9yrCodesets codesets on ((de.drug_concept_id = codesets.concept_id and codesets.codeset_id = 14))
) C
When I execute manually to see all the columns in the C table:
SELECT C.*
FROM (SELECT de.*
FROM OMOP.DRUG_EXPOSURE de
JOIN cgh7i9yrCodesets codesets on ((de.drug_concept_id = codesets.concept_id and codesets.codeset_id = 14))
) C
-- End Drug Exposure Criteria
There are only colums from the OMOP.DRUG_EXPOSURE table.
Since the comment before the sql query is " -- Begin Procedure Occurrence Criteria" I guess it's not supposed to be the DRUG_EXPOSURE table here.
I have a java.sql.SQLSyntaxErrorException: ORA-00904: "C"."PROCEDURE_DATE" : invalid identifier
The error occurs here: https://github.com/ohdsi-studies/PioneerWatchfulWaiting/blob/ca047952645cd576ab9bd1137bff0a3af3627511/inst/sql/sql_server/105.sql#L721
My translated SQL:
When I execute manually to see all the columns in the C table:
There are only colums from the OMOP.DRUG_EXPOSURE table. Since the comment before the sql query is " -- Begin Procedure Occurrence Criteria" I guess it's not supposed to be the DRUG_EXPOSURE table here.