本文整理汇总了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);
}
示例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);
}
示例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);
}
示例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;
}
示例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);
}