function get_pwh_data($pwhid = 0) { $pwhQuery = "select * from tbl_pat_personal where patient_ID=" . $pwhid; $datavalue = $this->getdataresult($pwhQuery); //print_r($datavalue); $displayData = ''; $displayData .= '<fieldset>'; $displayData .= '<legend>PwH Details</legend>'; $pwh_result = $datavalue[0]; $pwh_details = ''; $pwh_details = '<div class="ui-accordion-header ui-state-default ui-corner-all nhrpaneltitle" style="margin:5px 0px">PWH Details</div>'; $pwh_details .= '<table width="100%" class="pwhdetails" border="0">'; $pwh_details .= '<tr>'; $pwh_details .= '<td rowspan="5" class="pwhimage" ><img src="' . $this->obj->config->item('base_url') . 'images/miss_image.gif"/> </td>'; $pwh_details .= '<th>Name:</th>'; $pwh_details .= '<td>' . $pwh_result['patient_first_name'] . ' ' . $pwh_result['patient_last_name'] . '</td>'; $pwh_details .= '</tr>'; $pwh_details .= '<tr>'; $pwh_details .= '<th>Father/Gaurdin:</th>'; $pwh_details .= '<td>' . $pwh_result['patient_father_name'] . '</td>'; $pwh_details .= '</tr>'; $pwh_details .= '<tr>'; $pwh_details .= '<th>Clinical:</th>'; $otherFactorInfoTemp = otherfactors($pwh_result['patient_factor_defother']); $otherFactorInfoTemp = empty($otherFactorInfoTemp) ? '' : '/ ' . $otherFactorInfoTemp; $factorinfo = factordeficiencyreturn($pwh_result['patient_factor_deficient']) . $otherFactorInfoTemp; $pwh_details .= '<td>Factor - ' . $factorinfo . ', ' . $pwh_result['patient_factor_level'] . ', ' . bloodgroupretrun($pwh_result['patient_bloodgroup']) . '</td>'; $pwh_details .= '</tr>'; $pwh_details .= '<tr>'; $pwh_details .= '<th>Address:</th>'; $pwh_details .= '<td>'; $pwh_details .= $pwh_result['comm_flat'] . ' ' . $pwh_result['comm_building'] . '<br/>'; $pwh_details .= $pwh_result['commu_road'] . ' ' . $pwh_result['commu_locality'] . '<br/>'; $pwh_details .= $pwh_result['commu_city'] . '-' . $pwh_result['commu_pincode'] . '<br/>'; $pwh_details .= $pwh_result['commu_state'] . '<br/>'; $pwh_details .= '</td>'; $pwh_details .= '</tr>'; // $this->load->helper('form'); $pwh_details .= '<tr>'; $pwh_details .= '<th>Phone:</th>'; $pwh_details .= '<td>' . $pwh_result['commu_phone'] . ' ' . $pwh_result['commu_cellnumber'] . '</td>'; $pwh_details .= '</tr>'; $pwh_details .= '<tr> <td></td> <td colspan="2"> </td> </tr>'; $pwh_details .= '</table>'; $displayData .= '</fieldset>'; return $pwh_details; }
function generatepdf() { // PDF Generation $obj = $this->CI; $pwhdata = $this->pwhdata; $obj->load->library("cezpdf"); $obj->load->helper('apputility'); $obj->cezpdf->setColor(0 / 255, 0 / 255, 0 / 255); $obj->cezpdf->selectFont($obj->config->item('project_abs_path') . 'fonts/Helvetica.afm'); $obj->cezpdf->ezText($pwhdata->chapter_name, 14, array('justification' => 'center')); $obj->cezpdf->ezText('<b>Hemophilia Federation India</b>', 12, array('justification' => 'center')); $obj->cezpdf->ezText('<i>National Hemophilia Registry</i>', 10, array('justification' => 'center')); $obj->cezpdf->addPngFromFile($obj->config->item('project_abs_path') . '/images/login_logo.png', 20, 760, 60); $obj->cezpdf->setLineStyle(0.5); $obj->cezpdf->line(20, 760, 560, 760); $obj->cezpdf->ezText(''); $pwhArray = array(); $pwhArray[0] = '<b>Full Name</b>:* ' . $pwhdata->patient_first_name . ' ' . $pwhdata->patient_last_name; $pwhArray[1] = '<b>Fathers Name</b>:* ' . $pwhdata->patient_father_name; $t = mysqltohuman($pwhdata->patient_dob); if ($t == '00/00/0000') { $t = ''; } $pwhArray[2] = '<b>DOB</b>:* ' . $t; $pwhArray[3] = '<b>Sex</b>:* ' . checksex($pwhdata->patient_sex); $pwhArray[4] = '<b>Address: </b>' . $pwhdata->comm_flat . ' ' . $pwhdata->comm_building . ' ' . $pwhdata->commu_road . ' ' . $pwhdata->commu_locality; /*$pwhArray[]='<b>Flat/Door/Block No: </b>'.$pwhdata->comm_flat; $pwhArray[]='<b>Premises/Building/Village: </b>'.$pwhdata->comm_building; $pwhArray[]='<b>Road/State/Lane/Post Office: </b>'.$pwhdata->commu_road; $pwhArray[]='<b>Area/Locality/Taluk/sub-Division</b>'.$pwhdata->commu_locality;*/ $pwhArray[5] = '<b>Town/City/District: </b>' . $pwhdata->commu_city; $pwhArray[6] = '<b>Pincode</b>: ' . $pwhdata->commu_pincode; $pwhArray[7] = '<b>Contact number</b>:* ' . $pwhdata->commu_phone; $pwhArray[8] = '<b>Mobile number</b>: ' . $pwhdata->commu_cellnumber; $pwhArray[9] = '<b>Blood Group</b>:* ' . bloodgroupretrun($pwhdata->patient_bloodgroup); $pwhArray[10] = '<b>Factor Deficiency</b>:* ' . factordeficiencyreturn($pwhdata->patient_factor_deficient); $pwhArray[11] = '<b>Other Factor Deficiency</b>:* ' . otherfactors($pwhdata->patient_factor_defother); $pwhArray[12] = '<b>Assay/Factor Level</b>:* ' . $pwhdata->patient_factor_level; $pwhArray[13] = '<b>Is PWH Deformed</b>:* ' . checkzero($pwhdata->patient_Deformity); $pwhArray[14] = '<b>Inhibitor Screen</b>: ' . checkzero($pwhdata->patient_inhibitor_screen); $pwhArray[15] = '<b>Is Studying</b>: ' . checkzero($pwhdata->patient_studying); $pwhArray[16] = '<b>Is working</b>: ' . checkzero($pwhdata->patient_working); $pwhArray[17] = '<b>Age of Diagnose</b>: ' . $pwhdata->patient_age_Diagnose; $pwhArray[18] = '<b>Diagnose Place</b>: ' . $pwhdata->patient_hospital_diagnose; $pwhArray[19] = '<b>Other Family Members</b>: ' . checkzero($pwhdata->patient_family_effected); $pwhArray[20] = '<b>Family Income</b>:* ' . checkzero($pwhdata->patient_family_income); $pwhArray[21] = '<b>Do You Have BPL</b>:* ' . checkzero($pwhdata->patient_bpl_eligibility); $pwhArray[22] = '<b>BPL Ref Number</b>: ' . $pwhdata->bpl_ref_number; $pwhArray[23] = '<b>Employed In</b>:* ' . $pwhdata->patient_employment_type; $pwhArray[24] = '<b>Employed Organization Name</b>:* ' . $pwhdata->employment_organization; $pwhArray[25] = '<b>Caste: </b> ' . checkcaste($pwhdata->patient_caste); //for($i=0;$i<count($pwhArray);$i++){ //$obj->cezpdf->ezText($pwhArray[$i],10,array('spacing'=>2)); //echo $pwhArray[$i]."<br/>"; //} $disparray = array(); $disparray[] = $this->dataplacer(array($pwhArray[0])); $disparray[] = $this->dataplacer(array($pwhArray[1])); $disparray[] = $this->dataplacer(array($pwhArray[2], $pwhArray[3])); $disparray[] = $this->dataplacer(array($pwhArray[4])); $disparray[] = $this->dataplacer(array($pwhArray[5], $pwhArray[6])); $disparray[] = $this->dataplacer(array($pwhArray[7], $pwhArray[8])); $disparray[] = $this->dataplacer(array($pwhArray[9], $pwhArray[10])); $disparray[] = $this->dataplacer(array($pwhArray[11])); $disparray[] = $this->dataplacer(array($pwhArray[12])); $disparray[] = $this->dataplacer(array($pwhArray[13], $pwhArray[14])); $disparray[] = $this->dataplacer(array($pwhArray[15])); $disparray[] = $this->dataplacer(array($pwhArray[16])); $disparray[] = $this->dataplacer(array($pwhArray[17], $pwhArray[18])); $disparray[] = $this->dataplacer(array($pwhArray[19], $pwhArray[25])); $disparray[] = $this->dataplacer(array($pwhArray[20])); $disparray[] = $this->dataplacer(array($pwhArray[21], $pwhArray[22])); $disparray[] = $this->dataplacer(array($pwhArray[23])); $disparray[] = $this->dataplacer(array($pwhArray[24])); $y = 680; $i = 0; $x = 100; for ($i = 0; $i < count($disparray); $i++) { $obj->cezpdf->addText(60, $y, 10, $disparray[$i][0]); if (count($disparray[$i]) > 1) { $obj->cezpdf->addText(340, $y, 10, $disparray[$i][1]); } if ($i == 3) { $y = $y - 50; } $y = $y - 25; //echo $row.'<br/>'; } $obj->cezpdf->setLineStyle(0.2, '', '', array(0.2)); $obj->cezpdf->rectangle(50, 702, 480, 50); $disptext = 'National Hemophilia Registry(NHR) is a database of PWHs in India. Please verify your details and fill information which his missing. * marks are compulsory, Please take help from your Chapter. Contact details and phone number is printed below the page. '; $obj->cezpdf->setColor(92 / 255, 94 / 255, 96 / 255); $disptext = $obj->cezpdf->addTextWrap(60, 740, 470, 9, $disptext, array('justification' => 'left')); $disptext = $obj->cezpdf->addTextWrap(60, 725, 470, 9, $disptext, array('justification' => 'left')); $disptext = $obj->cezpdf->addTextWrap(60, 710, 470, 9, $disptext, array('justification' => 'left')); //Footer Block $obj->cezpdf->setLineStyle(0.2, '', '', array(0.2)); $obj->cezpdf->rectangle(50, 150, 480, 40); $obj->cezpdf->setColor(0 / 255, 0 / 255, 0 / 255); $obj->cezpdf->addText(60, 165, 9, 'Signature'); $obj->cezpdf->addText(400, 165, 9, 'Date'); $obj->cezpdf->setLineStyle(0.6, '', '', array(0.2)); $obj->cezpdf->setStrokeColor(0 / 255, 0 / 255, 0 / 255); $obj->cezpdf->line(20, 140, 560, 140); $disptext = '<b>For more Details contact your Chapter:</b>'; $obj->cezpdf->addText(20, 130, 8, $disptext); $disptext = '<i> Chapter Keyperson:</i> ' . $pwhdata->chapter_keyperson; $obj->cezpdf->addText(20, 120, 8, $disptext); $disptext = '<i> Phone Number:</i> ' . $pwhdata->chapter_phone; $obj->cezpdf->addText(20, 110, 8, $disptext); $disptext = '<i> Email:</i> ' . $pwhdata->chapter_email; $obj->cezpdf->addText(20, 100, 8, $disptext); $obj->cezpdf->setColor(160 / 255, 164 / 255, 160 / 255); $disptext = '<b>NHR Helpline:</b> <i>Phone Number:</i> +91.7353777778/+91.9845188706. <i>Email:</i> registry@hemophilia.in <i>Ref.Id:</i> ' . $pwhdata->patient_ID; $obj->cezpdf->line(20, 95, 560, 95); $obj->cezpdf->addText(100, 80, 7, $disptext); //$obj->cezpdf->ezTable($pwhArray); }
function details_pwh_dashboard($id = 0) { //fetch data from database $this->load->database(); $pwh_query = $this->db->query("Select * from tbl_pat_personal where patient_ID=" . $id); $pwh_result = $pwh_query->result_array(); $pwh_result = $pwh_result[0]; $pwh_details = ''; $pwh_details = '<div class="ui-accordion-header ui-state-default ui-corner-all nhrpaneltitle" style="margin:5px 0px">PWH Details</div>'; $pwh_details .= '<table width="100%" class="pwhdetails" border="0">'; $pwh_details .= '<tr>'; $pwh_details .= '<th>Name:</th>'; $pwh_details .= '<td>' . $pwh_result['patient_first_name'] . ' ' . $pwh_result['patient_last_name'] . '</td>'; //Profile Photo Check and Place $this->load->library('pwh_info'); $imginfo = $this->pwh_info->getProfilePicture($id); $pwh_details .= '<td rowspan="5" class="pwhimage" style="border-bottom:1px solid #CCCCCC">' . $imginfo . ' <a href="' . $this->config->item('base_url') . 'mediaupload/view_uploadform/' . $id . '/1"> <button style="width:100%" >Uload Photo</button></a> </td>'; $pwh_details .= '</tr>'; $pwh_details .= '<tr>'; $pwh_details .= '<th>Father/Gaurdin:</th>'; $pwh_details .= '<td>' . $pwh_result['patient_father_name'] . '</td>'; $pwh_details .= '</tr>'; $pwh_details .= '<tr>'; $pwh_details .= '<th>Clinical:</th>'; $otherFactorInfoTemp = otherfactors($pwh_result['patient_factor_defother']); $otherFactorInfoTemp = empty($otherFactorInfoTemp) ? '' : '/ ' . $otherFactorInfoTemp; $factorinfo = factordeficiencyreturn($pwh_result['patient_factor_deficient']) . $otherFactorInfoTemp; $pwh_details .= '<td>Factor - ' . $factorinfo . ', ' . $pwh_result['patient_factor_level'] . ', ' . bloodgroupretrun($pwh_result['patient_bloodgroup']) . '</td>'; $pwh_details .= '</tr>'; $pwh_details .= '<tr>'; $pwh_details .= '<th>Address:</th>'; $pwh_details .= '<td>'; $pwh_details .= $pwh_result['comm_flat'] . ' ' . $pwh_result['comm_building'] . '<br/>'; $pwh_details .= $pwh_result['commu_road'] . ' ' . $pwh_result['commu_locality'] . '<br/>'; $pwh_details .= $pwh_result['commu_city'] . '-' . $pwh_result['commu_pincode'] . '<br/>'; $pwh_details .= $pwh_result['commu_state'] . '<br/>'; $pwh_details .= '</td>'; $pwh_details .= '</tr>'; $this->load->helper('form'); $pwh_details .= '<tr>'; $pwh_details .= '<th style="border-bottom:1px solid #CCCCCC">Phone:</th>'; $pwh_details .= '<td style="border-bottom:1px solid #CCCCCC">' . $pwh_result['commu_phone'] . ' ' . $pwh_result['commu_cellnumber'] . '</td>'; $pwh_details .= '</tr>'; $buttonlink = array(); $buttonlink[] = base_url() . 'homepage/patient_form/' . $pwh_result['patient_ID']; $buttonlink[] = base_url() . 'managemed/med_list/' . $pwh_result['patient_ID']; $buttonlink[] = base_url() . 'manageclinical/list_clinical/' . $pwh_result['patient_ID']; $buttonlink[] = base_url() . 'managepatient/downloadpwdhform/' . $pwh_result['patient_ID']; $buttonlink[] = base_url() . 'communication/pwhsendmail/' . $pwh_result['patient_ID']; $buttonlink[] = base_url() . 'communication/sendmessage/' . $pwh_result['patient_ID']; $buttonlink[] = base_url() . 'core_tracker/maintenance_mode/' . $pwh_result['patient_ID']; $buttonlink[] = base_url() . 'mediaupload/view_uploadform/' . $pwh_result['patient_ID'] . '/3'; $pwh_details .= '<tr> <td colspan="3"> <a href="' . $buttonlink[0] . '"><button id="pwhdataedit"><span class=" "></span>Edit</button></a> <a href="' . $buttonlink[3] . '"><button id="pwhdataedit"><span class=""></span>Download</button></a> <a href="' . $buttonlink[5] . '"><button id="pwhdataedit"><span class=""></span> SMS</button></a> <a href="' . $buttonlink[6] . '"><button id="pwhdataedit"><span class=""></span> Manage</button></a> <a href="' . $buttonlink[7] . '"><button id="pwhdataedit"><span class=""></span> Attach</button></a> </td> </tr>'; if ($pwh_result['maintenance_mode'] != 0) { $pwh_details .= '<tr> <td colspan="3" style="background-color:#EDEDED"><b>This PWH is Marked as: </b>' . pwhTagging($pwh_result['maintenance_mode']) . '</td> </tr>'; } $pwh_details .= '</table>'; /*$pwh_details.='<div class="pwhnavigation">'; $pwh_details.='<a href="#"><img src="'.$this->config->item('base_url').'images/medicinelog.jpg" /></a>'; $pwh_details.='<a href="#"><img src="'.$this->config->item('base_url').'images/deformity.jpg" /></a>'; $pwh_details.='<a href="#"><img src="'.$this->config->item('base_url').'images/clinicaldata.jpg" /></a>'; $pwh_details.='<a href="#"><img src="'.$this->config->item('base_url').'images/modifydata.jpg" /></a>'; $pwh_details.='</div>';*/ $retData['pwh_details'] = $pwh_details; $retData['jsnhrscript'] = ' function bindcontrols(){ // alert("am called"); /* $(\'#pwhdataedit\').bind(\'click\', function() { var pagenumber=$(".pcontrol input").val(); window.location.replace("' . base_url() . 'homepage/patient_form/' . $pwh_result['patient_ID'] . '"); }); $(\'#managemed\').bind(\'click\', function() { window.location.replace("' . base_url() . 'managemed/med_list/' . $pwh_result['patient_ID'] . '"); }); $(\'#manageclinical\').bind(\'click\', function() { window.location.replace("' . base_url() . 'manageclinical/list_clinical/' . $pwh_result['patient_ID'] . '"); });*/ } '; $retData['nhrcallfunc'] = 'bindcontrols()'; // $retData=array('a'=>'hello','b'=>'hi'); $jsonObj = json_encode($retData); echo $jsonObj; }
function details_pwh_dashboard($id = 0) { //fetch data from database $this->load->database(); $pwh_query = $this->db->query("Select * from tbl_pat_personal where patient_ID=" . $id); $pwh_result = $pwh_query->result_array(); $pwh_result = $pwh_result[0]; $pwh_details = ''; $pwh_details = '<div class="tableheading">PWH Details</div>'; $pwh_details .= '<table width="100%" class="pwhdetails">'; $pwh_details .= '<tr>'; $pwh_details .= '<th>Name:</th>'; $pwh_details .= '<td>' . $pwh_result['patient_first_name'] . ' ' . $pwh_result['patient_last_name'] . '</td>'; $pwh_details .= '<td rowspan="4" class="pwhimage"><img src="' . $this->config->item('base_url') . 'images/miss_image.gif"/></td>'; $pwh_details .= '</tr>'; $pwh_details .= '<tr>'; $pwh_details .= '<th>Father/Gaurdin:</th>'; $pwh_details .= '<td>' . $pwh_result['patient_father_name'] . '</td>'; $pwh_details .= '</tr>'; $pwh_details .= '<tr>'; $pwh_details .= '<th>Clinical:</th>'; $otherFactorInfoTemp = otherfactors($pwh_result['patient_factor_defother']); $otherFactorInfoTemp = empty($otherFactorInfoTemp) ? '' : '/ ' . $otherFactorInfoTemp; $factorinfo = factordeficiencyreturn($pwh_result['patient_factor_deficient']) . $otherFactorInfoTemp; $pwh_details .= '<td>Factor - ' . $factorinfo . ', ' . $pwh_result['patient_factor_level'] . ', ' . bloodgroupretrun($pwh_result['patient_bloodgroup']) . '</td>'; $pwh_details .= '</tr>'; $pwh_details .= '<tr>'; $pwh_details .= '<th>Address:</th>'; $pwh_details .= '<td>'; $pwh_details .= $pwh_result['comm_flat'] . ' ' . $pwh_result['comm_building'] . '<br/>'; $pwh_details .= $pwh_result['commu_road'] . ' ' . $pwh_result['commu_locality'] . '<br/>'; $pwh_details .= $pwh_result['commu_city'] . '-' . $pwh_result['commu_pincode'] . '<br/>'; $pwh_details .= $pwh_result['commu_state'] . '<br/>'; $pwh_details .= '</td>'; $pwh_details .= '</tr>'; $pwh_details .= '<tr>'; $pwh_details .= '<th>Phone:</th>'; $pwh_details .= '<td>' . $pwh_result['commu_phone'] . ' ' . $pwh_result['commu_cellnumber'] . '</td>'; $pwh_details .= '</tr>'; $pwh_details .= '</table>'; $pwh_details .= '<div class="pwhnavigation">'; $pwh_details .= '<a href="#"><img src="' . $this->config->item('base_url') . 'images/medicinelog.jpg" /></a>'; $pwh_details .= '<a href="#"><img src="' . $this->config->item('base_url') . 'images/deformity.jpg" /></a>'; $pwh_details .= '<a href="#"><img src="' . $this->config->item('base_url') . 'images/clinicaldata.jpg" /></a>'; $pwh_details .= '<a href="#"><img src="' . $this->config->item('base_url') . 'images/modifydata.jpg" /></a>'; $pwh_details .= '</div>'; echo $pwh_details; }