chore: ci mariadb stuff - added 11.1 and removed 10.9 (#6834)
[openemr.git] / library / ajax / udi.php
blob8feec10e50c29e4c0b67fbc6b3996543901995d7
1 <?php
3 /**
4 * This script services requests for UDI (Unique Device Identifier)
5 * within OpenEMR. All returns are done via json.
7 * @package OpenEMR
8 * @link https://www.open-emr.org
9 * @author Brady Miller <brady.g.miller@gmail.com>
10 * @copyright Copyright (c) 2021 Brady Miller <brady.g.miller@gmail.com>
11 * @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3
14 require_once("../../interface/globals.php");
16 use OpenEMR\Common\Csrf\CsrfUtils;
17 use OpenEMR\Common\Logging\SystemLogger;
18 use OpenEMR\MedicalDevice\MedicalDevice;
20 header('Content-type: application/json');
22 if (!CsrfUtils::verifyCsrfToken($_GET["csrf_token_form"], 'udi')) {
23 CsrfUtils::csrfNotVerified(false);
26 $udi = $_GET["udi"] ?? null;
27 if (empty($udi)) {
28 (new SystemLogger())->error("OpenEMR ERROR: Called udi.php script without sending a udi");
29 die;
32 echo MedicalDevice::createStandardJson($udi);
33 exit;