Fixed bug: https://sourceforge.net/p/openemr/bugs/416/
[openemr.git] / interface / patient_file / encounter / patient_encounter.php
blobdcea07ed349a27b5493631ff33250680bb775c86
1 <?php
2 //this code takes care of automatically loading the appropriate
3 //code page, depending on where the user is coming back from
4 //for example, if the user clicked on the CPT Custom code editor,
5 //we should automatically load the cpt custom codes screen,
6 //not just a default. however, if it is not set, we default to
7 //the custom icd9 codes
8 if (!isset($_GET["codefrom"]) ) {
9 $code_page = "superbill";
10 } else {
11 $code_page = $_GET["codefrom"];
14 include_once("../../globals.php");
16 // Session pid must be right.
18 include_once("$srcdir/pid.inc");
19 if ($_GET["set_pid"] && $_GET["set_pid"] != $_SESSION["pid"]) {
20 setpid($_GET["set_pid"]);
22 else if ($_GET["pid"] && $_GET["pid"] != $_SESSION["pid"]) {
23 setpid($_GET["pid"]);
26 include_once("$srcdir/encounter.inc");
29 //only set the global encounter variable if it has been explicityly passed
30 //thru the url, ie. from the history interface - otherwise, assume
31 //that the page refresh is a local interface update that is not meant
32 //to update the encounter variable
33 if (isset($_GET["set_encounter"])) {
34 setencounter($_GET["set_encounter"]);
36 <HTML>
37 <head>
38 <?php html_header_show();?>
39 <TITLE>
40 <?php xl('Patient Encounters','e'); ?>
41 </TITLE>
42 </HEAD>
43 <frameset rows="60%,40%" cols="*">
44 <frameset rows="*" cols="*,200">
45 <frame src="forms.php" name="Forms" scrolling="auto">
46 <frame src="new_form.php" name="New Form" scrolling="auto">
47 </frameset>
49 <frameset rows="*" cols="200,400,*">
50 <frame src="coding.php" name="Codesets" scrolling="auto">
51 <frame src="blank.php" name="Codes" scrolling="auto">
52 <frame src="diagnosis.php" name="Diagnosis" scrolling="auto">
53 </frameset>
55 </frameset>
56 <noframes><body bgcolor="#FFFFFF">
57 </body></noframes>
58 </HTML>
59 <?php
60 exit(0);
63 //this was either a user click on the encounter menu link
64 if (isset($_GET["mode"]) && $_GET["mode"] == "new") {
65 $enc = date("Ymd");
66 if (getFormByEncounter($pid,$enc)) {
67 //there is an encounter enterred for today
68 $encounter = $enc;
69 $_SESSION["encounter"] = $enc;
70 } else {
71 //no encounter for today yet
72 $encounter = "";
73 $_SESSION["encounter"] = "";
76 <HTML>
77 <head>
78 <?php html_header_show();?>
79 <TITLE>
80 <?php xl('New Patient Encounter','e'); ?>
81 </TITLE>
82 </HEAD>
83 <frameset rows="60%,40%" cols="*">
84 <frame src="<?php echo "$rootdir/forms/newpatient/new.php?autoloaded=1&calenc=".$_GET["calenc"].""; ?>" name="New" scrolling="auto">
85 <frame src="<?php echo "$rootdir/patient_file/history/encounters.php";?>" name="Diagnosis" scrolling="auto">
86 </frameset>
87 <noframes><body bgcolor="#FFFFFF">
88 </body></noframes>
89 </HTML>
91 <?php
92 exit(0);
98 <HTML>
99 <head>
100 <?php html_header_show();?>
101 <TITLE>
102 <?php xl('Patient Encounters','e'); ?>
103 </TITLE>
104 </HEAD>
105 <frameset rows="60%,40%" cols="*">
106 <frameset rows="*" cols="*,200">
107 <frame src="forms.php" name="Forms" scrolling="auto">
108 <frame src="new_form.php" name="New Form" scrolling="auto">
109 </frameset>
111 <frameset rows="*" cols="200,400,*">
112 <frame src="coding.php" name="Codesets" scrolling="auto">
113 <frame src="blank.php" name="Codes" scrolling="auto">
114 <frame src="diagnosis.php" name="Diagnosis" scrolling="auto">
115 </frameset>
117 </frameset>
118 <noframes><body bgcolor="#FFFFFF">
119 </body></noframes>
120 </HTML>