Example #1
0
 public function MontaTelaExibicao($organizador, $tipo, $chavemostrar, $codcontref)
 {
     $html = "";
     $htcont = new HashTable();
     if ($organizador == "raiz") {
         // Se for a raiz, exibo os objetivos.
         $objetivos = new Objetivo();
         $objetivos->setCodcaso($_SESSION['casores']);
         $lista = $objetivos->ListaRecordSet();
         if ($lista) {
             $html = '<ul class="objetivos-caso">';
             foreach ($lista as $objetivo) {
                 $html .= '<li>' . $objetivo->Descricao . '</li>';
             }
             $html .= '</ul>';
             $htcont->AddItem("conteudo", $html);
         } else {
             $htcont->AddItem("conteudo", "@lng[Não foi possível recuperar o conteudo. Detalhes:] " . $objetivos->getErro());
         }
         $htcont->AddItem("titulosecao", "@lng[Objetivos do caso]");
         $htcont->AddItem("chave", $chavemostrar);
         $htcont->AddItem("menu", $this->BuscaMenusItem($tipo));
         $htcont->AddItem("saibamais", $this->BuscaDadosSaibaMais($chavemostrar));
     } else {
         if ($organizador == "cont") {
             //Log::RegistraLog("Organizador enviado: " . $organizador);
             switch ($tipo) {
                 case 'an':
                     $htcont = $this->RenderAnamnese(1);
                     if ($htcont) {
                         $htcont->AddItem("chave", $chavemostrar);
                     } else {
                         $htcont = new HashTable();
                         $htcont->AddItem("conteudo", "@lng[Não foi possível recuperar o conteudo. Detalhes:] " . $this->getErro());
                     }
                     break;
                 case 'aninv':
                     $htcont = $this->RenderAnamnese(2);
                     if ($htcont) {
                         $htcont->AddItem("chave", $chavemostrar);
                     } else {
                         $htcont = new HashTable();
                         $htcont->AddItem("conteudo", "@lng[Não foi possível recuperar o conteúdo. Detalhes:] " . $this->getErro());
                     }
                     break;
                 case 'exfis':
                     $htcont = $this->RenderExameFisico();
                     if ($htcont) {
                         $htcont->AddItem("chave", $chavemostrar);
                     }
                     break;
                 case "optex":
                     $htcont = $this->renderPadrao('optex telaexibicao');
                     break;
                 case "resex":
                     $htcont = $this->renderPadrao('resex telaexibicao');
                     break;
                 case "diag":
                     $htcont = $this->renderPadrao('diag telaexibicao');
                     break;
                 case "trat":
                     $htcont = $this->renderPadrao('trat telaexibicao');
                     break;
                 case "des":
                     $htcont = $this->renderPadrao('des telaexibicao');
                     break;
                 case 'html':
                     $htcont = $this->renderHTML($codcontref);
                     break;
                 case 'img':
                     $htcont = $this->renderPadrao('img telaexibicao');
                     break;
                 case 'vid':
                     $htcont = $this->renderPadrao('vid telaexibicao');
                     break;
                 case 'aud':
                     $htcont = $this->renderPadrao('aud telaexibicao');
                     break;
                 case "perg":
                     $htcont = $this->renderPadrao('perg telaexibicao');
                     break;
                 case "grupo-perg":
                     $htcont = $this->renderPadrao('grupo-perg telaexibicao');
                     break;
             }
             $htcont->AddItem("saibamais", $this->BuscaDadosSaibaMais($chavemostrar));
         } else {
             if ($organizador == "agr") {
                 $htcont->AddItem("conteudo", "Aguarde");
             }
         }
     }
     return $htcont;
 }