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


PHP Provider::populate方法代码示例

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


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

示例1: getProviderDisplayName

 function getProviderDisplayName()
 {
     $provider = new Provider();
     $provider->person_id = $this->treating_person_id;
     $provider->populate();
     return $provider->person->getDisplayName();
 }
开发者ID:jakedorst,项目名称:ch3-dev-preview,代码行数:7,代码来源:Visit.php

示例2: _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

示例3: __construct

 public function __construct(array $data)
 {
     $this->measureNumber = isset($data['measureNumber']) ? (int) $data['measureNumber'] : 0;
     $this->denominator = isset($data['denominator']) ? (int) $data['denominator'] : 0;
     $this->numerator = isset($data['numerator']) ? (int) $data['numerator'] : 0;
     $this->exclusions = isset($data['exclusions']) ? (int) $data['exclusions'] : 0;
     $this->percentage = isset($data['percentage']) ? sprintf('%.2f', $data['percentage']) : 0;
     if (isset($data['visitDateStart'])) {
         $this->visitDateStart = date('m-d-Y', strtotime($data['visitDateStart']));
     } else {
         $this->visitDateStart = date('01-01-Y');
     }
     if (isset($data['visitDateEnd'])) {
         $this->visitDateEnd = date('m-d-Y', strtotime($data['visitDateEnd']));
     } else {
         $this->visitDateEnd = date('12-31-Y');
     }
     $provider = isset($data['provider']) ? $data['provider'] : '';
     if (!$data['provider'] instanceof Provider) {
         $providerId = (int) $provider;
         $provider = new Provider();
         $provider->personId = $providerId;
         $provider->populate();
     }
     $this->provider = $provider;
     if (isset($data['fileNumber'])) {
         $this->fileNumber = (int) $data['fileNumber'];
     }
     if (isset($data['numberOfFiles'])) {
         $this->numberOfFiles = (int) $data['numberOfFiles'];
     }
 }
开发者ID:dragonlet,项目名称:clearhealth,代码行数:32,代码来源:PQRIRegistryXML.php

示例4: __construct

 public function __construct($tthis, $context, $data)
 {
     $this->tthis = $tthis;
     $this->context = $context;
     $this->data = $data;
     $year = 0;
     if (isset($tthis->_attributes['year'])) {
         $year = (int) $tthis->_attributes['year'];
     }
     if (!$year > 0) {
         $year = date('Y') - 1;
     }
     // default year to previous
     $this->dateStart = date('Y-m-d', strtotime($year . '-01-01'));
     $this->dateEnd = date('Y-m-d', strtotime($year . '-12-31'));
     $this->providerId = (int) Zend_Auth::getInstance()->getIdentity()->personId;
     $providerId = (int) $this->context;
     if ($providerId > 0) {
         $this->providerId = $providerId;
     }
     $info = array();
     $info['dateStart'] = $this->dateStart;
     $info['dateEnd'] = $this->dateEnd;
     $provider = new Provider();
     $provider->personId = $this->providerId;
     $provider->populate();
     $info['provider'] = $provider;
     self::$info = $info;
 }
开发者ID:dragonlet,项目名称:clearhealth,代码行数:29,代码来源:NQF.php

示例5: newAction

 public function newAction()
 {
     $colIndex = $this->_getParam('colIndex');
     $sessionFilters = $this->_calendarSession->filter;
     if (!isset($sessionFilters->columns[$colIndex])) {
         $msg = __('Cannot generate column with that index, there is no filter defined for that column Index: ') . $colIndex;
         throw new Exception($msg);
     }
     $column = $sessionFilters->columns[$colIndex];
     $providerId = (int) $column['providerId'];
     $this->view->providerId = $providerId;
     $headerText = '';
     if ($providerId > 0) {
         $provider = new Provider();
         $provider->setPersonId($providerId);
         $provider->populate();
         $headerText = $provider->displayName;
     }
     $roomId = 0;
     if (isset($column['roomId'])) {
         $roomId = $column['roomId'];
     }
     $this->view->roomId = $roomId;
     if ($roomId > 0) {
         $room = new Room();
         $room->id = $roomId;
         $room->populate();
         $headerText .= ' -> ' . $room->name;
     }
     if (isset($column['dateFilter'])) {
         $headerText .= " ({$column['dateFilter']})";
     }
     $this->view->headerText = $headerText;
     $templates = array('' => '');
     $templates['tpl1'] = 'Provider 1 Template';
     $templates['tpl2'] = 'Provider 2 Template';
     $templates['tpl3'] = 'Provider 3 Template';
     $this->view->templates = $templates;
     // $this->_calendarSession->filter; calendar filter
     $this->render('new');
 }
开发者ID:dragonlet,项目名称:clearhealth,代码行数:41,代码来源:ScheduleController.php

示例6: 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

示例7: _generate4010A1

 protected static function _generate4010A1($claimId, array $claim)
 {
     static $ctr = 0;
     static $visits = array();
     static $practices = array();
     static $insurancePrograms = array();
     static $providers = array();
     static $patients = array();
     $claimId = (int) $claimId;
     $claimLine = new ClaimLine();
     $claimLine->populateByClaimId($claimId);
     $visitId = (int) $claimLine->visitId;
     if (!isset($visits[$visitId])) {
         $visit = new Visit();
         $visit->visitId = $visitId;
         $visit->populate();
         $visits[$visitId] = $visit;
     }
     $visit = $visits[$visitId];
     $patientId = (int) $visit->patientId;
     if (!isset($patients[$patientId])) {
         $patient = new Patient();
         $patient->personId = $patientId;
         $patient->populate();
         $patients[$patientId] = $patient;
     }
     $patient = $patients[$patientId];
     $practiceId = (int) $visit->practiceId;
     if (!isset($practices[$practiceId])) {
         $practice = new Practice();
         $practice->practiceId = $practiceId;
         $practice->populate();
         $practices[$practiceId] = $practice;
     }
     $practice = $practices[$practiceId];
     $insuranceProgramId = (int) $visit->activePayerId;
     if (!isset($insurancePrograms[$insuranceProgramId])) {
         $insurance = new InsuranceProgram();
         $insurance->insuranceProgramId = $insuranceProgramId;
         $insurance->populate();
         $insurancePrograms[$insuranceProgramId] = $insurance;
     }
     $insuranceProgram = $insurancePrograms[$insuranceProgramId];
     $providerId = (int) $visit->treatingPersonId;
     if (!isset($providers[$providerId])) {
         $provider = new Provider();
         $provider->personId = $providerId;
         $provider->populate();
         $providers[$providerId] = $provider;
     }
     $provider = $providers[$providerId];
     $billAs = (int) $provider->billAs;
     if ($billAs > 0) {
         $providerId = $billAs;
         if (!isset($providers[$providerId])) {
             $provider = new Provider();
             $provider->personId = $providerId;
             $provider->populate();
             $providers[$providerId] = $provider;
         }
         $provider = $providers[$providerId];
     }
     $subscribers = array();
     $enumeration = new Enumeration();
     $enumeration->populateByUniqueName(InsuranceProgram::INSURANCE_ENUM_NAME);
     $enumerationClosure = new EnumerationClosure();
     foreach ($enumerationClosure->getAllDescendants($enumeration->enumerationId, 1, true) as $enum) {
         $rowset = $enumerationClosure->getAllDescendants($enum->enumerationId, 1, true);
         if ($enum->key == InsuranceProgram::INSURANCE_SUBSCRIBER_ENUM_KEY) {
             foreach ($rowset as $row) {
                 $subscribers[$row->key] = $row->name;
             }
             break;
         }
     }
     $insuredRelationship = new InsuredRelationship();
     $db = Zend_Registry::get('dbAdapter');
     $sqlSelect = $db->select()->from($insuredRelationship->_table)->where('insurance_program_id = ?', (int) $insuranceProgram->insuranceProgramId)->where('person_id = ?', (int) $patientId)->where('active = 1')->order('program_order')->limit(1);
     if ($row = $db->fetchRow($sqlSelect)) {
         $insuredRelationship->populateWithArray($row);
     }
     $subs = $insuredRelationship->subscriber;
     $subscriberAddr = $subs->address;
     $relationship = null;
     $relationshipCode = $insuredRelationship->subscriberToPatientRelationship;
     if (isset($subscribers[$relationshipCode])) {
         $relationship = $subscribers[$relationshipCode];
     }
     if ($relationship === null) {
         $relationship = 'Self';
         $relationshipCode = 18;
         $subs = new Person();
         $subs->personId = $insuredRelationship->personId;
         $subs->populate();
     }
     $subscriber = array('id' => (int) $subs->personId, 'relationship_code' => $relationshipCode, 'group_number' => $insuredRelationship->groupNumber, 'group_name' => $insuredRelationship->groupName, 'relationship' => $relationship, 'last_name' => $subs->lastName, 'first_name' => $subs->firstName, 'middle_name' => $subs->middleName, 'address' => array('line1' => $subscriberAddr->line1, 'line2' => $subscriberAddr->line2, 'city' => $subscriberAddr->city, 'state' => $subscriberAddr->state, 'zip' => $subscriberAddr->zipCode), 'date_of_birth' => date('Ymd', strtotime($subs->dateOfBirth)), 'gender' => $subs->gender, 'contract_type_code' => '', 'contract_amount' => '', 'contract_percent' => '', 'contract_code' => '', 'contract_discount_percent' => '', 'contract_version' => '');
     $practiceAddr = $practice->primaryAddress;
     $room = new Room();
     $room->roomId = (int) $visit->roomId;
     $room->populate();
//.........这里部分代码省略.........
开发者ID:dragonlet,项目名称:clearhealth,代码行数:101,代码来源:Claim.php

示例8: handlereFaxSourceData

 public static function handlereFaxSourceData(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 = $eSignature->objectId;
     $medication->populate();
     $data['transmissionId'] = (int) $medication->medicationId;
     $data['recipients'] = array();
     $patient = new Patient();
     $patient->personId = $medication->personId;
     $patient->populate();
     $pharmacyId = $patient->defaultPharmacyId;
     $provider = new Provider();
     $provider->personId = $medication->prescriberPersonId;
     $provider->populate();
     // recipients MUST be a pharmacy?
     $pharmacy = new Pharmacy();
     $pharmacy->pharmacyId = $pharmacyId;
     $pharmacy->populate();
     //$data['recipients'][] = array('fax'=>$pharmacy->Fax,'name'=>$pharmacy->StoreName,'company'=>$pharmacy->StoreName);
     // temporarily comment out the above recipient and use the hardcoded recipient
     $data['recipients'][] = array('fax' => '6022976632', 'name' => 'Jay Walker', 'company' => 'ClearHealth Inc.');
     $prescription = new Prescription();
     $prescription->prescriberName = $provider->firstName . ' ' . $provider->lastName . ' ' . $provider->title;
     $prescription->prescriberStateLicenseNumber = $provider->stateLicenseNumber;
     $prescription->prescriberDeaNumber = $provider->deaNumber;
     // Practice Info
     $primaryPracticeId = $provider->primaryPracticeId;
     $practice = new Practice();
     $practice->id = $primaryPracticeId;
     $practice->populate();
     $address = $practice->primaryAddress;
     $prescription->practiceName = $practice->name;
     $prescription->practiceAddress = $address->line1 . ' ' . $address->line2;
     $prescription->practiceCity = $address->city;
     $prescription->practiceState = $address->state;
     $prescription->practicePostalCode = $address->postalCode;
     $attachment = new Attachment();
     $attachment->attachmentReferenceId = $provider->personId;
     $attachment->populateWithAttachmentReferenceId();
     if ($attachment->attachmentId > 0) {
         $db = Zend_Registry::get('dbAdapter');
         $sqlSelect = $db->select()->from('attachmentBlobs')->where('attachmentId = ?', (int) $attachment->attachmentId);
         if ($row = $db->fetchRow($sqlSelect)) {
             $tmpFile = tempnam('/tmp', 'ch30_sig_');
             file_put_contents($tmpFile, $row['data']);
             $signatureFile = $tmpFile;
             $prescription->prescriberSignature = $signatureFile;
         }
     }
     $prescription->patientName = $patient->lastName . ', ' . $patient->firstName;
     $address = $patient->homeAddress;
     $prescription->patientAddress = $address->line1 . ' ' . $address->line2;
     $prescription->patientCity = $address->city;
     $prescription->patientState = $address->state;
     $prescription->patientPostalCode = $address->postalCode;
     $prescription->patientDateOfBirth = date('m/d/Y', strtotime($patient->dateOfBirth));
     $prescription->medicationDatePrescribed = date('m/d/Y', strtotime($medication->datePrescribed));
     $prescription->medicationDescription = $medication->description;
     $prescription->medicationComment = $medication->comment;
     $prescription->medicationQuantity = $medication->quantity;
     $prescription->medicationRefills = $medication->refills;
     $prescription->medicationDirections = $medication->directions;
     $prescription->medicationSubstitution = $medication->substitution;
     $prescription->create();
     $filename = $prescription->imageFile;
     $fileType = pathinfo($filename, PATHINFO_EXTENSION);
     $data['files'] = array();
     $contents = file_get_contents($filename);
     unlink($filename);
     $data['files'][] = array('contents' => base64_encode($contents), 'type' => $fileType);
     return $data;
 }
开发者ID:dragonlet,项目名称:clearhealth,代码行数:83,代码来源:DataIntegration.php

示例9: listPatientVisitTypesAction

 public function listPatientVisitTypesAction()
 {
     $patientId = (int) $this->_getParam('patientId');
     $visitId = (int) $this->_getParam('visitId');
     $rows = array();
     if ($patientId > 0) {
         $patientVisitTypeIterator = new PatientVisitTypeIterator();
         $patientVisitTypeIterator->setFilters(array('patientId' => $patientId, 'visitId' => $visitId));
         foreach ($patientVisitTypeIterator as $visitType) {
             $provider = new Provider();
             $provider->personId = $visitType->providerId;
             $provider->populate();
             $tmp = array();
             $tmp['id'] = $visitType->providerId;
             $tmp['data'][] = $provider->displayName;
             $tmp['data'][] = $visitType->isPrimary ? __('Primary') : '';
             $rows[] = $tmp;
         }
     }
     $data = array();
     $data['rows'] = $rows;
     $json = Zend_Controller_Action_HelperBroker::getStaticHelper('json');
     $json->suppressExit = true;
     $json->direct($data);
 }
开发者ID:dragonlet,项目名称:clearhealth,代码行数:25,代码来源:VisitDetailsController.php

示例10: _syncLocation

 protected function _syncLocation(EPrescriber $ePrescriber)
 {
     $ret = true;
     $dateActiveStart = strtotime($ePrescriber->dateActiveStart);
     $dateActiveEnd = strtotime($ePrescriber->dateActiveEnd);
     $serviceLevel = (int) $ePrescriber->serviceLevel;
     $personId = (int) $ePrescriber->providerId;
     $provider = new Provider();
     $provider->personId = $personId;
     $provider->populate();
     $provider->serviceLevel = $serviceLevel;
     if ($dateActiveStart > 0 && $dateActiveEnd > 0) {
         $provider->dateActiveStart = date('Y-m-d H:i:s', $dateActiveStart);
         $provider->dateActiveEnd = date('Y-m-d H:i:s', $dateActiveEnd);
     }
     $person = new Person();
     $person->personId = $personId;
     $person->populate();
     $practice = new Practice();
     $practice->practiceId = $person->primaryPracticeId;
     $practice->populate();
     $data = array();
     $data['deaNumber'] = $provider->deaNumber;
     $data['stateLicenseNumber'] = $provider->stateLicenseNumber;
     //$data['portalId'] = Zend_Registry::get('config')->sureScripts->portalId;
     //$data['accountId'] = Zend_Registry::get('config')->sureScripts->accountId;
     $data['clinicName'] = '' . $practice->name;
     $data['lastName'] = $person->lastName;
     $data['firstName'] = $person->firstName;
     $address = $ePrescriber->building;
     $data['addressLine1'] = $address->line1;
     $data['addressLine2'] = $address->line2;
     $data['addressCity'] = $address->city;
     $data['addressState'] = $address->state;
     $data['addressZipCode'] = $address->zipCode;
     $data['email'] = $person->email;
     $data['phones'] = array(array('number' => PhoneNumber::autoFixNumber($address->phoneNumber), 'type' => 'TE'), array('number' => PhoneNumber::autoFixNumber($address->fax), 'type' => 'FX'));
     $data['specialtyCode'] = $provider->specialty;
     $specialtyQualifier = '';
     if (strlen($provider->specialty) > 0) {
         $specialtyQualifier = 'AM';
     }
     $data['specialtyQualifier'] = $specialtyQualifier;
     $data['serviceLevel'] = $provider->serviceLevel;
     $now = strtotime('now');
     $days30 = strtotime('+30 days', $now);
     $activeStartTime = gmdate("Y-m-d\\TH:i:s.0", $now) . 'Z';
     $activeEndTime = gmdate("Y-m-d\\TH:i:s.0", $days30) . 'Z';
     $data['activeStartTime'] = $provider->dateActiveStartZ;
     $data['activeEndTime'] = $provider->dateActiveEndZ;
     $dateActiveEnd = strtotime(date('Y-m-d', strtotime($provider->dateActiveEndZ)));
     if ($dateActiveEnd <= strtotime(date('Y-m-d'))) {
         // to disable a prescriber ActiveEndTime must be set to current date and ServiceLevel must be set to zero.
         $data['activeEndTime'] = date('Y-m-d');
         $data['serviceLevel'] = 0;
         $provider->serviceLevel = 0;
     }
     $provider->persist();
     $identifierType = $provider->identifierType;
     if (strlen($identifierType) > 0) {
         $data[$identifierType] = $provider->identifier;
     }
     $messaging = new Messaging();
     //$messaging->messagingId = '';
     $type = 'add';
     $messaging->messageType = 'AddPrescriber';
     if (strlen($ePrescriber->SSID) > 0) {
         $messaging->messageType = 'UpdatePrescriber';
         $data['SPI'] = $ePrescriber->SSID;
         $type = 'update';
     } else {
         if (strlen($provider->sureScriptsSPI) > 0) {
             $messaging->messageType = 'AddPrescriberLocation';
             $data['SPI'] = substr($provider->sureScriptsSPI, 0, -3);
             $type = 'addLocation';
         }
     }
     // backupPortalId must be supplied if type is updateLocation
     $messaging->populate();
     //$messaging->objectId = '';
     //$messaging->objectClass = '';
     $messaging->status = 'Sending';
     $messaging->note = 'Sending prescriber data';
     $messaging->dateStatus = date('Y-m-d H:i:s');
     //$messaging->auditId = '';
     $messaging->persist();
     $query = http_build_query(array('type' => $type, 'data' => $data));
     $ch = curl_init();
     $ePrescribeURL = Zend_Registry::get('config')->healthcloud->URL;
     $ePrescribeURL .= 'ss-manager.raw/edit-prescriber?apiKey=' . Zend_Registry::get('config')->healthcloud->apiKey;
     curl_setopt($ch, CURLOPT_URL, $ePrescribeURL);
     curl_setopt($ch, CURLOPT_POST, true);
     curl_setopt($ch, CURLOPT_POSTFIELDS, $query);
     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);
     $output = curl_exec($ch);
     trigger_error('OUTPUT: ' . $output, E_USER_NOTICE);
     $error = "";
//.........这里部分代码省略.........
开发者ID:dragonlet,项目名称:clearhealth,代码行数:101,代码来源:AdminUsersController.php

示例11: 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)) {
//.........这里部分代码省略.........
开发者ID:dragonlet,项目名称:clearhealth,代码行数:101,代码来源:AdminEprescribeController.php

示例12: _generateColumnHeader

 protected function _generateColumnHeader(array $column)
 {
     $data = array();
     $data['header'] = "{$column['dateFilter']}<br>";
     $title = $column['dateFilter'];
     // temporarily set the header as providerId
     $providerId = $column['providerId'];
     $roomId = 0;
     if (isset($column['roomId'])) {
         $roomId = $column['roomId'];
     }
     if ($providerId > 0) {
         $provider = new Provider();
         $provider->setPersonId($providerId);
         $provider->populate();
         $name = $provider->last_name . ', ' . $provider->first_name;
         // we simply replace the comma with its html equivalent (&#44;) because this may cause not to render the header
         $data['header'] .= str_replace(',', '&#44;', $name);
         $title .= ' -> ' . $name;
     }
     if ($roomId > 0) {
         $room = new Room();
         $room->id = $roomId;
         $room->populate();
         if ($providerId > 0) {
             //$data['header'] .= '<br>';
             $data['header'] .= ' - ';
         }
         $data['header'] .= $room->name;
         $title .= ' -> ' . $room->name;
     }
     $data['header'] = '<label title="' . $title . '">' . $data['header'] . '</label>';
     return $data;
 }
开发者ID:jakedorst,项目名称:ch3-dev-preview,代码行数:34,代码来源:CalendarController.php

示例13: defaultPatientHeaderAction

 public function defaultPatientHeaderAction()
 {
     $personId = (int) $this->_getParam('personId');
     // e76f18cd-d388-4c53-b940-53cb81b80c5e
     $referenceId = $this->_getParam('referenceId');
     $data = $this->_getAttachmentData($referenceId);
     $patient = new Patient();
     $patient->personId = $personId;
     $patient->populate();
     $person = $patient->person;
     $picture = '';
     if ($person->activePhoto > 0) {
         $attachment = new Attachment();
         $attachment->attachmentId = (int) $person->activePhoto;
         $attachment->populate();
         $picture = base64_encode($attachment->rawData);
     }
     $xml = new SimpleXMLElement('<patientHeader/>');
     $xmlPatient = $xml->addChild('patient');
     $this->_addChild($xmlPatient, 'picture', $picture);
     $this->_addChild($xmlPatient, 'lastName', $person->lastName);
     $this->_addChild($xmlPatient, 'firstName', $person->firstName);
     $this->_addChild($xmlPatient, 'dateOfBirth', $person->dateOfBirth);
     $this->_addChild($xmlPatient, 'gender', $person->gender);
     $statistics = PatientStatisticsDefinition::getPatientStatistics($personId);
     $race = '';
     if (isset($statistics['Race'])) {
         $race = $statistics['Race'];
     } else {
         if (isset($statistics['race'])) {
             $race = $statistics['race'];
         }
     }
     $this->_addChild($xmlPatient, 'race', $race);
     $this->_addChild($xmlPatient, 'maritalStatus', $person->displayMaritalStatus);
     $addresses = Address::listAddresses($personId);
     $phoneNumbers = PhoneNumber::listPhoneNumbers($personId);
     $address = null;
     if (isset($addresses[Address::TYPE_BILLING])) {
         $address = $addresses[Address::TYPE_BILLING];
     } else {
         if (isset($addresses[Address::TYPE_HOME])) {
             $address = $addresses[Address::TYPE_HOME];
         } else {
             if (isset($addresses[Address::TYPE_MAIN])) {
                 $address = $addresses[Address::TYPE_MAIN];
             } else {
                 if (isset($addresses[Address::TYPE_SEC])) {
                     $address = $addresses[Address::TYPE_SEC];
                 } else {
                     if (isset($addresses[Address::TYPE_OTHER])) {
                         $address = $addresses[Address::TYPE_OTHER];
                     }
                 }
             }
         }
     }
     if ($address !== null) {
         $phone = '';
         if (isset($phoneNumbers[PhoneNumber::TYPE_BILLING])) {
             $phone = $phoneNumbers[PhoneNumber::TYPE_BILLING]->number;
         } else {
             if (isset($phoneNumbers[PhoneNumber::TYPE_HOME])) {
                 $phone = $phoneNumbers[PhoneNumber::TYPE_HOME]->number;
             } else {
                 if (isset($phoneNumbers[PhoneNumber::TYPE_WORK])) {
                     $phone = $phoneNumbers[PhoneNumber::TYPE_WORK]->number;
                 } else {
                     if (isset($phoneNumbers[PhoneNumber::TYPE_HOME_DAY])) {
                         $phone = $phoneNumbers[PhoneNumber::TYPE_HOME_DAY]->number;
                     } else {
                         if (isset($phoneNumbers[PhoneNumber::TYPE_HOME_EVE])) {
                             $phone = $phoneNumbers[PhoneNumber::TYPE_HOME_EVE]->number;
                         } else {
                             if (isset($phoneNumbers[PhoneNumber::TYPE_MOBILE])) {
                                 $phone = $phoneNumbers[PhoneNumber::TYPE_MOBILE]->number;
                             } else {
                                 if (isset($phoneNumbers[PhoneNumber::TYPE_BEEPER])) {
                                     $phone = $phoneNumbers[PhoneNumber::TYPE_BEEPER]->number;
                                 }
                             }
                         }
                     }
                 }
             }
         }
         $this->_addChild($xmlPatient, 'billingLine1', $address->line1);
         $this->_addChild($xmlPatient, 'billingCity', $address->city);
         $this->_addChild($xmlPatient, 'billingState', $address->state);
         $this->_addChild($xmlPatient, 'billingZip', $address->postalCode);
         $this->_addChild($xmlPatient, 'phoneNumber', $phone);
     }
     if ($person->primaryPracticeId > 0) {
         $practice = new Practice();
         $practice->practiceId = (int) $person->primaryPracticeId;
         $practice->populate();
         $address = $practice->primaryAddress;
         $xmlPractice = $xml->addChild('practice');
         $this->_addChild($xmlPractice, 'name', $practice->name);
         $this->_addChild($xmlPractice, 'primaryLine1', $address->line1);
//.........这里部分代码省略.........
开发者ID:dragonlet,项目名称:clearhealth,代码行数:101,代码来源:ReportsController.php

示例14: indexAction

 public function indexAction()
 {
     $personId = (int) Zend_Auth::getInstance()->getIdentity()->personId;
     $this->view->currentPersonId = $personId;
     $provider = new Provider();
     $provider->person_id = $personId;
     $provider->populate();
     $this->view->provider = $provider;
     $this->render();
 }
开发者ID:jakedorst,项目名称:ch3-dev-preview,代码行数:10,代码来源:ClinicalNotesController.php

示例15: listCharges

 public static function listCharges(array $filters)
 {
     $db = Zend_Registry::get('dbAdapter');
     $sqlSelect = $db->select()->from('claimLines')->join('encounter', 'encounter.encounter_id = claimLines.visitId', array('SUM(claimLines.baseFee) AS totalBaseFee', 'SUM(claimLines.adjustedFee) AS totalAdjustedFee'))->order('claimLines.dateTime DESC')->order('claimLines.claimId DESC')->order('encounter.appointmentId')->group('encounter.encounter_id');
     $sqlSelect = $db->select()->from('encounter')->order('encounter.date_of_treatment DESC');
     $mscSelect = $db->select()->from('misc_charge', array('misc_charge.misc_charge_id AS id', 'misc_charge.amount AS billed', 'CONCAT(\'0\') AS paid', 'CONCAT(\'0\') AS writeOff', 'CONCAT(\'Misc Charge\') AS payer', 'encounter.date_of_treatment AS dateOfTreatment', 'misc_charge.charge_date AS dateBilled', 'CONCAT(patient.last_name,\', \',patient.first_name,\' \',patient.middle_name) AS patientName', 'CONCAT(\'\') AS facility', 'CONCAT(provider.last_name,\', \',provider.first_name,\' \',provider.middle_name) AS providerName'))->join('encounter', 'encounter.encounter_id = misc_charge.encounter_id')->join(array('patient' => 'person'), 'patient.person_id = encounter.patient_id')->join(array('provider' => 'person'), 'provider.person_id = encounter.treating_person_id')->order('misc_charge.charge_date DESC');
     foreach ($filters as $key => $value) {
         switch ($key) {
             case 'dateRange':
                 $sqlSelect->where("encounter.date_of_treatment BETWEEN '{$value['start']} 00:00:00' AND '{$value['end']} 23:59:59'");
                 $mscSelect->where("encounter.date_of_treatment BETWEEN '{$value['start']} 00:00:00' AND '{$value['end']} 23:59:59'");
                 break;
             case 'facilities':
                 // practice, building, room
                 if (!is_array($value)) {
                     $value = array($value);
                 }
                 $facilities = array();
                 foreach ($value as $val) {
                     $facilities[] = 'encounter.practice_id = ' . (int) $val['practice'] . ' AND encounter.building_id = ' . (int) $val['building'] . ' AND encounter.room_id = ' . (int) $val['room'];
                 }
                 $sqlSelect->where(implode(' OR ', $facilities));
                 $mscSelect->where(implode(' OR ', $facilities));
                 break;
             case 'payers':
                 $payers = array();
                 foreach ($value as $payerId) {
                     $payers[] = (int) $payerId;
                 }
                 $payers = implode(',', $payers);
                 $sqlSelect->where('encounter.activePayerId IN (' . $payers . ')');
                 $mscSelect->where('encounter.activePayerId IN (' . $payers . ')');
                 break;
             case 'facility':
                 // practice, building, room
                 $sqlSelect->where('encounter.practice_id = ?', (int) $value['practice']);
                 $sqlSelect->where('encounter.building_id = ?', (int) $value['building']);
                 $sqlSelect->where('encounter.room_id = ?', (int) $value['room']);
                 // practice, building, room
                 $mscSelect->where('encounter.practice_id = ?', (int) $value['practice']);
                 $mscSelect->where('encounter.building_id = ?', (int) $value['building']);
                 $mscSelect->where('encounter.room_id = ?', (int) $value['room']);
                 break;
             case 'insurer':
                 $sqlSelect->where('encounter.activePayerId = ?', (int) $value);
                 $mscSelect->where('encounter.activePayerId = ?', (int) $value);
                 break;
             case 'visitId':
                 $sqlSelect->where('encounter.encounter_id = ?', (int) $value);
                 $mscSelect->where('encounter.encounter_id = ?', (int) $value);
                 break;
             case 'provider':
                 $value = array($value);
             case 'providers':
                 $providers = array();
                 foreach ($value as $providerId) {
                     $providers[] = (int) $providerId;
                 }
                 $providers = implode(',', $providers);
                 $sqlSelect->where('encounter.treating_person_id IN (' . $providers . ')');
                 $mscSelect->where('encounter.treating_person_id IN (' . $providers . ')');
                 break;
             case 'closed':
                 $sqlSelect->where('encounter.closed = ?', (int) $value);
                 $mscSelect->where('encounter.closed = ?', (int) $value);
                 break;
             case 'void':
                 $sqlSelect->where('encounter.void = ?', (int) $value);
                 $mscSelect->where('encounter.void = ?', (int) $value);
                 break;
         }
     }
     $rows = array();
     $visits = array();
     $payers = array();
     $facilities = array();
     $patients = array();
     $providers = array();
     $stmt = $db->query($sqlSelect);
     $stmt->setFetchMode(Zend_Db::FETCH_ASSOC);
     while ($row = $stmt->fetch()) {
         $visit = new Visit();
         $visit->populateWithArray($row);
         $visitId = (int) $visit->visitId;
         $acct = $visit->accountSummary;
         $paid = $acct['payment'];
         $writeoff = $acct['writeoff'];
         $total = $acct['total'];
         $billed = $acct['billed'];
         $balance = $acct['balance'];
         $payerId = isset($acct['claimLine']) ? $acct['claimLine']->insuranceProgramId : $visit->activePayerId;
         if (!isset($payers[$payerId])) {
             $payers[$payerId] = InsuranceProgram::getInsuranceProgram($payerId);
         }
         $patientId = (int) $visit->patientId;
         if (!isset($patients[$patientId])) {
             $patient = new Patient();
             $patient->personId = $patientId;
             $patient->populate();
             $patients[$patientId] = $patient;
//.........这里部分代码省略.........
开发者ID:dragonlet,项目名称:clearhealth,代码行数:101,代码来源:ClaimLine.php


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