2 include_once("../../globals.php");
3 include_once("$srcdir/lists.inc");
10 //CLICKOPTIONS by Mark Leeds 2005, see clickoptions.txt in openemr/custom/ directory for more info
11 $clickoptions_category = "allergy";
13 //this code handles changing the state of activity tags when the user updates them through the interface
15 if ($mode == "update") {
16 foreach ($_POST as $var => $val) {
17 if ($val == "true" ||
$val == "false") {
18 $id = str_replace("act","",$var);
19 if ($val == "true") {reappearList ($id);}elseif($val=="false"){disappearList($id);};
20 //print "$id: $val > $act_state<br>\n";
24 } elseif ($mode == "new") {
25 addList($pid,"allergy",$_POST["title"],$_POST["comments"],1);
42 <link rel
=stylesheet href
="<?echo $css_header;?>" type
="text/css">
45 //CLICKOPTIONS by Mark Leeds 2005, see clickoptions.txt in openemr/custom/ directory for more info
46 include("clickoptions1.php");
51 <body
<?
echo $top_bg_line;?
> topmargin
=0 rightmargin
=0 leftmargin
=2 bottommargin
=0 marginwidth
=2 marginheight
=0>
53 <table border
=0 cellspacing
=0 cellpadding
=0 height
=100%
>
55 <td background
="<?echo $linepic;?>" width
=7 height
=100%
>
60 <a href
="patient_summary.php" target
="Main"><font
class="title">Allergies
</font
><font
class=back
><?
echo $tback;?
></font
></a
>
63 <form border
=0 method
=post name
=new_note action
="allergies.php">
64 <input type
=hidden name
=mode value
="new">
65 <input type
=hidden name
=active value
="<?echo $active;?>">
68 //CLICKOPTIONS by Mark Leeds 2005, see clickoptions.txt in openemr/custom/ directory for more info
69 include("clickoptions2.php");
72 <input type
=entry size
=15 name
=title value
="" onfocus
="javascript:this.value=''"><br
>
73 <textarea name
=comments rows
=3 cols
=15 wrap
=virtual onfocus
="javascript:this.value=''">Comments
</textarea
>
75 <a href
="javascript:document.new_note.submit();" class=link_submit
>[Add
New Allergy
]</a
>
79 <form border
=0 method
=post name
=update_activity action
="allergies.php">
81 <input type
=hidden name
=mode value
="update">
82 <input type
=hidden name
=active value
="<?echo $active;?>">
84 <?
//change the view on the current mode, whether all, active, or inactive
85 $all_class="link";$active_class="link";$inactive_class="link";
87 $all_class="link_selected";
88 } elseif ($active==1) {
89 $active_class="link_selected";
90 } elseif ($active==0) {
91 $inactive_class="link_selected";
97 <font
class=text
>View
: </font
>
98 <a href
="allergies.php?offset=0&active=all" class=<?
echo $all_class;?
>>[All
]</a
>
99 <a href
="allergies.php?offset=0&active=1" class=<?
echo $active_class;?
>>[Only Active
]</a
>
100 <a href
="allergies.php?offset=0&active=0" class=<?
echo $inactive_class;?
>>[Only Inactive
]</a
>
103 <a href
="javascript:document.update_activity.submit();" class=link_submit
>[Change Activity
]</a
>
108 if ($result = getListByType($pid, "allergy", "id,title,comments,activity,date", $active, "all", 0)){
109 foreach ($result as $iter) {
110 //echo "<dd>" . $iter{"title"} . "</dd>\n";
114 if ($iter{"activity"}) {
115 $checked = "checked";
119 print "<input type=hidden value='' name=act".$iter{"id"}.">";
120 print "<input onClick='javascript:document.update_activity.act".$iter{"id"}.".value=this.checked' type=checkbox $checked>";
121 print "<font class=bold>".$iter{"title"} . "</font><font class=text>(".date("n/j/Y",strtotime($iter{"date"})).")</font><br>";
122 print "<font class=text>" . $iter{"comments"} . "</font><br>\n";