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


PHP Patient::toArray方法代码示例

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


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

示例1: _createAudit

 protected function _createAudit($providerId, $personId, $visitId, $type)
 {
     $providerId = (int) $providerId;
     $personId = (int) $personId;
     $visitId = (int) $visitId;
     $audit = array();
     $audit['objectClass'] = 'GenericAccessAudit';
     $audit['objectId'] = $personId . ';' . $visitId;
     $audit['type'] = (int) $type;
     $audit['userId'] = $providerId;
     $audit['patientId'] = $personId;
     $values = array();
     $provider = new Provider();
     $provider->personId = $audit['userId'];
     $provider->populate();
     $values['provider'] = $provider->toArray();
     $patient = new Patient();
     $patient->personId = $personId;
     $patient->populate();
     $values['patient'] = $patient->toArray();
     $values['personId'] = $patient->personId;
     $visit = new Visit();
     $visit->visitId = $visitId;
     $visit->populate();
     $values['visit'] = $visit->toArray();
     $values['visitId'] = $visit->visitId;
     $audit['auditValues'] = $values;
     Audit::persistManualAuditArray($audit);
 }
开发者ID:dragonlet,项目名称:clearhealth,代码行数:29,代码来源:CcdController.php

示例2: detailAction

 public function detailAction()
 {
     $personId = (int) $this->_getParam('personId');
     if (!$personId > 0) {
         $this->_helper->autoCompleteDojo($personId);
     }
     $db = Zend_Registry::get('dbAdapter');
     $patient = new Patient();
     $patient->personId = (int) $personId;
     $patient->populate();
     $patient->person->populate();
     $outputArray = $patient->toArray();
     $outputArray['displayGender'] = $patient->displayGender;
     $outputArray['age'] = $patient->age;
     $acj = Zend_Controller_Action_HelperBroker::getStaticHelper('json');
     $acj->suppressExit = true;
     $acj->direct($outputArray);
 }
开发者ID:psoas,项目名称:ch3-dev-preview,代码行数:18,代码来源:PatientSelectController.php

示例3: findByExample

 /**
  * Query by Example.
  *
  * Match by attributes of passed example instance and return matched rows as an array of Patient instances
  *
  * @param PDO $db a PDO Database instance
  * @param Patient $example an example instance defining the conditions. All non-null properties will be considered a constraint, null values will be ignored.
  * @param boolean $and true if conditions should be and'ed, false if they should be or'ed
  * @param array $sort array of DSC instances
  * @return Patient[]
  */
 public static function findByExample(PDO $db, Patient $example, $and = true, $sort = null)
 {
     $exampleValues = $example->toArray();
     $filter = array();
     foreach ($exampleValues as $fieldId => $value) {
         if (null !== $value) {
             $filter[$fieldId] = $value;
         }
     }
     return self::findByFilter($db, $filter, $and, $sort);
 }
开发者ID:robinmoors,项目名称:listel_new,代码行数:22,代码来源:Patient.class.php

示例4: transmitEprescriptionAction

 public function transmitEprescriptionAction()
 {
     $medicationId = (int) $this->_getParam('medicationId');
     $medication = new Medication();
     $medication->medicationId = $medicationId;
     $medication->populate();
     //echo $medication->toString();
     //echo $medicationId;
     $data = $medication->toArray();
     $practice = new Practice();
     $practice->practiceId = MainController::getActivePractice();
     $practice->populate();
     $data['practiceName'] = $practice->name;
     $pharmacy = new Pharmacy();
     $pharmacy->pharmacyId = $medication->pharmacyId;
     $pharmacy->populate();
     $data['pharmacy'] = $pharmacy->toArray();
     $prescriber = new Provider();
     $prescriber->personId = $medication->prescriberPersonId;
     $prescriber->populate();
     $prescriber->person->populate();
     $data['prescriber'] = $prescriber->toArray();
     $data['prescriber']['agentFirstName'] = '';
     $data['prescriber']['agentLastName'] = '';
     $data['prescriber']['agentSuffix'] = '';
     $addressIterator = new AddressIterator();
     $addressIterator->setFilters(array('class' => 'person', 'personId' => $prescriber->personId));
     $data['prescriber']['address'] = $addressIterator->first()->toArray();
     $phoneIterator = new PhoneNumberIterator();
     $phoneIterator->setFilters(array('class' => 'person', 'personId' => $prescriber->personId));
     $data['prescriber']['phone'] = $phoneIterator->first()->toArray();
     $patient = new Patient();
     $patient->personId = $medication->personId;
     $patient->populate();
     $data['patient'] = $patient->toArray();
     $phoneIterator->setFilters(array('class' => 'person', 'personId' => $patient->personId));
     $data['patient']['phone'] = $phoneIterator->first()->toArray();
     //var_dump($data);exit;
     $data = $this->makePostArray($data);
     //var_dump($this->makePostArray($data));exit;
     //var_dump($data);exit;
     $transmitEPrescribeURL = Zend_Registry::get('config')->healthcloud->URL;
     $transmitEPrescribeURL .= "SSRX/NewRx?apiKey=" . Zend_Registry::get('config')->healthcloud->apiKey;
     $cookieFile = tempnam(sys_get_temp_dir(), "ssddcookies_");
     $ch = curl_init();
     curl_setopt($ch, CURLOPT_URL, $transmitEPrescribeURL);
     curl_setopt($ch, CURLOPT_POST, TRUE);
     curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
     curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
     curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
     curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
     curl_setopt($ch, CURLOPT_COOKIEJAR, $cookieFile);
     curl_setopt($ch, CURLOPT_COOKIEFILE, $cookieFile);
     curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
     curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
     curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
     $output = curl_exec($ch);
     echo $output;
     exit;
 }
开发者ID:jakedorst,项目名称:ch3-dev-preview,代码行数:60,代码来源:MedicationsController.php

示例5: getDetailsAction

 public function getDetailsAction()
 {
     $personId = (int) $this->_getParam('personId');
     $data = false;
     if ($personId > 0) {
         $patient = new Patient();
         $patient->personId = $personId;
         $patient->populate();
         $data = $patient->toArray();
         $data['phoneNumber'] = $patient->person->phoneNumber->toArray();
         $data['address'] = $patient->person->address->toArray();
         $phones = array();
         foreach ($patient->person->getPhoneNumbers() as $phone) {
             $phones[] = $phone->number;
         }
         $data['phones'] = implode(',', $phones);
         $data['age'] = $patient->person->age;
     }
     $json = Zend_Controller_Action_HelperBroker::getStaticHelper('json');
     $json->suppressExit = true;
     $json->direct($data);
 }
开发者ID:dragonlet,项目名称:clearhealth,代码行数:22,代码来源:PatientController.php


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