Skip to content

refactor: refatora domínio Patients#868

Merged
thalesluiz45 merged 2 commits into
devfrom
729-5---refatoração-do-domínio-patients
Jun 21, 2026

Hidden character warning

The head ref may contain hidden characters: "729-5---refatora\u00e7\u00e3o-do-dom\u00ednio-patients"
Merged

refactor: refatora domínio Patients#868
thalesluiz45 merged 2 commits into
devfrom
729-5---refatoração-do-domínio-patients

Conversation

@WolgrandAP

Copy link
Copy Markdown
Contributor

O que mudou?

Este PR resolve a confusão de rotas e o alto acoplamento na lógica de cadastro de pacientes. Foi quebrado o objeto que geria todo o estado do formulário (use-members-register-context.tsx) e modularizar as interfaces, centralizando de vez todas as responsabilidades relacionadas aos pacientes dentro do domínio patients.

Tarefas Relacionadas

Mudanças Realizadas

  • Desacoplamento do Contexto de Cadastro: O arquivo gigante use-members-register-context.tsx foi fragmentado em types.ts, reducer.ts e useRegisterSubmission.ts (API), reduzindo drasticamente seu tamanho e mantendo-o apenas como um orquestrador.
  • Componentização do Fluxo de Cadastro: Extração de modais complexos (Vacinas, Atendimentos e Transtornos) da rota additional/page.tsx para src/domains/patients/components/dialogs, e extração do LegalGuardianCheckbox da rota kinships/page.tsx, deixando as páginas de rotas muito mais limpas.
  • Limpeza de Código Morto (Zumbi): Remoção do arquivo de 500+ linhas src/components/AnnualRegistryEditModal.tsx que não estava mais sendo usado no sistema, consolidando o uso do modal já existente e refatorado em src/domains/patients/annual-registry/.

@WolgrandAP WolgrandAP self-assigned this Jun 21, 2026
@coderabbitai

coderabbitai Bot commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 4323d612-7a97-4823-ba45-2ed34def6c1e

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 729-5---refatoração-do-domínio-patients

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@thalesluiz45 thalesluiz45 merged commit 94f813c into dev Jun 21, 2026
2 checks passed
@thalesluiz45 thalesluiz45 deleted the 729-5---refatoração-do-domínio-patients branch June 21, 2026 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants