Compare commits

..

No commits in common. "bfbc9a8f0d4828c6f94cfd3194315d2851ed2c4f" and "3991c7507e7f1ba3e256c8a2286b917bd8fd8ae9" have entirely different histories.

10 changed files with 101 additions and 97 deletions

View File

@ -16,6 +16,7 @@ const SignatureComponent = ({signature,setSignature}:Props) => {
// setSignature(sigCanvas.current.toDataURL()); // setSignature(sigCanvas.current.toDataURL());
const save = () => { const save = () => {
console.log("ajsdjby",sigCanvas.current.toDataURL())
setSignature(sigCanvas.current.toDataURL()); setSignature(sigCanvas.current.toDataURL());
}; };

View File

@ -98,7 +98,7 @@ export default function FamilyFormSection({
name='maritalStatus' name='maritalStatus'
defaultValue={ defaultValue={
type == 'display' type == 'display'
? patientDataDiplay && patientDataDiplay.maritalStatus ? patientDataDiplay.maritalStatus
: patient.maritalStatus : patient.maritalStatus
} }
sx={{ display: 'flex', flexDirection: 'row' }} sx={{ display: 'flex', flexDirection: 'row' }}
@ -167,7 +167,7 @@ export default function FamilyFormSection({
}} }}
value={ value={
type == 'display' type == 'display'
? patientDataDiplay && patientDataDiplay.numberOfChildren ? patientDataDiplay.numberOfChildren
: patient.numberOfChildren : patient.numberOfChildren
} }
disabled={type == 'display'} disabled={type == 'display'}
@ -196,7 +196,7 @@ export default function FamilyFormSection({
}} }}
value={ value={
type == 'display' type == 'display'
? patientDataDiplay && patientDataDiplay.occupation ? patientDataDiplay.occupation
: patient.occupation : patient.occupation
} }
disabled={type == 'display'} disabled={type == 'display'}
@ -225,7 +225,7 @@ export default function FamilyFormSection({
}} }}
value={ value={
type == 'display' type == 'display'
? patientDataDiplay && patientDataDiplay.hoursPerWeek ? patientDataDiplay.hoursPerWeek
: patient.hoursPerWeek : patient.hoursPerWeek
} }
disabled={type == 'display'} disabled={type == 'display'}
@ -251,7 +251,7 @@ export default function FamilyFormSection({
})); }));
}} }}
value={ value={
type == 'display' ? patientDataDiplay && patientDataDiplay.employer : patient.employer type == 'display' ? patientDataDiplay.employer : patient.employer
} }
disabled={type == 'display'} disabled={type == 'display'}
/> />
@ -279,7 +279,7 @@ export default function FamilyFormSection({
}} }}
value={ value={
type == 'display' type == 'display'
? patientDataDiplay && patientDataDiplay.businessPhone ? patientDataDiplay.businessPhone
: patient.businessPhone : patient.businessPhone
} }
disabled={type == 'display'} disabled={type == 'display'}
@ -322,7 +322,7 @@ export default function FamilyFormSection({
}} }}
value={ value={
type == 'display' type == 'display'
? patientDataDiplay && patientDataDiplay.spouseName ? patientDataDiplay.spouseName
: patient.spouseName : patient.spouseName
} }
disabled={type == 'display'} disabled={type == 'display'}
@ -350,7 +350,7 @@ export default function FamilyFormSection({
}} }}
value={ value={
type == 'display' type == 'display'
? patientDataDiplay && patientDataDiplay.spouseEmployer ? patientDataDiplay.spouseEmployer
: patient.spouseEmployer : patient.spouseEmployer
} }
disabled={type == 'display'} disabled={type == 'display'}
@ -379,7 +379,7 @@ export default function FamilyFormSection({
}} }}
value={ value={
type == 'display' type == 'display'
? patientDataDiplay && patientDataDiplay.spouseBusinessPhone ? patientDataDiplay.spouseBusinessPhone
: patient.spouseBusinessPhone : patient.spouseBusinessPhone
} }
disabled={type == 'display'} disabled={type == 'display'}
@ -412,7 +412,7 @@ export default function FamilyFormSection({
}} }}
value={ value={
type == 'display' type == 'display'
? patientDataDiplay && patientDataDiplay.emergencyContact ? patientDataDiplay.emergencyContact
: patient.emergencyContact : patient.emergencyContact
} }
disabled={type == 'display'} disabled={type == 'display'}
@ -440,7 +440,7 @@ export default function FamilyFormSection({
}} }}
value={ value={
type == 'display' type == 'display'
? patientDataDiplay && patientDataDiplay.relationship ? patientDataDiplay.relationship
: patient.relationship : patient.relationship
} }
disabled={type == 'display'} disabled={type == 'display'}
@ -469,7 +469,7 @@ export default function FamilyFormSection({
}} }}
value={ value={
type == 'display' type == 'display'
? patientDataDiplay && patientDataDiplay.spousePhone ? patientDataDiplay.spousePhone
: patient.spousePhone : patient.spousePhone
} }
disabled={type == 'display'} disabled={type == 'display'}

View File

@ -68,6 +68,7 @@ export default function MedicalHistoryForm({handleFormSection3Data,patientDataDi
) )
},[patient]) },[patient])
console.log("patientDataDiplay",patientDataDiplay)
return( return(
<> <>
<Grid item xs={12} className='collapsable-form-style '> <Grid item xs={12} className='collapsable-form-style '>
@ -92,7 +93,7 @@ export default function MedicalHistoryForm({handleFormSection3Data,patientDataDi
physicianname: e.target.value, physicianname: e.target.value,
})); }));
}} }}
value={type=='display'? patientDataDiplay && patientDataDiplay.physicianname:patient.physicianname} value={type=='display'?patientDataDiplay.physicianname:patient.physicianname}
disabled={type=='display'} disabled={type=='display'}
/> />
</Grid> </Grid>
@ -113,7 +114,7 @@ export default function MedicalHistoryForm({handleFormSection3Data,patientDataDi
physiciancity: e.target.value, physiciancity: e.target.value,
})); }));
}} }}
value={type=='display'? patientDataDiplay && patientDataDiplay.physiciancity:patient.physiciancity} value={type=='display'?patientDataDiplay.physiciancity:patient.physiciancity}
disabled={type=='display'} disabled={type=='display'}
/> />
</Grid> </Grid>
@ -134,7 +135,7 @@ export default function MedicalHistoryForm({handleFormSection3Data,patientDataDi
physicianstate: e.target.value, physicianstate: e.target.value,
})); }));
}} }}
value={type=='display'? patientDataDiplay && patientDataDiplay.physicianstate:patient.physicianstate} value={type=='display'?patientDataDiplay.physicianstate:patient.physicianstate}
disabled={type=='display'} disabled={type=='display'}
/> />
</Grid> </Grid>
@ -156,7 +157,7 @@ export default function MedicalHistoryForm({handleFormSection3Data,patientDataDi
physicianphone: e.target.value, physicianphone: e.target.value,
})); }));
}} }}
value={type=='display'? patientDataDiplay && patientDataDiplay.physicianphone:patient.physicianphone} value={type=='display'?patientDataDiplay.physicianphone:patient.physicianphone}
disabled={type=='display'} disabled={type=='display'}
/> />
</Grid> </Grid>
@ -189,7 +190,7 @@ export default function MedicalHistoryForm({handleFormSection3Data,patientDataDi
<FormLabel>Previous Chiropractic Care:</FormLabel> <FormLabel>Previous Chiropractic Care:</FormLabel>
<RadioGroup <RadioGroup
aria-labelledby="demo-radio-buttons-group-label" aria-labelledby="demo-radio-buttons-group-label"
defaultValue={type=='display'? patientDataDiplay && patientDataDiplay.haveChiropractor:patient.haveChiropractor} defaultValue={type=='display'?patientDataDiplay.haveChiropractor:patient.haveChiropractor}
name="radio-buttons-group" name="radio-buttons-group"
onChange={(e)=>{ onChange={(e)=>{
setPatient((prevValues) => ({ setPatient((prevValues) => ({
@ -222,7 +223,7 @@ export default function MedicalHistoryForm({handleFormSection3Data,patientDataDi
chiropractorName: e.target.value, chiropractorName: e.target.value,
})); }));
}} }}
value={type=='display'? patientDataDiplay && patientDataDiplay.chiropractorName:patient.chiropractorName} value={type=='display'?patientDataDiplay.chiropractorName:patient.chiropractorName}
disabled={type=='display'} disabled={type=='display'}
/> />
</Grid> </Grid>
@ -244,7 +245,7 @@ export default function MedicalHistoryForm({handleFormSection3Data,patientDataDi
chiropractorState: e.target.value, chiropractorState: e.target.value,
})); }));
}} }}
value={type=='display'? patientDataDiplay && patientDataDiplay.chiropractorState:patient.chiropractorState} value={type=='display'?patientDataDiplay.chiropractorState:patient.chiropractorState}
disabled={type=='display'} disabled={type=='display'}
/> />
</Grid> </Grid>
@ -256,7 +257,7 @@ export default function MedicalHistoryForm({handleFormSection3Data,patientDataDi
<RadioGroup <RadioGroup
// value={patient.gender} // value={patient.gender}
aria-labelledby="demo-radio-buttons-group-label" aria-labelledby="demo-radio-buttons-group-label"
defaultValue={type=='display'? patientDataDiplay && patientDataDiplay.xray:patient.xray} defaultValue={type=='display'?patientDataDiplay.xray:patient.xray}
name="radio-buttons-group" name="radio-buttons-group"
onChange={(e)=>{ onChange={(e)=>{
setPatient((prevValues) => ({ setPatient((prevValues) => ({
@ -278,7 +279,7 @@ export default function MedicalHistoryForm({handleFormSection3Data,patientDataDi
<RadioGroup <RadioGroup
// value={patient.gender} // value={patient.gender}
aria-labelledby="demo-radio-buttons-group-label" aria-labelledby="demo-radio-buttons-group-label"
defaultValue={type=='display'? patientDataDiplay && patientDataDiplay.reference:patient.reference} defaultValue={type=='display'?patientDataDiplay.reference:patient.reference}
name="radio-buttons-group" name="radio-buttons-group"
onChange={(e)=>{ onChange={(e)=>{
setPatient((prevValues) => ({ setPatient((prevValues) => ({
@ -304,7 +305,7 @@ export default function MedicalHistoryForm({handleFormSection3Data,patientDataDi
<RadioGroup <RadioGroup
// value={patient.gender} // value={patient.gender}
aria-labelledby="demo-radio-buttons-group-label" aria-labelledby="demo-radio-buttons-group-label"
defaultValue={type=='display'? patientDataDiplay && patientDataDiplay.cellPhoneProvider:patient.cellPhoneProvider} defaultValue={type=='display'?patientDataDiplay.cellPhoneProvider:patient.cellPhoneProvider}
name="radio-buttons-group" name="radio-buttons-group"
onChange={(e)=>{ onChange={(e)=>{
setPatient((prevValues) => ({ setPatient((prevValues) => ({

View File

@ -92,7 +92,7 @@ export default function OtherDetails8({
label='' label=''
value={ value={
type == 'display' type == 'display'
? patientDataDiplay && patientDataDiplay.familyHistory ? patientDataDiplay.familyHistory
: patient.familyHistory : patient.familyHistory
} }
disabled={type == 'display'} disabled={type == 'display'}
@ -111,7 +111,7 @@ export default function OtherDetails8({
<RadioGroup <RadioGroup
sx={{ display: 'flex', flexDirection: 'row' }} sx={{ display: 'flex', flexDirection: 'row' }}
defaultValue={ defaultValue={
type == 'display' ? patientDataDiplay && patientDataDiplay.sleep : patient.sleep type == 'display' ? patientDataDiplay.sleep : patient.sleep
} }
onChange={(event) => { onChange={(event) => {
setPatient((prevValues) => ({ setPatient((prevValues) => ({
@ -148,7 +148,7 @@ export default function OtherDetails8({
<RadioGroup <RadioGroup
sx={{ display: 'flex', flexDirection: 'row' }} sx={{ display: 'flex', flexDirection: 'row' }}
defaultValue={ defaultValue={
type == 'display' ? patientDataDiplay && patientDataDiplay.pillow : patient.pillow type == 'display' ? patientDataDiplay.pillow : patient.pillow
} }
onChange={(event) => { onChange={(event) => {
setPatient((prevValues) => ({ setPatient((prevValues) => ({
@ -180,7 +180,7 @@ export default function OtherDetails8({
sx={{ display: 'flex', flexDirection: 'row' }} sx={{ display: 'flex', flexDirection: 'row' }}
defaultValue={ defaultValue={
type == 'display' type == 'display'
? patientDataDiplay && patientDataDiplay.orthotics ? patientDataDiplay.orthotics
: patient.orthotics : patient.orthotics
} }
onChange={(event) => { onChange={(event) => {
@ -222,7 +222,7 @@ export default function OtherDetails8({
<DatePicker <DatePicker
value={ value={
type == 'display' type == 'display'
? patientDataDiplay && patientDataDiplay.brestExam ? patientDataDiplay.brestExam
: patient.brestExam : patient.brestExam
} }
disabled={type == 'display'} disabled={type == 'display'}
@ -252,7 +252,7 @@ export default function OtherDetails8({
sx={{ display: 'flex', flexDirection: 'row' }} sx={{ display: 'flex', flexDirection: 'row' }}
defaultValue={ defaultValue={
type == 'display' type == 'display'
? patientDataDiplay && patientDataDiplay.pregnancy ? patientDataDiplay.pregnancy
: patient.pregnancy : patient.pregnancy
} }
onChange={(event) => { onChange={(event) => {
@ -294,7 +294,7 @@ export default function OtherDetails8({
<DatePicker <DatePicker
value={ value={
type == 'display' type == 'display'
? patientDataDiplay && patientDataDiplay.menstralCycle ? patientDataDiplay.menstralCycle
: patient.menstralCycle : patient.menstralCycle
} }
disabled={type == 'display'} disabled={type == 'display'}

View File

@ -165,7 +165,7 @@ export default function PainAnalysisSection4({
}} }}
value={ value={
type == 'display' type == 'display'
? patientDataDiplay && patientDataDiplay.chiefComplaint ? patientDataDiplay.chiefComplaint
: patient.chiefComplaint : patient.chiefComplaint
} }
disabled={type == 'display'} disabled={type == 'display'}
@ -406,7 +406,7 @@ export default function PainAnalysisSection4({
}} }}
value={ value={
type == 'display' type == 'display'
? patientDataDiplay && patientDataDiplay.painDuration ? patientDataDiplay.painDuration
: patient.painDuration : patient.painDuration
} }
sx={{ display: 'flex', flexDirection: 'row' }} sx={{ display: 'flex', flexDirection: 'row' }}
@ -513,7 +513,7 @@ export default function PainAnalysisSection4({
}} }}
value={ value={
type == 'display' type == 'display'
? patientDataDiplay && patientDataDiplay.selfTreatment ? patientDataDiplay.selfTreatment
: patient.selfTreatment : patient.selfTreatment
} }
sx={{ display: 'flex', flexDirection: 'row' }} sx={{ display: 'flex', flexDirection: 'row' }}
@ -566,7 +566,7 @@ export default function PainAnalysisSection4({
}} }}
value={ value={
type == 'display' type == 'display'
? patientDataDiplay && patientDataDiplay.treatmentGoal ? patientDataDiplay.treatmentGoal
: patient.treatmentGoal : patient.treatmentGoal
} }
disabled={type == 'display'} disabled={type == 'display'}

View File

@ -98,7 +98,7 @@ export default function PastTreatment5({
name='painDuration' name='painDuration'
defaultValue={ defaultValue={
type == 'display' type == 'display'
? patientDataDiplay && patientDataDiplay.generalHealth ? patientDataDiplay.generalHealth
: patient.generalHealth : patient.generalHealth
} }
sx={{ display: 'flex', flexDirection: 'row' }} sx={{ display: 'flex', flexDirection: 'row' }}
@ -156,7 +156,7 @@ export default function PastTreatment5({
name='painDuration' name='painDuration'
defaultValue={ defaultValue={
type == 'display' type == 'display'
? patientDataDiplay && patientDataDiplay.presentProblemBefore ? patientDataDiplay.presentProblemBefore
: patient.presentProblemBefore : patient.presentProblemBefore
} }
sx={{ display: 'flex', flexDirection: 'row' }} sx={{ display: 'flex', flexDirection: 'row' }}
@ -225,7 +225,7 @@ export default function PastTreatment5({
} }
value={ value={
type == 'display' type == 'display'
? patientDataDiplay && patientDataDiplay.ifYestreatmentProvided ? patientDataDiplay.ifYestreatmentProvided
: patient.ifYestreatmentProvided : patient.ifYestreatmentProvided
} }
onChange={(event) => { onChange={(event) => {
@ -254,7 +254,7 @@ export default function PastTreatment5({
} }
value={ value={
type == 'display' type == 'display'
? patientDataDiplay && patientDataDiplay.ifYesOutcome ? patientDataDiplay.ifYesOutcome
: patient.ifYesOutcome : patient.ifYesOutcome
} }
onChange={(event) => { onChange={(event) => {
@ -279,12 +279,12 @@ export default function PastTreatment5({
name='painDuration' name='painDuration'
defaultValue={ defaultValue={
type == 'display' type == 'display'
? patientDataDiplay && patientDataDiplay.strokeBloodclotting ? patientDataDiplay.strokeBloodclotting
: patient.strokeBloodclotting : patient.strokeBloodclotting
} }
value={ value={
type == 'display' type == 'display'
? patientDataDiplay && patientDataDiplay.strokeBloodclotting ? patientDataDiplay.strokeBloodclotting
: patient.strokeBloodclotting : patient.strokeBloodclotting
} }
sx={{ display: 'flex', flexDirection: 'row' }} sx={{ display: 'flex', flexDirection: 'row' }}
@ -326,7 +326,7 @@ export default function PastTreatment5({
name='treatmentGoal' name='treatmentGoal'
value={ value={
type == 'display' type == 'display'
? patientDataDiplay && patientDataDiplay.ifYesstrokeBloodclotting ? patientDataDiplay.ifYesstrokeBloodclotting
: patient.ifYesstrokeBloodclotting : patient.ifYesstrokeBloodclotting
} }
disabled={ disabled={
@ -356,7 +356,7 @@ export default function PastTreatment5({
sx={{ display: 'flex', flexDirection: 'row' }} sx={{ display: 'flex', flexDirection: 'row' }}
defaultValue={ defaultValue={
type == 'display' type == 'display'
? patientDataDiplay && patientDataDiplay.dizzinessFetigue ? patientDataDiplay.dizzinessFetigue
: patient.dizzinessFetigue : patient.dizzinessFetigue
} }
onChange={(event) => { onChange={(event) => {
@ -398,7 +398,7 @@ export default function PastTreatment5({
disabled={patient.dizzinessFetigue !== 'Yes'} disabled={patient.dizzinessFetigue !== 'Yes'}
value={ value={
type == 'display' type == 'display'
? patientDataDiplay && patientDataDiplay.ifyesdizzinessFetigue ? patientDataDiplay.ifyesdizzinessFetigue
: patient.ifyesdizzinessFetigue : patient.ifyesdizzinessFetigue
} }
onChange={(event) => { onChange={(event) => {
@ -425,7 +425,7 @@ export default function PastTreatment5({
sx={{ display: 'flex', flexDirection: 'row' }} sx={{ display: 'flex', flexDirection: 'row' }}
defaultValue={ defaultValue={
type == 'display' type == 'display'
? patientDataDiplay && patientDataDiplay.antiColligent ? patientDataDiplay.antiColligent
: patient.antiColligent : patient.antiColligent
} }
onChange={(event) => { onChange={(event) => {
@ -465,7 +465,7 @@ export default function PastTreatment5({
name='painDuration' name='painDuration'
defaultValue={ defaultValue={
type == 'display' type == 'display'
? patientDataDiplay && patientDataDiplay.injuriesHospitalization ? patientDataDiplay.injuriesHospitalization
: patient.injuriesHospitalization : patient.injuriesHospitalization
} }
sx={{ display: 'flex', flexDirection: 'row' }} sx={{ display: 'flex', flexDirection: 'row' }}
@ -519,7 +519,7 @@ export default function PastTreatment5({
name='treatmentGoal' name='treatmentGoal'
defaultValue={ defaultValue={
type == 'display' type == 'display'
? patientDataDiplay && patientDataDiplay.supplementsOrDrugs ? patientDataDiplay.supplementsOrDrugs
: patient.supplementsOrDrugs : patient.supplementsOrDrugs
} }
disabled={type == 'display'} disabled={type == 'display'}

View File

@ -650,11 +650,13 @@ export default function PatientForm({ type }: Props) {
<Grid container spacing={2} flexDirection={'row'}> <Grid container spacing={2} flexDirection={'row'}>
{type !== 'display' ? ( {type !== 'display' ? (
<> <>
<Grid item className='collapsable-form-style'>
<Grid item className='collapsable-form-style'> <FormLabel>Signature:</FormLabel>
<FormLabel sx={{marginLeft:'10px'}}> Signature:</FormLabel> <SignatureComponent
<SignatureComponent signature={signature} setSignature={setSignature} /> signature={signature}
</Grid> setSignature={setSignature}
/>
</Grid>
<Grid item> <Grid item>
<FormLabel sx={{ margin: 0, padding: 0 }}> <FormLabel sx={{ margin: 0, padding: 0 }}>

View File

@ -109,7 +109,7 @@ export default function PersonalSection({
name='fullName' name='fullName'
placeholder='Please enter your name' placeholder='Please enter your name'
value={ value={
type == 'display' ? patientDataDiplay && patientDataDiplay.fullName : patient.fullName type == 'display' ? patientDataDiplay.fullName : patient.fullName
} }
disabled={type == 'display'} disabled={type == 'display'}
onChange={(e) => { onChange={(e) => {
@ -155,7 +155,7 @@ export default function PersonalSection({
placeholder='Please enter your cell Phone number' placeholder='Please enter your cell Phone number'
value={ value={
type == 'display' type == 'display'
? patientDataDiplay && patientDataDiplay.cellPhone ? patientDataDiplay.cellPhone
: patient.cellPhone : patient.cellPhone
} }
disabled={type == 'display'} disabled={type == 'display'}
@ -208,7 +208,7 @@ export default function PersonalSection({
placeholder='Please enter your home phone' placeholder='Please enter your home phone'
value={ value={
type == 'display' type == 'display'
? patientDataDiplay && patientDataDiplay.homePhone ? patientDataDiplay.homePhone
: patient.homePhone : patient.homePhone
} }
disabled={type == 'display'} disabled={type == 'display'}
@ -238,7 +238,7 @@ export default function PersonalSection({
label='Email' label='Email'
name='email' name='email'
placeholder='Please enter your email' placeholder='Please enter your email'
value={type == 'display' ? patientDataDiplay && patientDataDiplay.email : patient.email} value={type == 'display' ? patientDataDiplay.email : patient.email}
disabled={type == 'display'} disabled={type == 'display'}
onChange={(e) => { onChange={(e) => {
setPatient((prevValues: any) => ({ setPatient((prevValues: any) => ({
@ -281,7 +281,7 @@ export default function PersonalSection({
name='age' name='age'
type='number' type='number'
placeholder='Please enter your age' placeholder='Please enter your age'
value={type == 'display' ? patientDataDiplay && patientDataDiplay.age : patient.age} value={type == 'display' ? patientDataDiplay.age : patient.age}
disabled={type == 'display'} disabled={type == 'display'}
onChange={(e) => { onChange={(e) => {
setPatient((prevValues: any) => ({ setPatient((prevValues: any) => ({
@ -322,7 +322,7 @@ export default function PersonalSection({
label='Date of Birth' label='Date of Birth'
value={ value={
type == 'display' type == 'display'
? patientDataDiplay && patientDataDiplay.dateOfBirth ? patientDataDiplay.dateOfBirth
: birthDateValue : birthDateValue
} }
disabled={type == 'display'} disabled={type == 'display'}
@ -352,7 +352,7 @@ export default function PersonalSection({
name='socialSecurityNumber' name='socialSecurityNumber'
value={ value={
type == 'display' type == 'display'
? patientDataDiplay && patientDataDiplay.socialSecurityNumber ? patientDataDiplay.socialSecurityNumber
: patient.socialSecurityNumber : patient.socialSecurityNumber
} }
disabled={type == 'display'} disabled={type == 'display'}
@ -384,7 +384,7 @@ export default function PersonalSection({
name='mailingAddress' name='mailingAddress'
value={ value={
type == 'display' type == 'display'
? patientDataDiplay && patientDataDiplay.mailingAddress ? patientDataDiplay.mailingAddress
: patient.mailingAddress : patient.mailingAddress
} }
disabled={type == 'display'} disabled={type == 'display'}
@ -429,7 +429,7 @@ export default function PersonalSection({
variant='outlined' variant='outlined'
label='State' label='State'
name='state' name='state'
value={type == 'display' ? patientDataDiplay && patientDataDiplay.state : patient.state} value={type == 'display' ? patientDataDiplay.state : patient.state}
disabled={type == 'display'} disabled={type == 'display'}
onChange={(e) => { onChange={(e) => {
setPatient((prevValues: any) => ({ setPatient((prevValues: any) => ({
@ -453,7 +453,7 @@ export default function PersonalSection({
variant='outlined' variant='outlined'
label='City' label='City'
name='city' name='city'
value={type == 'display' ? patientDataDiplay && patientDataDiplay.city : patient.city} value={type == 'display' ? patientDataDiplay.city : patient.city}
disabled={type == 'display'} disabled={type == 'display'}
onChange={(e) => { onChange={(e) => {
setPatient((prevValues: any) => ({ setPatient((prevValues: any) => ({
@ -478,7 +478,7 @@ export default function PersonalSection({
label='Zip Code' label='Zip Code'
name='zipCode' name='zipCode'
value={ value={
type == 'display' ? patientDataDiplay && patientDataDiplay.zipCode : patient.zipCode type == 'display' ? patientDataDiplay.zipCode : patient.zipCode
} }
disabled={type == 'display'} disabled={type == 'display'}
onChange={(e) => { onChange={(e) => {
@ -507,7 +507,7 @@ export default function PersonalSection({
<RadioGroup <RadioGroup
aria-labelledby='demo-radio-buttons-group-label' aria-labelledby='demo-radio-buttons-group-label'
defaultValue={ defaultValue={
type == 'display' ? patientDataDiplay && patientDataDiplay.gender : patient.gender type == 'display' ? patientDataDiplay.gender : patient.gender
} }
name='radio-buttons-group' name='radio-buttons-group'
onChange={(e) => { onChange={(e) => {

View File

@ -103,7 +103,7 @@ export default function RecreationalHobbiesSection7({handleFormSection7Data,pati
multiline multiline
variant="outlined" variant="outlined"
label="" label=""
value={type=='display'?patientDataDiplay && patientDataDiplay.hobbies:patient.hobbies} value={type=='display'?patientDataDiplay.hobbies:patient.hobbies}
disabled={type=='display'} disabled={type=='display'}
onChange={(event:any) => { onChange={(event:any) => {
setPatient((prevValues) => ({ setPatient((prevValues) => ({
@ -119,7 +119,7 @@ export default function RecreationalHobbiesSection7({handleFormSection7Data,pati
<FormLabel>Your education level:</FormLabel> <FormLabel>Your education level:</FormLabel>
<RadioGroup <RadioGroup
sx={{display:'flex', flexDirection:'row'}} sx={{display:'flex', flexDirection:'row'}}
defaultValue={type=='display'?patientDataDiplay && patientDataDiplay.educationLevel:patient.educationLevel} defaultValue={type=='display'?patientDataDiplay.educationLevel:patient.educationLevel}
onChange={(event) => { onChange={(event) => {
setPatient((prevValues) => ({ setPatient((prevValues) => ({
...prevValues, ...prevValues,
@ -146,7 +146,7 @@ export default function RecreationalHobbiesSection7({handleFormSection7Data,pati
<RadioGroup <RadioGroup
name="painDuration" name="painDuration"
sx={{display:'flex', flexDirection:'row'}} sx={{display:'flex', flexDirection:'row'}}
defaultValue={type=='display'?patientDataDiplay && patientDataDiplay.excercise:patient.excercise} defaultValue={type=='display'?patientDataDiplay.excercise:patient.excercise}
onChange={(event) => { onChange={(event) => {
setPatient((prevValues) => ({ setPatient((prevValues) => ({
...prevValues, ...prevValues,
@ -170,7 +170,7 @@ export default function RecreationalHobbiesSection7({handleFormSection7Data,pati
variant="outlined" variant="outlined"
label="Times per week?" label="Times per week?"
name='treatmentGoal' name='treatmentGoal'
value={type=='display'?patientDataDiplay && patientDataDiplay.excerciseExplanation:patient.excerciseExplanation} value={type=='display'?patientDataDiplay.excerciseExplanation:patient.excerciseExplanation}
onChange={(event) => { onChange={(event) => {
setPatient((prevValues) => ({ setPatient((prevValues) => ({
...prevValues, ...prevValues,
@ -190,7 +190,7 @@ export default function RecreationalHobbiesSection7({handleFormSection7Data,pati
<RadioGroup <RadioGroup
name="painDuration" name="painDuration"
sx={{display:'flex', flexDirection:'row'}} sx={{display:'flex', flexDirection:'row'}}
defaultValue={type=='display'?patientDataDiplay && patientDataDiplay.tobacco:patient.tobacco} defaultValue={type=='display'?patientDataDiplay.tobacco:patient.tobacco}
onChange={(event) => { onChange={(event) => {
setPatient((prevValues) => ({ setPatient((prevValues) => ({
...prevValues, ...prevValues,
@ -211,7 +211,7 @@ export default function RecreationalHobbiesSection7({handleFormSection7Data,pati
sm={12} className='collapsable-form-style-form7'> sm={12} className='collapsable-form-style-form7'>
<TextField <TextField
disabled={patient.tobacco!=='Yes'||type=='display'} disabled={patient.tobacco!=='Yes'||type=='display'}
value={type=='display'?patientDataDiplay && patientDataDiplay.tobaccoExplanation:patient.tobaccoExplanation} value={type=='display'?patientDataDiplay.tobaccoExplanation:patient.tobaccoExplanation}
variant="outlined" variant="outlined"
label="Packs/Cans per day(If you have quit, when did you quit?)" label="Packs/Cans per day(If you have quit, when did you quit?)"
name='treatmentGoal' name='treatmentGoal'
@ -234,7 +234,7 @@ export default function RecreationalHobbiesSection7({handleFormSection7Data,pati
<RadioGroup <RadioGroup
name="painDuration" name="painDuration"
sx={{display:'flex', flexDirection:'row'}} sx={{display:'flex', flexDirection:'row'}}
defaultValue={type=='display'?patientDataDiplay && patientDataDiplay.alcohol:patient.alcohol} defaultValue={type=='display'?patientDataDiplay.alcohol:patient.alcohol}
onChange={(event) => { onChange={(event) => {
setPatient((prevValues) => ({ setPatient((prevValues) => ({
...prevValues, ...prevValues,
@ -255,7 +255,7 @@ export default function RecreationalHobbiesSection7({handleFormSection7Data,pati
sm={12} className='collapsable-form-style-form7'> sm={12} className='collapsable-form-style-form7'>
<TextField <TextField
disabled={patient.alcohol!=='Yes'||type=='display'} disabled={patient.alcohol!=='Yes'||type=='display'}
value={type=='display'?patientDataDiplay && patientDataDiplay.alcoholExplanation:patient.alcoholExplanation} value={type=='display'?patientDataDiplay.alcoholExplanation:patient.alcoholExplanation}
variant="outlined" variant="outlined"
label="How many drinks per week?" label="How many drinks per week?"
name='treatmentGoal' name='treatmentGoal'
@ -278,7 +278,7 @@ export default function RecreationalHobbiesSection7({handleFormSection7Data,pati
<RadioGroup <RadioGroup
name="painDuration" name="painDuration"
sx={{display:'flex', flexDirection:'row'}} sx={{display:'flex', flexDirection:'row'}}
defaultValue={type=='display'?patientDataDiplay && patientDataDiplay.healthyDiet:patient.healthyDiet} defaultValue={type=='display'?patientDataDiplay.healthyDiet:patient.healthyDiet}
onChange={(event) => { onChange={(event) => {
setPatient((prevValues) => ({ setPatient((prevValues) => ({
...prevValues, ...prevValues,
@ -299,7 +299,7 @@ export default function RecreationalHobbiesSection7({handleFormSection7Data,pati
sm={12} className='collapsable-form-style-form7'> sm={12} className='collapsable-form-style-form7'>
<TextField <TextField
disabled={patient.healthyDiet!=='No'||type=='display'} disabled={patient.healthyDiet!=='No'||type=='display'}
value={type=='display'?patientDataDiplay && patientDataDiplay.healthyDietExplanation:patient.healthyDietExplanation} value={type=='display'?patientDataDiplay.healthyDietExplanation:patient.healthyDietExplanation}
variant="outlined" variant="outlined"
label="If no, explain" label="If no, explain"
name='treatmentGoal' name='treatmentGoal'
@ -322,7 +322,7 @@ export default function RecreationalHobbiesSection7({handleFormSection7Data,pati
<RadioGroup <RadioGroup
name="painDuration" name="painDuration"
sx={{display:'flex', flexDirection:'row'}} sx={{display:'flex', flexDirection:'row'}}
defaultValue={type=='display'?patientDataDiplay && patientDataDiplay.sleep:patient.sleep} defaultValue={type=='display'?patientDataDiplay.sleep:patient.sleep}
onChange={(event) => { onChange={(event) => {
setPatient((prevValues) => ({ setPatient((prevValues) => ({
...prevValues, ...prevValues,
@ -343,7 +343,7 @@ export default function RecreationalHobbiesSection7({handleFormSection7Data,pati
sm={12} className='collapsable-form-style-form7'> sm={12} className='collapsable-form-style-form7'>
<TextField <TextField
disabled={patient.sleep!=='No'||type=='display'} disabled={patient.sleep!=='No'||type=='display'}
value={type=='display'?patientDataDiplay && patientDataDiplay.sleepExplanation:patient.sleepExplanation} value={type=='display'?patientDataDiplay.sleepExplanation:patient.sleepExplanation}
variant="outlined" variant="outlined"
label="If no, explain" label="If no, explain"
name='treatmentGoal' name='treatmentGoal'
@ -366,7 +366,7 @@ export default function RecreationalHobbiesSection7({handleFormSection7Data,pati
<RadioGroup <RadioGroup
name="painDuration" name="painDuration"
sx={{display:'flex', flexDirection:'row'}} sx={{display:'flex', flexDirection:'row'}}
defaultValue={type=='display'?patientDataDiplay && patientDataDiplay.workSchool:patient.workSchool} defaultValue={type=='display'?patientDataDiplay.workSchool:patient.workSchool}
onChange={(event) => { onChange={(event) => {
setPatient((prevValues) => ({ setPatient((prevValues) => ({
...prevValues, ...prevValues,
@ -387,7 +387,7 @@ export default function RecreationalHobbiesSection7({handleFormSection7Data,pati
sm={12} className='collapsable-form-style-form7'> sm={12} className='collapsable-form-style-form7'>
<TextField <TextField
disabled={patient.workSchool!=='Yes'||type=='display'} disabled={patient.workSchool!=='Yes'||type=='display'}
value={type=='display'?patientDataDiplay && patientDataDiplay.workSchool:patient.workSchool} value={type=='display'?patientDataDiplay.workSchool:patient.workSchool}
variant="outlined" variant="outlined"
label="If yes, explain" label="If yes, explain"
name='treatmentGoal' name='treatmentGoal'
@ -410,7 +410,7 @@ export default function RecreationalHobbiesSection7({handleFormSection7Data,pati
<RadioGroup <RadioGroup
name="painDuration" name="painDuration"
sx={{display:'flex', flexDirection:'row'}} sx={{display:'flex', flexDirection:'row'}}
defaultValue={type=='display'?patientDataDiplay && patientDataDiplay.familyLife:patient.familyLife} defaultValue={type=='display'?patientDataDiplay.familyLife:patient.familyLife}
onChange={(event) => { onChange={(event) => {
setPatient((prevValues) => ({ setPatient((prevValues) => ({
...prevValues, ...prevValues,
@ -431,7 +431,7 @@ export default function RecreationalHobbiesSection7({handleFormSection7Data,pati
sm={12} className='collapsable-form-style-form7'> sm={12} className='collapsable-form-style-form7'>
<TextField <TextField
disabled={patient.familyLife!=='Yes'||type=='display'} disabled={patient.familyLife!=='Yes'||type=='display'}
value={type=='display'?patientDataDiplay && patientDataDiplay.familyLifeExplanation:patient.familyLifeExplanation} value={type=='display'?patientDataDiplay.familyLifeExplanation:patient.familyLifeExplanation}
variant="outlined" variant="outlined"
label="If yes, explain" label="If yes, explain"
name='treatmentGoal' name='treatmentGoal'
@ -454,7 +454,7 @@ export default function RecreationalHobbiesSection7({handleFormSection7Data,pati
<RadioGroup <RadioGroup
name="painDuration" name="painDuration"
sx={{display:'flex', flexDirection:'row'}} sx={{display:'flex', flexDirection:'row'}}
defaultValue={type=='display'?patientDataDiplay && patientDataDiplay.drugs:patient.drugs} defaultValue={type=='display'?patientDataDiplay.drugs:patient.drugs}
onChange={(event) => { onChange={(event) => {
setPatient((prevValues) => ({ setPatient((prevValues) => ({
...prevValues, ...prevValues,
@ -475,7 +475,7 @@ export default function RecreationalHobbiesSection7({handleFormSection7Data,pati
sm={12} className='collapsable-form-style-form7'> sm={12} className='collapsable-form-style-form7'>
<TextField <TextField
disabled={patient.drugs!=='Yes'||type=='display'} disabled={patient.drugs!=='Yes'||type=='display'}
value={type=='display'?patientDataDiplay && patientDataDiplay.drugsExplanation:patient.drugsExplanation} value={type=='display'?patientDataDiplay.drugsExplanation:patient.drugsExplanation}
variant="outlined" variant="outlined"
label="If yes, explain" label="If yes, explain"
name='treatmentGoal' name='treatmentGoal'

View File

@ -121,7 +121,7 @@ export default function SystemReviewSection6({
<RadioGroup <RadioGroup
name='painDuration' name='painDuration'
defaultValue={ defaultValue={
type == 'display' ? patientDataDiplay && patientDataDiplay.eyes : patient.eyes type == 'display' ? patientDataDiplay.eyes : patient.eyes
} }
sx={{ display: 'flex', flexDirection: 'row' }} sx={{ display: 'flex', flexDirection: 'row' }}
onChange={(event) => { onChange={(event) => {
@ -161,7 +161,7 @@ export default function SystemReviewSection6({
name='painDuration' name='painDuration'
defaultValue={ defaultValue={
type == 'display' type == 'display'
? patientDataDiplay && patientDataDiplay.IntestinesBowls ? patientDataDiplay.IntestinesBowls
: patient.IntestinesBowls : patient.IntestinesBowls
} }
sx={{ display: 'flex', flexDirection: 'row' }} sx={{ display: 'flex', flexDirection: 'row' }}
@ -202,7 +202,7 @@ export default function SystemReviewSection6({
name='painDuration' name='painDuration'
defaultValue={ defaultValue={
type == 'display' type == 'display'
? patientDataDiplay && patientDataDiplay.jointsBones ? patientDataDiplay.jointsBones
: patient.jointsBones : patient.jointsBones
} }
sx={{ display: 'flex', flexDirection: 'row' }} sx={{ display: 'flex', flexDirection: 'row' }}
@ -243,7 +243,7 @@ export default function SystemReviewSection6({
name='painDuration' name='painDuration'
defaultValue={ defaultValue={
type == 'display' type == 'display'
? patientDataDiplay && patientDataDiplay.allergies ? patientDataDiplay.allergies
: patient.allergies : patient.allergies
} }
sx={{ display: 'flex', flexDirection: 'row' }} sx={{ display: 'flex', flexDirection: 'row' }}
@ -284,7 +284,7 @@ export default function SystemReviewSection6({
name='painDuration' name='painDuration'
defaultValue={ defaultValue={
type == 'display' type == 'display'
? patientDataDiplay && patientDataDiplay.earsNoseMouth ? patientDataDiplay.earsNoseMouth
: patient.earsNoseMouth : patient.earsNoseMouth
} }
sx={{ display: 'flex', flexDirection: 'row' }} sx={{ display: 'flex', flexDirection: 'row' }}
@ -324,7 +324,7 @@ export default function SystemReviewSection6({
<RadioGroup <RadioGroup
name='painDuration' name='painDuration'
defaultValue={ defaultValue={
type == 'display' ? patientDataDiplay && patientDataDiplay.urinary : patient.urinary type == 'display' ? patientDataDiplay.urinary : patient.urinary
} }
sx={{ display: 'flex', flexDirection: 'row' }} sx={{ display: 'flex', flexDirection: 'row' }}
onChange={(event) => { onChange={(event) => {
@ -363,7 +363,7 @@ export default function SystemReviewSection6({
<RadioGroup <RadioGroup
name='painDuration' name='painDuration'
defaultValue={ defaultValue={
type == 'display' ? patientDataDiplay && patientDataDiplay.skin : patient.skin type == 'display' ? patientDataDiplay.skin : patient.skin
} }
sx={{ display: 'flex', flexDirection: 'row' }} sx={{ display: 'flex', flexDirection: 'row' }}
onChange={(event) => { onChange={(event) => {
@ -403,7 +403,7 @@ export default function SystemReviewSection6({
name='painDuration' name='painDuration'
defaultValue={ defaultValue={
type == 'display' type == 'display'
? patientDataDiplay && patientDataDiplay.psychological ? patientDataDiplay.psychological
: patient.psychological : patient.psychological
} }
sx={{ display: 'flex', flexDirection: 'row' }} sx={{ display: 'flex', flexDirection: 'row' }}
@ -443,7 +443,7 @@ export default function SystemReviewSection6({
<RadioGroup <RadioGroup
name='painDuration' name='painDuration'
defaultValue={ defaultValue={
type == 'display' ? patientDataDiplay && patientDataDiplay.heart : patient.heart type == 'display' ? patientDataDiplay.heart : patient.heart
} }
sx={{ display: 'flex', flexDirection: 'row' }} sx={{ display: 'flex', flexDirection: 'row' }}
onChange={(event) => { onChange={(event) => {
@ -482,7 +482,7 @@ export default function SystemReviewSection6({
<RadioGroup <RadioGroup
name='painDuration' name='painDuration'
defaultValue={ defaultValue={
type == 'display' ? patientDataDiplay && patientDataDiplay.muscles : patient.muscles type == 'display' ? patientDataDiplay.muscles : patient.muscles
} }
sx={{ display: 'flex', flexDirection: 'row' }} sx={{ display: 'flex', flexDirection: 'row' }}
onChange={(event) => { onChange={(event) => {
@ -522,7 +522,7 @@ export default function SystemReviewSection6({
name='painDuration' name='painDuration'
defaultValue={ defaultValue={
type == 'display' type == 'display'
? patientDataDiplay && patientDataDiplay.internalOrgans ? patientDataDiplay.internalOrgans
: patient.internalOrgans : patient.internalOrgans
} }
sx={{ display: 'flex', flexDirection: 'row' }} sx={{ display: 'flex', flexDirection: 'row' }}
@ -563,7 +563,7 @@ export default function SystemReviewSection6({
name='painDuration' name='painDuration'
defaultValue={ defaultValue={
type == 'display' type == 'display'
? patientDataDiplay && patientDataDiplay.gynecological ? patientDataDiplay.gynecological
: patient.gynecological : patient.gynecological
} }
sx={{ display: 'flex', flexDirection: 'row' }} sx={{ display: 'flex', flexDirection: 'row' }}
@ -605,7 +605,7 @@ export default function SystemReviewSection6({
name='painDuration' name='painDuration'
defaultValue={ defaultValue={
type == 'display' type == 'display'
? patientDataDiplay && patientDataDiplay.lungsBreathing ? patientDataDiplay.lungsBreathing
: patient.lungsBreathing : patient.lungsBreathing
} }
sx={{ display: 'flex', flexDirection: 'row' }} sx={{ display: 'flex', flexDirection: 'row' }}
@ -645,7 +645,7 @@ export default function SystemReviewSection6({
<RadioGroup <RadioGroup
name='painDuration' name='painDuration'
defaultValue={ defaultValue={
type == 'display' ? patientDataDiplay && patientDataDiplay.nerves : patient.nerves type == 'display' ? patientDataDiplay.nerves : patient.nerves
} }
sx={{ display: 'flex', flexDirection: 'row' }} sx={{ display: 'flex', flexDirection: 'row' }}
onChange={(event) => { onChange={(event) => {
@ -684,7 +684,7 @@ export default function SystemReviewSection6({
<RadioGroup <RadioGroup
name='painDuration' name='painDuration'
defaultValue={ defaultValue={
type == 'display' ? patientDataDiplay && patientDataDiplay.blood : patient.blood type == 'display' ? patientDataDiplay.blood : patient.blood
} }
sx={{ display: 'flex', flexDirection: 'row' }} sx={{ display: 'flex', flexDirection: 'row' }}
onChange={(event) => { onChange={(event) => {
@ -724,7 +724,7 @@ export default function SystemReviewSection6({
name='painDuration' name='painDuration'
defaultValue={ defaultValue={
type == 'display' type == 'display'
? patientDataDiplay && patientDataDiplay.prostate ? patientDataDiplay.prostate
: patient.prostate : patient.prostate
} }
sx={{ display: 'flex', flexDirection: 'row' }} sx={{ display: 'flex', flexDirection: 'row' }}
@ -768,7 +768,7 @@ export default function SystemReviewSection6({
name='explanation' name='explanation'
value={ value={
type == 'display' type == 'display'
? patientDataDiplay && patientDataDiplay.explanation ? patientDataDiplay.explanation
: patient.explanation : patient.explanation
} }
disabled={type == 'display'} disabled={type == 'display'}