Add payor information for FHIR Coverage Endpoint (#7685)
[openemr.git] / interface / forms / note / save.php
blobc9992263b66532dc5cd7a1caa1e3b680a47996b6
1 <?php
3 /*
4 * Work/School Note Form save.php
6 * @package OpenEMR
7 * @link http://www.open-emr.org
8 * @author Nikolai Vitsyn
9 * @author Brady Miller <brady.g.miller@gmail.com>
10 * @copyright Copyright (c) 2004-2005 Nikolai Vitsyn
11 * @copyright Copyright (c) 2019 Brady Miller <brady.g.miller@gmail.com>
12 * @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3
16 require_once(__DIR__ . "/../../globals.php");
17 require_once("$srcdir/api.inc.php");
18 require_once("$srcdir/forms.inc.php");
20 use OpenEMR\Common\Csrf\CsrfUtils;
22 if (!CsrfUtils::verifyCsrfToken($_POST["csrf_token_form"])) {
23 CsrfUtils::csrfNotVerified();
27 * name of the database table associated with this form
29 $table_name = "form_note";
31 if ($encounter == "") {
32 $encounter = date("Ymd");
35 $_POST['date_of_signature'] = DateToYYYYMMDD($_POST['date_of_signature']);
37 if ($_GET["mode"] == "new") {
38 $newid = formSubmit($table_name, $_POST, $_GET["id"] ?? '', $userauthorized);
39 addForm($encounter, "Work/School Note", $newid, "note", $pid, $userauthorized);
40 } elseif ($_GET["mode"] == "update") {
41 $success = formUpdate($table_name, $_POST, $_GET["id"], $userauthorized);
44 formHeader("Redirecting....");
45 formJump();
46 formFooter();