section 8 data display
This commit is contained in:
parent
10724d86fb
commit
98b486d43c
@ -24,9 +24,11 @@ interface Patient {
|
|||||||
pregnancy:string|undefined,
|
pregnancy:string|undefined,
|
||||||
menstralCycle: any,
|
menstralCycle: any,
|
||||||
)=> void
|
)=> void
|
||||||
|
patientDataDiplay:any;
|
||||||
|
type:string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function OtherDetails8({handleFormSection8Data}:Props){
|
export default function OtherDetails8({handleFormSection8Data,patientDataDiplay,type}:Props){
|
||||||
|
|
||||||
const [patient, setPatient] = React.useState<Patient>({
|
const [patient, setPatient] = React.useState<Patient>({
|
||||||
familyHistory: '',
|
familyHistory: '',
|
||||||
@ -71,7 +73,8 @@ export default function OtherDetails8({handleFormSection8Data}:Props){
|
|||||||
multiline
|
multiline
|
||||||
variant="outlined"
|
variant="outlined"
|
||||||
label=""
|
label=""
|
||||||
name='explanation'
|
value={type=='display'?patientDataDiplay.familyHistory:patient.familyHistory}
|
||||||
|
disabled={type=='display'}
|
||||||
onChange={(event:any) => {
|
onChange={(event:any) => {
|
||||||
setPatient((prevValues) => ({
|
setPatient((prevValues) => ({
|
||||||
...prevValues,
|
...prevValues,
|
||||||
@ -86,6 +89,7 @@ export default function OtherDetails8({handleFormSection8Data}:Props){
|
|||||||
<FormLabel>How do you sleep?</FormLabel>
|
<FormLabel>How do you sleep?</FormLabel>
|
||||||
<RadioGroup
|
<RadioGroup
|
||||||
sx={{display:'flex', flexDirection:'row'}}
|
sx={{display:'flex', flexDirection:'row'}}
|
||||||
|
defaultValue={type=='display'?patientDataDiplay.sleep:patient.sleep}
|
||||||
onChange={(event) => {
|
onChange={(event) => {
|
||||||
setPatient((prevValues) => ({
|
setPatient((prevValues) => ({
|
||||||
...prevValues,
|
...prevValues,
|
||||||
@ -93,9 +97,9 @@ export default function OtherDetails8({handleFormSection8Data}:Props){
|
|||||||
}));
|
}));
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<FormControlLabel value="Back" control={<Radio />} label="Back" />
|
<FormControlLabel disabled={type=='display'} value="Back" control={<Radio />} label="Back" />
|
||||||
<FormControlLabel value="Side" control={<Radio />} label="Side" />
|
<FormControlLabel disabled={type=='display'} value="Side" control={<Radio />} label="Side" />
|
||||||
<FormControlLabel value="Stomach" control={<Radio />} label="Stomach" />
|
<FormControlLabel disabled={type=='display'} value="Stomach" control={<Radio />} label="Stomach" />
|
||||||
</RadioGroup>
|
</RadioGroup>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
</Grid>
|
</Grid>
|
||||||
@ -105,6 +109,7 @@ export default function OtherDetails8({handleFormSection8Data}:Props){
|
|||||||
<FormLabel>Do you use a pillow?</FormLabel>
|
<FormLabel>Do you use a pillow?</FormLabel>
|
||||||
<RadioGroup
|
<RadioGroup
|
||||||
sx={{display:'flex', flexDirection:'row'}}
|
sx={{display:'flex', flexDirection:'row'}}
|
||||||
|
defaultValue={type=='display'?patientDataDiplay.pillow:patient.pillow}
|
||||||
onChange={(event) => {
|
onChange={(event) => {
|
||||||
setPatient((prevValues) => ({
|
setPatient((prevValues) => ({
|
||||||
...prevValues,
|
...prevValues,
|
||||||
@ -112,8 +117,8 @@ export default function OtherDetails8({handleFormSection8Data}:Props){
|
|||||||
}));
|
}));
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<FormControlLabel value="Yes" control={<Radio />} label="Yes" />
|
<FormControlLabel disabled={type=='display'} value="Yes" control={<Radio />} label="Yes" />
|
||||||
<FormControlLabel value="No" control={<Radio />} label="No" />
|
<FormControlLabel disabled={type=='display'} value="No" control={<Radio />} label="No" />
|
||||||
</RadioGroup>
|
</RadioGroup>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
</Grid>
|
</Grid>
|
||||||
@ -123,6 +128,7 @@ export default function OtherDetails8({handleFormSection8Data}:Props){
|
|||||||
<FormLabel>Do you wear orthotics or arch support?</FormLabel>
|
<FormLabel>Do you wear orthotics or arch support?</FormLabel>
|
||||||
<RadioGroup
|
<RadioGroup
|
||||||
sx={{display:'flex', flexDirection:'row'}}
|
sx={{display:'flex', flexDirection:'row'}}
|
||||||
|
defaultValue={type=='display'?patientDataDiplay.orthotics:patient.orthotics}
|
||||||
onChange={(event) => {
|
onChange={(event) => {
|
||||||
setPatient((prevValues) => ({
|
setPatient((prevValues) => ({
|
||||||
...prevValues,
|
...prevValues,
|
||||||
@ -130,8 +136,8 @@ export default function OtherDetails8({handleFormSection8Data}:Props){
|
|||||||
}));
|
}));
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<FormControlLabel value="Yes" control={<Radio />} label="Yes" />
|
<FormControlLabel disabled={type=='display'} value="Yes" control={<Radio />} label="Yes" />
|
||||||
<FormControlLabel value="No" control={<Radio />} label="No" />
|
<FormControlLabel disabled={type=='display'} value="No" control={<Radio />} label="No" />
|
||||||
</RadioGroup>
|
</RadioGroup>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
</Grid>
|
</Grid>
|
||||||
@ -141,7 +147,8 @@ export default function OtherDetails8({handleFormSection8Data}:Props){
|
|||||||
<FormControl>
|
<FormControl>
|
||||||
<LocalizationProvider dateAdapter={AdapterDayjs}>
|
<LocalizationProvider dateAdapter={AdapterDayjs}>
|
||||||
<DatePicker
|
<DatePicker
|
||||||
value={patient.brestExam}
|
value={type=='display'?patientDataDiplay.brestExam:patient.brestExam}
|
||||||
|
disabled={type=='display'}
|
||||||
onChange={(event) => {
|
onChange={(event) => {
|
||||||
const formattedDate = formatDate(event)
|
const formattedDate = formatDate(event)
|
||||||
setPatient((prevValues) => ({
|
setPatient((prevValues) => ({
|
||||||
@ -164,6 +171,7 @@ export default function OtherDetails8({handleFormSection8Data}:Props){
|
|||||||
<FormLabel>Possible pregnancy?</FormLabel>
|
<FormLabel>Possible pregnancy?</FormLabel>
|
||||||
<RadioGroup
|
<RadioGroup
|
||||||
sx={{display:'flex', flexDirection:'row'}}
|
sx={{display:'flex', flexDirection:'row'}}
|
||||||
|
defaultValue={type=='display'?patientDataDiplay.pregnancy:patient.pregnancy}
|
||||||
onChange={(event) => {
|
onChange={(event) => {
|
||||||
setPatient((prevValues) => ({
|
setPatient((prevValues) => ({
|
||||||
...prevValues,
|
...prevValues,
|
||||||
@ -171,8 +179,8 @@ export default function OtherDetails8({handleFormSection8Data}:Props){
|
|||||||
}));
|
}));
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<FormControlLabel value="Yes" control={<Radio />} label="Yes" />
|
<FormControlLabel disabled={type=='display'} value="Yes" control={<Radio />} label="Yes" />
|
||||||
<FormControlLabel value="No" control={<Radio />} label="No" />
|
<FormControlLabel disabled={type=='display'} value="No" control={<Radio />} label="No" />
|
||||||
</RadioGroup>
|
</RadioGroup>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
</Grid>
|
</Grid>
|
||||||
@ -182,7 +190,8 @@ export default function OtherDetails8({handleFormSection8Data}:Props){
|
|||||||
<FormControl>
|
<FormControl>
|
||||||
<LocalizationProvider dateAdapter={AdapterDayjs}>
|
<LocalizationProvider dateAdapter={AdapterDayjs}>
|
||||||
<DatePicker
|
<DatePicker
|
||||||
value={patient.menstralCycle}
|
value={type=='display'?patientDataDiplay.menstralCycle:patient.menstralCycle}
|
||||||
|
disabled={type=='display'}
|
||||||
onChange={(event) => {
|
onChange={(event) => {
|
||||||
const formattedDate = formatDate(event)
|
const formattedDate = formatDate(event)
|
||||||
setPatient((prevValues) => ({
|
setPatient((prevValues) => ({
|
||||||
|
|||||||
@ -486,7 +486,7 @@ export default function PatientForm({type}:Props){
|
|||||||
<AccordionDetails>
|
<AccordionDetails>
|
||||||
<RecreationalHobbiesSection7
|
<RecreationalHobbiesSection7
|
||||||
handleFormSection7Data={handleFormSection7Data}
|
handleFormSection7Data={handleFormSection7Data}
|
||||||
patientDataDiplay={patientData.systemReviewQuestions}
|
patientDataDiplay={patientData.recreationalActivities}
|
||||||
type={type}/>
|
type={type}/>
|
||||||
</AccordionDetails>
|
</AccordionDetails>
|
||||||
</Accordion>
|
</Accordion>
|
||||||
@ -497,7 +497,10 @@ export default function PatientForm({type}:Props){
|
|||||||
</AccordionSummary>
|
</AccordionSummary>
|
||||||
|
|
||||||
<AccordionDetails>
|
<AccordionDetails>
|
||||||
<OtherDetails8 handleFormSection8Data={handleFormSection8Data}/>
|
<OtherDetails8
|
||||||
|
handleFormSection8Data={handleFormSection8Data}
|
||||||
|
patientDataDiplay={patientData.otherDetails}
|
||||||
|
type={type}/>
|
||||||
</AccordionDetails>
|
</AccordionDetails>
|
||||||
</Accordion>
|
</Accordion>
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user