continue;
    }
    if (is_file($this_file)) {
        handle_zip_file($db, $this_file);
    }
}
// load the database
if ($db == 'RXNORM') {
    if (!rxnorm_import(IS_WINDOWS)) {
        echo htmlspecialchars(xl('ERROR: Unable to load the file into the database.'), ENT_NOQUOTES) . "<br>";
        temp_dir_cleanup($db);
        exit;
    }
} else {
    if ($db == 'SNOMED') {
        if (!snomed_import()) {
            echo htmlspecialchars(xl('ERROR: Unable to load the file into the database.'), ENT_NOQUOTES) . "<br>";
            temp_dir_cleanup($db);
            exit;
        }
    } else {
        //$db == 'ICD'
        if (!icd_import($db)) {
            echo htmlspecialchars(xl('ERROR: Unable to load the file into the database.'), ENT_NOQUOTES) . "<br>";
            temp_dir_cleanup($db);
            exit;
        }
    }
}
// set the revision version in the database
if (!update_tracker_table($db, $file_revision_date, $version, $file_checksum)) {
Exemplo n.º 2
0
    if (!rxnorm_import(IS_WINDOWS)) {
        echo htmlspecialchars(xl('ERROR: Unable to load the file into the database.'), ENT_NOQUOTES) . "<br>";
        temp_dir_cleanup($db);
        exit;
    }
} else {
    if ($db == 'SNOMED') {
        if ($version == "US Extension") {
            if (!snomed_import(TRUE)) {
                echo htmlspecialchars(xl('ERROR: Unable to load the file into the database.'), ENT_NOQUOTES) . "<br>";
                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) . "<br>";
                temp_dir_cleanup($db);
                exit;
            }
        }
    } else {
        if ($db == 'CQM_VALUESET') {
            if (!valueset_import($db)) {
                echo htmlspecialchars(xl('ERROR: Unable to load the file into the database.'), ENT_NOQUOTES) . "<br>";
                temp_dir_cleanup($db);
                exit;
            }
        } else {
            //$db == 'ICD'
            if (!icd_import($db)) {