diff --git a/custom/code_types.inc.php b/custom/code_types.inc.php index 17c98bccb9b..58744583b34 100644 --- a/custom/code_types.inc.php +++ b/custom/code_types.inc.php @@ -27,6 +27,8 @@ * 4 for storing codes in external ICD9 Diagnosis tables * 5 for storing codes in external ICD9 Procedure/Service tables * 6 for storing codes in external ICD10 Procedure/Service tables + * 7 for storing codes in external SNOMED Clinical Term tables + * term - 1 if this code type is used as a clinical term * * * Copyright (C) 2006-2010 Rod Roark @@ -68,6 +70,7 @@ 'external'=> $ctrow['ct_external'], 'claim' => $ctrow['ct_claim'], 'proc' => $ctrow['ct_proc'], + 'term' => $ctrow['ct_term'] ); if ($default_search_type === '') $default_search_type = $ctrow['ct_key']; } @@ -85,6 +88,7 @@ '6' => xl('ICD10 Procedure/Service'), '2' => xl('SNOMED (RF1) Diagnosis'), '3' => xl('SNOMED (RF2) Diagnosis'), + '7' => xl('SNOMED Clinical Term') ); /** @@ -158,7 +162,7 @@ function convert_type_id_to_key($id) { * as 1) an array and as 2) a comma-separated lists that has been * process by urlencode() in order to place into URL address safely. * - * @param string $category category of code types('diagnosis' or 'procedure') + * @param string $category category of code types('diagnosis', 'procedure' or 'clinical_term') * @param string $return_format format or returned code types ('array' or 'csv') * @return string/array */ @@ -180,6 +184,11 @@ function collect_codetypes($category,$return_format="array") { array_push($return,$ct_key); } } + else if ($category == "clinical_term") { + if ($ct_arr['term']) { + array_push($return,$ct_key); + } + } else { //return nothing since no supported category was chosen } @@ -316,7 +325,16 @@ function code_set_search($form_code_type,$search_term="",$count=false,$active=tr $res = sqlStatement($query,$sql_bind_array); } } - else if ($code_types[$form_code_type]['external'] == 2 ) { // Search from SNOMED (RF1) diagnosis codeset tables + else if ($code_types[$form_code_type]['external'] == 2 || $code_types[$form_code_type]['external'] == 7) { + // Search from SNOMED (RF1) diagnosis codeset tables OR Search from SNOMED (RF1) clinical terms codeset tables + if ($code_types[$form_code_type]['external'] == 2) { + // Search from SNOMED (RF1) diagnosis codeset tables + $diagnosis_sql_specific = " ref.FullySpecifiedName LIKE '%(disorder)' "; + } + else { + // Search from SNOMED (RF1) clinical terms codeset tables + $diagnosis_sql_specific = " 1=1 "; + } if ($active) { // Only filter for active codes // If there is no entry in codes sql table, then default to active @@ -336,11 +354,11 @@ function code_set_search($form_code_type,$search_term="",$count=false,$active=tr "ON ref.ConceptId = c.code AND c.code_type = ? "; array_push($sql_bind_array,$code_types[$form_code_type]['id']); if ($return_only_one) { - $query .= "WHERE (ref.ConceptId = ? AND ref.FullySpecifiedName LIKE '%(disorder)') $active_query $query_filter_elements "; + $query .= "WHERE (ref.ConceptId = ? AND $diagnosis_sql_specific) $active_query $query_filter_elements "; array_push($sql_bind_array,$search_term); } else { - $query .= "WHERE ((ref.FullySpecifiedName LIKE ? OR ref.ConceptId LIKE ?) AND ref.FullySpecifiedName LIKE '%(disorder)') $active_query $query_filter_elements "; + $query .= "WHERE ((ref.FullySpecifiedName LIKE ? OR ref.ConceptId LIKE ?) AND $diagnosis_sql_specific ) $active_query $query_filter_elements "; array_push($sql_bind_array,"%".$search_term."%","%".$search_term."%"); } $query .= "AND ref.ConceptStatus = 0 " . @@ -511,7 +529,8 @@ function lookup_code_descriptions($codes) { } } } - else if ($code_types[$codetype]['external'] == 2) { // Collect from SNOMED (RF1) Diagnosis codeset tables + else if ($code_types[$codetype]['external'] == 2 || $code_types[$codetype]['external'] == 7) { + // Collect from SNOMED (RF1) Diagnosis codeset tables OR Search from SNOMED (RF1) clinical terms codeset tables // Ensure the sct_concepts sql table exists $check_table = sqlQuery("SHOW TABLES LIKE 'sct_concepts'"); if ( !(empty($check_table)) ) { diff --git a/interface/code_systems/list_installed.php b/interface/code_systems/list_installed.php index 476a2f1bfe0..11540e0a2b5 100644 --- a/interface/code_systems/list_installed.php +++ b/interface/code_systems/list_installed.php @@ -45,17 +45,30 @@ $db = isset($_GET['db']) ? $_GET['db'] : '0'; // For now, only order by the revision_date. When have different formats of a code type (such as WHO vs CMS for ICD10 or different languages for SNOMED, then will incorporate this field) -$sqlReturn = sqlQuery("SELECT DATE_FORMAT(`revision_date`,'%Y-%m-%d') as `revision_date`, `revision_version`, `name` FROM `standardized_tables_track` WHERE upper(`name`) = ? ORDER BY `revision_date` DESC", array($db) ); +$rez = sqlStatement("SELECT DATE_FORMAT(`revision_date`,'%Y-%m-%d') as `revision_date`, `revision_version`, `name` FROM `standardized_tables_track` WHERE upper(`name`) = ? ORDER BY `revision_date` DESC", array($db) ); +for($iter=0; $row=sqlFetchArray($rez); $iter++) { + $sqlReturn[$iter]=$row; +} + if (empty($sqlReturn)) { ?>
+
+
+
+
+ -
-
-
+
+
+
diff --git a/interface/code_systems/list_staged.php b/interface/code_systems/list_staged.php index 3097eef4c9f..36ab2f0f3d1 100644 --- a/interface/code_systems/list_staged.php +++ b/interface/code_systems/list_staged.php @@ -148,6 +148,18 @@ array_push($revisions,$temp_date); $supported_file = 1; } + else if (preg_match("/SnomedCT_Release_US[0-9]*_([0-9]{8}).zip/",$file,$matches)) { + + // This is the SNOMED US extension pack which can only be installed on top + // of a International SNOMED version. + // Hard code this version SNOMED feed to be US Extension + // + $version = "US Extension"; + $date_release = substr($matches[1],0,4)."-".substr($matches[1],4,-2)."-".substr($matches[1],6); + $temp_date = array('date'=>$date_release, 'version'=>$version, 'path'=>$mainPATH."/".$matches[0]); + array_push($revisions,$temp_date); + $supported_file = 1; + } else { // nothing } @@ -206,6 +218,15 @@ $success_flag=1; + // Only allow 1 staged revision for the SNOMED and RXNORM imports + if ( ($db=="SNOMED" || $db=="RXNORM") && (count($revisions) > 1) ) { + ?> +
+
?
+
?
@@ -233,7 +254,7 @@ $file_revision = $temp_file_revision; } else { - if ($file_revision != $temp_file_revision) { + if ( ($file_revision != $temp_file_revision) && ($success_flag === 1) ) { ?>
?
@@ -279,6 +300,18 @@
?
+
+
?
+ +
+
?
+
@@ -286,9 +319,19 @@ $action=xl("UPGRADE"); } } else { - if (count($files_array) > 0) { + if ($db=="SNOMED" && $file_revision=="US Extension") { + // The Staged US Extension SNOMED package can not be installed by itself (it is done after the international package is installed) + ?> +
+
?
+ 0) { $action=xl("INSTALL"); } + else { + //do nothing + } } if (strlen($action) > 0) { ?> diff --git a/interface/code_systems/snomed_howto.php b/interface/code_systems/snomed_howto.php index b63ec41dc94..a633dee122a 100644 --- a/interface/code_systems/snomed_howto.php +++ b/interface/code_systems/snomed_howto.php @@ -41,5 +41,6 @@
+

diff --git a/interface/code_systems/standard_tables_manage.php b/interface/code_systems/standard_tables_manage.php index cdf08698a21..532adc1e8c2 100644 --- a/interface/code_systems/standard_tables_manage.php +++ b/interface/code_systems/standard_tables_manage.php @@ -76,10 +76,19 @@ exit; } } else if ( $db == 'SNOMED') { - if (!snomed_import()) { - echo htmlspecialchars( xl('ERROR: Unable to load the file into the database.'), ENT_NOQUOTES)."
"; - temp_dir_cleanup($db); - exit; + if ($version == "US Extension") { + if (!snomed_import(TRUE)) { + echo htmlspecialchars( xl('ERROR: Unable to load the file into the database.'), ENT_NOQUOTES)."
"; + temp_dir_cleanup($db); + exit; + } + } + else { //$version is not "US Extension" + if (!snomed_import(FALSE)) { + echo htmlspecialchars( xl('ERROR: Unable to load the file into the database.'), ENT_NOQUOTES)."
"; + temp_dir_cleanup($db); + exit; + } } } else { //$db == 'ICD' diff --git a/interface/patient_file/history/history_full.php b/interface/patient_file/history/history_full.php index e074dd3e8e5..d05f3657a8e 100644 --- a/interface/patient_file/history/history_full.php +++ b/interface/patient_file/history/history_full.php @@ -92,7 +92,7 @@ function submit_history() { //function for selecting the smoking status in radio button based on the selection of drop down list. function radioChange(rbutton) { - if (rbutton == 1 || rbutton == 2) + if (rbutton == 1 || rbutton == 2 || rbutton == 15 || rbutton == 16) { document.getElementById('radio_tobacco[current]').checked = true; } diff --git a/interface/super/edit_list.php b/interface/super/edit_list.php index 3c1ba3d7034..dac3eaef403 100644 --- a/interface/super/edit_list.php +++ b/interface/super/edit_list.php @@ -60,9 +60,10 @@ $ct_external = formTrim($iter['ct_external']) + 0; $ct_claim = empty($iter['ct_claim']) ? 0 : 1; $ct_proc = empty($iter['ct_proc']) ? 0 : 1; + $ct_term = empty($iter['ct_term']) ? 0 : 1; if (strlen($ct_key) > 0 && $ct_id > 0) { sqlInsert("INSERT INTO code_types ( " . - "ct_key, ct_id, ct_seq, ct_mod, ct_just, ct_mask, ct_fee, ct_rel, ct_nofs, ct_diag, ct_active, ct_label, ct_external, ct_claim, ct_proc " . + "ct_key, ct_id, ct_seq, ct_mod, ct_just, ct_mask, ct_fee, ct_rel, ct_nofs, ct_diag, ct_active, ct_label, ct_external, ct_claim, ct_proc, ct_term " . ") VALUES ( " . "'$ct_key' , " . "'$ct_id' , " . @@ -78,7 +79,8 @@ "'$ct_label', " . "'$ct_external', " . "'$ct_claim', " . - "'$ct_proc' " . + "'$ct_proc', " . + "'$ct_term' " . ")"); } } @@ -104,7 +106,7 @@ if ($list_id == 'lbfnames' && substr($id,0,3) != 'LBF') $id = "LBF$id"; sqlInsert("INSERT INTO list_options ( " . - "list_id, option_id, title, seq, is_default, option_value, mapping, notes " . + "list_id, option_id, title, seq, is_default, option_value, mapping, notes, codes " . ") VALUES ( " . "'$list_id', " . "'" . $id . "', " . @@ -113,7 +115,8 @@ "'" . formTrim($iter['default']) . "', " . "'" . $value . "', " . "'" . formTrim($iter['mapping']) . "', " . - "'" . formTrim($iter['notes']) . "' " . + "'" . formTrim($iter['notes']) . "', " . + "'" . formTrim($iter['codes']) . "' " . ")"); } } @@ -180,7 +183,7 @@ function getCodeDescriptions($codes) { // Write one option line to the form. // -function writeOptionLine($option_id, $title, $seq, $default, $value, $mapping='', $notes='') { +function writeOptionLine($option_id, $title, $seq, $default, $value, $mapping='', $notes='', $codes='') { global $opt_line_no, $list_id; ++$opt_line_no; $bgcolor = "#" . (($opt_line_no & 1) ? "ddddff" : "ffdddd"); @@ -290,6 +293,12 @@ function writeOptionLine($option_id, $title, $seq, $default, $value, $mapping='' htmlspecialchars($notes, ENT_QUOTES) . "' size='25' maxlength='255' class='optin' />"; echo "\n"; + echo " "; + echo ""; + echo "\n"; + echo " \n"; } @@ -402,6 +411,8 @@ function writeCTLine($ct_array) { xl('Is this a procedure/service type?')); echo ctGenCBox($opt_line_no, $ct_array, 'ct_diag', xl('Is this a diagnosis type?')); + echo ctGenCBox($opt_line_no, $ct_array, 'ct_term', + xl('Is this a Clinical Term code type?')); // Show the external code types selector $value_ct_external = isset($ct_array['ct_external']) ? $ct_array['ct_external'] : ''; echo " "; @@ -513,9 +524,23 @@ function select_code(lino) { return false; } +// This invokes the find-code popup. +// For CVX/immunization code administration. +function sel_cvxcode(e) { + current_sel_name = e.name; + dlgopen('../patient_file/encounter/find_code_popup.php?codetype=CVX', '_blank', 500, 400); +} + +// This invokes the find-code popup. +// For CVX/immunization code administration. +function select_clin_term_code(e) { + current_sel_clin_term = e.name; + dlgopen('../patient_file/encounter/find_code_popup.php?codetype=', '_blank', 500, 400); +} + // This is for callback by the find-code popup. function set_related(codetype, code, selector, codedesc) { - if (typeof(current_sel_name) == 'undefined') + if (typeof(current_sel_name) == 'undefined' && typeof(current_sel_clin_term) == 'undefined') { // Coming from Fee Sheet edit var f = document.forms[0]; @@ -539,8 +564,20 @@ function set_related(codetype, code, selector, codedesc) { } displayCodes(current_lino); } - else - { + else if (typeof(current_sel_name) == 'undefined') { + // Coming from the Clinical Terms Code(s) edit + var f = document.forms[0][current_sel_clin_term]; + var s = f.value; + if (code) { + if (s.length > 0) s += ';'; + s += codetype + ':' + code; + } + else { + s = ''; + } + f.value = s; + } + else { // Coming from Immunizations edit var f = document.forms[0][current_sel_name]; var s = f.value; @@ -585,12 +622,6 @@ function mysubmit() { f.submit(); } -// This invokes the find-code popup. -function sel_cvxcode(e) { - current_sel_name = e.name; - dlgopen('../patient_file/encounter/find_code_popup.php?codetype=CVX', '_blank', 500, 400); -} - @@ -661,6 +692,7 @@ function sel_cvxcode(e) { + > @@ -686,7 +718,8 @@ function sel_cvxcode(e) { - + + @@ -719,7 +752,7 @@ function sel_cvxcode(e) { while ($row = sqlFetchArray($res)) { writeOptionLine($row['option_id'], $row['title'], $row['seq'], $row['is_default'], $row['option_value'], $row['mapping'], - $row['notes']); + $row['notes'],$row['codes']); } for ($i = 0; $i < 3; ++$i) { writeOptionLine('', '', '', '', 0); diff --git a/library/standard_tables_capture.inc b/library/standard_tables_capture.inc index 7ec3daf620d..b38739fd34a 100644 --- a/library/standard_tables_capture.inc +++ b/library/standard_tables_capture.inc @@ -144,7 +144,7 @@ function rxnorm_import($is_windows_flag) { } // Function to import SNOMED tables -function snomed_import() { +function snomed_import($us_extension=FALSE) { // set up array $table_array_for_snomed=array( @@ -189,9 +189,12 @@ function snomed_import() { $dir=str_replace('\\','/',$dir); // executing the create statement for tables, these are defined in snomed_capture.inc file - foreach($table_array_for_snomed as $val){ - if(trim($val)!=''){ - sqlStatement($val); + // this is skipped if the US extension is being added + if (!$us_extension) { + foreach($table_array_for_snomed as $val){ + if(trim($val)!=''){ + sqlStatement($val); + } } } diff --git a/sql/4_1_1-to-4_1_2_upgrade.sql b/sql/4_1_1-to-4_1_2_upgrade.sql index 36f49d2d250..077f58ba025 100644 --- a/sql/4_1_1-to-4_1_2_upgrade.sql +++ b/sql/4_1_1-to-4_1_2_upgrade.sql @@ -82,3 +82,41 @@ ALTER TABLE `documents_legal_detail` ADD COLUMN `dld_patient_comments` text COMM #IfMissingColumn documents_legal_master dlm_upload_type ALTER TABLE `documents_legal_master` ADD COLUMN `dlm_upload_type` tinyint(4) DEFAULT '0' COMMENT '0-Provider Uploaded,1-Patient Uploaded'; #EndIf + +#IfMissingColumn list_options codes +ALTER TABLE `list_options` ADD COLUMN `codes` varchar(255) NOT NULL DEFAULT ''; +UPDATE list_options SET `codes`='SNOMED-CT:449868002' WHERE list_id='smoking_status' AND option_id='1' AND title='Current every day smoker'; +UPDATE list_options SET `codes`='SNOMED-CT:428041000124106' WHERE list_id='smoking_status' AND option_id='2' AND title='Current some day smoker'; +UPDATE list_options SET `codes`='SNOMED-CT:8517006' WHERE list_id='smoking_status' AND option_id='3' AND title='Former smoker'; +UPDATE list_options SET `codes`='SNOMED-CT:266919005' WHERE list_id='smoking_status' AND option_id='4' AND title='Never smoker'; +UPDATE list_options SET `codes`='SNOMED-CT:77176002' WHERE list_id='smoking_status' AND option_id='5' AND title='Smoker, current status unknown'; +UPDATE list_options SET `codes`='SNOMED-CT:266927001' WHERE list_id='smoking_status' AND option_id='9' AND title='Unknown if ever smoked'; +#EndIf + +#IfNotRow2Dx2 list_options list_id smoking_status option_id 15 title Heavy tobacco smoker +INSERT INTO list_options ( list_id, option_id, title, seq, is_default, codes ) VALUES ('smoking_status', '15', 'Heavy tobacco smoker', 70, 0, "SNOMED-CT:428071000124103"); +#EndIf + +#IfNotRow2Dx2 list_options list_id smoking_status option_id 16 title Light tobacco smoker +INSERT INTO list_options ( list_id, option_id, title, seq, is_default, codes ) VALUES ('smoking_status', '16', 'Light tobacco smoker', 80, 0, "SNOMED-CT:428061000124105"); +#EndIf + +#IfMissingColumn code_types ct_term +ALTER TABLE `code_types` ADD COLUMN ct_term tinyint(1) NOT NULL default 0 COMMENT '1 if this is a clinical term'; +#EndIf + +#IfNotRow code_types ct_key SNOMED-CT +DROP TABLE IF EXISTS `temp_table_one`; +CREATE TABLE `temp_table_one` ( + `id` int(11) NOT NULL DEFAULT '0', + `seq` int(11) NOT NULL DEFAULT '0' +) ENGINE=MyISAM ; +INSERT INTO `temp_table_one` (`id`, `seq`) VALUES ( IF( ((SELECT MAX(`ct_id`) FROM `code_types`)>=100), ((SELECT MAX(`ct_id`) FROM `code_types`) + 1), 100 ) , IF( ((SELECT MAX(`ct_seq`) FROM `code_types`)>=100), ((SELECT MAX(`ct_seq`) FROM `code_types`) + 1), 100 ) ); +INSERT INTO code_types (ct_key, ct_id, ct_seq, ct_mod, ct_just, ct_fee, ct_rel, ct_nofs, ct_diag, ct_active, ct_label, ct_external, ct_claim, ct_proc, ct_term ) VALUES ('SNOMED-CT' , (SELECT MAX(`id`) FROM `temp_table_one`), (SELECT MAX(`seq`) FROM `temp_table_one`), 0, '', 0, 0, 0, 0, 0, 'SNOMED Clinical Term', 7, 0, 0, 1); +DROP TABLE `temp_table_one`; +#EndIf + +#IfNotColumnType codes code varchar(25) +ALTER TABLE `codes` CHANGE `code` `code` varchar(25) NOT NULL default ''; +#EndIf + diff --git a/sql/database.sql b/sql/database.sql index 73f7152c4e0..9e04b7e20b9 100644 --- a/sql/database.sql +++ b/sql/database.sql @@ -488,7 +488,7 @@ CREATE TABLE `codes` ( `id` int(11) NOT NULL auto_increment, `code_text` varchar(255) NOT NULL default '', `code_text_short` varchar(24) NOT NULL default '', - `code` varchar(10) NOT NULL default '', + `code` varchar(25) NOT NULL default '', `code_type` smallint(6) default NULL, `modifier` varchar(12) NOT NULL default '', `units` tinyint(3) default NULL, @@ -2542,6 +2542,7 @@ CREATE TABLE `list_options` ( `option_value` float NOT NULL default '0', `mapping` varchar(31) NOT NULL DEFAULT '', `notes` varchar(255) NOT NULL DEFAULT '', + `codes` varchar(255) NOT NULL DEFAULT '', PRIMARY KEY (`list_id`,`option_id`) ) ENGINE=MyISAM; @@ -5423,19 +5424,21 @@ CREATE TABLE code_types ( ct_external tinyint(1) NOT NULL default 0 COMMENT '0 if stored codes in codes tables, 1 or greater if codes stored in external tables', ct_claim tinyint(1) NOT NULL default 0 COMMENT '1 if this is used in claims', ct_proc tinyint(1) NOT NULL default 0 COMMENT '1 if this is a procedure type', + ct_term tinyint(1) NOT NULL default 0 COMMENT '1 if this is a clinical term', PRIMARY KEY (ct_key) ) ENGINE=MyISAM; -INSERT INTO code_types (ct_key, ct_id, ct_seq, ct_mod, ct_just, ct_fee, ct_rel, ct_nofs, ct_diag, ct_active, ct_label, ct_external, ct_claim, ct_proc ) VALUES ('ICD9' , 2, 1, 0, '' , 0, 0, 0, 1, 1, 'ICD9 Diagnosis', 4, 1, 0); -INSERT INTO code_types (ct_key, ct_id, ct_seq, ct_mod, ct_just, ct_fee, ct_rel, ct_nofs, ct_diag, ct_active, ct_label, ct_external, ct_claim, ct_proc ) VALUES ('CPT4' , 1, 2, 12, 'ICD9', 1, 0, 0, 0, 1, 'CPT4 Procedure/Service', 0, 1, 1); -INSERT INTO code_types (ct_key, ct_id, ct_seq, ct_mod, ct_just, ct_fee, ct_rel, ct_nofs, ct_diag, ct_active, ct_label, ct_external, ct_claim, ct_proc ) VALUES ('HCPCS', 3, 3, 12, 'ICD9', 1, 0, 0, 0, 1, 'HCPCS Procedure/Service', 0, 1, 1); -INSERT INTO code_types (ct_key, ct_id, ct_seq, ct_mod, ct_just, ct_fee, ct_rel, ct_nofs, ct_diag, ct_active, ct_label, ct_external, ct_claim, ct_proc ) VALUES ('CVX' , 100, 100, 0, '', 0, 0, 1, 0, 1, 'CVX Immunization', 0, 0, 0); -INSERT INTO code_types (ct_key, ct_id, ct_seq, ct_mod, ct_just, ct_fee, ct_rel, ct_nofs, ct_diag, ct_active, ct_label, ct_external, ct_claim, ct_proc ) VALUES ('DSMIV' , 101, 101, 0, '', 0, 0, 0, 1, 0, 'DSMIV Diagnosis', 0, 1, 0); -INSERT INTO code_types (ct_key, ct_id, ct_seq, ct_mod, ct_just, ct_fee, ct_rel, ct_nofs, ct_diag, ct_active, ct_label, ct_external, ct_claim, ct_proc ) VALUES ('ICD10' , 102, 102, 0, '', 0, 0, 0, 1, 0, 'ICD10 Diagnosis', 1, 1, 0); -INSERT INTO code_types (ct_key, ct_id, ct_seq, ct_mod, ct_just, ct_fee, ct_rel, ct_nofs, ct_diag, ct_active, ct_label, ct_external, ct_claim, ct_proc ) VALUES ('SNOMED' , 103, 103, 0, '', 0, 0, 0, 1, 0, 'SNOMED Diagnosis', 2, 1, 0); -INSERT INTO code_types (ct_key, ct_id, ct_seq, ct_mod, ct_just, ct_fee, ct_rel, ct_nofs, ct_diag, ct_active, ct_label, ct_external, ct_claim, ct_proc ) VALUES ('CPTII' , 104, 104, 0, 'ICD9', 0, 0, 0, 0, 0, 'CPTII Performance Measures', 0, 1, 0); -INSERT INTO code_types (ct_key, ct_id, ct_seq, ct_mod, ct_just, ct_fee, ct_rel, ct_nofs, ct_diag, ct_active, ct_label, ct_external, ct_claim, ct_proc ) VALUES ('ICD9-SG' , 105, 105, 12, 'ICD9', 1, 0, 0, 0, 0, 'ICD9 Procedure/Service', 5, 1, 1); -INSERT INTO code_types (ct_key, ct_id, ct_seq, ct_mod, ct_just, ct_fee, ct_rel, ct_nofs, ct_diag, ct_active, ct_label, ct_external, ct_claim, ct_proc ) VALUES ('ICD10-PCS' , 106, 106, 12, 'ICD10', 1, 0, 0, 0, 0, 'ICD10 Procedure/Service', 6, 1, 1); +INSERT INTO code_types (ct_key, ct_id, ct_seq, ct_mod, ct_just, ct_fee, ct_rel, ct_nofs, ct_diag, ct_active, ct_label, ct_external, ct_claim, ct_proc, ct_term ) VALUES ('ICD9' , 2, 1, 0, '' , 0, 0, 0, 1, 1, 'ICD9 Diagnosis', 4, 1, 0, 0); +INSERT INTO code_types (ct_key, ct_id, ct_seq, ct_mod, ct_just, ct_fee, ct_rel, ct_nofs, ct_diag, ct_active, ct_label, ct_external, ct_claim, ct_proc, ct_term ) VALUES ('CPT4' , 1, 2, 12, 'ICD9', 1, 0, 0, 0, 1, 'CPT4 Procedure/Service', 0, 1, 1, 0); +INSERT INTO code_types (ct_key, ct_id, ct_seq, ct_mod, ct_just, ct_fee, ct_rel, ct_nofs, ct_diag, ct_active, ct_label, ct_external, ct_claim, ct_proc, ct_term ) VALUES ('HCPCS', 3, 3, 12, 'ICD9', 1, 0, 0, 0, 1, 'HCPCS Procedure/Service', 0, 1, 1, 0); +INSERT INTO code_types (ct_key, ct_id, ct_seq, ct_mod, ct_just, ct_fee, ct_rel, ct_nofs, ct_diag, ct_active, ct_label, ct_external, ct_claim, ct_proc, ct_term ) VALUES ('CVX' , 100, 100, 0, '', 0, 0, 1, 0, 1, 'CVX Immunization', 0, 0, 0, 0); +INSERT INTO code_types (ct_key, ct_id, ct_seq, ct_mod, ct_just, ct_fee, ct_rel, ct_nofs, ct_diag, ct_active, ct_label, ct_external, ct_claim, ct_proc, ct_term ) VALUES ('DSMIV' , 101, 101, 0, '', 0, 0, 0, 1, 0, 'DSMIV Diagnosis', 0, 1, 0, 0); +INSERT INTO code_types (ct_key, ct_id, ct_seq, ct_mod, ct_just, ct_fee, ct_rel, ct_nofs, ct_diag, ct_active, ct_label, ct_external, ct_claim, ct_proc, ct_term ) VALUES ('ICD10' , 102, 102, 0, '', 0, 0, 0, 1, 0, 'ICD10 Diagnosis', 1, 1, 0, 0); +INSERT INTO code_types (ct_key, ct_id, ct_seq, ct_mod, ct_just, ct_fee, ct_rel, ct_nofs, ct_diag, ct_active, ct_label, ct_external, ct_claim, ct_proc, ct_term ) VALUES ('SNOMED' , 103, 103, 0, '', 0, 0, 0, 1, 0, 'SNOMED Diagnosis', 2, 1, 0, 0); +INSERT INTO code_types (ct_key, ct_id, ct_seq, ct_mod, ct_just, ct_fee, ct_rel, ct_nofs, ct_diag, ct_active, ct_label, ct_external, ct_claim, ct_proc, ct_term ) VALUES ('CPTII' , 104, 104, 0, 'ICD9', 0, 0, 0, 0, 0, 'CPTII Performance Measures', 0, 1, 0, 0); +INSERT INTO code_types (ct_key, ct_id, ct_seq, ct_mod, ct_just, ct_fee, ct_rel, ct_nofs, ct_diag, ct_active, ct_label, ct_external, ct_claim, ct_proc, ct_term ) VALUES ('ICD9-SG' , 105, 105, 12, 'ICD9', 1, 0, 0, 0, 0, 'ICD9 Procedure/Service', 5, 1, 1, 0); +INSERT INTO code_types (ct_key, ct_id, ct_seq, ct_mod, ct_just, ct_fee, ct_rel, ct_nofs, ct_diag, ct_active, ct_label, ct_external, ct_claim, ct_proc, ct_term ) VALUES ('ICD10-PCS' , 106, 106, 12, 'ICD10', 1, 0, 0, 0, 0, 'ICD10 Procedure/Service', 6, 1, 1, 0); +INSERT INTO code_types (ct_key, ct_id, ct_seq, ct_mod, ct_just, ct_fee, ct_rel, ct_nofs, ct_diag, ct_active, ct_label, ct_external, ct_claim, ct_proc, ct_term ) VALUES ('SNOMED-CT' , 107, 107, 0, '', 0, 0, 0, 0, 0, 'SNOMED Clinical Term', 7, 0, 0, 1); INSERT INTO list_options ( list_id, option_id, title, seq ) VALUES ('lists', 'code_types', 'Code Types', 1); @@ -5445,12 +5448,14 @@ INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ( INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('disclosure_type', 'disclosure-healthcareoperations', 'Health Care Operations', 30, 0); INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists' ,'smoking_status','Smoking Status', 1,0); -INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('smoking_status', '1', 'Current every day smoker', 10, 0); -INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('smoking_status', '2', 'Current some day smoker', 20, 0); -INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('smoking_status', '3', 'Former smoker', 30, 0); -INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('smoking_status', '4', 'Never smoker', 40, 0); -INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('smoking_status', '5', 'Smoker, current status unknown', 50, 0); -INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('smoking_status', '9', 'Unknown if ever smoked', 60, 0); +INSERT INTO list_options ( list_id, option_id, title, seq, is_default, codes ) VALUES ('smoking_status', '1', 'Current every day smoker', 10, 0, 'SNOMED-CT:449868002'); +INSERT INTO list_options ( list_id, option_id, title, seq, is_default, codes ) VALUES ('smoking_status', '2', 'Current some day smoker', 20, 0, 'SNOMED-CT:428041000124106'); +INSERT INTO list_options ( list_id, option_id, title, seq, is_default, codes ) VALUES ('smoking_status', '3', 'Former smoker', 30, 0, 'SNOMED-CT:8517006'); +INSERT INTO list_options ( list_id, option_id, title, seq, is_default, codes ) VALUES ('smoking_status', '4', 'Never smoker', 40, 0, 'SNOMED-CT:266919005'); +INSERT INTO list_options ( list_id, option_id, title, seq, is_default, codes ) VALUES ('smoking_status', '5', 'Smoker, current status unknown', 50, 0, 'SNOMED-CT:77176002'); +INSERT INTO list_options ( list_id, option_id, title, seq, is_default, codes ) VALUES ('smoking_status', '9', 'Unknown if ever smoked', 60, 0, 'SNOMED-CT:266927001'); +INSERT INTO list_options ( list_id, option_id, title, seq, is_default, codes ) VALUES ('smoking_status', '15', 'Heavy tobacco smoker', 70, 0, 'SNOMED-CT:428071000124103'); +INSERT INTO list_options ( list_id, option_id, title, seq, is_default, codes ) VALUES ('smoking_status', '16', 'Light tobacco smoker', 80, 0, 'SNOMED-CT:428061000124105'); INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists' ,'race','Race', 1,0); INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('race', 'amer_ind_or_alaska_native', 'American Indian or Alaska Native', 10, 0); diff --git a/version.php b/version.php index 695233fb0bc..fcd3456ee96 100644 --- a/version.php +++ b/version.php @@ -17,7 +17,7 @@ // is a database change in the course of development. It is used // internally to determine when a database upgrade is needed. // -$v_database = 83; +$v_database = 84; // Access control version identifier, this is to be incremented whenever there // is a access control change in the course of development. It is used