type cleanup
This commit is contained in:
parent
5dc96104a8
commit
bdbe3002ed
@ -13,6 +13,7 @@ import {
|
||||
FormControl,
|
||||
} from '@mui/material';
|
||||
import * as React from 'react';
|
||||
import { PastTreatmentInterface } from '../Interface/Patient';
|
||||
|
||||
interface RowData {
|
||||
date: string;
|
||||
@ -27,20 +28,7 @@ interface DataTableProps {
|
||||
}
|
||||
|
||||
type Props = {
|
||||
handlePastTreatmentFormData: (
|
||||
generalHealth: string | undefined,
|
||||
presentProblemBefore: string | undefined,
|
||||
ifYespresentProblemBefore: string | undefined,
|
||||
ifYestreatmentProvided: string | undefined,
|
||||
ifYesOutcome: string | undefined,
|
||||
strokeBloodclotting: string | undefined,
|
||||
ifYesstrokeBloodclotting: string | undefined,
|
||||
dizzinessFetigue: string | undefined,
|
||||
ifyesdizzinessFetigue: string | undefined,
|
||||
antiColligent: string | undefined,
|
||||
injuriesHospitalization: string | undefined,
|
||||
supplementsOrDrugs: string | undefined
|
||||
) => void;
|
||||
handlePastTreatmentFormData: (patient:PastTreatmentInterface) => void;
|
||||
patientDataDiplay: any;
|
||||
type: string;
|
||||
};
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
export interface Patient {
|
||||
export interface PersonalInformationInterface {
|
||||
fullName: string;
|
||||
homePhone: string;
|
||||
cellPhone: string;
|
||||
@ -12,3 +12,111 @@ export interface Patient {
|
||||
zipCode: string;
|
||||
gender: string;
|
||||
}
|
||||
|
||||
export interface FamilyInformationInterface {
|
||||
maritalStatus: string | undefined;
|
||||
numberOfChildren: string | undefined;
|
||||
occupation: string | undefined;
|
||||
hoursPerWeek: number | string | undefined;
|
||||
employer: string | undefined;
|
||||
businessPhone: string | undefined;
|
||||
spouseName: string | undefined;
|
||||
spouseEmployer: string | undefined;
|
||||
spouseBusinessPhone: string | undefined;
|
||||
emergencyContact: string | undefined;
|
||||
relationship: string | undefined;
|
||||
spousePhone: string | undefined;
|
||||
}
|
||||
|
||||
export interface MedicalHistoryInterface {
|
||||
physicianname: string |undefined;
|
||||
physiciancity: string |undefined;
|
||||
physicianstate: string |undefined;
|
||||
physicianphone: string |undefined;
|
||||
chiropractorName: string |undefined;
|
||||
chiropractorState: string |undefined;
|
||||
xray: string|undefined;
|
||||
haveChiropractor: string|undefined;
|
||||
reference: string|undefined;
|
||||
visitDetails: string |undefined;
|
||||
cellPhoneProvider: string |undefined;
|
||||
}
|
||||
|
||||
export interface InjuryDetailsInterface {
|
||||
chiefComplaint: string;
|
||||
painWorse: string[];
|
||||
painBetter: string[];
|
||||
painQuality: string[];
|
||||
painWorstTime: string[];
|
||||
currentComplaintIssues: string[];
|
||||
painDuration: string;
|
||||
currentTreatment: string;
|
||||
treatmentGoal: string;
|
||||
selfTreatment: string;
|
||||
}
|
||||
|
||||
export interface PastTreatmentInterface {
|
||||
generalHealth: string;
|
||||
presentProblemBefore: string;
|
||||
ifYespresentProblemBefore: string;
|
||||
ifYestreatmentProvided: string;
|
||||
ifYesOutcome: string;
|
||||
strokeBloodclotting: string;
|
||||
ifYesstrokeBloodclotting: string;
|
||||
dizzinessFetigue: string;
|
||||
ifyesdizzinessFetigue: string;
|
||||
antiColligent: string;
|
||||
injuriesHospitalization: string;
|
||||
supplementsOrDrugs: string;
|
||||
}
|
||||
|
||||
export interface SystemReviewInterface {
|
||||
eyes: string;
|
||||
IntestinesBowls: string;
|
||||
jointsBones: string;
|
||||
allergies: string;
|
||||
earsNoseMouth: string;
|
||||
urinary: string;
|
||||
skin: string;
|
||||
psychological: string;
|
||||
heart: string;
|
||||
muscles: string;
|
||||
internalOrgans: string;
|
||||
gynecological: string;
|
||||
lungsBreathing: string;
|
||||
nerves: string;
|
||||
blood: string;
|
||||
prostate: string;
|
||||
explanation: string;
|
||||
}
|
||||
|
||||
export interface RecreationalHobbieInterface {
|
||||
hobbies: string;
|
||||
educationLevel: string;
|
||||
excercise: string;
|
||||
excerciseExplanation: string;
|
||||
tobacco: string;
|
||||
tobaccoExplanation: string;
|
||||
alcohol: string;
|
||||
alcoholExplanation: string;
|
||||
healthyDiet: string;
|
||||
healthyDietExplanation: string;
|
||||
sleep: string;
|
||||
sleepExplanation: string;
|
||||
workSchool: string;
|
||||
workSchoolExplanation: string;
|
||||
familyLife: string;
|
||||
familyLifeExplanation: string;
|
||||
drugs: string;
|
||||
drugsExplanation:string;
|
||||
}
|
||||
|
||||
export interface OtherDetailsInterface {
|
||||
familyHistory: string;
|
||||
sleep: string;
|
||||
pillow: string;
|
||||
orthotics: string;
|
||||
brestExam: any;
|
||||
pregnancy: string;
|
||||
menstralCycle: any;
|
||||
}
|
||||
|
||||
@ -15,37 +15,10 @@ import { useFormik } from 'formik';
|
||||
import * as yup from 'yup';
|
||||
import { LocalizationProvider, DatePicker } from '@mui/x-date-pickers';
|
||||
import React, { useEffect } from 'react';
|
||||
|
||||
interface Patient {
|
||||
maritalStatus: string | undefined;
|
||||
numberOfChildren: string | undefined;
|
||||
occupation: string | undefined;
|
||||
hoursPerWeek: number | string | undefined;
|
||||
employer: string | undefined;
|
||||
businessPhone: string | undefined;
|
||||
spouseName: string | undefined;
|
||||
spouseEmployer: string | undefined;
|
||||
spouseBusinessPhone: string | undefined;
|
||||
emergencyContact: string | undefined;
|
||||
relationship: string | undefined;
|
||||
spousePhone: string | undefined;
|
||||
}
|
||||
import { FamilyInformationInterface } from '../Interface/Patient';
|
||||
|
||||
type Props = {
|
||||
handleFamilyInformationFormData: (
|
||||
maritalStatus: string | undefined,
|
||||
numberOfChildren: string | undefined,
|
||||
occupation: string | undefined,
|
||||
hoursPerWeek: number | string | undefined,
|
||||
employer: string | undefined,
|
||||
businessPhone: string | undefined,
|
||||
spouseName: string | undefined,
|
||||
spouseEmployer: string | undefined,
|
||||
spouseBusinessPhone: string | undefined,
|
||||
emergencyContact: string | undefined,
|
||||
relationship: string | undefined,
|
||||
spousePhone: string | undefined
|
||||
) => void;
|
||||
handleFamilyInformationFormData: (patient:FamilyInformationInterface ) => void;
|
||||
patientDataDiplay: any;
|
||||
type: string;
|
||||
};
|
||||
@ -55,7 +28,7 @@ export default function FamilyInformationForm({
|
||||
patientDataDiplay,
|
||||
type,
|
||||
}: Props) {
|
||||
const [patient, setPatient] = React.useState<Patient>({
|
||||
const [patient, setPatient] = React.useState<FamilyInformationInterface>({
|
||||
maritalStatus: '',
|
||||
numberOfChildren: '',
|
||||
occupation: '',
|
||||
@ -71,20 +44,7 @@ export default function FamilyInformationForm({
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
handleFamilyInformationFormData(
|
||||
patient.maritalStatus,
|
||||
patient.numberOfChildren,
|
||||
patient.occupation,
|
||||
patient.hoursPerWeek,
|
||||
patient.employer,
|
||||
patient.businessPhone,
|
||||
patient.spouseName,
|
||||
patient.spouseEmployer,
|
||||
patient.spouseBusinessPhone,
|
||||
patient.emergencyContact,
|
||||
patient.relationship,
|
||||
patient.spousePhone
|
||||
);
|
||||
handleFamilyInformationFormData(patient);
|
||||
}, [patient]);
|
||||
|
||||
return (
|
||||
|
||||
@ -3,42 +3,17 @@ import { Checkbox, FormControlLabel, TextField, FormGroup, Grid, FormControl, Fo
|
||||
import { useFormik } from 'formik';
|
||||
import * as Yup from 'yup';
|
||||
import { useEffect } from 'react';
|
||||
|
||||
interface Patient {
|
||||
physicianname: string |undefined;
|
||||
physiciancity: string |undefined;
|
||||
physicianstate: string |undefined;
|
||||
physicianphone: string |undefined;
|
||||
chiropractorName: string |undefined;
|
||||
chiropractorState: string |undefined;
|
||||
xray: string|undefined;
|
||||
haveChiropractor: string|undefined;
|
||||
reference: string|undefined;
|
||||
visitDetails: string |undefined;
|
||||
cellPhoneProvider: string |undefined;
|
||||
}
|
||||
import { MedicalHistoryInterface } from '../Interface/Patient';
|
||||
|
||||
type Props = {
|
||||
handleMedicalHistoryFormData:(
|
||||
physicianname?: string |undefined,
|
||||
physiciancity?: string |undefined,
|
||||
physicianstate?: string |undefined,
|
||||
physicianphone?: string |undefined,
|
||||
chiropractorName?: string |undefined,
|
||||
chiropractorState?: string |undefined,
|
||||
xray?: string|undefined,
|
||||
haveChiropractor?: string|undefined,
|
||||
reference?: string|undefined,
|
||||
visitDetails?: string |undefined,
|
||||
cellPhoneProvider?: string |undefined,
|
||||
)=> void
|
||||
handleMedicalHistoryFormData:(patient:MedicalHistoryInterface)=> void
|
||||
patientDataDiplay:any;
|
||||
type:string;
|
||||
}
|
||||
|
||||
export default function MedicalHistoryForm({handleMedicalHistoryFormData,patientDataDiplay,type}:Props){
|
||||
|
||||
const [patient, setPatient] = React.useState<Patient>({
|
||||
const [patient, setPatient] = React.useState<MedicalHistoryInterface>({
|
||||
physicianname: '',
|
||||
physiciancity: '',
|
||||
physicianstate: '',
|
||||
@ -53,19 +28,7 @@ export default function MedicalHistoryForm({handleMedicalHistoryFormData,patient
|
||||
});
|
||||
|
||||
useEffect(()=>{
|
||||
handleMedicalHistoryFormData(
|
||||
patient.physicianname,
|
||||
patient.physiciancity,
|
||||
patient.physicianstate,
|
||||
patient.physicianphone,
|
||||
patient.chiropractorName,
|
||||
patient.chiropractorState,
|
||||
patient.xray,
|
||||
patient.haveChiropractor,
|
||||
patient.reference,
|
||||
patient.visitDetails,
|
||||
patient.cellPhoneProvider,
|
||||
)
|
||||
handleMedicalHistoryFormData(patient)
|
||||
},[patient])
|
||||
|
||||
return(
|
||||
|
||||
@ -11,27 +11,10 @@ import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs';
|
||||
import React, { useEffect } from 'react';
|
||||
import { LocalizationProvider, DatePicker } from '@mui/x-date-pickers';
|
||||
import dayjs from 'dayjs';
|
||||
|
||||
interface Patient {
|
||||
familyHistory: string;
|
||||
sleep: string;
|
||||
pillow: string;
|
||||
orthotics: string;
|
||||
brestExam: any;
|
||||
pregnancy: string;
|
||||
menstralCycle: any;
|
||||
}
|
||||
import { OtherDetailsInterface } from '../Interface/Patient';
|
||||
|
||||
type Props = {
|
||||
handleOtherDetailsFormData: (
|
||||
familyHistory: string | undefined,
|
||||
sleep: string | undefined,
|
||||
pillow: string | undefined,
|
||||
orthotics: string | undefined,
|
||||
brestExam: any,
|
||||
pregnancy: string | undefined,
|
||||
menstralCycle: any
|
||||
) => void;
|
||||
handleOtherDetailsFormData: (patient:OtherDetailsInterface) => void;
|
||||
patientDataDiplay: any;
|
||||
type: string;
|
||||
};
|
||||
@ -41,7 +24,7 @@ export default function OtherDetailsForm({
|
||||
patientDataDiplay,
|
||||
type,
|
||||
}: Props) {
|
||||
const [patient, setPatient] = React.useState<Patient>({
|
||||
const [patient, setPatient] = React.useState<OtherDetailsInterface>({
|
||||
familyHistory: '',
|
||||
sleep: '',
|
||||
pillow: '',
|
||||
@ -52,15 +35,7 @@ export default function OtherDetailsForm({
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
handleOtherDetailsFormData(
|
||||
patient.familyHistory,
|
||||
patient.sleep,
|
||||
patient.pillow,
|
||||
patient.orthotics,
|
||||
(patient.brestExam = dayjs(patient.brestExam)),
|
||||
patient.pregnancy,
|
||||
(patient.menstralCycle = dayjs(patient.menstralCycle))
|
||||
);
|
||||
handleOtherDetailsFormData(patient);
|
||||
}, [patient]);
|
||||
|
||||
const formatDate = (inputDate: any) => {
|
||||
@ -230,7 +205,7 @@ export default function OtherDetailsForm({
|
||||
const formattedDate = formatDate(event);
|
||||
setPatient((prevValues) => ({
|
||||
...prevValues,
|
||||
brestExam: formattedDate,
|
||||
brestExam: dayjs(formattedDate),
|
||||
}));
|
||||
}}
|
||||
renderInput={(params) => (
|
||||
@ -302,7 +277,7 @@ export default function OtherDetailsForm({
|
||||
const formattedDate = formatDate(event);
|
||||
setPatient((prevValues) => ({
|
||||
...prevValues,
|
||||
menstralCycle: formattedDate,
|
||||
menstralCycle: dayjs(formattedDate),
|
||||
}));
|
||||
}}
|
||||
renderInput={(params) => (
|
||||
|
||||
@ -14,43 +14,20 @@ import { useFormik } from 'formik';
|
||||
import * as Yup from 'yup';
|
||||
import path from 'path';
|
||||
import { useEffect } from 'react';
|
||||
|
||||
interface Patient {
|
||||
chiefComplaint: string;
|
||||
painWorse: string[];
|
||||
painBetter: string[];
|
||||
painQuality: string[];
|
||||
painWorstTime: string[];
|
||||
currentComplaintIssues: string[];
|
||||
painDuration: string;
|
||||
currentTreatment: string;
|
||||
treatmentGoal: string;
|
||||
selfTreatment: string;
|
||||
}
|
||||
import { InjuryDetailsInterface } from '../Interface/Patient';
|
||||
|
||||
type Props = {
|
||||
handleInjuryDetailsFormData: (
|
||||
chiefComplaint: string | undefined,
|
||||
painWorse: any,
|
||||
painBetter: any,
|
||||
painQuality: any,
|
||||
painWorstTime: any,
|
||||
currentComplaintIssues: any,
|
||||
painDuration: string | undefined,
|
||||
currentTreatment: string | undefined,
|
||||
treatmentGoal: string | undefined,
|
||||
selfTreatment: string | undefined
|
||||
) => void;
|
||||
handleInjuryDetailsFormData: (patient:InjuryDetailsInterface) => void;
|
||||
patientDataDiplay: any;
|
||||
type: string;
|
||||
};
|
||||
|
||||
export default function PainAnalysisForm({
|
||||
export default function InjuryDetailsForm({
|
||||
handleInjuryDetailsFormData,
|
||||
patientDataDiplay,
|
||||
type,
|
||||
}: Props) {
|
||||
const [patient, setPatient] = React.useState<Patient>({
|
||||
const [patient, setPatient] = React.useState<InjuryDetailsInterface>({
|
||||
chiefComplaint: '',
|
||||
painWorse: [],
|
||||
painBetter: [],
|
||||
@ -64,18 +41,7 @@ export default function PainAnalysisForm({
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
handleInjuryDetailsFormData(
|
||||
patient.chiefComplaint,
|
||||
patient.painWorse,
|
||||
patient.painBetter,
|
||||
patient.painQuality,
|
||||
patient.painWorstTime,
|
||||
patient.currentComplaintIssues,
|
||||
patient.painDuration,
|
||||
patient.currentTreatment,
|
||||
patient.treatmentGoal,
|
||||
patient.selfTreatment
|
||||
);
|
||||
handleInjuryDetailsFormData(patient);
|
||||
}, [patient]);
|
||||
|
||||
const handlePainWorseChange = (
|
||||
|
||||
@ -11,37 +11,10 @@ import {
|
||||
import * as React from 'react';
|
||||
import Table from '../Helper/AddNewTable';
|
||||
import { useEffect } from 'react';
|
||||
|
||||
interface Patient {
|
||||
generalHealth: string;
|
||||
presentProblemBefore: string;
|
||||
ifYespresentProblemBefore: string;
|
||||
ifYestreatmentProvided: string;
|
||||
ifYesOutcome: string;
|
||||
strokeBloodclotting: string;
|
||||
ifYesstrokeBloodclotting: string;
|
||||
dizzinessFetigue: string;
|
||||
ifyesdizzinessFetigue: string;
|
||||
antiColligent: string;
|
||||
injuriesHospitalization: string;
|
||||
supplementsOrDrugs: string;
|
||||
}
|
||||
import { PastTreatmentInterface } from '../Interface/Patient';
|
||||
|
||||
type Props = {
|
||||
handlePastTreatmentFormData: (
|
||||
generalHealth: string | undefined,
|
||||
presentProblemBefore: string | undefined,
|
||||
ifYespresentProblemBefore: string | undefined,
|
||||
ifYestreatmentProvided: string | undefined,
|
||||
ifYesOutcome: string | undefined,
|
||||
strokeBloodclotting: string | undefined,
|
||||
ifYesstrokeBloodclotting: string | undefined,
|
||||
dizzinessFetigue: string | undefined,
|
||||
ifyesdizzinessFetigue: string | undefined,
|
||||
antiColligent: string | undefined,
|
||||
injuriesHospitalization: string | undefined,
|
||||
supplementsOrDrugs: string | undefined
|
||||
) => void;
|
||||
handlePastTreatmentFormData: (patient:PastTreatmentInterface) => void;
|
||||
patientDataDiplay: any;
|
||||
type: string;
|
||||
};
|
||||
@ -51,7 +24,7 @@ export default function PastTreatmentForm({
|
||||
patientDataDiplay,
|
||||
type,
|
||||
}: Props) {
|
||||
const [patient, setPatient] = React.useState<Patient>({
|
||||
const [patient, setPatient] = React.useState<PastTreatmentInterface>({
|
||||
generalHealth: '',
|
||||
presentProblemBefore: '',
|
||||
ifYespresentProblemBefore: '',
|
||||
@ -67,20 +40,7 @@ export default function PastTreatmentForm({
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
handlePastTreatmentFormData(
|
||||
patient.generalHealth,
|
||||
patient.presentProblemBefore,
|
||||
patient.ifYespresentProblemBefore,
|
||||
patient.ifYestreatmentProvided,
|
||||
patient.ifYesOutcome,
|
||||
patient.strokeBloodclotting,
|
||||
patient.ifYesstrokeBloodclotting,
|
||||
patient.dizzinessFetigue,
|
||||
patient.ifyesdizzinessFetigue,
|
||||
patient.antiColligent,
|
||||
patient.injuriesHospitalization,
|
||||
patient.supplementsOrDrugs
|
||||
);
|
||||
handlePastTreatmentFormData(patient);
|
||||
}, [patient]);
|
||||
|
||||
return (
|
||||
|
||||
@ -26,7 +26,7 @@ import MuiAccordionSummary, {
|
||||
import MuiAccordionDetails from '@mui/material/AccordionDetails';
|
||||
import MedicalHistory from './MedicalHistorySection';
|
||||
import FamilyInformationForm from './FamilyInformationSection';
|
||||
import PainAnalysisForm from './PainAnalysisSection';
|
||||
import InjuryDetailsForm from './PainAnalysisSection';
|
||||
import PastTreatmentForm from './PastTreatment';
|
||||
import SystemReviewForm from './SyestemReviewSection';
|
||||
import RecreationalHobbiesForm from './RecreationalHobbiesSection';
|
||||
@ -36,7 +36,7 @@ import ViewPatientImageMarker from '../ImageMarker/ViewPatientImageMarker';
|
||||
import AlertDialog from '../Helper/AlertDialogBox';
|
||||
import SignatureComponent from '../Helper/SignatureComponent';
|
||||
import { Link, useLocation } from 'react-router-dom';
|
||||
import { Patient } from '../Interface/Patient';
|
||||
import { FamilyInformationInterface, InjuryDetailsInterface, MedicalHistoryInterface, OtherDetailsInterface, PastTreatmentInterface, PersonalInformationInterface, RecreationalHobbieInterface, SystemReviewInterface } from '../Interface/Patient';
|
||||
|
||||
const Accordion = styled((props: AccordionProps) => (
|
||||
<MuiAccordion disableGutters elevation={0} square {...props} />
|
||||
@ -95,224 +95,38 @@ export default function PatientForm({ type }: Props) {
|
||||
const [patientDetailsButtonFlag, setPatientDetailsButtonFlag] =
|
||||
React.useState<boolean>(false);
|
||||
|
||||
const handlePersonalInformationFormData = (patient: Patient) => {
|
||||
const handlePersonalInformationFormData = (patient: PersonalInformationInterface) => {
|
||||
setPersonalInformation(patient);
|
||||
};
|
||||
|
||||
const handleFamilyInformationFormData = (
|
||||
maritalStatus: string | undefined,
|
||||
numberOfChildren: string | undefined,
|
||||
occupation: string | undefined,
|
||||
hoursPerWeek: number | string | undefined,
|
||||
employer: string | undefined,
|
||||
businessPhone: string | undefined,
|
||||
spouseName: string | undefined,
|
||||
spouseEmployer: string | undefined,
|
||||
spouseBusinessPhone: string | undefined,
|
||||
emergencyContact: string | undefined,
|
||||
relationship: string | undefined,
|
||||
spousePhone: string | undefined
|
||||
patient:FamilyInformationInterface
|
||||
) => {
|
||||
setFamilyInformation({
|
||||
maritalStatus,
|
||||
numberOfChildren,
|
||||
occupation,
|
||||
hoursPerWeek,
|
||||
employer,
|
||||
businessPhone,
|
||||
spouseName,
|
||||
spouseEmployer,
|
||||
spouseBusinessPhone,
|
||||
emergencyContact,
|
||||
relationship,
|
||||
spousePhone,
|
||||
});
|
||||
setFamilyInformation(patient);
|
||||
};
|
||||
|
||||
const handleMedicalHistoryFormData = (
|
||||
physicianname: string | undefined,
|
||||
physiciancity: string | undefined,
|
||||
physicianstate: string | undefined,
|
||||
physicianphone: string | undefined,
|
||||
chiropractorName: string | undefined,
|
||||
chiropractorState: string | undefined,
|
||||
xray: string | undefined,
|
||||
haveChiropractor: string | undefined,
|
||||
reference: string | undefined,
|
||||
visitDetails: string | undefined,
|
||||
cellPhoneProvider: string | undefined
|
||||
) => {
|
||||
setMedicalHistory({
|
||||
physicianname,
|
||||
physiciancity,
|
||||
physicianstate,
|
||||
physicianphone,
|
||||
chiropractorName,
|
||||
chiropractorState,
|
||||
xray,
|
||||
haveChiropractor,
|
||||
reference,
|
||||
visitDetails,
|
||||
cellPhoneProvider,
|
||||
});
|
||||
const handleMedicalHistoryFormData = (patient:MedicalHistoryInterface) => {
|
||||
setMedicalHistory(patient);
|
||||
};
|
||||
|
||||
const handleInjuryDetailsFormData = (
|
||||
chiefComplaint: string | undefined,
|
||||
painWorse: any,
|
||||
painBetter: any,
|
||||
painQuality: any,
|
||||
painWorstTime: any,
|
||||
currentComplaintIssues: any,
|
||||
painDuration: string | undefined,
|
||||
currentTreatment: string | undefined,
|
||||
treatmentGoal: string | undefined,
|
||||
selfTreatment: string | undefined
|
||||
) => {
|
||||
setInjuryDetails({
|
||||
chiefComplaint,
|
||||
painWorse,
|
||||
painBetter,
|
||||
painQuality,
|
||||
painWorstTime,
|
||||
currentComplaintIssues,
|
||||
painDuration,
|
||||
currentTreatment,
|
||||
treatmentGoal,
|
||||
selfTreatment,
|
||||
});
|
||||
const handleInjuryDetailsFormData = (patient:InjuryDetailsInterface) => {
|
||||
setInjuryDetails(patient);
|
||||
};
|
||||
|
||||
const handlePastTreatmentFormData = (
|
||||
generalHealth: string | undefined,
|
||||
presentProblemBefore: string | undefined,
|
||||
ifYespresentProblemBefore: string | undefined,
|
||||
ifYestreatmentProvided: string | undefined,
|
||||
ifYesOutcome: string | undefined,
|
||||
strokeBloodclotting: string | undefined,
|
||||
ifYesstrokeBloodclotting: string | undefined,
|
||||
dizzinessFetigue: string | undefined,
|
||||
ifyesdizzinessFetigue: string | undefined,
|
||||
antiColligent: string | undefined,
|
||||
injuriesHospitalization: string | undefined,
|
||||
supplementsOrDrugs: string | undefined
|
||||
) => {
|
||||
setPastTreatment({
|
||||
generalHealth,
|
||||
presentProblemBefore,
|
||||
ifYespresentProblemBefore,
|
||||
ifYestreatmentProvided,
|
||||
ifYesOutcome,
|
||||
strokeBloodclotting,
|
||||
ifYesstrokeBloodclotting,
|
||||
dizzinessFetigue,
|
||||
ifyesdizzinessFetigue,
|
||||
antiColligent,
|
||||
injuriesHospitalization,
|
||||
supplementsOrDrugs,
|
||||
});
|
||||
const handlePastTreatmentFormData = (patient:PastTreatmentInterface) => {
|
||||
setPastTreatment(patient);
|
||||
};
|
||||
|
||||
const handleSystemReviewFormData = (
|
||||
eyes: string | undefined,
|
||||
IntestinesBowls: string | undefined,
|
||||
jointsBones: string | undefined,
|
||||
allergies: string | undefined,
|
||||
earsNoseMouth: string | undefined,
|
||||
urinary: string | undefined,
|
||||
skin: string | undefined,
|
||||
psychological: string | undefined,
|
||||
heart: string | undefined,
|
||||
muscles: string | undefined,
|
||||
internalOrgans: string | undefined,
|
||||
gynecological: string | undefined,
|
||||
lungsBreathing: string | undefined,
|
||||
nerves: string | undefined,
|
||||
blood: string | undefined,
|
||||
prostate: string | undefined,
|
||||
explanation: string | undefined
|
||||
) => {
|
||||
setSystemReviewQuestions({
|
||||
eyes,
|
||||
IntestinesBowls,
|
||||
jointsBones,
|
||||
allergies,
|
||||
earsNoseMouth,
|
||||
urinary,
|
||||
skin,
|
||||
psychological,
|
||||
heart,
|
||||
muscles,
|
||||
internalOrgans,
|
||||
gynecological,
|
||||
lungsBreathing,
|
||||
nerves,
|
||||
blood,
|
||||
prostate,
|
||||
explanation,
|
||||
});
|
||||
const handleSystemReviewFormData = (patient:SystemReviewInterface) => {
|
||||
setSystemReviewQuestions(patient);
|
||||
};
|
||||
|
||||
const handleRecreationalActivitiesFormData = (
|
||||
hobbies: string | undefined,
|
||||
educationLevel: string | undefined,
|
||||
excercise: string | undefined,
|
||||
excerciseExplanation: string | undefined,
|
||||
tobacco: string | undefined,
|
||||
tobaccoExplanation: string | undefined,
|
||||
alcohol: string | undefined,
|
||||
alcoholExplanation: string | undefined,
|
||||
healthyDiet: string | undefined,
|
||||
healthyDietExplanation: string | undefined,
|
||||
sleep: string | undefined,
|
||||
sleepExplanation: string | undefined,
|
||||
workSchool: string | undefined,
|
||||
workSchoolExplanation: string | undefined,
|
||||
familyLife: string | undefined,
|
||||
familyLifeExplanation: string | undefined,
|
||||
drugs: string | undefined,
|
||||
drugsExplanation: string | undefined
|
||||
) => {
|
||||
setRecreationalActivities({
|
||||
hobbies,
|
||||
educationLevel,
|
||||
excercise,
|
||||
excerciseExplanation,
|
||||
tobacco,
|
||||
tobaccoExplanation,
|
||||
alcohol,
|
||||
alcoholExplanation,
|
||||
healthyDiet,
|
||||
healthyDietExplanation,
|
||||
sleep,
|
||||
sleepExplanation,
|
||||
workSchool,
|
||||
workSchoolExplanation,
|
||||
familyLife,
|
||||
familyLifeExplanation,
|
||||
drugs,
|
||||
drugsExplanation,
|
||||
});
|
||||
const handleRecreationalActivitiesFormData = (patient:RecreationalHobbieInterface) => {
|
||||
setRecreationalActivities(patient);
|
||||
};
|
||||
|
||||
const handleOtherDetailsFormData = (
|
||||
familyHistory: string | undefined,
|
||||
sleep: string | undefined,
|
||||
pillow: string | undefined,
|
||||
orthotics: string | undefined,
|
||||
brestExam: any,
|
||||
pregnancy: string | undefined,
|
||||
menstralCycle: any
|
||||
) => {
|
||||
setOtherDetails({
|
||||
familyHistory,
|
||||
sleep,
|
||||
pillow,
|
||||
orthotics,
|
||||
brestExam,
|
||||
pregnancy,
|
||||
menstralCycle,
|
||||
});
|
||||
const handleOtherDetailsFormData = (patient:OtherDetailsInterface) => {
|
||||
setOtherDetails(patient);
|
||||
};
|
||||
|
||||
const handleSubmit = () => {
|
||||
@ -520,7 +334,7 @@ export default function PatientForm({ type }: Props) {
|
||||
</AccordionSummary>
|
||||
|
||||
<AccordionDetails>
|
||||
<PainAnalysisForm
|
||||
<InjuryDetailsForm
|
||||
handleInjuryDetailsFormData={handleInjuryDetailsFormData}
|
||||
patientDataDiplay={patientData.injuryDetails}
|
||||
type={type}
|
||||
|
||||
@ -13,10 +13,10 @@ import {
|
||||
import { LocalizationProvider, DatePicker } from '@mui/x-date-pickers';
|
||||
import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs';
|
||||
import { useEffect } from 'react';
|
||||
import { Patient } from '../Interface/Patient';
|
||||
import { PersonalInformationInterface } from '../Interface/Patient';
|
||||
|
||||
type Props = {
|
||||
handlePersonalInformationFormData: (patient: Patient) => void;
|
||||
handlePersonalInformationFormData: (patient: PersonalInformationInterface) => void;
|
||||
patientDataDiplay: any;
|
||||
type: string;
|
||||
};
|
||||
@ -27,7 +27,7 @@ export default function PersonalInformationForm({
|
||||
type,
|
||||
}: Props) {
|
||||
const [birthDateValue, setBirthDateValue] = React.useState<any>();
|
||||
const [patient, setPatient] = React.useState<Patient>({
|
||||
const [patient, setPatient] = React.useState<PersonalInformationInterface>({
|
||||
fullName: '',
|
||||
homePhone: '',
|
||||
cellPhone: '',
|
||||
|
||||
@ -1,54 +1,15 @@
|
||||
import { FormControl, FormControlLabel, FormLabel, Grid, Radio, RadioGroup, TextField } from "@mui/material";
|
||||
import React, { useEffect } from "react";
|
||||
|
||||
interface Patient {
|
||||
hobbies: string;
|
||||
educationLevel: string;
|
||||
excercise: string;
|
||||
excerciseExplanation: string;
|
||||
tobacco: string;
|
||||
tobaccoExplanation: string;
|
||||
alcohol: string;
|
||||
alcoholExplanation: string;
|
||||
healthyDiet: string;
|
||||
healthyDietExplanation: string;
|
||||
sleep: string;
|
||||
sleepExplanation: string;
|
||||
workSchool: string;
|
||||
workSchoolExplanation: string;
|
||||
familyLife: string;
|
||||
familyLifeExplanation: string;
|
||||
drugs: string;
|
||||
drugsExplanation:string;
|
||||
}
|
||||
import { RecreationalHobbieInterface } from "../Interface/Patient";
|
||||
|
||||
type Props = {
|
||||
handleRecreationalActivitiesFormData:(
|
||||
hobbies: string|undefined,
|
||||
educationLevel: string|undefined,
|
||||
excercise: string|undefined,
|
||||
excerciseExplanation: string|undefined,
|
||||
tobacco: string|undefined,
|
||||
tobaccoExplanation: string|undefined,
|
||||
alcohol: string|undefined,
|
||||
alcoholExplanation: string|undefined,
|
||||
healthyDiet: string|undefined,
|
||||
healthyDietExplanation: string|undefined,
|
||||
sleep: string|undefined,
|
||||
sleepExplanation: string|undefined,
|
||||
workSchool: string|undefined,
|
||||
workSchoolExplanation: string|undefined,
|
||||
familyLife: string|undefined,
|
||||
familyLifeExplanation: string|undefined,
|
||||
drugs: string|undefined,
|
||||
drugsExplanation:string|undefined,
|
||||
)=> void
|
||||
handleRecreationalActivitiesFormData:(patient:RecreationalHobbieInterface)=> void
|
||||
patientDataDiplay:any;
|
||||
type:string;
|
||||
}
|
||||
|
||||
export default function RecreationalHobbiesForm({handleRecreationalActivitiesFormData,patientDataDiplay,type}:Props){
|
||||
const [patient, setPatient] = React.useState<Patient>({
|
||||
const [patient, setPatient] = React.useState<RecreationalHobbieInterface>({
|
||||
hobbies: '',
|
||||
educationLevel: '',
|
||||
excercise:'',
|
||||
@ -71,26 +32,7 @@ export default function RecreationalHobbiesForm({handleRecreationalActivitiesFor
|
||||
|
||||
|
||||
useEffect(()=>{
|
||||
handleRecreationalActivitiesFormData(
|
||||
patient.hobbies,
|
||||
patient.educationLevel,
|
||||
patient.excercise,
|
||||
patient.excerciseExplanation,
|
||||
patient.tobacco,
|
||||
patient.tobaccoExplanation,
|
||||
patient.alcohol,
|
||||
patient.alcoholExplanation,
|
||||
patient.healthyDiet,
|
||||
patient.healthyDietExplanation,
|
||||
patient.sleep,
|
||||
patient.sleepExplanation,
|
||||
patient.workSchool,
|
||||
patient.workSchoolExplanation,
|
||||
patient.familyLife,
|
||||
patient.familyLifeExplanation,
|
||||
patient.drugs,
|
||||
patient.drugsExplanation
|
||||
)
|
||||
handleRecreationalActivitiesFormData(patient)
|
||||
},[patient])
|
||||
|
||||
return(
|
||||
|
||||
@ -8,47 +8,10 @@ import {
|
||||
TextField,
|
||||
} from '@mui/material';
|
||||
import React, { useEffect } from 'react';
|
||||
|
||||
interface Patient {
|
||||
eyes: string;
|
||||
IntestinesBowls: string;
|
||||
jointsBones: string;
|
||||
allergies: string;
|
||||
earsNoseMouth: string;
|
||||
urinary: string;
|
||||
skin: string;
|
||||
psychological: string;
|
||||
heart: string;
|
||||
muscles: string;
|
||||
internalOrgans: string;
|
||||
gynecological: string;
|
||||
lungsBreathing: string;
|
||||
nerves: string;
|
||||
blood: string;
|
||||
prostate: string;
|
||||
explanation: string;
|
||||
}
|
||||
import { SystemReviewInterface } from '../Interface/Patient';
|
||||
|
||||
type Props = {
|
||||
handleSystemReviewFormData: (
|
||||
eyes: string | undefined,
|
||||
IntestinesBowls: string | undefined,
|
||||
jointsBones: string | undefined,
|
||||
allergies: string | undefined,
|
||||
earsNoseMouth: string | undefined,
|
||||
urinary: string | undefined,
|
||||
skin: string | undefined,
|
||||
psychological: string | undefined,
|
||||
heart: string | undefined,
|
||||
muscles: string | undefined,
|
||||
internalOrgans: string | undefined,
|
||||
gynecological: string | undefined,
|
||||
lungsBreathing: string | undefined,
|
||||
nerves: string | undefined,
|
||||
blood: string | undefined,
|
||||
prostate: string | undefined,
|
||||
explanation: string | undefined
|
||||
) => void;
|
||||
handleSystemReviewFormData: (patient:SystemReviewInterface) => void;
|
||||
patientDataDiplay: any;
|
||||
type: string;
|
||||
};
|
||||
@ -58,7 +21,7 @@ export default function SystemReviewForm({
|
||||
patientDataDiplay,
|
||||
type,
|
||||
}: Props) {
|
||||
const [patient, setPatients] = React.useState<Patient>({
|
||||
const [patient, setPatients] = React.useState<SystemReviewInterface>({
|
||||
eyes: '',
|
||||
IntestinesBowls: '',
|
||||
jointsBones: '',
|
||||
@ -79,25 +42,7 @@ export default function SystemReviewForm({
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
handleSystemReviewFormData(
|
||||
patient.eyes,
|
||||
patient.IntestinesBowls,
|
||||
patient.jointsBones,
|
||||
patient.allergies,
|
||||
patient.earsNoseMouth,
|
||||
patient.urinary,
|
||||
patient.skin,
|
||||
patient.psychological,
|
||||
patient.heart,
|
||||
patient.muscles,
|
||||
patient.internalOrgans,
|
||||
patient.gynecological,
|
||||
patient.lungsBreathing,
|
||||
patient.nerves,
|
||||
patient.blood,
|
||||
patient.prostate,
|
||||
patient.explanation
|
||||
);
|
||||
handleSystemReviewFormData(patient);
|
||||
}, [patient]);
|
||||
return (
|
||||
<>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user