function writeTemplateLine($selector, $dosage, $period, $quantity, $refills, $prices, $taxrates) { global $tmpl_line_no; ++$tmpl_line_no; echo " <tr>\n"; echo " <td class='tmplcell drugsonly'>"; echo "<input type='text' name='form_tmpl[{$tmpl_line_no}][selector]' value='{$selector}' size='8' maxlength='100'>"; echo "</td>\n"; echo " <td class='tmplcell drugsonly'>"; echo "<input type='text' name='form_tmpl[{$tmpl_line_no}][dosage]' value='{$dosage}' size='6' maxlength='10'>"; echo "</td>\n"; echo " <td class='tmplcell drugsonly'>"; generate_form_field(array('data_type' => 1, 'field_id' => 'tmpl[' . $tmpl_line_no . '][period]', 'list_id' => 'drug_interval', 'empty_title' => 'SKIP'), $period); echo "</td>\n"; echo " <td class='tmplcell drugsonly'>"; echo "<input type='text' name='form_tmpl[{$tmpl_line_no}][quantity]' value='{$quantity}' size='3' maxlength='7'>"; echo "</td>\n"; echo " <td class='tmplcell drugsonly'>"; echo "<input type='text' name='form_tmpl[{$tmpl_line_no}][refills]' value='{$refills}' size='3' maxlength='5'>"; echo "</td>\n"; foreach ($prices as $pricelevel => $price) { echo " <td class='tmplcell'>"; echo "<input type='text' name='form_tmpl[{$tmpl_line_no}][price][{$pricelevel}]' value='{$price}' size='6' maxlength='12'>"; echo "</td>\n"; } $pres = sqlStatement("SELECT option_id FROM list_options " . "WHERE list_id = 'taxrate' ORDER BY seq"); while ($prow = sqlFetchArray($pres)) { echo " <td class='tmplcell'>"; echo "<input type='checkbox' name='form_tmpl[{$tmpl_line_no}][taxrate][" . $prow['option_id'] . "]' value='1'"; if (strpos(":{$taxrates}", $prow['option_id']) !== false) { echo " checked"; } echo " /></td>\n"; } echo " </tr>\n"; }
<div class="tab_title sr" data-role="tab" data-value="sr">Srpski</div> <div class="tab_title en" data-role="tab" data-value="en">English</div> <div class="tab sr_tab"> <?php generate_form_field("text", "title_sr", "Naziv", "", $errors, "Naziv usluge"); ?> <?php generate_form_field("textarea", "body_sr", "Opis usluge", "", $errors); ?> </div> <div class="tab en_tab"> <?php generate_form_field("text", "title_en", "Title", "", $errors, "Title of the page"); ?> <?php generate_form_field("textarea", "body_en", "Description", "", $errors); ?> </div> </div> <div class="form-field"> <label for="published">Status:</label> <select id="published" name="published"> <option value="false">Skrivena</option> <option value="true">Objavljena</option> </select> </div> <div class="form-field"> <input type="submit" name="submit" value="Sačuvaj"> </div> </form> </section>
?> </td> </tr> <?php } // end of if has admin access ?> <tr id="nameRow"> <td width='1%' nowrap><b><?php xl('Name', 'e'); ?> :</b></td> <td> <?php generate_form_field(array('data_type' => 1, 'field_id' => 'title', 'list_id' => 'titles', 'empty_title' => ' '), $row['title']); ?> <b><?php xl('Last', 'e'); ?> :</b><input type='text' size='10' name='form_lname' class='inputtext' maxlength='50' value='<?php echo htmlspecialchars($row['lname'], ENT_QUOTES); ?> '/> <b><?php xl('First', 'e'); ?> :</b> <input type='text' size='10' name='form_fname' class='inputtext' maxlength='50' value='<?php echo htmlspecialchars($row['fname'], ENT_QUOTES);
<span class="title"><?php xl('Advance Directives', 'e'); ?> </span> <br><br> <form action='advancedirectives.php' method='post' onsubmit='return validate(this)' enctype="multipart/form-data"> <table border=0 cellpadding=1 cellspacing=1> <?php echo "<tr><td class='required'>"; xl('Completed', 'e'); echo ":</td><td width=10></td><td class='text'>"; generate_form_field(array('data_type' => 1, 'field_id' => 'yesno', 'list_id' => 'yesno', 'empty_title' => 'SKIP'), $form_completedad); echo "</td></tr><tr><td class='required'>"; xl('Last Reviewed', 'e'); echo ":</td><td width=10></td><td class='text'>"; generate_form_field(array('data_type' => 4, 'field_id' => 'adreviewed'), $form_adreviewed); echo "<script language='JavaScript'>Calendar.setup({inputField:'form_adreviewed', ifFormat:'%Y-%m-%d', button:'img_adreviewed'});</script>"; echo "</td></tr>"; echo "<tr><td class=text colspan=2><br><input type=submit id=create value='" . xl('Save') . "' /> <input type=button id=cancel value='" . xl('Cancel') . "' /></td></tr>"; ?> </table></form> <div> <?php $query = "SELECT id FROM categories WHERE name='Advance Directive'"; $myrow2 = sqlQuery($query); if ($myrow2) { $parentId = $myrow2['id']; $query = "SELECT id, name FROM categories WHERE parent='{$parentId}'"; $resNew1 = sqlStatement($query); while ($myrows3 = sqlFetchArray($resNew1)) { $categoryId = $myrows3['id'];
(<?php xl('leave blank if still active', 'e'); ?> ) </td> </tr> <tr id='row_occurrence'> <td valign='top' nowrap><b><?php xl('Occurrence', 'e'); ?> :</b></td> <td> <?php // Modified 6/2009 by BM to incorporate the occurrence items into the list_options listings generate_form_field(array('data_type' => 1, 'field_id' => 'occur', 'list_id' => 'occurrence', 'empty_title' => 'SKIP'), $irow['occurrence']); ?> </td> </tr> <tr id='row_classification'> <td valign='top' nowrap><b><?php xl('Classification', 'e'); ?> :</b></td> <td> <select name='form_classification'> <?php foreach ($ISSUE_CLASSIFICATIONS as $key => $value) { echo " <option value='{$key}'"; if ($key == $irow['classification']) {
:</b></td> <td> <?php generate_form_field(array('data_type' => 1, 'field_id' => 'laterality', 'list_id' => 'proc_lat', 'description' => xl('Laterality of this procedure, if applicable')), $row['laterality']); ?> </td> </tr> <tr class='resonly'> <td width='1%' nowrap><b><?php echo xlt('Default Units'); ?> :</b></td> <td> <?php generate_form_field(array('data_type' => 1, 'field_id' => 'units', 'list_id' => 'proc_unit', 'description' => xl('Optional default units for manual entry of results')), $row['units']); ?> </td> </tr> <tr class='resonly'> <td nowrap><b><?php echo xlt('Default Range'); ?> :</b></td> <td> <input type='text' size='40' name='form_range' maxlength='255' value='<?php echo htmlspecialchars($row['range'], ENT_QUOTES); ?> '
echo $result3["subscriber_postal_code"]; ?> "> <span class='required'<?php if ($GLOBALS['omit_employers']) { echo " style='display:none'"; } ?> > <?php xl('Country', 'e'); ?> : </span> <?php // Modified 7/2009 by BM to incorporate data types generate_form_field(array('data_type' => $GLOBALS['country_data_type'], 'field_id' => 'i' . $i . 'subscriber_country', 'list_id' => $GLOBALS['country_list'], 'fld_length' => '10', 'max_length' => '63', 'edit_options' => 'C'), $result3['subscriber_country']); ?> <br /> <span class=bold><?php xl('Subscriber Phone', 'e'); ?> : <input type='text' size='20' name='i<?php echo $i; ?> subscriber_phone' value='<?php echo $result3["subscriber_phone"]; ?> ' onkeyup='phonekeyup(this,mypcc)' /> </span><br /> <span class=bold><?php
echo " <td class='bold'>" . xlt('DOB') . ":</td>\n"; echo " <td class='text'>" . text($row['DOB']) . "</td>\n"; echo " </tr>\n"; echo " <tr>\n"; echo " <td class='bold'>" . xlt('SSN') . ":</td>\n"; echo " <td class='text'>" . text($row['ss']) . "</td>\n"; echo " </tr>\n"; echo " <tr>\n"; echo " <td class='bold'>" . xlt('Current Location') . ":</td>\n"; // Note that $current_location has already been html escaped echo " <td class='text'>{$current_location}</td>\n"; echo " </tr>\n"; echo " <tr>\n"; echo " <td class='bold'>" . xlt('Check In To') . ":</td>\n"; echo " <td class='text'>"; generate_form_field(array('data_type' => 1, 'field_id' => 'newloc', 'list_id' => 'chartloc', 'empty_title' => ''), ''); echo " </td>\n"; echo " </tr>\n"; echo " <tr>\n"; echo " <td class='bold'>" . xlt('Or Out To') . ":</td>\n"; echo " <td class='text'><select name='form_newuser' onchange='userSelect()'>\n"; echo " <option value=''></option>"; $ures = sqlStatement("SELECT id, fname, mname, lname FROM users " . "WHERE username != '' AND active = 1 ORDER BY lname, fname, mname"); while ($urow = sqlFetchArray($ures)) { echo " <option value='" . attr($urow['id']) . "'"; echo ">" . text($urow['lname']) . ', ' . text($urow['fname']) . ' ' . text($urow['mname']) . "</option>\n"; } echo " </select></td>\n"; echo " </tr>\n"; echo " <tr>\n"; echo " <td> </td>\n";
<br> <form action='patient_data.php' name='patient_data' method='post' onsubmit='return top.restoreSession()'> <table border=0 cellpadding=1 cellspacing=1> <?php echo "<tr><td class='required'>"; echo xlt('Date/Time'); echo ":</td><td class='text'>"; echo "<input type='text' size='16' name='form_date' id='form_date' " . "value='" . attr($form_date) . "' " . "onkeyup='datekeyup(this,mypcc)' onblur='dateblur(this,mypcc)' " . "title='" . xla('yyyy-mm-dd hh:mm:ss') . "' />"; echo "<img src='../../pic/show_calendar.gif' align='absbottom' width='24' height='22'" . "id='img_date' border='0' alt='[?]' style='cursor:pointer'" . "title='" . xla('Click here to choose a date') . "' />"; echo "<script language='JavaScript'>Calendar.setup({inputField:'form_date', ifFormat:'%Y-%m-%d %H:%M:%S', button:'img_date', showsTime:'true'});</script>"; echo "</td></tr>"; echo "<tr><td class='required'>"; echo xlt('Completed'); echo ":</td><td class='text'>"; generate_form_field(array('data_type' => 1, 'field_id' => 'complete', 'list_id' => 'yesno', 'empty_title' => 'SKIP'), $form_complete ? $form_complete : "YES"); echo "</td></tr>"; echo "<tr><td class='bold'>"; echo xlt('Results/Details'); echo ":</td><td class='text'>"; echo "<textarea name='form_result' cols='40' rows='3'>"; echo attr($form_result); echo "</textarea>"; echo "</td></tr>"; echo "</table>"; echo "<input type='hidden' name='form_category' value='" . attr($category) . "' />"; echo "<input type='hidden' name='form_item' value='" . attr($item) . "' />"; if (isset($entryID)) { echo "<input type='hidden' name='form_entryID' value='" . attr($entryID) . "' />"; } ?>
align='absbottom' width='24' height='22' id='img_to_date' border='0' alt='[?]' style='cursor: pointer' title='<?php echo xlt('Click here to choose a date'); ?> '></td> </tr> <tr> <td class='label'><?php echo xlt('Status'); # status code drop down creation ?> :</td> <td><?php generate_form_field(array('data_type' => 1, 'field_id' => 'apptstatus', 'list_id' => 'apptstat', 'empty_title' => 'All'), $_POST['form_apptstatus']); ?> </td> <td><?php echo xlt('Category'); ?> :</td> <td> <select id="form_apptcat" name="form_apptcat"> <?php $categories = fetchAppointmentCategories(); echo "<option value='ALL'>" . xlt("All") . "</option>"; while ($cat = sqlFetchArray($categories)) { echo "<option value='" . attr($cat['id']) . "'"; if ($cat['id'] == $_POST['form_apptcat']) { echo " selected='true' ";
<select name='form_reviewed'> <?php foreach (array('1' => xl('All'), '2' => xl('Reviewed'), '3' => xl('Received, not reviewed'), '4' => xl('Sent, not received'), '5' => xl('Not sent')) as $key => $value) { echo "<option value='{$key}'"; if ($key == $form_reviewed) { echo " selected"; } echo ">" . text($value) . "</option>\n"; } ?> </select> <?php generate_form_field(array('data_type' => 10, 'field_id' => 'provider', 'empty_title' => '-- All Providers --'), $form_provider); ?> </td> </tr> <tr> <td class='text' align='center'> <input type='checkbox' name='form_patient' value='1' <?php if ($form_patient) { echo 'checked '; } ?> />Current Patient Only <span title='<?php
</tr> <?php foreach ($l_arr as $layout_entry) { ?> <tr> <td style="width:180px;"> <span class=text><?php echo text(xl_layout_label($layout_entry['title'])); ?> : </span> </td> <td style="width:270px;"> <?php $entry_data = sqlQuery("SELECT `field_value` FROM `facility_user_ids` " . "WHERE `uid` = ? AND `facility_id` = ? AND `field_id` = ?", array($user_info['id'], $fac_info['id'], $layout_entry['field_id'])); echo "<td><span class='text'>" . generate_form_field($layout_entry, $entry_data['field_value']) . " </td>"; ?> </td> </tr> <?php } ?> </table> </form> <!-- include support for the list-add selectbox feature --> <?php include $GLOBALS['fileroot'] . "/library/options_listadd.inc"; ?>
Calendar.setup({inputField:'dates', ifFormat:'%Y-%m-%d %H:%M:%S', button:'img_date', showsTime:true}); </script> </tr> <tr> <td><span class=text><?php echo htmlspecialchars(xl('Type of Disclosure'), ENT_NOQUOTES); ?> : </span></TD> <td><?php if ($editlid) { //To incorporate the disclosure types into the list_options listings generate_form_field(array('data_type' => 1, 'field_id' => 'disclosure_type', 'list_id' => 'disclosure_type', 'fld_length' => '10', 'max_length' => '63', 'empty_title' => 'SKIP'), $app_event); } else { //To incorporate the disclosure types into the list_options listings generate_form_field(array('data_type' => 1, 'field_id' => 'disclosure_type', 'list_id' => 'disclosure_type', 'fld_length' => '10', 'max_length' => '63', 'empty_title' => 'SKIP'), $title); } ?> </td> </tr> <tr> <td><span class=text><?php echo htmlspecialchars(xl('Recipient of the Disclosure'), ENT_NOQUOTES); ?> : </span></td> <td class='text'> <?php if ($editlid) { ?> <input type=entry name=recipient_name size=20 value="<?php
:</b></td> <td valign='top'> <?php generate_form_field(array('data_type' => 1, 'field_id' => 'order_priority', 'list_id' => 'ord_priority'), $row['order_priority']); ?> </td> </tr> <tr> <td width='1%' valign='top' nowrap><b><?php xl('Status', 'e'); ?> :</b></td> <td valign='top'> <?php generate_form_field(array('data_type' => 1, 'field_id' => 'order_status', 'list_id' => 'ord_status'), $row['order_status']); ?> </td> </tr> <tr> <td width='1%' valign='top' nowrap><b><?php xl('Clinical History', 'e'); ?> :</b></td> <td valign='top'> <input type='text' maxlength='255' name='form_clinical_hx' style='width:100%' class='inputtext' value='<?php echo attr($row['clinical_hx']); ?> ' />
<?php xl('Specialty', 'e'); ?> : <input type='text' name='form_specialty' size='10' value='<?php echo htmlspecialchars(strip_escape_custom($_POST['form_specialty']), ENT_QUOTES); ?> ' class='inputtext' title='<?php xl("Any part of the desired specialty", "e"); ?> ' /> <?php echo xl('Type') . ": "; // Generates a select list named form_abook_type: generate_form_field(array('data_type' => 1, 'field_id' => 'abook_type', 'list_id' => 'abook_type', 'empty_title' => 'All'), strip_escape_custom($_REQUEST['form_abook_type'])); ?> <input type='checkbox' name='form_external' value='1'<?php if ($form_external) { echo ' checked'; } ?> title='<?php xl("Omit internal users?", "e"); ?> ' /> <?php xl('External Only', 'e'); ?> <input type='submit' class='button' name='form_search' value='<?php
public static function batch_despatch($var, $func, $data_credentials) { global $pid; if (UserService::valid($data_credentials)) { require_once "../../library/invoice_summary.inc.php"; require_once "../../library/options.inc.php"; require_once "../../library/acl.inc"; require_once "../../library/patient.inc"; if ($func == 'ar_responsible_party') { $patient_id = $pid; $encounter_id = $var['encounter']; $x['ar_responsible_party'] = ar_responsible_party($patient_id, $encounter_id); return UserService::function_return_to_xml($x); } elseif ($func == 'getInsuranceData') { $type = $var['type']; $given = $var['given']; $x = getInsuranceData($pid, $type, $given); return UserService::function_return_to_xml($x); } elseif ($func == 'generate_select_list') { $tag_name = $var['tag_name']; $list_id = $var['list_id']; $currvalue = $var['currvalue']; $title = $var['title']; $empty_name = $var['empty_name']; $class = $var['class']; $onchange = $var['onchange']; $x['generate_select_list'] = generate_select_list($tag_name, $list_id, $currvalue, $title, $empty_name, $class, $onchange); return UserService::function_return_to_xml($x); } elseif ($func == 'xl_layout_label') { $constant = $var['constant']; $x['xl_layout_label'] = xl_layout_label($constant); return UserService::function_return_to_xml($x); } elseif ($func == 'generate_form_field') { $frow = $var['frow']; $currvalue = $var['currvalue']; ob_start(); generate_form_field($frow, $currvalue); $x['generate_form_field'] = ob_get_contents(); ob_end_clean(); return UserService::function_return_to_xml($x); } elseif ($func == 'getInsuranceProviders') { $i = $var['i']; $provider = $var['provider']; $insurancei = getInsuranceProviders(); $x = $insurancei; return $x; } elseif ($func == 'get_layout_form_value') { $frow = $var['frow']; $_POST = $var['post_array']; $x['get_layout_form_value'] = get_layout_form_value($frow); return UserService::function_return_to_xml($x); } elseif ($func == 'updatePatientData') { $patient_data = $var['patient_data']; $create = $var['create']; updatePatientData($pid, $patient_data, $create); $x['ok'] = 'ok'; return UserService::function_return_to_xml($x); } elseif ($func == 'updateEmployerData') { $employer_data = $var['employer_data']; $create = $var['create']; updateEmployerData($pid, $employer_data, $create); $x['ok'] = 'ok'; return UserService::function_return_to_xml($x); } elseif ($func == 'newHistoryData') { newHistoryData($pid); $x['ok'] = 'ok'; return UserService::function_return_to_xml($x); } elseif ($func == 'newInsuranceData') { $_POST = $var[0]; foreach ($var as $key => $value) { if ($key >= 3) { $var[$key] = formData($value); } if ($key >= 1) { $parameters[$key] = $var[$key]; } } $parameters[12] = fixDate($parameters[12]); $parameters[27] = fixDate($parameters[27]); call_user_func_array('newInsuranceData', $parameters); $x['ok'] = 'ok'; return UserService::function_return_to_xml($x); } elseif ($func == 'generate_layout_validation') { $form_id = $var['form_id']; ob_start(); generate_layout_validation($form_id); $x = ob_get_clean(); return $x; } } else { throw new SoapFault("Server", "credentials failed"); } }
function display_layout_tabs_data_editable($formtype, $result1, $result2 = '') { global $item_count, $cell_count, $last_group, $CPR; $fres = sqlStatement("SELECT distinct group_name FROM layout_options " . "WHERE form_id = ? AND uor > 0 " . "ORDER BY group_name, seq", array($formtype)); $first = true; while ($frow = sqlFetchArray($fres)) { $this_group = $frow['group_name']; $group_name = substr($this_group, 1); $group_name_esc = htmlspecialchars($group_name, ENT_QUOTES); $titlecols = $frow['titlecols']; $datacols = $frow['datacols']; $data_type = $frow['data_type']; $field_id = $frow['field_id']; $list_id = $frow['list_id']; $currvalue = ''; $group_fields_query = sqlStatement("SELECT * FROM layout_options " . "WHERE form_id = ? AND uor > 0 AND group_name = ? " . "ORDER BY seq", array($formtype, $this_group)); ?> <div class="tab <?php echo $first ? 'current' : ''; ?> " id="tab_<?php echo $group_name_esc; ?> " > <table border='0' cellpadding='0'> <?php while ($group_fields = sqlFetchArray($group_fields_query)) { $titlecols = $group_fields['titlecols']; $datacols = $group_fields['datacols']; $data_type = $group_fields['data_type']; $field_id = $group_fields['field_id']; $list_id = $group_fields['list_id']; $currvalue = ''; if ($formtype == 'DEM') { if ($GLOBALS['athletic_team']) { // Skip fitness level and return-to-play date because those appear // in a special display/update form on this page. if ($field_id === 'fitness' || $field_id === 'userdate1') { continue; } } if (strpos($field_id, 'em_') === 0) { // Skip employer related fields, if it's disabled. if ($GLOBALS['omit_employers']) { continue; } $tmp = substr($field_id, 3); if (isset($result2[$tmp])) { $currvalue = $result2[$tmp]; } } else { if (isset($result1[$field_id])) { $currvalue = $result1[$field_id]; } } } else { if (isset($result1[$field_id])) { $currvalue = $result1[$field_id]; } } // Handle a data category (group) change. if (strcmp($this_group, $last_group) != 0) { $group_name = substr($this_group, 1); // totally skip generating the employer category, if it's disabled. if ($group_name === 'Employer' && $GLOBALS['omit_employers']) { continue; } $last_group = $this_group; } // Handle starting of a new row. if ($titlecols > 0 && $cell_count >= $CPR || $cell_count == 0) { disp_end_row(); echo "<tr>"; } if ($item_count == 0 && $titlecols == 0) { $titlecols = 1; } // Handle starting of a new label cell. if ($titlecols > 0) { disp_end_cell(); $titlecols_esc = htmlspecialchars($titlecols, ENT_QUOTES); echo "<td class='label' colspan='{$titlecols_esc}' "; echo ">"; $cell_count += $titlecols; } ++$item_count; // Added 5-09 by BM - Translate label if applicable if ($group_fields['title']) { echo htmlspecialchars(xl_layout_label($group_fields['title']), ENT_NOQUOTES) . ":"; } else { echo " "; } // Handle starting of a new data cell. if ($datacols > 0) { disp_end_cell(); $datacols_esc = htmlspecialchars($datacols, ENT_QUOTES); echo "<td class='text data' colspan='{$datacols_esc}'"; echo ">"; $cell_count += $datacols; } ++$item_count; echo generate_form_field($group_fields, $currvalue); } ?> </table> </div> <?php $first = false; } }
echo ">" . text($value) . "</option>\n"; } ?> </select> </td> </tr> <tr id='row_distributor'> <td valign='top' nowrap><b><?php echo xlt('Distributor'); ?> :</b></td> <td> <?php // Address book entries for distributors. generate_form_field(array('data_type' => 14, 'field_id' => 'distributor_id', 'list_id' => '', 'edit_options' => 'R', 'description' => xl('Address book entry for the distributor')), ''); ?> </td> </tr> <tr id='row_sale_date'> <td valign='top' nowrap><b><?php echo xlt('Date'); ?> :</b></td> <td> <input type='text' size='10' name='form_sale_date' id='form_sale_date' value='<?php echo attr(date('Y-m-d')); ?> '
?> :</b></td> <td valign='top'> <?php generate_form_field(array('data_type' => 1, 'field_id' => 'order_status', 'list_id' => 'ord_status'), $row['order_status']); ?> </td> </tr> <tr> <td width='1%' valign='top' nowrap><b><?php xl('History order', 'e'); ?> :</b> <td valign='top'> <?php generate_form_field(array('data_type' => 1, 'field_id' => 'history_order', 'list_id' => 'boolean'), $row['history_order']); ?> </td> </tr> <tr> <td width='1%' valign='top' nowrap><b><?php xl('Clinical History', 'e'); ?> :</b></td> <td valign='top'> <input type='text' maxlength='255' name='form_clinical_hx' style='width:100%' class='inputtext' value='<?php echo attr($row['clinical_hx']); ?> ' /> </td>
?> ' /> <input type='hidden' name='reply_to' id='reply_to' value='<?php echo htmlspecialchars($reply_to, ENT_QUOTES); ?> ' /> <b><?php echo htmlspecialchars(xl('Status'), ENT_NOQUOTES); ?> :</b> <?php if ($form_message_status == "") { $form_message_status = 'New'; } generate_form_field(array('data_type' => 1, 'field_id' => 'message_status', 'list_id' => 'message_status', 'empty_title' => 'SKIP', 'order_by' => 'title'), $form_message_status); ?> </td> </tr> <tr> <td class='text'> <b><?php echo htmlspecialchars(xl('To'), ENT_QUOTES); ?> :</b> <input type='textbox' name='assigned_to_text' id='assigned_to_text' size='40' readonly='readonly' value='<?php echo htmlspecialchars(xl("Select Users From The Dropdown List"), ENT_QUOTES); ?> ' > <input type='hidden' name='assigned_to' id='assigned_to' >
echo " "; } echo "</b>"; // Handle starting of a new data cell. if ($datacols > 0) { end_cell(); $datacols_esc = htmlspecialchars($datacols, ENT_QUOTES); echo "<td valign='top' colspan='{$datacols_esc}' class='text'"; if ($cell_count > 0) { echo " style='padding-left:5pt'"; } echo ">"; $cell_count += $datacols; } ++$item_count; generate_form_field($frow, $currvalue); echo "</div>"; } end_group(); ?> </div></div> </form> </div> <p> <div id='otherdiv' style='display:none'> <span class='bold'><?php echo htmlspecialchars(xl('Details'), ENT_NOQUOTES); ?> :</span><br> <textarea name='body' rows='6' cols='40' wrap='virtual'><?php echo htmlspecialchars($body, ENT_NOQUOTES);
function display_layout_tabs_data_editable($formtype, $result1, $result2='') { global $item_count, $cell_count, $last_group, $CPR,$condition_str; $fres = sqlStatement("SELECT distinct group_name FROM layout_options " . "WHERE form_id = ? AND uor > 0 " . "ORDER BY group_name, seq", array($formtype) ); $first = true; while ($frow = sqlFetchArray($fres)) { $this_group = $frow['group_name']; $group_name = substr($this_group, 1); $group_name_esc = htmlspecialchars( $group_name, ENT_QUOTES); $titlecols = $frow['titlecols']; $datacols = $frow['datacols']; $data_type = $frow['data_type']; $field_id = $frow['field_id']; $list_id = $frow['list_id']; $currvalue = ''; if (substr($this_group,1,8) === 'Employer' && $GLOBALS['omit_employers']) continue; $group_fields_query = sqlStatement("SELECT * FROM layout_options " . "WHERE form_id = ? AND uor > 0 AND group_name = ? " . "ORDER BY seq", array($formtype,$this_group) ); ?> <div class="tab <?php echo $first ? 'current' : '' ?>" id="tab_<?php echo str_replace(' ', '_',$group_name_esc)?>" > <table border='0' cellpadding='0'> <?php while ($group_fields = sqlFetchArray($group_fields_query)) { $titlecols = $group_fields['titlecols']; $datacols = $group_fields['datacols']; $data_type = $group_fields['data_type']; $field_id = $group_fields['field_id']; $list_id = $group_fields['list_id']; $backup_list = $group_fields['list_backup_id']; $condition_str = get_conditions_str($condition_str,$group_fields); $currvalue = ''; if ($formtype == 'DEM') { if (strpos($field_id, 'em_') === 0) { // Skip employer related fields, if it's disabled. if ($GLOBALS['omit_employers']) continue; $tmp = substr($field_id, 3); if (isset($result2[$tmp])) $currvalue = $result2[$tmp]; } else { if (isset($result1[$field_id])) $currvalue = $result1[$field_id]; } } else { if (isset($result1[$field_id])) $currvalue = $result1[$field_id]; } // Handle a data category (group) change. if (strcmp($this_group, $last_group) != 0) { $group_name = substr($this_group, 1); // totally skip generating the employer category, if it's disabled. if ($group_name === 'Employer' && $GLOBALS['omit_employers']) continue; $last_group = $this_group; } // Handle starting of a new row. if (($titlecols > 0 && $cell_count >= $CPR) || $cell_count == 0) { disp_end_row(); echo "<tr>"; } if ($item_count == 0 && $titlecols == 0) { $titlecols = 1; } // Handle starting of a new label cell. if ($titlecols > 0) { disp_end_cell(); $titlecols_esc = htmlspecialchars( $titlecols, ENT_QUOTES); $field_id_label = 'label_'.$group_fields['field_id']; echo "<td class='label' colspan='$titlecols_esc' id='$field_id_label' "; echo ">"; $cell_count += $titlecols; } ++$item_count; // Added 5-09 by BM - Translate label if applicable if ($group_fields['title']) echo (htmlspecialchars( xl_layout_label($group_fields['title']), ENT_NOQUOTES).":"); else echo " "; // Handle starting of a new data cell. if ($datacols > 0) { disp_end_cell(); $datacols_esc = htmlspecialchars( $datacols, ENT_QUOTES); $field_id = 'text_'.$group_fields['field_id']; echo "<td class='text data' colspan='$datacols_esc' id='$field_id'"; echo ">"; $cell_count += $datacols; } ++$item_count; echo generate_form_field($group_fields, $currvalue); } ?> </table> </div> <?php $first = false; } }
<?php if (!$useCVX) { ?> <tr> <td align="right"> <span class=text> <?php echo htmlspecialchars(xl('Immunization'), ENT_NOQUOTES); ?> </span> </td> <td> <?php // Modified 7/2009 by BM to incorporate the immunization items into the list_options listings generate_form_field(array('data_type' => 1, 'field_id' => 'immunization_id', 'list_id' => 'immunizations', 'empty_title' => 'SKIP'), $immunization_id); ?> </td> </tr> <?php } else { ?> <tr> <td align="right" valign="top" style="padding-top:4px;"> <span class=text> <?php echo htmlspecialchars(xl('Immunization'), ENT_NOQUOTES); ?> (<?php echo htmlspecialchars(xl('CVX Code'), ENT_NOQUOTES); ?>
<?php } ?> </td> </tr> <tr> <td><?php echo xlt('Category'); ?> :</td> <td></td> <td> <?php generate_form_field(array('data_type' => 1, 'field_id' => 'superbill', 'list_id' => 'superbill'), $superbill); ?> <input type='checkbox' title='<?php echo xlt("Syndromic Surveillance Report"); ?> ' name='reportable' value='1'<?php if (!empty($reportable)) { echo ' checked'; } ?> /> <?php echo xlt('Diagnosis Reporting'); ?>
<tr> <td nowrap> <span id='title_apptstatus'><b><?php echo htmlspecialchars($GLOBALS['athletic_team'] ? xl('Session Type') : xl('Status')); ?> :</b></span> <span id='title_prefcat' style='display:none'><b><?php xl('Pref Cat', 'e'); ?> :</b></span> </td> <td nowrap> <?php generate_form_field(array('data_type' => 1, 'field_id' => 'apptstatus', 'list_id' => 'apptstat', 'empty_title' => 'SKIP'), $row['pc_apptstatus']); ?> <!-- The following list will be invisible unless this is an In Office event, in which case form_apptstatus (above) is to be invisible. --> <select name='form_prefcat' style='width:100%;display:none' title='<?php xl('Preferred Event Category', 'e'); ?> '> <?php echo $prefcat_options; ?> </select> </td>
<div class="tab_title sr" data-role="tab" data-value="sr">Srpski</div> <div class="tab_title en" data-role="tab" data-value="en">English</div> <div class="tab sr_tab"> <?php generate_form_field("text", "title_sr", "Naslov", $page->title_sr, $errors, "Naslov stranice"); ?> <?php generate_form_field("textarea", "body_sr", "Sadržaj stranice", $page->body_sr, $errors); ?> </div> <div class="tab en_tab"> <?php generate_form_field("text", "title_en", "Title", $page->title_en, $errors, "Title of the page"); ?> <?php generate_form_field("textarea", "body_en", "Content", $page->body_en, $errors); ?> </div> </div> <div class="form-field"> <label for="published">Status:</label> <select id="published" name="published"> <option value="false" <?php echo !$page->published ? "selected" : ""; ?> >Skrivena</option> <option value="true"<?php echo $page->published ? "selected" : ""; ?> >Objavljena</option> </select>
onclick='return divclick(this,"div_note");' /> <b><?php xl('Create Patient Note', 'e'); ?> </b> <div id='div_note' class='section' style='display:none;margin-top:0.5em;'> <table> <tr> <td class='itemtitle' width='1%' nowrap><?php xl('Type', 'e'); ?> </td> <td> <?php // Added 6/2009 by BM to incorporate the patient notes into the list_options listings generate_form_field(array('data_type' => 1, 'field_id' => 'note_type', 'list_id' => 'note_type', 'empty_title' => 'SKIP'), ''); ?> </td> </tr> <tr> <td class='itemtitle' width='1%' nowrap>To</td> <td> <select name='form_note_to' style='width:100%'> <?php while ($urow = sqlFetchArray($ures)) { echo " <option value='" . $urow['username'] . "'"; echo ">" . $urow['lname']; if ($urow['fname']) { echo ", " . $urow['fname']; } echo "</option>\n";
echo ">" . text($value) . "\n"; } ?> </select> </td> </tr> <!-- Reaction For Medication Allergy --> <tr id='row_severity'> <td valign='top' nowrap><b><?php echo xlt('Severity'); ?> :</b></td> <td><?php $severity = $irow['severity_al']; generate_form_field(array('data_type' => 1, 'field_id' => 'severity_id', 'list_id' => 'severity_ccda', 'empty_title' => 'SKIP'), $severity); ?> </td> </tr> <tr id='row_reaction'> <td valign='top' nowrap><b><?php echo xlt('Reaction'); ?> :</b></td> <td> <?php echo generate_select_list('form_reaction', 'reaction', $irow['reaction'], '', '', '', ''); ?> </td> </tr>
$currvalue = $ptrow[$field_id]; } /***************************************************************** $newvalue = ''; if (isset($result['fields'][$reskey])) $newvalue = $result['fields'][$reskey]; //// Zero-length input means nothing will change. // if ($newvalue === '') $newvalue = $currvalue; // $newvalue = trim($newvalue); $newvalue = cms_field_to_lbf($newvalue, $data_type, $field_id); *****************************************************************/ $newvalue = cms_field_to_lbf($data_type, $reskey, $result['fields']); echo " <tr class='detail'>\n"; echo " <td class='bold'>" . text($field_title) . "</td>\n"; echo " <td>" . generate_display_field($lorow, $currvalue) . "</td>\n"; echo " <td>"; generate_form_field($lorow, $newvalue); echo "</td>\n"; echo " </tr>\n"; } } $field_id = 'cmsportal_login'; if (empty($ptrow[$field_id])) { if ($result['post']['user'] !== '') { // Registered in portal but still need to record that in openemr. echo "</table>\n"; echo "<input type='hidden' name='form_{$field_id}' value='" . attr($result['post']['user']) . "' />\n"; } else { // Portal registration is needed. $newvalue = isset($result['fields']['email']) ? trim($result['fields']['email']) : ''; echo " <tr class='detail'>\n"; echo " <td class='bold' style='color:red;'>" . xlt('New Portal Login') . "</td>\n";
function issue_ippf_con_form($issue, $thispid) { global $pprow, $item_count, $cell_count, $last_group; $shrow = getHistoryData($thispid); if ($issue) { $pprow = sqlQuery("SELECT * FROM lists_ippf_con WHERE id = '{$issue}'"); } else { $pprow = array(); } echo "<div id='ippf_con' style='display:none'>\n"; $fres = sqlStatement("SELECT * FROM layout_options " . "WHERE form_id = 'CON' AND uor > 0 " . "ORDER BY group_name, seq"); $last_group = ''; $cell_count = 0; $item_count = 0; $display_style = 'block'; while ($frow = sqlFetchArray($fres)) { $this_group = $frow['group_name']; $titlecols = $frow['titlecols']; $datacols = $frow['datacols']; $data_type = $frow['data_type']; $field_id = $frow['field_id']; $list_id = $frow['list_id']; $currvalue = ''; if ($frow['edit_options'] == 'H') { // This data comes from static history if (isset($shrow[$field_id])) { $currvalue = $shrow[$field_id]; } } else { if (isset($pprow[$field_id])) { $currvalue = $pprow[$field_id]; } } // Handle a data category (group) change. if (strcmp($this_group, $last_group) != 0) { end_group(); $group_seq = 'con' . substr($this_group, 0, 1); $group_name = substr($this_group, 1); $last_group = $this_group; echo "<br /><span class='bold'><input type='checkbox' name='form_cb_{$group_seq}' value='1' " . "onclick='return divclick(this,\"div_{$group_seq}\");'"; if ($display_style == 'block') { echo " checked"; } echo " /><b>{$group_name}</b></span>\n"; echo "<div id='div_{$group_seq}' class='section' style='display:{$display_style};'>\n"; echo " <table border='0' cellpadding='0' width='100%'>\n"; $display_style = 'none'; } // Handle starting of a new row. if ($titlecols > 0 && $cell_count >= $CPR || $cell_count == 0) { end_row(); echo " <tr>"; } if ($item_count == 0 && $titlecols == 0) { $titlecols = 1; } // Handle starting of a new label cell. if ($titlecols > 0) { end_cell(); echo "<td valign='top' colspan='{$titlecols}' width='1%' nowrap"; echo $frow['uor'] == 2 ? " class='required'" : " class='bold'"; if ($cell_count == 2) { echo " style='padding-left:10pt'"; } echo ">"; $cell_count += $titlecols; } ++$item_count; echo "<b>"; if ($frow['title']) { echo $frow['title'] . ":"; } else { echo " "; } echo "</b>"; // Handle starting of a new data cell. if ($datacols > 0) { end_cell(); echo "<td valign='top' colspan='{$datacols}' class='text'"; if ($cell_count > 0) { echo " style='padding-left:5pt'"; } echo ">"; $cell_count += $datacols; } ++$item_count; if ($frow['edit_options'] == 'H') { echo generate_display_field($frow, $currvalue); } else { generate_form_field($frow, $currvalue); } } end_group(); echo "</div>\n"; }