function form_consult_plan() { if (func_num_args()>0) { $arg_list = func_get_args(); $menu_id = $arg_list[0]; $post_vars = $arg_list[1]; $get_vars = $arg_list[2]; $validuser = $arg_list[3]; $isadmin = $arg_list[4]; //print_r($arg_list); } $get_diag = mysql_query("SELECT a.class_id FROM m_consult_notes_dxclass a, m_consult_notes b WHERE a.notes_id='$get_vars[notes_id]' AND a.notes_id=b.notes_id") or die("Cannot query: 572"); if(mysql_num_rows($get_diag)==0): echo "<font color='red'>Please record the diagnosis first before doing treament plan.</font>"; else: $sql = "select notes_plan from m_consult_notes where notes_id = '".$get_vars["notes_id"]."'"; if ($result = mysql_query($sql)) { if (mysql_num_rows($result)) { list($plan) = mysql_fetch_array($result); } } print "<a name='plan_form'>"; print "<table width='300'>"; print "<form method='post' action='#plan_form' name='form_plan'>"; print "<tr><td>"; print "<b>".FTITLE_CONSULT_PLAN_FORM."</b><br/>"; print "<br/></td></tr>"; print "<tr><td>"; print "<span class='boxtitle'>".LBL_NOTES_ID."</span><br/>"; print "<font color='red'>".module::pad_zero($get_vars["notes_id"],7)."</font><br/>"; print "<br/></td></tr>"; print "<tr><td>"; print "<span class='boxtitle'>".LBL_PLAN_TEMPLATE."</span><br/>"; notes::show_templates("TX", $post_vars["template"]); if ($post_vars["template"]) { print "<br/><br/>"; print "<span class='boxtitle'>".LBL_TEMPLATE_CONTENT."</span><br> "; print "<table width='200' style='border: 1px dotted black'><tr><td class='tinylight'>"; $plan_text = notes::get_template_text($post_vars["template"]); print stripslashes(nl2br($plan_text)); print "<br/>"; print "<input type='hidden' name='template_text' value='$plan_text' />"; print "<input type='hidden' name='prev_template' value='".$post_vars["template"]."' class='tinylight' style='border: 1px solid black; background-color: #CCFF33'/>"; print "<input type='submit' name='submitnotes' value='Add Template' class='tinylight' style='border: 1px solid black; background-color: #CCFF33'/>"; print "</td></tr></table>"; } if ($post_vars["submitnotes"]=="Add Template") { $plan = $post_vars["plan_text"].$post_vars["template_text"]; } print "<br/></td></tr>"; print "<tr><td>"; print "<span class='boxtitle'>".LBL_NOTES_PLAN."</span><br> "; print "<textarea rows='10' cols='40' class='tinylight' name='plan_text' style='border: 1px solid black'>".($plan?$plan:$post_vars["plan_text"])."</textarea>"; print "<br/></td></tr>"; print "<tr><td>"; print "<input type='submit' name='submitnotes' value='Save Plan' class='textbox' style='border: 1px solid black'/> "; print "<br/></td></tr>"; print "</form>"; print "</table><br/>"; $this->form_tx_sickchild($menu_id,$post_vars,$get_vars,$validuser,$isadmin); endif; }
function form_consult_plan() { if (func_num_args()>0) { $arg_list = func_get_args(); $menu_id = $arg_list[0]; $post_vars = $arg_list[1]; $get_vars = $arg_list[2]; $validuser = $arg_list[3]; $isadmin = $arg_list[4]; //print_r($arg_list); } $sql = "select notes_plan from m_consult_notes where notes_id = '".$get_vars["notes_id"]."'"; if ($result = mysql_query($sql)) { if (mysql_num_rows($result)) { list($plan) = mysql_fetch_array($result); } } print "<a name='plan_form'>"; print "<table width='300'>"; print "<form method='post' action='#plan_form' name='form_plan'>"; print "<tr><td>"; print "<b>".FTITLE_CONSULT_PLAN_FORM."</b><br/>"; print "<br/></td></tr>"; print "<tr><td>"; print "<span class='boxtitle'>".LBL_NOTES_ID."</span><br/>"; print "<font color='red'>".module::pad_zero($get_vars["notes_id"],7)."</font><br/>"; print "<br/></td></tr>"; print "<tr><td>"; print "<span class='boxtitle'>".LBL_PLAN_TEMPLATE."</span><br/>"; notes::show_templates("TX", $post_vars["template"]); if ($post_vars["template"]) { print "<br/><br/>"; print "<span class='boxtitle'>".LBL_TEMPLATE_CONTENT."</span><br> "; print "<table width='200' style='border: 1px dotted black'><tr><td class='tinylight'>"; $plan_text = notes::get_template_text($post_vars["template"]); print stripslashes(nl2br($plan_text)); print "<br/>"; print "<input type='hidden' name='template_text' value='$plan_text' />"; print "<input type='hidden' name='prev_template' value='".$post_vars["template"]."' class='tinylight' style='border: 1px solid black; background-color: #CCFF33'/>"; print "<input type='submit' name='submitnotes' value='Add Template' class='tinylight' style='border: 1px solid black; background-color: #CCFF33'/>"; print "</td></tr></table>"; } if ($post_vars["submitnotes"]=="Add Template") { $plan = $post_vars["plan_text"].$post_vars["template_text"]; } print "<br/></td></tr>"; print "<tr><td>"; print "<span class='boxtitle'>".LBL_NOTES_PLAN."</span><br> "; print "<textarea rows='15' cols='40' class='tinylight' name='plan_text' style='border: 1px solid black'>".($plan?$plan:$post_vars["plan_text"])."</textarea>"; print "<br/></td></tr>"; print "<tr><td>"; print "<input type='submit' name='submitnotes' value='Save Plan' class='textbox' style='border: 1px solid black'/> "; print "<br/></td></tr>"; print "</form>"; print "</table><br/>"; }
function form_consult_plan() { if (func_num_args() > 0) { $arg_list = func_get_args(); $menu_id = $arg_list[0]; $post_vars = $arg_list[1]; $get_vars = $arg_list[2]; $validuser = $arg_list[3]; $isadmin = $arg_list[4]; //print_r($arg_list); } $get_diag = mysql_query("SELECT a.class_id FROM m_consult_notes_dxclass a, m_consult_notes b WHERE a.notes_id='{$get_vars['notes_id']}' AND a.notes_id=b.notes_id") or die("Cannot query: 572"); if (mysql_num_rows($get_diag) == 0) { echo "<font color='red'>Please record the diagnosis first before doing treament plan.</font>"; } else { $sql = "select notes_plan from m_consult_notes where notes_id = '" . $get_vars["notes_id"] . "'"; if ($result = mysql_query($sql)) { if (mysql_num_rows($result)) { list($plan) = mysql_fetch_array($result); } } print "<a name='plan_form'>"; print "<table width='300'>"; print "<form method='post' action='#plan_form' name='form_plan'>"; print "<tr><td>"; print "<b>" . FTITLE_CONSULT_PLAN_FORM . "</b><br/>"; print "<br/></td></tr>"; print "<tr><td>"; print "<span class='boxtitle'>" . LBL_NOTES_ID . "</span><br/>"; print "<font color='red'>" . module::pad_zero($get_vars["notes_id"], 7) . "</font><br/>"; print "<br/></td></tr>"; print "<tr><td>"; print "<span class='boxtitle'>" . LBL_PLAN_TEMPLATE . "</span><br/>"; notes::show_templates("TX", $post_vars["template"]); if ($post_vars["template"]) { print "<br/><br/>"; print "<span class='boxtitle'>" . LBL_TEMPLATE_CONTENT . "</span><br> "; print "<table width='200' style='border: 1px dotted black'><tr><td class='tinylight'>"; $plan_text = notes::get_template_text($post_vars["template"]); print stripslashes(nl2br($plan_text)); print "<br/>"; print "<input type='hidden' name='template_text' value='{$plan_text}' />"; print "<input type='hidden' name='prev_template' value='" . $post_vars["template"] . "' class='tinylight' style='border: 1px solid black; background-color: #CCFF33'/>"; print "<input type='submit' name='submitnotes' value='Add Template' class='tinylight' style='border: 1px solid black; background-color: #CCFF33'/>"; print "</td></tr></table>"; } $q_plan_px_info = mysql_query("SELECT plan_px_info FROM m_consult_notes WHERE notes_id='{$_GET['notes_id']}'") or die("Cannot query 715: " . mysql_error()); list($plan_px_info) = mysql_fetch_array($q_plan_px_info); if ($post_vars["submitnotes"] == "Add Template") { $plan = $post_vars["plan_text"] . $post_vars["template_text"]; } print "<br/></td></tr>"; print "<tr><td>"; print "<span class='boxtitle'>Rx" . LBL_NOTES_PLAN . " (Record prescribed medications) </span><br> "; print "<textarea rows='10' cols='40' class='tinylight' name='plan_text' style='border: 1px solid black'>" . ($plan ? $plan : $post_vars["plan_text"]) . "</textarea>"; print "<br/></td></tr>"; print "<tr><td>"; print "<span class='boxtitle'>Patient Take Home Information</span><br> "; print "<textarea rows='10' cols='40' class='tinylight' name='plan_px_info' style='border: 1px solid black'>{$plan_px_info}</textarea>"; print "<br/></td></tr>"; /*echo "<tr><td>"; echo "<span class='boxtitle'><input type='checkbox' name='chk_px_info'>Check if you want to send take home message</input><br>"; echo "<span class='boxtitle'>Date to Send <input type='textbox' name='txt_sms_px_info' size='6' />"; echo "</td></tr>";*/ print "<tr><td>"; print "<input type='submit' name='submitnotes' value='Save Treatment Plan' class='textbox' style='border: 1px solid black'/> "; print "<br/></td></tr>"; print "</form>"; print "</table><br/>"; $this->form_tx_sickchild($menu_id, $post_vars, $get_vars, $validuser, $isadmin); } }