Snomed RF2 support #410

Open
robertogagliotta opened this Issue Dec 30, 2016 · 10 comments

Projects

None yet

2 participants

@robertogagliotta
Contributor

This September 2016 US Edition of SNOMED CT marks the last RF1 release. Going forward the International Health Terminology Standards Development Organisation (IHTSDO) and NLM will only produce the RF2 release files for SNOMED CT. This includes the International and US Editions of SNOMED CT. At this time our External Database Import Utility does not support Snomed RF2.
The solution to this issue is to add a new functionality that will implement the database load processing of Snomed_RF2 files into OpenEmr
I’ll be working in this endeavor, If someone wish to get involved or provide input is very welcome.

@robertogagliotta
Contributor

I will begin with SnomedCT_RF2_INT new install

  • On list_staged.php I will add ‘SNOMED’ else if
    /SnomedCT_RF2Release_INT
    $version = “RF2International:English”;
    Testing case: put file in contrib directory, see if INPUT button shows at import utility
    -standard_table_manage.php; add a ‘SNOMED’ if ($version == “RF2International:English”) on
    Line 85
    call new standard_table_capture.inc functions:
    SnomedRF2_import(TRUE), tempRF2_dir_cleanup($db).
  • Standard_table_capture.inc; add function snomedRF2_import
@bradymiller
Member

Sounds like a good plan.

@robertogagliotta
Contributor

The SnomedCT_RF2 has the data files in two locations : Full/Terminology and Snapshot/Terminology. Which location should be load in to openemr ?

@bradymiller
Member

Note the Full includes all revisions of codes, while the Snapshot contains only the current revision of codes.

I'd go with the Full for now.

@robertogagliotta
Contributor

my External Database Import Utility created and loaded tables: sct2_concept, sct2_description, sct2_identifier, sct2_relationship, sct2_statedrelationship, sct2_textdefinition. the tables are BIG, sct2_relationship has 2455945 rows.
I'm not sure if the Notice about the checksum below needs to be fix ?
Installed Release
Name: SNOMED
Revision: RF2International:English
Release Date: 2015-01-31
Staged Releases
SnomedCT_RF2Release_INT_20150131.zip

Notice: Undefined index: checksum in /var/www/html/openemrRF2/interface/code_systems/list_staged.php on line 333
The installed version and the staged files are the same.
Follow these instructions for installing or upgrading the following database: SNOMED?

@bradymiller
Member

Nice!
Wouldn't worry about how much space it takes up at this point; once it's all up and running well, can then minimize it and clean things up, if needed (note rf1 produces sct_relationship with about 1.4 millions rows, so not too big of a difference). Regarding php Notice, ensure you have your php errors logged to file instead of screen, then they won't bother you :)
http://www.open-emr.org/wiki/index.php/FAQ#What_are_the_correct_PHP_settings_.28can_be_found_in_the_php.ini_file.29.3F

@robertogagliotta
Contributor

Does OpenEMR will continue giving support to RF1?
If this is true I will add SNOMEDRF2, SNOMEDRF2-CT and SNOMEDRF2-PR to tb code_types

@bradymiller
Member

I wouldn't add new code_types. But will need to add new options for the selector at far right column when look at Administration->Lists->Code Types (I think it is External Tables or something like that). This is what is used to identify the external tables used, and the new options can be added here:
https://github.com/openemr/openemr/blob/master/custom/code_types.inc.php#L176-L185
(will basically add 3 more entries add the end with RF2 in them rather than RF1)(and then the 10,11,12 are used to create the connectors to the new RF2 tables)
Here's how the connectors are done for RF1:
https://github.com/openemr/openemr/blob/master/custom/code_types.inc.php#L142-L164
(will keep this code and then add additional code to support 10,11,12 for RF2)

This will then allow the user to use either RF1 or RF2 by selecting it on the far right column in the Code Type list.

@robertogagliotta
Contributor

This is a working RF2 prototype
define_external_table($code_external_tables,7,'sct_descriptions','ConceptId','Term','Term',array("Description
define_external_table($code_external_tables,10,'sct2_description','id','term','term',array("active=1"),"");
define_external_table($code_external_tables,11,'sct2_description','id','term','term',array("active=1"),"");
define_external_table($code_external_tables,12,'sct2_description','id','term','term',array("active=1"),"");
rf2

@bradymiller
Member

Hi @robertogagliotta ,
Looks like you are beginning to crack the "define_external_table" code :)
Is your code posted on github?
-brady

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment