Skip to content

Commit

Permalink
Changed to current date time instead of date time at which app was lo…
Browse files Browse the repository at this point in the history
…aded. (#6791)

* Changed to current date time instead of date time at which app was loaded

* Changed to encounter_date

* removed console.log()

* modified FLAKY TEST

---------

Co-authored-by: Mohammed Nihal <[email protected]>
  • Loading branch information
shyamprakash123 and nihal467 authored Jan 23, 2024
1 parent 20cac43 commit 01bb090
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Components/Facility/ConsultationForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,13 @@ export const ConsultationForm = ({ facilityId, patientId, id }: Props) => {
fetchPatientName();
}, [dispatchAction, patientId]);

useEffect(() => {
dispatch({
type: "set_form",
form: { ...state.form, encounter_date: new Date() },
});
}, []);

const hasSymptoms =
!!state.form.symptoms.length && !state.form.symptoms.includes(1);
const isOtherSymptomsSelected = state.form.symptoms.includes(9);
Expand Down

0 comments on commit 01bb090

Please sign in to comment.