Skip to content

refactor: Delete unused code - #472

Merged
halcwb merged 1 commit into
informedica:masterfrom
ploeh:delete-unused-code
Aug 19, 2026
Merged

refactor: Delete unused code#472
halcwb merged 1 commit into
informedica:masterfrom
ploeh:delete-unused-code

Conversation

@ploeh

@ploeh ploeh commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator

Overview

Delete unused code in Shared.Models.Patient.Age.

Further information

As discussed in #469 the Age type and the associated module could be significantly simplified.

Divergence from plan

Getting rid of unused code is the first step in simplifying Age, but to keep pull-request line count down, I submit this as a separate pull request, valuable in itself.

Verification

dotnet run servertests pass.

Author checklist

Note

An issue and agreed implementation plan are necessary unless either fewer than 25 lines have been changed or only documentation has been changed.

I confirm that these changes:

  • Follow the process described in CONTRIBUTING.md.
  • Make the changes proposed in the linked issue (if applicable): n/a
  • Follow the approach documented in the linked implementation plan (if applicable): n/a
  • Are no more than 200 lines of changed code, ideally 25-100.
  • Are not more complex than necessary.
  • Cannot easily be split in a way that would make reviewing them significantly easier.
  • Follow the guidelines specified in DEVELOPMENT.md.
  • Have been thoroughly tested.
  • Don't introduce new security vulnerabilities.
  • Follow the AI/LLM Usage Policy — LLMs were not given direct write access to .fs source files (except client-side UI code).

AI/Vibe Coding Disclosure

  • Some or all code in this PR is vibe coded (substantially AI-generated). If checked, describe below which parts were AI-generated, which tool was used, and how the code was verified.

I confirm that I have:

  • Added appropriate automated tests.
  • Updated documentation appropriately.
  • Added comments that highlight important changes and add justification, where necessary. (Create the PR as a draft first, add your comments, then mark as ready for review.)

Reviewer checklist

I confirm that:

  • I am confident that the changes work.
  • The changed code meets our guidelines and standards.
  • The new code is not more complex than necessary.
  • I have clearly labelled suggestions as blocking, required but not blocking, or optional (see CONTRIBUTING.md).

@ploeh
ploeh requested a review from halcwb August 19, 2026 13:21
@greptile-apps

greptile-apps Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR removes unused validation and conversion helpers from Shared.Models.Patient.Age without changing the remaining age representation or getter behavior.

  • Deletes the generic minimum/maximum validation and setter helpers.
  • Deletes the unused year, month, week, and day conversion setters.

Confidence Score: 5/5

The PR appears safe to merge because the removed helpers have no repository callers or identified external publication path.

The change only deletes unreferenced age validation and conversion helpers while leaving the actively used age getters and patient update functions intact.

Important Files Changed

Filename Overview
src/Informedica.GenPRES.Shared/Models.fs Removes six unreferenced Age helper functions; no remaining repository caller depends on them.

Reviews (1): Last reviewed commit: "refactor: Delete unused code" | Re-trigger Greptile

@halcwb
halcwb merged commit 2cb0e7a into informedica:master Aug 19, 2026
41 of 43 checks passed
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