function save() { $data = json_decode(\route\getParam("data"), true); $parent = $data["parent"]; $children = $data["children"]; include PATH . "src/fileSys.php"; checkDir(); $attrNameArr = array('id', 'class', 'name', 'frame', 'readonly', 'type', 'placeholder'); $styleNameArr = array('width', 'height', 'top', 'left', 'position', 'background-color', 'resize', 'right', 'bottom', 'font-size', 'color', 'z-index', 'cursor', 'border-left', 'border-right', 'border-top', 'border-bottom', 'padding-left', 'padding-right', 'padding-top', 'padding-bottom', 'margin-left', 'margin-right', 'margin-top', 'margin-bottom', 'line-height', 'text-align', 'background-image', 'background-repeat', 'border-radius', 'display', 'background-size', 'pointer-events', 'overflow', 'opacity', 'filter'); createCss($parent, $children, $styleNameArr); createHtml($children, $attrNameArr); print '{"save": "success"}'; }
function visitSummeryHtml($total_vitals, $vital_data, $total_soap, $soap_data, $total_ros, $ros_data, $total_ros_checks, $ros_data_checks, $medical_problem_count, $medication_count, $allergy_count, $dental_count, $surgery_count, $visit_id) { $html = " \n <h3>Visit# {$visit_id} Summery</h3>\n <table style=\"border-top: 1px solid black;\n border-bottom: 1px solid black;\n border-left: 1px solid black;\n border-right: 1px solid black;\n width: 100%;\n border-collapse: collapse;\n margin-top: 1px;\">\n <thead style=\"padding: 5px;\n display: table-header-group;\n \n text-align:left;\n font-weight: bold;\n font-size: 0.7em;\">\n <tr>\n <th style=\"border-bottom: 1px solid black; padding: 5px;background-color: #ddd;\"><strong>Latest Vitals</strong></th>\n <th style=\"border-bottom: 1px solid black; padding: 5px;background-color: #ddd;\"></th>\n <th style=\"border-bottom: 1px solid black; padding: 5px;background-color: #ddd;\">Vitals : </th>\n <th style=\"border-bottom: 1px solid black; padding: 5px;background-color: #ddd;\">{$total_vitals}</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td style=\"padding: 5px; border-bottom: 1px dashed black; font-size: 0.8em;\">Temrature:</td>\n <td style=\"padding: 5px; border-bottom: 1px dashed black; font-size: 0.8em;\">{$vital_data->temperature}</td>\n <td style=\"padding: 5px; border-bottom: 1px dashed black; font-size: 0.8em;\">Blood Pressure:</td>\n <td style=\"padding: 5px; border-bottom: 1px dashed black; font-size: 0.8em;\">{$vital_data->bpd}</td>\n </tr>\n <tr>\n <td style=\"padding: 5px; border-bottom: 1px dashed black; font-size: 0.8em;\">Pulse:</td>\n <td style=\"padding: 5px; border-bottom: 1px dashed black; font-size: 0.8em;\">{$vital_data->pulse}</td>\n <td style=\"padding: 5px; border-bottom: 1px dashed black; font-size: 0.8em;\">Oxigen Sat:</td>\n <td style=\"padding: 5px; border-bottom: 1px dashed black; font-size: 0.8em;\">{$vital_data->oxygen_saturation}</td>\n </tr>\n <tr>\n <td style=\"padding: 5px; border-bottom: 1px dashed black; font-size: 0.8em;\">Height:</td>\n <td style=\"padding: 5px; border-bottom: 1px dashed black; font-size: 0.8em;\">{$vital_data->height}</td>\n <td style=\"padding: 5px; border-bottom: 1px dashed black; font-size: 0.8em;\">Weight:</td>\n <td style=\"padding: 5px; border-bottom: 1px dashed black; font-size: 0.8em;\">{$vital_data->weight}</td>\n </tr>\n <tr>\n <td style=\"padding: 5px; border-bottom: 1px dashed black; font-size: 0.8em;\">BMI:</td>\n <td style=\"padding: 5px; border-bottom: 1px dashed black; font-size: 0.8em;\">{$vital_data->BMI}</td>\n <td style=\"padding: 5px; border-bottom: 1px dashed black; font-size: 0.8em;\">BMI status:</td>\n <td style=\"padding: 5px; border-bottom: 1px dashed black; font-size: 0.8em;\">{$vital_data->BMI_status}</td>\n </tr>\n </tbody>\n \n </table>\n <table style=\"border-top: 1px solid black;\n border-bottom: 1px solid black;\n border-left: 1px solid black;\n border-right: 1px solid black;\n width: 100%;\n border-collapse: collapse;\n margin-top: -1px;\">\n <thead style=\"padding: 5px;\n display: table-header-group;\n \n text-align:left;\n font-weight: bold;\n font-size: 0.7em;\">\n <tr>\n <th style=\"border-bottom: 1px solid black; padding: 5px;background-color: #ddd;\"><strong>SOAP notes</strong></th>\n <th style=\"border-bottom: 1px solid black; padding: 5px;background-color: #ddd;\"></th>\n <th style=\"border-bottom: 1px solid black; padding: 5px;background-color: #ddd;\">SOAP notes : </th>\n <th style=\"border-bottom: 1px solid black; padding: 5px;background-color: #ddd;\">{$total_soap}</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td style=\"padding: 5px; border-bottom: 1px dashed black; font-size: 0.8em;\">Subjective:</td>\n <td colspan=\"3\" style=\"padding: 5px; border-bottom: 1px dashed black; font-size: 0.8em;\">{$soap_data->subjective}</td>\n </tr>\n <tr>\n <td style=\"padding: 5px; border-bottom: 1px dashed black; font-size: 0.8em;\">Objective:</td>\n <td colspan=\"3\" style=\"padding: 5px; border-bottom: 1px dashed black; font-size: 0.8em;\">{$vital_data->objective}</td>\n \n </tr>\n <tr>\n <td style=\"padding: 5px; border-bottom: 1px dashed black; font-size: 0.8em;\">Assessment:</td>\n <td colspan=\"3\" style=\"padding: 5px; border-bottom: 1px dashed black; font-size: 0.8em;\">{$vital_data->assessment}</td>\n </tr>\n <tr>\n <td style=\"padding: 5px; border-bottom: 1px dashed black; font-size: 0.8em;\">plan:</td>\n <td colspan=\"3\" style=\"padding: 5px; border-bottom: 1px dashed black; font-size: 0.8em;\">{$vital_data->plan}</td>\n </tr>\n </tbody>\n </table>\n \n<table style=\"border-top: 1px solid black;\n border-bottom: 1px solid black;\n border-left: 1px solid black;\n border-right: 1px solid black;\n width: 100%;\n border-collapse: collapse;\n margin-top: -1px;\">\n <thead style=\"padding: 5px;\n display: table-header-group;\n \n text-align:left;\n font-weight: bold;\n font-size: 0.7em;\">\n <tr>\n <th style=\"border-bottom: 1px solid black; padding: 5px;background-color: #ddd;\"><strong>Review Of Systems</strong></th>\n <th style=\"border-bottom: 1px solid black; padding: 5px;background-color: #ddd;\"></th>\n <th style=\"border-bottom: 1px solid black; padding: 5px;background-color: #ddd;\"><strong>Review Of Systems Checkboxes</strong></th>\n <th style=\"border-bottom: 1px solid black; padding: 5px;background-color: #ddd;\"></th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td style=\"padding: 5px; border-bottom: 1px dashed black; font-size: 0.8em;\">Date:</td>\n <td style=\"padding: 5px; border-bottom: 1px dashed black; font-size: 0.8em;\">" . date("d M Y", strtotime($ros_data->date)) . "</td>\n <td style=\"padding: 5px; border-bottom: 1px dashed black; font-size: 0.8em;\">Total ROS:</td>\n <td style=\"padding: 5px; border-bottom: 1px dashed black; font-size: 0.8em;\">{$total_ros}</td>\n </tr>\n <tr>\n <td style=\"padding: 5px; border-bottom: 1px dashed black; font-size: 0.8em;\">Date:</td>\n <td style=\"padding: 5px; border-bottom: 1px dashed black; font-size: 0.8em;\">" . date("d M Y", strtotime($ros_data_checks->date)) . "</td>\n <td style=\"padding: 5px; border-bottom: 1px dashed black; font-size: 0.8em;\">Total ROS Checks:</td>\n <td style=\"padding: 5px; border-bottom: 1px dashed black; font-size: 0.8em;\">{$total_ros_checks}</td>\n </tr>\n \n </tbody>\n \n </table>\n \n<table style=\"border-top: 1px solid black;\n border-bottom: 1px solid black;\n border-left: 1px solid black;\n border-right: 1px solid black;\n width: 100%;\n border-collapse: collapse;\n margin-top: -1px;\">\n <thead style=\"padding: 5px;\n display: table-header-group;\n \n text-align:left;\n font-weight: bold;\n font-size: 0.7em;\">\n <tr>\n <th style=\"border-bottom: 1px solid black; padding: 5px;background-color: #ddd;\"><strong>Present Illness</strong></th>\n <th style=\"border-bottom: 1px solid black; padding: 5px;background-color: #ddd;\"></th>\n <th style=\"border-bottom: 1px solid black; padding: 5px;background-color: #ddd;\"></th>\n <th style=\"border-bottom: 1px solid black; padding: 5px;background-color: #ddd;\"></th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td style=\"padding: 5px; border-bottom: 1px dashed black; font-size: 0.8em;\">Total Problems: </td>\n <td style=\"padding: 5px; border-bottom: 1px dashed black; font-size: 0.8em;\">{$medical_problem_count}</td>\n <td style=\"padding: 5px; border-bottom: 1px dashed black; font-size: 0.8em;\">Total Medications:</td>\n <td style=\"padding: 5px; border-bottom: 1px dashed black; font-size: 0.8em;\">{$medication_count}</td>\n </tr>\n <tr>\n <td style=\"padding: 5px; border-bottom: 1px dashed black; font-size: 0.8em;\">Total Allergies:</td>\n <td style=\"padding: 5px; border-bottom: 1px dashed black; font-size: 0.8em;\">{$allergy_count}</td>\n <td style=\"padding: 5px; border-bottom: 1px dashed black; font-size: 0.8em;\">Total Dental Issues:</td>\n <td style=\"padding: 5px; border-bottom: 1px dashed black; font-size: 0.8em;\">{$dental_count}</td>\n </tr>\n <tr>\n <td style=\"padding: 5px; border-bottom: 1px dashed black; font-size: 0.8em;\">Total Surgries:</td>\n <td style=\"padding: 5px; border-bottom: 1px dashed black; font-size: 0.8em;\">{$surgery_count}</td>\n <td style=\"padding: 5px; border-bottom: 1px dashed black; font-size: 0.8em;\"></td>\n <td style=\"padding: 5px; border-bottom: 1px dashed black; font-size: 0.8em;\"></td>\n </tr>\n \n </tbody>\n \n </table>\n"; function createPdf($html, $pdf, $base64enoded = true) { $pdf->SetCreator(PDF_CREATOR); $pdf->SetAuthor("Haroon"); $pdf->SetTitle("My Report"); $pdf->SetSubject("My Report"); // $pdf->SetKeywords("TCPDF, PDF, example, test, guide"); $pdf->setPrintHeader(false); $pdf->setPrintFooter(false); $pdf->AliasNbPages(); $pdf->AddPage(); $pdf->writeHTML($html, true, false, true, false, ''); if ($base64enoded) { $pdf_base64 = $pdf->Output("", "E"); $temp = explode('filename=""', $pdf_base64); return $temp[1]; } else { return $pdf_base64 = $pdf->Output("", "S"); } } return createHtml($html, '', false); }