Question about CommonDataModel/Version4 To Version5 Conversion

I have converted the CDMv4 DB into CDMv5 in the sqlserver
using the sql code in this link for conversion.
https://github.com/OHDSI/CommonDataModel/tree/master/Version4%20To%20Version5%20Conversion/Sql%20Server

the results of the conversion like this.

After the conversion, I have run the Achilles and got the result files (*.json)
When I run the AchillesWeb, There is nothing in the Drug Exposure Report.

But, my drug_exposure Table is not empty.
and I found out all the ‘drug_concept_id’ is 0 (zero)

And also, drug_treemap.json and drugs directory looks empty

When I review the conversion code,
I thought that There is no value ‘drug type’ in the ‘domain_id’ field of the Concept Table

and ‘drug type’ is exists in the ‘vocabulary_id’ field and ‘concept_class_id’ field.

But, in the conversion code,
there are some codes using like ‘drug type’, ‘procedure type’, ‘death type’ in the ‘domain_id’ field of the Concept Table.

Is there no problems in the conversion code?
or They need to be modified?

I feel so confused. Please let me know.

Hi @zai, thanks for posting this issue and all of the details - it greatly helped in troubleshooting the problem. You correctly noted that there are some queries in the conversion code that are looking for domain_ids such as: drug_type, procedure_type, etc. With the latest release of the vocabulary, these domains have been merged into a single domain called “type concept” which was causing the code above to omit the type concept id from most of the tables.

I’ve made an adjustment to the code to include the legacy domain_id (i.e. drug_type) and the new “type concept” which will fix the issue. It is part of a pull request in Github so please keep an eye out for a new version.