diff --git a/interface/code_systems/list_staged.php b/interface/code_systems/list_staged.php index abce933f212..41c1958525b 100644 --- a/interface/code_systems/list_staged.php +++ b/interface/code_systems/list_staged.php @@ -239,7 +239,7 @@ $supported_file = 1; } } elseif ($db == 'CQM_VALUESET') { - if (preg_match("/ep_.*_cms_([0-9]{8}).xml.zip/", $file, $matches)) { + if (preg_match("/e[p,c]_.*_cms_([0-9]{8}).xml.zip/", $file, $matches)) { $version = "Standard"; $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]); diff --git a/library/standard_tables_capture.inc.php b/library/standard_tables_capture.inc.php index 633d8eda55b..72eaeb57345 100644 --- a/library/standard_tables_capture.inc.php +++ b/library/standard_tables_capture.inc.php @@ -612,9 +612,13 @@ function valueset_import($type) sqlStatementNoLog("START TRANSACTION"); if (is_dir($dir) && $handle = opendir($dir)) { while (false !== ($filename = readdir($handle))) { + // skip the zip file that's in the tmp file dir + if (stripos($filename, ".zip")) { + continue; + } if (stripos($filename, ".xml")) { $abs_path = $dir . $filename; - $xml = simplexml_load_file($abs_path, null, null, 'ns0', true); + $xml = simplexml_load_file($abs_path, null, 0, 'ns0', true); foreach ($xml->DescribedValueSet as $vset) { $vset_attr = $vset->attributes(); $nqf = $vset->xpath('ns0:Group[@displayName="NQF Number"]/ns0:Keyword'); @@ -628,13 +632,13 @@ function valueset_import($type) description = values(description), valueset_name = values(valueset_name)", array( - $nqf_code, - $con_attr->code, - $con_attr->codeSystem, - $con_attr->codeSystemName, - $vset_attr->ID, - $con_attr->displayName, - $vset_attr->displayName + (string) $nqf_code, + (string) $con_attr->code, + (string) $con_attr->codeSystem, + (string) $con_attr->codeSystemName, + (string) $vset_attr->ID, + (string) $con_attr->displayName, + (string) $vset_attr->displayName ) ); sqlStatementNoLog( @@ -643,13 +647,13 @@ function valueset_import($type) description = values(description), valueset_name = values(valueset_name)", array( - $nqf_code, - $vset_attr->ID, - $con_attr->codeSystem, + (string) $nqf_code, + (string) $vset_attr->ID, + (string) $con_attr->codeSystem, 'OID', - $vset_attr->ID, - $vset_attr->displayName, - $vset_attr->displayName + (string) $vset_attr->ID, + (string) $vset_attr->displayName, + (string) $vset_attr->displayName ) ); } diff --git a/sql/7_0_2-to-7_0_3_upgrade.sql b/sql/7_0_2-to-7_0_3_upgrade.sql index f5b978f9e44..b691d726219 100644 --- a/sql/7_0_2-to-7_0_3_upgrade.sql +++ b/sql/7_0_2-to-7_0_3_upgrade.sql @@ -113,3 +113,7 @@ ALTER TABLE `form_encounter` ADD `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; #EndIf +#IfNotRow4D supported_external_dataloads load_type CQM_VALUESET load_source NIH_VSAC load_release_date 2023-05-04 load_filename ec_only_cms_20230504.xml.zip +INSERT INTO `supported_external_dataloads` (`load_type`, `load_source`, `load_release_date`, `load_filename`, `load_checksum`) VALUES +('CQM_VALUESET', 'NIH_VSAC', '2023-05-04', 'ec_only_cms_20230504.xml.zip', 'b77b3c2a88d23de0ec427c1cfc5088ce'); +#EndIf \ No newline at end of file diff --git a/sql/database.sql b/sql/database.sql index d5f018584dd..b831cec5f6c 100644 --- a/sql/database.sql +++ b/sql/database.sql @@ -8798,6 +8798,8 @@ INSERT INTO `supported_external_dataloads` (`load_type`, `load_source`, `load_re ('ICD10', 'CMS', '2023-10-01', 'Code Descriptions.zip', '15404ef88e0ffa15474e6d6076aa0a8a'); INSERT INTO `supported_external_dataloads` (`load_type`, `load_source`, `load_release_date`, `load_filename`, `load_checksum`) VALUES ('ICD10', 'CMS', '2023-10-01', 'Zip File 3 2024 ICD-10-PCS Codes File.zip', '30e096ed9971755c4dfc134b938f3c1f'); +INSERT INTO `supported_external_dataloads` (`load_type`, `load_source`, `load_release_date`, `load_filename`, `load_checksum`) VALUES +('CQM_VALUESET', 'NIH_VSAC', '2023-05-04', 'ec_only_cms_20230504.xml.zip', 'b77b3c2a88d23de0ec427c1cfc5088ce'); -- -------------------------------------------------------- -- diff --git a/version.php b/version.php index 6f335dedeed..4add1321b8f 100644 --- a/version.php +++ b/version.php @@ -28,7 +28,7 @@ // is a database change in the course of development. It is used // internally to determine when a database upgrade is needed. // -$v_database = 501; +$v_database = 502; // Access control version identifier, this is to be incremented whenever there // is a access control change in the course of development. It is used