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