Пример #1
0
 /**
  * Handle a GET request
  *
  * @return none, but populate $this->JSON
  */
 function handleGET()
 {
     $this->JSON = ["Meta" => ["Instrument" => $this->Instrument->testName, "Visit" => $this->VisitLabel, "Candidate" => $this->CandID, "DDE" => $this->bDDE]];
     if (!$this->bFlags) {
         $Values = \NDB_BVL_Instrument::loadInstanceData($this->Instrument);
         unset($Values['CommentID']);
         unset($Values['UserID']);
         unset($Values['Testdate']);
         unset($Values['Data_entry_completion_status']);
         $this->JSON[$this->Instrument->testName] = $Values;
     } else {
         $flags = $this->DB->pselectRow("SELECT Data_entry, Administration, Validity\n                 FROM flag WHERE CommentID=:CID", ['CID' => $this->Instrument->getCommentID()]);
         if (!$this->Instrument->ValidityEnabled) {
             unset($flags['Validity']);
         }
         $this->JSON['Flags'] = $flags;
     }
 }