4 * This script services requests for UDI (Unique Device Identifier)
5 * within OpenEMR. All returns are done via json.
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;
28 (new SystemLogger())->error("OpenEMR ERROR: Called udi.php script without sending a udi");
32 echo MedicalDevice
::createStandardJson($udi);