set default margins to 5
[openemr.git] / interface / usergroup / facility_admin.php
blobaec57c114cca4ad5767f0a6a8edd426801f8407a
1 <?php
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");
6 require_once("$srcdir/formdata.inc.php");
8 if ($_POST["mode"] == "facility")
10 sqlStatement("update facility set
11 name='" . formData('facility','P',true) . "',
12 phone='" . formData('phone','P',true) . "',
13 fax='" . formData('fax','P',true) . "',
14 street='" . formData('street','P',true) . "',
15 city='" . formData('city','P',true) . "',
16 state='" . formData('state','P',true) . "',
17 postal_code='" . formData('postal_code','P',true) . "',
18 country_code='" . formData('country_code','P',true) . "',
19 federal_ein='" . formData('federal_ein','P',true) . "',
20 service_location='" . formData('service_location','P',true) . "',
21 billing_location='" . formData('billing_location','P',true) . "',
22 accepts_assignment='". formData('accepts_assignment','P',true) . "',
23 pos_code='" . formData('pos_code','P',true) . "',
24 domain_identifier='" . formData('domain_identifier','P',true) . "',
25 facility_npi='" . formData('facility_npi','P',true) . "',
26 attn='" . formData('attn','P',true) . "'
27 where id='" . formData('fid','P',true) . "'");
30 if (isset($_GET["fid"])) {
31 $my_fid = $_GET["fid"];
34 if (isset($_POST["fid"])) {
35 $my_fid = $_POST["fid"];
39 <html>
40 <head>
42 <link rel="stylesheet" href="<?php echo $css_header;?>" type="text/css">
44 </head>
45 <body class="body_top">
47 <span class="title"><?php xl('Edit Facility Information','e'); ?></span>
49 <form name='facility' method='post' action="facility_admin.php">
50 <input type=hidden name=mode value="facility">
51 <input type=hidden name=fid value="<?php echo $my_fid;?>">
52 <?php $facility = sqlQuery("select * from facility where id='$my_fid'"); ?>
53 <br><br>
54 <table border=0 cellpadding=0 cellspacing=0>
55 <tr>
56 <td width='24'><span class='text'><?php xl('Name','e'); ?>: </span></td>
57 <td width='120'><input type='entry' name='facility' size='20' value='<?php echo htmlspecialchars($facility['name'], ENT_QUOTES) ?>'></td>
58 <td rowspan='10' width='15'></td>
59 <td><span class='text'><?php xl('Phone','e'); ?> <?php xl('as','e'); ?> (000) 000-0000:</span></td>
60 <td width='210'><input type='entry' name='phone' size='20' value='<?php echo htmlspecialchars($facility['phone'], ENT_QUOTES) ?>'></td>
61 </tr>
62 <tr>
63 <td>&nbsp;</td>
64 <td>&nbsp;</td>
65 <td><span class='text'><?php xl('Fax','e'); ?> <?php xl('as','e'); ?> (000) 000-0000:</span></td>
66 <td width='210'><input type='entry' name='fax' size='20' value='<?php echo htmlspecialchars($facility['fax'], ENT_QUOTES) ?>'></td>
67 </tr>
68 <tr>
69 <td><span class=text><?php xl('Address','e'); ?>: </span></td><td><input type=entry size=20 name=street value="<?php echo htmlspecialchars($facility["street"], ENT_QUOTES) ?>"></td>
70 <td><span class=text><?php xl('City','e'); ?>: </span></td><td><input type=entry size=20 name=city value="<?php echo htmlspecialchars($facility{"city"}, ENT_QUOTES) ?>"></td>
71 </tr>
72 <tr>
73 <td><span class=text><?php xl('State','e'); ?>: </span></td><td><input type=entry size=20 name=state value="<?php echo htmlspecialchars($facility{"state"}, ENT_QUOTES) ?>"></td>
74 <td><span class=text><?php xl('Zip Code','e'); ?>: </span></td><td><input type=entry size=20 name=postal_code value="<?php echo htmlspecialchars($facility{"postal_code"}, ENT_QUOTES) ?>"></td>
75 </tr>
76 <tr>
77 <td><span class=text><?php xl('Country','e'); ?>: </span></td><td><input type=entry size=20 name=country_code value="<?php echo htmlspecialchars($facility{"country_code"}, ENT_QUOTES) ?>"></td>
78 <td><span class=text><?php xl('Federal EIN','e'); ?>: </span></td><td><input type=entry size=20 name=federal_ein value="<?php echo htmlspecialchars($facility{"federal_ein"}, ENT_QUOTES) ?>"></td>
79 </tr>
80 <tr>
81 <td>&nbsp;</td><td>&nbsp;</td>
82 <td width="21"><span class=text><?php ($GLOBALS['simplified_demographics'] ? xl('Facility Code','e') : xl('Facility NPI','e')); ?>:
83 </span></td><td><input type=entry size=20 name=facility_npi value="<?php echo htmlspecialchars($facility{"facility_npi"}, ENT_QUOTES) ?>"></td>
84 </tr>
85 <tr>
86 <td><span class='text'><?php xl('Billing Location','e'); ?>: </span></td>
87 <td><input type='checkbox' name='billing_location' value='1' <?php if ($facility['billing_location'] == 1) echo 'checked'; ?>></td>
88 <td rowspan='2'><span class='text'><?php xl('Accepts Assignment','e'); ?><br>(<?php xl('only if billing location','e'); ?>): </span></td>
89 <td><input type='checkbox' name='accepts_assignment' value='1' <?php if ($facility['accepts_assignment'] == 1) echo 'checked'; ?>></td>
90 </tr>
91 <tr>
92 <td><span class='text'><?php xl('Service Location','e'); ?>: </span></td>
93 <td><input type='checkbox' name='service_location' value='1' <?php if ($facility['service_location'] == 1) echo 'checked'; ?>></td>
94 <td>&nbsp;</td>
95 </tr>
96 <tr>
97 <td><span class=text><?php xl('POS Code','e'); ?>: </span></td>
98 <td colspan="6">
99 <select name="pos_code">
100 <?php
101 $pc = new POSRef();
103 foreach ($pc->get_pos_ref() as $pos) {
104 echo "<option value=\"" . $pos["code"] . "\" ";
105 if ($facility['pos_code'] == $pos['code']) {
106 echo "selected";
108 echo ">" . $pos['code'] . ": ". $pos['title'];
109 echo "</option>\n";
113 </select>
114 </td>
115 </tr>
116 <tr>
117 <td><span class="text"><?php xl('Billing Attn','e'); ?>:</span></td>
118 <td colspan="4"><input type="text" name="attn" size="45" value="<?php echo htmlspecialchars($facility['attn'], ENT_QUOTES) ?>"></td>
119 </tr>
120 <tr>
121 <td><span class="text"><?php xl('CLIA Number','e'); ?>:</span></td>
122 <td colspan="4"><input type="text" name="domain_identifier" size="45" value="<?php echo htmlspecialchars($facility['domain_identifier'], ENT_QUOTES) ?>"></td>
123 </tr>
124 <tr>
125 <td>&nbsp;</td><td>&nbsp;</td>
126 <td>&nbsp;</td><td><br><br><input type="submit" value=<?php xl('Update Info','e'); ?>>&nbsp;&nbsp;&nbsp;<a href="facilities.php" class=link_submit>[<?php xl('Back','e'); ?>]</font></a></td>
127 </tr>
128 </table>
129 </form>
131 </body>
132 </html>