fixed bug in setting pid
[openemr.git] / interface / usergroup / facility_admin.php
blob919c8594f357665ca25d43b04f73b08b1d178f87
1 <?
2 include_once("../globals.php");
5 include_once("$srcdir/md5.js");
6 include_once("$srcdir/sql.inc");
7 require_once("$srcdir/classes/POSRef.class.php");
10 if ($_POST["mode"] == "facility")
12 sqlStatement("update facility set
13 name='{$_POST['facility']}',
14 phone='{$_POST['phone']}',
15 street='{$_POST['street']}',
16 city='{$_POST['city']}',
17 state='{$_POST['state']}',
18 postal_code='{$_POST['postal_code']}',
19 country_code='{$_POST['country_code']}',
20 federal_ein='{$_POST['federal_ein']}',
21 billing_location='{$_POST['billing_location']}',
22 accepts_assignment='{$_POST['accepts_assignment']}',
23 pos_code='{$_POST['pos_code']}',
24 x12_sender_id='{$_POST['x12_sender_id']}',
25 attn='{$_POST['attn']}'
26 where id='{$_POST['fid']}'");
29 if (isset($_GET["fid"])) {
30 $my_fid = $_GET["fid"];
33 if (isset($_POST["fid"])) {
34 $my_fid = $_POST["fid"];
41 <html>
42 <head>
44 <link rel=stylesheet href="<?echo $css_header;?>" type="text/css">
46 </head>
47 <body <?echo $top_bg_line;?> topmargin=0 rightmargin=0 leftmargin=2 bottommargin=0 marginwidth=2 marginheight=0>
49 <span class="title">Edit Facility Information</span>
51 <form name='facility' method='post' action="facility_admin.php">
52 <input type=hidden name=mode value="facility">
53 <input type=hidden name=fid value="<?echo $my_fid;?>">
54 <span class=bold>Facility Information: </span>
55 </td><td>
56 <?php $facility = sqlQuery("select * from facility where id='$my_fid'"); ?>
57 <br><br>
58 <table border=0 cellpadding=0 cellspacing=0>
59 <tr>
60 <td><span class=text>Name: </span></td><td><input type=entry name=facility size=20 value="<?=$facility['name']?>"></td><td rowspan="10" width="15"></d>
61 <td><span class=text>Phone as (000) 000-0000:</span></td><td><input type=entry name=phone size=20 value="<?=$facility['phone']?>"></td>
62 </tr>
63 <tr>
64 <td><span class=text>Address: </span></td><td><input type=entry size=20 name=street value="<?=$facility["street"]?>"></td>
65 <td><span class=text>City: </span></td><td><input type=entry size=20 name=city value="<?echo $facility{"city"}?>"></td>
66 </tr>
67 <tr>
68 <td><span class=text>State: </span></td><td><input type=entry size=20 name=state value="<?echo $facility{"state"}?>"></td>
69 <td><span class=text>Zip Code: </span></td><td><input type=entry size=20 name=postal_code value="<?echo $facility{"postal_code"}?>"></td>
70 </tr>
71 <tr>
72 <td><span class=text>Country: </span></td><td><input type=entry size=20 name=country_code value="<?echo $facility{"country_code"}?>"></td>
73 <td><span class=text>Federal EIN: </span></td><td><input type=entry size=20 name=federal_ein value="<?echo $facility{"federal_ein"}?>"></td>
74 </tr>
75 <tr>
76 <td><span class=text>Billing Location: </span></td><td><input type=checkbox name="billing_location" value="1" <?if ($facility['billing_location'] == 1) echo "checked"?>"></td>
77 <td><span class=text>Accepts Assignment<br>(only if billing location): </span></td><td><input type=checkbox name="accepts_assignment" value="1" <?if ($facility['accepts_assignment'] == 1) echo "checked"?>"></td>
78 </tr>
79 <tr>
80 <td><span class=text>POS Code: </span></td>
81 <td colspan="6">
82 <select name="pos_code">
83 <?php
84 $pc = new POSRef();
86 foreach ($pc->get_pos_ref() as $pos) {
87 echo "<option value=\"" . $pos["code"] . "\" ";
88 if ($facility['pos_code'] == $pos['code']) {
89 echo "selected";
91 echo ">" . $pos['code'] . ": ". $pos['title'];
92 echo "</option>\n";
96 </select>
97 </td>
98 </tr>
99 <tr>
100 <td><span class="text">Billing Attn:</span></td>
101 <td colspan="4"><input type="text" name="attn" size="45" value="<?=$facility['attn']?>"></td>
102 </tr>
103 <!--
104 This is now deprecated use the newer X12 partner management in practice settings
105 <tr>
106 <td><span class="text">X12 Sender ID: </span></td>
107 <td><input type="text" name="x12_sender_id" size="15" value="<?=$facility['x12_sender_id']?>"></td>
108 </tr>
110 <tr>
111 <td>&nbsp;</td><td>&nbsp;</td>
112 <td>&nbsp;</td><td><br><br><input type="submit" value="Update Info">&nbsp;&nbsp;&nbsp;<a href="usergroup_admin.php" class=link_submit>[Back]</font></a></td>
113 </tr>
114 </table>
115 </form>
132 </body>
133 </html>