diff --git a/src/Components/PatientForm/PainAnalysisSection4.tsx b/src/Components/PatientForm/PainAnalysisSection4.tsx index 395006e..9c909a9 100644 --- a/src/Components/PatientForm/PainAnalysisSection4.tsx +++ b/src/Components/PatientForm/PainAnalysisSection4.tsx @@ -31,10 +31,12 @@ interface Patient { treatmentGoal: string|undefined, selfTreatment:string|undefined, )=> void + patientDataDiplay:any; + type:string; } -export default function PainAnalysisSection4({handleFormSection4Data}:Props){ +export default function PainAnalysisSection4({handleFormSection4Data,patientDataDiplay,type}:Props){ const [patient, setPatient] = React.useState({ chiefComplaint:'', painWorse:[], @@ -130,7 +132,8 @@ export default function PainAnalysisSection4({handleFormSection4Data}:Props){ chiefComplaint: e.target.value, })); }} - value={patient.chiefComplaint} + value={type=='display'?patientDataDiplay.chiefComplaint:patient.chiefComplaint} + disabled={type=='display'} /> @@ -141,22 +144,27 @@ export default function PainAnalysisSection4({handleFormSection4Data}:Props){ } label="Bending" + disabled={type=='display'} /> } label="Standing" + disabled={type=='display'} /> } label="Sitting" + disabled={type=='display'} /> } label="Walking" + disabled={type=='display'} /> } label="Others" + disabled={type=='display'} /> @@ -170,22 +178,27 @@ export default function PainAnalysisSection4({handleFormSection4Data}:Props){ } label="laying down" + disabled={type=='display'} /> } label="Standing" + disabled={type=='display'} /> } label="Sitting" + disabled={type=='display'} /> } label="Walking" + disabled={type=='display'} /> } label="Others" + disabled={type=='display'} /> @@ -198,22 +211,27 @@ export default function PainAnalysisSection4({handleFormSection4Data}:Props){ } label="Sharp" + disabled={type=='display'} /> } label="Dull/Ache" + disabled={type=='display'} /> } label="Throbbing" + disabled={type=='display'} /> } label="Tingling/Numbness/Burning" + disabled={type=='display'} /> } label="Others" + disabled={type=='display'} /> @@ -226,22 +244,27 @@ export default function PainAnalysisSection4({handleFormSection4Data}:Props){ } label="Morning" + disabled={type=='display'} /> } label="During day" + disabled={type=='display'} /> } label="Evening" + disabled={type=='display'} /> } label="Lying in bed" + disabled={type=='display'} /> } label="Others" + disabled={type=='display'} /> @@ -258,13 +281,13 @@ export default function PainAnalysisSection4({handleFormSection4Data}:Props){ painDuration: e.target.value, })); }} - value={patient.painDuration} + value={type=='display'?patientDataDiplay.painDuration:patient.painDuration} sx={{display:'flex', flexDirection:'row'}} > - } label="0-25%" /> - } label="25-50%" /> - } label="50-75%" /> - } label="75-100%" /> + } label="0-25%" /> + } label="25-50%" /> + } label="50-75%" /> + } label="75-100%" /> @@ -276,18 +299,22 @@ export default function PainAnalysisSection4({handleFormSection4Data}:Props){ } label="Muscle weakness" + disabled={type=='display'} /> } label="Bowel/Bladder problem" + disabled={type=='display'} /> } label="Digestion" + disabled={type=='display'} /> } label="Cardiac/Respiratory" + disabled={type=='display'} /> @@ -305,11 +332,11 @@ export default function PainAnalysisSection4({handleFormSection4Data}:Props){ selfTreatment: e.target.value, })); }} - value={patient.selfTreatment} + value={type=='display'?patientDataDiplay.selfTreatment:patient.selfTreatment} sx={{display:'flex', flexDirection:'row'}} > - } label="Yes" /> - } label="No" /> + } label="Yes" /> + } label="No" /> @@ -329,7 +356,8 @@ export default function PainAnalysisSection4({handleFormSection4Data}:Props){ treatmentGoal: e.target.value, })); }} - value={patient.treatmentGoal} + value={type=='display'?patientDataDiplay.treatmentGoal:patient.treatmentGoal} + disabled={type=='display'} /> diff --git a/src/Components/PatientForm/PatientForm.tsx b/src/Components/PatientForm/PatientForm.tsx index 20abffc..36f2133 100644 --- a/src/Components/PatientForm/PatientForm.tsx +++ b/src/Components/PatientForm/PatientForm.tsx @@ -419,9 +419,10 @@ export default function PatientForm({type}:Props){ + /> @@ -442,7 +443,11 @@ export default function PatientForm({type}:Props){ - +