本文整理汇总了PHP中Provider::toArray方法的典型用法代码示例。如果您正苦于以下问题:PHP Provider::toArray方法的具体用法?PHP Provider::toArray怎么用?PHP Provider::toArray使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Provider
的用法示例。
在下文中一共展示了Provider::toArray方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: 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;
}