Ejemplo n.º 1
0
 function showPreferencesRes()
 {
     //$this->user->setFilter(loadvar('filter'));
     $this->user->setRegionFilter(loadvar('region'));
     $this->user->setTestMode(loadvar('testmode'));
     $this->user->setCommunication(loadvar('communication'));
     $this->user->setPuid(loadvar('puid'));
     $this->user->saveChanges();
     $display = new Display();
     return $this->mainPage($display->displaySuccess(Language::messagePreferencesSaved()));
 }
Ejemplo n.º 2
0
 function showEditRes($primkey)
 {
     $respondent = new Respondent($primkey);
     $respondent->setFirstName(loadvar('firstname'));
     $respondent->setLastName(loadvar('lastname'));
     $respondent->setAddress1(loadvar('address1'));
     $respondent->setAddress2(loadvar('address2'));
     $respondent->setZip(loadvar('zip'));
     $respondent->setCity(loadvar('city'));
     $respondent->setTelephone1(loadvar('telephone1'));
     $respondent->setTelephone2(loadvar('telephone2'));
     $respondent->setEmail(loadvar('email'));
     //log???
     $errorMessage = $respondent->saveChanges();
     $display = new Display();
     $messageEditError = $display->displaySuccess(Language::messageRespondentChanged($primkey));
     //'<div class="alert alert-info">Changes saved.</div>';
     if (sizeof($errorMessage) > 0) {
         $messageEditError = $display->displayError(implode('<br/>', $errorMessage));
     }
     $displayCatiInterviewer = new DisplayCatiInterviewer();
     return $displayCatiInterviewer->showInfo($respondent, $messageEditError);
 }
Ejemplo n.º 3
0
 function ShowRespondentFieldNurseAssignRes($primkey)
 {
     $respondent = new Respondent($primkey);
     $household = $respondent->getHousehold();
     $lab = new Lab($primkey);
     $selurid = loadvar('urid');
     $lab->setUrid($selurid);
     $lab->saveChanges();
     //      echo '<br/><br/><br/>' . loadvar('urid');
     //set urid for lab
     //add to communication:   _lab, _household, _respondent
     $communication = new Communication();
     $communication->assignLab($household, $respondent, $lab, $selurid);
     $display = new Display();
     return $this->showRespondentInfo($primkey, $display->displaySuccess(Language::labelNurseFieldNurseAssigned()));
 }
Ejemplo n.º 4
0
 function showEditRes($primkey, $type = 1)
 {
     if ($type == 1) {
         $respondent = new Respondent($primkey);
         $respondent->setFirstName(loadvar('firstname'));
         $respondent->setLastName(loadvar('lastname'));
     } else {
         $respondent = new Household($primkey);
         $respondent->setName(loadvar('name'));
         $respondent->setAddress1(loadvar('address1'));
         $respondent->setAddress2(loadvar('address2'));
         $respondent->setZip(loadvar('zip'));
         $respondent->setCity(loadvar('city'));
     }
     if (dbConfig::defaultPanel() == PANEL_RESPONDENT) {
         //only save for respondent panels
         $respondent->setAddress1(loadvar('address1'));
         $respondent->setAddress2(loadvar('address2'));
         $respondent->setZip(loadvar('zip'));
         $respondent->setCity(loadvar('city'));
     }
     $respondent->setTelephone1(loadvar('telephone1'));
     //$respondent->setTelephone2(loadvar('telephone2'));
     $respondent->setEmail(loadvar('email'));
     //log???
     $errorMessage = $respondent->saveChanges();
     $display = new Display();
     $messageEditError = $display->displaySuccess(Language::messageRespondentChanged($respondent));
     //'<div class="alert alert-info">Changes saved.</div>';
     if (sizeof($errorMessage) > 0) {
         $messageEditError = $display->displayError(implode('<br/>', $errorMessage));
     }
     $displayInterviewer = new DisplayInterviewer();
     return $displayInterviewer->showInfo($respondent, $messageEditError);
 }