Exemple #1
0
 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;
 }
Exemple #2
0
    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 ajaxcall($chapfilterid = 0)
 {
     $this->load->library('flexigrid');
     //List of all fields that can be sortable. This is Optional.
     //This prevents that a user sorts by a column that we dont want him to access, or that doesnt exist, preventing errors.
     $valid_fields = array('patient_id', 'patient_first_name', 'patient_last_name', 'patient_father_name', 'patient_factor_level');
     $this->load->helper('apputility');
     $this->flexigrid->validate_post('patient_id', 'asc', $valid_fields);
     $this->load->model('patient_ajax_model', 'ajax_model');
     if ($chapfilterid == 0) {
         $chapfilterid = $this->session->userdata('chapter');
     }
     $records = $this->ajax_model->get_patientlist($chapfilterid);
     $this->output->set_header($this->config->item('json_header'));
     $this->load->library("session");
     $this->session->set_userdata("gridpagenumber", $_POST['page']);
     /*
      * Json build WITH json_encode. If you do not have this function please read
      * http://flexigrid.eyeviewdesign.com/index.php/flexigrid/example#s3 to know how to use the alternative
      */
     $startValuePage = $_POST['rp'] * ($_POST['page'] - 1);
     $i = $startValuePage;
     foreach ($records['records']->result() as $row) {
         $i++;
         $tmpName = $row->patient_first_name . ' ' . $row->patient_last_name;
         $record_items[] = array($row->patient_id, $i, $tmpName, $row->patient_father_name, factordeficiencyreturn($row->patient_factor_deficient), $row->patient_factor_level, '<span class="pwh_detailscall">Details</span>');
     }
     //Print please
     $this->output->set_output($this->flexigrid->json_build($records['record_count'], $record_items));
 }
 function getDupDetailsData()
 {
     $patient_id = $_POST['patient_id'];
     $dupQuery = 'select * from tbl_dup where patient_id=' . $patient_id;
     $dupObject = $this->db->query($dupQuery);
     $dupRow = $dupObject->row();
     $this->load->helper('apputility_helper');
     $query = 'select * from tbl_pat_personal a join tbl_chapters b on a.chap_id=b.chapter_id
       where patient_id = ' . $patient_id;
     $queryOrgObject = $this->db->query($query);
     $orgRow = $queryOrgObject->row();
     //Duplicate
     $query = 'select * from tbl_pat_personal a join tbl_chapters b on a.chap_id=b.chapter_id
       where patient_id in (' . $dupRow->patient_match . ')';
     $queryObj = $this->db->query($query);
     $retValue = "";
     $retValue .= '<table cellpadding="4" cellspacing="2" border="0" width="100%">';
     //Clicked Data
     $retValue .= '<tr>
         <td colspan="2" class="chapname" style="background-color:#F3EEEE"><b>Clicked PWH Details</b></td>
     </tr>';
     $retValue .= '<tr>
         <th width="100">Patient Name</th>
         <td>' . $orgRow->patient_first_name . ' ' . $orgRow->patient_last_name . '</td>
     </tr>';
     $retValue .= '<tr>
         <th>Father Name</th>
         <td>' . $orgRow->patient_father_name . '</td>
     </tr>';
     $retValue .= '<tr>
         <th>Data of Birth</th>
         <td>' . mysqltohuman($orgRow->patient_dob) . '</td>
     </tr>';
     $retValue .= '<tr>
         <th>Medical Details</th>
         <td>' . bloodgroupretrun($orgRow->patient_bloodgroup) . ' / ' . factordeficiencyreturn($orgRow->patient_factor_deficient) . ' / ' . $orgRow->patient_factor_level . '</td>
     </tr>';
     $retValue .= '<tr>
         <th>NHR Ref ID*</th>
         <td>' . $orgRow->patient_ID . '</td>
     </tr>';
     $retValue .= '<tr><td colspan="2" style="border-bottom:2px solid #ff0000"><br/></td></tr>';
     foreach ($queryObj->result() as $qryRow) {
         $retValue .= '<tr>
         <td colspan="2" class="chapname" style="background-color:#F3EEEE"><b>Chapter Name: </b>' . $qryRow->chapter_name . '</td>
     </tr>';
         $retValue .= '<tr>
         <th width="100">Patient Name</th>
         <td>' . $qryRow->patient_first_name . ' ' . $qryRow->patient_last_name . '</td>
     </tr>';
         $retValue .= '<tr>
         <th>Father Name</th>
         <td>' . $qryRow->patient_father_name . '</td>
     </tr>';
         $retValue .= '<tr>
         <th>Data of Birth</th>
         <td>' . mysqltohuman($qryRow->patient_dob) . '</td>
     </tr>';
         $retValue .= '<tr>
         <th>Medical Details</th>
         <td>' . bloodgroupretrun($qryRow->patient_bloodgroup) . ' / ' . factordeficiencyreturn($qryRow->patient_factor_deficient) . ' / ' . $qryRow->patient_factor_level . '</td>
     </tr>';
         $retValue .= '<tr>
         <th>NHR Ref ID*</th>
         <td>' . $qryRow->patient_ID . '</td>
     </tr>';
         $retValue .= '<tr><td colspan="2" style="border-bottom:2px solid #cccccc"><br/></td></tr>';
     }
     $retValue .= '<tr><td colspan="2" style="font-size:.8em;color:#ff0000">* This is IT team reference not NHR ID</td></tr>';
     $retValue .= '</table>';
     echo $retValue;
 }
Exemple #5
0
 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;
 }