include "../lib/classes.inc.php";
require_once '../lang/' . $idioma . '.php';
header("Content-type: text/html; charset=ISO-8859-1", true);
if (!checklog()) {
    die($frase_log);
}
function em_debito($codigo)
{
    $query = mysql_query("SELECT DISTINCT(vo.codigo_paciente), tp.* FROM pacientes tp INNER JOIN v_orcamento vo ON tp.codigo = vo.codigo_paciente WHERE data < '" . date('Y-m-d') . "' AND pago = 'Não' AND confirmado = 'Sim' AND baixa = 'Não' AND tp.codigo = " . $codigo . " ORDER BY `nome` ASC");
    return mysql_num_rows($query) > 0;
}
?>
  <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
<?php 
$_GET['pesquisa'] = utf8_decode(htmlspecialchars(utf8_encode($_GET['pesquisa']), ENT_QUOTES | ENT_COMPAT, 'utf-8'));
$pacientes = new TPacientes();
if ($_GET[campo] == 'nascimento') {
    if (strlen($_GET['pesquisa']) <= 2) {
        $where .= "MONTH(nascimento) = '" . $_GET['pesquisa'] . "'";
    } else {
        $pesq = explode('_', $_GET['pesquisa']);
        foreach ($pesq as $k => $v) {
            $v = explode('-', $v);
            $v[1] = str_pad($v[1], 2, '0', STR_PAD_LEFT);
            $pesq[$k] = implode('-', $v);
        }
        $where = "RIGHT(nascimento, 5) = '" . $pesq[0] . "'";
        if (count($pesq) > 1) {
            $where = "DATE_FORMAT(nascimento, '%m-%d') BETWEEN '" . $pesq[0] . "' AND '" . $pesq[1] . "'";
        }
    }
Example #2
0
 * Smile Odontolóogia
 * Rua Laudemira Maria de Jesus, 51 - Lourdes
 * Arcos - MG - CEP 35588-000
 *
 *
 */
include "../lib/config.inc.php";
include "../lib/func.inc.php";
include "../lib/classes.inc.php";
require_once '../lang/' . $idioma . '.php';
header("Content-type: text/html; charset=ISO-8859-1", true);
if (!checklog()) {
    die($frase_log);
}
include "../timbre_head.php";
$paciente = new TPacientes();
$paciente->LoadPaciente($_GET['codigo']);
$query = mysql_query("SELECT * FROM odontograma WHERE codigo_paciente = " . $_GET['codigo']) or die('Line 39: ' . mysql_error());
while ($row = mysql_fetch_assoc($query)) {
    $dente[$row['dente']] = $row['descricao'];
}
?>
<br />
<div align="center"><font size="4"><b><?php 
echo $LANG['reports']['odontogram'];
?>
</b></font></div><br /><br />
<font size="2"><?php 
echo $LANG['reports']['patient'];
?>
:<br />
Example #3
0
 * Arcos - MG - CEP 35588-000
 *
 * Ou nos contate pelo telefone:
 *
 * Tel.: 0800-285-8787
 *
 *
 */
include "../lib/config.inc.php";
include "../lib/func.inc.php";
include "../lib/classes.inc.php";
header("Content-type: text/html; charset=ISO-8859-1", true);
if (!checklog()) {
    die($frase_log);
}
$paciente = new TPacientes();
if (isset($_POST['Salvar'])) {
    $_POST['tratamento'] = @implode(',', $_POST['tratamento']);
    $_POST['cpf'] = ajusta_cpf($_POST['cpf'], 1);
    $_POST['cpf_ant'] = ajusta_cpf($_POST['cpf_ant'], 1);
    $obrigatorios[1] = 'codigo';
    $obrigatorios[] = 'nom';
    $i = $j = 0;
    foreach ($_POST as $post => $valor) {
        $i++;
        if (array_search($post, $obrigatorios) && $valor == "") {
            $r[$i] = '<font color="#FF0000">';
            $j++;
        }
    }
    if (!is_valid_codigo($_POST[codigo]) && $_GET[acao] != "editar") {
Example #4
0
 *
 * Smile Odontolóogia
 * Rua Laudemira Maria de Jesus, 51 - Lourdes
 * Arcos - MG - CEP 35588-000
 *
 *
 */
include "../lib/config.inc.php";
include "../lib/func.inc.php";
include "../lib/classes.inc.php";
require_once '../lang/' . $idioma . '.php';
header("Content-type: text/html; charset=ISO-8859-1", true);
if (!checklog()) {
    die($frase_log);
}
$paciente = new TPacientes();
$strUpCase = "ALTERAÇÂO";
$strLoCase = encontra_valor('pacientes', 'codigo', $_GET[codigo], 'nome') . ' - ' . $_GET['codigo'];
$frmActEdt = "?acao=editar&codigo=" . $_GET[codigo];
$paciente->LoadPaciente($_GET[codigo]);
$row = $paciente->RetornaTodosDados();
$row[nascimento] = converte_data($row[nascimento], 2);
$row[nascimentomae] = converte_data($row[nascimentomae], 2);
$row[nascimentopai] = converte_data($row[nascimentopai], 2);
$row[datacadastro] = converte_data($row[datacadastro], 2);
$acao = '&acao=editar';
if (isset($strScrp)) {
    echo '<scr' . 'ipt>' . $strScrp . '</scr' . 'ipt>';
    die;
}
?>
Example #5
0
 * Rua Laudemira Maria de Jesus, 51 - Lourdes
 * Arcos - MG - CEP 35588-000
 *
 *
 */
include "../lib/config.inc.php";
include "../lib/func.inc.php";
include "../lib/classes.inc.php";
require_once '../lang/' . $idioma . '.php';
header("Content-type: text/html; charset=ISO-8859-15", true);
if (!checklog()) {
    die($frase_log);
}
include "../timbre_head.php";
if ($_GET['codigo'] != '') {
    $paciente = new TPacientes();
    $paciente->LoadPaciente($_GET['codigo']);
    $dentista = new TDentistas();
    $dentista->LoadDentista($paciente->RetornaDados('codigo_dentistaprocurado'));
    $dentista_procurado = $dentista->RetornaDados('nome') != '' ? $dentista->RetornaDados('titulo') . ' ' . $dentista->RetornaDados('nome') : '';
    $dentista->LoadDentista($paciente->RetornaDados('codigo_dentistaatendido'));
    $dentista_atendido = $dentista->RetornaDados('nome') != '' ? '<b>' . $dentista->RetornaDados('titulo') . ' ' . $dentista->RetornaDados('nome') : '';
    $dentista->LoadDentista($paciente->RetornaDados('codigo_dentistaencaminhado'));
    $dentista_encaminhado = $dentista->RetornaDados('nome') != '' ? '<b>' . $dentista->RetornaDados('titulo') . ' ' . $dentista->RetornaDados('nome') : '';
}
?>
<p align="center"><font size="3"><b><?php 
echo $LANG['reports']['patient_sheet'];
?>
</b></font></p><br />
<table width="100%" border="0" cellpadding="2" cellspacing="0">