public function CreateEncountersReport(stdClass $params) { $params->to = $params->to == '' ? date('Y-m-d') : $params->to; $html = "<br><h1>Encounters ({$params->from} - {$params->to} )</h1>"; $html2 = ""; $html .= "<table border=\"0\" width=\"100%\">\n <tr>\n <th colspan=\"2\" style=\"font-weight: bold;\">" . i18nRouter::t("encounters") . "</th>\n </tr>\n <tr>\n <td>" . i18nRouter::t("provider") . "</td>\n <td>" . i18nRouter::t("encounter") . "</td>\n </tr>"; $html2 = $this->htmlEncountersList($params, $html2); $html .= $html2; $html .= "</table>"; ob_end_clean(); $Url = $this->ReportBuilder($html, 10); return array('success' => true, 'html' => $html, 'url' => $Url); }
public function htmlSuperBill($params) { $html = ''; $html .= "<table border=\"0\" width=\"100%\" >\n <tr>\n <th colspan=\"3\" style=\"font-weight: bold;\">" . i18nRouter::t("patient") . "</th>\n </tr>\n <tr>\n <td>" . i18nRouter::t("name") . ': ' . $params['title'] . ' ' . $params['fname'] . ' ' . $params['mname'] . ' ' . $params['lname'] . "</td>\n <td>" . i18nRouter::t("sex") . ': ' . $params['sex'] . "</td>\n <td>" . i18nRouter::t("emer_contact") . ': ' . $params['emer_contact'] . "</td>\n </tr>\n <tr>\n <td>" . i18nRouter::t("date_of_birth") . ': ' . date('m-d-Y', strtotime($params['DOB'])) . "</td>\n <td>" . i18nRouter::t("occupation") . ': ' . $params['occupation'] . "</td>\n <td>" . i18nRouter::t("emer_phone") . ': ' . $params['emer_phone'] . "</td>\n </tr>\n <tr>\n <td>" . i18nRouter::t("address") . ': ' . $params['address'] . ' ' . $params['city'] . ', ' . $params['state'] . ' ' . $params['zipcode'] . "</td>\n <td>" . i18nRouter::t("social_security") . ': ' . $params['SS'] . "</td>\n <td>" . i18nRouter::t("home_phone") . ': ' . $params['home_phone'] . "<br>" . i18nRouter::t("mobile_phone") . ': ' . $params['mobile_phone'] . "</td>\n\n </tr>\n <tr><td>\n </td></tr>" . '</table>'; $html .= "<table border=\"0\" width=\"100%\">\n <tr>\n <th colspan=\"3\" style=\"font-weight: bold;\">" . i18nRouter::t("insurance_data") . " (" . i18nRouter::t("primary") . ")</th>\n </tr>\n <tr>\n <td>" . i18nRouter::t("provider") . ': ' . $params['primary_insurance_provider'] . "</td>\n <td>" . i18nRouter::t("subscriber_name") . ': ' . $params['primary_subscriber_fname'] . ' ' . $params['primary_subscriber_mname'] . ' ' . $params['primary_subscriber_lname'] . "</td>\n <td>" . i18nRouter::t("subscriber_employer") . ': ' . $params['primary_subscriber_employer'] . "</td>\n </tr>\n <tr>\n <td>" . i18nRouter::t("plan_name") . ': ' . $params['primary_plan_name'] . '<br>' . i18nRouter::t("effective_date") . ': ' . $params['primary_effective_date'] . "</td>\n <td>" . i18nRouter::t("subscriber_address") . ': ' . $params['primary_subscriber_street'] . ' ' . $params['primary_subscriber_city'] . ', ' . $params['primary_subscriber_state'] . ' ' . $params['primary_subscriber_zip_code'] . "</td>\n <td>" . i18nRouter::t("employer_address") . ': ' . $params['primary_subscriber_employer_street'] . ' ' . $params['primary_subscriber_employer_city'] . ', ' . $params['primary_subscriber_employer_state'] . ' ' . $params['primary_subscriber_employer_zip_code'] . "</td>\n </tr>\n <tr>\n <td>" . i18nRouter::t("group_number") . ': ' . $params['primary_group_number'] . "</td>\n <td>" . i18nRouter::t("phone") . ': ' . $params['primary_subscriber_phone'] . "</td>\n <td>" . i18nRouter::t("subscriber_employer") . ': ' . $params['primary_subscriber_employer'] . "</td>\n </tr>\n <tr>\n <td>" . i18nRouter::t("policy_number") . ': ' . $params['primary_policy_number'] . '<br>' . "</td>\n </tr>\n <tr>"; if ($params['secondary_insurance_provider'] != '') { $html .= "<table border=\"0\" width=\"100%\">\n <tr>\n <th colspan=\"3\" style=\"font-weight: bold;\">" . i18nRouter::t("insurance_data") . " (" . i18nRouter::t("secondary") . ")</th>\n </tr>\n <tr>\n <td>" . i18nRouter::t("provider") . ': ' . $params['secondary_insurance_provider'] . "</td>\n <td>" . i18nRouter::t("subscriber_name") . ': ' . $params['secondary_subscriber_fname'] . ' ' . $params['secondary_subscriber_mname'] . ' ' . $params['secondary_subscriber_lname'] . "</td>\n <td>" . i18nRouter::t("subscriber_employer") . ': ' . $params['secondary_subscriber_employer'] . "</td>\n </tr>\n <tr>\n <td>" . i18nRouter::t("plan_name") . ': ' . $params['secondary_plan_name'] . '<br>' . i18nRouter::t("effective_date") . ': ' . $params['secondary_effective_date'] . "</td>\n <td>" . i18nRouter::t("subscriber_address") . ': ' . $params['secondary_subscriber_street'] . ' ' . $params['secondary_subscriber_city'] . ', ' . $params['secondary_subscriber_state'] . ' ' . $params['secondary_subscriber_zip_code'] . "</td>\n <td>" . i18nRouter::t("employer_address") . ': ' . $params['secondary_subscriber_employer_street'] . ' ' . $params['secondary_subscriber_employer_city'] . ', ' . $params['secondary_subscriber_employer_state'] . ' ' . $params['secondary_subscriber_employer_zip_code'] . "</td>\n </tr>\n <tr>\n <td>" . i18nRouter::t("group_number") . ': ' . $params['secondary_group_number'] . "</td>\n <td>" . i18nRouter::t("phone") . ': ' . $params['secondary_subscriber_phone'] . "</td>\n <td>" . i18nRouter::t("subscriber_employer") . ': ' . $params['secondary_subscriber_employer'] . "</td>\n </tr>\n <tr>\n <td>" . i18nRouter::t("policy_number") . ': ' . $params['secondary_policy_number'] . '<br>' . "</td>\n </tr>\n <tr>"; } if ($params['tertiary_insurance_provider'] != '') { $html .= "<table border=\"0\" width=\"100%\">\n <tr>\n <th colspan=\"3\" style=\"font-weight: bold;\">" . i18nRouter::t("insurance_data") . " (" . i18nRouter::t("tertiary") . ")</th>\n </tr>\n <tr>\n <td>" . i18nRouter::t("provider") . ': ' . $params['tertiary_insurance_provider'] . "</td>\n <td>" . i18nRouter::t("subscriber_name") . ': ' . $params['tertiary_subscriber_fname'] . ' ' . $params['tertiary_subscriber_mname'] . ' ' . $params['tertiary_subscriber_lname'] . "</td>\n <td>" . i18nRouter::t("subscriber_employer") . ': ' . $params['tertiary_subscriber_employer'] . "</td>\n </tr>\n <tr>\n <td>" . i18nRouter::t("plan_name") . ': ' . $params['tertiary_plan_name'] . '<br>' . i18nRouter::t("effective_date") . ': ' . $params['tertiary_effective_date'] . "</td>\n <td>" . i18nRouter::t("subscriber_address") . ': ' . $params['tertiary_subscriber_street'] . ' ' . $params['tertiary_subscriber_city'] . ', ' . $params['tertiary_subscriber_state'] . ' ' . $params['tertiary_subscriber_zip_code'] . "</td>\n <td>" . i18nRouter::t("employer_address") . ': ' . $params['tertiary_subscriber_employer_street'] . ' ' . $params['tertiary_subscriber_employer_city'] . ', ' . $params['tertiary_subscriber_employer_state'] . ' ' . $params['tertiary_subscriber_employer_zip_code'] . "</td>\n </tr>\n <tr>\n <td>" . i18nRouter::t("group_number") . ': ' . $params['tertiary_group_number'] . "</td>\n <td>" . i18nRouter::t("phone") . ': ' . $params['tertiary_subscriber_phone'] . "</td>\n <td>" . i18nRouter::t("subscriber_employer") . ': ' . $params['tertiary_subscriber_employer'] . "</td>\n </tr>\n <tr>\n <td>" . i18nRouter::t("policy_number") . ': ' . $params['tertiary_policy_number'] . '<br>' . "</td>\n </tr>"; } $html .= "</table>"; return $html; }
} require_once dirname(__FILE__) . '/registry.php'; require_once dirname(__FILE__) . '/sites/' . $_REQUEST['site'] . '/conf.php'; require_once dirname(__FILE__) . '/classes/MatchaHelper.php'; include_once dirname(__FILE__) . '/dataProvider/i18nRouter.php'; include_once dirname(__FILE__) . '/dataProvider/Globals.php'; header('Content-Type: text/javascript'); // check if is emergency access.... if (isset($_SESSION['user']) && isset($_SESSION['user']['emergencyAccess']) && $_SESSION['user']['emergencyAccess']) { $isEmerAccess = 1; } else { $isEmerAccess = 0; } print 'isEmerAccess = ' . $isEmerAccess . ';'; // Output the translation selected by the user. $i18n = i18nRouter::getTranslation(); print 'lang = ' . json_encode($i18n) . ';'; // Output all the globals settings on the database. $global = Globals::setGlobals(); $global['root'] = ROOT; $global['url'] = URL; $global['host'] = HOST; $global['site'] = site_dir; print 'globals = ' . json_encode($global) . ';'; if (!isset($_SESSION['site']['error']) && (isset($_SESSION['user']) && $_SESSION['user']['auth'] == true)) { include_once dirname(__FILE__) . '/dataProvider/ACL.php'; include_once dirname(__FILE__) . '/dataProvider/Facilities.php'; include_once dirname(__FILE__) . '/dataProvider/User.php'; $ACL = new ACL(); $perms = array(); /*
function __construct() { $this->ACL = new ACL(); $this->i18n = i18nRouter::getTranslation(); }
public function htmlSuperBill($params) { $html = ''; $html .= '<table border="0" width="100%" > <tr> <th colspan="3" style="font-weight: bold;">' . \i18nRouter::t('patient') . '</th> </tr> <tr> <td>' . \i18nRouter::t('name') . ': ' . $params['title'] . ' ' . $params['fname'] . ' ' . $params['mname'] . ' ' . $params['lname'] . '</td> <td>' . \i18nRouter::t('sex') . ': ' . $params['sex'] . '</td> <td>' . \i18nRouter::t('emer_contact') . ': ' . $params['emer_contact'] . '</td> </tr> <tr> <td>' . \i18nRouter::t('date_of_birth') . ': ' . date('m-d-Y', strtotime($params['DOB'])) . '</td> <td>' . \i18nRouter::t('occupation') . ': ' . $params['occupation'] . '</td> <td>' . \i18nRouter::t('emer_phone') . ': ' . $params['emer_phone'] . '</td> </tr> <tr> <td>' . \i18nRouter::t('address') . ': ' . $params['address'] . ' ' . $params['city'] . ', ' . $params['state'] . ' ' . $params['zipcode'] . '</td> <td>' . \i18nRouter::t('social_security') . ': ' . $params['SS'] . '</td> <td>' . \i18nRouter::t('home_phone') . ': ' . $params['home_phone'] . '<br>' . \i18nRouter::t('mobile_phone') . ': ' . $params['mobile_phone'] . '</td> </tr> <tr><td> </td></tr>' . '</table>'; $html .= '<table border="0" width="100%"> <tr> <th colspan="3" style="font-weight: bold;">' . \i18nRouter::t('insurance_data') . ' (' . \i18nRouter::t('primary') . ')</th> </tr> <tr> <td>' . \i18nRouter::t('provider') . ': ' . $params['primary_insurance_provider'] . '</td> <td>' . \i18nRouter::t('subscriber_name') . ': ' . $params['primary_subscriber_fname'] . ' ' . $params['primary_subscriber_mname'] . ' ' . $params['primary_subscriber_lname'] . '</td> <td>' . \i18nRouter::t('subscriber_employer') . ': ' . $params['primary_subscriber_employer'] . '</td> </tr> <tr> <td>' . \i18nRouter::t('plan_name') . ': ' . $params['primary_plan_name'] . '<br>' . \i18nRouter::t('effective_date') . ': ' . $params['primary_effective_date'] . '</td> <td>' . \i18nRouter::t('subscriber_address') . ': ' . $params['primary_subscriber_street'] . ' ' . $params['primary_subscriber_city'] . ', ' . $params['primary_subscriber_state'] . ' ' . $params['primary_subscriber_zip_code'] . '</td> <td>' . \i18nRouter::t('employer_address') . ': ' . $params['primary_subscriber_employer_street'] . ' ' . $params['primary_subscriber_employer_city'] . ', ' . $params['primary_subscriber_employer_state'] . ' ' . $params['primary_subscriber_employer_zip_code'] . '</td> </tr> <tr> <td>' . \i18nRouter::t('group_number') . ': ' . $params['primary_group_number'] . '</td> <td>' . \i18nRouter::t('phone') . ': ' . $params['primary_subscriber_phone'] . '</td> <td>' . \i18nRouter::t('subscriber_employer') . ': ' . $params['primary_subscriber_employer'] . '</td> </tr> <tr> <td>' . i18nRouter::t('policy_number') . ': ' . $params['primary_policy_number'] . '<br>' . '</td> </tr> <tr>'; if ($params['secondary_insurance_provider'] != '') { $html .= '<table border="0" width="100%"> <tr> <th colspan="3" style="font-weight: bold;">' . \i18nRouter::t('insurance_data') . ' (' . \i18nRouter::t('secondary') . ')</th> </tr> <tr> <td>' . \i18nRouter::t('provider') . ': ' . $params['secondary_insurance_provider'] . '</td> <td>' . \i18nRouter::t('subscriber_name') . ': ' . $params['secondary_subscriber_fname'] . ' ' . $params['secondary_subscriber_mname'] . ' ' . $params['secondary_subscriber_lname'] . '</td> <td>' . \i18nRouter::t('subscriber_employer') . ': ' . $params['secondary_subscriber_employer'] . '</td> </tr> <tr> <td>' . \i18nRouter::t('plan_name') . ': ' . $params['secondary_plan_name'] . '<br>' . \i18nRouter::t('effective_date') . ': ' . $params['secondary_effective_date'] . '</td> <td>' . \i18nRouter::t('subscriber_address') . ': ' . $params['secondary_subscriber_street'] . ' ' . $params['secondary_subscriber_city'] . ', ' . $params['secondary_subscriber_state'] . ' ' . $params['secondary_subscriber_zip_code'] . '</td> <td>' . \i18nRouter::t('employer_address') . ': ' . $params['secondary_subscriber_employer_street'] . ' ' . $params['secondary_subscriber_employer_city'] . ', ' . $params['secondary_subscriber_employer_state'] . ' ' . $params['secondary_subscriber_employer_zip_code'] . '</td> </tr> <tr> <td>' . \i18nRouter::t('group_number') . ': ' . $params['secondary_group_number'] . '</td> <td>' . \i18nRouter::t('phone') . ': ' . $params['secondary_subscriber_phone'] . '</td> <td>' . \i18nRouter::t('subscriber_employer') . ': ' . $params['secondary_subscriber_employer'] . '</td> </tr> <tr> <td>' . \i18nRouter::t('policy_number') . ': ' . $params['secondary_policy_number'] . '<br>' . '</td> </tr> <tr>'; } if ($params['tertiary_insurance_provider'] != '') { $html .= '<table border="0" width="100%"> <tr> <th colspan="3" style="font-weight: bold;">' . \i18nRouter::t('insurance_data') . ' (' . \i18nRouter::t('tertiary') . ')</th> </tr> <tr> <td>' . \i18nRouter::t('provider') . ': ' . $params['tertiary_insurance_provider'] . '</td> <td>' . \i18nRouter::t('subscriber_name') . ': ' . $params['tertiary_subscriber_fname'] . ' ' . $params['tertiary_subscriber_mname'] . ' ' . $params['tertiary_subscriber_lname'] . '</td> <td>' . \i18nRouter::t('subscriber_employer') . ': ' . $params['tertiary_subscriber_employer'] . '</td> </tr> <tr> <td>' . \i18nRouter::t('plan_name') . ': ' . $params['tertiary_plan_name'] . '<br>' . \i18nRouter::t('effective_date') . ': ' . $params['tertiary_effective_date'] . '</td> <td>' . \i18nRouter::t('subscriber_address') . ': ' . $params['tertiary_subscriber_street'] . ' ' . $params['tertiary_subscriber_city'] . ', ' . $params['tertiary_subscriber_state'] . ' ' . $params['tertiary_subscriber_zip_code'] . '</td> <td>' . \i18nRouter::t('employer_address') . ': ' . $params['tertiary_subscriber_employer_street'] . ' ' . $params['tertiary_subscriber_employer_city'] . ', ' . $params['tertiary_subscriber_employer_state'] . ' ' . $params['tertiary_subscriber_employer_zip_code'] . '</td> </tr> <tr> <td>' . \i18nRouter::t('group_number') . ': ' . $params['tertiary_group_number'] . '</td> <td>' . \i18nRouter::t('phone') . ': ' . $params['tertiary_subscriber_phone'] . '</td> <td>' . \i18nRouter::t('subscriber_employer') . ': ' . $params['tertiary_subscriber_employer'] . '</td> </tr> <tr> <td>' . \i18nRouter::t('policy_number') . ': ' . $params['tertiary_policy_number'] . '<br>' . '</td> </tr>'; } $html .= '</table>'; return $html; }