view and new patient button
This commit is contained in:
parent
9b18f4aff0
commit
98df5a2825
@ -35,6 +35,7 @@ import PatientImageMarker from '../ImageMarker/PatientImageMarker';
|
|||||||
import ViewPatientImageMarker from '../ImageMarker/ViewPatientImageMarker';
|
import ViewPatientImageMarker from '../ImageMarker/ViewPatientImageMarker';
|
||||||
import AlertDialog from '../Helper/AlertDialogBox';
|
import AlertDialog from '../Helper/AlertDialogBox';
|
||||||
import SignatureComponent from '../Helper/SignatureComponent';
|
import SignatureComponent from '../Helper/SignatureComponent';
|
||||||
|
import { Link, useLocation } from 'react-router-dom';
|
||||||
|
|
||||||
const Accordion = styled((props: AccordionProps) => (
|
const Accordion = styled((props: AccordionProps) => (
|
||||||
<MuiAccordion disableGutters elevation={0} square {...props} />
|
<MuiAccordion disableGutters elevation={0} square {...props} />
|
||||||
@ -90,6 +91,7 @@ export default function PatientForm({ type }: Props) {
|
|||||||
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 [allPatientData, setAllPatientData] = React.useState<any>([]);
|
const [allPatientData, setAllPatientData] = React.useState<any>([]);
|
||||||
|
const [patientDetailsButtonFlag, setPatientDetailsButtonFlag ] = React.useState<boolean>(false)
|
||||||
|
|
||||||
const handleFormSection1Data = (
|
const handleFormSection1Data = (
|
||||||
fullName?: string | undefined,
|
fullName?: string | undefined,
|
||||||
@ -373,6 +375,13 @@ export default function PatientForm({ type }: Props) {
|
|||||||
section1Data.mailingAddress !== ''
|
section1Data.mailingAddress !== ''
|
||||||
) {
|
) {
|
||||||
TextFile();
|
TextFile();
|
||||||
|
setPatientDetailsButtonFlag(true)
|
||||||
|
setAlertProps({
|
||||||
|
open: true,
|
||||||
|
severity: 'success',
|
||||||
|
message: 'The patient details have been submitted!',
|
||||||
|
duration: 5000,
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
setAlertProps({
|
setAlertProps({
|
||||||
open: true,
|
open: true,
|
||||||
@ -699,9 +708,40 @@ export default function PatientForm({ type }: Props) {
|
|||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
<Grid container flexDirection={'row-reverse'}>
|
<Grid container flexDirection={'row-reverse'}>
|
||||||
|
{patientDetailsButtonFlag && type!=='display'?
|
||||||
|
<Grid item>
|
||||||
|
<Button
|
||||||
|
variant='contained'
|
||||||
|
color='primary'
|
||||||
|
sx={{ margin: 5, width: '200px' }}
|
||||||
|
onClick={(e)=>{
|
||||||
|
|
||||||
|
}}
|
||||||
|
component={Link}
|
||||||
|
to='/view-details'
|
||||||
|
>
|
||||||
|
View Patient Details
|
||||||
|
</Button>
|
||||||
|
</Grid>:null}
|
||||||
|
|
||||||
|
{type=='display'?
|
||||||
|
<Grid item>
|
||||||
|
<Button
|
||||||
|
variant='contained'
|
||||||
|
color='primary'
|
||||||
|
sx={{ margin: 5, width: '200px' }}
|
||||||
|
onClick={(e)=>{
|
||||||
|
|
||||||
|
}}
|
||||||
|
component={Link}
|
||||||
|
to='/'
|
||||||
|
>
|
||||||
|
New Patient Form
|
||||||
|
</Button>
|
||||||
|
</Grid>:null}
|
||||||
|
|
||||||
<Grid item>
|
<Grid item>
|
||||||
<Button
|
<Button
|
||||||
// type="submit"
|
|
||||||
variant='contained'
|
variant='contained'
|
||||||
color='primary'
|
color='primary'
|
||||||
sx={{ margin: 5, width: '200px' }}
|
sx={{ margin: 5, width: '200px' }}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user