fixes #557
This commit is contained in:
parent
eeb4f27985
commit
f0637ad97d
|
@ -404,34 +404,70 @@ SELECT * FROM #tmp_de;
|
||||||
|
|
||||||
### CDM_SOURCE Table
|
### CDM_SOURCE Table
|
||||||
|
|
||||||
The script below is an example for how to fill in the CDM_SOURCE table. This table is required for the [Data Quality Dashboard](https://github.com/OHDSI/DataQualityDashboard) package to run. This was taken from the [ETL-Synthea](https://github.com/OHDSI/ETL-Synthea) package, a good example on how to write a complete extract-transform-load script from start to finish, including vocabulary import.
|
The script below is an example for how to fill in the CDM_SOURCE table.
|
||||||
|
This table is required for the [Data Quality Dashboard](https://github.com/OHDSI/DataQualityDashboard) package to run.
|
||||||
|
|
||||||
|
#### v5.3
|
||||||
|
This example was taken from the [ETL-Synthea](https://github.com/OHDSI/ETL-Synthea) package,
|
||||||
|
a good example on how to write a complete extract-transform-load script from start to finish, including vocabulary import.
|
||||||
|
|
||||||
```{sql eval = FALSE, echo = TRUE}
|
```{sql eval = FALSE, echo = TRUE}
|
||||||
insert into @cdm_schema.cdm_source (
|
INSERT INTO @cdm_schema.cdm_source (
|
||||||
cdm_source_name,
|
cdm_source_name,
|
||||||
cdm_source_abbreviation,
|
cdm_source_abbreviation,
|
||||||
cdm_holder,
|
cdm_holder,
|
||||||
source_description,
|
source_description,
|
||||||
source_documentation_reference,
|
source_documentation_reference,
|
||||||
cdm_etl_reference,
|
cdm_etl_reference,
|
||||||
source_release_date,
|
source_release_date,
|
||||||
cdm_release_date,
|
cdm_release_date,
|
||||||
cdm_version,
|
cdm_version,
|
||||||
vocabulary_version
|
vocabulary_version
|
||||||
)
|
)
|
||||||
select
|
SELECT
|
||||||
'Synthea synthetic health database',
|
'Synthea synthetic health database',
|
||||||
'Synthea',
|
'Synthea',
|
||||||
'OHDSI Community',
|
'OHDSI Community',
|
||||||
'SyntheaTM is a Synthetic Patient Population Simulator. The goal is to output synthetic, realistic (but not real), patient data and associated health records in a variety of formats.',
|
'SyntheaTM is a Synthetic Patient Population Simulator. The goal is to output synthetic, realistic (but not real), patient data and associated health records in a variety of formats.',
|
||||||
'https://synthetichealth.github.io/synthea/',
|
'https://synthetichealth.github.io/synthea/',
|
||||||
'https://github.com/OHDSI/ETL-Synthea',
|
'https://github.com/OHDSI/ETL-Synthea',
|
||||||
getdate(), -- NB: Set this value to the day the source data was pulled
|
getdate(), -- NB: Set this value to the day the source data was pulled
|
||||||
getdate(),
|
getdate(),
|
||||||
'v5.3',
|
'v5.3',
|
||||||
vocabulary_version
|
vocabulary_version
|
||||||
from @cdm_schema.vocabulary
|
FROM @cdm_schema.vocabulary
|
||||||
where vocabulary_id = 'None';
|
WHERE vocabulary_id = 'None';
|
||||||
|
```
|
||||||
|
|
||||||
|
#### v5.4
|
||||||
|
```{sql eval = FALSE, echo = TRUE}
|
||||||
|
INSERT INTO @cdm_schema.cdm_source (
|
||||||
|
cdm_source_name,
|
||||||
|
cdm_source_abbreviation,
|
||||||
|
cdm_holder,
|
||||||
|
source_description,
|
||||||
|
source_documentation_reference,
|
||||||
|
cdm_etl_reference,
|
||||||
|
source_release_date,
|
||||||
|
cdm_release_date,
|
||||||
|
cdm_version,
|
||||||
|
vocabulary_version,
|
||||||
|
vocabulary_version_concept_id
|
||||||
|
)
|
||||||
|
SELECT
|
||||||
|
'<your_cdm_source_name>',
|
||||||
|
'<your_cdm_source_abbreviation>',
|
||||||
|
'<your_cdm_holder>',
|
||||||
|
'<your_source_description>',
|
||||||
|
'<your_source_documentation_reference>', -- e.g. link to source data dictionary
|
||||||
|
'<your_etl_reference>', -- e.g. link to ETL documentation
|
||||||
|
'<your_source_release_date>', -- when the source data was pulled
|
||||||
|
getdate(),
|
||||||
|
'v5.4',
|
||||||
|
vocabulary_version,
|
||||||
|
756265 -- OMOP CDM Version 5.4.0
|
||||||
|
FROM @cdm_schema.vocabulary
|
||||||
|
WHERE vocabulary_id = 'None';
|
||||||
```
|
```
|
||||||
|
|
||||||
## **Bonus Queries**
|
## **Bonus Queries**
|
||||||
|
|
Loading…
Reference in New Issue