Exemple #1
0
 public static function MenusExamesDetalhes()
 {
     $e = new Exame();
     $e->Carrega($_SESSION['caso'], $_SESSION['exame']);
     $te = new TipoExame();
     $te->Carrega($e->getTipo());
     //$menus .= Botao::BotaoSalvar("fntGravaEtapaCaso();");
     if ($te->getPodeImgs() == 1) {
         $menus .= Botao::BotaoUploadImagem("fntMostraOpcoesUpload();", "@lng[Adicionar arquivo de exame por imagem]");
     }
     if ($te->getPodeDocs() == 1) {
         $menus .= Botao::BotaoUploadDocumento("fntMostraOpcoesUploadDoc();", "@lng[Adicionar arquivo de exame]");
     }
     $menus .= Botao::BotaoSalvar("fntSalvaResultadosExame();", "@lng[Salvar resultados/laudo do exame]");
     $menus .= Botao::BotaoExames("fntVoltar();", "@lng[Voltar para a lista de exames]");
     $menus .= Botao::BotaoCancelar("fntTelaInicial();");
     return $menus;
 }
Exemple #2
0
function TrataDadosExamesDetalhes($template)
{
    if (isset($_SESSION['caso']) && $_SESSION['caso'] != 0) {
        $codexame = base64_decode($_POST['r']);
        $_SESSION['exame'] = $codexame;
        $e = new Exame();
        $t = new TipoExame();
        $e->Carrega($_SESSION['caso'], $codexame);
        $t->Carrega($e->getTipo());
        if ($t->getPodeImgs()) {
            $listaimgs = '<h4>@lng[Imagens anexadas ao exame] <span class="nomeexame">"' . $e->getDescricao() . '"</span></h4>';
            $listaimgs .= '<div id="lista-imgs">';
            $listaimgs .= $e->ListaArquivosExame($_SESSION['caso'], $codexame, "img");
            $listaimgs .= '</div>';
            $template = str_replace("<!--listaimagens-->", $listaimgs, $template);
        } else {
            $template = str_replace("<!--listaimagens-->", "", $template);
        }
        if ($t->getPodeDocs()) {
            $listadocs = '<h4>@lng[Documentos anexados ao exame] <span class="nomeexame">"' . $e->getDescricao() . '"</span></h4>';
            $listadocs .= '<div id="lista-docs">';
            $listadocs .= $e->ListaArquivosExame($_SESSION['caso'], $codexame, "doc");
            $listadocs .= '</div>';
            $template = str_replace("<!--listadocs-->", $listadocs, $template);
        } else {
            $template = str_replace("<!--listadocs-->", "", $template);
        }
        if ($t->getPodeVals()) {
            $listavalref = '<div id="divLancaValores">';
            $listavalref .= $e->ListaValoresReferencia($_SESSION['caso'], $codexame);
            $listavalref .= '</div>';
            $template = str_replace("<!--lancavaloresrefexame-->", $listavalref, $template);
        } else {
            $template = str_replace("<!--lancavaloresrefexame-->", "", $template);
        }
        $template = str_replace("<!--laudo-->", is_null($e->getLaudo()) ? "" : $e->getLaudo(), $template);
        return $template;
    } else {
        return "@lng[Erro ao localizar o caso de estudo]";
    }
}