Skip to content

Commit e1605c2

Browse files
authored
Merge pull request #356 from StubberG3/balancer/347/any-pregnancy
bugfix: #347 - Add any_pregnancy to clear form logic
2 parents 61e80df + fa356cd commit e1605c2

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

frontend/src/pages/PatientManager/NewPatientForm.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ interface PatientInfoInterface {
3232
weightGainConcern: boolean;
3333
reproductive: boolean;
3434
riskPregnancy: boolean;
35+
anyPregnancy: boolean;
3536
}
3637

3738
// TODO: refactor with Formik
@@ -145,6 +146,7 @@ const NewPatientForm = ({
145146
weightGainConcern: newPatientInfo.weight_gain == "Yes",
146147
reproductive: newPatientInfo.Reproductive == "Yes",
147148
riskPregnancy: newPatientInfo.risk_pregnancy == "Yes",
149+
anyPregnancy: newPatientInfo.any_pregnancy == "Yes",
148150
};
149151

150152
setIsLoading(true); // Start loading
@@ -263,6 +265,7 @@ const NewPatientForm = ({
263265
blood_pressure: "No",
264266
Reproductive: "No",
265267
risk_pregnancy: "No",
268+
any_pregnancy: "No",
266269
}));
267270
};
268271

frontend/src/pages/PatientManager/PatientManager.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ const PatientManager = () => {
2929
weight_gain: "",
3030
Reproductive: "",
3131
risk_pregnancy: "",
32+
any_pregnancy: "",
3233
PossibleMedications: {
3334
first: [],
3435
second: [],
3536
third: [],
3637
},
37-
any_pregnancy: "",
3838
});
3939

4040
const handlePatientDeleted = (deletedId: string) => {

0 commit comments

Comments
 (0)