From 99e76a04d58e1a41ccdf5d07282822ca9f751c43 Mon Sep 17 00:00:00 2001 From: sonika <> Date: Fri, 25 Aug 2023 00:49:41 +0530 Subject: [PATCH] form 5 --- package.json | 1 - src/App.css | 9 + .../PatientForm/PainAnalysisSection4.tsx | 34 +-- src/Components/PatientForm/PastTreatment5.tsx | 253 ++++++++++++++++++ src/Components/PatientForm/PatientForm.tsx | 11 + 5 files changed, 274 insertions(+), 34 deletions(-) create mode 100644 src/Components/PatientForm/PastTreatment5.tsx diff --git a/package.json b/package.json index 986693a..07ea94a 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,6 @@ "@types/node": "^16.18.36", "@types/react": "^18.2.12", "@types/react-dom": "^18.2.5", - "antd": "^5.7.3", "axios": "^1.4.0", "chart.js": "^4.3.0", "chartjs-adapter-date-fns": "^3.0.0", diff --git a/src/App.css b/src/App.css index 8685c1a..5c86565 100644 --- a/src/App.css +++ b/src/App.css @@ -10,6 +10,15 @@ height: 50px } +.collapsable-form-style-multiline .MuiInputBase-root { + width: 300px !important; + margin: 5%; + min-height: 100px +} +.collapsable-form-style-multiline label { + padding: 15px; +} + .collapsable-form-style label { padding: 15px; } diff --git a/src/Components/PatientForm/PainAnalysisSection4.tsx b/src/Components/PatientForm/PainAnalysisSection4.tsx index 9341226..ed50aad 100644 --- a/src/Components/PatientForm/PainAnalysisSection4.tsx +++ b/src/Components/PatientForm/PainAnalysisSection4.tsx @@ -118,9 +118,6 @@ export default function PainAnalysisSection4(){ label="Others" /> - {formik.touched.painQuality && formik.errors.painQuality ? ( -
{formik.errors.painQuality}
- ) : null} @@ -200,9 +197,6 @@ export default function PainAnalysisSection4(){ } label="50-75%" /> } label="75-100%" /> - {formik.touched.painDuration && formik.errors.painDuration ? ( -
{formik.errors.painDuration}
- ) : null} @@ -228,9 +222,6 @@ export default function PainAnalysisSection4(){ /> - {formik.touched.painQuality && formik.errors.painQuality ? ( -
{formik.errors.painQuality}
- ) : null} @@ -266,30 +257,7 @@ export default function PainAnalysisSection4(){ onBlur={formik.handleBlur} /> - {/* - - {formik.touched.currentTreatment && formik.errors.currentTreatment ? ( -
{formik.errors.currentTreatment}
- ) : null} -
- - - {formik.touched.treatmentResults && formik.errors.treatmentResults ? ( -
{formik.errors.treatmentResults}
- ) : null} -
*/} + diff --git a/src/Components/PatientForm/PastTreatment5.tsx b/src/Components/PatientForm/PastTreatment5.tsx new file mode 100644 index 0000000..332ef1b --- /dev/null +++ b/src/Components/PatientForm/PastTreatment5.tsx @@ -0,0 +1,253 @@ +import { TextField, FormControlLabel,Grid,Checkbox, FormControl, FormLabel, Radio, RadioGroup } from '@mui/material'; +import * as React from 'react'; + +interface FormValues { + generalHealth: string; + presentProblemBefore: string; + ifYespresentProblemBefore:string; + ifYestreatmentProvided: string; + ifYesOutcome: string; + strokeBloodclotting: string; + ifYesstrokeBloodclotting: string; + dizzinessFetigue: string; + ifyesdizzinessFetigue: string; + antiColligent: string; + injuriesHospitalization: string; + supplementsOrDrugs: string; +} + +export default function PastTreatment5(){ + + const [values, setValues] = React.useState({ + generalHealth: '', + presentProblemBefore: '', + ifYespresentProblemBefore:'', + ifYestreatmentProvided:'', + ifYesOutcome:'', + strokeBloodclotting: '', + ifYesstrokeBloodclotting: '', + dizzinessFetigue: '', + ifyesdizzinessFetigue:'', + antiColligent: '', + injuriesHospitalization: '', + supplementsOrDrugs:'' + }); + + console.log("dsfdsfdsfg",values) + return( + <> +
+ + + + + Overall your General Healgth is: + { + setValues((prevValues) => ({ + ...prevValues, + generalHealth: event.target.value, + })); + }} + > + } label="Excellent" /> + } label="Very Good" /> + } label="Good" /> + } label="Fair" /> + } label="Poor" /> + + + + + + + Have you experienced your present problem before? + { + setValues((prevValues) => ({ + ...prevValues, + presentProblemBefore: event.target.value, + })); + }} + > + } label="Yes" /> + } label="No" /> + + + + + + + { + setValues((prevValues) => ({ + ...prevValues, + ifYespresentProblemBefore: event.target.value, + })); + }} + /> + + + { + setValues((prevValues) => ({ + ...prevValues, + ifYestreatmentProvided: event.target.value, + })); + }} + /> + + + { + setValues((prevValues) => ({ + ...prevValues, + ifYesOutcome: event.target.value, + })); + }} + /> + + + + + + Have you ever had a stroke or issues with blood clotting? + { + setValues((prevValues) => ({ + ...prevValues, + strokeBloodclotting: event.target.value, + })); + }} + > + } label="Yes" /> + } label="No" /> + + + + + + { + setValues((prevValues) => ({ + ...prevValues, + ifYesstrokeBloodclotting: event.target.value, + })); + }} + /> + + + + + Have you recently experienced dizziness, unexplained fatigue, weight loss or blood loss? + { + setValues((prevValues) => ({ + ...prevValues, + dizzinessFetigue: event.target.value, + })); + }} + > + } label="Yes" /> + } label="No" /> + + + + + + { + setValues((prevValues) => ({ + ...prevValues, + ifyesdizzinessFetigue: event.target.value, + })); + }} + /> + + + + + Are you currently taking anti-coagulant or blood thinning medication? + { + setValues((prevValues) => ({ + ...prevValues, + antiColligent: event.target.value, + })); + }} + > + } label="Yes" /> + } label="No" /> + + + + + + + Have you ever had any major illness, injuries, hospitalization or surgeries? + { + setValues((prevValues) => ({ + ...prevValues, + injuriesHospitalization: event.target.value, + })); + }} + > + } label="Yes" /> + } label="No" /> + + + + + + Please list current supplements or drugs you may be taking: + { + setValues((prevValues) => ({ + ...prevValues, + supplementsOrDrugs: event.target.value, + })); + }} + /> + + +
+ + ) +} \ No newline at end of file diff --git a/src/Components/PatientForm/PatientForm.tsx b/src/Components/PatientForm/PatientForm.tsx index 167fb9e..a83b9e2 100644 --- a/src/Components/PatientForm/PatientForm.tsx +++ b/src/Components/PatientForm/PatientForm.tsx @@ -15,6 +15,7 @@ import MuiAccordionDetails from '@mui/material/AccordionDetails'; import MedicalHistory from './MedicalHistorySection3'; import FamilyFormSection from './FamilyFormSection2'; import PainAnalysisSection4 from './PainAnalysisSection4'; +import PastTreatment5 from './PastTreatment5'; interface Patient { fullName: string; @@ -158,6 +159,16 @@ export default function PatientForm(){ + + + Patient's Past Treatment Details + + + + + + +