Example #1
0
 public function executeEdit(sfWebRequest $request)
 {
     if ($this->getRequest()->getMethod() == sfRequest::POST) {
         //Create User and set object attributes
         $dosage = DosagePeer::retrieveByPk($this->getRequestParameter('id'));
         $dosage->setTitle($this->getRequestParameter('title'));
         //Save object to database
         if ($dosage->save()) {
             $this->getUser()->setFlash('SUCCESS_MESSAGE', Constant::RECORD_EDITED_SUCCESSFULLY);
             $this->redirect('Dosage/list');
         } else {
             $this->getUser()->setFlash('ERROR_MESSAGE', Constant::DB_ERROR);
             $this->redirect('Dosage/edit?id=' . Utility::EncryptQueryString($request->getParameter('id')));
         }
     } else {
         $this->dosage = DosagePeer::retrieveByPk(Utility::DecryptQueryString($request->getParameter('id')));
     }
 }
Example #2
0
 public function executeEdit(sfWebRequest $request)
 {
     if ($this->getRequest()->getMethod() == sfRequest::POST) {
         $bed = WardBedPeer::retrieveByPk($this->getRequestParameter('id'));
         $bed->setWardId($this->getRequestParameter('ward_id'));
         $bed->setBed($this->getRequestParameter('bed'));
         $bed->setPrice($this->getRequestParameter('price'));
         if ($bed->save()) {
             $this->getUser()->setFlash('SUCCESS_MESSAGE', Constant::RECORD_EDITED_SUCCESSFULLY);
             $this->redirect('WardBed/list');
         } else {
             $this->getUser()->setFlash('ERROR_MESSAGE', Constant::DB_ERROR);
             $this->redirect('WardBed/edit?id=' . Utility::EncryptQueryString($request->getParameter('id')));
         }
     } else {
         $this->bed = WardBedPeer::retrieveByPk(Utility::DecryptQueryString($request->getParameter('id')));
     }
 }
Example #3
0
 public function executeEdit(sfWebRequest $request)
 {
     if ($this->getRequest()->getMethod() == sfRequest::POST) {
         $pharma = PharmaPeer::retrieveByPk($this->getRequestParameter('id'));
         $pharma->setType($request->getParameter('type'));
         $pharma->setName($request->getParameter('name'));
         $pharma->setStrength($request->getParameter('strength'));
         $pharma->setPrice($request->getParameter('price'));
         $pharma->setCompany($request->getParameter('company'));
         if ($pharma->save()) {
             $this->getUser()->setFlash('SUCCESS_MESSAGE', Constant::RECORD_EDITED_SUCCESSFULLY);
             $this->redirect('Pharma/list');
         } else {
             $this->getUser()->setFlash('ERROR_MESSAGE', Constant::DB_ERROR);
             $this->redirect('Pharma/edit?id=' . Utility::EncryptQueryString($request->getParameter('id')));
         }
     } else {
         //$this->AllDataAvailable();
         $this->pharma = PharmaPeer::retrieveByPk(Utility::DecryptQueryString($request->getParameter('id')));
     }
 }
Example #4
0
 public function executeEdit(sfWebRequest $request)
 {
     if ($this->getRequest()->getMethod() == sfRequest::POST) {
         //Create User and set object attributes
         $ward = WardPeer::retrieveByPk($this->getRequestParameter('id'));
         $ward->setTitle($this->getRequestParameter('title'));
         //$ward->setDescription($this->getRequestParameter('description'));
         //$ward->setStatus($this->getRequestParameter('status'));
         //Save object to database
         if ($ward->save()) {
             $this->getUser()->setFlash('SUCCESS_MESSAGE', Constant::RECORD_EDITED_SUCCESSFULLY);
             $this->redirect('Ward/list');
         } else {
             $this->getUser()->setFlash('ERROR_MESSAGE', Constant::DB_ERROR);
             $this->redirect('Ward/edit?id=' . Utility::EncryptQueryString($request->getParameter('id')));
         }
     } else {
         //$this->AllDataAvailable();
         $this->ward = WardPeer::retrieveByPk(Utility::DecryptQueryString($request->getParameter('id')));
     }
 }
Example #5
0
 public function executeEditDuty(sfWebRequest $request)
 {
     if ($this->getRequest()->getMethod() == sfRequest::POST) {
         //Create User and set object attributes
         $duty = DutyRosterPeer::retrieveByPk($this->getRequestParameter('id'));
         $duty->setEmployeeId($this->getRequestParameter('employee_id'));
         $duty->setDutyPlaceId($this->getRequestParameter('duty_place_id'));
         $duty->setDutyDate($this->getRequestParameter('duty_date'));
         $duty->setFrom($this->getRequestParameter('from'));
         $duty->setTo($this->getRequestParameter('to'));
         $duty->setSubstituteId($this->getRequestParameter('substitute_id'));
         //Save object to database
         if ($duty->save()) {
             $this->getUser()->setFlash('SUCCESS_MESSAGE', Constant::RECORD_EDITED_SUCCESSFULLY);
             $this->redirect('FrontDesk/dutyRoster');
         } else {
             $this->getUser()->setFlash('ERROR_MESSAGE', Constant::DB_ERROR);
             $this->redirect('FrontDesk/editduty?id=' . Utility::EncryptQueryString($request->getParameter('id')));
         }
     } else {
         $this->duty = DutyRosterPeer::retrieveByPk(Utility::DecryptQueryString($request->getParameter('id')));
     }
 }
	 <!-- Populating the List -->
		
	  <?php 
if (count($patients)) {
    ?>
		<?php 
    foreach ($patients as $j => $patient) {
        ?>
		
		<tr>
		<td align="left"><?php 
        echo $patient->getId();
        ?>
 </td>
		<td align="left"><?php 
        echo link_to($patient->getName(), 'FrontDesk/visitAdd?patient=' . Utility::EncryptQueryString($patient->getId()));
        ?>
</td>
		<td style="text-align:left;"><?php 
        echo $patient->getCnic();
        ?>
</td>
		</tr>
	  
	   <?php 
    }
    ?>
	  <tr>
		<td class="last">&nbsp;</td>
	  </tr>
	   <?php 
Example #7
0
        ?>
</td>
				<td align="center"><?php 
        echo $patient->getDob('d-M-Y');
        ?>
</td>
				<td align="center"><?php 
        echo $patient->getGender();
        ?>
				<td align="right">
				<?php 
        echo link_to('&nbsp;', 'Patient/edit?id=' . Utility::EncryptQueryString($patient->getId()), array('title' => 'Edit', 'class' => 'edit'));
        ?>
				
				<?php 
        echo link_to('&nbsp;', 'Patient/delete?id=' . Utility::EncryptQueryString($patient->getId()), array('confirm' => 'Are you sure you want to Delete this?', 'title' => 'Delete', 'class' => 'delete'));
        ?>
				</td>
              </tr>
			<?php 
    }
    ?>
		
			   
			
			<tr>
				<td>
					<?php 
    if ($pager->haveToPaginate()) {
        ?>
					<?php 
        ?>
</td>
		<td align="right" class="edit">
		<?php 
        $visit_status = Constant::GetVisitStatusTitle($visit->getStatus());
        $fee_status = Constant::GetVisitStatusTitle($visit->getFeePaid());
        if ($visit_status == Constant::VISIT_DONE_TITLE && $fee_status == Constant::VISIT_FEE_NOT_PAID_TITLE) {
            echo link_to('Pay Fee', 'FrontDesk/payVisitFee?visit=' . Utility::EncryptQueryString($visit->getId()), array('confirm' => 'Confirm Fee Payment!'));
        } elseif ($visit_status == Constant::VISIT_DONE_TITLE && $fee_status == Constant::VISIT_FEE_PAID_TITLE) {
            echo 'Fee Paid';
        } else {
            echo '';
        }
        ?>
		<?php 
        echo link_to('&nbsp;', 'FrontDesk/visitEdit?visit=' . Utility::EncryptQueryString($visit->getId()), array('title' => 'Edit', 'class' => 'edit'));
        ?>
		<?php 
        //echo link_to('&nbsp;','FrontDesk/deletevisit?id='.Utility::EncryptQueryString($visit->getId()), array('confirm'=>'Are you sure you want to Delete this?', 'title'=>'Delete', 'class' => 'delete'));
        ?>
		</td>
	  </tr>
	  
	   <?php 
    }
    ?>
	  <tr>
		<td class="last">&nbsp;</td>
	  </tr>
	   <?php 
} else {
Example #9
0
				<th width="17%" style="text-align:left;">Last Updated</th>
                <th width="13%" style="text-align:left;">Operation</th>
              </tr>
			  
			 <!-- Populating the List -->
				
			  <?php 
if (count($lab_tests)) {
    ?>
				<?php 
    foreach ($lab_tests as $j => $lab_test) {
        ?>
				
              <tr>
                <td align="left"><?php 
        echo link_to($lab_test->getLabTest(), 'LabReport/add?report=' . Utility::EncryptQueryString($lab_test->getId()));
        ?>
 </td>
				<td align="left"><?php 
        echo $lab_test->getPatient();
        ?>
</td>
				<td align="center"><?php 
        echo $lab_test->getVisit();
        ?>
</td>
				<td align="center"><?php 
        echo $lab_test->getUpdatedAt('d-M-Y');
        ?>
				<td align="right">
				<?php 
            ?>
 </td>
				<td align="left"><?php 
            echo $report->getPatient();
            ?>
</td>
				<td align="center"><?php 
            echo $report->getVisit();
            ?>
</td>
				<td align="center"><?php 
            echo $report->getUpdatedAt('d-M-Y');
            ?>
				<td align="right">
				<?php 
            echo link_to('&nbsp;', 'LabReport/edit?report=' . Utility::EncryptQueryString($report->getId()), array('title' => 'Edit', 'class' => 'edit'));
            ?>
				
				<?php 
            //echo link_to('&nbsp;','LabTest/delete?id='.Utility::EncryptQueryString($lab_test->getId()), array('confirm'=>'Are you sure you want to Delete this?', 'title'=>'Delete', 'class' => 'delete'));
            ?>
				</td>
              </tr>
	  
	   <?php 
        }
        ?>
	  <tr>
		<td class="last">&nbsp;</td>
	  </tr>
	   <?php 
Example #11
0
<tr>
	<td colspan="4" height="40">&nbsp;</td>
</tr>


<tr class="datagrid">
	<th colspan="4">System Authentication Information</th>
</tr>


<tr class="datagrid">
	<td>Username:</td>
	<td>&nbsp;
	<?php 
if ($user != NULL) {
    echo $user->getUser();
} else {
    echo link_to('Assign Credintials', 'Employee/giveCredential?employee=' . Utility::EncryptQueryString($employee->getId()));
}
?>
 </td>
<td colspan="2">&nbsp;</td>
</tr>
</table>
			</div>
		</div>
	</div>
<div class="clear"></div>    
</div>
        ?>
</td>
		<td style="text-align:center;"><?php 
        echo $duty->getTo();
        ?>
</td>
		<td align="left"><?php 
        echo $duty->getEmployeeRelatedBySubstituteId();
        ?>
</td>
		<td align="right" class="edit">
		<?php 
        echo link_to('&nbsp;', 'FrontDesk/editDuty?id=' . Utility::EncryptQueryString($duty->getId()), array('title' => 'Edit', 'class' => 'edit'));
        ?>
		<?php 
        echo link_to('&nbsp;', 'FrontDesk/deleteDuty?id=' . Utility::EncryptQueryString($duty->getId()), array('confirm' => 'Are you sure you want to Delete this?', 'title' => 'Delete', 'class' => 'delete'));
        ?>
		</td>
	  </tr>
	  
	   <?php 
    }
    ?>
	  <tr>
		<td class="last">&nbsp;</td>
	  </tr>
	   <?php 
} else {
    ?>
	  
			<tr>
Example #13
0
		<th style="text-align:left;">Ward Doctor</th>
		<th style="text-align:left;">Operation</th>
	  </tr>
	  
	 <!-- Populating the List -->
		
	  <?php 
if (count($visits)) {
    ?>
		<?php 
    foreach ($visits as $j => $visit) {
        ?>
		
		<tr>
		<td align="left"><?php 
        echo link_to($visit->getPatient(), 'Visit/checkup?patient=' . Utility::EncryptQueryString($visit->getPatientId()) . '&visit=' . Utility::EncryptQueryString($visit->getId()));
        ?>
 </td>
		<td align="left"><?php 
        echo Utility::getAge($visit->getPatient()->getDob('Y-m-d'), date('Y-m-d'));
        ?>
 years</td>
		<td align="left"><?php 
        echo $visit->getPatient()->getGender();
        ?>
</td>
		<td style="text-align:center;"><?php 
        echo $visit->getTime();
        ?>
 hrs.</td>
		<td align="left"><?php 
Example #14
0
 public function executeGiveCredential(sfWebRequest $request)
 {
     if ($request->isMethod('Post')) {
         $password = md5($this->getRequestParameter('password'));
         $user = new User();
         $user->setEmployeeId($this->getRequestParameter('employee_id'));
         $user->setUser($this->getRequestParameter('user_name'));
         $user->setPassword($password);
         $user->setRoleId($this->getRequestParameter('role_id'));
         $user->setStatus(Constant::RECORD_STATUS_ACTIVE);
         $user->save();
         $this->getUser()->setFlash('SUCCESS_MESSAGE', 'Credentials Assigned Successfully.');
         $this->redirect('Employee/detail?employee=' . Utility::EncryptQueryString($this->getRequestParameter('employee_id')));
     } else {
         $this->employee = EmployeePeer::retrieveByPk(Utility::DecryptQueryString($request->getParameter('employee')));
     }
 }