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


PHP UserService::valid方法代码示例

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


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

示例1: insert_authorizenet_details

 public function insert_authorizenet_details($var)
 {
     global $pid;
     $data_credentials = $var[0];
     if (UserService::valid($data_credentials)) {
         $authorizenetid = $var['authorizenetid'];
         $query = "UPDATE patient_access_offsite SET authorize_net_id = ? WHERE pid = ?";
         sqlInsert($query, array($authorizenetid, $pid));
     } else {
         throw new SoapFault("Server", "credentials failed");
     }
 }
开发者ID:jatin-52,项目名称:erm,代码行数:12,代码来源:server_side.php

示例2: insert_audit_master

 public function insert_audit_master($var)
 {
     global $pid;
     $data_credentials = $var[0];
     if (UserService::valid($data_credentials)) {
         $approval_status = $var['approval_status'];
         $type = $var['type'];
         $ip_address = $var['ip_address'];
         $master_query = "INSERT INTO audit_master SET\n\t\t       pid = ?,\n\t\t       approval_status = ?,\n\t\t       ip_address = ?,\n\t\t       type =?";
         $audit_master_id = sqlInsert($master_query, array($pid, $approval_status, $ip_address, $type));
     } else {
         throw new SoapFault("Server", "credentials failed");
     }
 }
开发者ID:kgenaidy,项目名称:openemr,代码行数:14,代码来源:server_audit.php

示例3: updateStatus

 public function updateStatus($data)
 {
     if (UserService::valid($data[0]) == 'existingpatient') {
         require_once "../../library/pnotes.inc";
         foreach ($data[1] as $id) {
             updatePnoteMessageStatus($id, $data[2]);
         }
     } else {
         throw new SoapFault("Server", "credentials failed");
     }
 }
开发者ID:katopenzz,项目名称:openemr,代码行数:11,代码来源:server_mail.php

示例4: transmitCCD

 function transmitCCD($data = array())
 {
     $ccd = $data['ccd'];
     $recipient = $data['recipient'];
     $requested_by = $data['requested_by'];
     $xml_type = $data['xml_type'];
     if (UserService::valid($data[0]) == 'existingpatient') {
         try {
             $_SESSION['authProvider'] = 1;
             global $pid;
             //get patient name in Last_First format (used for CCDA filename) and
             //First Last for the message text.
             $patientData = getPatientPID(array("pid" => $pid));
             if (empty($patientData[0]['lname'])) {
                 $att_filename = "";
                 $patientName2 = "";
             } else {
                 //spaces are the argument delimiter for the phiMail API calls and must be removed
                 $extension = $xml_type == 'CCDA' ? 'xml' : strtolower($xml_type);
                 $att_filename = " " . str_replace(" ", "_", $xml_type . "_" . $patientData[0]['lname'] . "_" . $patientData[0]['fname']) . "." . $extension;
                 $patientName2 = $patientData[0]['fname'] . " " . $patientData[0]['lname'];
             }
             $config_err = xl("Direct messaging is currently unavailable.") . " EC:";
             if ($GLOBALS['phimail_enable'] == false) {
                 return "{$config_err} 1";
             }
             $fp = phimail_connect($err);
             if ($fp === false) {
                 return "{$config_err} {$err}";
             }
             $phimail_username = $GLOBALS['phimail_username'];
             $phimail_password = $GLOBALS['phimail_password'];
             $ret = phimail_write_expect_OK($fp, "AUTH {$phimail_username} {$phimail_password}\n");
             if ($ret !== TRUE) {
                 return "{$config_err} 4";
             }
             $ret = phimail_write_expect_OK($fp, "TO {$recipient}\n");
             if ($ret !== TRUE) {
                 return xl("Delivery is not allowed to the specified Direct Address.");
             }
             $ret = fgets($fp, 1024);
             //ignore extra server data
             if ($requested_by == "patient") {
                 $text_out = xl("Delivery of the attached clinical document was requested by the patient") . ($patientName2 == "" ? "." : ", " . $patientName2 . ".");
             } else {
                 $text_out = xl("A clinical document is attached") . ($patientName2 == "" ? "." : " " . xl("for patient") . " " . $patientName2 . ".");
             }
             $text_len = strlen($text_out);
             phimail_write($fp, "TEXT {$text_len}\n");
             $ret = @fgets($fp, 256);
             if ($ret != "BEGIN\n") {
                 phimail_close($fp);
                 return "{$config_err} 5";
             }
             $ret = phimail_write_expect_OK($fp, $text_out);
             if ($ret !== TRUE) {
                 return "{$config_err} 6";
             }
             if (in_array($xml_type, array('CCR', 'CCDA', 'CDA'))) {
                 $ccd = simplexml_load_string($ccd);
                 $ccd_out = $ccd->saveXml();
                 $ccd_len = strlen($ccd_out);
                 phimail_write($fp, "ADD " . ($xml_type == "CCR" ? $xml_type . ' ' : "CDA ") . $ccd_len . $att_filename . "\n");
                 //phimail_write($fp,"ADD " . (isset($xml_type) ? $xml_type . ' ' : "CDA ") . $ccd_len . $att_filename . "\n");
             } else {
                 if (strtolower($xml_type) == 'html' || strtolower($xml_type) == 'pdf') {
                     $ccd_out = base64_decode($ccd);
                     $message_length = strlen($ccd_out);
                     $add_type = strtolower($xml_type) == 'html' ? 'TEXT' : 'RAW';
                     phimail_write($fp, "ADD " . $add_type . " " . $message_length . "" . $att_filename . "\n");
                 }
             }
             $ret = fgets($fp, 256);
             if ($ret != "BEGIN\n") {
                 phimail_close($fp);
                 return "{$config_err} 7";
             }
             $ret = phimail_write_expect_OK($fp, $ccd_out);
             if ($ret !== TRUE) {
                 return "{$config_err} 8";
             }
             phimail_write($fp, "SEND\n");
             $ret = fgets($fp, 256);
             phimail_close($fp);
             if ($requested_by == "patient") {
                 $reqBy = "portal-user";
                 $sql = "SELECT id FROM users WHERE username='portal-user'";
                 if (($r = sqlStatement($sql)) === FALSE || ($u = sqlFetchArray($r)) === FALSE) {
                     $reqID = 1;
                     //default if we don't have a service user
                 } else {
                     $reqID = $u['id'];
                 }
             } else {
                 $reqBy = $_SESSION['authUser'];
                 $reqID = $_SESSION['authUserID'];
             }
             if (substr($ret, 5) == "ERROR") {
                 //log the failure
                 newEvent("transmit-ccd", $reqBy, $_SESSION['authProvider'], 0, $ret, $pid);
//.........这里部分代码省略.........
开发者ID:mi-squared,项目名称:openemr,代码行数:101,代码来源:server_med_rec.php

示例5: insert_dld

 public function insert_dld($data)
 {
     global $pid;
     if (UserService::valid($data[0]) == 'existingpatient' || UserService::valid($data[0]) == 'newpatient') {
         sqlInsert("INSERT INTO documents_legal_detail (dld_pid,dld_signed,dld_filepath,dld_master_docid,dld_filename,dld_encounter,dld_file_for_pdf_generation) " . " VALUES (?,?,?,?,?,?,?)", array($pid, $data[2], $data[3], $data[4], $data[5], $data[6], $data[7]));
     } else {
         throw new SoapFault("Server", "credentials failed");
     }
 }
开发者ID:kgenaidy,项目名称:openemr,代码行数:9,代码来源:server_side.php

示例6: print_ccr_report

 public function print_ccr_report($data)
 {
     if (UserService::valid($data[0]) == 'existingpatient') {
         $ccraction = $data[1];
         $raw = $data[2];
         require_once "../../ccr/createCCR.php";
         ob_start();
         createCCR($ccraction, $raw);
         $html = ob_get_clean();
         if ($ccraction == 'viewccd') {
             $html = preg_replace('/<!DOCTYPE html PUBLIC "-\\/\\/W3C\\/\\/DTD HTML 4.01\\/\\/EN" "http:\\/\\/www.w3.org\\/TR\\/html4\\/strict.dtd">/', '', $html);
             $pos1 = strpos($html, 'body {');
             $pos2 = strpos($html, '.h1center');
             $tes = substr("{$html}", $pos1, $pos2 - $pos1);
             $html = str_replace($tes, '', $html);
             $html = str_replace('h3>', 'h2>', $html);
             $html = base64_encode($html);
         } else {
             $pos1 = strpos($html, '*{');
             $pos2 = strpos($html, 'h1');
             $tes = substr("{$html}", $pos1, $pos2 - $pos1);
             $html = str_replace($tes, '', $html);
         }
         return $html;
     } else {
         throw new SoapFault("Server", "credentials failed");
     }
 }
开发者ID:mindfeederllc,项目名称:openemr,代码行数:28,代码来源:server_med_rec.php


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