Modifications for selecting EIN/SSN in facility page for the BOX No. 25 of claim...
[openemr.git] / interface / usergroup / facility_admin.php
blob0a002656354c68b66490334c37b6e377532b85cb
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");
7 if (isset($_GET["fid"])) {
8 $my_fid = $_GET["fid"];
11 if (isset($_POST["fid"])) {
12 $my_fid = $_POST["fid"];
14 if ($_POST["mode"] == "facility")
17 echo '
18 <script type="text/javascript">
19 <!--
20 parent.$.fn.fancybox.close();
21 //-->
22 </script>
27 <html>
28 <head>
30 <link rel="stylesheet" href="<?php echo $css_header;?>" type="text/css">
31 <link rel="stylesheet" href="<?php echo $css_header;?>" type="text/css">
32 <link rel="stylesheet" type="text/css" href="../../library/js/fancybox/jquery.fancybox-1.2.6.css" media="screen" />
33 <script type="text/javascript" src="../../library/dialog.js"></script>
34 <script type="text/javascript" src="../../library/js/jquery.1.3.2.js"></script>
35 <script type="text/javascript" src="../../library/js/common.js"></script>
36 <script type="text/javascript" src="../../library/js/fancybox/jquery.fancybox-1.2.6.js"></script>
37 <script type="text/javascript">
38 function submitform() {
39 if (document.forms[0].facility.value.length>0) {
40 document.forms[0].submit();
41 parent.$.fn.fancybox.close();
42 parent.location.reload();
43 } else {
44 document.forms[0].facility.style.backgroundColor="red";
45 document.forms[0].facility.focus();
49 $(document).ready(function(){
50 $("#cancel").click(function() {
51 parent.$.fn.fancybox.close();
52 });
53 });
55 </script>
57 </head>
58 <body class="body_top" style="width:600px;height:330px !important;">
60 <table>
61 <tr>
62 <td>
63 <span class="title"><?php xl('Edit Facility','e'); ?></span>&nbsp;&nbsp;&nbsp;</td><td>
64 <a class="css_button large_button" name='form_save' id='form_save' onclick='submitform()' href='#' >
65 <span class='css_button_span large_button_span'><?php xl('Save','e');?></span>
66 </a>
67 <a class="css_button large_button" id='cancel' href='#'>
68 <span class='css_button_span large_button_span'><?php xl('Cancel','e');?></span>
69 </a>
70 </td>
71 </tr>
72 </table>
74 <form name='facility' method='post' action="facilities.php" >
75 <input type=hidden name=mode value="facility">
76 <input type=hidden name=newmode value="admin_facility"> <!-- Diffrentiate Admin and add post backs -->
77 <input type=hidden name=fid value="<?php echo $my_fid;?>">
78 <?php $facility = sqlQuery("select * from facility where id='$my_fid'"); ?>
80 <table border=0 cellpadding=0 cellspacing=1 style="width:630px;">
81 <tr>
82 <td width='150px'><span class='text'><?php xl('Name','e'); ?>: </span></td>
83 <td width='220px'><input type='entry' name='facility' size='20' value='<?php echo htmlspecialchars($facility['name'], ENT_QUOTES) ?>'><font class="mandatory">&nbsp;*</font></td>
84 <td width='200px'><span class='text'><?php xl('Phone','e'); ?> <?php xl('as','e'); ?> (000) 000-0000:</span></td>
85 <td width='220px'><input type='entry' name='phone' size='20' value='<?php echo htmlspecialchars($facility['phone'], ENT_QUOTES) ?>'></td>
86 </tr>
87 <tr>
88 <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>
89 <td><span class='text'><?php xl('Fax','e'); ?> <?php xl('as','e'); ?> (000) 000-0000:</span></td>
90 <td><input type='entry' name='fax' size='20' value='<?php echo htmlspecialchars($facility['fax'], ENT_QUOTES) ?>'></td>
91 </tr>
92 <tr>
94 <td><span class=text><?php xl('City','e'); ?>: </span></td>
95 <td><input type=entry size=20 name=city value="<?php echo htmlspecialchars($facility{"city"}, ENT_QUOTES) ?>"></td>
96 <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>
97 </tr>
98 <?php
99 $ssn='';
100 $ein='';
101 if($facility['tax_id_type']=='SY'){
102 $ssn='selected';
104 else{
105 $ein='selected';
108 <tr>
109 <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>
110 <td><span class=text><?php xl('Tax ID','e'); ?>: </span></td><td><select name=tax_id_type><option value="EI" <?php echo $ein;?>><?php xl('EIN','e'); ?></option><option value="SY" <?php echo $ssn;?>><?php xl('SSN','e'); ?></option></select><input type=entry size=11 name=federal_ein value="<?php echo htmlspecialchars($facility{"federal_ein"}, ENT_QUOTES) ?>"></td>
111 </tr>
112 <tr>
113 <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>
114 <td width="21"><span class=text><?php ($GLOBALS['simplified_demographics'] ? xl('Facility Code','e') : xl('Facility NPI','e')); ?>:
115 </span></td><td><input type=entry size=20 name=facility_npi value="<?php echo htmlspecialchars($facility{"facility_npi"}, ENT_QUOTES) ?>"></td>
116 </tr>
117 <tr>
118 <td><span class='text'><?php xl('Billing Location','e'); ?>: </span></td>
119 <td><input type='checkbox' name='billing_location' value='1' <?php if ($facility['billing_location'] == 1) echo 'checked'; ?>></td>
120 <td rowspan='2'><span class='text'><?php xl('Accepts Assignment','e'); ?><br>(<?php xl('only if billing location','e'); ?>): </span></td>
121 <td><input type='checkbox' name='accepts_assignment' value='1' <?php if ($facility['accepts_assignment'] == 1) echo 'checked'; ?>></td>
122 </tr>
123 <tr>
124 <td><span class='text'><?php xl('Service Location','e'); ?>: </span></td>
125 <td><input type='checkbox' name='service_location' value='1' <?php if ($facility['service_location'] == 1) echo 'checked'; ?>></td>
126 <td>&nbsp;</td>
127 </tr>
129 <tr>
130 <td><span class=text><?php xl('POS Code','e'); ?>: </span></td>
131 <td colspan="6">
132 <select name="pos_code">
133 <?php
134 $pc = new POSRef();
136 foreach ($pc->get_pos_ref() as $pos) {
137 echo "<option value=\"" . $pos["code"] . "\" ";
138 if ($facility['pos_code'] == $pos['code']) {
139 echo "selected";
141 echo ">" . $pos['code'] . ": ". $pos['title'];
142 echo "</option>\n";
146 </select>
147 </td>
148 </tr>
149 <tr>
150 <td><span class="text"><?php xl('Billing Attn','e'); ?>:</span></td>
151 <td colspan="4"><input type="text" name="attn" size="45" value="<?php echo htmlspecialchars($facility['attn'], ENT_QUOTES) ?>"></td>
152 </tr>
153 <tr>
154 <td><span class="text"><?php xl('CLIA Number','e'); ?>:</span></td>
155 <td colspan="4"><input type="text" name="domain_identifier" size="45" value="<?php echo htmlspecialchars($facility['domain_identifier'], ENT_QUOTES) ?>"></td>
156 </tr>
157 <tr height="20" valign="bottom">
158 <td colspan=2><span class="text"><font class="mandatory">*</font> <?php echo xl('Required','e');?></span></td>
159 </tr>
161 </table>
162 </form>
164 </body>
165 </html>