/**
  * Tell whether object has a document with the same name has this one
  * 
  * @param CMbObject $object Object to test with
  * 
  * @return boolean
  */
 function existsFor(CMbObject $object)
 {
     $ds = $this->_spec->ds;
     $doc = new CCompteRendu();
     $doc->setObject($object);
     $doc->nom = $ds->escape($this->nom);
     return $doc->countMatchingList();
 }
示例#2
0
    $modeles = array();
    $modele = new CCompteRendu();
    $modele->object_class = "CConsultation";
    $modele->type = "header";
    $modele->user_id = $_praticien->_id;
    $modeles["user"] = $modele->countMatchingList();
    $modele = new CCompteRendu();
    $modele->object_class = "CConsultation";
    $modele->type = "header";
    $modele->function_id = $_praticien->_ref_function->_id;
    $modeles["func"] = $modele->countMatchingList();
    $modele = new CCompteRendu();
    $modele->object_class = "CConsultation";
    $modele->type = "header";
    $modele->group_id = $_praticien->_ref_function->_ref_group->_id;
    $modeles["group"] = $modele->countMatchingList();
    $criteres["level2"]["modele_comps"][$_praticien->_id] = array_sum($modeles) ? true : false;
    $details["level2"]["modele_comps"][$_praticien->_id] = $modeles;
    // Days Patients
    $patient_count = 0;
    $plage = new CPlageconsult();
    $plage->date = CMbDT::date();
    $plage->chir_id = $_praticien->_id;
    /** @var CPlageconsult $_plage */
    foreach ($plage->loadMatchingList() as $_plage) {
        $patient_count += $_plage->countPatients();
    }
    $criteres["level2"]["patient_count"][$_praticien->_id] = $patient_count;
}
// Création du template
$smarty = new CSmartyDP();