Added 3 forms (Aftercare Plan, Transfer Summary, Treatment Plan)
authornaina <naina@capminds.com>
Wed, 9 Jan 2013 06:50:49 +0000 (9 12:20 +0530)
committerbradymiller <bradymiller@users.sourceforge.net>
Wed, 9 Jan 2013 11:23:17 +0000 (9 03:23 -0800)
18 files changed:
interface/forms/aftercare_plan/info.txt [new file with mode: 0644]
interface/forms/aftercare_plan/new.php [new file with mode: 0644]
interface/forms/aftercare_plan/report.php [new file with mode: 0644]
interface/forms/aftercare_plan/save.php [new file with mode: 0644]
interface/forms/aftercare_plan/table.sql [new file with mode: 0644]
interface/forms/aftercare_plan/view.php [new file with mode: 0644]
interface/forms/transfer_summary/info.txt [new file with mode: 0644]
interface/forms/transfer_summary/new.php [new file with mode: 0644]
interface/forms/transfer_summary/report.php [new file with mode: 0644]
interface/forms/transfer_summary/save.php [new file with mode: 0644]
interface/forms/transfer_summary/table.sql [new file with mode: 0644]
interface/forms/transfer_summary/view.php [new file with mode: 0644]
interface/forms/treatment_plan/info.txt [new file with mode: 0644]
interface/forms/treatment_plan/new.php [new file with mode: 0644]
interface/forms/treatment_plan/report.php [new file with mode: 0644]
interface/forms/treatment_plan/save.php [new file with mode: 0644]
interface/forms/treatment_plan/table.sql [new file with mode: 0644]
interface/forms/treatment_plan/view.php [new file with mode: 0644]

diff --git a/interface/forms/aftercare_plan/info.txt b/interface/forms/aftercare_plan/info.txt
new file mode 100644 (file)
index 0000000..6e482a2
--- /dev/null
@@ -0,0 +1 @@
+Aftercare Plan
\ No newline at end of file
diff --git a/interface/forms/aftercare_plan/new.php b/interface/forms/aftercare_plan/new.php
new file mode 100644 (file)
index 0000000..960af03
--- /dev/null
@@ -0,0 +1,193 @@
+<?php
+/**
+ *
+ * Copyright (C) 2012-2013 Naina Mohamed <naina@capminds.com> CapMinds Technologies
+ *
+ * LICENSE: This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://opensource.org/licenses/gpl-license.php>;.
+ *
+ * @package OpenEMR
+ * @author  Naina Mohamed <naina@capminds.com>
+ * @link    http://www.open-emr.org
+ */
+//SANITIZE ALL ESCAPES
+$sanitize_all_escapes=true;
+
+//STOP FAKE REGISTER GLOBALS
+$fake_register_globals=false;
+
+include_once("../../globals.php");
+include_once("$srcdir/api.inc");
+require_once("$srcdir/patient.inc");
+require_once("$srcdir/options.inc.php");
+require_once("$srcdir/htmlspecialchars.inc.php");
+formHeader("Form:AfterCare Planning");
+$returnurl = $GLOBALS['concurrent_layout'] ? 'encounter_top.php' : 'patient_encounter.php';
+$formid = 0 + (isset($_GET['id']) ? $_GET['id'] : '');
+$obj = $formid ? formFetch("form_aftercare_plan", $formid) : array();
+
+?>
+<html>
+<head>
+<?php html_header_show();?>
+<script type="text/javascript" src="../../../library/dialog.js"></script>
+<!-- pop up calendar -->
+<style type="text/css">@import url(<?php echo $GLOBALS['webroot'] ?>/library/dynarch_calendar.css);</style>
+<script type="text/javascript" src="<?php echo $GLOBALS['webroot'] ?>/library/dynarch_calendar.js"></script>
+<?php include_once("{$GLOBALS['srcdir']}/dynarch_calendar_en.inc.php"); ?>
+<script type="text/javascript" src="<?php echo $GLOBALS['webroot'] ?>/library/dynarch_calendar_setup.js"></script>
+<script type="text/javascript" src="<?php echo $GLOBALS['webroot'] ?>/library/textformat.js"></script>
+<script type="text/javascript" src="<?php echo $GLOBALS['webroot'] ?>/library/dialog.js"></script>
+<link rel="stylesheet" href="<?php echo $css_header;?>" type="text/css">
+</head>
+<body class="body_top">
+<p><span class="forms-title"><?php echo xlt('AfterCare Planning'); ?></span></p>
+</br>
+<?php
+echo "<form method='post' name='my_form' " .
+  "action='$rootdir/forms/aftercare_plan/save.php?id=" . attr($formid) ."'>\n";
+?>
+<table  border="0">
+<tr>
+<td align="left" class="forms" class="forms"><?php echo xlt('Client Name' ); ?>:</td>
+               <td class="forms">
+                       <label class="forms-data"> <?php if (is_numeric($pid)) {
+    
+    $result = getPatientData($pid, "fname,lname,squad");
+   echo htmlspecialchars(text($result['fname'])." ".text($result['lname']));}
+   $patient_name=($result['fname'])." ".($result['lname']);
+   ?>
+   </label>
+   <input type="hidden" name="client_name" value="<?php echo attr($patient_name);?>">
+               </td>
+               <td align="left"  class="forms"><?php echo xlt('DOB'); ?>:</td>
+               <td class="forms">
+               <label class="forms-data"> <?php if (is_numeric($pid)) {
+    
+    $result = getPatientData($pid, "*");
+   echo htmlspecialchars($result['DOB']);}
+   $dob=($result['DOB']);
+   ?>
+   </label>
+     <input type="hidden" name="DOB" value="<?php echo attr($dob);?>">
+               </td>
+               </tr>
+<tr>
+       
+               
+  <td align="left" class="forms"><?php echo xlt('Admit Date'); ?>:</td>
+               <td class="forms">
+                          <input type='text' size='10' name='admit_date' id='admission_date' <?php echo attr($disabled); ?>;
+                          value='<?php echo attr($obj{"admit_date"}); ?>'   
+                          title='<?php echo xla('yyyy-mm-dd Date of service'); ?>'
+       onkeyup='datekeyup(this,mypcc)' onblur='dateblur(this,mypcc)' />
+        <img src='../../pic/show_calendar.gif' align='absbottom' width='24' height='22'
+        id='img_admission_date' border='0' alt='[?]' style='cursor:pointer;cursor:hand'
+        title='<?php echo xla('Click here to choose a date'); ?>'>
+               </td>
+
+       
+       
+               <td align="left" class="forms"><?php echo xl('Discharged'); ?>:</td>
+               <td class="forms">
+                          <input type='text' size='10' name='discharged' id='discharge_date' <?php echo attr($disabled); ?>;
+      value='<?php echo attr($obj{"discharged"}); ?>'
+       title='<?php echo xla('yyyy-mm-dd Date of service'); ?>'
+       onkeyup='datekeyup(this,mypcc)' onblur='dateblur(this,mypcc)' />
+        <img src='../../pic/show_calendar.gif' align='absbottom' width='24' height='22'
+        id='img_discharge_date' border='0' alt='[?]' style='cursor:pointer;cursor:hand'
+        title='<?php echo xla('Click here to choose a date'); ?>'>
+               </td>
+       </tr>
+       <tr>
+               <td align="left colspan="3" style="padding-bottom:7px;"></td>
+       </tr>
+               <tr>
+               
+               <td class="forms-subtitle" colspan="4"><B><?php echo xlt('Goal and Methods');?></B></td>
+               
+       </tr>
+       <tr>
+               <td align="left colspan="3" style="padding-bottom:7px;"></td>
+       </tr>
+       <tr>
+               
+               <td class="forms-subtitle" colspan="4"><B><?php echo xlt('Goal A');?>:</B>&nbsp;<?php echo xlt('Acute Intoxication/Withdrawal'); ?></td>
+               
+       </tr>
+       <tr>
+               <td align="right" class="forms">1.</td>
+               <td colspan="3"><textarea name="goal_a_acute_intoxication" rows="2" cols="80" wrap="virtual name"><?php echo text($obj{"goal_a_acute_intoxication"});?></textarea></td>
+               
+       </tr>
+       <tr>
+               <td align="right" class="forms">2.</td>
+               <td colspan="3"><textarea name="goal_a_acute_intoxication_I" rows="2" cols="80" wrap="virtual name"><?php echo text($obj{"goal_a_acute_intoxication_I"});?></textarea></td>
+               
+       </tr>
+       <tr>
+               <td align="right" class="forms">3.</td>
+               <td colspan="3"><textarea name="goal_a_acute_intoxication_II" rows="2" cols="80" wrap="virtual name"><?php echo text($obj{"goal_a_acute_intoxication_II"});?></textarea></td>
+               
+       
+       <tr>
+               
+               <td class="forms-subtitle" colspan="4"><B><?php echo xlt('Goal B');?>:</B>&nbsp;<?php  echo xlt('Emotional / Behavioral Conditions & Complications'); ?></td>
+               
+       </tr>
+       <tr>
+               <td align="right" class="forms">1.</td>
+               <td colspan="3"><textarea name="goal_b_emotional_behavioral_conditions" rows="2" cols="80" wrap="virtual name"><?php echo text($obj{"goal_b_emotional_behavioral_conditions"});?></textarea></td>
+               
+       </tr>
+       <tr>
+               <td align="right" class="forms">2.</td>
+               <td colspan="3"><textarea name="goal_b_emotional_behavioral_conditions_I" rows="2" cols="80" wrap="virtual name"><?php echo text($obj{"goal_b_emotional_behavioral_conditions_I"});?></textarea></td>
+               
+       </tr>
+       
+               
+               <td class="forms-subtitle" colspan="4"><B><?php echo xlt('Goal C');?>:</B>&nbsp;<?php  echo xlt('Relapse Potential'); ?></td>
+               
+       </tr>
+       <tr>
+               <td align="right" class="forms">1.</td>
+               <td colspan="3"><textarea name="goal_c_relapse_potential" rows="2" cols="80" wrap="virtual name"><?php echo text($obj{"goal_c_relapse_potential"});?></textarea></td>
+               
+       </tr>
+       <tr>
+               <td align="right" class="forms">2.</td>
+               <td colspan="3"><textarea name="goal_c_relapse_potential_I" rows="2" cols="80" wrap="virtual name"><?php echo text($obj{"goal_c_relapse_potential_I"});?></textarea></td>
+               
+       </tr>
+
+       <tr>
+               <td align="left colspan="3" style="padding-bottom:7px;"></td>
+       </tr>
+       <tr>
+               <td></td>
+    <td><input type='submit'  value='<?php echo xlt('Save');?>' class="button-css">&nbsp;
+<input type='button'  value="Print" onclick="window.print()" class="button-css">&nbsp;
+       <input type='button' class="button-css" value='<?php echo xlt('Cancel');?>'
+ onclick="top.restoreSession();location='<?php echo "$rootdir/patient_file/encounter/$returnurl" ?>'" /></td>
+       </tr>
+</table>
+</form>
+<script language="javascript">
+/* required for popup calendar */
+Calendar.setup({inputField:"admission_date", ifFormat:"%Y-%m-%d", button:"img_admission_date"});
+Calendar.setup({inputField:"discharge_date", ifFormat:"%Y-%m-%d", button:"img_discharge_date"});
+</script>
+<?php
+formFooter();
+?>
diff --git a/interface/forms/aftercare_plan/report.php b/interface/forms/aftercare_plan/report.php
new file mode 100644 (file)
index 0000000..0c0de15
--- /dev/null
@@ -0,0 +1,48 @@
+<?php
+/**
+ *
+ * Copyright (C) 2012-2013 Naina Mohamed <naina@capminds.com> CapMinds Technologies
+ *
+ * LICENSE: This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://opensource.org/licenses/gpl-license.php>;.
+ *
+ * @package OpenEMR
+ * @author  Naina Mohamed <naina@capminds.com>
+ * @link    http://www.open-emr.org
+ */
+
+include_once("../../globals.php");
+include_once($GLOBALS["srcdir"]."/api.inc");
+function aftercare_plan_report( $pid, $encounter, $cols, $id) {
+$count = 0;
+$data = formFetch("form_aftercare_plan", $id);
+if ($data) {
+print "<table><tr>";
+foreach($data as $key => $value) {
+if ($key == "id" || $key == "pid" || $key == "user" || $key == "groupname" || $key == "authorized" || $key == "activity" || $key == "date" || $value == "" || $value == "0000-00-00 00:00:00") {
+       continue;
+}
+if ($value == "on") {
+$value = "yes";
+}
+$key=ucwords(str_replace("_"," ",$key));
+print "<td><span class=bold>".xlt($key). ": </span><span class=text>".text($value)."</span></td>";
+$count++;
+if ($count == $cols) {
+$count = 0;
+print "</tr><tr>\n";
+}
+}
+}
+print "</tr></table>";
+}
+?> 
diff --git a/interface/forms/aftercare_plan/save.php b/interface/forms/aftercare_plan/save.php
new file mode 100644 (file)
index 0000000..b513009
--- /dev/null
@@ -0,0 +1,68 @@
+<?php
+/**
+ *
+ * Copyright (C) 2012-2013 Naina Mohamed <naina@capminds.com> CapMinds Technologies
+ *
+ * LICENSE: This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://opensource.org/licenses/gpl-license.php>;.
+ *
+ * @package OpenEMR
+ * @author  Naina Mohamed <naina@capminds.com>
+ * @link    http://www.open-emr.org
+ */
+ //SANITIZE ALL ESCAPES
+ $sanitize_all_escapes=$_POST['true'];
+
+ //STOP FAKE REGISTER GLOBALS
+ $fake_register_globals=$_POST['false'];
+
+include_once("../../globals.php");
+include_once("$srcdir/api.inc");
+include_once("$srcdir/forms.inc");
+require_once("$srcdir/htmlspecialchars.inc.php");
+require_once("$srcdir/formdata.inc.php");
+
+if (! $encounter) { // comes from globals.php
+ die(xl("Internal error: we do not seem to be in an encounter!"));
+}
+$id = 0 + (isset($_GET['id']) ? $_GET['id'] : '');
+
+$sets = "pid = {$_SESSION["pid"]},
+  groupname = '" . $_SESSION["authProvider"] . "',
+  user = '" . $_SESSION["authUser"] . "',
+  authorized = $userauthorized, activity=1, date = NOW(),
+  provider          =  '" . add_escape_custom(formData("provider")) . "',
+  client_name          = '" . add_escape_custom(formData("client_name")) . "',
+  admit_date          = '" . add_escape_custom(formData("admit_date")) . "',
+  discharged          = '" . add_escape_custom(formData("discharged")) . "',
+  goal_a_acute_intoxication          =  '" . add_escape_custom(formData("goal_a_acute_intoxication")) . "',
+  goal_a_acute_intoxication_I          = '" . add_escape_custom(formData("goal_a_acute_intoxication_I")) . "',
+  goal_a_acute_intoxication_II          =  '" . add_escape_custom(formData("goal_a_acute_intoxication_II")) . "',
+  goal_b_emotional_behavioral_conditions          =  '" . add_escape_custom(formData("goal_b_emotional_behavioral_conditions")) . "',
+  goal_b_emotional_behavioral_conditions_I          = '" . add_escape_custom(formData("goal_b_emotional_behavioral_conditions_I")) . "',
+  goal_c_relapse_potential                           = '" . add_escape_custom(formData("goal_c_relapse_potential")) . "',
+  goal_c_relapse_potential_I                    =  '" . add_escape_custom(formData("goal_c_relapse_potential_I")) . "'";
+
+  
+  if (empty($id)) {
+  $newid = sqlInsert("INSERT INTO form_aftercare_plan SET $sets");
+  addForm($encounter, "Aftercare Plan", $newid, "aftercare_plan", $pid, $userauthorized);
+}
+else {
+  sqlStatement("UPDATE form_aftercare_plan SET $sets WHERE id = '". add_escape_custom("$id"). "'");
+}
+
+$_SESSION["encounter"] = htmlspecialchars($encounter);
+formHeader("Redirecting....");
+formJump();
+formFooter();
+?>
diff --git a/interface/forms/aftercare_plan/table.sql b/interface/forms/aftercare_plan/table.sql
new file mode 100644 (file)
index 0000000..4ce7ec1
--- /dev/null
@@ -0,0 +1,27 @@
+--
+-- Table structure for table `form_aftercare_plan`
+--
+
+CREATE TABLE IF NOT EXISTS `form_aftercare_plan` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT,
+  `date` datetime DEFAULT NULL,
+  `pid` bigint(20) DEFAULT NULL,
+  `user` varchar(255) DEFAULT NULL,
+  `provider` varchar(255) DEFAULT NULL,
+  `groupname` varchar(255) DEFAULT NULL,
+  `authorized` tinyint(4) DEFAULT NULL,
+  `activity` tinyint(4) DEFAULT NULL,
+  `client_name` varchar(255) DEFAULT NULL,
+  `admit_date` date DEFAULT NULL,
+  `discharged` date DEFAULT NULL,
+  `goal_a_acute_intoxication` text,
+  `goal_a_acute_intoxication_I` text,
+  `goal_a_acute_intoxication_II` text,
+  `goal_b_emotional_behavioral_conditions` text,
+  `goal_b_emotional_behavioral_conditions_I` text,
+  `goal_c_relapse_potential` text,
+  `goal_c_relapse_potential_I` text,
+  
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB;
+
diff --git a/interface/forms/aftercare_plan/view.php b/interface/forms/aftercare_plan/view.php
new file mode 100644 (file)
index 0000000..4927079
--- /dev/null
@@ -0,0 +1,3 @@
+<?php
+require("new.php");
+?>
diff --git a/interface/forms/transfer_summary/info.txt b/interface/forms/transfer_summary/info.txt
new file mode 100644 (file)
index 0000000..7997771
--- /dev/null
@@ -0,0 +1 @@
+Transfer Summary
\ No newline at end of file
diff --git a/interface/forms/transfer_summary/new.php b/interface/forms/transfer_summary/new.php
new file mode 100644 (file)
index 0000000..c100354
--- /dev/null
@@ -0,0 +1,161 @@
+<?php
+/**
+ *
+ * Copyright (C) 2012-2013 Naina Mohamed <naina@capminds.com> CapMinds Technologies
+ *
+ * LICENSE: This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://opensource.org/licenses/gpl-license.php>;.
+ *
+ * @package OpenEMR
+ * @author  Naina Mohamed <naina@capminds.com>
+ * @link    http://www.open-emr.org
+ */
+
+//SANITIZE ALL ESCAPES
+ $sanitize_all_escapes=true;
+
+ //STOP FAKE REGISTER GLOBALS
+ $fake_register_globals=false;
+include_once("../../globals.php");
+include_once("$srcdir/api.inc");
+require_once("$srcdir/patient.inc");
+require_once("$srcdir/options.inc.php");
+formHeader("Form:Transfer Summary");
+$returnurl = $GLOBALS['concurrent_layout'] ? 'encounter_top.php' : 'patient_encounter.php';
+$formid = 0 + (isset($_GET['id']) ? $_GET['id'] : '');
+$obj = $formid ? formFetch("form_transfer_summary", $formid) : array();
+
+?>
+<html>
+<head>
+<?php html_header_show();?>
+<script type="text/javascript" src="../../../library/dialog.js"></script>
+<!-- pop up calendar -->
+<style type="text/css">@import url(<?php echo $GLOBALS['webroot'] ?>/library/dynarch_calendar.css);</style>
+<script type="text/javascript" src="<?php echo $GLOBALS['webroot'] ?>/library/dynarch_calendar.js"></script>
+<?php include_once("{$GLOBALS['srcdir']}/dynarch_calendar_en.inc.php"); ?>
+<script type="text/javascript" src="<?php echo $GLOBALS['webroot'] ?>/library/dynarch_calendar_setup.js"></script>
+<script type="text/javascript" src="<?php echo $GLOBALS['webroot'] ?>/library/textformat.js"></script>
+<script type="text/javascript" src="<?php echo $GLOBALS['webroot'] ?>/library/dialog.js"></script>
+<link rel="stylesheet" href="<?php echo $css_header;?>" type="text/css">
+</head>
+
+<body class="body_top">
+<p><span class="forms-title"><?php echo xlt('Transfer Summary'); ?></span></p>
+</br>
+<?php
+echo "<form method='post' name='my_form' " .
+  "action='$rootdir/forms/transfer_summary/save.php?id=" . attr($formid) ."'>\n";
+?>
+<table  border="0">
+<tr>
+<td align="left" class="forms" class="forms"><?php echo xlt('Client Name' ); ?>:</td>
+               <td class="forms">
+                       <label class="forms-data"> <?php if (is_numeric($pid)) {
+    
+    $result = getPatientData($pid, "fname,lname,squad");
+   echo htmlspecialchars(xl('','','','').text($result['fname'])." ".text($result['lname']));}
+   $patient_name=($result['fname'])." ".($result['lname']);
+   ?>
+   </label>
+   <input type="hidden" name="client_name" value="<?php echo attr($patient_name);?>">
+               </td>
+               <td align="left"  class="forms"><?php echo xlt('DOB'); ?>:</td>
+               <td class="forms">
+               <label class="forms-data"> <?php if (is_numeric($pid)) {
+    
+    $result = getPatientData($pid, "*");
+   echo htmlspecialchars(($result['DOB']));}
+   $dob=($result['DOB']);
+   ?>
+   </label>
+     <input type="hidden" name="DOB" value="<?php echo attr($dob);?>">
+               </td>
+               </tr>
+       <tr>
+       
+       <td align="left" class="forms"><?php echo xlt('Transfer to'); ?>:</td>
+       
+        <td class="forms">
+                <input type="text" name="transfer_to" id="transfer_to" 
+               value="<?php echo text($obj{"transfer_to"});?>"></td>
+                
+               <td align="left" class="forms"><?php echo xlt('Transfer date'); ?>:</td>
+               <td class="forms">
+                          <input type='text' size='10' name='transfer_date' id='transfer_date' <?php echo attr ($disabled)?>;
+       value='<?php echo attr($obj{"transfer_date"}); ?>' 
+       title='<?php echo xla('yyyy-mm-dd Date of service'); ?>'
+       onkeyup='datekeyup(this,mypcc)' onblur='dateblur(this,mypcc)' />
+        <img src='../../pic/show_calendar.gif' align='absbottom' width='24' height='22'
+        id='img_transfer_date' border='0' alt='[?]' style='cursor:pointer;cursor:hand'
+        title='<?php echo xla('Click here to choose a date'); ?>'>
+               </td>
+
+       </tr>
+               
+       <tr>
+               <td align="left colspan="3" style="padding-bottom:7px;"></td>
+       </tr>
+       
+       <tr>
+               <td align="left" class="forms"><b><?php echo xlt('Status Of Admission'); ?>:</b></td>
+               <td colspan="3"><textarea name="status_of_admission" rows="3" cols="60" wrap="virtual name"><?php echo text($obj{"status_of_admission"});?></textarea></td>
+               </tr>
+               <tr>
+               <td align="left colspan="3" style="padding-bottom:7px;"></td>
+       </tr>
+       <tr>
+               <td align="left" class="forms"><b><?php echo xlt('Diagnosis'); ?>:</b></td>
+               <td colspan="3"><textarea name="diagnosis" rows="3" cols="60" wrap="virtual name"><?php echo text($obj{"diagnosis"});?></textarea></td>
+                       </tr>
+                       <tr>
+               <td align="left colspan="3" style="padding-bottom:7px;"></td>
+       </tr>
+       <tr>
+               <td align="left" class="forms"><b><?php echo xlt('Intervention Provided'); ?>:</b></td>
+               <td colspan="3"><textarea name="intervention_provided" rows="3" cols="60" wrap="virtual name"><?php echo text($obj{"intervention_provided"});?></textarea></td>
+       </tr>
+       <tr>
+               <td align="left colspan="3" style="padding-bottom:7px;"></td>
+       </tr>
+       <tr>
+               <td align="left" class="forms"><b><?php echo xlt('Overall Status Of Discharge'); ?>:</b></td>
+               <td colspan="3"><textarea name="overall_status_of_discharge" rows="3" cols="60" wrap="virtual name"><?php echo text($obj{"overall_status_of_discharge"});?></textarea></td>
+       </tr>
+       
+<tr>
+               <td align="left colspan="3" style="padding-bottom:7px;"></td>
+       </tr>
+       
+       <tr>
+               <td align="left colspan="3" style="padding-bottom:7px;"></td>
+       </tr>
+       <tr>
+               <td></td>
+    <td><input type='submit'  value='<?php echo xlt('Save');?>' class="button-css">&nbsp;
+        <input type='button'  value="Print" onclick="window.print()" class="button-css">&nbsp;
+       <input type='button' class="button-css" value='<?php echo xlt('Cancel');?>'
+ onclick="top.restoreSession();location='<?php echo "$rootdir/patient_file/encounter/$returnurl" ?>'" />
+
+ </td>
+       </tr>
+</table>
+</form>
+
+<script language="javascript">
+/* required for popup calendar */
+Calendar.setup({inputField:"transfer_date", ifFormat:"%Y-%m-%d", button:"img_transfer_date"});
+
+</script>
+<?php
+formFooter();
+?>
diff --git a/interface/forms/transfer_summary/report.php b/interface/forms/transfer_summary/report.php
new file mode 100644 (file)
index 0000000..b9e9a53
--- /dev/null
@@ -0,0 +1,49 @@
+<?php
+/**
+ *
+ * Copyright (C) 2012-2013 Naina Mohamed <naina@capminds.com> CapMinds Technologies
+ *
+ * LICENSE: This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://opensource.org/licenses/gpl-license.php>;.
+ *
+ * @package OpenEMR
+ * @author  Naina Mohamed <naina@capminds.com>
+ * @link    http://www.open-emr.org
+ */
+
+
+include_once("../../globals.php");
+include_once($GLOBALS["srcdir"]."/api.inc");
+function transfer_summary_report( $pid, $encounter, $cols, $id) {
+$count = 0;
+$data = formFetch("form_transfer_summary", $id);
+if ($data) {
+print "<table><tr>";
+foreach($data as $key => $value) {
+if ($key == "id" || $key == "pid" || $key == "user" || $key == "groupname" || $key == "authorized" || $key == "activity" || $key == "date" || $value == "" || $value == "0000-00-00 00:00:00") {
+       continue;
+}
+if ($value == "on") {
+$value = "yes";
+}
+$key=ucwords(str_replace("_"," ",$key));
+print "<td><span class=bold>".xlt($key). ": </span><span class=text>".text($value)."</span></td>";
+$count++;
+if ($count == $cols) {
+$count = 0;
+print "</tr><tr>\n";
+}
+}
+}
+print "</tr></table>";
+}
+?> 
diff --git a/interface/forms/transfer_summary/save.php b/interface/forms/transfer_summary/save.php
new file mode 100644 (file)
index 0000000..4d18420
--- /dev/null
@@ -0,0 +1,66 @@
+<?php
+/**
+ *
+ * Copyright (C) 2012-2013 Naina Mohamed <naina@capminds.com> CapMinds Technologies
+ *
+ * LICENSE: This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://opensource.org/licenses/gpl-license.php>;.
+ *
+ * @package OpenEMR
+ * @author  Naina Mohamed <naina@capminds.com>
+ * @link    http://www.open-emr.org
+ */
+  //SANITIZE ALL ESCAPES
+ $sanitize_all_escapes=$_POST['true'];
+
+ //STOP FAKE REGISTER GLOBALS
+ $fake_register_globals=$_POST['false'];
+  
+include_once("../../globals.php");
+include_once("$srcdir/api.inc");
+include_once("$srcdir/forms.inc");
+
+if (! $encounter) { // comes from globals.php
+ die(xl("Internal error: we do not seem to be in an encounter!"));
+}
+
+
+$id = 0 + (isset($_GET['id']) ? $_GET['id'] : '');
+
+$sets = "pid = {$_SESSION["pid"]},
+  groupname = '" . $_SESSION["authProvider"] . "',
+  user = '" . $_SESSION["authUser"] . "',
+  authorized = $userauthorized, activity=1, date = NOW(),
+  provider          = '" . add_escape_custom(formData("provider")) . "',
+  client_name          = '" . add_escape_custom(formData("client_name")) . "',
+  transfer_to          = '" . add_escape_custom(formData("transfer_to")) . "',
+  transfer_date          = '" . add_escape_custom(formData("transfer_date")) . "',
+  status_of_admission          = '" . add_escape_custom(formData("status_of_admission")) . "',
+  diagnosis          =  '" . add_escape_custom(formData("diagnosis")) . "',
+  intervention_provided          =  '" . add_escape_custom(formData("intervention_provided")) . "',
+  overall_status_of_discharge                    = '" . add_escape_custom(formData("overall_status_of_discharge")) ."'";
+
+  
+  if (empty($id)) {
+  $newid = sqlInsert("INSERT INTO form_transfer_summary SET $sets");
+  addForm($encounter, "Transfer Summary", $newid, "transfer_summary", $pid, $userauthorized);
+}
+else {
+  sqlStatement("UPDATE form_transfer_summary SET $sets WHERE id = '". add_escape_custom("$id"). "'");
+}
+
+$_SESSION["encounter"] = htmlspecialchars($encounter);
+formHeader("Redirecting....");
+formJump();
+formFooter();
+?>
+
diff --git a/interface/forms/transfer_summary/table.sql b/interface/forms/transfer_summary/table.sql
new file mode 100644 (file)
index 0000000..782f0c7
--- /dev/null
@@ -0,0 +1,23 @@
+--
+-- Table structure for table `form_transfer_summary`
+--
+
+CREATE TABLE IF NOT EXISTS `form_transfer_summary` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT,
+  `date` datetime DEFAULT NULL,
+  `pid` bigint(20) DEFAULT NULL,
+  `user` varchar(255) DEFAULT NULL,
+  `groupname` varchar(255) DEFAULT NULL,
+  `authorized` tinyint(4) DEFAULT NULL,
+  `activity` tinyint(4) DEFAULT NULL,
+  `client_name` varchar(255) DEFAULT NULL,
+  `provider` varchar(255) DEFAULT NULL,
+  `transfer_to` varchar(255) DEFAULT NULL,
+  `transfer_date` date DEFAULT NULL,
+  `status_of_admission` text,
+  `diagnosis` text,
+  `intervention_provided` text,
+  `overall_status_of_discharge` text,
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB;
+
diff --git a/interface/forms/transfer_summary/view.php b/interface/forms/transfer_summary/view.php
new file mode 100644 (file)
index 0000000..4927079
--- /dev/null
@@ -0,0 +1,3 @@
+<?php
+require("new.php");
+?>
diff --git a/interface/forms/treatment_plan/info.txt b/interface/forms/treatment_plan/info.txt
new file mode 100644 (file)
index 0000000..2c754fe
--- /dev/null
@@ -0,0 +1 @@
+Treatment Plan
\ No newline at end of file
diff --git a/interface/forms/treatment_plan/new.php b/interface/forms/treatment_plan/new.php
new file mode 100644 (file)
index 0000000..53a3763
--- /dev/null
@@ -0,0 +1,202 @@
+<?php
+/**
+ *
+ * Copyright (C) 2012-2013 Naina Mohamed <naina@capminds.com> CapMinds Technologies
+ *
+ * LICENSE: This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://opensource.org/licenses/gpl-license.php>;.
+ *
+ * @package OpenEMR
+ * @author  Naina Mohamed <naina@capminds.com>
+ * @link    http://www.open-emr.org
+ */
+//SANITIZE ALL ESCAPES
+ $sanitize_all_escapes=true;
+
+ //STOP FAKE REGISTER GLOBALS
+ $fake_register_globals=false;
+include_once("../../globals.php");
+include_once("$srcdir/api.inc");
+require_once("$srcdir/patient.inc");
+require_once("$srcdir/options.inc.php");
+formHeader("Form:Treatment Planning");
+$returnurl = $GLOBALS['concurrent_layout'] ? 'encounter_top.php' : 'patient_encounter.php';
+$formid = 0 + (isset($_GET['id']) ? $_GET['id'] : '');
+$obj = $formid ? formFetch("form_treatment_plan", $formid) : array();
+
+
+// Get the providers list.
+ $ures = sqlStatement("SELECT id, username, fname, lname FROM users WHERE " .
+  "authorized != 0 AND active = 1 ORDER BY lname, fname");
+?>
+<html><head>
+<?php html_header_show();?>
+<script type="text/javascript" src="../../../library/dialog.js"></script>
+<!-- pop up calendar -->
+<style type="text/css">@import url(<?php echo $GLOBALS['webroot'] ?>/library/dynarch_calendar.css);</style>
+<script type="text/javascript" src="<?php echo $GLOBALS['webroot'] ?>/library/dynarch_calendar.js"></script>
+<?php include_once("{$GLOBALS['srcdir']}/dynarch_calendar_en.inc.php"); ?>
+<script type="text/javascript" src="<?php echo $GLOBALS['webroot'] ?>/library/dynarch_calendar_setup.js"></script>
+<script type="text/javascript" src="<?php echo $GLOBALS['webroot'] ?>/library/textformat.js"></script>
+<script type="text/javascript" src="<?php echo $GLOBALS['webroot'] ?>/library/dialog.js"></script>
+<link rel="stylesheet" href="<?php echo $css_header;?>" type="text/css">
+</head>
+<body class="body_top">
+<p><span class="forms-title"><?php echo xlt('Treatment Planning'); ?></span></p>
+</br>
+<?php
+echo "<form method='post' name='my_form' " .
+  "action='$rootdir/forms/treatment_plan/save.php?id=" . attr($formid) ."'>\n";
+?>
+
+<table  border="0">
+
+<tr>
+<td align="left" class="forms" class="forms"><?php echo xlt('Client Name' ); ?>:</td>
+               <td class="forms">
+                       <label class="forms-data"> <?php if (is_numeric($pid)) {
+    
+    $result = getPatientData($pid, "fname,lname,squad");
+   echo htmlspecialchars(text($result['fname'])." ".text($result['lname']));}
+   $patient_name=($result['fname'])." ".($result['lname']);
+   ?>
+   </label>
+   <input type="hidden" name="client_name" value="<?php echo attr($patient_name);?>">
+               </td>
+               <td align="left"  class="forms"><?php echo xlt('DOB'); ?>:</td>
+               <td class="forms">
+               <label class="forms-data"> <?php if (is_numeric($pid)) {
+    
+    $result = getPatientData($pid, "*");
+   echo htmlspecialchars( $result['DOB']);}
+   $dob=($result['DOB']);
+   ?>
+   </label>
+     <input type="hidden" name="DOB" value="<?php echo attr($dob);?>">
+               </td>
+               </tr>
+       <tr>
+       
+       
+       
+               <td align="left"  class="forms"><?php echo xlt('Client Number'); ?>:</td>
+               <td class="forms">
+                       <label class="forms-data" > <?php if (is_numeric($pid)) {
+    
+    $result = getPatientData($pid, "*");
+   echo htmlspecialchars(xl('','','','').$result['pid']);}
+   $patient_id=$result['pid'];
+   ?>
+   </label>
+    <input type="hidden" name="client_number" value="<?php echo $patient_id;?>">
+               </td>
+
+
+               <td align="left" class="forms"><?php echo xlt('Admit Date'); ?>:</td>
+               <td class="forms">
+                          <input type='text' size='10' name='admit_date' id='admission_date' <?php echo attr($disabled) ?>;
+                          value='<?php echo attr($obj{"admit_date"}); ?>'   
+                          title='<?php echo xla('yyyy-mm-dd Date of service'); ?>'
+       onkeyup='datekeyup(this,mypcc)' onblur='dateblur(this,mypcc)' />
+        <img src='../../pic/show_calendar.gif' align='absbottom' width='24' height='22'
+        id='img_admission_date' border='0' alt='[?]' style='cursor:pointer;cursor:hand'
+        title='<?php echo xla('Click here to choose a date'); ?>'>
+               </td> 
+               
+               </tr>
+               <tr>
+               <td align="left" class="forms"><?php echo xlt('Provider'); ?>:</td>
+                <td class="forms" width="280px">
+ <?php
+
+    echo "<select name='provider' style='width:60%' />";
+    while ($urow = sqlFetchArray($ures)) {
+      echo "    <option value='" . $urow['lname'] . "'";
+      if ($urow['lname'] == attr($obj{"provider"})) echo " selected";
+      echo ">" . $urow['lname'];
+      if ($urow['fname']) echo ", " . $urow['fname'];
+      echo "</option>\n";
+    }
+    echo "</select>";
+?>
+               </td>
+                       
+               </tr>
+       
+       <tr>
+       
+  <td colspan='3' nowrap style='font-size:8pt'>
+   &nbsp;
+       </td>
+       </tr>
+               
+       <tr>
+               <td align="left" class="forms"><?php echo xlt('Presenting Issue(s)'); ?>:</td>
+               <td colspan="3"><textarea name="presenting_issues" rows="2" cols="60" wrap="virtual name"><?php echo text($obj{"presenting_issues"});?></textarea></td>
+               
+       </tr>
+       <tr>
+               <td align="left" class="forms"><?php echo xlt('Patient History'); ?>:</td>
+               <td colspan="3"><textarea name="patient_history" rows="2" cols="60" wrap="virtual name"><?php echo text($obj{"patient_history"});?></textarea></td>
+               
+       </tr>
+       <tr>
+               
+               <td align="left" class="forms"><?php echo xlt('Medications'); ?>:</td>
+               <td colspan="3"><textarea name="medications" rows="2" cols="60" wrap="virtual name"><?php echo text($obj{"medications"});?></textarea></td>
+               
+               
+       </tr>
+       <tr>
+               <td align="left" class="forms"><?php echo xlt('Anyother Relevant Information'); ?>:</td>
+               <td colspan="3"><textarea name="anyother_relevant_information" rows="2" cols="60" wrap="virtual name"><?php echo text($obj{"anyother_relevant_information"});?></textarea></td>
+               
+       </tr>
+       <tr>
+               <td align="left" class="forms"><?php echo xlt('Diagnosis'); ?>:</td>
+               <td colspan="3"><textarea name="diagnosis" rows="2" cols="60" wrap="virtual name"><?php echo text($obj{"diagnosis"});?></textarea></td>
+               
+       </tr>
+       <tr>
+               <td align="left" class="forms"><?php echo xlt('Treatment Received'); ?>:</td>
+               <td colspan="3"><textarea name="treatment_received" rows="2" cols="60" wrap="virtual name"><?php echo text($obj{"treatment_received"});?></textarea></td>
+               
+       </tr>
+       <tr>
+               <td align="left" class="forms"><?php echo xlt('Recommendation For Follow Up'); ?>:</td>
+               <td colspan="3"><textarea name="recommendation_for_follow_up" rows="2" cols="60" wrap="virtual name"><?php echo text($obj{"recommendation_for_follow_up"});?></textarea></td>
+               
+       </tr>
+       <tr>
+               <td align="left colspan="3" style="padding-bottom:7px;"></td>
+       </tr>
+       <tr>
+               <td align="left colspan="3" style="padding-bottom:7px;"></td>
+       </tr>
+       <tr>
+               <td></td>
+    <td><input type='submit'  value='<?php echo xlt('Save');?>' class="button-css">&nbsp;
+       <input type='button'  value="Print" onclick="window.print()" class="button-css">&nbsp;
+       <input type='button' class="button-css" value='<?php echo xlt('Cancel');?>'
+ onclick="top.restoreSession();location='<?php echo "$rootdir/patient_file/encounter/$returnurl" ?>'" /></td>
+       </tr>
+</table>
+</form>
+<script language="javascript">
+/* required for popup calendar */
+Calendar.setup({inputField:"admission_date", ifFormat:"%Y-%m-%d", button:"img_admission_date"});
+
+</script>
+<?php
+formFooter();
+?>
diff --git a/interface/forms/treatment_plan/report.php b/interface/forms/treatment_plan/report.php
new file mode 100644 (file)
index 0000000..f77f5f2
--- /dev/null
@@ -0,0 +1,48 @@
+<?php
+/**
+ *
+ * Copyright (C) 2012-2013 Naina Mohamed <naina@capminds.com> CapMinds Technologies
+ *
+ * LICENSE: This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://opensource.org/licenses/gpl-license.php>;.
+ *
+ * @package OpenEMR
+ * @author  Naina Mohamed <naina@capminds.com>
+ * @link    http://www.open-emr.org
+ */
+include_once("../../globals.php");
+include_once($GLOBALS["srcdir"]."/api.inc");
+function treatment_plan_report( $pid, $encounter, $cols, $id) {
+$count = 0;
+$data = formFetch("form_treatment_plan", $id);
+if ($data) {
+print "<table><tr>";
+foreach($data as $key => $value) {
+if ($key == "id" || $key == "pid" || $key == "user" || $key == "groupname" || $key == "authorized" || $key == "activity" || $key == "date" || $value == "" || $value == "0000-00-00 00:00:00") {
+       continue;
+}
+if ($value == "on") {
+$value = "yes";
+}
+$key=ucwords(str_replace("_"," ",$key));
+print "<td><span class=bold>".xlt($key). ": </span><span class=text>".text($value)."</span></td>";
+$count++;
+if ($count == $cols) {
+$count = 0;
+print "</tr><tr>\n";
+}
+}
+}
+print "</tr></table>";
+}
+?> 
diff --git a/interface/forms/treatment_plan/save.php b/interface/forms/treatment_plan/save.php
new file mode 100644 (file)
index 0000000..f615743
--- /dev/null
@@ -0,0 +1,69 @@
+<?php
+/**
+ *
+ * Copyright (C) 2012-2013 Naina Mohamed <naina@capminds.com> CapMinds Technologies
+ *
+ * LICENSE: This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://opensource.org/licenses/gpl-license.php>;.
+ *
+ * @package OpenEMR
+ * @author  Naina Mohamed <naina@capminds.com>
+ * @link    http://www.open-emr.org
+ */
+  //SANITIZE ALL ESCAPES
+ $sanitize_all_escapes=$_POST['true'];
+
+ //STOP FAKE REGISTER GLOBALS
+ $fake_register_globals=$_POST['false'];
+
+include_once("../../globals.php");
+include_once("$srcdir/api.inc");
+include_once("$srcdir/forms.inc");
+
+if (! $encounter) { // comes from globals.php
+ die(xl("Internal error: we do not seem to be in an encounter!"));
+}
+
+$id = 0 + (isset($_GET['id']) ? $_GET['id'] : '');
+
+$sets = "pid = {$_SESSION["pid"]},
+  groupname = '" . $_SESSION["authProvider"] . "',
+  user = '" . $_SESSION["authUser"] . "',
+  authorized = $userauthorized, activity=1, date = NOW(),
+  provider               = '" . add_escape_custom(formData("provider")) . "',
+  client_name            = '" . add_escape_custom(formData("client_name")) . "',
+  client_number          = '" . add_escape_custom(formData("client_number")) . "',
+  admit_date             =  '" . add_escape_custom(formData("admit_date")) . "',
+  presenting_issues          = '" . add_escape_custom(formData("presenting_issues")) . "',
+  patient_history            =  '" . add_escape_custom(formData("patient_history")) . "',
+  medications                = '" . add_escape_custom(formData("medications")) . "',
+  anyother_relevant_information          = '" . add_escape_custom(formData("anyother_relevant_information")) . "',
+  diagnosis                    = '" . add_escape_custom(formData("diagnosis")) . "',
+  treatment_received           = '" . add_escape_custom(formData("treatment_received")) . "',
+  recommendation_for_follow_up                    = '" . add_escape_custom(formData("recommendation_for_follow_up")) . "'";
+  
+
+  
+  if (empty($id)) {
+  $newid = sqlInsert("INSERT INTO form_treatment_plan SET $sets");
+  addForm($encounter, "Treatment Plan", $newid, "treatment_plan", $pid, $userauthorized);
+}
+else {
+  sqlStatement("UPDATE form_treatment_plan SET $sets WHERE id = '". add_escape_custom("$id"). "'");
+}
+
+$_SESSION["encounter"] = htmlspecialchars($encounter);
+formHeader("Redirecting....");
+formJump();
+formFooter();
+?>
+
diff --git a/interface/forms/treatment_plan/table.sql b/interface/forms/treatment_plan/table.sql
new file mode 100644 (file)
index 0000000..f115a58
--- /dev/null
@@ -0,0 +1,25 @@
+--
+-- Table structure for table `form_treatment_plan`
+--
+
+CREATE TABLE IF NOT EXISTS `form_treatment_plan` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT,
+  `date` datetime DEFAULT NULL,
+  `pid` bigint(20) DEFAULT NULL,
+  `user` varchar(255) DEFAULT NULL,
+  `groupname` varchar(255) DEFAULT NULL,
+  `authorized` tinyint(4) DEFAULT NULL,
+  `activity` tinyint(4) DEFAULT NULL,
+  `client_name` varchar(255) DEFAULT NULL,
+  `client_number` bigint(20) DEFAULT NULL,
+  `provider` varchar(255) DEFAULT NULL,
+  `admit_date` varchar(255) DEFAULT NULL,
+  `presenting_issues` text,
+  `patient_history` text,
+  `medications` text,
+  `anyother_relevant_information` text,
+  `diagnosis` text,
+  `treatment_received` text,
+  `recommendation_for_follow_up` text,
+   PRIMARY KEY (`id`)
+) ENGINE=InnoDB;
diff --git a/interface/forms/treatment_plan/view.php b/interface/forms/treatment_plan/view.php
new file mode 100644 (file)
index 0000000..4927079
--- /dev/null
@@ -0,0 +1,3 @@
+<?php
+require("new.php");
+?>