Compare commits

..

No commits in common. "9c1174b325e921755508dcbac51e8cb79e0fafc2" and "463fc03153e4141e3912d5b0eb777dc861bb2424" have entirely different histories.

7 changed files with 427 additions and 847 deletions

View File

@ -101,13 +101,7 @@ export default function FamilyFormSection({handleFormSection2Data,patientDataDip
</Grid> </Grid>
<Grid item xs={4} className='collapsable-form-style '></Grid> <Grid item xs={4} className='collapsable-form-style '></Grid>
<Grid item <Grid item xs={4} className='collapsable-form-style '>
xs={12}
xl={3}
lg={4}
md={6}
sm={12}
className='collapsable-form-style '>
<TextField <TextField
variant="outlined" variant="outlined"
@ -125,13 +119,7 @@ export default function FamilyFormSection({handleFormSection2Data,patientDataDip
disabled={type=='display'} disabled={type=='display'}
/> />
</Grid> </Grid>
<Grid item <Grid item xs={4} className='collapsable-form-style '>
xs={12}
xl={3}
lg={4}
md={6}
sm={12}
className='collapsable-form-style '>
<TextField <TextField
// required // required
variant="outlined" variant="outlined"
@ -149,13 +137,7 @@ export default function FamilyFormSection({handleFormSection2Data,patientDataDip
/> />
</Grid> </Grid>
<Grid item <Grid item xs={4} className='collapsable-form-style '>
xs={12}
xl={3}
lg={4}
md={6}
sm={12}
className='collapsable-form-style '>
<TextField <TextField
variant="outlined" variant="outlined"
label="Hours/Week" label="Hours/Week"
@ -173,13 +155,7 @@ export default function FamilyFormSection({handleFormSection2Data,patientDataDip
/> />
</Grid> </Grid>
<Grid <Grid item xs={4} className='collapsable-form-style '>
xs={12}
xl={3}
lg={4}
md={6}
sm={12}
className='collapsable-form-style '>
<TextField <TextField
variant="outlined" variant="outlined"
label="Employer" label="Employer"
@ -195,13 +171,7 @@ export default function FamilyFormSection({handleFormSection2Data,patientDataDip
disabled={type=='display'} disabled={type=='display'}
/> />
</Grid> </Grid>
<Grid item <Grid item xs={4} className='collapsable-form-style '>
xs={12}
xl={3}
lg={4}
md={6}
sm={12}
className='collapsable-form-style '>
<TextField <TextField
variant="outlined" variant="outlined"
label="Business Phone" label="Business Phone"
@ -219,24 +189,13 @@ export default function FamilyFormSection({handleFormSection2Data,patientDataDip
/> />
</Grid> </Grid>
<Grid item <Grid item xs={4} className='collapsable-form-style '></Grid>
xs={12}
xl={3}
lg={4}
md={6}
sm={12}
className='collapsable-form-style '></Grid>
<Grid item xs={12} className='collapsable-form-style '> <Grid item xs={12} className='collapsable-form-style '>
<FormLabel sx={{fontWeight:600}}>Spouse's Information:</FormLabel> <FormLabel sx={{fontWeight:600}}>Spouse's Information:</FormLabel>
</Grid> </Grid>
<Grid item <Grid item xs={4} className='collapsable-form-style '>
xs={12}
xl={3}
lg={4}
md={6}
sm={12} className='collapsable-form-style '>
<TextField <TextField
variant="outlined" variant="outlined"
label="Spouse's Name" label="Spouse's Name"
@ -252,13 +211,7 @@ export default function FamilyFormSection({handleFormSection2Data,patientDataDip
disabled={type=='display'} disabled={type=='display'}
/> />
</Grid> </Grid>
<Grid item <Grid item xs={4} className='collapsable-form-style '>
xs={12}
xl={3}
lg={4}
md={6}
sm={12}
className='collapsable-form-style '>
<TextField <TextField
variant="outlined" variant="outlined"
label="Spouse's Employer" label="Spouse's Employer"
@ -274,13 +227,7 @@ export default function FamilyFormSection({handleFormSection2Data,patientDataDip
disabled={type=='display'} disabled={type=='display'}
/> />
</Grid> </Grid>
<Grid item <Grid item xs={4} className='collapsable-form-style '>
xs={12}
xl={3}
lg={4}
md={6}
sm={12}
className='collapsable-form-style '>
<TextField <TextField
variant="outlined" variant="outlined"
label="Business Phone" label="Business Phone"
@ -303,13 +250,7 @@ export default function FamilyFormSection({handleFormSection2Data,patientDataDip
</Grid> </Grid>
<Grid item <Grid item xs={4} className='collapsable-form-style '>
xs={12}
xl={3}
lg={4}
md={6}
sm={12}
className='collapsable-form-style '>
<TextField <TextField
variant="outlined" variant="outlined"
label="Emergency Contact" label="Emergency Contact"
@ -325,13 +266,7 @@ export default function FamilyFormSection({handleFormSection2Data,patientDataDip
disabled={type=='display'} disabled={type=='display'}
/> />
</Grid> </Grid>
<Grid item <Grid item xs={4} className='collapsable-form-style '>
xs={12}
xl={3}
lg={4}
md={6}
sm={12}
className='collapsable-form-style '>
<TextField <TextField
variant="outlined" variant="outlined"
label="Relationship" label="Relationship"
@ -347,12 +282,7 @@ export default function FamilyFormSection({handleFormSection2Data,patientDataDip
disabled={type=='display'} disabled={type=='display'}
/> />
</Grid> </Grid>
<Grid item <Grid item xs={4} className='collapsable-form-style '>
xs={12}
xl={3}
lg={4}
md={6}
sm={12} className='collapsable-form-style '>
<TextField <TextField
variant="outlined" variant="outlined"
type="number" type="number"

View File

@ -76,13 +76,7 @@ export default function MedicalHistoryForm({handleFormSection3Data,patientDataDi
</Grid> </Grid>
<Grid container direction="row"> <Grid container direction="row">
<Grid item <Grid item xs={4} className='collapsable-form-style'>
xs={12}
xl={3}
lg={4}
md={6}
sm={12}
className='collapsable-form-style'>
<TextField <TextField
variant="outlined" variant="outlined"
label="Family physician" label="Family physician"
@ -97,13 +91,7 @@ export default function MedicalHistoryForm({handleFormSection3Data,patientDataDi
disabled={type=='display'} disabled={type=='display'}
/> />
</Grid> </Grid>
<Grid item <Grid item xs={4} className='collapsable-form-style'>
xs={12}
xl={3}
lg={4}
md={6}
sm={12}
className='collapsable-form-style'>
<TextField <TextField
variant="outlined" variant="outlined"
label="City" label="City"
@ -118,13 +106,7 @@ export default function MedicalHistoryForm({handleFormSection3Data,patientDataDi
disabled={type=='display'} disabled={type=='display'}
/> />
</Grid> </Grid>
<Grid item <Grid item xs={4} className='collapsable-form-style'>
xs={12}
xl={3}
lg={4}
md={6}
sm={12}
className='collapsable-form-style'>
<TextField <TextField
variant="outlined" variant="outlined"
label="State" label="State"
@ -139,13 +121,7 @@ export default function MedicalHistoryForm({handleFormSection3Data,patientDataDi
disabled={type=='display'} disabled={type=='display'}
/> />
</Grid> </Grid>
<Grid item <Grid item xs={4} className='collapsable-form-style'>
xs={12}
xl={3}
lg={4}
md={6}
sm={12}
className='collapsable-form-style'>
<TextField <TextField
variant="outlined" variant="outlined"
label="Phone" label="Phone"
@ -162,30 +138,14 @@ export default function MedicalHistoryForm({handleFormSection3Data,patientDataDi
/> />
</Grid> </Grid>
<Grid item <Grid item xs={4} className='collapsable-form-style'></Grid>
xs={12} <Grid item xs={4} className='collapsable-form-style'></Grid>
xl={3}
lg={4}
md={6}
sm={12} className='collapsable-form-style'></Grid>
<Grid item
xs={12}
xl={3}
lg={4}
md={6}
sm={12} className='collapsable-form-style'></Grid>
<Grid item xs={12} className='collapsable-form-style '> <Grid item xs={12} className='collapsable-form-style '>
<FormLabel sx={{fontWeight:600}}>Chiropractor Information:</FormLabel> <FormLabel sx={{fontWeight:600}}>Chiropractor Information:</FormLabel>
</Grid> </Grid>
<Grid item <Grid item xs={4} sx={{paddingLeft:"14px",marginTop:2}} className='collapsable-form-style-radioButtons'>
xs={12}
xl={3}
lg={4}
md={6}
sm={12}
sx={{paddingLeft:"14px",marginTop:2}} className='collapsable-form-style-radioButtons'>
<FormControl> <FormControl>
<FormLabel>Previous Chiropractic Care:</FormLabel> <FormLabel>Previous Chiropractic Care:</FormLabel>
<RadioGroup <RadioGroup
@ -206,13 +166,7 @@ export default function MedicalHistoryForm({handleFormSection3Data,patientDataDi
</FormControl> </FormControl>
</Grid> </Grid>
<Grid item <Grid item xs={4} className='collapsable-form-style'>
xs={12}
xl={3}
lg={4}
md={6}
sm={12}
className='collapsable-form-style'>
<TextField <TextField
variant="outlined" variant="outlined"
label="Chiropractor's Name" label="Chiropractor's Name"
@ -228,13 +182,7 @@ export default function MedicalHistoryForm({handleFormSection3Data,patientDataDi
/> />
</Grid> </Grid>
<Grid item <Grid item xs={4} className='collapsable-form-style'>
xs={12}
xl={3}
lg={4}
md={6}
sm={12}
className='collapsable-form-style'>
<TextField <TextField
variant="outlined" variant="outlined"
label="City/State" label="City/State"

View File

@ -121,12 +121,7 @@ export default function PastTreatment5({handleFormSection5Data,patientDataDiplay
</Grid> </Grid>
<Grid item <Grid item xs={4} className='collapsable-form-style-form7'>
xs={12}
xl={3}
lg={4}
md={6}
sm={12} className='collapsable-form-style-form7'>
<TextField <TextField
variant="outlined" variant="outlined"
label="If yes, when?" label="If yes, when?"
@ -140,12 +135,7 @@ export default function PastTreatment5({handleFormSection5Data,patientDataDiplay
}} }}
/> />
</Grid> </Grid>
<Grid item <Grid item xs={4} className='collapsable-form-style-form7'>
xs={12}
xl={3}
lg={4}
md={6}
sm={12} className='collapsable-form-style-form7'>
<TextField <TextField
variant="outlined" variant="outlined"
label="Was treatment provided?If yes, by whom?" label="Was treatment provided?If yes, by whom?"
@ -160,12 +150,7 @@ export default function PastTreatment5({handleFormSection5Data,patientDataDiplay
}} }}
/> />
</Grid> </Grid>
<Grid item <Grid item xs={4} className='collapsable-form-style-form7'>
xs={12}
xl={3}
lg={4}
md={6}
sm={12} className='collapsable-form-style-form7'>
<TextField <TextField
variant="outlined" variant="outlined"
label="Outcome?" label="Outcome?"
@ -302,11 +287,7 @@ export default function PastTreatment5({handleFormSection5Data,patientDataDiplay
type={type}/> type={type}/>
</Grid> </Grid>
<Grid item xs={12} <Grid item xs={6} className='collapsable-form-style-multiline'>
xl={3}
lg={4}
md={6}
sm={12} className='collapsable-form-style-multiline'>
<FormLabel>Please list current supplements or drugs you may be taking:</FormLabel> <FormLabel>Please list current supplements or drugs you may be taking:</FormLabel>
<TextField <TextField
multiline multiline

View File

@ -507,7 +507,7 @@ export default function PatientForm({ type }: Props) {
id='panel9d-header' id='panel9d-header'
> >
<Typography sx={{ fontSize: 18 }}> <Typography sx={{ fontSize: 18 }}>
Patient's Pain Zone Patient's Injury Image
</Typography> </Typography>
</AccordionSummary> </AccordionSummary>

View File

@ -1,15 +1,5 @@
import * as React from 'react'; import * as React from 'react';
import { import { Button, FormControl, FormControlLabel, FormLabel, Grid, Paper, Radio, RadioGroup, TextField } from '@mui/material';
Button,
FormControl,
FormControlLabel,
FormLabel,
Grid,
Paper,
Radio,
RadioGroup,
TextField,
} from '@mui/material';
import { LocalizationProvider, DatePicker } from '@mui/x-date-pickers'; import { LocalizationProvider, DatePicker } from '@mui/x-date-pickers';
import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'; import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs';
import { useEffect } from 'react'; import { useEffect } from 'react';
@ -27,54 +17,53 @@ interface Patient {
state: string; state: string;
zipCode: string; zipCode: string;
gender: string; gender: string;
} }
type Props = { type Props = {
handleFormSection1Data: ( handleFormSection1Data:(
fullName?: string | undefined, fullName?: string|undefined,
homePhone?: string | undefined, homePhone?: string|undefined,
cellPhone?: string | undefined, cellPhone?: string|undefined,
email?: string | undefined, email?: string|undefined,
age?: number | undefined | string, age?: number|undefined|string,
dateOfBirth?: string | undefined, dateOfBirth?: string|undefined,
socialSecurityNumber?: string | undefined, socialSecurityNumber?: string|undefined,
mailingAddress?: string | undefined, mailingAddress?: string|undefined,
city?: string | undefined, city?: string|undefined,
state?: string | undefined, state?: string|undefined,
zipCode?: string | undefined, zipCode?: string|undefined,
gender?: string | undefined gender?: string|undefined,
) => void; )=> void
patientDataDiplay: any; patientDataDiplay:any;
type: string; type:string;
}; }
export default function PersonalSection({handleFormSection1Data,patientDataDiplay,type}:Props){
export default function PersonalSection({
handleFormSection1Data,
patientDataDiplay,
type,
}: Props) {
const [birthDateValue, setBirthDateValue] = React.useState<any>(); const [birthDateValue, setBirthDateValue] = React.useState<any>();
const [patient, setPatient] = React.useState<any>({ const [patient, setPatient] = React.useState<any>({
fullName: '', fullName: "",
fullNameError: false, fullNameError:false,
homePhone: '', homePhone: "",
cellPhone: '', cellPhone: "",
cellPhoneError: false, cellPhoneError: false,
email: '', email: "",
emailError: false, emailError: false,
age: '', age: "",
ageError: false, ageError: false,
dateOfBirth: birthDateValue, dateOfBirth: birthDateValue,
socialSecurityNumber: '', socialSecurityNumber: "",
mailingAddress: '', mailingAddress:"",
mailingAddressFalse: false, mailingAddressFalse:false,
city: '', city: "",
state: '', state: "",
zipCode: '', zipCode: "",
gender: 'male', gender: "male",
}); });
useEffect(() => {
useEffect(()=>{
handleFormSection1Data( handleFormSection1Data(
patient.fullName, patient.fullName,
patient.homePhone, patient.homePhone,
@ -87,45 +76,37 @@ export default function PersonalSection({
patient.city, patient.city,
patient.state, patient.state,
patient.zipCode, patient.zipCode,
patient.gender patient.gender,
); )
}, [patient]); },[patient])
return (
return(
<> <>
<Grid container direction='row' className='section1-test-class'> <Grid container direction="row" className='section1-test-class'>
<Grid <Grid item xs={4} className='collapsable-form-style '>
item
xs={12}
xl={3}
lg={4}
md={6}
sm={12}
className='collapsable-form-style '
>
<TextField <TextField
variant='outlined' variant="outlined"
label="Patient's Full Name" label="Patient's Full Name"
name='fullName' name="fullName"
placeholder='Please enter your name' placeholder='Please enter your name'
value={ value={type=='display'?patientDataDiplay.fullName:patient.fullName}
type == 'display' ? patientDataDiplay.fullName : patient.fullName disabled={type=='display'}
} onChange={(e)=>{
disabled={type == 'display'} setPatient((prevValues:any) => ({
onChange={(e) => {
setPatient((prevValues: any) => ({
...prevValues, ...prevValues,
fullName: e.target.value, fullName: e.target.value,
})); }));
}} }}
onBlur={(e) => { onBlur={(e) => {
if (e.target.value === '') { if (e.target.value === "") {
setPatient((prevValues: any) => ({ setPatient((prevValues:any) => ({
...prevValues, ...prevValues,
fullNameError: true, fullNameError: true,
})); }));
} else { } else {
setPatient((prevValues: any) => ({ setPatient((prevValues:any) => ({
...prevValues, ...prevValues,
fullNameError: false, fullNameError: false,
})); }));
@ -133,88 +114,56 @@ export default function PersonalSection({
}} }}
required required
error={patient.fullNameError} error={patient.fullNameError}
helperText={patient.fullNameError ? 'Please enter your name' : ''} helperText={patient.fullNameError ? "Please enter your name" : ""}
/> />
</Grid> </Grid>
<Grid
item <Grid item xs={4} className='collapsable-form-style'>
xs={12}
xl={3}
lg={4}
md={6}
sm={12}
className='collapsable-form-style'
>
<TextField <TextField
required required
variant='outlined' variant="outlined"
label='Phone Number' label="Phone Number"
name='cellPhone' name="cellPhone"
type='number' type="number"
placeholder='Please enter your cell Phone number' placeholder='Please enter your cell Phone number'
value={ value={type=='display'?patientDataDiplay.cellPhone:patient.cellPhone}
type == 'display' disabled={type=='display'}
? patientDataDiplay.cellPhone onChange={(e)=>{
: patient.cellPhone setPatient((prevValues:any) => ({
}
disabled={type == 'display'}
onChange={(e) => {
let value = e.target.value;
if (value[0] === '0') {
value = value.slice(1);
}
setPatient((prevValues: any) => ({
...prevValues, ...prevValues,
cellPhone: value, cellPhone: e.target.value,
})); }));
}} }}
onBlur={(e) => { onBlur={(e) => {
if (!/^\d{10}$/.test(e.target.value)) { if (!(/^\d{10}$/.test(e.target.value))) {
setPatient((prevValues: any) => ({ setPatient((prevValues:any) => ({
...prevValues, ...prevValues,
cellPhoneError: true, cellPhoneError: true,
})); }));
} else { } else {
setPatient((prevValues: any) => ({ setPatient((prevValues:any) => ({
...prevValues, ...prevValues,
cellPhoneError: false, cellPhoneError: false,
})); }));
} }
}} }}
error={patient.cellPhoneError} error={patient.cellPhoneError}
helperText={ helperText={patient.cellPhoneError? "Please enter a valid 10-digit phone number" : ""}
patient.cellPhoneError
? 'Please enter a valid 10-digit phone number'
: ''
}
/> />
</Grid> </Grid>
<Grid <Grid item xs={4} className='collapsable-form-style'>
item
xs={12}
xl={3}
lg={4}
md={6}
sm={12}
className='collapsable-form-style'
>
<TextField <TextField
variant='outlined' variant="outlined"
label='Home Phone Number' label="Home Phone Number"
name='homePhone' name="homePhone"
type='number' type='number'
placeholder='Please enter your home phone' placeholder='Please enter your home phone'
value={ value={type=='display'?patientDataDiplay.homePhone:patient.homePhone}
type == 'display' disabled={type=='display'}
? patientDataDiplay.homePhone onChange={(e)=>{
: patient.homePhone setPatient((prevValues:any) => ({
}
disabled={type == 'display'}
onChange={(e) => {
setPatient((prevValues: any) => ({
...prevValues, ...prevValues,
homePhone: e.target.value, homePhone: e.target.value,
})); }));
@ -224,141 +173,99 @@ export default function PersonalSection({
/> />
</Grid> </Grid>
<Grid <Grid item xs={4} className='collapsable-form-style'>
item
xs={12}
xl={3}
lg={4}
md={6}
sm={12}
className='collapsable-form-style'
>
<TextField <TextField
required required
variant='outlined' variant="outlined"
label='Email' label="Email"
name='email' name="email"
placeholder='Please enter your email' placeholder='Please enter your email'
value={type == 'display' ? 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) => ({
...prevValues, ...prevValues,
email: e.target.value, email: e.target.value,
})); }));
}} }}
onBlur={(e) => { onBlur={(e) => {
if (!/^\S+@\S+\.\S+$/.test(e.target.value)) { if (!(/^\S+@\S+\.\S+$/.test(e.target.value))) {
setPatient((prevValues: any) => ({ setPatient((prevValues:any) => ({
...prevValues, ...prevValues,
emailError: true, emailError: true,
})); }));
} else { } else {
setPatient((prevValues: any) => ({ setPatient((prevValues:any) => ({
...prevValues, ...prevValues,
emailError: false, emailError: false,
})); }));
} }
}} }}
error={patient.emailError} error={patient.emailError}
helperText={ helperText={patient.emailError? "Please enter a valid email address" : ""}
patient.emailError ? 'Please enter a valid email address' : ''
}
/> />
</Grid> </Grid>
<Grid <Grid item xs={4} className='collapsable-form-style'>
item
xs={12}
xl={3}
lg={4}
md={6}
sm={12}
className='collapsable-form-style'
>
<TextField <TextField
required required
variant='outlined' variant="outlined"
label='Age' label="Age"
name='age' name="age"
type='number' type="number"
placeholder='Please enter your age' placeholder='Please enter your age'
value={type == 'display' ? 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) => ({
...prevValues, ...prevValues,
age: e.target.value, age: e.target.value,
})); }));
}} }}
onBlur={(e) => { onBlur={(e) => {
if (e.target.value === '') { if (e.target.value === "") {
setPatient((prevValues: any) => ({ setPatient((prevValues:any) => ({
...prevValues, ...prevValues,
ageError: true, ageError: true,
})); }));
} else { } else {
setPatient((prevValues: any) => ({ setPatient((prevValues:any) => ({
...prevValues, ...prevValues,
ageError: false, ageError: false,
})); }));
} }
}} }}
error={patient.ageError} error={patient.ageError}
helperText={patient.ageError ? 'Please enter your age' : ''} helperText={patient.ageError ? "Please enter your age" : ""}
/> />
</Grid> </Grid>
<Grid <Grid item xs={4} className='collapsable-form-style'>
item <FormControl >
xs={12}
xl={3}
lg={4}
md={6}
sm={12}
className='collapsable-form-style'
>
<FormControl>
<LocalizationProvider dateAdapter={AdapterDayjs}> <LocalizationProvider dateAdapter={AdapterDayjs}>
<DatePicker <DatePicker
label='Date of Birth' label="Date of Birth"
value={ value={type=='display'?patientDataDiplay.dateOfBirth:birthDateValue}
type == 'display' disabled={type=='display'}
? patientDataDiplay.dateOfBirth
: birthDateValue
}
disabled={type == 'display'}
onChange={(newValue) => { onChange={(newValue) => {
setBirthDateValue(newValue); setBirthDateValue(newValue);
}} }}
renderInput={(params) => ( renderInput={(params) => <TextField variant="outlined" {...params} />}
<TextField variant='outlined' {...params} />
)}
/> />
</LocalizationProvider> </LocalizationProvider>
</FormControl> </FormControl>
</Grid> </Grid>
<Grid <Grid item xs={4} className='collapsable-form-style'>
item
xs={12}
xl={3}
lg={4}
md={6}
sm={12}
className='collapsable-form-style'
>
<TextField <TextField
variant='outlined' variant="outlined"
label='Social Security Number' label="Social Security Number"
name='socialSecurityNumber' name="socialSecurityNumber"
value={ value={type=='display'?patientDataDiplay.socialSecurityNumber:patient.socialSecurityNumber}
type == 'display' disabled={type=='display'}
? patientDataDiplay.socialSecurityNumber onChange={(e)=>{
: patient.socialSecurityNumber setPatient((prevValues:any) => ({
}
disabled={type == 'display'}
onChange={(e) => {
setPatient((prevValues: any) => ({
...prevValues, ...prevValues,
socialSecurityNumber: e.target.value, socialSecurityNumber: e.target.value,
})); }));
@ -369,71 +276,47 @@ export default function PersonalSection({
/> />
</Grid> </Grid>
<Grid <Grid item xs={4} className='collapsable-form-style'>
item
xs={12}
xl={3}
lg={4}
md={6}
sm={12}
className='collapsable-form-style'
>
<TextField <TextField
required required
variant='outlined' variant="outlined"
label='Mailing Address' label="Mailing Address"
name='mailingAddress' name="mailingAddress"
value={ value={type=='display'?patientDataDiplay.mailingAddress:patient.mailingAddress}
type == 'display' disabled={type=='display'}
? patientDataDiplay.mailingAddress onChange={(e)=>{
: patient.mailingAddress setPatient((prevValues:any) => ({
}
disabled={type == 'display'}
onChange={(e) => {
setPatient((prevValues: any) => ({
...prevValues, ...prevValues,
mailingAddress: e.target.value, mailingAddress: e.target.value,
})); }));
}} }}
onBlur={(e) => { onBlur={(e) => {
if (e.target.value === '') { if (e.target.value === "") {
setPatient((prevValues: any) => ({ setPatient((prevValues:any) => ({
...prevValues, ...prevValues,
mailingAddressError: true, mailingAddressError: true,
})); }));
} else { } else {
setPatient((prevValues: any) => ({ setPatient((prevValues:any) => ({
...prevValues, ...prevValues,
mailingAddressError: false, mailingAddressError: false,
})); }));
} }
}} }}
error={patient.mailingAddressError} error={patient.mailingAddressError}
helperText={ helperText={patient.mailingAddressError? "Please enter your mailing address" : ""}
patient.mailingAddressError
? 'Please enter your mailing address'
: ''
}
/> />
</Grid> </Grid>
<Grid <Grid item xs={4} className='collapsable-form-style'>
item
xs={12}
xl={3}
lg={4}
md={6}
sm={12}
className='collapsable-form-style'
>
<TextField <TextField
variant='outlined' variant="outlined"
label='State' label="State"
name='state' name="state"
value={type == 'display' ? 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) => ({
...prevValues, ...prevValues,
state: e.target.value, state: e.target.value,
})); }));
@ -441,23 +324,15 @@ export default function PersonalSection({
/> />
</Grid> </Grid>
<Grid <Grid item xs={4} className='collapsable-form-style'>
item
xs={12}
xl={3}
lg={4}
md={6}
sm={12}
className='collapsable-form-style'
>
<TextField <TextField
variant='outlined' variant="outlined"
label='City' label="City"
name='city' name="city"
value={type == 'display' ? 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) => ({
...prevValues, ...prevValues,
city: e.target.value, city: e.target.value,
})); }));
@ -465,25 +340,15 @@ export default function PersonalSection({
/> />
</Grid> </Grid>
<Grid <Grid item xs={4} className='collapsable-form-style'>
item
xs={12}
xl={3}
lg={4}
md={6}
sm={12}
className='collapsable-form-style'
>
<TextField <TextField
variant='outlined' variant="outlined"
label='Zip Code' label="Zip Code"
name='zipCode' name="zipCode"
value={ value={type=='display'?patientDataDiplay.zipCode:patient.zipCode}
type == 'display' ? patientDataDiplay.zipCode : patient.zipCode disabled={type=='display'}
} onChange={(e)=>{
disabled={type == 'display'} setPatient((prevValues:any) => ({
onChange={(e) => {
setPatient((prevValues: any) => ({
...prevValues, ...prevValues,
zipCode: e.target.value, zipCode: e.target.value,
})); }));
@ -494,47 +359,31 @@ export default function PersonalSection({
/> />
</Grid> </Grid>
<Grid <Grid item xs={4} className='collapsable-form-style-radioButtons'>
item <FormControl >
xs={12}
xl={3}
lg={4}
md={6}
sm={12}
className='collapsable-form-style-radioButtons'
>
<FormControl>
<FormLabel>Gender</FormLabel> <FormLabel>Gender</FormLabel>
<RadioGroup <RadioGroup
aria-labelledby='demo-radio-buttons-group-label' aria-labelledby="demo-radio-buttons-group-label"
defaultValue={ defaultValue={type=='display'?patientDataDiplay.gender:patient.gender}
type == 'display' ? patientDataDiplay.gender : patient.gender name="radio-buttons-group"
} onChange={(e)=>{
name='radio-buttons-group' setPatient((prevValues:any) => ({
onChange={(e) => {
setPatient((prevValues: any) => ({
...prevValues, ...prevValues,
gender: e.target.value, gender: e.target.value,
})); }));
}} }}
sx={{ display: 'flex', flexDirection: 'row' }} sx={{display:'flex', flexDirection:'row'}}
> >
<FormControlLabel <FormControlLabel
disabled={type == 'display'} disabled={type=='display'}
value='male' value="male" control={<Radio />} label="Male" />
control={<Radio />}
label='Male'
/>
<FormControlLabel <FormControlLabel
disabled={type == 'display'} disabled={type=='display'}
value='female' value="female" control={<Radio />} label="Female" />
control={<Radio />}
label='Female'
/>
</RadioGroup> </RadioGroup>
</FormControl> </FormControl>
</Grid> </Grid>
</Grid> </Grid>
</> </>
); )
} }

View File

@ -136,11 +136,7 @@ export default function RecreationalHobbiesSection7({handleFormSection7Data,pati
</FormControl> </FormControl>
</Grid> </Grid>
<Grid item xs={12} <Grid item xs={6} className='collapsable-form-style-radioButtons'>
xl={3}
// lg={4}
md={6}
sm={12} className='collapsable-form-style-radioButtons'>
<FormControl> <FormControl>
<FormLabel>Do you excercise?</FormLabel> <FormLabel>Do you excercise?</FormLabel>
<RadioGroup <RadioGroup
@ -160,11 +156,7 @@ export default function RecreationalHobbiesSection7({handleFormSection7Data,pati
</FormControl> </FormControl>
</Grid> </Grid>
<Grid item xs={12} <Grid item xs={6} className='collapsable-form-style-form7'>
xl={3}
// lg={4}
md={6}
sm={12} className='collapsable-form-style-form7'>
<TextField <TextField
disabled={patient.excercise!=='Yes'||type=='display'} disabled={patient.excercise!=='Yes'||type=='display'}
variant="outlined" variant="outlined"
@ -180,11 +172,7 @@ export default function RecreationalHobbiesSection7({handleFormSection7Data,pati
/> />
</Grid> </Grid>
<Grid item xs={12} <Grid item xs={6} className='collapsable-form-style-radioButtons'>
xl={3}
// lg={4}
md={6}
sm={12} className='collapsable-form-style-radioButtons'>
<FormControl> <FormControl>
<FormLabel>Use tobacco?</FormLabel> <FormLabel>Use tobacco?</FormLabel>
<RadioGroup <RadioGroup
@ -204,11 +192,7 @@ export default function RecreationalHobbiesSection7({handleFormSection7Data,pati
</FormControl> </FormControl>
</Grid> </Grid>
<Grid item xs={12} <Grid item xs={6} className='collapsable-form-style-form7'>
xl={3}
// lg={4}
md={6}
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.tobaccoExplanation:patient.tobaccoExplanation} value={type=='display'?patientDataDiplay.tobaccoExplanation:patient.tobaccoExplanation}
@ -224,11 +208,7 @@ export default function RecreationalHobbiesSection7({handleFormSection7Data,pati
/> />
</Grid> </Grid>
<Grid item xs={12} <Grid item xs={6} className='collapsable-form-style-radioButtons'>
xl={3}
// lg={4}
md={6}
sm={12} className='collapsable-form-style-radioButtons'>
<FormControl> <FormControl>
<FormLabel>Consume alcohol?</FormLabel> <FormLabel>Consume alcohol?</FormLabel>
<RadioGroup <RadioGroup
@ -248,11 +228,7 @@ export default function RecreationalHobbiesSection7({handleFormSection7Data,pati
</FormControl> </FormControl>
</Grid> </Grid>
<Grid item xs={12} <Grid item xs={6} className='collapsable-form-style-form7'>
xl={3}
// lg={4}
md={6}
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.alcoholExplanation:patient.alcoholExplanation} value={type=='display'?patientDataDiplay.alcoholExplanation:patient.alcoholExplanation}
@ -268,11 +244,7 @@ export default function RecreationalHobbiesSection7({handleFormSection7Data,pati
/> />
</Grid> </Grid>
<Grid item xs={12} <Grid item xs={6} className='collapsable-form-style-radioButtons'>
xl={3}
// lg={4}
md={6}
sm={12} className='collapsable-form-style-radioButtons'>
<FormControl> <FormControl>
<FormLabel>Have a healthy diet?</FormLabel> <FormLabel>Have a healthy diet?</FormLabel>
<RadioGroup <RadioGroup
@ -292,11 +264,7 @@ export default function RecreationalHobbiesSection7({handleFormSection7Data,pati
</FormControl> </FormControl>
</Grid> </Grid>
<Grid item xs={12} <Grid item xs={6} className='collapsable-form-style-form7'>
xl={3}
// lg={4}
md={6}
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.healthyDietExplanation:patient.healthyDietExplanation} value={type=='display'?patientDataDiplay.healthyDietExplanation:patient.healthyDietExplanation}
@ -312,11 +280,7 @@ export default function RecreationalHobbiesSection7({handleFormSection7Data,pati
/> />
</Grid> </Grid>
<Grid item xs={12} <Grid item xs={6} className='collapsable-form-style-radioButtons'>
xl={3}
// lg={4}
md={6}
sm={12} className='collapsable-form-style-radioButtons'>
<FormControl> <FormControl>
<FormLabel>Get adequate sleep?</FormLabel> <FormLabel>Get adequate sleep?</FormLabel>
<RadioGroup <RadioGroup
@ -336,11 +300,7 @@ export default function RecreationalHobbiesSection7({handleFormSection7Data,pati
</FormControl> </FormControl>
</Grid> </Grid>
<Grid item xs={12} <Grid item xs={6} className='collapsable-form-style-form7'>
xl={3}
// lg={4}
md={6}
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.sleepExplanation:patient.sleepExplanation} value={type=='display'?patientDataDiplay.sleepExplanation:patient.sleepExplanation}
@ -356,11 +316,7 @@ export default function RecreationalHobbiesSection7({handleFormSection7Data,pati
/> />
</Grid> </Grid>
<Grid item xs={12} <Grid item xs={6} className='collapsable-form-style-radioButtons'>
xl={3}
// lg={4}
md={6}
sm={12} className='collapsable-form-style-radioButtons'>
<FormControl> <FormControl>
<FormLabel>Is Work/School stressful to you?</FormLabel> <FormLabel>Is Work/School stressful to you?</FormLabel>
<RadioGroup <RadioGroup
@ -380,11 +336,7 @@ export default function RecreationalHobbiesSection7({handleFormSection7Data,pati
</FormControl> </FormControl>
</Grid> </Grid>
<Grid item xs={12} <Grid item xs={6} className='collapsable-form-style-form7'>
xl={3}
// lg={4}
md={6}
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.workSchool:patient.workSchool} value={type=='display'?patientDataDiplay.workSchool:patient.workSchool}
@ -400,11 +352,7 @@ export default function RecreationalHobbiesSection7({handleFormSection7Data,pati
/> />
</Grid> </Grid>
<Grid item xs={12} <Grid item xs={6} className='collapsable-form-style-radioButtons'>
xl={3}
// lg={4}
md={6}
sm={12} className='collapsable-form-style-radioButtons'>
<FormControl> <FormControl>
<FormLabel>Family life stressful to you?</FormLabel> <FormLabel>Family life stressful to you?</FormLabel>
<RadioGroup <RadioGroup
@ -424,11 +372,7 @@ export default function RecreationalHobbiesSection7({handleFormSection7Data,pati
</FormControl> </FormControl>
</Grid> </Grid>
<Grid item xs={12} <Grid item xs={6} className='collapsable-form-style-form7'>
xl={3}
// lg={4}
md={6}
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.familyLifeExplanation:patient.familyLifeExplanation} value={type=='display'?patientDataDiplay.familyLifeExplanation:patient.familyLifeExplanation}
@ -444,11 +388,7 @@ export default function RecreationalHobbiesSection7({handleFormSection7Data,pati
/> />
</Grid> </Grid>
<Grid item xs={12} <Grid item xs={6} className='collapsable-form-style-radioButtons'>
xl={3}
// lg={4}
md={6}
sm={12} className='collapsable-form-style-radioButtons'>
<FormControl> <FormControl>
<FormLabel>Use recreational drugs?</FormLabel> <FormLabel>Use recreational drugs?</FormLabel>
<RadioGroup <RadioGroup
@ -468,11 +408,7 @@ export default function RecreationalHobbiesSection7({handleFormSection7Data,pati
</FormControl> </FormControl>
</Grid> </Grid>
<Grid item xs={12} <Grid item xs={6} className='collapsable-form-style-form7'>
xl={3}
// lg={4}
md={6}
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.drugsExplanation:patient.drugsExplanation} value={type=='display'?patientDataDiplay.drugsExplanation:patient.drugsExplanation}

View File

@ -93,11 +93,7 @@ export default function SystemReviewSection6({handleFormSection6Data,patientData
<FormLabel sx={{fontWeight:600}}>Please choose body areas or systems where you may have problems:</FormLabel> <FormLabel sx={{fontWeight:600}}>Please choose body areas or systems where you may have problems:</FormLabel>
</Grid> </Grid>
<Grid container direction="row"> <Grid container direction="row">
<Grid item xs={12} <Grid item xs={3} className='collapsable-form-style-radioButtons'>
xl={3}
lg={4}
md={6}
sm={12} className='collapsable-form-style-radioButtons'>
<FormControl> <FormControl>
<FormLabel>Eyes</FormLabel> <FormLabel>Eyes</FormLabel>
<RadioGroup <RadioGroup
@ -116,11 +112,7 @@ export default function SystemReviewSection6({handleFormSection6Data,patientData
</RadioGroup> </RadioGroup>
</FormControl> </FormControl>
</Grid> </Grid>
<Grid item xs={12} <Grid item xs={3} className='collapsable-form-style-radioButtons'>
xl={3}
lg={4}
md={6}
sm={12} className='collapsable-form-style-radioButtons'>
<FormControl> <FormControl>
<FormLabel>Intestines/Bowls</FormLabel> <FormLabel>Intestines/Bowls</FormLabel>
<RadioGroup <RadioGroup
@ -139,11 +131,7 @@ export default function SystemReviewSection6({handleFormSection6Data,patientData
</RadioGroup> </RadioGroup>
</FormControl> </FormControl>
</Grid> </Grid>
<Grid item xs={12} <Grid item xs={3} className='collapsable-form-style-radioButtons'>
xl={3}
lg={4}
md={6}
sm={12} className='collapsable-form-style-radioButtons'>
<FormControl> <FormControl>
<FormLabel>Joints/Bones</FormLabel> <FormLabel>Joints/Bones</FormLabel>
<RadioGroup <RadioGroup
@ -162,11 +150,7 @@ export default function SystemReviewSection6({handleFormSection6Data,patientData
</RadioGroup> </RadioGroup>
</FormControl> </FormControl>
</Grid> </Grid>
<Grid item xs={12} <Grid item xs={3} className='collapsable-form-style-radioButtons'>
xl={3}
lg={4}
md={6}
sm={12} className='collapsable-form-style-radioButtons'>
<FormControl> <FormControl>
<FormLabel>Allergies</FormLabel> <FormLabel>Allergies</FormLabel>
<RadioGroup <RadioGroup
@ -185,11 +169,7 @@ export default function SystemReviewSection6({handleFormSection6Data,patientData
</RadioGroup> </RadioGroup>
</FormControl> </FormControl>
</Grid> </Grid>
<Grid item xs={12} <Grid item xs={3} className='collapsable-form-style-radioButtons'>
xl={3}
lg={4}
md={6}
sm={12} className='collapsable-form-style-radioButtons'>
<FormControl> <FormControl>
<FormLabel>Ears, Nose, Mouth, Throat</FormLabel> <FormLabel>Ears, Nose, Mouth, Throat</FormLabel>
<RadioGroup <RadioGroup
@ -208,11 +188,7 @@ export default function SystemReviewSection6({handleFormSection6Data,patientData
</RadioGroup> </RadioGroup>
</FormControl> </FormControl>
</Grid> </Grid>
<Grid item xs={12} <Grid item xs={3} className='collapsable-form-style-radioButtons'>
xl={3}
lg={4}
md={6}
sm={12} className='collapsable-form-style-radioButtons'>
<FormControl> <FormControl>
<FormLabel>Urinary</FormLabel> <FormLabel>Urinary</FormLabel>
<RadioGroup <RadioGroup
@ -231,11 +207,7 @@ export default function SystemReviewSection6({handleFormSection6Data,patientData
</RadioGroup> </RadioGroup>
</FormControl> </FormControl>
</Grid> </Grid>
<Grid item xs={12} <Grid item xs={3} className='collapsable-form-style-radioButtons'>
xl={3}
lg={4}
md={6}
sm={12} className='collapsable-form-style-radioButtons'>
<FormControl> <FormControl>
<FormLabel>Skin</FormLabel> <FormLabel>Skin</FormLabel>
<RadioGroup <RadioGroup
@ -254,11 +226,7 @@ export default function SystemReviewSection6({handleFormSection6Data,patientData
</RadioGroup> </RadioGroup>
</FormControl> </FormControl>
</Grid> </Grid>
<Grid item xs={12} <Grid item xs={3} className='collapsable-form-style-radioButtons'>
xl={3}
lg={4}
md={6}
sm={12} className='collapsable-form-style-radioButtons'>
<FormControl> <FormControl>
<FormLabel>Psychological/Emotional</FormLabel> <FormLabel>Psychological/Emotional</FormLabel>
<RadioGroup <RadioGroup
@ -277,11 +245,7 @@ export default function SystemReviewSection6({handleFormSection6Data,patientData
</RadioGroup> </RadioGroup>
</FormControl> </FormControl>
</Grid> </Grid>
<Grid item xs={12} <Grid item xs={3} className='collapsable-form-style-radioButtons'>
xl={3}
lg={4}
md={6}
sm={12} className='collapsable-form-style-radioButtons'>
<FormControl> <FormControl>
<FormLabel>Heart</FormLabel> <FormLabel>Heart</FormLabel>
<RadioGroup <RadioGroup
@ -300,11 +264,7 @@ export default function SystemReviewSection6({handleFormSection6Data,patientData
</RadioGroup> </RadioGroup>
</FormControl> </FormControl>
</Grid> </Grid>
<Grid item xs={12} <Grid item xs={3} className='collapsable-form-style-radioButtons'>
xl={3}
lg={4}
md={6}
sm={12} className='collapsable-form-style-radioButtons'>
<FormControl> <FormControl>
<FormLabel>Muscles</FormLabel> <FormLabel>Muscles</FormLabel>
<RadioGroup <RadioGroup
@ -323,11 +283,7 @@ export default function SystemReviewSection6({handleFormSection6Data,patientData
</RadioGroup> </RadioGroup>
</FormControl> </FormControl>
</Grid> </Grid>
<Grid item xs={12} <Grid item xs={3} className='collapsable-form-style-radioButtons'>
xl={3}
lg={4}
md={6}
sm={12} className='collapsable-form-style-radioButtons'>
<FormControl> <FormControl>
<FormLabel>Internal Organs</FormLabel> <FormLabel>Internal Organs</FormLabel>
<RadioGroup <RadioGroup
@ -346,11 +302,7 @@ export default function SystemReviewSection6({handleFormSection6Data,patientData
</RadioGroup> </RadioGroup>
</FormControl> </FormControl>
</Grid> </Grid>
<Grid item xs={12} <Grid item xs={3} className='collapsable-form-style-radioButtons'>
xl={3}
lg={4}
md={6}
sm={12} className='collapsable-form-style-radioButtons'>
<FormControl> <FormControl>
<FormLabel>Gynecological menstrual/Brest</FormLabel> <FormLabel>Gynecological menstrual/Brest</FormLabel>
<RadioGroup <RadioGroup
@ -370,11 +322,7 @@ export default function SystemReviewSection6({handleFormSection6Data,patientData
</FormControl> </FormControl>
</Grid> </Grid>
<Grid item xs={12} <Grid item xs={3} className='collapsable-form-style-radioButtons'>
xl={3}
lg={4}
md={6}
sm={12} className='collapsable-form-style-radioButtons'>
<FormControl> <FormControl>
<FormLabel>Lungs/Breathing</FormLabel> <FormLabel>Lungs/Breathing</FormLabel>
<RadioGroup <RadioGroup
@ -393,11 +341,7 @@ export default function SystemReviewSection6({handleFormSection6Data,patientData
</RadioGroup> </RadioGroup>
</FormControl> </FormControl>
</Grid> </Grid>
<Grid item xs={12} <Grid item xs={3} className='collapsable-form-style-radioButtons'>
xl={3}
lg={4}
md={6}
sm={12} className='collapsable-form-style-radioButtons'>
<FormControl> <FormControl>
<FormLabel>Nerves</FormLabel> <FormLabel>Nerves</FormLabel>
<RadioGroup <RadioGroup
@ -416,11 +360,7 @@ export default function SystemReviewSection6({handleFormSection6Data,patientData
</RadioGroup> </RadioGroup>
</FormControl> </FormControl>
</Grid> </Grid>
<Grid item xs={12} <Grid item xs={3} className='collapsable-form-style-radioButtons'>
xl={3}
lg={4}
md={6}
sm={12} className='collapsable-form-style-radioButtons'>
<FormControl> <FormControl>
<FormLabel>Blood</FormLabel> <FormLabel>Blood</FormLabel>
<RadioGroup <RadioGroup
@ -439,11 +379,7 @@ export default function SystemReviewSection6({handleFormSection6Data,patientData
</RadioGroup> </RadioGroup>
</FormControl> </FormControl>
</Grid> </Grid>
<Grid item xs={12} <Grid item xs={3} className='collapsable-form-style-radioButtons'>
xl={3}
lg={4}
md={6}
sm={12} className='collapsable-form-style-radioButtons'>
<FormControl> <FormControl>
<FormLabel>Prostate/Testicular/Penile</FormLabel> <FormLabel>Prostate/Testicular/Penile</FormLabel>
<RadioGroup <RadioGroup