本文整理汇总了PHP中Patient::listDemographics方法的典型用法代码示例。如果您正苦于以下问题:PHP Patient::listDemographics方法的具体用法?PHP Patient::listDemographics怎么用?PHP Patient::listDemographics使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Patient
的用法示例。
在下文中一共展示了Patient::listDemographics方法的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));
}
示例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));
}