Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RxNorm Extension buider changes #421

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

divakhnenko
Copy link
Contributor

Several issues were found and fixed while creating the script for NCCD vocabulary

@dimshitc dimshitc changed the title buider changes RxNorm Extension buider changes Nov 21, 2020
@@ -6408,7 +6408,7 @@ FROM maps_to m
JOIN ex e ON e.concept_id = m.to_id
JOIN r_to_c rtc ON rtc.concept_code_1 = m.from_code
JOIN concept dc ON dc.concept_id = rtc.concept_id_2
WHERE dc.vocabulary_id IN (
WHERE EXISTS (
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ой. а разве так работает?
у тебя же внутри подзапроса должно быть условие, связывающее подзапрос с запросом

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Да, это работает. @ekorchmar посоветовал так сделать.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

а он случайно не объяснил, зачем нам подзапрос, который всегда дает true?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WHERE dc.vocabulary_id = c_int.vocabulary_id

Добавила условие

working/Build_RxE.sql Outdated Show resolved Hide resolved
@@ -122,44 +122,7 @@ JOIN concept c ON c.concept_id = r.concept_id_2
'RxNorm',
'RxNorm Extension',
'UCUM'
)

UNION ALL
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is it non-needed?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once we made a mistake in one of the RxE releases there's no chance to fix it.
Anyway, when we populate relationship_to_concept we go through existing mappings and synomyms. So this step not only redundant but dangerous.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants