* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download Implementing SNOMED CT in a Relational Database
Microsoft Access wikipedia , lookup
Entity–attribute–value model wikipedia , lookup
Oracle Database wikipedia , lookup
Relational algebra wikipedia , lookup
Microsoft SQL Server wikipedia , lookup
Open Database Connectivity wikipedia , lookup
Extensible Storage Engine wikipedia , lookup
Navitaire Inc v Easyjet Airline Co. and BulletProof Technologies, Inc. wikipedia , lookup
Concurrency control wikipedia , lookup
Microsoft Jet Database Engine wikipedia , lookup
Ingres (database) wikipedia , lookup
Clusterpoint wikipedia , lookup
Versant Object Database wikipedia , lookup
ContactPoint wikipedia , lookup
IE0X) ModuleEWebinar_Handout 2016-11-16 Implementing SNOMED CT in a Relational Database Using SNOMED CT in a Relational Database 1. Download database management system ▪ MySQL Community Edition: https://www.mysql.com/products/community/ 2. Download RF2 release files 3. Create empty tables ▪ Choose relevant release files ▪ Use RF2 file structure with appropriate indexes and keys ▪ Replace logical datatypes with corresponding physical datatypes 4. Load RF2 release files into tables ▪ Choose relevant release file type (full, snapshot, delta) 5. Create and load Transitive Closure ▪ Create Transitive Closure file from RF2 Relationship Snapshot file ▪ Create Transitive Closure table and load rows from TC file 6. Create views or queries (as required) ▪ Predefine commonly used queries for reuse Copyright IHTSDO (www.ihtsdo.org). All rights reserved. 8 IE0X) ModuleEWebinar_Handout 2016-11-16 Supporting Resources on eLearning Server ▪ MySQL Import for RF2 Full Release ▪ MySQL_database_loader.pdf ▪ Instructions on downloading MySQL and running script ▪ rf2_import_full_template.sql ▪ Creates tables, imports RF2 files, indexes and generates a range of views, including some linked views that are useful for viewing particular types of data. ▪ Transitive Closure Script ▪ SnomedCt_Elearning_Transitive_Closure_Script_20150907.pdf ▪ Instructions on using the Transitive Closure script ▪ transitiveClosureRf2Snap.pl ▪ Create transitive closure file from RF2 Snapshot relationship file ▪ rf2_import_tc_template.sql ▪ Creates table and imports transitive closure file Example MySQL Database Tables created include: Row Counts in 2016-07-31 SNOMED CT International Release Files Table Full sct2_concept 535,885 Snapshot 427,350 Snapshot Active 321,901 sct2_description 1,567,797 1,281,845 1,103,969 sct2_relationship 4,790,636 2,538,888 970,938 sct2_relationship (|is a|) - - 477,202 ss_transclose - - 5,515,515 sct2_refset_c 3,578,834 3,048,236 2,608,835 Note also snomedct.config ▪ Used to configure snapshot date and language (active = 1) Copyright IHTSDO (www.ihtsdo.org). All rights reserved. 9 IE0X) ModuleEWebinar_Handout 2016-11-16 Example MySQL Database ▪ View Prefixes ▪ ▪ ▪ ▪ sva - Snapshot view for latest date soa - Snapshot view for latest date - optimised svx - Snapshot view for specified* date (*in config table) sox - Snapshot view for specified* date – optimised ▪ View Suffixes ▪ ▪ ▪ ▪ ▪ ▪ _fsn - view of descriptions that are fully specified names** _pref - the preferred synonyms** _synall - all acceptable synonyms** _rel_child_(fsn|pref) – FSN or PT** of children _rel_parent_(fsn|pref) – FSN or PT** of parents _rel_def_(fsn|pref) – FSN or PT** of definition * Snapshot date selected in active row of config table ** Preferred in language selected in active row of config table Example MySQL Database Tables/Views used in following queries: ▪ snomedct.sva_synall – all synonyms in config language ▪ snomedct.sva_pref – preferred synonyms in config language ▪ snomedct.ss_transclose – transitive closure ▪ snomedct.sva_relationship – latest snapshot of relationships Copyright IHTSDO (www.ihtsdo.org). All rights reserved. 10 IE0X) ModuleEWebinar_Handout 2016-11-16 Example MySQL Database - Queries 1. Create a query to: Find the active concepts with an ‘acceptable’ synonym containing the words “disorder” and “lung” SELECT conceptId, term FROM snomedct.sva_synall WHERE MATCH (term) AGAINST ('+disorder +lung' IN BOOLEAN MODE) AND conceptId IN (SELECT id FROM snomedct.sva_concept WHERE active = 1) ORDER BY length (term) Result count: 14 Example MySQL Database - Queries 2. Create a query to: Find the Preferred Term of concept with id “19829001” SELECT conceptId, term FROM snomedct.sva_pref WHERE conceptId = 19829001 Result count: 1 Copyright IHTSDO (www.ihtsdo.org). All rights reserved. 11 IE0X) ModuleEWebinar_Handout 2016-11-16 Example MySQL Database - Queries 3. Create a query to: Select the “< 19829001 | disorder of lung |” SELECT tc.subtypeId, pt.term FROM snomedct.ss_transclose as tc, snomedct.sva_pref as pt WHERE tc.supertypeId = 19829001 AND pt.conceptId = tc.subtypeId ORDER BY pt.term Result count: 997 Example MySQL Database - Queries 4. Create a query to: Select the “< 19829001 | disorder of lung |: 116676008 | associated morphology | = 79654002 | edema |” SELECT tc.subtypeId, pt.term FROM snomedct.ss_transclose as tc, snomedct.sva_pref as pt WHERE tc.supertypeId = 19829001 AND pt.conceptId = tc.subtypeId AND tc.subtypeId IN (SELECT sourceId FROM snomedct.sva_relationship as r WHERE r.active = 1 AND r.typeId = 116676008 AND r.destinationId = 79654002) ORDER BY pt.term Result count: 19 Copyright IHTSDO (www.ihtsdo.org). All rights reserved. 12 IE0X) ModuleEWebinar_Handout 2016-11-16 Example MySQL Database - Queries 5. Create a query to: Select the “< 19829001 | disorder of lung |: 116676008 | associated morphology | = << 79654002 | edema |” SELECT tc.subtypeId, pt.term FROM snomedct.ss_transclose as tc, snomedct.sva_pref as pt WHERE tc.supertypeId = 19829001 AND pt.conceptId = tc.subtypeId AND tc.subtypeId IN (SELECT sourceId FROM snomedct.sva_relationship as r WHERE r.active = 1 AND r.typeId = 116676008 AND (r.destinationId = 79654002 OR r.destinationId IN (SELECT tc2.subtypeID FROM snomedct.ss_transclose as tc2 WHERE tc2.supertypeId = 79654002))) ORDER BY pt.term Result count: 28 Example MySQL Database - Queries 6. Create a query to: Select the “< 404684003 | clinical finding |: 363698007 | finding site | = << 39057004 | pulmonary valve |, 116676008 | associated morphology | = << 415582006 |stenosis|” SELECT tc.subtypeId, pt.term FROM snomedct.ss_transclose as tc, snomedct.sva_pref as pt WHERE tc.supertypeId = 404684003 AND pt.conceptId = tc.subtypeId AND tc.subtypeId IN (SELECT sourceId FROM snomedct.sva_relationship as r WHERE r.active = 1 AND r.typeId = 363698007 AND (r.destinationId = 39057004 OR r.destinationId IN (SELECT tc2.subtypeID FROM snomedct.ss_transclose as tc2 WHERE tc2.supertypeId = 39057004 ))) AND tc.subtypeId IN (SELECT sourceId FROM snomedct.sva_relationship as r WHERE r.active = 1 AND r.typeId = 116676008 AND (r.destinationId = 415582006 OR r.destinationId IN (SELECT tc2.subtypeID FROM snomedct.ss_transclose as tc2 WHERE tc2.supertypeId = 415582006 ))) Result count: 22 ORDER BY pt.term Copyright IHTSDO (www.ihtsdo.org). All rights reserved. 13