Пример #1
0
 private function RenderAnamnese($parte = 1)
 {
     $an = new Anamnese();
     if ($an->Carrega($this->codcaso)) {
         $hash = new HashTable();
         $ca = new Caso();
         $ca->setCodigo($this->codcaso);
         $ca->CarregarCaso();
         if ($parte == 1) {
             if (!is_null($ca->getImagemPaciente())) {
                 $html .= '<img src="img/pe_' . $ca->getImagemPaciente() . '.png" class="img-paciente" alt="@lng[Imagem: Paciente]" title="@lng[Imagem: Paciente]" />';
             }
             $html .= '<div class="item-cont">@lng[Identificação]</div>';
             $html .= nl2br($an->getIdentificacao());
             $html .= '<div class="item-cont">@lng[Queixa principal]</div>';
             $html .= nl2br($an->getQueixapri());
             $html .= '<div class="item-cont">@lng[História atual]</div>';
             $html .= nl2br($an->getHistatual());
             $comandos = $this->BuscaMenusItem('an');
         } else {
             if ($parte == 2) {
                 $html .= '<div class="item-cont">@lng[História pregressa]</div>';
                 $html .= nl2br($an->getHistpregressa());
                 $html .= '<div class="item-cont">@lng[História familiar]</div>';
                 $html .= nl2br($an->getHistfamiliar());
                 if (strip_tags($an->getPerfilpsicosocial()) != '') {
                     $html .= '<div class="item-cont">@lng[Perfil psicosocial]</div>';
                     $html .= nl2br($an->getPerfilpsicosocial());
                 }
                 $html .= '<div class="item-cont">@lng[Revisão de sistemas]</div>';
                 $html .= nl2br($an->getRevsistemas());
                 $comandos = $this->BuscaMenusItem('aninv');
             }
         }
         //$comandos = $this->MontaAcoesVisualizacaoCaso($prefixo, $tipocaso, $chave);
         $hash->AddItem("titulosecao", $parte == 1 ? "@lng[Anamnese (identificação)]" : "@lng[Anamnese (investigação)]");
         $hash->AddItem("conteudo", $html);
         $hash->AddItem("menu", $comandos);
         $hash->AddItem("save", 'N');
         return $hash;
     } else {
         $msg = $cmd->errorInfo();
         $this->msg_erro = $msg[2];
         return false;
     }
 }
Пример #2
0
function TrataDadosAnamnese($template)
{
    header('Content-Type: text/html; charset=iso-8859-1');
    if (isset($_SESSION['caso']) && $_SESSION['caso'] != 0) {
        $a = new Anamnese();
        $a->Carrega($_SESSION['caso']);
        $template = str_replace("<!--txtid-->", $a->getIdentificacao(), $template);
        $template = str_replace("<!--txtqp-->", $a->getQueixapri(), $template);
        $template = str_replace("<!--txthda-->", $a->getHistatual(), $template);
        $template = str_replace("<!--txthmp-->", $a->getHistpregressa(), $template);
        $template = str_replace("<!--txthf-->", $a->getHistfamiliar(), $template);
        $template = str_replace("<!--txtpps-->", $a->getPerfilpsicosocial(), $template);
        $template = str_replace("<!--txtrs-->", $a->getRevsistemas(), $template);
        $template = str_replace("<!--optionsURL-->", $a->ListaConteudos(), $template);
        //$template = str_replace("<!--txtef-->", $a->getExamefisico(), $template);
    } else {
        $template = str_replace("<!--txtid-->", "", $template);
        $template = str_replace("<!--txtqp-->", "", $template);
        $template = str_replace("<!--txthda-->", "", $template);
        $template = str_replace("<!--txthmp-->", "", $template);
        $template = str_replace("<!--txthf-->", "", $template);
        $template = str_replace("<!--txtpps-->", "", $template);
        $template = str_replace("<!--txtrs-->", "", $template);
        //$template = str_replace("<!--txtef-->", "", $template);
    }
    return $template;
}