From 9480edc2d1ea37cecb63a04b9c9bebe28d1e0965 Mon Sep 17 00:00:00 2001 From: jp-lima Date: Thu, 18 Sep 2025 10:52:48 -0300 Subject: [PATCH] =?UTF-8?q?P=C3=A0gina=20detalhes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/DoctorDetails.jsx | 181 ++++++++++++++++++++++++++++++++++++ 1 file changed, 181 insertions(+) create mode 100644 src/pages/DoctorDetails.jsx diff --git a/src/pages/DoctorDetails.jsx b/src/pages/DoctorDetails.jsx new file mode 100644 index 0000000..95af64d --- /dev/null +++ b/src/pages/DoctorDetails.jsx @@ -0,0 +1,181 @@ +import React, { useEffect, useState } from "react"; +import avatarPlaceholder from '../assets/images/avatar_placeholder.png'; + +const Details = ({ patientID, setCurrentPage }) => { + const [paciente, setPaciente] = useState(null); + + useEffect(() => { + if (!patientID) return; + + fetch(`https://mock.apidog.com/m1/1053378-0-default/pacientes/${patientID}`) + .then(res => res.json()) + .then(data => setPaciente(data)) + .catch(err => console.error("Erro ao buscar médico:", err)); + }, [patientID]); + + if (!paciente) return

Carregando...

; + + return ( + <> +
+

MediConnect

+
+
+ +
+
+ +
+
+ {paciente.nome || "Nome Completo"} +

{paciente.cpf || "CPF"}

+
+
+ +
+
+ + {/* ------------------ DADOS PESSOAIS ------------------ */} +
+
Dados Pessoais
+
+
+
+ +

{paciente.nome || "-"}

+
+
+ +

{paciente.nomeSocial || "-"}

+
+
+ +

{paciente.dataNascimento || "-"}

+
+
+ +

{paciente.sexo || "-"}

+
+
+ +

{paciente.cpf || "-"}

+
+
+ +

{paciente.rg || "-"}

+
+
+ +

{paciente.documento || "-"}

+
+
+ +

{paciente.numeroDocumento || "-"}

+
+
+ +

{paciente.etniaRaca || "-"}

+
+
+ +

{paciente.etniaRaca || "-"}

+
+
+ +

{paciente.etniaRaca || "-"}

+
+
+ +

{paciente.profissao || "-"}

+
+
+ +

{paciente.estadoCivil || "-"}

+
+
+ +

{paciente.nomeConjuge || "-"}

+
+
+ +

{paciente.outroId || "-"}

+
+
+ +

{paciente.observacoes || "-"}

+
+
+ +

{paciente.anexos || "-"}

+
+
+
+ + {/* ------------------ ENDEREÇO ------------------ */} +
+
Endereço
+
+
+
+ +

{paciente.cep || "-"}

+
+
+ +

{paciente.rua || "-"}

+
+
+ +

{paciente.bairro || "-"}

+
+
+ +

{paciente.cidade || "-"}

+
+
+ +

{paciente.estado || "-"}

+
+
+ +

{paciente.numero || "-"}

+
+
+ +

{paciente.complemento || "-"}

+
+
+
+ + {/* ------------------ CONTATO ------------------ */} +
+
Contato
+
+
+
+ +

{paciente.email || "-"}

+
+
+ +

{paciente.telefone1 || "-"}

+
+
+ +

{paciente.telefone2 || "-"}

+
+
+ +

{paciente.telefone3 || "-"}

+
+
+
+ + ); +}; + +export default Details; \ No newline at end of file