SQL Inventory

List of all SQL mentioned in the code..

ValueCountFile:Line
"select p.id from people as p where p.pass!='' order by p.id"
1
  • /cron/cleanWorkingDirectory.php
"SELECT type='externe' FROM people WHERE id='" $this->_toID "' limit 1"
1
  • /class/msPeople.php
"select p.id, CASE WHEN o.value != '' THEN concat(o2.value , ' ' , o.value) ELSE concat(o2.value , ' ' , bn.value) END as identite
            from people as p
            left join objets_data as o on o.toID=p.id and o.typeID='" 
$name2typeID['lastname'] . "' and o.outdated='' and o.deleted=''
            left join objets_data as bn on bn.toID=p.id and bn.typeID='" 
$name2typeID['birthname'] . "' and bn.outdated='' and bn.deleted=''
            left join objets_data as o2 on o2.toID=p.id and o2.typeID='" 
$name2typeID['firstname'] . "' and o2.outdated='' and o2.deleted=''
            where p.pass!='' and p.id in ('" 
implode("','"$allowedIDs) . "') order by identite"
1
  • /class/msPeople.php
"SELECT toID FROM configuration WHERE level='user' and name='" $service "' and value='true'"
1
  • /class/msPeople.php
"select p.id, CASE WHEN o.value != '' THEN concat(o2.value , ' ' , o.value) ELSE concat(o2.value , ' ' , bn.value) END as identite
            from people as p
            left join objets_data as o on o.toID=p.id and o.typeID='" 
$name2typeID['lastname'] . "' and o.outdated='' and o.deleted=''
            left join objets_data as bn on bn.toID=p.id and bn.typeID='" 
$name2typeID['birthname'] . "' and bn.outdated='' and bn.deleted=''
            left join objets_data as o2 on o2.toID=p.id and o2.typeID='" 
$name2typeID['firstname'] . "' and o2.outdated='' and o2.deleted=''
            where p.pass!='' and p.id not in ('" 
implode("','"$forbiddenIDs) . "') order by identite"
1
  • /class/msPeople.php
"SELECT toID FROM configuration WHERE level='user' and name='" $service "' and value='false'"
1
  • /class/msPeople.php
"select " implode(', '$col) . "
        from data_types as dt
        left join objets_data as od on od.typeID=dt.id and od.toID='" 
$this->_toID "' and od.outdated='' and od.deleted=''
        where dt.groupe='" 
$groupe "'
        order by dt.displayOrder, dt.label"
1
  • /class/msPeople.php
"select t.name, d.value
        from objets_data as d
        left join data_types as t on d.typeID=t.id
              where d.toID='" 
$this->_toID "' and d.outdated='' and d.deleted='' and t.groupe='admin'" $typesSelect " order by t.displayOrder"
1
  • /class/msPeople.php
"select d.typeID, d.value
        from objets_data as d
        left join data_types as t on d.typeID=t.id
              where d.toID='" 
$this->_toID "' and d.outdated='' and d.deleted='' and t.groupe='admin'"
1
  • /class/msPeople.php
"select d.id, d.typeID, d.value, t.name, t.label , tt.label as parentLabel, d.parentTypeID, d.creationDate
              from objets_data as d
              left join data_types as t on d.typeID=t.id
              left join data_types as tt on d.parentTypeID=tt.id
              where d.toID='" 
$this->_toID "' and d.outdated='' and d.deleted='' and t.groupe='admin'
              order by d.parentTypeID "
1
  • /class/msPeople.php
"SELECT fromID FROM people WHERE id='" $this->_toID "' limit 1"
1
  • /class/msPeople.php
"SELECT module FROM people WHERE id='" $this->_toID "' limit 1"
1
  • /class/msPeople.php
"SELECT id FROM people WHERE id='" $id "' limit 1"
1
  • /class/msPeople.php
"select p.id, n1.value as prenom, CASE WHEN n2.value != '' THEN n2.value ELSE bn.value END as nom
      from objets_data as p
      left join objets_data as n1 on n1.toID=p.fromID and n1.typeID='" 
$name2typeID['firstname'] . "' and n1.outdated='' and n1.deleted=''
      left join objets_data as n2 on n2.toID=p.fromID and n2.typeID='" 
$name2typeID['lastname'] . "' and n2.outdated='' and n2.deleted=''
      left join objets_data as bn on bn.toID=p.fromID and bn.typeID='" 
$name2typeID['birthname'] . "' and bn.outdated='' and bn.deleted=''
      where p.toID='" 
$this->_toID "' and p.typeID='" $name2typeID['csAldDeclaration'] . "' and p.deleted='' and p.outdated=''"
1
  • /class/msPeople.php
"select internalName, label from forms_cat order by label"
1
  • /class/msForms.php
"select id, label from forms_cat order by label"
1
  • /class/msForms.php
"select f.id, f.internalName, f.name, f.description, f.module, c.name as catName, c.label as catLabel, c.id as catID
        from forms as f
        left join forms_cat as c on c.id=f.cat
        where f.id > 0 and f.type='" 
$this->_formsType "' " $catID "
        group by f.id
        order by " 
$orderBy
1
  • /class/msForms.php
"select pd.id as idGro, eg.id as idFin
           from objets_data as pd
           left join objets_data as eg on pd.id=eg.instance and eg.typeID='" 
$name2typeID['groFermetureSuivi'] . "' and eg.outdated='' and eg.deleted=''
           where pd.toID='" 
$this->_toID "' and pd.typeID='" $name2typeID['nouvelleGrossesse'] . "' and pd.outdated='' and pd.deleted='' order by pd.creationDate desc
           limit 1"
1
  • /class/msLapPatient.php
"SELECT name, value AS version FROM system " $where1
  • /class/msModules.php
"SELECT name, value AS version FROM system WHERE groupe='module'"
1
  • /class/msModules.php
"SELECT name FROM system WHERE groupe='module' order by name"
1
  • /class/msModules.php
"select yamlStructure from forms where id='" $this->_formID "' limit 1"
1
  • /class/msForm.php
"select id, name, label, validationRules, validationErrorMsg, formType, formValues, placeholder from data_types where name='" msSQL::cleanVar($name) . "' limit 1"
1
  • /class/msForm.php
"select id, name, label, validationRules, validationErrorMsg, formType, formValues, placeholder from data_types where id='" msSQL::cleanVar($id) . "' limit 1"
1
  • /class/msForm.php
"select p.id, c.value, CASE WHEN o.value != '' THEN concat(o2.value , ' ' , o.value) ELSE concat(o2.value , ' ' , bn.value) END as identite
          from people as p
          join configuration as c on c.toID=p.id and c.name='" 
$param "'
          left join objets_data as o on o.toID=p.id and o.typeID='" 
$name2typeID['lastname'] . "' and o.outdated='' and o.deleted=''
          left join objets_data as bn on bn.toID=p.id and bn.typeID='" 
$name2typeID['birthname'] . "' and bn.outdated='' and bn.deleted=''
          left join objets_data as o2 on o2.toID=p.id and o2.typeID='" 
$name2typeID['firstname'] . "' and o2.outdated='' and o2.deleted=''
          where p.pass!='' order by identite"
1
  • /class/msPeople.php
"select p.id, n1.value as prenom, CASE WHEN n2.value != '' THEN n2.value ELSE bn.value END as nom
      from objets_data as p
      left join objets_data as n1 on n1.toID=p.fromID and n1.typeID='" 
$name2typeID['firstname'] . "' and n1.outdated='' and n1.deleted=''
      left join objets_data as n2 on n2.toID=p.fromID and n2.typeID='" 
$name2typeID['lastname'] . "' and n2.outdated='' and n2.deleted=''
      left join objets_data as bn on bn.toID=p.fromID and bn.typeID='" 
$name2typeID['birthname'] . "' and bn.outdated='' and bn.deleted=''
      where p.toID='" 
$this->_toID "' and p.typeID='" $name2typeID['csAtcdStrucDeclaration'] . "' and p.deleted='' and p.outdated='' and p.instance='" $name2typeID[$parentTypeName] . "' "
1
  • /class/msPeople.php
"select * from forms where id='" $this->_formID "' limit 1"
1
  • /class/msForm.php
"INSERT INTO configuration (name, level, value) VALUES ('" $k "', 'default', '" $v "') ON DUPLICATE KEY UPDATE value='" $v "'"
1
  • /upgrade/base/sqlUpgrade_v3.1.2_v4.0.0_post.php
"select p.* , c.name as catName, c.label as catLabel
      from prescriptions as p
      left join prescriptions_cat as c on c.id=p.cat
      where p.toID in ('0', '" 
$p['user']['id'] . "') and c.type='nonlap'
      group by p.id
      order by c.label asc, p.label asc"
1
  • /controlers/user/actions/inc-ajax-userParametersPrescriptionsList.php
"SELECT DISTINCT(type) FROM agenda"
1
  • /controlers/user/userParameters.php
"select name from people where name='" msSQL::cleanVar($input[$field]) . "' limit 1"
1
  • /fonctions/validators.php
"select $field from $param where $field='" msSQL::cleanVar($input[$field]) . "' limit 1"
1
  • /fonctions/validators.php
"select count(txtFileName) from inbox where archived='n' and mailForUserID in ('" $apicryptInboxMailForUserID "') "
1
  • /public_html/index.php
"SELECT COUNT(*) FROM people WHERE type='pro' AND name!=''"
1
  • /public_html/index.php
"select name, value from system"
1
  • /public_html/public.php
"INSERT INTO configuration (name, level, value) VALUES
            ('mailRappelLogCampaignDirectory', 'default', '" 
$webdir "/mailsRappelRdvArchives/'),
            ('smsLogCampaignDirectory', 'default', '" 
$webdir "/smsArchives/'),
            ('apicryptCheminInbox', 'default', '" 
$webdir "/inbox/'),
            ('apicryptCheminArchivesInbox', 'default', '" 
$homepath "inboxArchives/'),
            ('apicryptCheminFichierNC', 'default', '" 
$webdir "/workingDirectory/NC/'),
            ('apicryptCheminFichierC', 'default', '" 
$webdir "/workingDirectory/C/'),
            ('apicryptCheminVersClefs', 'default', '" 
$homepath "apicrypt/'),
            ('apicryptCheminVersBinaires', 'default', '" 
$homepath "apicrypt/bin/'),
            ('dicomWorkListDirectory', 'default', '" 
$webdir "/workingDirectory/'),
            ('dicomWorkingDirectory', 'default', '" 
$webdir "/workingDirectory/'),
            ('templatesPdfFolder', 'default', '" 
$homepath "templates/models4print/'),
            ('templatesCdaFolder', 'default', '" 
$homepath "templates/CDA/')
            ON DUPLICATE KEY UPDATE value=VALUES(value)"
1
  • /public_html/install.php
"SHOW TABLES"
1
  • /public_html/install.php
"INSERT INTO configuration (name, level, value) VALUES ('templatesCdaFolder', 'default', '" $p['homepath'] . "templates/CDA/') ON DUPLICATE KEY UPDATE value=VALUES(value)"
1
  • /upgrade/base/sqlUpgrade_v4.2.1_v4.3.0_post.php
"INSERT IGNORE INTO `system` (`name`, `groupe`, `value`) VALUES ('vitalonlinePlugin', 'plugin', 'v1.0.0');"
1
  • /upgrade/base/sqlUpgrade_v6.5.0_v6.6.0_post.php
"select o.value
        from objets_data as o
        left join objets_data as p on p.id=o.instance
        left join objets_data as ac on ac.instance=o.instance and ac.typeID='" 
$name2typeID['atcdStrucCIM10InLap'] . "'
        where o.toID='" 
$this->_toID "' and
          ((o.typeID ='" 
$name2typeID['atcdStrucCIM10'] . "' and p.instance in ('" implode("','"$parentsAutorises) . "') and ac.value != 'n')
          or
          (o.typeID = '" 
$name2typeID['aldCIM10'] . "' and p.typeID= '" $name2typeID['csAldDeclaration'] . "'))
          and o.deleted='' and o.outdated=''
        group by o.id
        "
1
  • /class/msPeople.php
"INSERT IGNORE INTO `system` (`name`, `groupe`, `value`) VALUES ('apicrypt2Plugin', 'plugin', 'v1.0.0');"
1
  • /upgrade/base/sqlUpgrade_v6.5.0_v6.6.0_post.php
"update data_types set formValues='" msSQL::cleanVar($options) . "' where name='relationPatientPatient' limit 1"
1
  • /upgrade/base/sqlUpgrade_v5.0.1_v5.1.0_post.php
"select dt.id, dt.name, od.value
        from objets_data as od
        join data_types as dt on dt.id=od.typeID and groupe='medical'
        where od.instance='" 
$instance "' and od.outdated='' and od.deleted=''"
1
  • /class/msCourrier.php
"select count(id) from objets_data
        where typeID in ('" 
implode("','"$porteursReglementIds) . "') and DATE(creationDate) = DATE('" $this->_objetData['creationDate'] . "') and id <= '" $this->_objetData['id'] . "' and fromID = '" $this->_objetData['fromID'] . "'"
1
  • /class/msCourrier.php
"select toID from objets_data where typeID='" $name2typeID['nss'] . "' and value = '" $dat[9] . $dat[10] . "' and deleted = '' and outdate = '' group by toID "
1
  • /class/msVitale.php
"select YEAR(registerDate) as year from objets_data where toID='" $this->_toID "' and typeID='" $name2typeID[$name] . "' and deleted='' "
1
  • /class/msPeople.php
"select v.registerDate, v.value, DATE_FORMAT(v.registerDate, '%Y-%m-%d') as dateonly, DATE_FORMAT(v.registerDate,'%H:%i:%s') as timeonly, CASE WHEN n2.value != '' THEN n2.value  ELSE bn.value END as nom, n1.value as prenom
      from objets_data as v
      left join objets_data as n1 on n1.toID=v.fromID and n1.typeID='" 
$name2typeID['firstname'] . "' and n1.outdated='' and n1.deleted=''
      left join objets_data as n2 on n2.toID=v.fromID and n2.typeID='" 
$name2typeID['lastname'] . "' and n2.outdated='' and n2.deleted=''
      left join objets_data as bn on bn.toID=v.fromID and bn.typeID='" 
$name2typeID['birthname'] . "' and bn.outdated='' and bn.deleted=''
      where v.toID='" 
$this->_toID "' and v.typeID='" $name2typeID[$name] . "' and v.deleted='' and v.registerDate >= '" msSQL::cleanVar($borneInf) . "' and v.registerDate <= '" msSQL::cleanVar($borneSup) . "'
      group by v.id, n1.id, n2.id, bn.id
      order by v.registerDate desc"
1
  • /class/msPeople.php
"select p.id, p.fromID, p.toID, p.instance as parentID, p.important, p.titre, p.registerDate, p.creationDate,  DATE_FORMAT(p.creationDate,'%Y') as creationYear,  p.updateDate, t.id as typeCS, t.name, t.module as module, t.groupe, t.label, t.formValues as formName, t.placeholder as signaturePatient, n1.value as prenom, f.printModel, mail.instance as sendMail, doc.value as fileext, doc2.value as docOrigine, img.value as dicomStudy,
      CASE WHEN DATE_ADD(p.creationDate, INTERVAL t.durationLife second) < NOW() THEN 'copy' ELSE 'update' END as iconeType, CASE WHEN n2.value != '' THEN n2.value  ELSE bn.value END as nom
      from objets_data as p
      left join data_types as t on p.typeID=t.id
      left join objets_data as n1 on n1.toID=p.fromID and n1.typeID='" 
$name2typeID['firstname'] . "' and n1.outdated='' and n1.deleted=''
      left join objets_data as n2 on n2.toID=p.fromID and n2.typeID='" 
$name2typeID['lastname'] . "' and n2.outdated='' and n2.deleted=''
      left join objets_data as bn on bn.toID=p.fromID and bn.typeID='" 
$name2typeID['birthname'] . "' and bn.outdated='' and bn.deleted=''
      left join objets_data as mail on mail.instance=p.id and mail.typeID='" 
$name2typeID['mailPorteur'] . "'
      left join objets_data as doc on doc.instance=p.id and doc.typeID='" 
$name2typeID['docType'] . "'
      left join objets_data as doc2 on doc2.instance=p.id and doc2.typeID='" 
$name2typeID['docOrigine'] . "'
      left join objets_data as img on img.instance=p.id and img.typeID='" 
$name2typeID['dicomStudyID'] . "'
      left join forms as f on f.internalName=t.formValues
      where ((t.groupe in ('typeCS', 'courrier') and t.cat != '" 
$catIdHorsHistoriques "' )
        or (t.groupe = 'doc' and  t.id='" 
$name2typeID['docPorteur'] . "')
        or (t.groupe = 'ordo' and  t.id in ('" 
implode("','"$porteursOrdoIds) . "'))
        " 
$lapCompSql "
        " 
$lapExtCompSql "
        or (t.groupe = 'reglement' and  t.id in ('" 
implode("','"$porteursReglementIds) . "'))
        or (t.groupe='mail' and t.id='" 
$name2typeID['mailPorteur'] . "' and p.instance='0'))
      and p.toID='" 
$this->_toID "' and p.outdated='' and p.deleted='' " $datesPrecisions " and t.id!='" $name2typeID['csAtcdStrucDeclaration'] . "'" $objetIDsSql "
      group by p.id, bn.value, n1.value, n2.value, mail.instance, doc.value, doc2.value, img.value, f.id
      order by p.creationDate desc " 
$limitSql
1
  • /class/msPeople.php
"select p.value
      from objets_data as p
      where p.toID='" 
$this->_toID "' and p.typeID='" $name2typeID['allergieCodeTheriaque'] . "' and p.deleted='' and p.outdated='' and p.instance='" $name2typeID[$parentTypeName] . "' "
1
  • /class/msPeople.php
"select p.*, CASE WHEN n2.value != '' THEN concat(n1.value, ' ',n2.value) ELSE concat(n1.value, ' ', bn.value) END as fromName, p1.value as libelle
      from objets_data as p
      left join objets_data as p1 on p1.instance=p.id and p1.typeID='" 
$name2typeID['allergieLibelleTheriaque'] . "' and p1.outdated='' and p1.deleted=''
      left join objets_data as n1 on n1.toID=p.fromID and n1.typeID='" 
$name2typeID['firstname'] . "' and n1.outdated='' and n1.deleted=''
      left join objets_data as n2 on n2.toID=p.fromID and n2.typeID='" 
$name2typeID['lastname'] . "' and n2.outdated='' and n2.deleted=''
      left join objets_data as bn on bn.toID=p.fromID and bn.typeID='" 
$name2typeID['birthname'] . "' and bn.outdated='' and bn.deleted=''
      where p.toID='" 
$this->_toID "' and p.typeID='" $name2typeID['allergieCodeTheriaque'] . "' and p.deleted='' and p.outdated='' and p.instance='" $name2typeID[$parentTypeName] . "' "
1
  • /class/msPeople.php
"select yamlStructure, formMethod, formAction, cda from forms where id='" $this->_formID "' limit 1"
1
  • /class/msForm.php
"select " msSQL::cleanVar($field) . " from forms where id='" $formID "' limit 1"
1
  • /class/msForm.php
"delete from $table where toID='" $p['user']['id'] . "' and id = '$id' limit 1"
1
  • /controlers/user/actions/inc-ajax-userParametersDelByPrimaryKey.php
"SELECT name FROM people WHERE id='" msSQL::cleanVar($id) . "' limit 1"
1
  • /class/msUser.php
"select toID from objets_data where typeID='" $name2typeID[$k] . "' and value like '" $v "' and outdated='' and deleted=''"
1
  • /class/msPeopleSearch.php
"SELECT id from people where name = '" cleanVar($name) . "' and type = 'service' limit 1"
1
  • /class/msPeopleSearch.php
"select pp.id, pp.name, pp.rank, pp.module, p.value as prenom, CASE WHEN n.value != '' THEN n.value ELSE bn.value END as nom
       from people as pp
       left join objets_data as n on n.toID=pp.id and n.typeID='" 
$name2typeID['lastname'] . "' and n.outdated='' and n.deleted=''
       left join objets_data as bn on bn.toID=pp.id and bn.typeID='" 
$name2typeID['birthname'] . "' and bn.outdated='' and bn.deleted=''
       left join objets_data as p on p.toID=pp.id and p.typeID='" 
$name2typeID['firstname'] . "' and p.outdated=''  and p.deleted=''
       where pp.name!='' and pp.pass!='' order by " 
$orderBy
1
  • /class/msPeopleSearch.php
'select p.type, p.id as peopleID, CASE WHEN LENGTH(TRIM(p.name)) > 0  and LENGTH(TRIM(p.pass)) > 0 THEN "isUser" ELSE "isNotUser" END as isUser,
    ' 
implode(', '$this->_makeSqlSelect( )) . '
    from people as p
    ' 
implode(' '$this->_makeSqlJoin( )) . '
    where p.type in ("' 
implode('", "'$this->_peopleType) . '") and ' implode(' and '$this->_makeSqlWhere( )) . ' ' implode(' '$this->_whereClauses) . ' ' $restrictionUser '
    order by trim(identite)
    limit ' 
$this->_limitStart ',' $this->_limitNumber
1
  • /class/msPeopleSearch.php
"select id, code, type, phase, activite, codeProf from actes_base where type in ('NGAP', 'CCAM', 'mCCAM') order by type"
1
  • /class/msCcamNgapApi.php
"UPDATE people set lastLostPassRandStr=NULL  WHERE id='" $this->_userID "' limit 1"
1
  • /class/msUser.php
"UPDATE people set lastLostPassDate=NOW(), lastLostPassRandStr='" $this->_userPasswordRecoveryStr "'  WHERE id='" $this->_userID "' limit 1"
1
  • /class/msUser.php
"select id, CAST(AES_DECRYPT(pass,@password) AS CHAR(100)) as pass from people where pass != '' "
1
  • /class/msUser.php
"SHOW COLUMNS FROM people"
1
  • /class/msUser.php
"select CAST(AES_DECRYPT(pass,@password) AS CHAR(100)) as pass from people where id='" msSQL::cleanVar($userID) . "' and LENGTH(pass)>0"
1
  • /class/msUser.php
"SELECT id FROM people WHERE name='" msSQL::cleanVar($name) . "' limit 1"
1
  • /class/msUser.php
"SELECT od.toID, od.value
              FROM objets_data AS od left join data_types AS dt
              ON od.typeID=dt.id AND od.outdated='' AND od.deleted=''
              WHERE dt.name='clicRdvPatientId'"
1
  • /class/msClicRDV.php
"UPDATE people set pass=AES_ENCRYPT('" msSQL::cleanVar($userPass) . "',@password) WHERE id='" $userID "' limit 1"
1
  • /class/msUser.php
"select name from people where id='" msSQL::cleanVar($userID) . "' limit 1"
1
  • /class/msUser.php
"UPDATE people set secret2fa = null WHERE id='" $uid "' limit 1"
1
  • /class/msUser.php
"UPDATE people set secret2fa=AES_ENCRYPT('" msSQL::cleanVar($otp->getSecret( )) . "',@password) WHERE id='" $this->_userID "' limit 1"
1
  • /class/msUser.php
"select id, name, CAST(AES_DECRYPT(pass,@password) AS CHAR(100)) as pass,
        CASE WHEN secret2fa is null THEN null ELSE CAST(AES_DECRYPT(secret2fa,@password) AS CHAR(110)) END as secret2fa from people where name='" 
msSQL::cleanVar($userName) . "' limit 1"
1
  • /class/msUser.php
"select id, CAST(AES_DECRYPT(pass,@password) AS CHAR(100)) as pass, rank from people where id='" $userID "' LIMIT 1"
1
  • /class/msUser.php
"select value from objets_data where typeID='" $name2typeID['lastname'] . "' and toID='" $user['id'] . "' and outdated='' and deleted='' limit 1"
1
  • /class/msUser.php
"select value from objets_data where typeID='" $name2typeID['firstname'] . "' and toID='" $user['id'] . "' and outdated='' and deleted='' limit 1"
1
  • /class/msUser.php
"select id, name, CAST(AES_DECRYPT(pass,@password) AS CHAR(100)) as pass, rank, module,
         CASE WHEN secret2fa is null THEN null ELSE CAST(AES_DECRYPT(secret2fa,@password) AS CHAR(110)) END as secret2fa
         from people where name='" 
msSQL::cleanVar($_COOKIE['userName']) . "' and lastLogFingerprint=sha1(concat('" $fingerprint_partiel "',lastLogDate)) LIMIT 1"
1
  • /class/msUser.php
"select o.id, o.value, o.instance, o.typeID, o.fromID, o.toID, o.creationDate, o.registerDate, o.updateDate, t.name
      from objets_data as o
      left join data_types as t on o.typeID=t.id
      where (o.id in ('" 
implode("', '"$this->_allObjetsID) . "') or (o.instance in ('" implode("', '"$this->_allObjetsID) . "') and t.name in ('" implode("', '"$this->getFormFieldList( )) . "'))) and o.outdated='' and o.deleted='' "
1
  • /class/msExportData.php
"SELECT dt.name,od.value
        FROM data_types AS dt left join objets_data AS od
        ON od.typeID=dt.id AND od.toID='" 
$this->_userID "' AND od.outdated='' AND od.deleted=''
        WHERE dt.groupe='user'"
1
  • /class/msClicRDV.php
"SELECT od.toID, od.value
              FROM objets_data AS od left join data_types AS dt
              ON od.typeID=dt.id AND od.outdated='' AND od.deleted=''
              WHERE dt.name='relationExternePatient'"
1
  • /class/msClicRDV.php
"select " msSQL::cleanVar($field) . " from forms where internalName='" msSQL::cleanVar($formIN) . "' limit 1"
1
  • /class/msForm.php
"select name, id from data_types where id in ('" implode("','"msSQL::cleanArray($ar)) . "')"
1
  • /class/msData.php
"select " implode(', 'msSQL::cleanArray($fields)) . " from forms where id='" $this->_formID "' limit 1"
1
  • /class/msForm.php
"select id from data_types where groupe='typecs' and formValues='" $this->_formIN "'"
1
  • /class/msForm.php
"select name from forms_cat where id = '" $id "' "
1
  • /class/msForm.php
"select typeID, value from objets_data where typeID in ('" implode("','"$this->formExtractDistinctTypes( )) . "') and toID='" $patientID "' and outdated='' and deleted='' " $where1
  • /class/msForm.php
"select id from forms where internalName='" msSQL::cleanVar($formName) . "' limit 1"
1
  • /class/msForm.php
"select internalName from forms where id='" msSQL::cleanVar($formID) . "' limit 1"
1
  • /class/msForm.php
"select name, formValues from data_types where formType in ('select', 'radio') and name in ('" implode("', '"msSQL::cleanArray($typeArray)) . "')"
1
  • /class/msData.php
"select id, formValues from data_types where formType in ('select', 'radio') and id in ('" implode("', '"msSQL::cleanArray($typeIDsArray)) . "')"
1
  • /class/msData.php
"select id from data_types where name = '" msSQL::cleanVar($name) . "' "
1
  • /class/msData.php
"select name from data_types where id = '" $typeID "' "
1
  • /class/msData.php
"select name, id from data_types where name in ('" implode("','"msSQL::cleanArray($ar)) . "')"
1
  • /class/msData.php
"UPDATE agenda SET externid='" msSQL::cleanVar($evtc['id']) . "' WHERE id='" msSQL::cleanVar($event['id']) . "'"
1
  • /class/msClicRDV.php
"select label, name from data_types where name in ('" implode("','"msSQL::cleanArray($ar)) . "') order by displayOrder"
1
  • /class/msData.php
"select label, id from data_types where id in ('" implode("','"msSQL::cleanArray($ar)) . "')"
1
  • /class/msData.php
"select " implode(', 'msSQL::cleanArray($col)) . " from data_types where name='" msSQL::cleanVar($name) . "'"
1
  • /class/msData.php
"select " implode(', 'msSQL::cleanArray($col)) . " from data_types where id='" $id "'"
1
  • /class/msData.php
"select " implode(', 'msSQL::cleanArray($col)) . " from data_types where name in ('" implode("','"msSQL::cleanArray($listArray)) . "') order by displayOrder, label"
1
  • /class/msData.php
"select " implode(', 'msSQL::cleanArray($col)) . " from data_types where groupe='" msSQL::cleanVar($groupe) . "' order by " $orderBy1
  • /class/msData.php
"select " implode(', 'msSQL::cleanArray($col)) . " from data_types where cat='" $catID "' " $where " order by " $orderBy1
  • /class/msData.php
"select id from data_types where name='" msSQL::cleanVar($name) . "' limit 1"
1
  • /class/msData.php
"SELECT id FROM data_types WHERE id='" $id "' limit 1"
1
  • /class/msData.php
"UPDATE agenda SET externid='" msSQL::cleanVar($evtc['id']) . "' WHERE id='" msSQL::cleanVar($vlocal['id']) . "'"
1
  • /class/msClicRDV.php
"SELECT value FROM system WHERE groupe='cron' and name='clicRDV'"
1
  • /class/msClicRDV.php
"select c.*, count(p.id) as enfants
from prescriptions_cat as c
left join prescriptions as p on c.id=p.cat
where c.toID in ('0','" 
$p['user']['id'] . "')
group by c.id
order by c.displayOrder asc, c.label asc"
1
  • /controlers/user/actions/inc-ajax-userParametersPrescriptionsCatList.php
"select value, instance from objets_data where typeID='" msData::getTypeIDFromName('dicomStudyID') . "' and toID='" $p['page']['patient']['id'] . "' "
1
  • /controlers/dicom/viewPatient.php
"select id from objets_data where typeID in ('" implode("', '"$this->_dataTypeIDs) . "') and fromID in ('" implode("', '"$this->_pratList) . "') " $toIdToExclude " " $this->_formatDateParameters( ) . " and outdated='' and deleted=''"
1
  • /class/msExportData.php
"SELECT count(id) as nb, type FROM people where id not in ('" implode("', '"$statsExclusionPatients) . "') group by type"
1
  • /controlers/outils/statsGenerales.php
"select toID from objets_data where value = '" msSQL::cleanVar($email) . "' and typeID in ('" implode("', '"$name2typeID) . "') and outdated ='' and deleted ='' "
1
  • /controlers/public/actions/inc-ajax-publicLostPasswordEmailTreat.php
"select type from people where id='" $_POST['patientID'] . "'"
1
  • /controlers/rechercher/actions/inc-ajax-switchPraticienListe.php
"update objets_data set outdated='y', deleted='y', deletedByID='" $p['user']['id'] . "' where toID='" msSQL::cleanVar($_POST['patientID']) . "' and typeID='" $administratifMarqueurSuppressionID "'"
1
  • /controlers/rechercher/actions/inc-ajax-unmarkDeleted.php
"select value from objets_data where toID='" $_POST['patientID'] . "' and typeID='" $administratifMarqueurSuppressionID "' order by id desc limit 1"
1
  • /controlers/rechercher/actions/inc-ajax-unmarkDeleted.php
"SELECT od.toID, od.value
              FROM objets_data AS od left join data_types AS dt
              ON od.typeID=dt.id AND od.outdated='' AND od.deleted=''
              WHERE dt.name='relationExternePatient' and od.toID in ('" 
implode("', '"array_column($todays'id')) . "')"
1
  • /controlers/rechercher/actions/inc-ajax-patientsListByCrit.php
"select type from people where id='" $_POST['patientID'] . "' limit 1"
1
  • /controlers/rechercher/actions/inc-ajax-markDeleted.php
"select t.label, t.name as id, c.label as catName, c.label as catLabel
  from data_types as t
  left join data_cat as c on c.id=t.cat
  where t.id > 0 and t.groupe = 'admin' and t.formType != 'group' and t.id in ('" 
implode("', '"$form->formExtractDistinctTypes( )) . "')
  order by c.label asc, t.label asc"
1
  • /controlers/rechercher/patients.php
"SELECT value AS version FROM system WHERE name='base'"
1
  • /controlers/login/logIn.php
"SELECT value FROM system WHERE name='state' and groupe='system'"
1
  • /controlers/login/logInDo.php
"SELECT rank FROM people WHERE name='" msSQL::cleanVar($_POST['p_username']) . "' limit 1"
1
  • /controlers/login/logInDo.php
"select t.id, t.name, t.label, c.name as catName, c.label as catLabel,
      (select count(id) from objets_data as d where d.typeID=t.id and d.toID not in ('" 
implode("', '"$statsExclusionPatients) . "') and d.outdated='' and d.deleted='') as actifs, (select count(id) from objets_data as d where d.typeID=t.id and d.toID not in ('" implode("', '"$statsExclusionPatients) . "') and (d.outdated='y' or d.deleted='y')) as deleted
      from data_types as t
      left join data_cat as c on c.id=t.cat
      where t.id > 0 and t.groupe='typecs' and c.name not in ('" 
implode("', '"$statsExclusionCats) . "')
      group by t.id
      order by t.module, c.label asc, t.label asc, t.name"
1
  • /controlers/outils/statsGenerales.php
"select id from people where lastLostPassRandStr = '" msSQL::cleanVar($randStringControl) . "' and lastLostPassDate >= DATE_SUB(NOW(),INTERVAL 10 MINUTE) limit 1"
1
  • /controlers/public/lostPassword/newSet.php
"select value from printed where id='" $match['params']['versionID'] . "' and toID='" $match['params']['patient'] . "' limit 1"
1
  • /controlers/print/pdfMakeFromHistory.php
"UPDATE people SET type='patient' WHERE id='" $_POST['externID'] . "'"
1
  • /controlers/people/actions/inc-ajax-setExternAsNewPatient.php
"select o.value as patientID, c.value as typeRelation,  p.value as prenom,
CASE
  WHEN n.value != '' and bn.value != '' THEN concat(n.value, ' (', bn.value, ')')
  WHEN n.value != '' THEN n.value
  ELSE bn.value END as nom
from objets_data as o
left join objets_data as c on c.instance=o.id
left join objets_data as n on n.toID=o.value and n.typeID='" 
$name2typeID['lastname'] . "' and n.outdated='' and n.deleted=''
left join objets_data as bn on bn.toID=o.value and bn.typeID='" 
$name2typeID['birthname'] . "' and bn.outdated='' and bn.deleted=''
left join objets_data as p on p.toID=o.value and p.typeID='" 
$name2typeID['firstname'] . "' and p.outdated='' and p.deleted=''
where o.toID='" 
$p['page']['proDataID'] . "' and o.typeID='" $name2typeID['relationID'] . "' and o.deleted='' and o.outdated=''
group by o.value, c.id, bn.id, n.id, p.id
order by nom asc"
1
  • /controlers/people/proView.php
"select type from people where id='" $match['params']['proID'] . "' limit 1"
1
  • /controlers/people/proView.php
"select p.id, m.value as mvalue, m.creationDate as dateDeleted, m.value as typeDossier,
CASE
  WHEN o.value != '' and bn1.value != '' THEN concat(o.value, ' (', bn1.value, ') ', o2.value)
  WHEN o.value != '' THEN concat(o.value, ' ', o2.value)
  ELSE concat(bn1.value, ' ', o2.value)
  END as identiteDossier,
CASE
  WHEN o3.value != '' THEN concat(o4.value, ' ', o3.value)
  ELSE concat(o4.value, ' ', bn2.value)
  END as identiteUser
from people as p
left join objets_data as o on o.toID=p.id and o.typeID='" 
$name2typeID['lastname'] . "' and o.outdated=''
left join objets_data as o2 on o2.toID=p.id and o2.typeID='" 
$name2typeID['firstname'] . "' and o2.outdated=''
left join objets_data as bn1 on bn1.toID=p.id and bn1.typeID='" 
$name2typeID['birthname'] . "' and bn1.outdated=''
left join objets_data as m on m.toID=p.id and m.typeID='" 
$name2typeID['administratifMarqueurSuppression'] . "' and m.outdated='' and m.deleted=''
left join objets_data as o3 on o3.toID=m.fromID and o3.typeID='" 
$name2typeID['lastname'] . "' and o3.outdated=''
left join objets_data as o4 on o4.toID=m.fromID and o4.typeID='" 
$name2typeID['firstname'] . "' and o4.outdated=''
left join objets_data as bn2 on bn2.toID=m.fromID and bn2.typeID='" 
$name2typeID['birthname'] . "' and bn2.outdated=''
where p.type='deleted' " 
$where "
group by p.id, bn1.id, o.id, o2.id, m.id, bn2.id, o3.id, o4.id
order by p.id"
1
  • /controlers/people/peopleListDeleted.php
"select m.fromID as id, concat(p.value, ' ', n.value) as identite
  from objets_data as m
  left join objets_data as n on n.toID=m.fromID and n.typeID='" 
$name2typeID['lastname'] . "' and n.outdated='' and n.deleted=''
  left join objets_data as p on p.toID=m.fromID and p.typeID='" 
$name2typeID['firstname'] . "' and p.outdated='' and p.deleted=''
  where m.typeID='" 
$name2typeID['mailPorteur'] . "'
  group by m.fromID, p.value, n.value
  order by n.value"
1
  • /controlers/logs/historiqueMailSend.php
"select o.value, o.typeID, o.creationDate, o.instance, o.toID, t.name, o.fromID
    from objets_data as o
    left join data_types as t on o.typeID=t.id
    where o.instance in (" 
implode(','$mailsListe) . ") "
1
  • /controlers/logs/historiqueMailSend.php
"select id from objets_data where instance='" $match['params']['objetID'] . "' and typeID='" $name2typeID['mailPorteur'] . "' order by creationDate desc"
1
  • /controlers/logs/historiqueMailSend.php
"select m.fromID as id,
  CASE WHEN n.value != '' THEN concat(p.value, ' ', n.value) ELSE concat(p.value, ' ', bn.value) END as identite
  from objets_data as m
  left join objets_data as n on n.toID=m.fromID and n.typeID='" 
$name2typeID['lastname'] . "' and n.outdated='' and n.deleted=''
  left join objets_data as p on p.toID=m.fromID and p.typeID='" 
$name2typeID['firstname'] . "' and p.outdated='' and p.deleted=''
  left join objets_data as bn on bn.toID=m.fromID and bn.typeID='" 
$name2typeID['birthname'] . "' and bn.outdated='' and bn.deleted=''
  where m.typeID='" 
$name2typeID['mailPorteur'] . "'
  group by m.fromID, bn.value, p.value, n.value
  order by n.value"
1
  • /controlers/logs/historiqueMailSendGeneral.php
"select m.id from objets_data as m
  join objets_data as mto on mto.instance=m.id and mto.typeID='" 
$name2typeID['mailTo'] . "'
  left join objets_data as mtof on mtof.instance=m.id and mtof.typeID='" 
$name2typeID['mailToEcofaxNumber'] . "'
  where " 
$where " m.typeID='" $name2typeID['mailPorteur'] . "' and mtof.id is null and m.deleted = ''
  group by m.id
  order by m.creationDate desc limit 
$startSQL,$nbParPage"
1
  • /controlers/logs/historiqueMailSendGeneral.php
"select id from people where lastLostPassRandStr = '" msSQL::cleanVar($_POST['randStringControl']) . "' and lastLostPassDate >= DATE_SUB(NOW(),INTERVAL 10 MINUTE) limit 1"
1
  • /controlers/public/actions/inc-ajax-publicLostPasswordNewPassTreat.php
"SELECT od.value FROM data_types AS dt LEFT JOIN objets_data AS od
  ON dt.name='relationExternePatient' AND od.typeID=dt.id AND od.outdated='' AND od.deleted=''
  WHERE od.toID='" 
$p['page']['patient']['id'] . "'"
1
  • /controlers/patient/patient.php
"select pd.* , TRIM(CONCAT(COALESCE(f.value,''), ' ', TRIM(CONCAT(COALESCE(l.value, ''), ' ', COALESCE(b.value,''))))) as prescripteur, CASE WHEN pd.byID!='' THEN pd.byID ELSE pd.fromID END as prescripteurID, t.label, t.groupe, t.name
  from objets_data as pd
  left join objets_data as f on f.toID=(CASE WHEN pd.byID!='' THEN pd.byID ELSE pd.fromID END) and f.typeID in (NULL, '', '" 
$ids['firstname'] . "') and f.outdated='' and f.deleted=''
  left join objets_data as l on l.toID=(CASE WHEN pd.byID!='' THEN pd.byID ELSE pd.fromID END) and l.typeID in (NULL, '', '" 
$ids['lastname'] . "') and l.outdated='' and l.deleted=''
  left join objets_data as b on b.toID=(CASE WHEN pd.byID!='' THEN pd.byID ELSE pd.fromID END) and b.typeID in (NULL, '', '" 
$ids['birthname'] . "') and b.outdated='' and b.deleted=''
  left join data_types as t on t.id=pd.typeID
  where 1 
$patientSel $typeSel $instance
  group by pd.id,t.id, f.id, b.id, l.id
  order by id desc limit 2000"
1
  • /controlers/logs/logs.php
"select distinct(date) from hprim where toID='" $p['page']['patient']['id'] . "' order by date desc "
1
  • /controlers/patient/tabs/tabBio.php
"select pd.toID, pd.fromID, pd.id, pd.typeID, pd.value, pd.creationDate, pd.registerDate, pd.instance, p.value as prenom , a.label, dc.name, dc.module,
  CASE WHEN n.value != '' and bn.value !='' THEN concat(n.value, ' (', bn.value,')')
  WHEN n.value != '' THEN n.value
  ELSE bn.value
  END as nom
  from objets_data as pd
  left join data_types as dc on dc.id=pd.typeID
  left join actes as a on pd.parentTypeID=a.id
  left join objets_data as p on p.toID=pd.toID and p.typeID='" 
$name2typeID['firstname'] . "' and p.outdated='' and p.deleted=''
  left join objets_data as n on n.toID=pd.toID and n.typeID='" 
$name2typeID['lastname'] . "' and n.outdated=''  and n.deleted=''
  left join objets_data as bn on bn.toID=pd.toID and bn.typeID='" 
$name2typeID['birthname'] . "' and bn.outdated='' and bn.deleted=''
  where pd.id in (
    select pd1.id from objets_data as pd1
    where pd1.typeID in ('" 
implode("','"$porteursReglementIds) . "') and DATE(pd1.creationDate) = CURDATE() and pd1.deleted='' and pd1.fromID in ('" implode("','"array_keys($p['page']['pratsAuto'])) . "'))

  union

  select pd.toID, pd.fromID, pd.id, pd.typeID, pd.value, pd.creationDate, pd.registerDate, pd.instance, p.value as prenom , a.label, dc.name, dc.module,
  CASE WHEN n.value != '' and bn.value !='' THEN concat(n.value, ' (', bn.value,')')
  WHEN n.value != '' THEN n.value
  ELSE bn.value
  END as nom
  from objets_data as pd
  left join data_types as dc on dc.id=pd.typeID
  left join actes as a on pd.parentTypeID=a.id
  left join objets_data as p on p.toID=pd.toID and p.typeID='" 
$name2typeID['firstname'] . "' and p.outdated=''  and p.deleted=''
  left join objets_data as n on n.toID=pd.toID and n.typeID='" 
$name2typeID['lastname'] . "' and n.outdated='' and n.deleted=''
  left join objets_data as bn on bn.toID=pd.toID and bn.typeID='" 
$name2typeID['birthname'] . "' and bn.outdated='' and bn.deleted=''
  where pd.instance in (
    select pd2.id from objets_data as pd2
    where pd2.typeID in ('" 
implode("','"$porteursReglementIds) . "') and DATE(pd2.creationDate) = CURDATE() and pd2.deleted='' and pd2.fromID in ('" implode("','"array_keys($p['page']['pratsAuto'])) . "'))

  order by creationDate asc
  "
1
  • /controlers/compta/today.php
"SELECT value FROM configuration WHERE name='administratifSecteurHonorairesCcam' AND level='default'"
1
  • /controlers/compta/today.php
"select pd.toID, pd.id, pd.typeID, pd.value, pd.creationDate, pd.registerDate, pd.instance, p.value as prenom , a.label, dc.name,
      CASE WHEN n.value != '' and bn.value !='' THEN concat(n.value, ' (', bn.value,')')
      WHEN n.value != '' THEN n.value
      ELSE bn.value
      END as nom
      from objets_data as pd
      left join data_types as dc on dc.id=pd.typeID
      left join actes as a on pd.parentTypeID=a.id
      left join objets_data as p on p.toID=pd.toID and p.typeID='" 
$name2typeID['firstname'] . "' and p.outdated='' and p.deleted=''
      left join objets_data as n on n.toID=pd.toID and n.typeID='" 
$name2typeID['lastname'] . "' and n.outdated='' and n.deleted=''
      left join objets_data as bn on bn.toID=pd.toID and bn.typeID='" 
$name2typeID['birthname'] . "' and bn.outdated='' and bn.deleted=''
      where
      pd.id in (
        select pd1.id from objets_data as pd1
        where pd1.typeID in ('" 
implode("','"$porteursReglementIds) . "') and DATE(pd1.creationDate) >= '" $beginPeriode->format("Y-m-d") . "' and DATE(pd1.creationDate) <= '" $endPeriode->format("Y-m-d") . "' and pd1.deleted='' and pd1.fromID in ('" implode("','"$p['page']['pratsSelect']) . "')" . ($impayes "and important='y'" "") . "
      )
  union
      select pd.toID, pd.id, pd.typeID, pd.value, pd.creationDate, pd.registerDate, pd.instance, p.value as prenom , a.label, dc.name,
      CASE WHEN n.value != '' and bn.value !='' THEN concat(n.value, ' (', bn.value,')')
      WHEN n.value != '' THEN n.value
      ELSE bn.value
      END as nom
      from objets_data as pd
      left join data_types as dc on dc.id=pd.typeID
      left join actes as a on pd.parentTypeID=a.id
      left join objets_data as p on p.toID=pd.toID and p.typeID='" 
$name2typeID['firstname'] . "' and p.outdated='' and p.deleted=''
      left join objets_data as n on n.toID=pd.toID and n.typeID='" 
$name2typeID['lastname'] . "' and n.outdated='' and n.deleted=''
      left join objets_data as bn on bn.toID=pd.toID and bn.typeID='" 
$name2typeID['birthname'] . "' and bn.outdated='' and bn.deleted=''
      where
      pd.instance in (
        select pd2.id from objets_data as pd2
        where pd2.typeID in ('" 
implode("','"$porteursReglementIds) . "') and DATE(pd2.creationDate) >= '" $beginPeriode->format("Y-m-d") . "' and DATE(pd2.creationDate) <= '" $endPeriode->format("Y-m-d") . "' and pd2.deleted='' and pd2.fromID in ('" implode("','"$p['page']['pratsSelect']) . "')" . ($impayes "and important='y'" "") . "
      )
  order by creationDate asc
  "
1
  • /controlers/compta/compta.php
"select id, label from actes_cat where module='" $module "' order by label"
1
  • /controlers/compta/comptaMemoTarifs.php
"select a.* , c.name as catName, c.label as catLabel, c.module as catModule
          from actes as a
          left join actes_cat as c on c.id=a.cat
      where (" 
implode(' or '$where) . ") and c.module='" $module "' and a.active='oui'
          group by a.id
          order by c.displayOrder, c.label asc, a.label asc"
1
  • /controlers/compta/comptaMemoTarifs.php
"select instance from objets_data where typeID='" msData::getTypeIDFromName('dicomStudyID') . "' and toID='" $match['params']['patientID'] . "' and value='" msSQL::cleanVar($_POST['param']['dcStudyID']) . "' "
1
  • /controlers/patient/tabs/tabDicomStudyView.php
"select value, instance from objets_data where typeID='" msData::getTypeIDFromName('dicomStudyID') . "' and toID='" $match['params']['patientID'] . "' "
1
  • /controlers/patient/tabs/tabDicomStudiesList.php
"select * from hprim where toID='" $match['params']['patientID'] . "' and date < '" $p['page']['dateCouranteBio'] . "' and labelStandard in ('" implode("', '"$analysesExtraites) . "') order by date desc, id asc "
1
  • /controlers/patient/tabs/tabBio.php
"select * from hprim where toID='" $p['page']['patient']['id'] . "' and date='" $p['page']['dateCouranteBio'] . "' order by id "
1
  • /controlers/patient/tabs/tabBio.php
"select h.objetID, o.titre from hprim as h
    left join objets_data as o on o.id=h.objetID
    where h.toID='" 
$p['page']['patient']['id'] . "' and h.date='" $p['page']['dateCouranteBio'] . "'
    group by objetID"
1
  • /controlers/patient/tabs/tabBio.php
"select ald.value as ald, concat(p.parentTypeID,'_',UNIX_TIMESTAMP(),'_',p.id) as formname, 'Ligne importée' as label, p.value as description, p.typeID, concat(' (initialement : ',pres.label,')') as labelInitiale, p.id
    from objets_data as p
    left join objets_data as ald on p.id=ald.instance and ald.typeID='" 
$name2typeID['ordoLigneOrdoALDouPas'] . "' and ald.outdated='' and ald.deleted=''
    left join prescriptions as pres on pres.id=p.parentTypeID
    where p.instance='" 
$_POST['objetID'] . "' and p.outdated='' and p.deleted='' and p.typeID in ('" $name2typeID['ordoTypeImpression'] . "','" $name2typeID['ordoLigneOrdo'] . "','" $name2typeID['ordoImpressionNbLignes'] . "')
    group by p.id, ald.id
    order by p.id asc"
1
  • /controlers/patient/actions/inc-ajax-extractOrdoForm.php
"SELECT od.toID FROM objets_data AS od left join people AS p
               ON od.toID=p.id AND p.type!='externe' AND od.outdated='' AND od.deleted=''
               WHERE (od.typeID IN ('" 
$name2typeID['mobilePhone'] . "', '" $name2typeID['homePhone'] . "', '" $name2typeID['telPro'] . "') AND od.value LIKE '" $data['mobilePhone']['value'] . "')
               OR (od.typeID IN ('" 
$name2typeID['mobilePhone'] . "', '" $name2typeID['homePhone'] . "', '" $name2typeID['telPro'] . "') AND od.value LIKE '" $data['homePhone']['value'] . "')"
1
  • /controlers/patient/patient.php
"select p.id, p.label as optionmenu , c.label as catLabel
  from prescriptions as p
  left join prescriptions_cat as c on c.id=p.cat
  where p.toID in ('0','" 
msSQL::cleanVar($userID) . "') and c.type='nonlap'
  group by p.id
  order by c.displayOrder, p.id in (1,2) desc, c.label asc, p.label asc"
1
  • /controlers/patient/actions/inc-ajax-extractOrdoForm.php
"SELECT dt.module AS module, dt.formValues AS form, dt.name as porteur, dt.fromID AS userID FROM data_types as dt
        LEFT JOIN objets_data as od ON dt.id=od.typeID
        WHERE od.id='" 
msSQL::cleanVar($_POST['objetID']) . "' limit 1"
1
  • /controlers/patient/actions/inc-ajax-extractOrdoForm.php
"select id, description, label, concat(id,'_',UNIX_TIMESTAMP(),'_0') as formname from prescriptions where id='" $_POST['ligneID'] . "' limit 1"
1
  • /controlers/patient/actions/inc-ajax-getLigneOrdo.php
"select d.id, dc.dicomTag, dc.returnValue, dc.roundDecimal
      from dicomTags as dc
      left join data_types as d on d.name = dc.typeName
      where dc.dicomTag in ('" 
implode("','"$keysSR) . "') and dc.typeName !=''"
1
  • /controlers/patient/actions/inc-ajax-catchLastDicomSrData.php
"SELECT dt.name AS name, od.id FROM objets_data as od
              LEFT JOIN data_types AS dt ON od.typeID=dt.id and od.outdated='' and od.deleted=''
              WHERE od.instance='" 
msSQL::cleanVar($_POST['objetID']) . "'"
1
  • /controlers/patient/actions/inc-ajax-saveCsForm.php
"select value, instance from objets_data where typeID='" msData::getTypeIDFromName('dicomStudyID') . "' and toID='" $_POST['patientID'] . "' "
1
  • /controlers/patient/actions/inc-ajax-listPatientDicomStudies.php
"SELECT dt.name, od.value, od.registerDate AS date
  FROM objets_data AS od
  LEFT JOIN data_types AS dt ON od.typeID=dt.id AND od.toID='" 
msSQL::cleanVar($_POST['patientID']) . "' and deleted=''
  WHERE dt.groupe='medical' AND od.typeID in ('" 
implode("', '"$name2typeID) . "') AND od.value != ''
  ORDER BY od.registerDate ASC"
1
  • /controlers/patient/actions/inc-ajax-getGraphData.php
"select id from data_types where groupe='typecs' and formValues='" msSQL::cleanVar($_POST['formIN']) . "' limit 1"
1
  • /controlers/patient/actions/inc-ajax-extractCsForm.php
"SELECT dt.name AS name, od.id FROM objets_data as od
               LEFT JOIN data_types AS dt ON od.typeID=dt.id and od.outdated='' and od.deleted=''
               WHERE od.instance='" 
msSQL::cleanVar($_POST['objetID']) . "'"
1
  • /controlers/patient/actions/inc-action-saveCsForm.php
"select type from people where id='" $p['page']['patient']['id'] . "' limit 1"
1
  • /controlers/patient/patient.php
"SELECT od.toID FROM objets_data AS od left join people AS p
               ON od.toID=p.id AND p.type!='externe' AND od.outdated='' AND od.deleted=''
               WHERE typeID IN('" 
$name2typeID['personalEmail'] . "', '" $name2typeID['profesionnalEmail'] . "') and value = '" $data['personalEmail']['value'] . "'"
1
  • /controlers/patient/patient.php
"select p.id, p.creationDate, p.value, p.toID, p.anonyme,
    CASE
      WHEN ln1.value != '' THEN concat(ln1.value , ' ' , fn1.value)
      ELSE concat(fn1.value , ' ' , bn1.value)
    END as identiteAuteur
    from printed as p
    left join objets_data as ln1 on ln1.toID=p.fromID and ln1.typeID='" 
$name2typeID['lastname'] . "' and ln1.outdated='' and ln1.deleted=''
    left join objets_data as bn1 on bn1.toID=p.fromID and bn1.typeID='" 
$name2typeID['birthname'] . "' and bn1.outdated='' and bn1.deleted=''
    left join objets_data as fn1 on fn1.toID=p.fromID and fn1.typeID='" 
$name2typeID['firstname'] . "' and fn1.outdated='' and fn1.deleted=''
    where p.objetID='" 
$match['params']['objetID'] . "'
    order by p.creationDate desc"
1
  • /controlers/logs/historiquePrint.php
"select id from objets_data order by id desc limit 2000"
1
  • /controlers/logs/logs.php
"select instance from objets_data where typeID='" msData::getTypeIDFromName('dicomStudyID') . "' and toID='" $p['page']['patient']['id'] . "' and value='" msSQL::cleanVar($match['params']['dcStudyID']) . "' "
1
  • /controlers/dicom/viewStudy.php
"select id, label from data_cat where groupe='" $p['page']['groupe'] . "' order by label"
1
  • /controlers/configuration/configDataType.php
"select a.* , c.name as catName, c.label as catLabel, c.module as catModule
                    from actes as a
                    left join actes_cat as c on c.id=a.cat
          where " 
implode(' and '$where) . "
                    group by a.id
                    order by c.module, c.displayOrder, c.label asc, a.label asc"
1
  • /controlers/configuration/configActes.php
"select details from actes"
1
  • /controlers/configuration/configActesBase.php
"select id, code, phase, activite, codeProf, label, type from actes_base order by type='NGAP' desc, code"
1
  • /controlers/configuration/configActesBase.php
"select distinct type from actes_base order by type='NGAP' desc, type='CCAM' desc, type='Libre' asc"
1
  • /controlers/configuration/configActesBase.php
"select * from forms where id='" $match['params']['form'] . "' limit 1"
1
  • /controlers/configuration/configFormPreview.php
"select dt.name, dt.label, dt.id, dt.cat, dc.label as catName
from data_types as dt
left join data_cat as dc on dt.cat=dc.id
where dt.name in ('" 
implode('\',\''$tagsKeys) . "')"
1
  • /controlers/configuration/configShowTagsForCr.php
"SELECT DISTINCT(cat) FROM configuration WHERE level='default'"
1
  • /controlers/configuration/configDefaultParams.php
"select dt.*, d.label, dc.label as labelCat
     from dicomTags dt
      left join data_types as d on d.name=dt.typeName
      left join data_cat as dc on dc.id=d.cat
      where dt.dicomTag !='' order by dt.dicomCodeMeaning"
1
  • /controlers/configuration/configDicomTags.php
"select c.*, count(a.id) as enfants
            from actes_cat as c
            left join actes as a on c.id=a.cat
            group by c.id
            order by c.displayOrder, c.label asc"
1
  • /controlers/configuration/configActesCat.php
"select c.*, count(t.id) as enfants
        from data_cat as c
        left join data_types as t on c.id=t.cat
        where c.groupe='" 
msSQL::cleanVar($p['page']['groupe']) . "'
        group by c.id
        order by c.label asc"
1
  • /controlers/configuration/configDataCat.php
"select t.*, c.name as catName, c.label as catLabel,
        (select count(id) from objets_data as d where d.typeID=t.id ) as enfants
        from data_types as t
        left join data_cat as c on c.id=t.cat
        where t.id > 0 and t.groupe='" 
msSQL::cleanVar($p['page']['groupe']) . "' " $catRestriction "
        group by t.id
        order by t.module, t.displayOrder, c.label asc, t.label asc, t.name"
1
  • /controlers/configuration/configDataType.php
"SELECT count(id) as nb, parentTypeID FROM objets_data WHERE typeID in ('" implode("','"$porteursReglementIds) . "') and deleted='' group by parentTypeID"
1
  • /controlers/configuration/configActes.php
"select t.*, c.name as catName, c.label as catLabel
            from data_types as t
            left join data_cat as c on c.id=t.cat
            where t.id > 0 and t.groupe = '" 
$p['page']['form']['groupe'] . "'
            order by c.label asc, t.label asc"
1
  • /controlers/configuration/configFormEdit.php
"select concat(printModel, '.html.twig') as fichier, name, id from forms where printModel!='' "
1
  • /controlers/configuration/configTemplatesPDF.php
"select c.*, count(t.id) as enfants
            from forms_cat as c
            left join forms as t on c.id=t.cat
            group by c.id
            order by c.label asc"
1
  • /controlers/configuration/configFormsCat.php
"select c.*, count(p.id) as enfants
            from prescriptions_cat as c
            left join prescriptions as p on c.id=p.cat
      where c.type='nonlap'
            group by c.id
            order by c.label asc"
1
  • /controlers/configuration/configPrescriptionsCat.php
"SELECT id, name FROM people WHERE name!='' and type='pro'"
1
  • /controlers/configuration/configSpecificUserParam.php
"select p.* , c.name as catName, c.label as catLabel
                    from prescriptions as p
                    left join prescriptions_cat as c on c.id=p.cat
          where " 
implode(' and '$where) . " and c.type='nonlap'
                    group by p.id
                    order by c.label asc, p.label asc"
1
  • /controlers/configuration/configPrescriptions.php
"delete from prescriptions where toID='" $p['user']['id'] . "' and id='" msSQL::cleanVar($_POST['id']) . "' limit 1 "
1
  • /controlers/lap/actions/inc-ajax-lapPresTypeGetDelete.php
"select description from prescriptions where id ='" msSQL::cleanVar($_POST['id']) . "' limit 1"
1
  • /controlers/lap/actions/inc-ajax-lapPresTypeGetDetails.php
"SELECT w.fromID, w.toID, w.titre, w.registerDate, s.id,
CASE
  WHEN o.value != '' and bn1.value != '' THEN concat(o.value, ' (', bn1.value, ') ', o2.value)
  WHEN o.value != '' THEN concat(o.value, ' ', o2.value)
  ELSE concat(bn1.value, ' ', o2.value)
  END as identiteDossier
FROM objets_data as w
left join objets_data as o on o.toID=w.toID and o.typeID='" 
$name2typeID['lastname'] . "' and o.outdated='' and o.deleted=''
left join objets_data as o2 on o2.toID=w.toID and o2.typeID='" 
$name2typeID['firstname'] . "' and o2.outdated='' and o2.deleted=''
left join objets_data as bn1 on bn1.toID=w.toID and bn1.typeID='" 
$name2typeID['birthname'] . "' and bn1.outdated='' and bn1.deleted=''
left join objets_data as s on s.registerDate > w.registerDate and s.toID = w.toID and s.outdated ='' and s.deleted=''
where w.outdated ='' and w.deleted=''and w.typeID = '" 
$name2typeID['lapOrdonnance'] . "' and w.value like '%" msSQL::cleanVar($_POST['samID']) . "%' and s.id is null
order by w.registerDate desc
"
1
  • /controlers/lap/actions/inc-ajax-lapOutilDisplayListSamPatients.php
"SELECT w.fromID, w.toID, w.registerDate, GROUP_CONCAT(DISTINCT allea.value SEPARATOR ' ') AS allergies, GROUP_CONCAT(DISTINCT cimg.value SEPARATOR ' ') AS atcd,
CASE
 WHEN TIMESTAMPDIFF(YEAR,STR_TO_DATE(bd.value, '%d/%m/%Y'),w.registerDate) >= 2 THEN  TIMESTAMPDIFF(YEAR,STR_TO_DATE(bd.value, '%d/%m/%Y'),w.registerDate)
 WHEN TIMESTAMPDIFF(MONTH,STR_TO_DATE(bd.value, '%d/%m/%Y'),w.registerDate) >= 1 THEN TIMESTAMPDIFF(MONTH,STR_TO_DATE(bd.value, '%d/%m/%Y'),w.registerDate)
 ELSE TIMESTAMPDIFF(DAY,STR_TO_DATE(bd.value, '%d/%m/%Y'),w.registerDate)
 END as ageALaPresc,
CASE
 WHEN TIMESTAMPDIFF(YEAR,STR_TO_DATE(bd.value, '%d/%m/%Y'),w.registerDate) >= 2 THEN  'ans'
 WHEN TIMESTAMPDIFF(MONTH,STR_TO_DATE(bd.value, '%d/%m/%Y'),w.registerDate) >= 1 THEN 'mois'
 ELSE 'jours'
 END as ageALaPrescUnite,
CASE
 WHEN o.value != '' and bn1.value != '' THEN concat(o.value, ' (', bn1.value, ') ', o2.value)
 WHEN o.value != '' THEN concat(o.value, ' ', o2.value)
 ELSE concat(bn1.value, ' ', o2.value)
 END as identiteDossier, spe.value as specialite, dc.value as dci, bd.value as birthdate
FROM objets_data as w
$leftJoinSexe
$leftJoinAllergie
$leftJoinCIM
left join objets_data as spe on spe.instance=w.instance and spe.typeID='" 
$name2typeID['lapMedicamentSpecialiteNom'] . "'
left join objets_data as dc on dc.instance=w.instance and dc.typeID='" 
$name2typeID['lapMedicamentDC'] . "'
left join objets_data as o on o.toID=w.toID and o.typeID='" 
$name2typeID['lastname'] . "' and o.outdated='' and o.deleted=''
left join objets_data as o2 on o2.toID=w.toID and o2.typeID='" 
$name2typeID['firstname'] . "' and o2.outdated='' and o2.deleted=''
left join objets_data as bn1 on bn1.toID=w.toID and bn1.typeID='" 
$name2typeID['birthname'] . "' and bn1.outdated='' and bn1.deleted=''
left join objets_data as bd on bd.toID=w.toID and bd.typeID='" 
$name2typeID['birthdate'] . "' and bd.outdated='' and bd.deleted=''

left join objets_data as allea on allea.toID=w.toID and allea.typeID='" 
$name2typeID['allergieCodeTheriaque'] . "' and  allea.outdated='' and allea.deleted=''

left join objets_data as cimg on cimg.toID=w.toID and cimg.typeID='" 
$name2typeID['atcdStrucCIM10'] . "' and cimg.outdated='' and cimg.deleted=''

where  w.outdated ='' and w.deleted='' 
$whereCode $wherePatientID $whereBeginPeriode $whereEndPeriode $whereSexe $whereAllergie $whereCIM
group by w.id, spe.id, dc.id, o.id, o2.id, bn1.id, bd.id 
$groubySexe $groupbyAllergie $groupbyCIM
order by w.registerDate desc
"
1
  • /controlers/lap/actions/inc-ajax-lapOutilsSearchPres.php
"select id, concat(label, ' (module ',module, ')') as label from actes_cat order by label"
1
  • /controlers/configuration/configActes.php
"DELETE FROM configuration WHERE name='" msSQL::cleanVar($_POST['paramName']) . "' AND level='user' AND toID='" $_POST['userID'] . "' limit 1"
1
  • /controlers/configuration/actions/inc-ajax-configUserParamDelete.php
"select l.eventID, l.userID as agendaID, l.date, l.operation, l.olddata, l.fromID, a.patientid as patientID, a.type as type, a.start, a.end, TIMESTAMPDIFF(MINUTE,a.start,a.end) as duree,
  CASE WHEN n.value != '' THEN n.value ELSE bn.value END as patientNom, p.value as patientPrenom,
  CASE WHEN n1.value != '' THEN n1.value ELSE bn1.value END as auteurNom, p1.value as auteurPrenom
    from agenda_changelog as l
    left join agenda as a on a.id=l.eventID
    left join objets_data as bn on bn.toID=a.patientid and bn.typeID='" 
$name2typeID['birthname'] . "' and bn.deleted = '' and bn.outdated = ''
    left join objets_data as n on n.toID=a.patientid and n.typeID='" 
$name2typeID['lastname'] . "' and n.deleted = '' and n.outdated = ''
    left join objets_data as p on p.toID=a.patientid and p.typeID='" 
$name2typeID['firstname'] . "' and p.deleted = '' and p.outdated = ''
    left join objets_data as bn1 on bn1.toID=l.fromID and bn1.typeID='" 
$name2typeID['birthname'] . "' and bn1.deleted = '' and bn1.outdated = ''
    left join objets_data as n1 on n1.toID=l.fromID and n1.typeID='" 
$name2typeID['lastname'] . "' and n1.deleted = '' and n1.outdated = ''
    left join objets_data as p1 on p1.toID=l.fromID and p1.typeID='" 
$name2typeID['firstname'] . "' and p1.deleted = '' and p1.outdated = ''
    where " 
implode(' and '$whereLU) . "
    group by l.id, n.value, p.value, n1.value, p1.value, bn.value, bn1.value
    order by l.id desc
    limit 2000"
1
  • /controlers/logs/logsAgenda.php
"select id, txtFileName, DATE_FORMAT(txtDatetime, '%Y-%m-%d') as day, hprimIdentite, hprimExpediteur, pjNombre, archived
from inbox
where archived!='y' and mailForUserID in ('" 
$apicryptInboxMailForUserID "')
order by txtDatetime " 
$p['page']['sort'] . ", txtNumOrdre " $p['page']['sort']
1
  • /controlers/inbox/inbox.php
"select a.id as eventID, a.userid as agendaID, a.start, a.end, a.type, a.dateAdd as date, a.patientid as patientID, a.fromID, a.statut, a.absente, a.motif, TIMESTAMPDIFF(MINUTE,a.start,a.end) as duree,
  CASE WHEN n.value != '' THEN n.value ELSE bn.value END as patientNom, p.value as patientPrenom,
  CASE WHEN n1.value != '' THEN n1.value ELSE bn1.value END as auteurNom, p1.value as auteurPrenom
    from agenda as a
    left join objets_data as bn on bn.toID=a.patientid and bn.typeID='" 
$name2typeID['birthname'] . "' and bn.deleted = '' and bn.outdated = ''
    left join objets_data as n on n.toID=a.patientid and n.typeID='" 
$name2typeID['lastname'] . "' and n.deleted = '' and n.outdated = ''
    left join objets_data as p on p.toID=a.patientid and p.typeID='" 
$name2typeID['firstname'] . "' and p.deleted = '' and p.outdated = ''
    left join objets_data as bn1 on bn1.toID=a.fromID and bn1.typeID='" 
$name2typeID['birthname'] . "' and bn1.deleted = '' and bn1.outdated = ''
    left join objets_data as n1 on n1.toID=a.fromID and n1.typeID='" 
$name2typeID['lastname'] . "' and n1.deleted = '' and n1.outdated = ''
    left join objets_data as p1 on p1.toID=a.fromID and p1.typeID='" 
$name2typeID['firstname'] . "' and p1.deleted = '' and p1.outdated = ''
    where " 
implode(' and '$whereLA) . "
    group by a.id, n.value, p.value, n1.value, p1.value, bn.value, bn1.value
    order by a.id desc
    limit 2000"
1
  • /controlers/logs/logsAgenda.php
"select distinct(value) from objets_data where typeID in ('" implode("','"msSQL::cleanArray($searchTypes)) . "') and value like '" msSQL::cleanVar($_GET['term']) . "%' "
1
  • /controlers/actions/inc-ajax-getAutocompleteFormValues.php
"select trim(concat(" implode(', " ",'$concatValue) . ")) as value, trim(concat(" implode(', " ",'$concatLabel) . ")) as label, " implode(","$sel) . "
from objets_data as do
implode(" "$joinleft) . "
where do.typeID in ('" 
implode("','"msSQL::cleanArray($searchTypes)) . "') and trim(concat(" implode(', " ",'$concatLabel) . ")) like '%" msSQL::cleanVar($_GET['term']) . "%'
and d" 
msSQL::cleanVar($type) . ".value is not null
group by " 
implode(","$groupby) . " limit 25"
1
  • /controlers/actions/inc-ajax-getAutocompleteLinkType.php
"select id, txtFileName, mailHeaderInfos, txtDatetime, hprimExpediteur, hprimAllSerialize, pjNombre, pjSerializeName, archived, assoToID from inbox where id='" $_POST['mailID'] . "'"
1
  • /controlers/inbox/actions/inc-ajax-viewMail.php
"update inbox set archived='y' where id='" $match['params']['mailID'] . "' limit 1"
1
  • /controlers/inbox/actions/inc-action-suppSansClasser.php
"select txtFileName, hprimAllSerialize, pjSerializeName  from inbox where id='" $match['params']['mailID'] . "' "
1
  • /controlers/inbox/actions/inc-action-suppSansClasser.php
"update inbox set archived='c', assoToID='" $_POST['patientID'] . "' where id='" $_POST['mailID'] . "' limit 1"
1
  • /controlers/inbox/actions/inc-action-classerDansDossier.php
"select txtFileName,  pjSerializeName, hprimExpediteur  from inbox where id='" msSQL::cleanVar($_POST['mailID']) . "' "
1
  • /controlers/inbox/actions/inc-action-classerDansDossier.php
"update inbox set archived='y' where id='" msSQL::cleanVar($_POST['mailID']) . "' limit 1"
1
  • /controlers/inbox/actions/inc-action-suppInbox.php
"select txtFileName, hprimAllSerialize, pjSerializeName  from inbox where id='" msSQL::cleanVar($_POST['mailID']) . "' and archived='c' "
1
  • /controlers/inbox/actions/inc-action-suppInbox.php
"UPDATE configuration SET value = CASE name " $params " ELSE value END WHERE level='default' and name in ('" implode("','"array_keys($_POST)) . "')"
1
  • /controlers/configuration/actions/inc-ajax-configDefaultUsersParams.php
"SELECT name, value as version FROM system WHERE groupe='module'"
1
  • /controlers/configuration/actions/inc-action-configApplyUpdates.php
"UPDATE people set rank='', name=NULL, pass='' WHERE id='" $_POST['id'] . "'"
1
  • /controlers/configuration/actions/inc-ajax-configRevokeUser.php
"delete from $table where id = '$id' limit 1"
1
  • /controlers/configuration/actions/inc-ajax-configDelByPrimaryKey.php
"select count(id) from actes where details like '%$code:%'"
1
  • /controlers/configuration/actions/inc-ajax-configDelByPrimaryKey.php
"select code from actes_base where id = '" $id "' limit 1 "
1
  • /controlers/configuration/actions/inc-ajax-configDelByPrimaryKey.php
"select count(id) from objets_data where typeID='$id'"
1
  • /controlers/configuration/actions/inc-ajax-configDelByPrimaryKey.php
"select count(cat) from forms where cat='$id'"
1
  • /controlers/configuration/actions/inc-ajax-configDelByPrimaryKey.php
"select count(cat) from data_types where cat='$id'"
1
  • /controlers/configuration/actions/inc-ajax-configDelByPrimaryKey.php
"update data_types set displayOrder='" . ($k 1) . "' where name='" $v "' limit 1"
1
  • /controlers/configuration/actions/inc-ajax-fixDisplayOrder.php
"select rank from people where id = '" $_POST['id'] . "' limit 1"
1
  • /controlers/configuration/actions/inc-ajax-configGiveAdmin.php
"UPDATE system SET value='normal' WHERE name='state' and groupe='system'"
1
  • /controlers/configuration/actions/inc-action-configApplyUpdates.php
"UPDATE system SET value='maintenance' WHERE name='state' and groupe='system'"
1
  • /controlers/configuration/actions/inc-action-configApplyUpdates.php
"select distinct(fromID) from objets_data where id in ('" implode("', '"$this->_allObjetsID) . "')"
1
  • /class/msExportData.php
"select value from objets_data where typeID='" $name2typeID['birthname'] . "' and toID='" $user['id'] . "' and outdated='' and deleted='' limit 1"
1
  • /class/msUser.php
"select id, label, cat, formValues from data_types where groupe='typecs' and formType='select' order by displayOrder"
1
  • /class/msExportData.php
"insert into " self::cleanVar($table) . " (" implode(','$cols) . ") values (" implode(','$valeurs) . ") ON DUPLICATE KEY UPDATE " implode(', '$dupli) . " ;"
1
  • /class/msSQL.php
"select * from $this->_bdd.configuration where module='" $name "' and level='module'"
1
  • /class/msSqlGenerate.php
"select * from $this->_bdd.system where name='" $name "'"
1
  • /class/msSqlGenerate.php
"SELECT type, rank, pass FROM people WHERE id='" $toID "' limit 1"
1
  • /class/msPeopleDroits.php
"select " implode(', 'msSQL::cleanArray($cols)) . " from actes_base where code='" msSQL::cleanVar($this->_acteCode) . "' and type='Libre'"
1
  • /class/msReglementActe.php
"select " implode(', 'msSQL::cleanArray($cols)) . " from actes_base where code='" msSQL::cleanVar($this->_acteCode) . "' and type='NGAP' limit 1"
1
  • /class/msReglementActe.php
"select " implode(', 'msSQL::cleanArray($cols)) . " from actes_base where code='" msSQL::cleanVar($this->_acteCode) . "' and type='NGAP' and codeProf='" msSQL::cleanVar($this->_secteurTarifaireNgap) . "' limit 1"
1
  • /class/msReglementActe.php
"select " implode(', 'msSQL::cleanArray($cols)) . " from actes_base where code='" msSQL::cleanVar($this->_acteCode) . "' and  type='mCCAM'"
1
  • /class/msReglementActe.php
"select " implode(', 'msSQL::cleanArray($cols)) . " from actes_base where code='" msSQL::cleanVar($this->_acteCode) . "' and  type='CCAM' and activite='" $this->_acteActivite "' and phase='" $this->_actePhase "' limit 1"
1
  • /class/msReglementActe.php
"select type from actes_base where code='" msSQL::cleanVar($this->_acteCode) . "' and type ='NGAP' limit 1 "
1
  • /class/msReglementActe.php
"SHOW FIELDS FROM " self::cleanVar($table) . " where Field = '" self::cleanVar($field) . "'"
1
  • /class/msSQL.php
'SELECT @password:="' $mysqli->real_escape_string($p['config']['sqlVarPassword']) . '"'
1
  • /class/msSQL.php
"select * from $this->_bdd.data_types where module='" $module "' and  groupe not in ('" implode("', '"$notInGroupe) . "')"
1
  • /class/msSqlGenerate.php
"SELECT name, value AS version FROM system WHERE groupe='plugin'"
1
  • /class/msPlugins.php
"SELECT name, value AS version FROM system WHERE groupe='plugin' order by name"
1
  • /class/msPlugins.php
"SELECT name FROM system WHERE groupe='plugin' order by name"
1
  • /class/msPlugins.php
"select id, " implode(', 'msSQL::cleanArray($cols)) . " from data_cat where groupe in ('" implode(', 'msSQL::cleanArray($groupe)) . "') order by " $orderBy1
  • /class/msDataCat.php
"select label from data_cat where id = '" $id "' "
1
  • /class/msDataCat.php
"select name from data_cat where id = '" $id "' "
1
  • /class/msDataCat.php
"select id from data_cat where name = '" msSQL::cleanVar($name) . "' "
1
  • /class/msDataCat.php
"delete from posologies where id_analyse='" pg_escape_string($id_analyse) . "'"
1
  • /class/msTheriaquePG.php
"delete from prescriptions where id_analyse='" pg_escape_string($id_analyse) . "'"
1
  • /class/msTheriaquePG.php
"delete from patient where id_analyse='" pg_escape_string($id_analyse) . "'"
1
  • /class/msTheriaquePG.php
"insert into posologies (" implode(", "array_keys($poso)) . ") values (" implode(", "$poso) . ");"
1
  • /class/msTheriaquePG.php
"select internalName from $this->_bdd.forms where module='" $name "'"
1
  • /class/msSqlGenerate.php
"select * from $this->_bdd.data_cat where id in ('" implode("', '"$cat) . "')"
1
  • /class/msSqlGenerate.php
"insert into patient (" implode(", "array_keys($patient)) . ") values (" implode(", "$patient) . ");"
1
  • /class/msTheriaquePG.php
"INSERT IGNORE INTO `data_cat` " $this->_data_cat_fields " VALUES\n"
1
  • /class/msSqlGenerate.php
"select name from $this->_bdd.prescriptions_cat where id = '" $cat "' "
1
  • /class/msSqlGenerate.php
"INSERT IGNORE INTO `prescriptions_cat` " $this->_prescriptions_cat_fields " VALUES\n"
1
  • /class/msSqlGenerate.php
"INSERT IGNORE INTO `people` " $this->_people_fields " VALUES\n"
1
  • /class/msSqlGenerate.php
"INSERT IGNORE INTO `form_basic_types` " $this->_form_basic_fields " VALUES\n"
1
  • /class/msSqlGenerate.php
"INSERT IGNORE INTO `forms` " $this->_forms_fields " VALUES\n"
1
  • /class/msSqlGenerate.php
"select name from $this->_bdd.forms_cat where id = '" $cat "' "
1
  • /class/msSqlGenerate.php
"INSERT IGNORE INTO `forms_cat` " $this->_forms_cat_fields " VALUES\n"
1
  • /class/msSqlGenerate.php
"INSERT IGNORE INTO `configuration` " $this->_configuration_fields " VALUES\n"
1
  • /class/msSqlGenerate.php
"INSERT IGNORE INTO `data_types` " $this->_data_types_fields " VALUES\n"
1
  • /class/msSqlGenerate.php
"select name from $this->_bdd.data_cat where id = '" $cat "' "
1
  • /class/msSqlGenerate.php
"INSERT IGNORE INTO `actes` " $this->_actes_fields " VALUES\n"
1
  • /class/msSqlGenerate.php
"select * from $this->_bdd.actes_cat where module='" $name "'"
1
  • /class/msSqlGenerate.php
"INSERT IGNORE INTO `actes_base` " $this->_actes_base_fields " VALUES\n"
1
  • /class/msSqlGenerate.php
"INSERT IGNORE INTO `actes_cat` " $this->_actes_cat_fields " VALUES\n"
1
  • /class/msSqlGenerate.php
"select * from $this->_bdd.data_cat where id in ('" implode("', '"$cats) . "')"
1
  • /class/msSqlGenerate.php
"select * from $this->_bdd.data_types where groupe='typecs' and formValues='" $name "'"
1
  • /class/msSqlGenerate.php
"select * from $this->_bdd.data_types where name in ('" implode("', '"$matchIN[1]) . "')"
1
  • /class/msSqlGenerate.php
"select yamlStructure from $this->_bdd.forms where id='" $formID "' limit 1"
1
  • /class/msSqlGenerate.php
"select * from $this->_bdd.forms_cat where id='" $catForm "' limit 1"
1
  • /class/msSqlGenerate.php
"select * from $this->_bdd.forms where id='" $formID "' limit 1"
1
  • /class/msSqlGenerate.php
"select id from $this->_bdd.forms where internalName='" msSQL::cleanVar($name) . "' limit 1"
1
  • /class/msSqlGenerate.php
"select * from $this->_bdd.actes_base where code in ('" implode("', '"$collecteCcamNgap) . "') order by type, code"
1
  • /class/msSqlGenerate.php
"select a.* , c.name as catName
      from 
$this->_bdd.actes as a
      left join 
$this->_bdd.actes_cat as c on c.id=a.cat
      where c.module='" 
$name "' and a.toID='0'
      group by a.id"
1
  • /class/msSqlGenerate.php
"insert into prescriptions (" implode(", "array_keys($pres)) . ") values (" implode(", "$pres) . ");"
1
  • /class/msTheriaquePG.php
"delete from transmissions_to where sujetID in ('" implode("', '"$ids) . "')"
1
  • /class/msTransmissions.php
"INSERT IGNORE INTO `prescriptions` " $this->_prescriptions_fields " VALUES\n"
1
  • /class/msSqlGenerate.php
"select pd.* , t.name, t.label, t.groupe, t.formValues, t.module, t.placeholder, doc.value as ext
        from objets_data as pd
        left join data_types as t on t.id=pd.typeID
        left join objets_data as doc on doc.instance=pd.id and doc.typeID='" 
$docTypeID "'
        where pd.id='" 
$this->_ID "'"
1
  • /class/msObjet.php
"update objets_data set deleted='y', deletedByID='" $this->_fromID "' where typeID='" $typeID "' and toID='" $this->_toID "' and id < " $lastID1
  • /class/msObjet.php
"select id, fromID
          from objets_data
          where typeID = '" 
$typeID "' and toID='" $this->_toID "' and outdated = '' and deleted = ''
          order by id desc limit 1"
1
  • /class/msObjet.php
"select id
                from objets_data
                where instance='" 
$parentID "' and typeID = '" $typeID "' and deleted = ''
                order by id desc limit 1"
1
  • /class/msObjet.php
"select id, CASE WHEN DATE_ADD(creationDate, INTERVAL " $d['durationLife'] . " SECOND) > NOW() THEN '' ELSE 'y' END as outdated, fromID
              from objets_data
              where id = '" 
$objetID "' and deleted = ''
              order by id desc limit 1"
1
  • /class/msObjet.php
"select titre from objets_data where id='" $objetID "' limit 1"
1
  • /class/msObjet.php
"SELECT id from objets_data where " implode(' and '$where) . " and deleted='' and outdated='' limit 1"
1
  • /class/msObjet.php
"select id from objets_data where instance='" $this->_ID "'"
1
  • /class/msObjet.php
"update objets_data set deleted='y', deletedByID='" $this->_fromID "', updateDate=NOW() where id='" $this->_ID "' "
1
  • /class/msObjet.php
"select o.*, t.name
          from objets_data as o
          left join data_types as t on o.typeID=t.id
          where o.typeID in ('" 
implode(', '$name2typeID) . "') and o.instance='" $this->_ID "' and o.outdated='' and o.deleted='' "
1
  • /class/msObjet.php
"select o.*, t.name
        from objets_data as o
        left join data_types as t on o.typeID=t.id
        where (o.id='" 
$this->_ID "' or o.instance='" $this->_ID "') and o.outdated='' and o.deleted='' "
1
  • /class/msObjet.php
"select t.formValues
      from objets_data as pd
      left join data_types as t on t.id=pd.typeID
      where pd.id='" 
$this->_ID "' and t.groupe='typecs' limit 1"
1
  • /class/msObjet.php
"update objets_data set outdated='y' where typeID='" $typeID "' and toID='" $this->_toID "' and id < " $lastID " and instance='" $parentID "' "
1
  • /class/msObjet.php
"select " implode(', 'msSQL::cleanArray($col)) . " from objets_data where id='" $this->_ID "'"
1
  • /class/msObjet.php
"SELECT id FROM objets_data WHERE id='" $id "' limit 1"
1
  • /class/msObjet.php
"update forms set yamlStructure='" addslashes($newyaml) . "' where id='" $id "'"
1
  • /scripts/update2.3.1to3.0.0.php
"select id, yamlStructure, dataset from forms"
1
  • /scripts/update2.3.1to3.0.0.php
"INSERT IGNORE INTO `data_types` (`groupe`, `name`, `placeholder`, `label`, `description`, `validationRules`, `validationErrorMsg`, `formType`, `formValues`, `module`, `cat`, `fromID`, `creationDate`, `durationLife`, `displayOrder`) VALUES
('system', 'currentPassword', 'Mot de passe actuel', 'Mot de passe actuel', 'Mot de passe actuel de l\'utilisateur', 'required', 'Le mot de passe actuel est manquant', 'password', '', 'base', " 
$catID ", '1', '2019-01-01 00:00:00', '86400', '1'),
('system', 'date', '', 'Début de période', '', '', '', 'date', '', 'base', " 
$catID ", '1', '2019-01-01 00:00:00', '86400', '1'),
('system', 'modules', '', 'Modules', 'modules utilisables', '', '', 'select', '', 'base', " 
$catID ", '1', '2019-01-01 00:00:00', '86400', '1'),
('system', 'otpCode', 'code otp', 'code otp', 'code otp', '', 'Le code otp est manquant', 'text', '', 'base', " 
$catID ", '1', '2019-01-01 00:00:00', '86400', '1'),
('system', 'password', 'mot de passe', 'Mot de passe', 'mot de passe utilisateur', 'required', 'Le mot de passe est manquant', 'password', '', 'base', " 
$catID ", '1', '2019-01-01 00:00:00', '86400', '1'),
('system', 'submit', '', 'Valider', 'bouton submit de validation', '', '', 'submit', '', 'base', " 
$catID ", '1', '2019-01-01 00:00:00', '86400', '1'),
('system', 'templates', '', 'Templates utilisables', 'template utilisables', '', '', 'select', '', 'base', " 
$catID ", '1', '2019-01-01 00:00:00', '86400', '1'),
('system', 'username', 'nom d\'utilisateur', 'Nom d\'utilisateur', 'nom d\'utilisateur', 'required', '', 'text', '', 'base', " 
$catID ", '1', '2019-01-01 00:00:00', '86400', '1'),
('system', 'verifPassword', 'confirmation du mot de passe', 'Confirmation du mot de passe', 'Confirmation du mot de passe utilisateur', 'required', 'La confirmation du mot de passe est manquante', 'password', '', 'base', " 
$catID ", '1', '2019-01-01 00:00:00', '86400', '1');"
1
  • /scripts/jumpv5tov6.php
"SELECT data_cat.id FROM data_cat WHERE data_cat.name='catTypesUsageSystem'"
1
  • /scripts/jumpv5tov6.php
"INSERT IGNORE INTO `data_cat` (`groupe`, `name`, `label`, `description`, `type`, `fromID`, `creationDate`) VALUES
('system', 'catTypesUsageSystem', 'Types Ã  usage system', 'types Ã  usage system', 'base', 1, '2019-09-27 21:42:35')"
1
  • /scripts/jumpv5tov6.php
"UPDATE forms set dataset = 'data_types' where dataset = 'form_basic_types';"
1
  • /scripts/jumpv5tov6.php
"DELETE from `data_types` where name = 'submit'"
1
  • /scripts/jumpv5tov6.php
"UPDATE forms set `yamlStructure` = 'global:\r\n  formClass: \'form-signin\' \r\nstructure:\r\n row1:\r\n  col1: \r\n    size: 12\r\n    bloc: \r\n      - username,required,nolabel                          #1    Identifiant\n      - password,required,nolabel                          #2    Mot de passe\n      - otpCode,nolabel                                    #7    code otp\n      - submit,Connexion,class=btn-primary,class=btn-block         #3    Valider' where `internalName`='baseLogin';"
1
  • /scripts/jumpv5tov6.php
"select toID, value from objets_data where toId in ('" implode("', '"$listeID) . "') and typeID='" msData::getTypeIDFromName('mobilePhone') . "' and deleted='' and outdated='' "
1
  • /cron/rappelsSMS-allMySMS.php
"select id, CASE WHEN DATE_ADD(creationDate, INTERVAL " $d['durationLife'] . " SECOND) > NOW() THEN '' ELSE 'y' END as outdated, fromID
          from objets_data
          where typeID='" 
$typeID "'
          and toID = '" 
$this->_toID "'
          and instance = '" 
$parentID "'
          and outdated = '' and deleted = ''
          order by id desc limit 1"
1
  • /class/msObjet.php
"update objets_data set creationDate='" msSQL::cleanVar($this->_creationDate) . "' where instance='" $this->_ID "' "
1
  • /class/msObjet.php
"delete from transmissions where id in ('" implode("', '"$ids) . "')"
1
  • /class/msTransmissions.php
"select t.id, t.fromID, t.sujet, t.aboutID, t.priorite, t.updateDate, t.registerDate, t.texte, t.statut,
      CASE
        WHEN ln.value != '' and bn.value != '' THEN concat(COALESCE(ln.value,'') , ' (' , COALESCE(bn.value,'') , ') ',COALESCE(fn.value,''))
        WHEN bn.value != '' THEN concat(COALESCE(bn.value,'') , ' ' ,COALESCE(fn.value,''))
        ELSE concat(COALESCE(ln.value,'') , ' ' , COALESCE(fn.value,''))
      END as identiteAbout,
      CASE
        WHEN ln1.value != '' THEN concat(COALESCE(ln1.value,'') , ' ' , COALESCE(fn1.value,''))
        ELSE concat(COALESCE(bn1.value,'') , ' ' , COALESCE(fn1.value,''))
      END as identiteAuteur
      from transmissions as t
      left join transmissions_to as trto on t.id = trto.sujetID and trto.toID = '" 
$this->_userID "'

      left join objets_data as ln on ln.toID=t.aboutID and ln.typeID='" 
$name2typeID['lastname'] . "' and ln.outdated='' and ln.deleted=''
      left join objets_data as bn on bn.toID=t.aboutID and bn.typeID='" 
$name2typeID['birthname'] . "' and bn.outdated='' and bn.deleted=''
      left join objets_data as fn on fn.toID=t.aboutID and fn.typeID='" 
$name2typeID['firstname'] . "' and fn.outdated='' and fn.deleted=''

      left join objets_data as ln1 on ln1.toID=t.fromID and ln1.typeID='" 
$name2typeID['lastname'] . "' and ln1.outdated='' and ln1.deleted=''
      left join objets_data as bn1 on bn1.toID=t.fromID and bn1.typeID='" 
$name2typeID['birthname'] . "' and bn1.outdated='' and bn1.deleted=''
      left join objets_data as fn1 on fn1.toID=t.fromID and fn1.typeID='" 
$name2typeID['firstname'] . "' and fn1.outdated='' and fn1.deleted=''

      where t.id='" 
$this->_id "' limit 1"
1
  • /class/msTransmissions.php
"select id from transmissions where updateDate < DATE_SUB(NOW() , INTERVAL " $p['config']['transmissionsPurgerNbJours'] . " DAY)"
1
  • /class/msTransmissions.php
"select dateLecture from transmissions_to where sujetID='" $sujetID "' and toID='" $toID "' limit 1"
1
  • /class/msTransmissions.php
"update transmissions_to set statut='open' where sujetID='" $this->_sujetID "' and statut='checked' and toID != '" $this->_userID "'"
1
  • /class/msTransmissions.php
"update transmissions set updateDate=NOW() where id='" $this->_sujetID "' limit 1"
1
  • /class/msTransmissions.php
"select count(tt.sujetID) as nb, priorite from transmissions_to as tt
     left join transmissions as t on tt.sujetID = t.id
     where tt.toID = '" 
$this->_userID "' and t.statut='open' and (tt.dateLecture < t.updateDate or tt.dateLecture is null) group by priorite"
1
  • /class/msTransmissions.php
"select count(tt.sujetID) from transmissions_to as tt
     left join transmissions as t on tt.sujetID = t.id
     where tt.toID = '" 
$this->_userID "' and tt.destinataire='non' and t.statut='open' and (tt.dateLecture < t.updateDate or tt.dateLecture is null)"
1
  • /class/msTransmissions.php
"select count(tt.sujetID) from transmissions_to as tt
     left join transmissions as t on tt.sujetID = t.id
     where tt.toID = '" 
$this->_userID "' and tt.destinataire='oui' and t.statut='open' and (tt.dateLecture < t.updateDate or tt.dateLecture is null)"
1
  • /class/msTransmissions.php
"update transmissions_to set statut='open' where sujetID='" $this->_id "' and toID in ('" implode("','"$this->_toID) . "') "
1
  • /class/msTransmissions.php
"update transmissions_to set statut='deleted' where sujetID='" $this->_id "' and toID not in ('" implode("','"$this->_toID) . "') "
1
  • /class/msTransmissions.php
"select statut from transmissions_to where sujetID='" $this->_id "' and toID='" $this->_userID "' limit 1"
1
  • /class/msTransmissions.php
"select trto.toID,trto.statut, trto.dateLecture, trto.destinataire,
         CASE
          WHEN ln.value != '' THEN concat(COALESCE(ln.value,'') , ' ' , COALESCE(fn.value,''))
          ELSE concat(COALESCE(bn.value,'') , ' ' , COALESCE(fn.value,''))
         END as identiteDestinataire
         from transmissions_to as trto
         left join objets_data as ln on ln.toID=trto.toID and ln.typeID='" 
$name2typeID['lastname'] . "' and ln.outdated='' and ln.deleted=''
         left join objets_data as bn on bn.toID=trto.toID and bn.typeID='" 
$name2typeID['birthname'] . "' and bn.outdated='' and bn.deleted=''
         left join objets_data as fn on fn.toID=trto.toID and fn.typeID='" 
$name2typeID['firstname'] . "' and fn.outdated='' and fn.deleted=''
         where trto.sujetID = '" 
$sujetID "' and trto.statut != 'deleted' and destinataire='oui'
          "
1
  • /class/msTransmissions.php
"select t.id, t.texte, t.registerDate, t.fromID,
      CASE
        WHEN ln1.value != '' THEN concat(COALESCE(ln1.value,'') , ' ' , COALESCE(fn1.value,''))
        ELSE concat(COALESCE(bn1.value,'') , ' ' , COALESCE(fn1.value,''))
      END as identiteAuteur
      from transmissions as t

      left join objets_data as ln1 on ln1.toID=t.fromID and ln1.typeID='" 
$name2typeID['lastname'] . "' and ln1.outdated='' and ln1.deleted=''
      left join objets_data as bn1 on bn1.toID=t.fromID and bn1.typeID='" 
$name2typeID['birthname'] . "' and bn1.outdated='' and bn1.deleted=''
      left join objets_data as fn1 on fn1.toID=t.fromID and fn1.typeID='" 
$name2typeID['firstname'] . "' and fn1.outdated='' and fn1.deleted=''

      where t.statut = 'open' and t.sujetID='" 
$this->_sujetID "' and t.id > '" $this->_sujetID "' order by id asc "
1
  • /class/msTransmissions.php
"select pd.* , t.label, t.groupe, t.formValues, p.value as prenom,
          CASE WHEN n.value != '' THEN n.value ELSE bn.value END as nom
          from objets_data as pd
          left join data_types as t on t.id=pd.typeID
          left join objets_data as n on n.toID=pd.fromID and n.outdated='' and n.deleted='' and n.typeID='" 
$name2typeID['lastname'] . "'
          left join objets_data as p on p.toID=pd.fromID and p.outdated='' and p.deleted='' and p.typeID='" 
$name2typeID['firstname'] . "'
          left join objets_data as bn on bn.toID=pd.fromID and bn.outdated='' and bn.deleted='' and bn.typeID='" 
$name2typeID['birthname'] . "'
          where pd.toID='" 
$this->_toID "' and pd.typeID = '" $name2typeID[$name] . "' and pd.deleted='' and pd.outdated='' $where
          order by updateDate desc
          limit 1"
1
  • /class/msObjet.php
"select t.id, t.sujet, t.aboutID, t.priorite, t.updateDate, t.registerDate,
      CASE
        WHEN ln.value != '' and bn.value != '' THEN concat(COALESCE(ln.value,'') , ' (' , COALESCE(bn.value,'') , ') ',COALESCE(fn.value,''))
        WHEN bn.value != '' THEN concat(COALESCE(bn.value,'') , ' ' ,COALESCE(fn.value,''))
        ELSE concat(COALESCE(ln.value,'') , ' ' , COALESCE(fn.value,''))
      END as identiteAbout,
      CASE
        WHEN ln1.value != '' THEN concat(COALESCE(ln1.value,'') , ' ' , COALESCE(fn1.value,''))
        ELSE concat(COALESCE(bn1.value,'') , ' ' , COALESCE(fn1.value,''))
      END as identiteAuteur
      from transmissions as t
      " 
$lj "
      left join objets_data as ln on ln.toID=t.aboutID and ln.typeID='" 
$name2typeID['lastname'] . "' and ln.outdated='' and ln.deleted=''
      left join objets_data as bn on bn.toID=t.aboutID and bn.typeID='" 
$name2typeID['birthname'] . "' and bn.outdated='' and bn.deleted=''
      left join objets_data as fn on fn.toID=t.aboutID and fn.typeID='" 
$name2typeID['firstname'] . "' and fn.outdated='' and fn.deleted=''

      left join objets_data as ln1 on ln1.toID=t.fromID and ln1.typeID='" 
$name2typeID['lastname'] . "' and ln1.outdated='' and ln1.deleted=''
      left join objets_data as bn1 on bn1.toID=t.fromID and bn1.typeID='" 
$name2typeID['birthname'] . "' and bn1.outdated='' and bn1.deleted=''
      left join objets_data as fn1 on fn1.toID=t.fromID and fn1.typeID='" 
$name2typeID['firstname'] . "' and fn1.outdated='' and fn1.deleted=''

      where  " 
$where " t.statut = 'open' and t.sujetID is NULL
      " 
$groupby "
      order by t.updateDate desc
      limit 
$limitStart,$limitNumber"
1
  • /class/msTransmissions.php
"select count(*) from(select t.id
      from transmissions as t
      " 
$lj "
      where  " 
$where " t.statut = 'open' and t.sujetID is NULL
      " 
$groupbycount "
      ) as a "
1
  • /class/msTransmissions.php
"select id from objets_data where typeID='" $typeID "' and toID='" $withID "' and value='" $this->_toID "' and deleted='' limit 1"
1
  • /class/msPeopleRelations.php
"select id from objets_data where typeID='" $typeID "' and toID='" $this->_toID "' and value='" $withID "' and deleted='' limit 1"
1
  • /class/msPeopleRelations.php
"select o.value as patientID, c.value as typeRelation, p.value as prenom, d.value as ddn, CASE WHEN n.value != '' THEN n.value ELSE bn.value END as nom,
          TIMESTAMPDIFF(YEAR, STR_TO_DATE(d.value, '%d/%m/%Y'), CURDATE()) AS ageAnnees,
          TIMESTAMPDIFF(MONTH, STR_TO_DATE(d.value, '%d/%m/%Y'), CURDATE()) AS ageMois,
          TIMESTAMPDIFF(DAY, STR_TO_DATE(d.value, '%d/%m/%Y'), CURDATE()) AS ageJours
          from objets_data as o
          inner join objets_data as c on c.instance=o.id and c.typeID='" 
$name2typeID['relationPatientPatient'] . "'
          left join objets_data as n on n.toID=o.value and n.typeID='" 
$name2typeID['lastname'] . "' and n.outdated='' and n.deleted=''
          left join objets_data as bn on bn.toID=o.value and bn.typeID='" 
$name2typeID['birthname'] . "' and bn.outdated='' and bn.deleted=''
          left join objets_data as p on p.toID=o.value and p.typeID='" 
$name2typeID['firstname'] . "' and p.outdated='' and p.deleted=''
          left join objets_data as d on d.toID=o.value and d.typeID='" 
$name2typeID['birthdate'] . "' and d.outdated='' and d.deleted=''
          where o.toID='" 
$this->_toID "' and o.typeID='" $name2typeID['relationID'] . "' and o.deleted='' and o.outdated=''
          group by o.value, c.id, bn.id, n.id, p.id, d.id
          order by STR_TO_DATE(d.value, '%d/%m/%Y') desc, nom asc"
1
  • /class/msPeopleRelations.php
"select o.value as pratID, c.value as typeRelation, p.value as prenom, t.value as titre, CASE WHEN n.value != '' THEN n.value ELSE bn.value END as nom " implode(" "$champsSql) . "
        from objets_data as o
        inner join objets_data as c on c.instance=o.id and c.typeID='" 
$name2typeID['relationPatientPraticien'] . "' and c.value != 'patient'
        left join objets_data as n on n.toID=o.value and n.typeID='" 
$name2typeID['lastname'] . "' and n.outdated='' and n.deleted=''
        left join objets_data as bn on bn.toID=o.value and bn.typeID='" 
$name2typeID['birthname'] . "' and bn.outdated='' and bn.deleted=''
        left join objets_data as p on p.toID=o.value and p.typeID='" 
$name2typeID['firstname'] . "' and p.outdated='' and p.deleted=''
        left join objets_data as t on t.toID=o.value and t.typeID='" 
$name2typeID['titre'] . "' and t.outdated='' and t.deleted='' " implode(" "$tablesSql) . "
        where o.toID='" 
$this->_toID "' and o.typeID='" $name2typeID['relationID'] . "' and o.deleted='' and o.outdated='' " implode(""$notEmpty) . "
        group by o.value, c.id, bn.id, n.id, p.id, t.id" 
implode(""$groupBy) . "
        order by typeRelation = 'MT' desc, nom asc"
1
  • /class/msPeopleRelations.php
"SELECT o.*, n1.value as pratPrenom,
      CASE WHEN n2.value != '' THEN n2.value  ELSE bn.value END as pratNom
        FROM objets_data as o

        left join objets_data as n1 on n1.toID=o.fromID and n1.typeID='" 
$name2typeID['firstname'] . "' and n1.outdated='' and n1.deleted=''
        left join objets_data as n2 on n2.toID=o.fromID and n2.typeID='" 
$name2typeID['lastname'] . "' and n2.outdated='' and n2.deleted=''
        left join objets_data as bn on bn.toID=o.fromID and bn.typeID='" 
$name2typeID['birthname'] . "' and bn.outdated='' and bn.deleted=''

        WHERE o.toID = '" 
$this->_toID "' AND o.typeID = '" $typeID "' and o.instance='" $instance "'
        order by o.registerDate desc"
1
  • /class/msObjet.php
"select count(id) from objets_data as d where d.typeID='" $typeID "' and d.toID not in ('" implode("', '"$statsExclusionPatients) . "') and d.outdated='" $outdated "' and d.deleted='" $deleted "'"
1
  • /class/msObjet.php
"select p.id, p.fromID, p.toID, p.instance as parentID, p.important, p.titre, p.registerDate, t.formValues as formName, n1.value as pratPrenom,
          CASE WHEN n2.value != '' THEN n2.value  ELSE bn.value END as pratNom,

          n1b.value as patientPrenom,
          CASE WHEN n2b.value != '' and bnb.value != '' THEN CONCAT(n2b.value, ' (', bnb.value , ')')
          WHEN n2b.value != '' THEN n2b.value
          ELSE bnb.value END as patientNom

          from objets_data as p
          left join data_types as t on p.typeID=t.id
          left join objets_data as n1 on n1.toID=p.fromID and n1.typeID='" 
$name2typeID['firstname'] . "' and n1.outdated='' and n1.deleted=''
          left join objets_data as n2 on n2.toID=p.fromID and n2.typeID='" 
$name2typeID['lastname'] . "' and n2.outdated='' and n2.deleted=''
          left join objets_data as bn on bn.toID=p.fromID and bn.typeID='" 
$name2typeID['birthname'] . "' and bn.outdated='' and bn.deleted=''

          left join objets_data as n1b on n1b.toID=p.toID and n1b.typeID='" 
$name2typeID['firstname'] . "' and n1b.outdated='' and n1b.deleted=''
          left join objets_data as n2b on n2b.toID=p.toID and n2b.typeID='" 
$name2typeID['lastname'] . "' and n2b.outdated='' and n2b.deleted=''
          left join objets_data as bnb on bnb.toID=p.toID and bnb.typeID='" 
$name2typeID['birthname'] . "' and bnb.outdated='' and bnb.deleted=''

          where p.typeID ='" 
$name2typeID[$name] . "' and p.outdated='' and p.deleted=''
          group by p.id, bn.value, n1.value, n2.value, bnb.value, n1b.value, n2b.value
          order by p.creationDate desc
          limit " 
$start "," $limit
1
  • /class/msObjet.php
"select pd.id, pd.creationDate
        from objets_data as pd
        where pd.toID='" 
$this->_toID "' and pd.typeID = '" $name2typeID[$name] . "' and pd.deleted='' and pd.outdated=''
        order by  pd.creationDate"
1
  • /class/msObjet.php
"select pd.value
          from objets_data as pd
          where pd.toID='" 
$this->_toID "' and pd.typeID = '" $name2typeID[$name] . "' and pd.deleted='' and pd.outdated='' $where
          order by updateDate desc
          limit 1"
1
  • /class/msObjet.php
"select * from $this->_bdd.prescriptions_cat where id in ('" implode("', '"$cats) . "')"
1
  • /class/msModBaseSqlGenerate.php
"SELECT module, formValues as reglementForm FROM data_types WHERE id=" $_POST['porteur']
1
  • /controlers/compta/actions/inc-action-saveReglementForm.php
"select p.*, ald.value as ald
          from objets_data as p
          left join objets_data as ald on p.id=ald.instance and ald.typeID='" 
$name2typeID['ordoLigneOrdoALDouPas'] . "' and ald.outdated='' and ald.deleted=''
          where p.instance='" 
$this->_objetID "' and p.outdated='' and p.deleted=''
          group by p.id, ald.value
          order by p.id asc"
1
  • /class/msPDF.php
"select instance from objets_data where typeID='" $name2typeID['lapMedicamentSpecialiteCodeTheriaque'] . "' and toID='" $this->_toID "' and fromID='" $this->_fromID "' and value='" msSQL::cleanVar($this->_speThe) . "' order by id desc limit 1"
1
  • /class/msLapPrescription.php
"select * from objets_data where instance='" $this->_ordonnanceID "' and typeID='" $name2typeID['lapLignePrescription'] . "' order by id"
1
  • /class/msLapOrdo.php
"select o.*, CASE WHEN n.value != '' THEN n.value ELSE bn.value END as nom, p.value as prenom
      from objets_data as o
      left join objets_data as n on n.toID=o.fromID and n.typeID='" 
$name2typeID['lastname'] . "' and n.outdated='' and n.deleted=''
      left join objets_data as p on p.toID=o.fromID and p.typeID='" 
$name2typeID['firstname'] . "' and p.outdated='' and p.deleted=''
      left join objets_data as bn on bn.toID=o.fromID and bn.typeID='" 
$name2typeID['birthname'] . "' and bn.outdated='' and bn.deleted=''
      where o.id='" 
$this->_ordonnanceID "'
      group by  o.id, n.id, p.id, bn.id order by o.id desc"
1
  • /class/msLapOrdo.php
"update dicomTags set dicomCodeMeaning='" $v['clefReadabled'] . "' where where dicomTag='" $k "'"
1
  • /class/msDicomSR.php
"select dicomTag from dicomTags where dicomTag='" $k "' limit 1"
1
  • /class/msDicomSR.php
"select value from objets_data where id='" $idLignePres "'  limit 1"
1
  • /class/msLapPrescription.php
"select value from objets_data where id='" $idLigneMedic "'  limit 1"
1
  • /class/msLapPrescription.php
"select instance from objets_data where id='" $idLigneMedic "'  limit 1"
1
  • /class/msLapPrescription.php
"select instance from objets_data where typeID='" $name2typeID['lapMedicamentSpecialiteCodeTheriaque'] . "' and value='" msSQL::cleanVar($this->_speThe) . "' order by id desc limit 1"
1
  • /class/msLapPrescription.php
"select instance from objets_data where typeID='" $name2typeID['lapMedicamentSpecialiteCodeTheriaque'] . "' and fromID='" $this->_fromID "' and value='" msSQL::cleanVar($this->_speThe) . "' order by id desc limit 1"
1
  • /class/msLapPrescription.php
"select * from actes_base where type = 'mCCAM' "
1
  • /class/msReglement.php
"select * from objets_data where instance in (" implode(','array_column($lignes'id')) . ") and typeID='" $name2typeID['lapLigneMedicament'] . "' order by id"
1
  • /class/msLapOrdo.php
"select *
        from actes_base
        where (code like '" 
msSQL::cleanVar($search) . "' or label like '%" msSQL::cleanVar($search) . "') and ((type='NGAP' and codeProf='" msSQL::cleanVar($this->_secteurTarifaireNgap) . "') or type in ('CCAM', 'Libre'))
        order by code = '" 
msSQL::cleanVar($searcho) . "' desc, code like '" msSQL::cleanVar($search) . "' desc
        limit 25"
1
  • /class/msReglement.php
"select id, label, details, flagCmu from actes where id='" $this->_factureTypeID "' limit 1"
1
  • /class/msReglement.php
"select typeID, value from objets_data where id='" $this->_objetID "' or instance='" $this->_objetID "'"
1
  • /class/msReglement.php
"select parentTypeID from objets_data where id='" $this->_objetID "' limit 1 "
1
  • /class/msReglement.php
"select a.* , c.label as catLabel
        from actes as a
        left join actes_cat as c on c.id=a.cat
        where a.toID in ('0','" 
$this->_userID "') and c.module='" $this->_module "' and a.active='oui'
        group by a.id
        order by c.displayOrder, c.label asc, a.label asc"
1
  • /class/msReglement.php
"SELECT dt.module AS module, dt.formValues AS form, dt.id as porteur, dt.fromID AS userID
        FROM data_types as dt
        LEFT JOIN objets_data as od ON dt.id=od.typeID
        WHERE od.id='" 
$objetID "' limit 1"
1
  • /class/msReglement.php
"INSERT IGNORE INTO `system` " $this->_system_fields " VALUES\n"
1
  • /class/msSqlGenerate.php
"select value from objets_data where typeID='" msData::getTypeIDFromName('docOrigine') . "' and instance='" $this->_objetID "' limit 1"
1
  • /class/msStockage.php
"select value from objets_data where instance='" $this->_objetID "' and typeID='" $docTypeID "' limit 1"
1
  • /class/msStockage.php
"select pd.*
    from objets_data as pd
    where pd.typeID = '" 
$name2typeID['lapSamCommentaire'] . "' and pd.toID = '" $this->_toID "' and pd.fromID = '" $this->_fromID "' and pd.instance='" $porteur['id'] . "' and pd.deleted='' and pd.outdated=''
    order by updateDate desc
    limit 1"
1
  • /class/msLapSAM.php
"select * from $this->_bdd.configuration where module in ('','base') and level='default'"
1
  • /class/msModBaseSqlGenerate.php
"select o.*, CASE WHEN n.value != '' THEN n.value ELSE bn.value END as nom, p.value as prenom, month(o.registerDate) as mois
      from objets_data as o
      left join objets_data as n on n.toID=o.fromID and n.typeID='" 
$name2typeID['lastname'] . "' and n.outdated='' and n.deleted=''
      left join objets_data as p on p.toID=o.fromID and p.typeID='" 
$name2typeID['firstname'] . "' and p.outdated='' and p.deleted=''
      left join objets_data as bn on bn.toID=o.fromID and bn.typeID='" 
$name2typeID['birthname'] . "' and bn.outdated='' and bn.deleted=''
      where o.typeID='" 
$name2typeID['lapOrdonnance'] . "' and o.toID='" $this->_toID "' and o.deleted='' and o.outdated='' and YEAR(o.registerDate) = '" msSQL::cleanVar($annee) . "'
      group by  o.id, n.id, p.id, bn.id order by o.id desc"
1
  • /class/msLapOrdo.php
"delete from transmissions_to where sujetID='" $tran "'"
1
  • /class/msPeopleDestroy.php
"select p.*
        from prescriptions as p
        left join prescriptions_cat as c on c.id=p.cat
        where p.fromID = '" 
$this->_fromID "' and c.type='lap'
        group by p.id
        order by c.label asc, p.label asc"
1
  • /class/msLapOrdo.php
"delete from printed where toID='" $this->_toID "'"
1
  • /class/msPeopleDestroy.php
"delete from objets_data where toID='" $this->_toID "'"
1
  • /class/msPeopleDestroy.php
"select p.id
    from objets_data as p
    left join data_types as t on p.typeID=t.id
    where (t.groupe in ('typeCS', 'courrier')
      or (t.groupe = 'doc' and  t.id='" 
$name2typeID['docPorteur'] . "')
      or (t.groupe = 'ordo' and  t.id in ('" 
implode("','"$porteursOrdoIds) . "'))
      or (t.groupe = 'ordo' and  t.id='" 
$name2typeID['lapOrdonnance'] . "')
      or (t.groupe = 'reglement' and  t.id in ('" 
implode("','"$porteursReglementIds) . "'))
      or (t.groupe='mail' and t.id='" 
$name2typeID['mailPorteur'] . "' and p.instance='0'))
      and p.toID='" 
$this->_toID "'"
1
  • /class/msPeopleDestroy.php
"delete from inbox where assoToID='" $this->_toID "'"
1
  • /class/msPeopleDestroy.php
"select txtFileName, YEAR(txtDatetime) as annee from inbox where assoToID='" $this->_toID "'"
1
  • /class/msPeopleDestroy.php
"delete from hprim where toID='" $this->_toID "'"
1
  • /class/msPeopleDestroy.php
"delete from agenda where patientid='" $this->_toID "'"
1
  • /class/msPeopleDestroy.php
"delete from agenda_changelog where eventID in ('" implode("', '"$rdv) . "')"
1
  • /class/msPeopleDestroy.php
"delete from transmissions where sujetID='" $tran "' or id='" $tran "'"
1
  • /class/msPeopleDestroy.php
"select id from agenda where patientid='" $this->_toID "'"
1
  • /class/msPeopleDestroy.php
"select c.*, count(p.id) as enfants
             from prescriptions_cat as c
             left join prescriptions as p on c.id=p.cat
       where c.type='lap' and c.fromID = '" 
$this->_fromID "'
             group by c.id
             order by c.displayOrder asc, c.label asc"
1
  • /class/msLapOrdo.php
"select lp.id, lp.value
          from objets_data as lp
          left join objets_data as chro on chro.instance=lp.id and chro.typeID='" 
$name2typeID['lapLignePrescriptionIsChronique'] . "'
          left join objets_data as dfe on dfe.instance=lp.id and dfe.typeID='" 
$name2typeID['lapLignePrescriptionDatePriseFinEffective'] . "'

          left join objets_data as re on re.value=lp.id and re.typeID='" 
$name2typeID['lapLignePrescriptionRenouvelle'] . "'

          where lp.typeID='" 
$name2typeID['lapLignePrescription'] . "' and lp.toID='" $this->_toID "' and lp.outdated='' and lp.deleted='' and chro.value='true' and re.value is null
          and (STR_TO_DATE(dfe.value, '%d/%m/%Y') > CURDATE() or dfe.value is null)
          "
1
  • /class/msLapOrdo.php
"select id, value, instance from objets_data where typeID='" $name2typeID['lapLigneMedicament'] . "' and instance in (" implode(','array_column($lignesPres'id')) . ") and outdated='' and deleted='' "
1
  • /class/msLapOrdo.php
"select lp.id, lp.value, dfe.value as dfe, lp.instance as ordonnanceID
        from objets_data as lp
        left join objets_data as dd on dd.instance=lp.id and dd.typeID='" 
$name2typeID['lapLignePrescriptionDatePriseDebut'] . "'
        left join objets_data as df on df.instance=lp.id and df.typeID='" 
$name2typeID['lapLignePrescriptionDatePriseFinAvecRenouv'] . "'
        left join objets_data as dfe on dfe.instance=lp.id and dfe.typeID='" 
$name2typeID['lapLignePrescriptionDatePriseFinEffective'] . "'
        where lp.typeID='" 
$name2typeID['lapLignePrescription'] . "' and lp.toID='" $this->_toID "' and lp.outdated='' and lp.deleted=''
        and (YEAR(STR_TO_DATE(dd.value, '%d/%m/%Y')) = '" 
msSQL::cleanVar($year) . "'
        or YEAR(STR_TO_DATE(df.value, '%d/%m/%Y')) = '" 
msSQL::cleanVar($year) . "'
        or YEAR(STR_TO_DATE(dfe.value, '%d/%m/%Y')) = '" 
msSQL::cleanVar($year) . "')
        "
1
  • /class/msLapOrdo.php
"select YEAR(STR_TO_DATE(dd.value, '%d/%m/%Y')) as dd, YEAR(STR_TO_DATE(df.value, '%d/%m/%Y')) as df, YEAR(STR_TO_DATE(dfe.value, '%d/%m/%Y')) as dfe
        from objets_data as lp
        left join objets_data as dd on dd.instance=lp.id and dd.typeID='" 
$name2typeID['lapLignePrescriptionDatePriseDebut'] . "'
        left join objets_data as df on df.instance=lp.id and df.typeID='" 
$name2typeID['lapLignePrescriptionDatePriseFinAvecRenouv'] . "'
        left join objets_data as dfe on dfe.instance=lp.id and dfe.typeID='" 
$name2typeID['lapLignePrescriptionDatePriseFinEffective'] . "'
        where lp.typeID='" 
$name2typeID['lapLignePrescription'] . "' and lp.toID='" $this->_toID "' and lp.outdated='' and lp.deleted=''
        "
1
  • /class/msLapOrdo.php
"SELECT id from objets_data where typeID='" $porteurRelationID "' and value='" $this->_toID "'"
1
  • /class/msPeopleDestroy.php
"DELETE from objets_data where id='" $id "' or instance='" $id "'"
1
  • /class/msPeopleDestroy.php
"select * from $this->_bdd.forms_cat where name='formsProdOrdoEtDoc' limit 1"
1
  • /class/msModBaseSqlGenerate.php
"select distinct(YEAR(registerDate)) as annee from objets_data where toID='" $this->_toID "' and typeID='" $name2typeID['lapOrdonnance'] . "' order by annee desc"
1
  • /class/msLapOrdo.php
"select id, value, instance from objets_data where typeID='" $name2typeID['lapLigneMedicament'] . "' and instance in (" implode(','array_column($lignesPresTTponct'id')) . ") and outdated='' and deleted='' "
1
  • /class/msLapOrdo.php
"select lp.id, lp.value
          from objets_data as lp
          left join objets_data as dd on dd.instance=lp.id and dd.typeID='" 
$name2typeID['lapLignePrescriptionDatePriseDebut'] . "'
          left join objets_data as df on df.instance=lp.id and df.typeID='" 
$name2typeID['lapLignePrescriptionDatePriseFinAvecRenouv'] . "'
          left join objets_data as dfe on dfe.instance=lp.id and dfe.typeID='" 
$name2typeID['lapLignePrescriptionDatePriseFinEffective'] . "'

          left join objets_data as re on re.value=lp.id and re.typeID='" 
$name2typeID['lapLignePrescriptionRenouvelle'] . "'

          where lp.typeID='" 
$name2typeID['lapLignePrescription'] . "' and lp.toID='" $this->_toID "' and lp.outdated='' and lp.deleted='' and re.value is null " $whereExclu "
          and STR_TO_DATE(dd.value, '%d/%m/%Y') <= CURDATE()
          and STR_TO_DATE(df.value, '%d/%m/%Y') >= CURDATE()
          and (STR_TO_DATE(dfe.value, '%d/%m/%Y') > CURDATE() or dfe.value is null)
          "
1
  • /class/msLapOrdo.php
"select id, value, instance from objets_data where typeID='" $name2typeID['lapLigneMedicament'] . "' and instance in (" implode(','array_column($lignesPresTTchro'id')) . ") and outdated='' and deleted='' "
1
  • /class/msLapOrdo.php
"select p.value as prenom, CASE WHEN n.value != '' THEN n.value ELSE bn.value END as nom, o.id as objetID, DATE_FORMAT(o.registerDate, '%d/%m/%Y %H:%i') as date, o.toID as patientID
      from objets_data as o
      left join objets_data as n on n.toID=o.toID and n.typeID='" 
$name2typeID['lastname'] . "' and n.outdated='' and n.deleted=''
      left join objets_data as bn on bn.toID=o.toID and bn.typeID='" 
$name2typeID['birthname'] . "' and bn.outdated='' and bn.deleted=''
      left join objets_data as p on p.toID=o.toID and p.typeID='" 
$name2typeID['firstname'] . "' and p.outdated='' and p.deleted=''
      where o.typeID = '" 
$name2typeID['lapSamDisabled'] . "' and o.instance='" $porteur['id'] . "' and o.deleted='' and o.outdated='' and o.fromID='" $this->_fromID "'
      "
1
  • /class/msLapSAM.php
"select pd.id
      from objets_data as pd
      where pd.typeID = '" 
$name2typeID['lapSamDisabled'] . "' and pd.toID = '" $this->_toID "' and pd.fromID = '" $this->_fromID "' and pd.instance = '" $porteurID "' and pd.deleted='' and pd.outdated=''
      order by updateDate desc
      limit 1"
1
  • /class/msLapSAM.php
"select pd.id
      from objets_data as pd
      where pd.typeID = '" 
$name2typeID['lapSamDisabled'] . "' and pd.toID = '" $this->_toID "' and pd.fromID = '" $this->_fromID "' and pd.deleted='' and pd.outdated=''
      order by updateDate desc
      limit 1"
1
  • /class/msLapSAM.php
"select toID from objets_data where typeID='" $name2typeID['postalCodePerso'] . "' and value = '" $hprimData['cp'] . "' and outdated='' and deleted=''"
1
  • /class/msHprim.php
"select *
      from agenda
      where patientid='" 
$this->_patientID "' and start >= '" $this->_startDate "' and start <='" $this->_endDate "' and statut = 'actif' " $whereIn "
      order by start asc limit 
$limit"
1
  • /class/msAgenda.php
"select DATE_FORMAT(start, '%Y %m %d - %H:%i') as start, DATE_FORMAT(start, '%Y%m%d') as dateJump, DATE_FORMAT(start, '%Y-%m-%dT%TZ') as dateiso, type, statut, absente, motif, userid as agendaID from agenda where patientid='" $this->_patientID "' order by start desc limit $limit"
1
  • /class/msAgenda.php
"select count(id) from agenda where patientid='" $this->_patientID "' and absente='oui'"
1
  • /class/msAgenda.php
"select count(id) from agenda where patientid='" $this->_patientID "' and statut='deleted'"
1
  • /class/msAgenda.php
"select count(id) from agenda where patientid='" $this->_patientID "' and statut!='deleted' and  absente!='oui'"
1
  • /class/msAgenda.php
"select count(id) from agenda where patientid='" $this->_patientID "'"
1
  • /class/msAgenda.php
"select a.id, a.start, a.end, a.type, a.patientid, a.externid, a.statut, a.absente, a.attente, a.fromID, a.motif, CASE WHEN n.value != '' THEN concat(n.value, ' ', p.value) ELSE concat(bn.value, ' ', p.value) END as name
          from agenda as a
          left join objets_data as n on n.toID=a.patientid and n.outdated='' and n.deleted='' and n.typeID='" 
$name2typeID['lastname'] . "'
          left join objets_data as bn on bn.toID=a.patientid and bn.outdated='' and bn.deleted='' and bn.typeID='" 
$name2typeID['birthname'] . "'
          left join objets_data as p on p.toID=a.patientid and p.outdated='' and p.deleted='' and p.typeID='" 
$name2typeID['firstname'] . "'
          where a.id= '" 
$this->_eventID "'
          group by a.id, bn.value, n.value, p.value"
1
  • /class/msAgenda.php
"select a.*
        from agenda as a
        where a.id= '" 
$this->_eventID "'
        limit 1"
1
  • /class/msAgenda.php
"select a.id, a.start, a.end, a.lastModified, a.type, a.patientid, a.externid, a.statut, a.absente, a.attente, a.motif, a.fromID, CASE WHEN n.value != '' THEN concat(n.value, ' ', p.value) ELSE concat(bn.value, ' ', p.value) END as name
          from agenda as a
          left join objets_data as n on n.toID=a.patientid and n.outdated='' and n.deleted='' and n.typeID='" 
$name2typeID['lastname'] . "'
          left join objets_data as bn on bn.toID=a.patientid and bn.outdated='' and bn.deleted='' and bn.typeID='" 
$name2typeID['birthname'] . "'
          left join objets_data as p on p.toID=a.patientid and p.outdated='' and p.deleted='' and p.typeID='" 
$name2typeID['firstname'] . "'
          where a.userid='" 
$this->_userID "' and a.statut in ('" implode("','"msSQL::cleanArray($statut)) . "') and a.start >= '" msSQL::cleanVar($this->_startDate) . "' and a.end <= '" msSQL::cleanVar($this->_endDate) . "'
          group by a.id, bn.value, n.value, p.value order by a.start asc"
1
  • /class/msAgenda.php
"select toID from objets_data where typeID='" $name2typeID['nss'] . "' and value = '" $hprimData['nss'] . "' and outdated='' and deleted=''"
1
  • /class/msHprim.php
"UPDATE agenda set attente='non' where attente='oui' and end < DATE_SUB(NOW(), INTERVAL 2 HOUR) and DATE(start) > DATE_SUB(NOW(), INTERVAL 3 DAY )"
1
  • /class/msAgenda.php
"select toID from objets_data where typeID='" $name2typeID['birthdate'] . "' and value = '" $hprimData['ddn'] . "' and outdated='' and deleted=''"
1
  • /class/msHprim.php
"select toID from objets_data where typeID='" $name2typeID['firstname'] . "' and value like '" $hprimData['prenom'] . "' and outdated='' and deleted=''"
1
  • /class/msHprim.php
"select toID from objets_data where typeID in ('" $name2typeID['lastname'] . "', '" $name2typeID['birthname'] . "') and value like '" $hprimData['nom'] . "' and outdated='' and deleted='' "
1
  • /class/msHprim.php
"select ald.value as ald, p.value as description, p.typeID, p.id
      from objets_data as p
      left join objets_data as ald on p.id=ald.instance and ald.typeID='" 
$name2typeID['ordoLigneOrdoALDouPas'] . "' and ald.outdated='' and ald.deleted=''
      where p.instance='" 
$this->_objetID "' and p.outdated='' and p.deleted='' and p.typeID in ('" $name2typeID['ordoTypeImpression'] . "','" $name2typeID['ordoLigneOrdo'] . "')
      group by p.id, ald.id
      order by p.id asc"
1
  • /class/msModBaseObjetPreview.php
"SELECT * FROM actes WHERE id=(SELECT parentTypeID FROM objets_data WHERE id='" $this->_objetID "')"
1
  • /class/msModBaseObjetPreview.php
"SELECT dt.formValues AS form FROM data_types as dt
    LEFT JOIN objets_data as od ON dt.id=od.typeID WHERE od.id='" 
$this->_objetID "' limit 1"
1
  • /class/msModBaseObjetPreview.php
"SHOW CREATE TABLE $this->_bdd." msSQL::cleanVar($t)
1
  • /class/msSqlGenerate.php
"select * from $this->_bdd.system where name='state' and groupe='system' limit 1"
1
  • /class/msModBaseSqlGenerate.php
"select * from $this->_bdd.people where type='service' and module='base'"
1
  • /class/msModBaseSqlGenerate.php
"select * from $this->_bdd.prescriptions where label='Ligne vierge'"
1
  • /class/msModBaseSqlGenerate.php
"UPDATE agenda set attente='non' where patientid='" $this->_patientID "' and attente='oui' and DATE(start)=DATE(NOW())"
1
  • /class/msAgenda.php
"select a.id, a.type, a.patientid, CASE WHEN n.value != '' THEN concat(n.value, ' ', p.value) ELSE concat(bn.value, ' ', p.value) END as name, DATE_FORMAT(a.start, '%H:%i') as heure, YEAR(a.start) as annee, WEEKOFYEAR(a.start) as semaine,  DAYOFWEEK(a.start) as joursemaine, DATE_FORMAT(a.end, '%d/%m/%Y') as datejour, tel.value as homePhone, mob.value as mobilePhone
      from agenda as a
      left join objets_data as n on n.toID=a.patientid and n.outdated='' and n.deleted='' and n.typeID='" 
$name2typeID['lastname'] . "'
      left join objets_data as bn on bn.toID=a.patientid and bn.outdated='' and bn.deleted='' and bn.typeID='" 
$name2typeID['birthname'] . "'
      left join objets_data as p on p.toID=a.patientid and p.outdated='' and p.deleted='' and p.typeID='" 
$name2typeID['firstname'] . "'
      left join objets_data as tel on tel.toID=a.patientid and tel.outdated='' and tel.deleted='' and tel.typeID='" 
$name2typeID['homePhone'] . "'
      left join objets_data as mob on mob.toID=a.patientid and mob.outdated='' and mob.deleted='' and mob.typeID='" 
$name2typeID['mobilePhone'] . "'
      where a.userid='" 
$this->_userID "' and a.statut = 'actif' and a.start >= '" msSQL::cleanVar($this->_startDate) . "' and a.end <= '" msSQL::cleanVar($this->_endDate) . "'
      group by a.id, bn.value, n.value, p.value, tel.value, mob.value order by a.start asc"
1
  • /class/msAgenda.php
"select pd.*
    from objets_data as pd
    where pd.typeID = '" 
$name2typeID['lapSam'] . "' and pd.value='" msSQL::cleanVar($this->_samID) . "' and pd.deleted='' and pd.outdated=''
    order by updateDate desc
    limit 1"
1
  • /class/msLapSAM.php
"SELECT cat, type, name, value, description FROM configuration WHERE level='default' order by name"
1
  • /class/msConfiguration.php
"INSERT INTO configuration (name, level, toID, value) VALUES ('" msSQL::cleanVar($name) . "', 'user', '" msSQL::cleanVar($userID) . "', '" msSQL::cleanVar($value) . "')
        ON DUPLICATE KEY UPDATE value='" 
$value "'"
1
  • /class/msConfiguration.php
"INSERT INTO configuration (name, level, toID, value) VALUES ('" msSQL::cleanVar($name) . "', 'user', '" msSQL::cleanVar($userID) . "', HEX(AES_ENCRYPT('" msSQL::cleanVar($value) . "',@password)))
            ON DUPLICATE KEY UPDATE value=HEX(AES_ENCRYPT('" 
$value "',@password))"
1
  • /class/msConfiguration.php
"SELECT c.toID, c.value, CASE WHEN o.value != '' THEN concat(o2.value , ' ' , o.value) ELSE concat(o2.value , ' ' , bn.value) END as identite
        FROM configuration as c
        left join objets_data as o on o.toID=c.toID and o.typeID='" 
$name2typeID['lastname'] . "' and o.outdated='' and o.deleted=''
        left join objets_data as bn on bn.toID=c.toID and bn.typeID='" 
$name2typeID['birthname'] . "' and bn.outdated='' and bn.deleted=''
        left join objets_data as o2 on o2.toID=c.toID and o2.typeID='" 
$name2typeID['firstname'] . "' and o2.outdated='' and o2.deleted=''
        WHERE name='" 
msSQL::cleanVar($name) . "' AND level='user'"
1
  • /class/msConfiguration.php
"SELECT distinct(cat) as cat FROM configuration ORDER BY cat"
1
  • /class/msConfiguration.php
"SELECT value FROM configuration WHERE name='" msSQL::cleanVar($name) . "' AND level='user' AND toID='" $userID "'"
1
  • /class/msConfiguration.php
"SELECT CONVERT(AES_DECRYPT(UNHEX(value),@password), CHAR) FROM configuration
            WHERE name='" 
msSQL::cleanVar($name) . "' AND level='user' AND toID='" $userID "'"
1
  • /class/msConfiguration.php
"select * from $this->_bdd.data_cat where type='base'"
1
  • /class/msModBaseSqlGenerate.php
"SELECT level, value FROM configuration WHERE name='" msSQL::cleanVar($name) . "' AND
                ((level='user' AND toID='" 
msSQL::cleanVar($user['id']) . "') OR (level='module' AND module='" msSQL::cleanVar($user['module']) . "') OR level='default')"
1
  • /class/msConfiguration.php
"SELECT level, CONVERT(AES_DECRYPT(UNHEX(value),@password), CHAR) AS value FROM configuration WHERE name='" msSQL::cleanVar($name) . "' AND
                ((level='user' AND toID='" 
msSQL::cleanVar($user['id']) . "') OR (level='module' AND module='" msSQL::cleanVar($user['module']) . "') OR level='default')"
1
  • /class/msConfiguration.php
"SELECT CONVERT(AES_DECRYPT(UNHEX('" $v['value'] . "'),@password), CHAR)"
1
  • /class/msConfiguration.php
"SELECT name, cat, type, value FROM configuration
            WHERE level='default' AND name IN ('" 
implode("','"array_keys($userParams)) . "')"
1
  • /class/msConfiguration.php
"SELECT name, value FROM configuration WHERE level='user' AND toID='" $userID "' order by name"
1
  • /class/msConfiguration.php
"SELECT name, value FROM configuration
            WHERE level='user' AND toID='" 
$user['id'] . "' AND name IN ('" implode("','"array_keys($defaultParams)) . "')"
1
  • /class/msConfiguration.php
"SELECT name, value FROM configuration
          WHERE level='module' AND module='" 
msSQL::cleanVar($user['module']) . "' AND name IN ('" implode("','"array_keys($defaultParams)) . "')"
1
  • /class/msConfiguration.php
"SELECT name, value FROM configuration WHERE level='default' AND cat='" msSQL::cleanVar($cat) . "'"
1
  • /class/msConfiguration.php
"SELECT name, value FROM configuration WHERE level='user' AND toID='" $user['id'] . "'"
1
  • /class/msConfiguration.php
"SELECT name, value FROM configuration WHERE level='module' AND module='" msSQL::cleanVar($user['module']) . "'"
1
  • /class/msConfiguration.php
"SELECT name, value FROM configuration WHERE level='default'"
1
  • /class/msConfiguration.php
"SELECT cat, name, type, description FROM configuration WHERE level in ('default', 'module') ORDER BY cat, name"
1
  • /class/msConfiguration.php
"SELECT cat, type, name, value, description FROM configuration WHERE level='module' and module='" msSQL::cleanVar($module) . "'"
1
  • /class/msConfiguration.php
"SELECT value FROM configuration WHERE name='" msSQL::cleanVar($name) . "' AND level='default'"
1
  • /class/msConfiguration.php
"select id from transmissions where aboutID='" $this->_toID "'"
1
  • /class/msPeopleDestroy.php
"select p.id, p.rank, o2.value as prenom, CASE WHEN o.value != '' THEN o.value  ELSE bn.value END as nom
 from people as p
 left join objets_data as o on o.toID=p.id and o.typeID='" 
$name2typeID['lastname'] . "' and o.outdated='' and o.deleted=''
 left join objets_data as o2 on o2.toID=p.id and o2.typeID='" 
$name2typeID['firstname'] . "' and o2.outdated='' and o2.deleted=''
 left join objets_data as bn on bn.toID=p.id and bn.typeID='" 
$name2typeID['birthname'] . "' and bn.outdated='' and bn.deleted=''
 where p.id in ('" 
implode("','"$pratIdAutorises) . "') order by p.id"
2
  • /controlers/compta/compta.php
  • /controlers/compta/today.php
"select toID, value from objets_data where toId in ('" implode("', '"$listeID) . "') and typeID='" msData::getTypeIDFromName('personalEmail') . "' and deleted='' and outdated='' "
2
  • /cron/rappelsMails.php
  • /cron/rappelsMails-Mailjet.php
"select id, label from prescriptions_cat where type='nonlap' order by label"
2
  • /controlers/user/actions/inc-ajax-userParametersPrescriptionsList.php
  • /controlers/configuration/configPrescriptions.php
"delete from objets_data where instance='" $postObjetId "' and typeID='" msData::getTypeIDFromName('ordoLigneOrdoALDouPas') . "' "
2
  • /controlers/patient/actions/inc-ajax-saveOrdoForm.php
  • /controlers/patient/actions/inc-action-saveOrdoForm.php
"select id from people where name='" msSQL::cleanVar($_SERVER['PHP_AUTH_USER']) . "'"
2
  • /controlers/rest/inc-rest-getPatientInfo.php
  • /controlers/rest/inc-rest-uploadNewDoc.php
"SELECT COUNT(*) FROM people WHERE type='pro'"
2
  • /controlers/login/logInFirstDo.php
  • /controlers/login/logInFirst.php
"select toID, fromID from objets_data where id='" $this->_objetID "' limit 1"
2
  • /class/msStockage.php
  • /class/msStockage.php
"SELECT type FROM people WHERE id='" $this->_toID "' limit 1"
2
  • /class/msPeople.php
  • /class/msPeople.php
"select count(cat) from actes where cat='$id'"
2
  • /controlers/user/actions/inc-ajax-userParametersDelByPrimaryKey.php
  • /controlers/configuration/actions/inc-ajax-configDelByPrimaryKey.php
"select * from $table where id = '$id' limit 1"
2
  • /controlers/user/actions/inc-ajax-userParametersExtractByPrimaryKey.php
  • /controlers/configuration/actions/inc-ajax-configExtractByPrimaryKey.php
"select count(cat) from prescriptions where cat='$id'"
2
  • /controlers/user/actions/inc-ajax-userParametersDelByPrimaryKey.php
  • /controlers/configuration/actions/inc-ajax-configDelByPrimaryKey.php
"select value from objets_data where toID='" $this->_toID "' and typeID='" $typeID "' and deleted!='y' and outdated!='y' order by id desc limit 1"
3
  • /class/msPeople.php
  • /class/msPeople.php
  • /class/msPeople.php
"SELECT value FROM system WHERE groupe='lock' and name='clicRDV'"
4
  • /class/msClicRDV.php
  • /class/msClicRDV.php
  • /class/msClicRDV.php
  • /class/msClicRDV.php
"SELECT id FROM people WHERE name='clicRDV'"
4
  • /class/msClicRDV.php
  • /class/msClicRDV.php
  • /class/msClicRDV.php
  • /class/msClicRDV.php
"select count(id) from objets_data where parentTypeID='$id'"
4
  • /controlers/user/actions/inc-ajax-userParametersDelByPrimaryKey.php
  • /controlers/user/actions/inc-ajax-userParametersDelByPrimaryKey.php
  • /controlers/configuration/actions/inc-ajax-configDelByPrimaryKey.php
  • /controlers/configuration/actions/inc-ajax-configDelByPrimaryKey.php