image for help file
[openemr.git] / interface / usergroup / facility_admin.php
blobab98486d9d534703362a0fa51cf66dee0624e31a
1 <?
2 include_once("../globals.php");
3 include_once("$srcdir/md5.js");
4 include_once("$srcdir/sql.inc");
5 require_once("$srcdir/classes/POSRef.class.php");
7 if ($_POST["mode"] == "facility")
9 sqlStatement("update facility set
10 name='{$_POST['facility']}',
11 phone='{$_POST['phone']}',
12 street='{$_POST['street']}',
13 city='{$_POST['city']}',
14 state='{$_POST['state']}',
15 postal_code='{$_POST['postal_code']}',
16 country_code='{$_POST['country_code']}',
17 federal_ein='{$_POST['federal_ein']}',
18 billing_location='{$_POST['billing_location']}',
19 accepts_assignment='{$_POST['accepts_assignment']}',
20 pos_code='{$_POST['pos_code']}',
21 domain_identifier='{$_POST['domain_identifier']}',
22 attn='{$_POST['attn']}'
23 where id='{$_POST['fid']}'");
26 if (isset($_GET["fid"])) {
27 $my_fid = $_GET["fid"];
30 if (isset($_POST["fid"])) {
31 $my_fid = $_POST["fid"];
35 <html>
36 <head>
38 <link rel=stylesheet href="<?echo $css_header;?>" type="text/css">
40 </head>
41 <body <?echo $top_bg_line;?> topmargin=0 rightmargin=0 leftmargin=2 bottommargin=0 marginwidth=2 marginheight=0>
43 <span class="title"><? xl('Edit Facility Information','e'); ?></span>
45 <form name='facility' method='post' action="facility_admin.php">
46 <input type=hidden name=mode value="facility">
47 <input type=hidden name=fid value="<?echo $my_fid;?>">
48 <span class=bold><? xl('Facility Information','e'); ?>: </span>
49 </td><td>
50 <?php $facility = sqlQuery("select * from facility where id='$my_fid'"); ?>
51 <br><br>
52 <table border=0 cellpadding=0 cellspacing=0>
53 <tr>
54 <td><span class=text><? xl('Name','e'); ?>: </span></td><td><input type=entry name=facility size=20 value="<?=$facility['name']?>"></td><td rowspan="10" width="15"></d>
55 <td><span class=text><? xl('Phone','e'); ?> <? xl('as','e'); ?> (000) 000-0000:</span></td><td><input type=entry name=phone size=20 value="<?=$facility['phone']?>"></td>
56 </tr>
57 <tr>
58 <td><span class=text><? xl('Address','e'); ?>: </span></td><td><input type=entry size=20 name=street value="<?=$facility["street"]?>"></td>
59 <td><span class=text><? xl('City','e'); ?>: </span></td><td><input type=entry size=20 name=city value="<?echo $facility{"city"}?>"></td>
60 </tr>
61 <tr>
62 <td><span class=text><? xl('State','e'); ?>: </span></td><td><input type=entry size=20 name=state value="<?echo $facility{"state"}?>"></td>
63 <td><span class=text><? xl('Zip Code','e'); ?>: </span></td><td><input type=entry size=20 name=postal_code value="<?echo $facility{"postal_code"}?>"></td>
64 </tr>
65 <tr>
66 <td><span class=text><? xl('Country','e'); ?>: </span></td><td><input type=entry size=20 name=country_code value="<?echo $facility{"country_code"}?>"></td>
67 <td><span class=text><? xl('Federal EIN','e'); ?>: </span></td><td><input type=entry size=20 name=federal_ein value="<?echo $facility{"federal_ein"}?>"></td>
68 </tr>
69 <tr>
70 <td><span class=text><? xl('Billing Location','e'); ?>: </span></td><td><input type=checkbox name="billing_location" value="1" <?if ($facility['billing_location'] == 1) echo "checked"?>"></td>
71 <td><span class=text><? xl('Accepts Assignment','e'); ?><br>(<? xl('only if billing location','e'); ?>): </span></td><td><input type=checkbox name="accepts_assignment" value="1" <?if ($facility['accepts_assignment'] == 1) echo "checked"?>"></td>
72 </tr>
73 <tr>
74 <td><span class=text><? xl('POS Code','e'); ?>: </span></td>
75 <td colspan="6">
76 <select name="pos_code">
77 <?php
78 $pc = new POSRef();
80 foreach ($pc->get_pos_ref() as $pos) {
81 echo "<option value=\"" . $pos["code"] . "\" ";
82 if ($facility['pos_code'] == $pos['code']) {
83 echo "selected";
85 echo ">" . $pos['code'] . ": ". $pos['title'];
86 echo "</option>\n";
90 </select>
91 </td>
92 </tr>
93 <tr>
94 <td><span class="text"><? xl('Billing Attn','e'); ?>:</span></td>
95 <td colspan="4"><input type="text" name="attn" size="45" value="<?=$facility['attn']?>"></td>
96 </tr>
97 <tr>
98 <td><span class="text"><? xl('CLIA Number','e'); ?>:</span></td>
99 <td colspan="4"><input type="text" name="domain_identifier" size="45" value="<?=$facility['domain_identifier']?>"></td>
100 </tr>
101 <tr>
102 <td>&nbsp;</td><td>&nbsp;</td>
103 <td>&nbsp;</td><td><br><br><input type="submit" value=<? xl('Update Info','e'); ?>>&nbsp;&nbsp;&nbsp;<a href="usergroup_admin.php" class=link_submit>[<? xl('Back','e'); ?>]</font></a></td>
104 </tr>
105 </table>
106 </form>
108 </body>
109 </html>