diff --git a/src/Components/Facility/FacilityHome.tsx b/src/Components/Facility/FacilityHome.tsx index feb718015c5..febfaa193a7 100644 --- a/src/Components/Facility/FacilityHome.tsx +++ b/src/Components/Facility/FacilityHome.tsx @@ -116,11 +116,11 @@ export const FacilityHome = (props: any) => { {data.num_patient_referred || "-"} ); @@ -155,7 +155,7 @@ export const FacilityHome = (props: any) => { - + - + - + - + - + - + - - - - - - - -} diff --git a/src/Components/Patient/TreatmentForm.tsx b/src/Components/Patient/TreatmentForm.tsx deleted file mode 100644 index 36e8dd7ecc7..00000000000 --- a/src/Components/Patient/TreatmentForm.tsx +++ /dev/null @@ -1,252 +0,0 @@ -import React, { useState } from "react" -import { makeStyles, Theme } from '@material-ui/core/styles'; -import { useDispatch } from "react-redux"; -import { Box, Grid, Checkbox, Card, CardHeader, CardContent, CardActions, Button, FormControl, InputLabel, Select, MenuItem, Typography, FormLabel, RadioGroup, Radio, FormControlLabel } from "@material-ui/core"; -import { TextInputField, TimeInputField } from "../Common/HelperInputFields"; -// import { } from "../../Redux/actions"; -const isEmpty = require('lodash.isempty'); - - -const useStyles = makeStyles((theme: Theme) => ({ - formTop: { - marginTop: '80px', - marginBottom: "70px" - }, - formControl: { - margin: theme.spacing(1) - }, - selectLabel: { - background: 'white', - padding: '2px 10px' - }, - checkBoxLabel: { - marginLeft: '8px' - }, -})); - - -export const TreatmentForm = (props: any) => { - const classes = useStyles(); - const dispatch: any = useDispatch(); - const inputLabel = React.useRef(null); - const [selectedDate, setSelectedDate] = useState(new Date()); - - const initForm: any = { - patientExamDetails: "", - physicalExamSigns: "", - medicationAlready: "", - medProvidedAtCenter: "", - otherDetails: "", - temperature: "", - time: selectedDate - }; - const initErr: any = {}; - const [form, setForm] = useState(initForm); - const [errors, setErrors] = useState(initErr); - - const validateForm = () => { - const err: any = {}; - Object.keys(form).forEach(key => { - const value = form[key]; - switch (key) { - case "patientExamDetails": - if (!value) { - err[key] = "please fill the details"; - } - break; - case "physicalExamSigns": - if (!value) { - err[key] = "please fill the details"; - } - break; - case "medicationAlready": - if (!value) { - err[key] = "please fill the details"; - } - break; - case "medProvidedAtCenter": - if (!value) { - err[key] = "please fill the details"; - } - break; - case "temperature": - if (!value) { - err[key] = "please fill the temperature"; - } - break; - default: - break; - } - }); - if (!isEmpty(err)) { - setErrors(err); - return false; - } - setErrors({}); - return true; - }; - - const handleSubmit = (e: any) => { - e.preventDefault() - const validForm = validateForm(); - if (validForm) { - console.log('form', form); - } - } - - const handleChange = (e: any) => { - const { name, value } = e.target; - const formValues = { ...form }; - const errorField = Object.assign({}, errors); - if (errorField[name]) { - errorField[name] = null; - setErrors(errorField); - } - formValues[name] = value; - setForm(formValues) - } - - const handleTimeFieldChange = (date: any) => { - const formValues = { ...form }; - formValues['time'] = date; - setSelectedDate(date); - setForm(formValues); - }; - - return
- - - - - - - -
handleSubmit(e)}> - - - - - - Patient Daily Progress - - - - - - - - - - - - - - - - - - - Patient Medication - - - - - - - - - - - -
-
-
-
-
-} diff --git a/src/Router/AppRouter.tsx b/src/Router/AppRouter.tsx index bc1d9b2ce98..5c781b33658 100644 --- a/src/Router/AppRouter.tsx +++ b/src/Router/AppRouter.tsx @@ -1,4 +1,4 @@ -import { useRedirect, useRoutes , navigate, usePath } from "hookrouter"; +import { useRedirect, useRoutes, navigate, usePath } from "hookrouter"; import React, { useEffect, useState } from "react"; import { useDispatch, useSelector } from "react-redux"; import { BedCapacityForm } from "../Components/Facility/BedCapacityForm"; @@ -19,8 +19,6 @@ import { SampleDetails } from "../Components/Patient/SampleDetails"; import SampleReport from "../Components/Patient/SamplePreview"; import { SampleTest } from "../Components/Patient/SampleTest"; import SampleViewAdmin from "../Components/Patient/SampleViewAdmin"; -import { TeleConsultation } from "../Components/Patient/TeleConsultation"; -import { TreatmentForm } from "../Components/Patient/TreatmentForm"; import ManageUsers from "../Components/Users/ManageUsers"; import { UserAdd } from "../Components/Users/UserAdd"; import InventoryList from "../Components/Facility/InventoryList"; @@ -42,9 +40,7 @@ const routes = { "/user/add": () => , "/patients": () => , "/patient/:id": ({ id }: any) => , - "/patient/tele-consult": () => , "/patient/discharge": () => , - "/patient/treatment": () => , "/sample": () => , "/sample/:id": ({ id }: any) => , '/sample/report/:patientId': ({ patientId }: any) => , @@ -83,9 +79,6 @@ const routes = { "/facility/:facilityId/patient/:patientId/sample/:id": ({ id }: any) => ( ), - "/facility/:facilityId/patient/:id/treatment": ({ facilityId, id }: any) => ( - - ), "/facility/:facilityId/triage/:id": ({ facilityId, id }: any) => ( ), diff --git a/src/index.html b/src/index.html index b34b4ad7e52..215608dc42e 100644 --- a/src/index.html +++ b/src/index.html @@ -30,8 +30,6 @@ - -