当前位置: 首页>>代码示例>>PHP>>正文


PHP DB_Functions::getPaciente方法代码示例

本文整理汇总了PHP中DB_Functions::getPaciente方法的典型用法代码示例。如果您正苦于以下问题:PHP DB_Functions::getPaciente方法的具体用法?PHP DB_Functions::getPaciente怎么用?PHP DB_Functions::getPaciente使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DB_Functions的用法示例。


在下文中一共展示了DB_Functions::getPaciente方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1:

     $idMedico = $_POST['idMedico'];
     $pacientes = $db->getPacientes($idMedico);
     if ($pacientes) {
         $response["erro"] = FALSE;
         $response["pacientes"] = $pacientes;
         echo json_encode($response);
     } else {
         $response["erro"] = TRUE;
         $response["erro_msg"] = "Medico nao possui pacientes!";
         echo json_encode($response);
     }
     // Obtem informacoes de um paciente
 } else {
     if ($tag == 'getPaciente') {
         $idPaciente = $_POST['idPaciente'];
         $paciente = $db->getPaciente($idPaciente);
         $diagnostico = $db->getDiagnosticoDoPaciente($idPaciente);
         if ($paciente) {
             $response["erro"] = FALSE;
             $response["paciente"]["nome"] = $paciente["nome"];
             $response["paciente"]["dataDeNascimento"] = $paciente["dataDeNascimento"];
             $response["paciente"]["descricao"] = $paciente["descricao"];
             $response["paciente"]["quarto"] = $paciente["Quarto_idQuarto"];
             $response["paciente"]["dataDeAdmissao"] = $paciente["dataDeAdmissao"];
             if ($diagnostico) {
                 $response["paciente"]["diagnostico"] = $diagnostico;
             } else {
                 $response["paciente"]["diagnostico"] = "";
             }
         } else {
             $response["erro"] = TRUE;
开发者ID:joseAugustoCR,项目名称:TCC_Servidor,代码行数:31,代码来源:index.php

示例2:

                    <div class="cell">#ID</div>
                    <div class="cell">Paciente</div>
                    <div class="cell">Medicamento</div> 
                    <div class="cell">Descrição</div>
                    <div class="cell">Quarto</div>
                    <div class="cell">Dose(mg)</div>
                    <div class="cell">Data</div>  
                    <div class="cell">Resposta</div>   
                    <div class="cell">Confirmação</div> 
            </div>
            
    
                <?php 
foreach ($solicitacoes as $row) {
    $formName = "solicitacao" . $row["idSolicitacao"];
    $paciente = $db->getPaciente($row["Paciente_idPaciente"]);
    $medicamento = $db->getMedicamentoPorId($row["Medicamento_idMedicamento"]);
    echo "<form class='tableRow' name={$formName} id={$formName} action='index.php' method='post'>" . "<div class='cell'><input class='id' style='width:100%' type='text' readonly name='idSolicitacao' id='idSolicitacao' value='{$row['idSolicitacao']}'></div>" . "<div class='cell'><input class='id' name='nome' id='nome' readonly type='text' contentEditable=true value='{$paciente['nome']}'></div>" . "<div class='cell'><input class='id' id='Medicamento' name='Medicamento' readonly type='date' contentEditable=true value='{$medicamento['nome']}'></div>" . "<div class='cell'><input class='id' id='descricao' name='descricao' readonly type='text' contentEditable=true value='{$row['descricao']}'></div> " . "<div class='cell'><input class='id' id='quarto' name='quarto' readonly type='number' contentEditable=true value='{$paciente['Quarto_idQuarto']}'></div> " . "<div class='cell'><input class='id' id='dose' name='dose' readonly value='{$row['doseAdministrada']}'></div> " . "<div class='cell'><input class='id' id='data' name='data' readonly type='text' contentEditable=true value='{$row['data']}'></div>" . "<div class='cell'><input class='input2' id='resposta' name='resposta'  type='text' contentEditable=true value=''></div>" . "<input class='cell' style = 'display:none' type='text' name='idMedico' id='idMedico' value='{$row['Medico_Usuario_idUsuario']}'/>" . "<input class='cell' style = 'display:none' type='text' name='idPaciente' id='idPaciente' value='{$row['Paciente_idPaciente']}'/>" . "<input class='cell' style = 'display:none' type='text' name='tag' id='tag' value='respondeSolicitacao'/>" . "<div class='cell'>" . "<input type='button' class='btn btn-xs btn-success' name='popup' id='btnDialog' value='Ok' onclick='botaoConfirma_clickHandler({$formName});' >" . "</div> " . "</form>" . "\n";
}
?>
            

            
        </div>
        </div>
            
           

                
            
           
开发者ID:joseAugustoCR,项目名称:TCC_Servidor,代码行数:25,代码来源:enfermeira.php


注:本文中的DB_Functions::getPaciente方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。