示例#1
0
 public function getUncompletedItemsCount($patient = NULL)
 {
     $u = freemed::user_cache();
     $q = "select count(*) as count from " . $this->table_name . " mfc where mfc.status_completed=0 and mfc.user = "******" and mfc.patient=" . $GLOBALS['sql']->quote($patient) : " ");
     $return = $GLOBALS['sql']->queryRow($q);
     return $return['count'];
 }
示例#2
0
 protected function mod_pre(&$data)
 {
     $data['user'] = freemed::user_cache()->user_number;
     if ($data['dateof']) {
         $s = CreateObject('org.freemedsoftware.api.Scheduler');
         $data['dateof'] = $s->ImportDate($data['dateof']);
     }
 }
示例#3
0
 public function NewAnnotation($id, $text)
 {
     $this_user = freemed::user_cache();
     $emr_query = "SELECT a.patient AS patient, m.module_table AS module_table, m.module_class AS module_class, a.oid AS oid FROM patient_emr a LEFT OUTER JOIN modules m ON m.module_table = a.module WHERE id=" . ($id + 0);
     $emr = $GLOBALS['sql']->queryRow($emr_query);
     $q = $GLOBALS['sql']->insert_query($this->table_name, array('amodule' => strtolower($emr['module_class']), 'aid' => $emr['oid'], 'atimestamp' => SQL__NOW, 'apatient' => $emr['patient'], 'atable' => $emr['module_table'], 'auser' => $this_user->user_number, 'annotation' => $text));
     $res = $GLOBALS['sql']->query($q);
     return true;
 }
示例#4
0
 protected function mod_pre(&$data)
 {
     $s = CreateObject('org.freemedsoftware.api.Scheduler');
     $data['covstatus'] = "1";
     $data['covdtmod'] = date('Y-m-d');
     $data['covdteff'] = $s->ImportDate($data['covdteff']);
     $data['covrelinfodt'] = $s->ImportDate($data['covrelinfodt']);
     $data['covdob'] = $s->ImportDate($data['covdob']);
     $data['user'] = freemed::user_cache()->user_number;
 }
示例#5
0
function smarty_block_acl($params, $text, &$smarty)
{
    if (!isset($params['category'])) {
        $smarty->trigger_error("Category not specified");
    }
    if (!isset($params['permission'])) {
        $smarty->trigger_error("Permission not specified");
    }
    $perm = freemed::user_cache()->CachedACL($params['category'], $params['permission']);
    if ($perm) {
        return $text;
    }
}
示例#6
0
 protected function mod_pre(&$data)
 {
     $data['user'] = freemed::user_cache()->user_number;
     $s = CreateObject('org.freemedsoftware.api.Scheduler');
     if ($data['dateof']) {
         $data['dateof'] = $s->ImportDate($data['dateof']);
     }
     if ($data['delinquentdate']) {
         $data['delinquentdate'] = $s->ImportDate($data['delinquentdate']);
     }
     if ($data['immunizationgivendate']) {
         $data['immunizationgivendate'] = $s->ImportDate($data['immunizationgivendate']);
     }
 }
示例#7
0
 protected function add_pre(&$data)
 {
     $s = CreateObject('org.freemedsoftware.api.Scheduler');
     $data['noriginal'] = date('Y-m-d');
     $data['nuser'] = freemed::user_cache()->user_number;
     if (empty($data['ntarget']) and $data['noffset'] > 0) {
         $data['ntarget'] = $s->date_add($s->ImportDate(date('Y-m-d')), $data['noffset'] + 0);
     } else {
         $data['ntarget'] = $s->ImportDate($data['ntarget']);
     }
     if (!$data['nfor']) {
         $data['nfor'] = $data['nuser'];
     }
 }
示例#8
0
 protected function mod_pre(&$data)
 {
     $s = CreateObject('org.freemedsoftware.api.Scheduler');
     if (is_array($data['provider']) or is_object($data['provider'])) {
         $data['provider'] = join(',', $data['provider']);
     }
     $data['user'] = freemed::user_cache()->user_number;
     $data['datebegin'] = $data['datebegin'] ? $s->ImportDate($data['datebegin']) : '';
     if (!$data['datebegin']) {
         unset($data['datebegin']);
     }
     $data['dateend'] = $data['dateend'] ? $s->ImportDate($data['dateend']) : '';
     if (!$data['dateend']) {
         unset($data['dateend']);
     }
 }
示例#9
0
 public function acl_patient_add($pid, $current_user = true)
 {
     global $this_user;
     // Create ACL manipulation class (cached, of course)
     $acl = $this->acl_object();
     // Create an AXO object
     $axo = $acl->add_object('patient', 'Patient ' . $pid, 'patient_' . $pid, $pid, 0, 'AXO');
     //print "made new object with axo = ".$axo."<br/>\n";
     // If this fails, we die out here
     if (!$axo) {
         trigger_error(__("Failed to create patient AXO ACL control object."), E_ERROR);
     }
     // Create user object if it doesn't exist yet
     $this_user = freemed::user_cache();
     $_pat = $GLOBALS['sql']->get_link('patient', $pid);
     // Get ptpcp, ptphy{1,2,3,4}, ptdoc and add their respective
     // user numbers to the ACL.
     $to_add = array($this->get_user_from_phy($_pat['ptpcp']), $this->get_user_from_phy($_pat['ptdoc']), $this->get_user_from_phy($_pat['ptphy1']), $this->get_user_from_phy($_pat['ptphy2']), $this->get_user_from_phy($_pat['ptphy3']), $this->get_user_from_phy($_pat['ptphy4']));
     if ($current_user) {
         $to_add[] = $this_user->user_number;
     }
     // Make sure there are no zeros
     foreach ($to_add as $v) {
         if ($v) {
             $u[$v] = $v;
         }
     }
     foreach ($u as $v) {
         $users[] = 'user_' . $v;
     }
     // This is a *nasty* hack, but otherwise we loop forever.
     //include_once(dirname(__FILE__).'/patient_acl.emr.module.php');
     // Add the current user to have access
     //print "access for"; print_r($users); print "<br/>\n";
     module_function('patientacl', 'add_acl', array($pid, array('add', 'view', 'modify', 'delete'), $users, $this->acl_object()));
     // Send back the appropriate ACL id (AXO)
     return $axo;
 }
示例#10
0
 protected function GenerateReport_Jasper($param, $format, $query, $params = NULL, $send_to_printer = null)
 {
     //return $params;
     freemed::acl_enforce('reporting', 'write');
     //Checking for default printer if send_to_print is true
     if ($send_to_printer) {
         $defaultPrinter = freemed::user_cache()->getManageConfig('defaultPrinter');
         if (!$defaultPrinter) {
             return "DPNS";
         }
         //Default printer not set
         $printing = CreateObject('org.freemedsoftware.api.Printing');
         $printerAvailable = $printing->PrinterAvailable($defaultPrinter);
         if (!$printerAvailable) {
             return "PNA";
         }
         //Printer not available
     }
     switch ($format) {
         case 'html':
             $outformat = 'HTML';
             $ext = 'html';
             break;
         case 'xml':
             $outformat = 'XML';
             $ext = 'xml';
             break;
         case 'pdf':
             $outformat = 'PDF';
             $ext = 'pdf';
             break;
         case 'xls':
             $outformat = 'XLS';
             $ext = 'xls';
             break;
         default:
             $outformat = 'PDF';
             $ext = 'pdf';
             break;
     }
     // end switch format
     // Create connection string
     $jdbc_url = "jdbc:mysql://" . DB_HOST . ":3306/" . DB_NAME;
     // Prepare parameters
     $parameters = "";
     if ($params != NULL && count($params) > 0) {
         foreach ($params as $k => $p) {
             $parameters .= " --param=" . $p;
             switch ($param['params'][$k]['type']) {
                 case 'Date':
                     $parameters .= " --paramformat=date";
                     break;
                 case 'Facility':
                 case 'User':
                 case 'BottleID':
                 case 'TestStatus':
                 case 'MessageID':
                 case 'EMRModule':
                 case 'SupportModule':
                     $parameters .= " --paramformat=int";
                     break;
                 case 'Integer':
                 case 'int':
                     $parameters .= " --paramformat=int";
                     break;
                 default:
                     $parameters .= " --paramformat=string";
                     break;
             }
         }
     }
     $reportprefix = $param['report_formatting'] . "." . mktime();
     // Wrap and generate
     $cmd = "java -jar " . PHYSICAL_LOCATION . "/scripts/jasper/JasperWrapper.jar --dburl=" . escapeshellarg($jdbc_url) . " --dbuser="******" --dbpass="******" --ipath=" . escapeshellarg(PHYSICAL_LOCATION . '/data/report/') . " --opath=" . escapeshellarg(PHYSICAL_LOCATION . '/data/cache/') . " --oprefix=" . escapeshellarg($reportprefix) . " --format=" . escapeshellarg($outformat) . " --report=" . escapeshellarg($param['report_formatting'] . ".jrxml") . " " . $parameters;
     syslog(LOG_INFO, "Jasper cmd = {$cmd}");
     // Execute actual report generation
     `{$cmd} 2>&1 | logger -t JasperWrapper`;
     $output_file = PHYSICAL_LOCATION . "/data/cache/" . $reportprefix . "." . $ext;
     //If send_to_printer then send print command and returns
     if ($send_to_printer) {
         $printer = CreateObject('org.freemedsoftware.core.PrinterWrapper');
         $printer->driver->PrintFile($defaultPrinter, $output_file);
         unlink($output_file);
         return "PRINTED";
     }
     switch ($format) {
         case 'xls':
             Header('Content-type: application/x-ms-excel');
             break;
         case 'html':
             Header('Content-type: text/html');
             break;
         case 'xml':
             Header('Content-type: text/xml');
             break;
         case 'pdf':
         default:
             Header('Content-type: application/pdf');
             break;
     }
     Header("Content-Transfer-Encoding:­binary");
     Header("Content-Disposition: inline; filename=\"" . $param['report_formatting'] . ".{$ext}\"");
     Header("Cache-Control: no-cache, must-revalidate");
     // HTTP/1.1
     Header("Expires: Sat, 26 Jul 1997 05:00:00 GMT");
     // Date in the past
     readfile($output_file);
     @unlink($output_file);
     @unlink($output_file . '_files');
     die;
 }
示例#11
0
文件: API.php 项目: rrsc/freemed
 public static function lock_override()
 {
     $this_user = freemed::user_cache();
     $a = explode(',', freemed::config_value('lock_override'));
     foreach ($a as $u) {
         if ($u == $this_user->user_number) {
             return true;
         }
     }
     return false;
 }
示例#12
0
 public function view($unread_only = false, $patient = NULL)
 {
     $this_user = freemed::user_cache();
     // Perform search
     if ($patient != NULL) {
         $query = "SELECT * FROM messages WHERE " . "LENGTH(msgtag)<1 AND " . "msgpatient='" . addslashes($patient) . "'" . ($unread_only ? " AND msgread='0' AND msgtag=''" : "");
     } else {
         $query = "SELECT * FROM messages WHERE " . "LENGTH(msgtag)<1 AND " . "msgfor='" . addslashes($this_user->user_number) . "'" . ($unread_only ? " AND msgread='0' AND msgtag=''" : "");
     }
     $result = $GLOBALS['sql']->queryAll($query);
     if (count($result)) {
         foreach ($result as $r) {
             $return[] = array("user" => $r['msgfor'], "patient" => $r['msgpatient'], "person" => $r['msgperson'], "subject" => $r['msgsubject'], "text" => $r['msgtext'], "urgency" => $r['msgurgency'], "read" => $r['msgread'], "time" => $r['msgtime'], "id" => $r['id']);
         }
         // end while
         return $return;
     } else {
         return false;
     }
 }
示例#13
0
 protected function mod_pre(&$data)
 {
     $data['pnotesuser'] = freemed::user_cache()->user_number;
 }
示例#14
0
 public function GetAllRecords()
 {
     $user = freemed::user_cache()->user_number;
     $q = "SELECT * from " . $this->table_name . " WHERE user =" . $GLOBALS['sql']->quote($user);
     return $GLOBALS['sql']->queryAll($q);
 }
示例#15
0
 public function GetUserLeftNavigationMenu()
 {
     $user = freemed::user_cache();
     $user_level = $user->local_record['userlevel'];
     $userLeftNavigationMenu = $user->getManageConfig('LeftNavigationMenu');
     ////////System menu/////////
     $this->checkSystemMenu($userLeftNavigationMenu);
     ////////////////////////////
     ////////Patient menu/////////
     $this->checkPatientMenu($userLeftNavigationMenu);
     ////////////////////////////////
     ////////Documents menu/////////
     $this->checkDocumentsMenu($userLeftNavigationMenu);
     ////////////////////////////////
     ////////Billing menu/////////
     $this->checkBillingMenu($userLeftNavigationMenu);
     ////////////////////////////////
     ////////Reporting menu/////////
     $this->checkReportingMenu($userLeftNavigationMenu);
     ////////////////////////////////
     ////////Utilities menu/////////
     $this->checkUtilitiesMenu($userLeftNavigationMenu);
     ////////////////////////////////
     $user->setManageConfig('LeftNavigationMenu', $userLeftNavigationMenu);
     return $userLeftNavigationMenu;
     //$userLeftNavigationMenu;
 }
示例#16
0
 public function PrintToFax($faxnumber, $items)
 {
     foreach ($items as $i) {
         $k[] = (int) $i;
     }
     $q = "SELECT * FROM patient_emr WHERE id IN ( " . join(',', $k) . " )";
     $r = $GLOBALS['sql']->queryAll($q);
     // Handle differently depending on single or multiple
     if (count($items) < 2) {
         // Single render
         $render = module_function($r[0]['module'], 'RenderToPDF', array($r[0]['oid']));
     } else {
         // Multiples, use composite object
         $c = CreateObject('org.freemedsoftware.core.MultiplePDF');
         foreach ($r as $o) {
             $thisFile = module_function($o['module'], 'RenderToPDF', array($o['oid']));
             $comp->Add($thisFile);
             $f[] = $thisFile;
         }
         $render = $comp->Composite();
     }
     $wrapper = CreateObject('org.freemedsoftware.core.Fax', $render, array('sender' => freemed::user_cache()->user_descrip, 'comments' => __("HIPPA Compliance Notice: This transmission contains confidential medical information which is protected by the patient/physician privilege. The enclosed message is being communicated to the intended recipient for the purposes of facilitating healthcare. If you have received this transmission in error, please notify the sender immediately, return the fax message and delete the message from your system.")));
     $wrapper->Send($faxnumber);
     @unlink($render);
     if (is_array($f)) {
         foreach ($f as $fn) {
             @unlink($fn);
         }
     }
     return true;
 }
示例#17
0
 protected function mod_pre(&$data)
 {
     list($data['imagetype'], $data['imagecat']) = explode('/', $data['imagetypecat']);
     $data['user'] = freemed::user_cache()->user_number;
 }
示例#18
0
 public function getActionItemsQuery($isCountQuery = NULL, $patient = NULL)
 {
     $today = date('Y-m-d H:i:s');
     $reminderDays = 5;
     $user = $GLOBALS['sql']->quote(freemed::user_cache()->user_number);
     $selection_q = "auth.id,p.id as patient_id,CONCAT( p.ptlname, ', ', p.ptfname, ' ', p.ptmname ) AS patient_name" . ",'" . $this->MODULE_NAME . "' as status_name,'" . get_class($this) . "' as status_module" . ",case when '2010-07-08 12:33:24' >=(auth.authdtend - INTERVAL 5 DAY) then 'Will Expire' " . "when (auth.authvisitsused/auth.authvisits*100)>95  then 'Used Visits 95%' end as summary" . ",'form_expire' as type" . ",auth.authdtend as stamp ";
     $selection_q_count = " count(*) as count ";
     $query = "select " . ($isCountQuery ? $selection_q_count : $selection_q) . " from " . $this->table_name . " auth " . "left join patient p on p.id=auth.authpatient " . "where " . "('" . $today . "' >=(auth.authdtend - INTERVAL 5 DAY) || (auth.authvisitsused/auth.authvisits*100)>95 " . " and auth.active='active' and auth.user="******") " . ($patient ? " and auth.authpatient=" . $GLOBALS['sql']->quote($patient) : " order by auth.authpatient ");
     return $query;
 }
示例#19
0
 public function GetCount()
 {
     $user = freemed::user_cache();
     if (!$GLOBALS['this_user']->isPhysician()) {
         return 0;
     }
     $q = "SELECT COUNT(*) AS unread FROM " . $this->table_name . " WHERE urfphysician=" . $GLOBALS['sql']->quote($user->getPhysician());
     $r = $GLOBALS['sql']->queryOne($q);
     return $r;
 }
示例#20
0
 protected function add_pre(&$data)
 {
     $user = freemed::user_cache();
     $data['loguser'] = $user->user_number;
 }
示例#21
0
 protected function mod_pre(&$data)
 {
     unset($data['stamp']);
     $data['user'] = freemed::user_cache()->user_number;
 }
示例#22
0
 public function CreateTag($patient, $tag)
 {
     if ($patient and $tag) {
         $user = freemed::user_cache();
         $query = $GLOBALS['sql']->insert_query($this->table_name, array('user' => $user->user_number, 'patient' => $patient, 'tag' => $tag));
         $GLOBALS['sql']->query($query);
     }
     return true;
 }
示例#23
0
 public function GetSystemTaskUserInbox($box = NULL)
 {
     $q = "SELECT DATE_FORMAT(s.stamp, '%m/%d/%Y') AS stamp_mdy, s.stamp AS stamp, s.patient AS patient, s.box AS box, s.module AS module, m.module_name AS module_name, CONCAT( p.ptlname, ', ', p.ptfname, ' ', p.ptmname, ' (', p.ptid, ')' ) AS patient_name, s.oid AS oid, s.summary AS summary, s.id AS id FROM systemtaskinbox s LEFT OUTER JOIN modules m ON s.module = m.module_class LEFT OUTER JOIN patient p ON s.patient = p.id WHERE s.user = "******" AND s.box = " . $GLOBALS['sql']->quote($box) : '');
     return $GLOBALS['sql']->queryAll($q);
 }
示例#24
0
 public function SetAppointment($data = NULL)
 {
     freemed::acl_enforce('scheduling', 'write');
     // Check for bogus data
     if ($data == NULL) {
         return false;
     }
     $ourdata = (array) $data;
     // Set defaults
     $fields = array('caltype' => 'pat', 'calstatus' => 'scheduled');
     // Only pass fields that are set as overrides
     foreach ($this->calendar_field_mapping as $k => $v) {
         if (isset($ourdata[$k])) {
             $fields[$v] = $ourdata[$k];
         }
     }
     // Set add and modify
     $fields['caldateof'] = $this->ImportDate($fields['caldateof']);
     $this_user = freemed::user_cache();
     $fields['user'] = $this_user->user_number;
     $query = $GLOBALS['sql']->insert_query('scheduler', $fields);
     $result = $GLOBALS['sql']->query($query);
     if (!$result) {
         return false;
     } else {
         return $GLOBALS['sql']->lastInsertId('scheduler', 'id');
     }
 }
示例#25
0
 public function ProcessSuperbills($superbills = 0)
 {
     if ($superbills == 0) {
         $query = "SELECT * FROM " . $this->table_name . " WHERE processed = 0 AND reviewed > 0";
     } else {
         // Use enumerated superbill ids
         $query = "SELECT * FROM " . $this->table_name . " WHERE FIND_IN_SET( id, " . $GLOBALS['sql']->quote(join(',', $superbills)) . " )";
     }
     $s = $GLOBALS['sql']->queryAll($query);
     foreach ($s as $bill) {
         $dxs = explode(',', $bill['dx']);
         $pxs = explode(',', $bill['procs']);
         $detail = unserialize($bill['detail']);
         foreach ($pxs as $px) {
             // Get current coverages
             // Calculate charges
             // Create database insert
             $ins = $GLOBALS['sql']->insert_query('procrec', array('procpatient' => $bill['patient'], 'proccpt' => $px, 'procdiag1' => $dx[0], 'procdiag2' => $dx[1], 'procdiag3' => $dx[2], 'procdiag4' => $dx[3], 'procbillable' => 1, 'procbilled' => 0, 'procamtpaid' => 0));
             $result = $GLOBALS['sql']->query($ins);
         }
         // end foreach procedure
         // Mark superbill as processed
         $query = $GLOBALS['sql']->update_query($this->table_name, array('processed' => freemed::user_cache()->user_number), array('id' => $id + 0));
     }
     // end foreach superbill
     return true;
 }
示例#26
0
 public function GetTrackHistory($patient, $view = 'EMR')
 {
     $this_user = freemed::user_cache();
     return $GLOBALS['sql']->queryAll("SELECT " . " patient, stamp " . " FROM patient_view_history " . " WHERE " . " user = "******" AND viewed = " . $GLOBALS['sql']->quote($view) . " ORDER BY stamp DESC ; ");
 }
示例#27
0
 protected function mod_pre(&$data)
 {
     $id = $data['id'];
     $rec = $GLOBALS['sql']->get_link($this->table_name, $id);
     $filename = $this->GetLocalCachedFile($id);
     $s = CreateObject('org.freemedsoftware.api.Scheduler');
     $data['date'] = $s->ImportDate($data['date']);
     // Catch multiple people using the same document
     if ($rec['ufffile'] == '') {
         trigger_error(__("Document file does not exist!"));
     }
     if ($data['flip'] == 1) {
         syslog(LOG_INFO, "flip");
         $command = "./scripts/flip_djvu.sh \"{$filename}\"";
         system("{$command}");
         $this->UpdateFileFromCachedFile($id);
     }
     if (!empty($data['faxback'])) {
         syslog(LOG_INFO, "faxback");
         $this->faxback($data['id'], $data['faxback']);
     }
     if ($data['notify'] + 0 > 0) {
         syslog(LOG_INFO, "notify");
         $msg = CreateObject('org.freemedsoftware.api.Messages');
         $msg->send(array('patient' => $data['patient'], 'user' => $data['notify'], 'urgency' => 4, 'text' => __("Document received for patient") . " (" . $data['note'] . ")"));
     }
     // If we're removing the first page, do that now
     if ($data['withoutfirstpage']) {
         syslog(LOG_INFO, "remove 1st page");
         $command = "/usr/bin/djvm -d " . escapeshellarg($filename) . " 1";
         system("{$command}");
         $this->UpdateFileFromCachedFile($id);
     }
     // Figure category / type
     $cat = $GLOBALS['sql']->get_link('documents_tc', $data['category']);
     if ($data['filedirectly']) {
         syslog(LOG_INFO, "directly");
         // Insert new table query in unread
         $query = $GLOBALS['sql']->query($GLOBALS['sql']->insert_query('images', array("imagedt" => $data['date'], "imagepat" => $data['patient'], "imagetype" => $data['category'], "imagedesc" => $data['note'], "imagephy" => $data['physician'], "imagetext" => $data['text'], "imagereviewed" => 0, "user" => freemed::user_cache()->user_number)));
         $new_id = $GLOBALS['sql']->lastInsertID('images', 'id');
         $new_filename = freemed::image_filename(freemed::secure_filename($data['patient']), $new_id, 'djvu', true);
         $query = $GLOBALS['sql']->update_query('images', array('imagefile' => $new_filename), array('id' => $new_id));
         // Move actual file to new location
         $pds = CreateObject('org.freemedsoftware.core.PatientDataStore');
         $pds->StoreFile($data['urfpatient'], "scanneddocuments", $new_id, file_get_contents($this->GetLocalCachedFile($id)));
     } else {
         // Insert new table query in unread
         $result = $GLOBALS['sql']->query($GLOBALS['sql']->insert_query('unreaddocuments', array("urfdate" => $data['date'], "urffilename" => $filename, "urffile" => file_get_contents($filename), "urfpatient" => $data['patient'], "urfphysician" => $data['physician'], "urftype" => $data['category'], "urfnote" => $data['note'], "user" => freemed::user_cache()->user_number)));
     }
     // Remove old entry
     $GLOBALS['sql']->query("DELETE FROM `" . $this->table_name . "` WHERE id='" . addslashes($data['id']) . "'");
     //$new_id = $GLOBALS['sql']->lastInsertID( $this->table_name, 'id' );
     $this->save_variables = $this->variables;
     unset($this->variables);
 }
示例#28
0
 protected function mod_pre(&$data)
 {
     $data['rxdtmod'] = date('Y-m-d');
     $data['user'] = freemed::user_cache()->user_number;
 }
示例#29
0
 public function SetStatus($patient, $date, $module, $status)
 {
     $s = CreateObject('org.freemedsoftware.api.Scheduler');
     $dt = $s->ImportDate($date);
     $q = "CALL patientWorkflowUpdateStatus ( " . $GLOBALS['sql']->quote($patient + 0) . ", " . $GLOBALS['sql']->quote($dt) . ", " . $GLOBALS['sql']->quote($module) . ", " . $GLOBALS['sql']->quote($status) . ", " . $GLOBALS['sql']->quote(freemed::user_cache()->user_number) . " );";
     $result = $GLOBALS['sql']->query($q);
     return (bool) $result;
 }
示例#30
0
 public function migrateToPatient($crid, $pid)
 {
     $query = "CALL clinicregistration_MigrateToPatient ( " . $GLOBALS['sql']->quote(freemed::user_cache()->user_number) . ", " . $GLOBALS['sql']->quote($crid) . ", " . $GLOBALS['sql']->quote($pid) . " );";
     $GLOBALS['sql']->queryOneStoredProc($query);
     return true;
 }