Skip to content

Commit

Permalink
fixes year_of_birth post patient registration success (#10206)
Browse files Browse the repository at this point in the history
  • Loading branch information
rithviknishad authored Jan 27, 2025
1 parent e6f6859 commit 4d1ace2
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/components/Patient/PatientRegistration.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,7 @@ export default function PatientRegistration(
navigate(`/facility/${facilityId}/patients/verify`, {
query: {
phone_number: resp.phone_number,
year_of_birth:
form.getValues("age_or_dob") === "dob"
? new Date(resp.date_of_birth!).getFullYear()
: new Date().getFullYear() - Number(resp.age!),
year_of_birth: resp.year_of_birth,
partial_id: resp?.id?.slice(0, 5),
},
});
Expand Down

0 comments on commit 4d1ace2

Please sign in to comment.