本文整理汇总了PHP中PhoneNumber::populateWithPersonId方法的典型用法代码示例。如果您正苦于以下问题:PHP PhoneNumber::populateWithPersonId方法的具体用法?PHP PhoneNumber::populateWithPersonId怎么用?PHP PhoneNumber::populateWithPersonId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PhoneNumber
的用法示例。
在下文中一共展示了PhoneNumber::populateWithPersonId方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: handlerSSSourceData
public static function handlerSSSourceData(Audit $audit)
{
$data = array();
if ($audit->objectClass != 'ESignature') {
return $data;
}
$eSignature = new ESignature();
$eSignature->eSignatureId = $audit->objectId;
$eSignature->populate();
if ($eSignature->objectClass != 'Medication') {
return $data;
}
$data['_audit'] = $audit;
$medication = new Medication();
$medication->medicationId = (int) $eSignature->objectId;
$medication->populate();
$data['PrescriberOrderNumber'] = $medication->medicationId;
$medData = array();
$medData['DrugDescription'] = $medication->description;
$medData['Strength'] = $medication->strength;
$medData['StrengthUnits'] = $medication->unit;
$medData['Quantity'] = $medication->quantity;
$medData['Directions'] = $medication->directions;
$medData['Refills'] = $medication->refills;
$medData['Substitutions'] = $medication->substitution;
$medData['WrittenDate'] = date('Ymd', strtotime($medication->datePrescribed));
$data['medication'] = $medData;
$pharmacy = new Pharmacy();
$pharmacy->pharmacyId = $medication->pharmacyId;
$pharmacy->populate();
$pharmacyData = array();
$pharmacyData['NCPDPID'] = $pharmacy->NCPDPID;
$pharmacyData['StoreName'] = $pharmacy->StoreName;
$pharmacyData['AddressLine1'] = $pharmacy->AddressLine1 . ' ' . $pharmacy->AddressLine2;
$pharmacyData['City'] = $pharmacy->City;
$pharmacyData['State'] = $pharmacy->State;
$pharmacyData['ZipCode'] = $pharmacy->Zip;
$pharmacyData['PhoneNumber'] = $pharmacy->PhonePrimary;
$data['pharmacy'] = $pharmacyData;
$provider = new Provider();
$provider->personId = $medication->prescriberPersonId;
$provider->populate();
$prescriberData = array();
$prescriberData['DEANumber'] = $provider->deaNumber;
$prescriberData['SPI'] = $provider->sureScriptsSPI;
$prescriberData['ClinicName'] = '';
$prescriberData['LastName'] = $provider->person->lastName;
$prescriberData['FirstName'] = $provider->person->firstName;
$prescriberData['Suffix'] = '';
$address = new Address();
$address->personId = $provider->personId;
$address->populateWithPersonId();
$prescriberData['AddressLine1'] = $address->line1 . ' ' . $address->line2;
$prescriberData['City'] = $address->city;
$prescriberData['State'] = 'AZ';
//$address->state;
$prescriberData['ZipCode'] = $address->postalCode;
$phoneNumber = new PhoneNumber();
$phoneNumber->personId = $provider->personId;
$phoneNumber->populateWithPersonId();
$prescriberData['PhoneNumber'] = $phoneNumber->number;
$data['prescriber'] = $prescriberData;
$patient = new Patient();
$patient->personId = $medication->personId;
$patient->populate();
$patientData = array();
$patientData['LastName'] = $patient->person->lastName;
$patientData['FirstName'] = $patient->person->firstName;
$enumeration = new Enumeration();
$enumeration->enumerationId = $patient->person->gender;
$enumeration->populate();
$gender = $enumeration->key;
$patientData['Gender'] = $gender;
$patientData['DateOfBirth'] = date('Ymd', strtotime($patient->person->dateOfBirth));
$address = new Address();
$address->personId = $patient->personId;
$address->populateWithPersonId();
$patientData['AddressLine1'] = $address->line1 . ' ' . $address->line2;
$patientData['City'] = $address->city;
$patientData['State'] = 'AZ';
//$address->state;
$patientData['ZipCode'] = $address->postalCode;
$phoneNumber = new PhoneNumber();
$phoneNumber->personId = $patient->personId;
$phoneNumber->populateWithPersonId();
$patientData['PhoneNumber'] = $phoneNumber->number;
$data['patient'] = $patientData;
return $data;
$ret = array();
foreach ($data as $type => $row) {
if (is_array($row)) {
foreach ($row as $field => $value) {
$key = $type . '[' . $field . ']';
$ret[$key] = $value;
}
} else {
$ret[$type] = $row;
}
}
return $ret;
//.........这里部分代码省略.........
示例2: getPhoneNumber
public function getPhoneNumber($autoFix = true)
{
if ($this->person_id > 0) {
foreach ($this->getPhoneNumbers($autoFix) as $phoneNumber) {
break;
}
}
if (!isset($phoneNumber)) {
$phoneNumber = new PhoneNumber();
$phoneNumber->personId = $this->person_id;
$phoneNumber->populateWithPersonId();
}
return $phoneNumber;
}
示例3: newRxAction
public function newRxAction()
{
$medicationId = 1077476;
$data = array();
$medication = new Medication();
$medication->medicationId = $medicationId;
$medication->populate();
$data['PrescriberOrderNumber'] = $medication->medicationId;
$medData = array();
$medData['DrugDescription'] = $medication->description;
$medData['Strength'] = $medication->strength;
$medData['StrengthUnits'] = $medication->unit;
$medData['Quantity'] = $medication->quantity;
$medData['Directions'] = $medication->directions;
$medData['Refills'] = $medication->refills;
$medData['Substitutions'] = $medication->substitution;
$medData['WrittenDate'] = date('Ymd', strtotime($medication->datePrescribed));
$data['medication'] = $medData;
$pharmacy = new Pharmacy();
$pharmacy->pharmacyId = $medication->pharmacyId;
$pharmacy->populate();
$pharmacyData = array();
$pharmacyData['NCPDPID'] = $pharmacy->NCPDPID;
$pharmacyData['StoreName'] = $pharmacy->StoreName;
$pharmacyData['AddressLine1'] = $pharmacy->AddressLine1 . ' ' . $pharmacy->AddressLine2;
$pharmacyData['City'] = $pharmacy->City;
$pharmacyData['State'] = $pharmacy->State;
$pharmacyData['ZipCode'] = $pharmacy->Zip;
$pharmacyData['PhoneNumber'] = $pharmacy->PhonePrimary;
$data['pharmacy'] = $pharmacyData;
$provider = new Provider();
$provider->personId = $medication->prescriberPersonId;
$provider->populate();
$prescriberData = array();
$prescriberData['DEANumber'] = $provider->deaNumber;
$prescriberData['SPI'] = $provider->sureScriptsSPI;
$prescriberData['ClinicName'] = '';
$prescriberData['LastName'] = $provider->person->lastName;
$prescriberData['FirstName'] = $provider->person->firstName;
$prescriberData['Suffix'] = '';
$address = new Address();
$address->personId = $provider->personId;
$address->populateWithPersonId();
$prescriberData['AddressLine1'] = $address->line1 . ' ' . $address->line2;
$prescriberData['City'] = $address->city;
$prescriberData['State'] = 'AZ';
//$address->state;
$prescriberData['ZipCode'] = $address->zipCode;
$phoneNumber = new PhoneNumber();
$phoneNumber->personId = $provider->personId;
$phoneNumber->populateWithPersonId();
$prescriberData['PhoneNumber'] = $phoneNumber->number;
$data['prescriber'] = $prescriberData;
$patient = new Patient();
$patient->personId = $medication->personId;
$patient->populate();
$patientData = array();
$patientData['LastName'] = $patient->person->lastName;
$patientData['FirstName'] = $patient->person->firstName;
$patientData['Gender'] = $patient->person->gender;
$patientData['DateOfBirth'] = date('Ymd', strtotime($patient->person->dateOfBirth));
$address = new Address();
$address->personId = $patient->personId;
$address->populateWithPersonId();
$patientData['AddressLine1'] = $address->line1 . ' ' . $address->line2;
$patientData['City'] = $address->city;
$patientData['State'] = 'AZ';
//$address->state;
$patientData['ZipCode'] = $address->zipCode;
$phoneNumber = new PhoneNumber();
$phoneNumber->personId = $patient->personId;
$phoneNumber->populateWithPersonId();
$patientData['PhoneNumber'] = $phoneNumber->number;
$data['patient'] = $patientData;
$postFields = array();
foreach ($data as $type => $row) {
if (is_array($row)) {
foreach ($row as $field => $value) {
$key = $type . '[' . $field . ']';
$postFields[$key] = $value;
}
} else {
$postFields[$type] = $row;
}
}
$ch = curl_init();
$ePrescribeURL = Zend_Registry::get('config')->healthcloud->URL;
$ePrescribeURL .= 'ss-manager.raw/new-rx?apiKey=' . Zend_Registry::get('config')->healthcloud->apiKey;
curl_setopt($ch, CURLOPT_URL, $ePrescribeURL);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postFields);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_USERPWD, 'admin:ch3!');
$output = curl_exec($ch);
trigger_error('OUTPUT: ' . $output, E_USER_NOTICE);
$error = "";
if (!curl_errno($ch)) {
//.........这里部分代码省略.........