bug fixins (#1951)
[openemr.git] / interface / code_systems / list_installed.php
blobc59fe750505d5eb63ff9243efa5eba5dfd482156
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.g.miller@gmail.com>
24 * @link http://www.open-emr.org
30 require_once("../../interface/globals.php");
31 require_once("$srcdir/acl.inc");
33 // Control access
34 if (!acl_check('admin', 'super')) {
35 echo xlt('Not Authorized');
36 exit;
39 $db = isset($_GET['db']) ? $_GET['db'] : '0';
41 // Ordering by the imported_date with tiebreaker being the revision_date
42 $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 `imported_date` DESC, `revision_date` DESC", array($db));
43 for ($iter=0; $row=sqlFetchArray($rez); $iter++) {
44 $sqlReturn[$iter]=$row;
47 if (empty($sqlReturn)) {
49 <div class="stg"><?php echo xlt("Not installed"); ?></div>
50 <?php
51 } else {
52 if ($sqlReturn[0]['name'] == 'SNOMED' && $sqlReturn[0]['revision_version'] == 'US Extension') {
53 // If using the SNOMED US Extension package, then show the preceding SNOMED International Package information first
55 <div class="atr"><?php echo xlt("Name") . ": " . text($sqlReturn[1]['name']); ?> </div>
56 <div class="atr"><?php echo xlt("Revision") . ": " . text($sqlReturn[1]['revision_version']); ?> </div>
57 <div class="atr"><?php echo xlt("Release Date") . ": " . text($sqlReturn[1]['revision_date']); ?> </div>
58 <br>
59 <?php
62 // Always show the first item of query results
64 <div class="atr"><?php echo xlt("Name") . ": " . text($sqlReturn[0]['name']); ?> </div>
65 <div class="atr"><?php echo xlt("Revision") . ": " . text($sqlReturn[0]['revision_version']); ?> </div>
66 <div class="atr"><?php echo xlt("Release Date") . ": " . text($sqlReturn[0]['revision_date']); ?> </div>
67 <?php