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

SNOMED Database Improper Set-Up #7

Open
Butler925 opened this issue Jun 15, 2017 · 2 comments
Open

SNOMED Database Improper Set-Up #7

Butler925 opened this issue Jun 15, 2017 · 2 comments

Comments

@Butler925
Copy link

I followed all of the instructions for downloading and unzipping the SNOMED term database and provided the path for database formation and got the following print-outs:
DEBUG:root:Importing SNOMED descriptions into snomed.db...
----- DID IMPORT descriptions
DEBUG:root:1613155 concepts parsed
DEBUG:root:Importing SNOMED relationships into snomed.db...
----- DID IMPORT relationships
DEBUG:root:4863481 concepts parsed

However, when I run the snomed.py command again from command line, I get AssertionError: "315004001" refines "128462008" should return True or the database hasn't been set up properly

Is there a way to further debug this error and find out which step of database set up caused the failure?

@paulheider
Copy link

I ran across the same error. It's not totally clear why, but it seems that the did_import function isn't working correctly. I see the output for the relations table that implies that the relationships table branch of this function is run, but you don't see the side effects. (The most important side effect fro the unit test being the filling in the rel_text column.)

sqlite> select * from relationships WHERE rel_text is NULL limit 10;
100022|100000000|102272007|116680003||1
101021|10000006|29857009|116680003||1
102025|10000006|9972008|116680003||1
103024|1000004|19130008|116680003||1
104029|100001001|102272007|116680003||1
105028|100002008|102272007|116680003||1
106027|100003003|102272007|116680003||1
107020|100004009|102272007|116680003||1
109023|100005005|102272007|116680003||1
110029|100006006|102272007|116680003||1

sqlite> select * from relationships WHERE rel_text is not NULL limit 10;
*crickets*

I manually ran the sqlite commands and tests pass now. Further testing may be required. Here's roughly what I did from the command line:

$ sqlite3
sqlite> .open snomed.db
sqlite> UPDATE relationships SET rel_text = 'isa' WHERE rel_type = 116680003;
sqlite> UPDATE relationships SET rel_text = 'finding_site' WHERE rel_type = 363698007;
sqlite> CREATE INDEX IF NOT EXISTS source_index ON relationships (source_id);
sqlite> CREATE INDEX IF NOT EXISTS destination_index ON relationships (destination_id);
sqlite> CREATE INDEX IF NOT EXISTS rel_text_index ON relationships (rel_text);

@978749951
Copy link

@paulheider have got the umls license ? I request an account days ago, but I do not receive any reply. Could you tell me how to got the license?

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

No branches or pull requests

3 participants