allpatient data
This commit is contained in:
parent
65b559a4fb
commit
0293126f77
@ -20,21 +20,6 @@ import SystemReviewSection6 from './SyestemReviewSection6';
|
||||
import RecreationalHobbiesSection7 from './RecreationalHobbiesSection7';
|
||||
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) => (
|
||||
<MuiAccordion disableGutters elevation={0} square {...props} />
|
||||
))(({ theme }) => ({
|
||||
@ -85,6 +70,8 @@ export default function PatientForm(){
|
||||
const [section6Data, setSection6Data] = React.useState<any>({});
|
||||
const [section7Data, setSection7Data] = React.useState<any>({});
|
||||
const [section8Data, setSection8Data] = React.useState<any>({});
|
||||
const [restructuredCurrentPatientData, setRestructuredCurrentPatientData] = React.useState<any>({});
|
||||
const [allPatientData, setAllPatientData] = React.useState<any>([]);
|
||||
|
||||
const handleFormSection1Data = (
|
||||
fullName?: string|undefined,
|
||||
@ -333,10 +320,28 @@ export default function PatientForm(){
|
||||
})
|
||||
}
|
||||
|
||||
const handleSubmit = (event: React.FormEvent<HTMLFormElement>) => {
|
||||
event.preventDefault();
|
||||
const handleSubmit = () => {
|
||||
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 =
|
||||
(panel: string) => (event: React.SyntheticEvent, newExpanded: boolean) => {
|
||||
setExpanded(newExpanded ? panel : false);
|
||||
@ -346,7 +351,6 @@ export default function PatientForm(){
|
||||
setIsChecked(event.target.checked);
|
||||
};
|
||||
|
||||
console.log("wyeytweevfde",section8Data)
|
||||
|
||||
|
||||
return(
|
||||
@ -354,7 +358,7 @@ export default function PatientForm(){
|
||||
<Paper elevation={0} className='app-screen-constants'>
|
||||
<Header/>
|
||||
<Paper elevation={0} sx={{margin:4, minHeight:550}} >
|
||||
<form onSubmit={handleSubmit}>
|
||||
{/* <form onSubmit={handleSubmit}> */}
|
||||
<Typography sx={{fontSize:20}} gutterBottom>
|
||||
Confidential Patient Information
|
||||
</Typography>
|
||||
@ -472,17 +476,18 @@ export default function PatientForm(){
|
||||
</Grid>
|
||||
<Grid>
|
||||
<Button
|
||||
type="submit"
|
||||
// type="submit"
|
||||
variant="contained"
|
||||
color="primary"
|
||||
sx={{ margin: 5, left: '40%', width: '200px' }}
|
||||
disabled={isChecked==false || signature==''}
|
||||
onClick={handleSubmit}
|
||||
>
|
||||
Submit
|
||||
</Button>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</form>
|
||||
{/* </form> */}
|
||||
|
||||
</Paper>
|
||||
<Footer/>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user