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


PHP Patient::listAllergies方法代码示例

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


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

示例1: listAction

 public function listAction()
 {
     $rows = array();
     $problem = array();
     $medication = array();
     $demographics = array();
     $labTestResults = array();
     $allergies = array();
     foreach ($this->_session->filters as $key => $filters) {
         if ($key == 'problem') {
             ${$key} = Patient::listProblems($filters);
         } else {
             if ($key == 'medication') {
                 ${$key} = Patient::listMedications($filters);
             } else {
                 if ($key == 'demographics') {
                     ${$key} = Patient::listDemographics($filters);
                 } else {
                     if ($key == 'labTestResults') {
                         ${$key} = Patient::listLabTestResults($filters);
                     } else {
                         if ($key == 'allergies') {
                             ${$key} = Patient::listAllergies($filters);
                         }
                     }
                 }
             }
         }
     }
     // intersect only for those that have filters
     $tmpArray = array();
     // holds a list of rows that needs to get the intersections
     foreach ($this->_session->filters as $key => $filters) {
         if (!$filters || !isset(${$key})) {
             continue;
         }
         $k = $key;
         if ($k == 'problem' || $k == 'medication') {
             $k .= 's';
         }
         $tmpArray[$k] = ${$key};
     }
     $patientList = null;
     foreach ($tmpArray as $key => $value) {
         if ($patientList === null) {
             $patientList = $value;
             continue;
         }
         $tmp = $patientList;
         $patientList = array();
         foreach ($tmp as $id => $val) {
             if (!isset($value[$id])) {
                 continue;
             }
             $val[$key] = $value[$id][$key];
             $patientList[$id] = $val;
         }
     }
     if ($patientList === null) {
         $patientList = array();
     }
     $this->_session->patientList = $patientList;
     foreach ($patientList as $key => $value) {
         $row = array();
         $row['id'] = $key;
         $row['data'][] = $value['MRN'];
         $row['data'][] = $value['lastName'];
         $row['data'][] = $value['firstName'];
         $row['data'][] = $value['middleName'];
         $row['data'][] = isset($value['problems']) ? implode('<br />', $value['problems']) : '';
         $row['data'][] = isset($value['medications']) ? implode('<br />', $value['medications']) : '';
         $row['data'][] = isset($value['demographics']) ? implode('<br />', $value['demographics']) : '';
         $row['data'][] = isset($value['labTestResults']) ? implode('<br />', $value['labTestResults']) : '';
         $row['data'][] = isset($value['allergies']) ? implode('<br />', $value['allergies']) : '';
         $rows[] = $row;
     }
     $json = Zend_Controller_Action_HelperBroker::getStaticHelper('json');
     $json->suppressExit = true;
     $json->direct(array('rows' => $rows));
 }
开发者ID:lucianobenetti,项目名称:clearhealth,代码行数:80,代码来源:PatientListController.php

示例2: listAction

 public function listAction()
 {
     $rows = array();
     $patientList = array();
     $problems = array();
     $medications = array();
     $demographics = array();
     $labTestResults = array();
     $allergies = array();
     $hsa = array();
     foreach ($this->_session->filters as $key => $filters) {
         if ($key == 'problems') {
             $problems = Patient::listProblems($filters);
         } else {
             if ($key == 'medications') {
                 $medications = Patient::listMedications($filters);
             } else {
                 if ($key == 'demographics') {
                     $filters['reminders'] = true;
                     $demographics = Patient::listDemographics($filters);
                 } else {
                     if ($key == 'labTestResults') {
                         $labTestResults = Patient::listLabTestResults($filters);
                     } else {
                         if ($key == 'allergies') {
                             $allergies = Patient::listAllergies($filters);
                         } else {
                             if ($key == 'hsa') {
                                 $hsa = Patient::listHSA($filters);
                             }
                         }
                     }
                 }
             }
         }
     }
     $tmpArray = array('demographics' => $demographics);
     // holds a list of rows that needs to get the intersections
     foreach ($this->_session->filters as $key => $filters) {
         if (!isset(${$key}) || !is_array(${$key})) {
             continue;
         }
         $tmpArray[$key] = ${$key};
     }
     $patientList = array();
     foreach ($tmpArray as $key => $value) {
         foreach ($value as $id => $val) {
             if (isset($patientList[$id])) {
                 continue;
             }
             $patientList[$id] = $val;
         }
     }
     if ($patientList === null) {
         $patientList = array();
     }
     $this->_session->patientList = $patientList;
     foreach ($patientList as $key => $value) {
         $addressId = isset($value['addressId']) ? (int) $value['addressId'] : 0;
         $address = $this->getAddress($addressId);
         $numberId = isset($value['numberId']) ? (int) $value['numberId'] : 0;
         $phone = $this->getPhone($numberId);
         $row = array();
         $row['id'] = $key;
         $row['data'][] = $value['MRN'];
         $row['data'][] = $value['lastName'];
         $row['data'][] = $value['firstName'];
         $row['data'][] = $value['middleName'];
         $row['data'][] = $address;
         $row['data'][] = $phone;
         $row['data'][] = isset($value['problems']) ? implode('<br />', $value['problems']) : '';
         $row['data'][] = isset($value['medications']) ? implode('<br />', $value['medications']) : '';
         $row['data'][] = isset($value['demographics']) ? implode('<br />', $value['demographics']) : '';
         $row['data'][] = isset($value['labTestResults']) ? implode('<br />', $value['labTestResults']) : '';
         $row['data'][] = isset($value['allergies']) ? implode('<br />', $value['allergies']) : '';
         $row['data'][] = isset($value['hsa']) ? implode('<br />', $value['hsa']) : '';
         $rows[] = $row;
     }
     $json = Zend_Controller_Action_HelperBroker::getStaticHelper('json');
     $json->suppressExit = true;
     $json->direct(array('rows' => $rows));
 }
开发者ID:dragonlet,项目名称:clearhealth,代码行数:82,代码来源:PatientRemindersController.php


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