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


PHP PhoneNumber::getPhoneNumbers方法代码示例

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


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

示例1: _getPatientData

 protected static function _getPatientData($patient, $includeProvider = true, $providerId = null, $roomId = null)
 {
     $maritalStatusMap = array('SEPARATED' => 'A', 'DIVORCED' => 'D', 'MARRIED' => 'M', 'SINGLE' => 'S', 'WIDOWED' => 'W');
     if (!$patient instanceof Patient) {
         $patientId = (int) $patient;
         $patient = new Patient();
         $patient->personId = $patientId;
         $patient->populate();
     }
     $personId = (int) $patient->personId;
     $person = $patient->person;
     $maritalStatus = $person->maritalStatus;
     if (isset($maritalStatusMap[$maritalStatus])) {
         $maritalStatus = $maritalStatusMap[$maritalStatus];
     }
     $ethnicities = array();
     $ethnicities['1'] = 1;
     $ethnicities['Hispanic/Latino'] = 1;
     $ethnicities['2'] = 2;
     $ethnicities['Not Hispanic/Latino'] = 2;
     $ethnicities['3'] = 3;
     $ethnicities['Unreported / Refused to Report'] = 3;
     $races = array();
     $races['A'] = 'A';
     $races['Asian'] = 'A';
     $races['N'] = 'N';
     $races['Native Hawaiian'] = 'N';
     $races['P'] = 'P';
     $races['Other Pacific Islander'] = 'P';
     $races['B'] = 'B';
     $races['Black / African American'] = 'B';
     $races['I'] = 'I';
     $races['American Indian / Alaska Native'] = 'I';
     $races['W'] = 'C';
     $races['White'] = 'C';
     $races['M'] = 'M';
     $races['More than one race'] = 'M';
     $races['E'] = 'E';
     $races['Unreported / Refused to Report'] = 'E';
     $statistics = PatientStatisticsDefinition::getPatientStatistics($personId);
     $race = '';
     if (isset($statistics['Race'])) {
         $race = $statistics['Race'];
     }
     if (isset($statistics['race'])) {
         $race = $statistics['race'];
     }
     $race = isset($races[$race]) ? $races[$race] : 'E';
     $ethnicity = '';
     if (isset($statistics['Ethnicity'])) {
         $ethnicity = $statistics['Ethnicity'];
     }
     if (isset($statistics['ethnicity'])) {
         $ethnicity = $statistics['ethnicity'];
     }
     $ethnicity = isset($ethnicities[$ethnicity]) ? $ethnicities[$ethnicity] : '3';
     $language = '';
     if (isset($statistics['Language'])) {
         $language = $statistics['Language'];
     }
     if (isset($statistics['language'])) {
         $language = $statistics['language'];
     }
     $language = '';
     // temporarily set to empty
     $patientData = array();
     $patientData['recordNumber'] = $patient->recordNumber;
     $patientData['lastName'] = $person->lastName;
     $patientData['firstName'] = $person->firstName;
     $patientData['middleName'] = $person->middleName;
     $patientData['suffix'] = $person->suffix;
     $patientData['dateOfBirth'] = date('Ymd', strtotime($person->dateOfBirth));
     $patientData['gender'] = $person->gender;
     $patientData['race'] = $race;
     $patientData['ethnicity'] = $ethnicity;
     $address = $person->address;
     $patientData['line1'] = $address->line1;
     $patientData['line2'] = $address->line2;
     $patientData['city'] = $address->city;
     $patientData['state'] = $address->state;
     $patientData['zip'] = $address->postalCode;
     $homePhone = '';
     $businessPhone = '';
     $phoneNumber = new PhoneNumber();
     $phoneNumber->personId = $personId;
     $phones = $phoneNumber->getPhoneNumbers(false);
     foreach ($phones as $phone) {
         if ($homePhone == '' && $phone['type'] == 'HP') {
             $homePhone = $phone['number'];
         }
         if ($businessPhone == '' && $phone['type'] == 'TE') {
             $businessPhone = $phone['number'];
         }
         if ($homePhone != '' && $businessPhone != '') {
             break;
         }
     }
     $patientData['homePhone'] = $homePhone;
     $patientData['businessPhone'] = $businessPhone;
     $patientData['language'] = $language;
//.........这里部分代码省略.........
开发者ID:dragonlet,项目名称:clearhealth,代码行数:101,代码来源:HL7Generator.php

示例2: populateHeader

 public function populateHeader(SimpleXMLElement $xml)
 {
     $patientName = array();
     $patientName['given'] = $this->patient->person->firstName;
     $patientName['family'] = $this->patient->person->lastName;
     $patientName['suffix'] = $this->patient->person->suffix;
     $providerName = array();
     $providerName['prefix'] = $this->user->person->prefix;
     $providerName['given'] = $this->user->person->firstName;
     $providerName['family'] = $this->user->person->lastName;
     $building = $this->building;
     $buildingName = $building->displayName;
     $realmCode = $xml->addChild('realmCode');
     $realmCode->addAttribute('code', 'US');
     $typeId = $xml->addChild('typeId');
     $typeId->addAttribute('root', '2.16.840.1.113883.1.3');
     $typeId->addAttribute('extension', 'POCD_HD000040');
     $templateId = $xml->addChild('templateId');
     $templateId->addAttribute('root', '2.16.840.1.113883.3.27.1776');
     $templateId->addAttribute('assigningAuthorityName', 'CDA/R2');
     $templateId = $xml->addChild('templateId');
     $templateId->addAttribute('root', '2.16.840.1.113883.10.20.3');
     $templateId->addAttribute('assigningAuthorityName', 'HL7/CDT Header');
     $templateId = $xml->addChild('templateId');
     $templateId->addAttribute('root', '1.3.6.1.4.1.19376.1.5.3.1.1.1');
     $templateId->addAttribute('assigningAuthorityName', 'IHE/PCC');
     $templateId = $xml->addChild('templateId');
     $templateId->addAttribute('root', '2.16.840.1.113883.3.88.11.32.1');
     $templateId->addAttribute('assigningAuthorityName', 'HITSP/C32');
     $id = $xml->addChild('id');
     $id->addAttribute('root', '2.16.840.1.113883.3.72');
     $id->addAttribute('extension', 'HITSP_C32v2.5');
     $id->addAttribute('assigningAuthorityName', 'ClearHealth');
     $code = $xml->addChild('code');
     $code->addAttribute('code', '34133-9');
     $displayName = 'Summarization of episode note';
     $code->addAttribute('displayName', $displayName);
     $code->addAttribute('codeSystem', '2.16.840.1.113883.6.1');
     $code->addAttribute('codeSystemName', 'LOINC');
     $xml->addChild('title', html_convert_entities($this->_title));
     $effectiveTime = $xml->addChild('effectiveTime');
     $dateEffective = self::formatDate();
     $effectiveTime->addAttribute('value', $dateEffective);
     $confidentialityCode = $xml->addChild('confidentialityCode');
     $confidentialityCode->addAttribute('code', 'N');
     //$confidentialityCode->addAttribute('codeSystem','2.16.840.1.113883.5.25');
     $languageCode = $xml->addChild('languageCode');
     $languageCode->addAttribute('code', 'en-US');
     // RECORD TARGET
     $recordTarget = $xml->addChild('recordTarget');
     $patientRole = $recordTarget->addChild('patientRole');
     $id = $patientRole->addChild('id');
     //$id->addAttribute('root','CLINICID');
     $id->addAttribute('root', 'MRN');
     //$id->addAttribute('extension','PatientID');
     $id->addAttribute('extension', html_convert_entities($this->patient->recordNumber));
     // Address
     $address = new Address();
     $address->personId = $this->_patientId;
     $addressIterator = $address->getIteratorByPersonId();
     foreach ($addressIterator as $address) {
         break;
         // retrieves the top address
     }
     $addr = $patientRole->addChild('addr');
     if ($address->addressId > 0) {
         $addr->addAttribute('use', 'HP');
         $addr->addChild('streetAddressLine', html_convert_entities(strlen($address->line2) > 0 ? $address->line1 . ' ' . $address->line2 : $address->line1));
         $addr->addChild('city', html_convert_entities($address->city));
         $addr->addChild('state', html_convert_entities($address->state));
         $addr->addChild('postalCode', html_convert_entities($address->zipCode));
     }
     // Telecom
     $phone = null;
     $phoneNumber = new PhoneNumber();
     $phoneNumber->personId = $this->_patientId;
     foreach ($phoneNumber->getPhoneNumbers(false) as $phone) {
         break;
         // retrieves the top phone
     }
     $telecom = $patientRole->addChild('telecom');
     if ($phone && strlen($phone['number']) > 0) {
         $telecom->addAttribute('use', 'HP');
         $telecom->addAttribute('value', 'tel:' . html_convert_entities($phone['number']));
     }
     // Patient
     $patient = $patientRole->addChild('patient');
     $name = $patient->addChild('name');
     $name->addChild('given', html_convert_entities($patientName['given']));
     $name->addChild('family', html_convert_entities($patientName['family']));
     $name->addChild('suffix', html_convert_entities($patientName['suffix']));
     $genderCode = $patient->addChild('administrativeGenderCode');
     $genderCode->addAttribute('code', html_convert_entities($this->patient->person->gender));
     $genderCode->addAttribute('displayName', html_convert_entities($this->patient->person->displayGender));
     $genderCode->addAttribute('codeSystem', '2.16.840.1.113883.5.1');
     $genderCode->addAttribute('codeSystemName', 'HL7 AdministrativeGender');
     $birthTime = $patient->addChild('birthTime');
     $birthTime->addAttribute('value', date('Ymd', strtotime($this->patient->person->dateOfBirth)));
     /*$maritalStatusCode = $patient->addChild('maritalStatusCode');
     		$maritalStatusCode->addAttribute('code','');
//.........这里部分代码省略.........
开发者ID:dragonlet,项目名称:clearhealth,代码行数:101,代码来源:CCD.php

示例3: export2PublicHealth

 protected function export2PublicHealth($ids)
 {
     $data = array();
     $data[] = 'FHS|^~\\&';
     $data[] = 'BHS|^~\\&';
     $ctr = count($ids);
     for ($i = 0; $i < $ctr; $i++) {
         $id = (int) $ids[$i];
         if (!isset($this->_session->patientList[$id])) {
             continue;
         }
         $problemList = isset($this->_session->patientList[$id]['problemList']) ? $this->_session->patientList[$id]['problemList'] : array();
         $patient = new Patient();
         $patient->personId = $id;
         $patient->populate();
         $person = $patient->person;
         $dateTime = date('YmdHi');
         $messageDateTime = date('YmdHiO');
         $data[] = 'MSH|^~\\&|CLEARHEALTH||||' . $dateTime . '||ADT^A04|' . $messageDateTime . '|P|2.3.1';
         $dateOfOnset = isset($problemList[0]['dateOfOnset']) ? $problemList[0]['dateOfOnset'] : date('YmdHis');
         $data[] = 'EVN||' . date('YmdHi', strtotime($dateOfOnset));
         // Address
         $address = new Address();
         $address->personId = $id;
         $addressIterator = $address->getIteratorByPersonId();
         foreach ($addressIterator as $address) {
             break;
             // retrieves the top address
         }
         // Telecom
         $phone = null;
         $phoneNumber = new PhoneNumber();
         $phoneNumber->personId = $id;
         foreach ($phoneNumber->getPhoneNumbers(false) as $phone) {
             break;
             // retrieves the top phone
         }
         $telecom = '';
         if ($phone && strlen($phone['number']) > 0) {
             $telecom = $phone['number'];
         }
         $data[] = 'PID|1||' . $patient->recordNumber . '||' . strtoupper($person->lastName) . '^' . strtoupper($person->firstName) . '^' . strtoupper($person->middleName) . '||' . date('Ymd', strtotime($person->dateOfBirth)) . '|' . $person->gender . '||U|' . $address->line1 . '^' . $address->line2 . '^' . $address->city . '^' . $address->state . '^' . $address->zipCode . '^US||' . $telecom;
         $visit = new Visit();
         $visit->patientId = $id;
         $visit->populateLatestVisit();
         $data[] = 'PV1|1|O||R||||||||||||||||||||||||||||||||||||||||' . date('YmdHis', strtotime($visit->dateOfTreatment));
         foreach ($problemList as $key => $problem) {
             $data[] = 'DG1|' . ($key + 1) . '||' . $problem['code'] . '^' . $problem['code'] . ' ' . $problem['codeTextShort'] . '^I9C|||F|||||||||1';
         }
     }
     $data[] = 'BTS|' . $ctr;
     $data[] = 'FTS|1';
     $filename = 'ph_' . uniqid('') . '.er7';
     return array('filename' => $filename, 'data' => $data);
 }
开发者ID:lucianobenetti,项目名称:clearhealth,代码行数:55,代码来源:PatientListController.php


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