allpatient data
This commit is contained in:
parent
65b559a4fb
commit
0293126f77
@ -20,21 +20,6 @@ import SystemReviewSection6 from './SyestemReviewSection6';
|
|||||||
import RecreationalHobbiesSection7 from './RecreationalHobbiesSection7';
|
import RecreationalHobbiesSection7 from './RecreationalHobbiesSection7';
|
||||||
import OtherDetails8 from './OtherDetails8';
|
import OtherDetails8 from './OtherDetails8';
|
||||||
|
|
||||||
interface Patient {
|
|
||||||
fullName: string;
|
|
||||||
homePhone: string;
|
|
||||||
cellPhone: string;
|
|
||||||
email: string;
|
|
||||||
age: number;
|
|
||||||
dateOfBirth: string;
|
|
||||||
socialSecurityNumber: string;
|
|
||||||
mailingAddress: string;
|
|
||||||
city: string;
|
|
||||||
state: string;
|
|
||||||
zipCode: string;
|
|
||||||
gender: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
const Accordion = styled((props: AccordionProps) => (
|
const Accordion = styled((props: AccordionProps) => (
|
||||||
<MuiAccordion disableGutters elevation={0} square {...props} />
|
<MuiAccordion disableGutters elevation={0} square {...props} />
|
||||||
))(({ theme }) => ({
|
))(({ theme }) => ({
|
||||||
@ -85,6 +70,8 @@ export default function PatientForm(){
|
|||||||
const [section6Data, setSection6Data] = React.useState<any>({});
|
const [section6Data, setSection6Data] = React.useState<any>({});
|
||||||
const [section7Data, setSection7Data] = React.useState<any>({});
|
const [section7Data, setSection7Data] = React.useState<any>({});
|
||||||
const [section8Data, setSection8Data] = React.useState<any>({});
|
const [section8Data, setSection8Data] = React.useState<any>({});
|
||||||
|
const [restructuredCurrentPatientData, setRestructuredCurrentPatientData] = React.useState<any>({});
|
||||||
|
const [allPatientData, setAllPatientData] = React.useState<any>([]);
|
||||||
|
|
||||||
const handleFormSection1Data = (
|
const handleFormSection1Data = (
|
||||||
fullName?: string|undefined,
|
fullName?: string|undefined,
|
||||||
@ -316,10 +303,10 @@ export default function PatientForm(){
|
|||||||
const handleFormSection8Data = (
|
const handleFormSection8Data = (
|
||||||
familyHistory: string|undefined,
|
familyHistory: string|undefined,
|
||||||
sleep: string|undefined,
|
sleep: string|undefined,
|
||||||
pillow:string|undefined,
|
pillow: string|undefined,
|
||||||
orthotics:string|undefined,
|
orthotics: string|undefined,
|
||||||
brestExam: any,
|
brestExam: any,
|
||||||
pregnancy:string|undefined,
|
pregnancy: string|undefined,
|
||||||
menstralCycle: any,
|
menstralCycle: any,
|
||||||
) =>{
|
) =>{
|
||||||
setSection8Data({
|
setSection8Data({
|
||||||
@ -333,10 +320,28 @@ export default function PatientForm(){
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleSubmit = (event: React.FormEvent<HTMLFormElement>) => {
|
const handleSubmit = () => {
|
||||||
event.preventDefault();
|
const newPatientData = {
|
||||||
|
section1: section1Data,
|
||||||
|
section2: section2Data,
|
||||||
|
section3: section3Data,
|
||||||
|
section4: section4Data,
|
||||||
|
section5: section5Data,
|
||||||
|
section6: section6Data,
|
||||||
|
section7: section7Data,
|
||||||
|
section8: section8Data,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Create a copy of the existing data array and push the new patient data
|
||||||
|
const updatedAllPatientData = [...allPatientData, newPatientData];
|
||||||
|
|
||||||
|
// Update the state with the new array
|
||||||
|
setAllPatientData(updatedAllPatientData);
|
||||||
|
|
||||||
|
console.log("UpdatedallPatientData:", updatedAllPatientData);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
const handleExpandChange =
|
const handleExpandChange =
|
||||||
(panel: string) => (event: React.SyntheticEvent, newExpanded: boolean) => {
|
(panel: string) => (event: React.SyntheticEvent, newExpanded: boolean) => {
|
||||||
setExpanded(newExpanded ? panel : false);
|
setExpanded(newExpanded ? panel : false);
|
||||||
@ -346,7 +351,6 @@ export default function PatientForm(){
|
|||||||
setIsChecked(event.target.checked);
|
setIsChecked(event.target.checked);
|
||||||
};
|
};
|
||||||
|
|
||||||
console.log("wyeytweevfde",section8Data)
|
|
||||||
|
|
||||||
|
|
||||||
return(
|
return(
|
||||||
@ -354,7 +358,7 @@ export default function PatientForm(){
|
|||||||
<Paper elevation={0} className='app-screen-constants'>
|
<Paper elevation={0} className='app-screen-constants'>
|
||||||
<Header/>
|
<Header/>
|
||||||
<Paper elevation={0} sx={{margin:4, minHeight:550}} >
|
<Paper elevation={0} sx={{margin:4, minHeight:550}} >
|
||||||
<form onSubmit={handleSubmit}>
|
{/* <form onSubmit={handleSubmit}> */}
|
||||||
<Typography sx={{fontSize:20}} gutterBottom>
|
<Typography sx={{fontSize:20}} gutterBottom>
|
||||||
Confidential Patient Information
|
Confidential Patient Information
|
||||||
</Typography>
|
</Typography>
|
||||||
@ -472,17 +476,18 @@ export default function PatientForm(){
|
|||||||
</Grid>
|
</Grid>
|
||||||
<Grid>
|
<Grid>
|
||||||
<Button
|
<Button
|
||||||
type="submit"
|
// type="submit"
|
||||||
variant="contained"
|
variant="contained"
|
||||||
color="primary"
|
color="primary"
|
||||||
sx={{ margin: 5, left: '40%', width: '200px' }}
|
sx={{ margin: 5, left: '40%', width: '200px' }}
|
||||||
disabled={isChecked==false || signature==''}
|
disabled={isChecked==false || signature==''}
|
||||||
|
onClick={handleSubmit}
|
||||||
>
|
>
|
||||||
Submit
|
Submit
|
||||||
</Button>
|
</Button>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
</form>
|
{/* </form> */}
|
||||||
|
|
||||||
</Paper>
|
</Paper>
|
||||||
<Footer/>
|
<Footer/>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user