示例#1
0
 function __construct()
 {
     if (!isset($this->OfficeNotes)) {
         $this->OfficeNotes = MatchaModel::setSenchaModel('App.model.miscellaneous.OfficeNotes');
     }
     return;
 }
示例#2
0
 function __construct()
 {
     if (!isset($this->m)) {
         $this->m = MatchaModel::setSenchaModel('App.model.patient.Medications');
     }
     $this->m->setOrFilterProperties(['id']);
 }
示例#3
0
文件: File.php 项目: igez/gaiaehr
 function __construct()
 {
     if (!isset($this->d)) {
         $this->d = MatchaModel::setSenchaModel('App.model.patient.PatientDocuments');
     }
     $this->encrypt = isset($_SESSION['globals']['enable_document_encryption']) && $_SESSION['globals']['enable_document_encryption'];
 }
示例#4
0
 function __construct()
 {
     if ($this->a == NULL) {
         $this->a = MatchaModel::setSenchaModel('App.model.miscellaneous.Amendment');
     }
     $this->a->setOrFilterProperties(['assigned_to_uid']);
 }
示例#5
0
 function __construct()
 {
     if (!isset($this->v)) {
         $this->v = MatchaModel::setSenchaModel('App.model.patient.Vitals');
     }
     $this->User = new User();
 }
示例#6
0
 function setInstructionModel()
 {
     if (isset($this->i)) {
         return $this->i;
     }
     return $this->i = MatchaModel::setSenchaModel('App.model.administration.MedicationInstruction');
 }
示例#7
0
 function getProviderCredentializationModel()
 {
     if (!isset($this->pc)) {
         $this->pc = MatchaModel::setSenchaModel('App.model.administration.ProviderCredentialization');
     }
     return $this->pc;
 }
示例#8
0
 function __construct()
 {
     $this->acl = new ACL();
     if (!isset($this->u)) {
         $this->u = MatchaModel::setSenchaModel('App.model.administration.User');
     }
 }
示例#9
0
 function __construct()
 {
     $this->fp = MatchaModel::setSenchaModel('App.model.administration.FloorPlans');
     $this->fpz = MatchaModel::setSenchaModel('App.model.administration.FloorPlanZones');
     $this->patient = new Patient();
     $this->pool = new PoolArea();
 }
示例#10
0
 /**
  * @param stdClass $params
  * @return array
  */
 public function updateRolePerm($params)
 {
     if ($this->arp == null) {
         $this->arp = MatchaModel::setSenchaModel('App.model.administration.AclRolePermissions');
     }
     if (is_array($params)) {
         foreach ($params as $param) {
             $this->saveRolePerm('front_office', $param->perm_key, $param->{'role-front_office'});
             $this->saveRolePerm('auditor', $param->perm_key, $param->{'role-auditor'});
             $this->saveRolePerm('clinician', $param->perm_key, $param->{'role-clinician'});
             $this->saveRolePerm('physician', $param->perm_key, $param->{'role-physician'});
             $this->saveRolePerm('administrator', $param->perm_key, $param->{'role-administrator'});
             $this->saveRolePerm('emergencyaccess', $param->perm_key, $param->{'role-emergencyaccess'});
             $this->saveRolePerm('referrer', $param->perm_key, $param->{'role-referrer'});
         }
         return $params;
     }
     $this->saveRolePerm('front_office', $params->perm_key, $params->{'role-front_office'});
     $this->saveRolePerm('auditor', $params->perm_key, $params->{'role-auditor'});
     $this->saveRolePerm('clinician', $params->perm_key, $params->{'role-clinician'});
     $this->saveRolePerm('physician', $params->perm_key, $params->{'role-physician'});
     $this->saveRolePerm('administrator', $params->perm_key, $params->{'role-administrator'});
     $this->saveRolePerm('emergencyaccess', $params->perm_key, $params->{'role-emergencyaccess'});
     $this->saveRolePerm('referrer', $params->perm_key, $params->{'role-referrer'});
     return $params;
 }
示例#11
0
文件: Services.php 项目: igez/gaiaehr
 function __construct()
 {
     $this->conn = Matcha::getConn();
     if (!isset($this->s)) {
         $this->s = MatchaModel::setSenchaModel('App.model.patient.EncounterService');
     }
 }
示例#12
0
文件: Modules.php 项目: igez/gaiaehr
 function __construct()
 {
     $this->modulesDir = ROOT . '/modules/';
     if (!isset($this->m)) {
         $this->m = MatchaModel::setSenchaModel('App.model.administration.Modules');
     }
     $this->setNewModules();
 }
示例#13
0
 function __construct()
 {
     parent::__construct();
     if ($this->voucher == NULL) {
         $this->voucher = MatchaModel::setSenchaModel('App.model.account.Voucher');
     }
     return;
 }
示例#14
0
 function __construct()
 {
     $this->conn = Matcha::getConn();
     $this->db = new MatchaHelper();
     if (!isset($this->LO)) {
         $this->LO = MatchaModel::setSenchaModel('App.model.administration.LabObservations');
     }
     return;
 }
示例#15
0
 /**
  * Set Model App.model.patient.PatientsOrders
  */
 private function setModel()
 {
     if (!isset($this->s)) {
         $this->s = MatchaModel::setSenchaModel('App.model.patient.PatientSocialHistory');
     }
     if (!isset($this->ss)) {
         $this->ss = MatchaModel::setSenchaModel('App.model.patient.SmokeStatus');
     }
 }
示例#16
0
 function __construct()
 {
     if (!isset($this->r)) {
         $this->r = MatchaModel::setSenchaModel('App.model.administration.ReferringProvider');
     }
     if (!isset($this->f)) {
         $this->f = MatchaModel::setSenchaModel('App.model.administration.ReferringProviderFacility');
     }
 }
示例#17
0
 function __construct()
 {
     if (!isset($this->p)) {
         $this->p = MatchaModel::setSenchaModel('App.model.administration.TemplatePanel');
     }
     if (!isset($this->i)) {
         $this->i = MatchaModel::setSenchaModel('App.model.administration.TemplatePanelTemplate');
     }
 }
示例#18
0
 function __construct()
 {
     $this->conn = Matcha::getConn();
     $this->db = new MatchaHelper();
     //	    if($this->LP == null) $this->LO = MatchaModel::setSenchaModel('App.model.administration.LabPanels');
     if ($this->LO == null) {
         $this->LO = MatchaModel::setSenchaModel('App.model.administration.LabObservations');
     }
     return;
 }
示例#19
0
文件: Globals.php 项目: nagyist/tutus
 /**
  * @return array
  */
 public static function getGlobalsArray()
 {
     if (self::$g == null) {
         self::$g = MatchaModel::setSenchaModel('App.model.administration.Globals');
     }
     $gs = array();
     foreach (self::$g->load()->all() as $g) {
         $gs[$g['gl_name']] = $g['gl_value'];
     }
     return $gs;
 }
示例#20
0
 function __construct()
 {
     $this->r = MatchaModel::setSenchaModel('App.model.administration.DecisionSupportRule');
     $this->rc = MatchaModel::setSenchaModel('App.model.administration.DecisionSupportRuleConcept');
     $this->Orders = new Orders();
     $this->Vitals = new Vitals();
     $this->Allergies = new Allergies();
     $this->Medications = new Medications();
     $this->Procedures = new Procedures();
     $this->SocialHistory = new SocialHistory();
     $this->ActiveProblems = new ActiveProblems();
 }
示例#21
0
 function __construct()
 {
     if (!isset($this->ic)) {
         $this->ic = MatchaModel::setSenchaModel('App.model.administration.InsuranceCompany');
     }
     if (!isset($this->in)) {
         $this->in = MatchaModel::setSenchaModel('App.model.administration.InsuranceNumber');
     }
     if (!isset($this->pi)) {
         $this->pi = MatchaModel::setSenchaModel('App.model.patient.Insurance');
     }
 }
示例#22
0
 /**
  * function audit($logModelArray = array(), $methodCall = NULL, $idColumn = 'id', $logTable = 'log', $classCall = NULL)
  * Method to enable the audit log process.
  * This will write a log every time it INSERT, UPDATE, DELETE a record.
  */
 public static function audit($logModelArray = array(), $methodCall = NULL, $idColumn = 'id', $logTable = 'log', $classCall = NULL)
 {
     self::$__audit = true;
     self::$hookTable = $logTable;
     MatchaModel::$tableId = $idColumn;
     if ($classCall == NULL) {
         self::$hookClass = get_called_class();
     } else {
         self::$hookClass = $classCall;
     }
     self::$hookMethod = $methodCall;
     self::defineLogModel($logModelArray);
 }
示例#23
0
 /**
  * function __storeSenchaModel($senchaModelName = NULL, $senchaModelArray = array()):
  * Method to store the already parsed Sencha Model into server side memory using
  * MySQL HEAP(Memory) table
  * @param null $senchaModelName
  * @param array $senchaModelArray
  * @return bool
  */
 public static function __storeSenchaModel($senchaModelName = NULL, $senchaModelArray = array())
 {
     try {
         self::__checkMemoryModel();
         self::__destroySenchaMemoryModel($senchaModelName);
         $sql = "INSERT INTO `_sencha_model` (model, modelData, modelLastChange)\n            VALUES ('{$senchaModelName}', '" . serialize($senchaModelArray) . "',\n            FROM_UNIXTIME(" . MatchaModel::__getFileModifyDate($senchaModelName) . "))";
         self::$__conn->query($sql);
         return true;
     } catch (PDOException $e) {
         MatchaErrorHandler::__errorProcess($e);
         return false;
     }
 }
示例#24
0
 public function start(stdClass $params)
 {
     $server = MatchaModel::setSenchaModel('App.model.administration.HL7Server');
     $data = new stdClass();
     $data->id = $params->id;
     $data->token = $params->token = md5(time());
     $server->save($data);
     $cmd = 'php -f "' . ROOT . '/lib/HL7/HL7Server.php" -- "' . $params->ip . '" ' . $params->port . ' "' . ROOT . '/dataProvider" "HL7Server" "Process" "default" "' . $params->token . '"';
     if (substr(php_uname(), 0, 7) == "Windows") {
         pclose(popen("start /B " . $cmd, "r"));
     } else {
         exec($cmd . " > /dev/null &");
     }
     sleep(2);
     return $this->status($params);
 }
示例#25
0
 /**
  * @brief       MatchaHelper constructor.
  * @details     This method starts the connection with mysql server using
  * $_SESSION values
  *              during the login process.
  *
  * @author      Gino Rivera (Certun) <*****@*****.**>
  * @version     Vega 1.0
  *
  */
 function __construct()
 {
     self::$__freeze = false;
     // Connect to the database
     // This is compatible with the old methods
     if (defined('site_db_type')) {
         self::connect(array('host' => site_db_host, 'port' => site_db_port, 'name' => site_db_database, 'user' => site_db_username, 'pass' => site_db_password, 'app' => ROOT . '/app'));
     }
     self::$__secretKey = site_aes_key;
     MatchaAudit::$__audit = true;
     MatchaAudit::$hookTable = 'audit_transaction_log';
     MatchaAudit::$hookClass = 'MatchaHelper';
     MatchaAudit::$hookMethod = 'storeAudit';
     MatchaModel::setSenchaModel('App.model.administration.TransactionLog');
     MatchaModel::setSenchaModel('App.model.administration.AuditLog');
 }
示例#26
0
文件: ACL.php 项目: nagyist/tutus
 public static function setModels()
 {
     if (self::$U == null) {
         self::$U = MatchaModel::setSenchaModel('App.model.administration.User');
     }
     if (self::$AR == null) {
         self::$AR = MatchaModel::setSenchaModel('App.model.administration.AclRoles');
     }
     if (self::$AP == null) {
         self::$AP = MatchaModel::setSenchaModel('App.model.administration.AclPermissions');
     }
     if (self::$ARP == null) {
         self::$ARP = MatchaModel::setSenchaModel('App.model.administration.AclRolePermissions');
     }
     if (self::$AUP == null) {
         self::$AUP = MatchaModel::setSenchaModel('App.model.administration.AclUserPermissions');
     }
 }
示例#27
0
文件: Medical.php 项目: igez/gaiaehr
 function __construct()
 {
     $this->db = new MatchaHelper();
     if (!isset($this->p)) {
         $this->p = MatchaModel::setSenchaModel('App.model.patient.Patient');
     }
     if (!isset($this->a)) {
         $this->a = MatchaModel::setSenchaModel('App.model.patient.Allergies');
     }
     if (!isset($this->i)) {
         $this->i = MatchaModel::setSenchaModel('App.model.patient.PatientImmunization');
     }
     $this->laboratories = new Laboratories();
     $this->rxnorm = new Rxnorm();
     $this->services = new Services();
     $this->diagnosis = new DiagnosisCodes();
     $this->immunizations = new Immunizations();
     return;
 }
示例#28
0
 /**
  * @return bool
  */
 public function isBlocked()
 {
     include_once ROOT . '/dataProvider/GeoIpLocation.php';
     $ip = $_SERVER['REMOTE_ADDR'];
     if ($ip == '::1' || $ip == '127.0.0.1') {
         return false;
     }
     $geo_data = GeoIpLocation::getGeoLocation($ip);
     if ($geo_data === false) {
         $sql = 'SELECT * FROM `ip_access_rules` WHERE active = 1 AND ip = :ip1  OR ip = :ip2 ORDER BY weight DESC LIMIT 1';
         $where = [];
         $where[':ip1'] = '*';
         $where[':ip2'] = $ip;
     } else {
         $sql = 'SELECT * FROM `ip_access_rules` WHERE active = 1 AND ip = :ip1 OR ip = :ip2 OR country_code = :country_code ORDER BY weight DESC LIMIT 1';
         $where = [];
         $where[':ip1'] = '*';
         $where[':ip2'] = $ip;
         $where[':country_code'] = $geo_data['country_code'];
     }
     $conn = Matcha::getConn();
     $sth = $conn->prepare($sql);
     $sth->execute($where);
     $result = $sth->fetch(PDO::FETCH_ASSOC);
     if ($result !== false) {
         $blocked = $result['rule'] == 'BLK';
     } else {
         // if no rule found blocked the IP if not inside local network
         $blocked = filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE) !== false;
     }
     if ($blocked) {
         $record = new stdClass();
         $record->ip = $ip;
         $record->country_code = $geo_data !== false ? $geo_data['country_code'] : '';
         $record->event = 'Blocked';
         $record->create_date = date('Y-m-d H:i:s');
         $this->l->save($record);
     }
     return $blocked;
 }
示例#29
0
 public function updateMessage(stdClass $params)
 {
     if ($this->Messages == null) {
         $this->Messages = MatchaModel::setSenchaModel('App.model.messages.Messages');
     }
     $this->Messages->save($params);
 }
示例#30
0
 function __construct()
 {
     if (!isset($this->s)) {
         $this->s = MatchaModel::setSenchaModel('App.model.administration.Specialty');
     }
 }