OHDSI Home | Forums | Wiki | Github

Checking errors generated from DQD

Hi everyone,

I am using the latest version of DQD (version 2.5).

  • Running DQD on our CDM generated the following output:

  • Checking the output/errors folder and looking at the content of the first file (highlighted in yellow):

  • The code generated in the file is in the code snippet below:

DBMS:
sql server

Error:
com.microsoft.sqlserver.jdbc.SQLServerException: Invalid column name ‘ADMITTING_SOURCE_CONCEPT_ID’.

SQL:

/*********
FIELD_CDM_DATATYPE

At a minimum, for each field that is supposed to be an integer, verify it is an integer

Parameters used in this template:
schema = cdm
cdmTableName = VISIT_OCCURRENCE
cdmFieldName = ADMITTING_SOURCE_CONCEPT_ID
**********/

SELECT
num_violated_rows,
CASE
WHEN denominator.num_rows = 0 THEN 0
ELSE 1.0num_violated_rows/denominator.num_rows
END AS pct_violated_rows,
denominator.num_rows AS num_denominator_rows
FROM
(
SELECT
COUNT_BIG(violated_rows.violating_field) AS num_violated_rows
FROM
(
/violatedRowsBegin/
SELECT
‘VISIT_OCCURRENCE.ADMITTING_SOURCE_CONCEPT_ID’ AS violating_field,
cdmTable.

FROM cdm.VISIT_OCCURRENCE cdmTable
WHERE
(ISNUMERIC(cdmTable.ADMITTING_SOURCE_CONCEPT_ID) = 0
OR (ISNUMERIC(cdmTable.ADMITTING_SOURCE_CONCEPT_ID) = 1
AND CHARINDEX(’.’, CAST(ABS(cdmTable.ADMITTING_SOURCE_CONCEPT_ID) AS varchar)) != 0))
AND cdmTable.ADMITTING_SOURCE_CONCEPT_ID IS NOT NULL
/violatedRowsEnd/
) violated_rows
) violated_row_count,
(
SELECT
COUNT_BIG(*) AS num_rows
FROM cdm.VISIT_OCCURRENCE
) denominator
;

R version:
R version 4.2.2 Patched (2022-11-10 r83330)

Platform:
x86_64-pc-linux-gnu

Attached base packages:

  • stats
  • graphics
  • grDevices
  • utils
  • datasets
  • methods
  • base

Other attached packages:

  • dplyr (1.1.2)
  • DataQualityDashboard (2.5.0)
  • DatabaseConnector (6.3.0)
  • It seems the field/column ADMITTING_SOURCE_CONCEPT_ID is not present in the visit_detail table resulting in the error generated:

Any ideas on how to resolve this issue?

Many thanks,
Solmaz

I never ran the DQD myself, but the documentation says:
“Prior to execution the DataQualityDashboard package requires that the CDM_SOURCE table is properly populated.”
So maybe you should check that cdm_version fiield lists version 5.4.
See

The change in the field name was between version 5.3 and 5.4:
https://ohdsi.github.io/CommonDataModel/cdm54Changes.html

Thanks @Agnes_Wojciechowski and sharing the link above.

  • Made sure the cdm_source is populated and the version of the cdm is 5.4.

Reran it again and still getting the same errors.

@solmaz.eradat are you sure you passed in the cdmVersion parameter to executeDqChecks?

Hi @katy-sadowski - I was not passing in the parameter :see_no_evil: . Adding it fixes the issues

1 Like
t