当前位置: 首页>>代码示例>>PHP>>正文


PHP Patient::getGenderString方法代码示例

本文整理汇总了PHP中Patient::getGenderString方法的典型用法代码示例。如果您正苦于以下问题:PHP Patient::getGenderString方法的具体用法?PHP Patient::getGenderString怎么用?PHP Patient::getGenderString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Patient的用法示例。


在下文中一共展示了Patient::getGenderString方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getPCRData

 /**
  * @param $patientId
  * @param $side
  * @param $element
  * @return array
  */
 public function getPCRData($patientId, $side, $element)
 {
     $pcr = array();
     $this->patient = \Patient::model()->findByPk((int) $patientId);
     $patientAge = $this->patient->getAge();
     $ageGroup = 0;
     if ($patientAge < 60) {
         $ageGroup = 1;
     } elseif ($patientAge >= 60 && $patientAge < 70) {
         $ageGroup = 2;
     } elseif ($patientAge >= 70 && $patientAge < 80) {
         $ageGroup = 3;
     } elseif ($patientAge >= 80 && $patientAge < 90) {
         $ageGroup = 4;
     } elseif ($patientAge >= 90) {
         $ageGroup = 5;
     }
     $gender = ucfirst($this->patient->getGenderString());
     $is_diabetic = 'N';
     if ($this->patient->getDiabetes()) {
         $is_diabetic = 'Y';
     }
     $is_glaucoma = 'N';
     if (strpos($this->patient->getSdl(), 'glaucoma') !== false) {
         $is_glaucoma = 'Y';
     }
     $risk = \PatientRiskAssignment::model()->findByAttributes(array("patient_id" => $patientId));
     $user = Yii::app()->session['user'];
     $user_id = $user->id;
     if (strpos(get_class($element), 'OphTrOperationnote') !== false) {
         $user_id = $this->getOperationNoteSurgeonId($patientId);
     }
     $user_data = \User::model()->findByPk($user_id);
     $doctor_grade_id = $user_data['originalAttributes']['doctor_grade_id'];
     $pcr['patient_id'] = $patientId;
     $pcr['side'] = $side;
     $pcr['age_group'] = $ageGroup;
     $pcr['gender'] = $gender;
     $pcr['diabetic'] = $is_diabetic;
     $pcr['glaucoma'] = $is_glaucoma;
     $pcr['lie_flat'] = $this->getCannotLieFlat($patientId);
     $no_view = 'N';
     $no_view_data = $this->getOpticDisc($patientId, $side);
     if (count($no_view_data) >= 1) {
         $no_view = 'Y';
     }
     $pcr['noview'] = $no_view;
     $pcr['allod'] = $this->getOpticDisc($patientId, $side, true);
     $pcr['anteriorsegment'] = $this->getPatientAnteriorSegment($patientId, $side);
     $pcr['doctor_grade_id'] = $doctor_grade_id;
     $pcr['axial_length_group'] = $this->getAxialLength($patientId, $side);
     return $pcr;
 }
开发者ID:across-health,项目名称:OphCiExamination,代码行数:59,代码来源:PcrRisk.php

示例2: mapGenderFromPatient

 /**
  * @param \Patient $patient
  */
 protected function mapGenderFromPatient(\Patient $patient)
 {
     $gender_string = $patient->getGenderString();
     $gender = \Gender::model()->findByAttributes(array('name' => $gender_string));
     if ($gender) {
         $this->gender_id = $gender->id;
     }
 }
开发者ID:openeyes,项目名称:openeyes,代码行数:11,代码来源:Element_OphCoCvi_Demographics.php


注:本文中的Patient::getGenderString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。