476a2f1bfe0a5a5b4994a19d1aa866c07de1c5ac
[openemr.git] / interface / code_systems / list_installed.php
blob476a2f1bfe0a5a5b4994a19d1aa866c07de1c5ac
1 <?php
2 /**
3 * This file implements the main jquery interface for loading external
4 * database files into openEMR
6 * Copyright (C) 2012 Patient Healthcare Analytics, Inc.
7 * Copyright (C) 2011 Phyaura, LLC <info@phyaura.com>
9 * LICENSE: This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * as published by the Free Software Foundation; either version 2
12 * of the License, or (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://opensource.org/licenses/gpl-license.php>;.
20 * @package OpenEMR
21 * @author (Mac) Kevin McAloon <mcaloon@patienthealthcareanalytics.com>
22 * @author Rohit Kumar <pandit.rohit@netsity.com>
23 * @author Brady Miller <brady@sparmy.com>
24 * @link http://www.open-emr.org
28 //SANITIZE ALL ESCAPES
29 $sanitize_all_escapes=true;
32 //STOP FAKE REGISTER GLOBALS
33 $fake_register_globals=false;
36 require_once("../../interface/globals.php");
37 require_once("$srcdir/acl.inc");
39 // Control access
40 if (!acl_check('admin', 'super')) {
41 echo xlt('Not Authorized');
42 exit;
45 $db = isset($_GET['db']) ? $_GET['db'] : '0';
47 // 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)
48 $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) );
49 if (empty($sqlReturn)) {
51 <div class="stg"><?php echo xlt("Not installed"); ?></div>
52 <?php
53 } else {
54 $notInstalled = 0;
56 <div class="atr"><?php echo xlt("Name") . ": " . text($sqlReturn['name']); ?> </div>
57 <div class="atr"><?php echo xlt("Revision") . ": " . text($sqlReturn['revision_version']); ?> </div>
58 <div class="atr"><?php echo xlt("Release Date") . ": " . text($sqlReturn['revision_date']); ?> </div>
59 <?php