/**
  * @param null|TblStudentMedicalRecord $tblStudentMedicalRecord
  */
 public function setTblStudentMedicalRecord(TblStudentMedicalRecord $tblStudentMedicalRecord = null)
 {
     $this->tblStudentMedicalRecord = null === $tblStudentMedicalRecord ? null : $tblStudentMedicalRecord->getId();
 }
Example #2
0
 /**
  * @param TblStudentMedicalRecord $tblStudentMedicalRecord
  * @param string                  $Disease
  * @param string                  $Medication
  * @param null|TblPerson          $tblPersonAttendingDoctor
  * @param int                     $InsuranceState
  * @param string                  $Insurance
  *
  * @return TblStudentMedicalRecord
  */
 public function updateStudentMedicalRecord(TblStudentMedicalRecord $tblStudentMedicalRecord, $Disease, $Medication, TblPerson $tblPersonAttendingDoctor, $InsuranceState, $Insurance)
 {
     $Manager = $this->Connection->getEntityManager();
     /** @var null|TblStudentMedicalRecord $Entity */
     $Entity = $Manager->getEntityById('TblStudentMedicalRecord', $tblStudentMedicalRecord->getId());
     if (null !== $Entity) {
         $Protocol = clone $Entity;
         $Entity->setDisease($Disease);
         $Entity->setMedication($Medication);
         $Entity->setServiceTblPersonAttendingDoctor($tblPersonAttendingDoctor);
         $Entity->setInsuranceState($InsuranceState);
         $Entity->setInsurance($Insurance);
         $Manager->saveEntity($Entity);
         Protocol::useService()->createUpdateEntry($this->Connection->getDatabase(), $Protocol, $Entity);
         return true;
     }
     return false;
 }