forked from openemr/openemr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
encounter.inc
33 lines (25 loc) · 699 Bytes
/
encounter.inc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php
include_once("../../globals.php");
include_once("$srcdir/forms.inc");
//function called to set the global session variable for encounter number
function setencounter($enc) {
$return_val = 1;
global $encounter;
global $pid;
if ($enc == "" ) {
$enc = date("Ymd");
if (getFormByEncounter($pid,$enc)) {
//there is an encounter enterred for today
} else {
//addForm($enc, "New Patient Encounter", 0, $pid, 1);
$return_val = 0;
}
}
$_SESSION['encounter']=$enc;
$encounter=$enc;
//returns 1 on successful global set, or 0 if there was no
//current encounter, signifying that the interface should load
//the screen for a new encounter
return $return_val;
}
?>