1157 lines
41 KiB
Plaintext
1157 lines
41 KiB
Plaintext
import {
|
|
FormControl,
|
|
Grid,
|
|
|
|
Stack,
|
|
TextField,
|
|
useMediaQuery,
|
|
|
|
Select,
|
|
} from "@mui/material";
|
|
import Box from '@mui/material/Box';
|
|
import { useTheme } from "@mui/material/styles";
|
|
import PropTypes from "prop-types";
|
|
import Input from "../common/Input";
|
|
import SingleSelect from "../common/SingleSelect";
|
|
import SingleSelectNew from "../common/SingleSelectNew";
|
|
import MultipleSelectNew from "../common/MultipleSelectNew";
|
|
import { Fullscreen } from "@mui/icons-material";
|
|
import TextArea from "../common/TextArea";
|
|
//import Input from "./Input";
|
|
|
|
//import Input from "../Input";
|
|
|
|
const CheckupParameterForm = ({
|
|
values,
|
|
touched,
|
|
handleBlur,
|
|
errors,
|
|
handleChange,
|
|
setFieldValue,
|
|
handleSubmit,
|
|
getFieldProps,
|
|
keyHealthParameter,
|
|
lessMoreRisk,
|
|
healthAdvice,
|
|
checkupSection,
|
|
checkupParaValues,
|
|
checkupType,
|
|
unitDate,
|
|
ruleEquation
|
|
}) => {
|
|
CheckupParameterForm.propTypes = {
|
|
values: PropTypes.object.isRequired,
|
|
touched: PropTypes.object.isRequired,
|
|
errors: PropTypes.object.isRequired,
|
|
handleBlur: PropTypes.func.isRequired,
|
|
handleChange: PropTypes.func.isRequired,
|
|
setFieldValue: PropTypes.func.isRequired,
|
|
handleSubmit: PropTypes.func.isRequired,
|
|
};
|
|
|
|
const healthkeyselect = ["Capital/non consumeble instruments", "other"];
|
|
const lessriskselect = ["Active", "Not Active"];
|
|
const moreriskselect = ["Active", "Not Active"];
|
|
const lessadviceselect = ["Active", "Not Active"];
|
|
const moreadviceselect = ["Active", "Not Active"];
|
|
const sectionselect = ["I", "II", "III"];
|
|
const inputtypeselect = ["Text", "Number"];
|
|
const statusselect = ["Lower", "Middle"];
|
|
const editableselect = ["Yes", "No"];
|
|
const unitselect = ["Yes", "No"];
|
|
const paramselect = ["opd", "daycare", "injury"];
|
|
const rulesselect = ["Yes", "No"];
|
|
const parentselect = ["Yes", "No"];
|
|
const ailment = [{ label: "Yes", id: 1 }];
|
|
|
|
const theme = useTheme();
|
|
const isMobile = useMediaQuery(theme.breakpoints.down("md"));
|
|
const isSmaller = useMediaQuery(theme.breakpoints.down("sm"));
|
|
|
|
return (
|
|
<Box sx={{ maxWidth: "1000px" }}>
|
|
<Stack
|
|
direction={isMobile ? "column" : "row"}
|
|
spacing={isMobile ? 1 : 4}
|
|
sx={{ justifyContent: "center", alignItems: "center", width: "100%" }}
|
|
>
|
|
<Input
|
|
label="Checkup Parameter Name"
|
|
name="parameterName"
|
|
type="text"
|
|
// size="large"
|
|
size="small"
|
|
sx={{ width: isSmaller ? "100%" : "500px" }}
|
|
// x={{ width: isMobile ? '100%' : '500px', minWidth: '500px' }}
|
|
value={values.parameterName}
|
|
onChange={handleChange}
|
|
onBlur={handleBlur}
|
|
helperText={
|
|
errors.parameterName && touched.parameterName ? (
|
|
<span style={{ color: "red" }}>{errors.parameterName}</span>
|
|
) : null
|
|
}
|
|
/>
|
|
<SingleSelectNew
|
|
label="Health Key Name"
|
|
name="keyHealthMapNameId"
|
|
type="text"
|
|
size="small"
|
|
// sx={{ width: "500px" }}
|
|
sx={{ width: isSmaller ? "100%" : "500px" }}
|
|
// x={{ width: isMobile ? '100%' : '500px', minWidth: '500px' }}
|
|
options={keyHealthParameter}
|
|
getOptionLabel={(option) => option.label}
|
|
value={
|
|
keyHealthParameter.find((option) => option.id === values.keyHealthMapNameId) || null
|
|
}
|
|
onChange={(event, newValue) => {
|
|
setFieldValue("keyHealthMapNameId", newValue ? newValue.id : ""); // Store only the id in Formik
|
|
}}
|
|
onBlur={handleBlur}
|
|
/>
|
|
</Stack>
|
|
|
|
<Stack
|
|
direction={isMobile ? "column" : "row"}
|
|
spacing={isMobile ? 1 : 4}
|
|
sx={{ justifyContent: "center", alignItems: "center", mt: 2 }}
|
|
>
|
|
<Input
|
|
label="Starting Range"
|
|
name="startingRange"
|
|
type="text"
|
|
// size="large"
|
|
size="small"
|
|
sx={{ width: isMobile ? "100%" : "500px" }}
|
|
value={values.startingRange}
|
|
onChange={handleChange}
|
|
onBlur={handleBlur}
|
|
helperText={
|
|
errors.startingRange && touched.startingRange ? (
|
|
<span style={{ color: "red" }}>{errors.startingRange}</span>
|
|
) : null
|
|
}
|
|
/>
|
|
<Input
|
|
label="Ending Range"
|
|
name="endingRange"
|
|
type="text"
|
|
size="small"
|
|
sx={{ width: isMobile ? "100%" : "500px" }}
|
|
// size="large"
|
|
value={values.endingRange}
|
|
onChange={handleChange}
|
|
onBlur={handleBlur}
|
|
helperText={
|
|
errors.endingRange && touched.endingRange ? (
|
|
<span style={{ color: "red" }}>{errors.endingRange}</span>
|
|
) : null
|
|
}
|
|
/>
|
|
</Stack>
|
|
|
|
<Stack
|
|
direction={isMobile ? "column" : "row"}
|
|
spacing={isMobile ? 1 : 4}
|
|
sx={{ justifyContent: "center", alignItems: "center", mt: 1 }}
|
|
>
|
|
<MultipleSelectNew
|
|
label="Less Risk"
|
|
name="lessRisksIds"
|
|
type="text"
|
|
size="small"
|
|
sx={{ width: isMobile ? "100%" : "500px" }}
|
|
value={lessMoreRisk.filter((option) =>
|
|
values.lessRisksIds.includes(option.id))}
|
|
onChange={(event, newValue) => {
|
|
const selectedIds = newValue.map((option) => option.id);
|
|
setFieldValue("lessRisksIds", selectedIds);
|
|
}}
|
|
onBlur={handleBlur}
|
|
options={lessMoreRisk}
|
|
getOptionLabel={(option) => option.label} // Display the label for each option
|
|
/>
|
|
<MultipleSelectNew
|
|
label="More Risk"
|
|
name="moreRisksIds"
|
|
type="text"
|
|
size="small"
|
|
sx={{ width: isMobile ? "100%" : "500px" }}
|
|
value={lessMoreRisk.filter((option) =>
|
|
values.moreRisksIds.includes(option.id))}
|
|
onChange={(event, newValue) => {
|
|
const selectedIds = newValue.map((option) => option.id);
|
|
setFieldValue("moreRisksIds", selectedIds);
|
|
}}
|
|
onBlur={handleBlur}
|
|
options={lessMoreRisk}
|
|
getOptionLabel={(option) => option.label} // Display the label for each option
|
|
/>
|
|
</Stack>
|
|
<Stack
|
|
direction={isMobile ? "column" : "row"}
|
|
spacing={isMobile ? 1 : 4}
|
|
sx={{ justifyContent: "center", alignItems: "center", mt: 1 }}
|
|
>
|
|
<MultipleSelectNew
|
|
label="Less Advice"
|
|
name="lessAdvicesIds"
|
|
type="text"
|
|
size="small"
|
|
sx={{ width: isMobile ? "100%" : "500px" }}
|
|
value={healthAdvice.filter((option) =>
|
|
values.lessAdvicesIds.includes(option.id))}
|
|
onChange={(event, newValue) => {
|
|
const selectedIds = newValue.map((option) => option.id);
|
|
setFieldValue("lessAdvicesIds", selectedIds);
|
|
}}
|
|
onBlur={handleBlur}
|
|
options={healthAdvice}
|
|
getOptionLabel={(option) => option.label} // Display the label for each option
|
|
/>
|
|
<MultipleSelectNew
|
|
label="More Advice"
|
|
name="moreAdvicesIds"
|
|
type="text"
|
|
size="small"
|
|
sx={{ width: isMobile ? "100%" : "500px" }}
|
|
value={healthAdvice.filter((option) =>
|
|
values.moreAdvicesIds.includes(option.id))}
|
|
onChange={(event, newValue) => {
|
|
const selectedIds = newValue.map((option) => option.id);
|
|
setFieldValue("moreAdvicesIds", selectedIds);
|
|
}}
|
|
onBlur={handleBlur}
|
|
options={healthAdvice}
|
|
getOptionLabel={(option) => option.label} // Display the label for each option
|
|
/>
|
|
</Stack>
|
|
|
|
<Stack
|
|
direction={isMobile ? "column" : "row"}
|
|
spacing={isMobile ? 1 : 4}
|
|
sx={{ justifyContent: "center", alignItems: "center", mt: 1 }}
|
|
>
|
|
<SingleSelectNew
|
|
label="Section"
|
|
name="checkupFormSectionId"
|
|
type="text"
|
|
size="small"
|
|
sx={{ width: isMobile ? "100%" : "500px" }}
|
|
options={checkupSection}
|
|
getOptionLabel={(option) => option.label}
|
|
value={
|
|
checkupSection.find((option) => option.id === values.checkupFormSectionId) || null
|
|
}
|
|
onChange={(event, newValue) => {
|
|
setFieldValue("checkupFormSectionId", newValue ? newValue.id : ""); // Store only the id in Formik
|
|
}}
|
|
onBlur={handleBlur}
|
|
/>
|
|
<Input
|
|
label="Column Order"
|
|
name="columnorder"
|
|
type="text"
|
|
size="small"
|
|
sx={{ width: isMobile ? "100%" : "500px" }}
|
|
value={values.columnorder}
|
|
onChange={handleChange}
|
|
onBlur={handleBlur}
|
|
helperText={
|
|
errors.columnorder && touched.columnorder ? (
|
|
<span style={{ color: "red" }}>{errors.columnorder}</span>
|
|
) : null
|
|
}
|
|
/>
|
|
</Stack>
|
|
|
|
<Stack
|
|
direction={isMobile ? "column" : "row"}
|
|
spacing={isMobile ? 1 : 4}
|
|
sx={{ justifyContent: "center", alignItems: "center", mt: 1 }}
|
|
>
|
|
<Input
|
|
label="Column Name"
|
|
name="columnName"
|
|
type="text"
|
|
size="small"
|
|
sx={{ width: isMobile ? "100%" : "500px" }}
|
|
value={values.columnName}
|
|
onChange={handleChange}
|
|
onBlur={handleBlur}
|
|
helperText={
|
|
errors.columnName && touched.columnName ? (
|
|
<span style={{ color: "red" }}>{errors.columnName}</span>
|
|
) : null
|
|
}
|
|
/>
|
|
<Input
|
|
label="Group"
|
|
name="groupId"
|
|
type="text"
|
|
size="small"
|
|
sx={{ width: isMobile ? "100%" : "500px" }}
|
|
value={values.groupId}
|
|
onChange={handleChange}
|
|
onBlur={handleBlur}
|
|
helperText={
|
|
errors.groupId && touched.groupId ? (
|
|
<span style={{ color: "red" }}>{errors.groupId}</span>
|
|
) : null
|
|
}
|
|
/>
|
|
</Stack>
|
|
|
|
<Stack
|
|
direction={isMobile ? "column" : "row"}
|
|
spacing={isMobile ? 1 : 4}
|
|
sx={{ justifyContent: "center", alignItems: "center", mt: 1 }}
|
|
>
|
|
<Input
|
|
label="Placeholder"
|
|
name="placeHolderName"
|
|
type="text"
|
|
size="small"
|
|
sx={{ width: isMobile ? "100%" : "500px" }}
|
|
value={values.placeHolderName}
|
|
onChange={handleChange}
|
|
onBlur={handleBlur}
|
|
helperText={
|
|
errors.placeHolderName && touched.placeHolderName ? (
|
|
<span style={{ color: "red" }}>{errors.placeHolderName}</span>
|
|
) : null
|
|
}
|
|
/>
|
|
<MultipleSelectNew
|
|
label="Parameter Value Name"
|
|
name="parameterValueIds"
|
|
type="text"
|
|
size="small"
|
|
sx={{ width: isMobile ? "100%" : "500px" }}
|
|
value={checkupParaValues.filter((option) =>
|
|
values.parameterValueIds.includes(option.id))}
|
|
onChange={(event, newValue) => {
|
|
const selectedIds = newValue.map((option) => option.id);
|
|
setFieldValue("parameterValueIds", selectedIds);
|
|
}}
|
|
onBlur={handleBlur}
|
|
options={checkupParaValues}
|
|
getOptionLabel={(option) => option.label} // Display the label for each option
|
|
/>
|
|
</Stack>
|
|
<Stack
|
|
direction={isMobile ? "column" : "row"}
|
|
spacing={isMobile ? 1 : 4}
|
|
sx={{ justifyContent: "center", alignItems: "center", mt: 1 }}
|
|
>
|
|
<SingleSelectNew
|
|
label="Input Type"
|
|
name="inputType"
|
|
type="text"
|
|
size="small"
|
|
sx={{ width: isMobile ? "100%" : "500px" }}
|
|
options={["number","text","Select","TextArea","Multiple"]}
|
|
getOptionLabel={(option) => option}
|
|
value={values.inputType}
|
|
onChange={(event, newValue) => {
|
|
setFieldValue("inputType", newValue ? newValue : ""); // Store only the id in Formik
|
|
}}
|
|
onBlur={handleBlur}
|
|
/>
|
|
<MultipleSelectNew
|
|
label="Checkup Type"
|
|
name="checkupTypeIds"
|
|
type="text"
|
|
size="small"
|
|
sx={{ width: isMobile ? "100%" : "500px" }}
|
|
value={checkupType.filter((option) =>
|
|
values.checkupTypeIds.includes(option.id))}
|
|
onChange={(event, newValue) => {
|
|
const selectedIds = newValue.map((option) => option.id);
|
|
setFieldValue("checkupTypeIds", selectedIds);
|
|
}}
|
|
onBlur={handleBlur}
|
|
options={checkupType}
|
|
getOptionLabel={(option) => option.label} // Display the label for each option
|
|
/>
|
|
</Stack>
|
|
<Stack
|
|
direction={isMobile ? "column" : "row"}
|
|
spacing={isMobile ? 1 : 4}
|
|
sx={{ justifyContent: "center", alignItems: "center", mt: 1 }}
|
|
>
|
|
<SingleSelectNew
|
|
label="Status"
|
|
name="enabled"
|
|
type="text"
|
|
size="small"
|
|
sx={{ width: isMobile ? "100%" : "500px" }}
|
|
options={["Active","Inactive"]}
|
|
getOptionLabel={(option) => option}
|
|
// value={values.enabled}
|
|
// value={values.enabled === "Y" ? "Active" : "Inactive"}
|
|
// onChange={(event, newValue) => {
|
|
// setFieldValue("enabled", newValue === "Active" ? 'Y' : "N"); // Store only the id in Formik
|
|
// }}
|
|
value={
|
|
values.enabled === "Y" ? "Active" :
|
|
values.enabled === "N" ? "Inactive" : "" // Display empty on start
|
|
}
|
|
onChange={(event, newValue) => {
|
|
if (newValue === "Active") {
|
|
setFieldValue("enabled", "Y");
|
|
} else if (newValue === "Inactive") {
|
|
setFieldValue("enabled", "N");
|
|
} else {
|
|
setFieldValue("enabled", ""); // Handle clearing the selection
|
|
}
|
|
}}
|
|
onBlur={handleBlur}
|
|
/>
|
|
<SingleSelectNew
|
|
label="Editable/ Non Edital Field"
|
|
name="readonlyField"
|
|
type="text"
|
|
size="small"
|
|
sx={{ width: isMobile ? "100%" : "500px" }}
|
|
options={["Editable","Non-Editable"]}
|
|
getOptionLabel={(option) => option}
|
|
value={
|
|
values.readonlyField === "Y" ? "Editable" :
|
|
values.readonlyField === "N" ? "Non-Editable" : "" // Display empty on start
|
|
}
|
|
onChange={(event, newValue) => {
|
|
if (newValue === "Editable") {
|
|
setFieldValue("readonlyField", "Y");
|
|
} else if (newValue === "Non-Editable") {
|
|
setFieldValue("readonlyField", "N");
|
|
} else {
|
|
setFieldValue("readonlyField", ""); // Handle clearing the selection
|
|
}
|
|
}}
|
|
onBlur={handleBlur}
|
|
/>
|
|
|
|
</Stack>
|
|
<Stack
|
|
direction={isMobile ? "column" : "row"}
|
|
spacing={isMobile ? 1 : 4}
|
|
sx={{ justifyContent: "center", alignItems: "center", mt: 1 }}
|
|
>
|
|
<SingleSelectNew
|
|
label="Select Unit"
|
|
name="unitId"
|
|
type="text"
|
|
size="small"
|
|
sx={{ width: isMobile ? "100%" : "500px" }}
|
|
options={unitDate}
|
|
getOptionLabel={(option) => option.label}
|
|
value={
|
|
unitDate.find((option) => option.id === values.unitId) || null
|
|
}
|
|
onChange={(event, newValue) => {
|
|
setFieldValue("unitId", newValue ? newValue.id : ""); // Store only the id in Formik
|
|
}}
|
|
onBlur={handleBlur}
|
|
/>
|
|
<TextField
|
|
label= "Ref Ranges"
|
|
type={'text'}
|
|
fullWidth={true}
|
|
size= "small"
|
|
sx={{ width: isMobile ? "100%" : "500px" }}
|
|
name="refRanges"
|
|
{...getFieldProps("refRanges")}
|
|
|
|
multiline
|
|
minRows={1}
|
|
maxRows={Infinity}
|
|
/>
|
|
</Stack>
|
|
|
|
|
|
|
|
<Stack
|
|
direction={isMobile ? "column" : "row"}
|
|
spacing={isMobile ? 1 : 4}
|
|
sx={{ justifyContent: "center", alignItems: "center", mt: 1 }}
|
|
>
|
|
<Stack direction={'row'} spacing={1} sx={{width : '50%',justifyContent : 'space-around',alignItems : 'center'}}>
|
|
<SingleSelectNew
|
|
label="Is OPD Param?"
|
|
name="opdParam"
|
|
type="text"
|
|
size="small"
|
|
sx={{ width: "100%" }}
|
|
options={[{label : 'Yes',id : 1},{label : 'No',id : 0}]}
|
|
getOptionLabel={(option) => option.label}
|
|
value={
|
|
[{label : 'Yes',id : 1},{label : 'No',id : 0}].find((option) => option.id === values.opdParam) || null
|
|
}
|
|
onChange={(event, newValue) => {
|
|
setFieldValue("opdParam", newValue ? newValue.id : ""); // Store only the id in Formik
|
|
}}
|
|
onBlur={handleBlur}
|
|
/>
|
|
<SingleSelectNew
|
|
label="Is DayCare Param?"
|
|
name="ipdParam"
|
|
type="text"
|
|
size="small"
|
|
sx={{ width: "100%" }}
|
|
// sx={{ width: isMobile ? "100%" : "500px" }}
|
|
options={[{label : 'Yes',id : 1},{label : 'No',id : 0}]}
|
|
getOptionLabel={(option) => option.label}
|
|
value={
|
|
[{label : 'Yes',id : 1},{label : 'No',id : 0}].find((option) => option.id === values.ipdParam) || null
|
|
}
|
|
onChange={(event, newValue) => {
|
|
setFieldValue("ipdParam", newValue ? newValue.id : ""); // Store only the id in Formik
|
|
}}
|
|
onBlur={handleBlur}
|
|
/>
|
|
<SingleSelectNew
|
|
label="Is Injury Param?"
|
|
name="injParam"
|
|
type="text"
|
|
size="small"
|
|
sx={{ width: "100%" }}
|
|
// sx={{ width: isMobile ? "100%" : "500px" }}
|
|
options={[{label : 'Yes',id : 1},{label : 'No',id : 0}]}
|
|
getOptionLabel={(option) => option.label}
|
|
value={
|
|
[{label : 'Yes',id : 1},{label : 'No',id : 0}].find((option) => option.id === values.injParam) || null
|
|
}
|
|
onChange={(event, newValue) => {
|
|
setFieldValue("injParam", newValue ? newValue.id : ""); // Store only the id in Formik
|
|
}}
|
|
onBlur={handleBlur}
|
|
/>
|
|
</Stack>
|
|
<MultipleSelectNew
|
|
label="Range Rules"
|
|
name="ruleIds"
|
|
type="text"
|
|
size="small"
|
|
sx={{ width: isMobile ? "100%" : "500px" }}
|
|
value={ruleEquation.filter((option) =>
|
|
values.ruleIds.includes(option.id))}
|
|
onChange={(event, newValue) => {
|
|
const selectedIds = newValue.map((option) => option.id);
|
|
setFieldValue("ruleIds", selectedIds);
|
|
}}
|
|
onBlur={handleBlur}
|
|
options={ruleEquation}
|
|
getOptionLabel={(option) => option.label} // Display the label for each option
|
|
/>
|
|
</Stack>
|
|
|
|
<Stack
|
|
direction={isMobile ? "column" : "row"}
|
|
spacing={isMobile ? 1 : 4}
|
|
sx={{ justifyContent: "center", alignItems: "center", mt: 1 }}
|
|
>
|
|
<Input
|
|
label="Parent Param"
|
|
name="parentParam"
|
|
type="text"
|
|
size="small"
|
|
sx={{ width: isMobile ? "100%" : "500px" }}
|
|
value={values.parentParam}
|
|
onChange={handleChange}
|
|
onBlur={handleBlur}
|
|
helperText={
|
|
errors.parentParam && touched.parentParam ? (
|
|
<span style={{ color: "red" }}>{errors.parentParam}</span>
|
|
) : null
|
|
}
|
|
/>
|
|
<Input
|
|
label="Default Value"
|
|
name="defaultValue"
|
|
type="text"
|
|
// size="large"
|
|
size="small"
|
|
sx={{ width: isSmaller ? "100%" : "500px" }}
|
|
// x={{ width: isMobile ? '100%' : '500px', minWidth: '500px' }}
|
|
value={values.defaultValue}
|
|
onChange={handleChange}
|
|
onBlur={handleBlur}
|
|
helperText={
|
|
errors.defaultValue && touched.defaultValue ? (
|
|
<span style={{ color: "red" }}>{errors.defaultValue}</span>
|
|
) : null
|
|
}
|
|
/>
|
|
</Stack>
|
|
</Box>
|
|
);
|
|
};
|
|
|
|
export default CheckupParameterForm;
|
|
|
|
{
|
|
/*<div style={{ display: "flex", justifyContent: "center" }}>
|
|
<form onSubmit={handleSubmit}>
|
|
<Grid container spacing={0} justifyContent="center" alignItems="center" >
|
|
|
|
<Grid itemxs={2} sm={10} justifyContent="center" alignItems="center">
|
|
<FormControl Width={100*100}>
|
|
<Grid container spacing={4} justifyContent="center" alignItems="center">
|
|
<Grid item xs={12} sm={4} container justifyContent="center" alignItems="center">
|
|
<Input
|
|
label="Checkup Parameter Name"
|
|
name="cpname"
|
|
type="text"
|
|
size="large"
|
|
value={values.cpname}
|
|
onChange={handleChange}
|
|
onBlur={handleBlur}
|
|
helperText={
|
|
errors.cpname && touched.cpname ? (
|
|
<span style={{ color: "red" }}>{errors.cpname}</span>
|
|
) : null
|
|
}
|
|
/>
|
|
|
|
|
|
<SingleSelect
|
|
arr={healthkeyselect}
|
|
label="Health Key Name"
|
|
name="healthkeyname"
|
|
value={values.healthkeyname}
|
|
onChange={(event, newValue) => {
|
|
const syntheticEvent = {
|
|
target: {
|
|
name: "healthkeyname",
|
|
value: newValue,
|
|
},
|
|
};
|
|
handleChange(syntheticEvent);
|
|
}}
|
|
onBlur={handleBlur}
|
|
type="text"
|
|
helperText={
|
|
errors.healthkeyname && touched.healthkeyname ? (
|
|
<span style={{ color: "red" }}>{errors.healthkeyname}</span>
|
|
) : null
|
|
}
|
|
/>
|
|
|
|
<Input
|
|
label="Starting Range"
|
|
name="startingrange"
|
|
type="text"
|
|
size="large"
|
|
value={values.startingrange}
|
|
onChange={handleChange}
|
|
onBlur={handleBlur}
|
|
helperText={
|
|
errors.startingrange && touched.startingrange ? (
|
|
<span style={{ color: "red" }}>
|
|
{errors.startingrange}
|
|
</span>
|
|
) : null
|
|
}
|
|
/>
|
|
</Grid>
|
|
|
|
sx={{ width: "1000px" }}
|
|
<Grid item xs={12} sm={4} container spacing={1} justifyContent="center" alignItems="center">
|
|
<Input
|
|
label="Ending Range"
|
|
name="endingrange"
|
|
type="text"
|
|
size="large"
|
|
value={values.endingrange}
|
|
onChange={handleChange}
|
|
onBlur={handleBlur}
|
|
helperText={
|
|
errors.endingrange && touched.endingrange ? (
|
|
<span style={{ color: "red" }}>
|
|
{errors.endingrange}
|
|
</span>
|
|
) : null
|
|
}
|
|
/>
|
|
</Grid>
|
|
|
|
<Grid item xs={12} sm={4} container spacing={1} justifyContent="center" alignItems="center">
|
|
<SingleSelect
|
|
arr={lessriskselect}
|
|
label="Less Risk"
|
|
name="lessrisk"
|
|
value={values.lessrisk}
|
|
onChange={(event, newValue) => {
|
|
const syntheticEvent = {
|
|
target: {
|
|
name: "lessrisk",
|
|
value: newValue,
|
|
},
|
|
};
|
|
handleChange(syntheticEvent);
|
|
}}
|
|
onBlur={handleBlur}
|
|
type="text"
|
|
helperText={
|
|
errors.lessrisk && touched.lessrisk ? (
|
|
<span style={{ color: "red" }}>{errors.lessrisk}</span>
|
|
) : null
|
|
}
|
|
/>
|
|
</Grid>
|
|
<Grid item xs={12} sm={4} container spacing={1} justifyContent="center" alignItems="center">
|
|
<SingleSelect
|
|
arr={moreriskselect}
|
|
label="More Risk"
|
|
name="morerisk"
|
|
value={values.highrisk}
|
|
onChange={(event, newValue) => {
|
|
const syntheticEvent = {
|
|
target: {
|
|
name: "morerisk",
|
|
value: newValue,
|
|
},
|
|
};
|
|
handleChange(syntheticEvent);
|
|
}}
|
|
onBlur={handleBlur}
|
|
type="text"
|
|
helperText={
|
|
errors.morerisk && touched.morerisk ? (
|
|
<span style={{ color: "red" }}>{errors.morerisk}</span>
|
|
) : null
|
|
}
|
|
/>
|
|
</Grid>
|
|
<Grid item xs={12} sm={4} container spacing={1} justifyContent="center" alignItems="center">
|
|
<SingleSelect
|
|
arr={lessadviceselect}
|
|
label="Less Advice"
|
|
name="lessadvice"
|
|
value={values.lessadvice}
|
|
onChange={(event, newValue) => {
|
|
const syntheticEvent = {
|
|
target: {
|
|
name: "lessadvice",
|
|
value: newValue,
|
|
},
|
|
};
|
|
handleChange(syntheticEvent);
|
|
}}
|
|
onBlur={handleBlur}
|
|
type="text"
|
|
helperText={
|
|
errors.lessadvice && touched.lessadvice ? (
|
|
<span style={{ color: "red" }}>{errors.lessadvice}</span>
|
|
) : null
|
|
}
|
|
/>
|
|
</Grid>
|
|
<Grid item xs={12} sm={4} container spacing={1} justifyContent="center" alignItems="center">
|
|
<SingleSelect
|
|
arr={moreadviceselect}
|
|
label="More Advice"
|
|
name="moreadvice"
|
|
value={values.moreadvice}
|
|
onChange={(event, newValue) => {
|
|
const syntheticEvent = {
|
|
target: {
|
|
name: "moreadvice",
|
|
value: newValue,
|
|
},
|
|
};
|
|
handleChange(syntheticEvent);
|
|
}}
|
|
onBlur={handleBlur}
|
|
type="text"
|
|
helperText={
|
|
errors.moreadvice && touched.moreadvice ? (
|
|
<span style={{ color: "red" }}>{errors.moreadvice}</span>
|
|
) : null
|
|
}
|
|
/>
|
|
</Grid>
|
|
<Grid item xs={12} sm={4} container spacing={1} justifyContent="center" alignItems="center">
|
|
<SingleSelect
|
|
arr={sectionselect}
|
|
label="Section"
|
|
name="section"
|
|
value={values.section}
|
|
onChange={(event, newValue) => {
|
|
const syntheticEvent = {
|
|
target: {
|
|
name: "section",
|
|
value: newValue,
|
|
},
|
|
};
|
|
handleChange(syntheticEvent);
|
|
}}
|
|
onBlur={handleBlur}
|
|
type="text"
|
|
helperText={
|
|
errors.section && touched.section ? (
|
|
<span style={{ color: "red" }}>{errors.section}</span>
|
|
) : null
|
|
}
|
|
/>
|
|
</Grid>
|
|
<Grid item xs={12} sm={4} container spacing={1} justifyContent="center" alignItems="center">
|
|
<Input
|
|
label="Column Order"
|
|
name="columnorder"
|
|
type="text"
|
|
size="large"
|
|
value={values.columnorder}
|
|
onChange={handleChange}
|
|
onBlur={handleBlur}
|
|
helperText={
|
|
errors.columnorder && touched.columnorder ? (
|
|
<span style={{ color: "red" }}>
|
|
{errors.columnorder}
|
|
</span>
|
|
) : null
|
|
}
|
|
/>
|
|
</Grid>
|
|
<Grid item xs={12} sm={4} container spacing={1} justifyContent="center" alignItems="center">
|
|
<Input
|
|
label="Placeholder"
|
|
name="placeholder"
|
|
type="text"
|
|
size="large"
|
|
value={values.placeholder}
|
|
onChange={handleChange}
|
|
onBlur={handleBlur}
|
|
helperText={
|
|
errors.placeholder && touched.placeholder ? (
|
|
<span style={{ color: "red" }}>
|
|
{errors.placeholder}
|
|
</span>
|
|
) : null
|
|
}
|
|
/>
|
|
</Grid>
|
|
<Grid item xs={12} sm={4} container spacing={1} justifyContent="center" alignItems="center">
|
|
<Input
|
|
label="Parameter Value Name"
|
|
name="parametervaluename"
|
|
type="text"
|
|
size="large"
|
|
value={values.parametervaluename}
|
|
onChange={handleChange}
|
|
onBlur={handleBlur}
|
|
helperText={
|
|
errors.parametervaluename && touched.parametervaluename ? (
|
|
<span style={{ color: "red" }}>
|
|
{errors.parametervaluename}
|
|
</span>
|
|
) : null
|
|
}
|
|
/>
|
|
</Grid>
|
|
<Grid item xs={12} sm={4} container spacing={1} justifyContent="center" alignItems="center">
|
|
<SingleSelect
|
|
arr={inputtypeselect}
|
|
label="Input Type "
|
|
name="inputtype"
|
|
value={values.inputtype}
|
|
onChange={(event, newValue) => {
|
|
const syntheticEvent = {
|
|
target: {
|
|
name: "inputtype",
|
|
value: newValue,
|
|
},
|
|
};
|
|
handleChange(syntheticEvent);
|
|
}}
|
|
onBlur={handleBlur}
|
|
type="text"
|
|
helperText={
|
|
errors.inputtype && touched.inputtype ? (
|
|
<span style={{ color: "red" }}>{errors.inputtype}</span>
|
|
) : null
|
|
}
|
|
/>
|
|
</Grid>
|
|
<Grid item xs={12} sm={4} container spacing={1} justifyContent="center" alignItems="center">
|
|
<Input
|
|
label="Checkup Type"
|
|
name="checkuptype"
|
|
type="text"
|
|
size="large"
|
|
value={values.checkuptype}
|
|
onChange={handleChange}
|
|
onBlur={handleBlur}
|
|
helperText={
|
|
errors.checkuptype && touched.checkuptype ? (
|
|
<span style={{ color: "red" }}>
|
|
{errors.checkuptype}
|
|
</span>
|
|
) : null
|
|
}
|
|
/>
|
|
</Grid>
|
|
<Grid item xs={12} sm={4} container spacing={1} justifyContent="center" alignItems="center">
|
|
<SingleSelect
|
|
arr={statusselect}
|
|
label="Status "
|
|
name="status"
|
|
value={values.status}
|
|
onChange={(event, newValue) => {
|
|
const syntheticEvent = {
|
|
target: {
|
|
name: "status",
|
|
value: newValue,
|
|
},
|
|
};
|
|
handleChange(syntheticEvent);
|
|
}}
|
|
onBlur={handleBlur}
|
|
type="text"
|
|
helperText={
|
|
errors.status && touched.status ? (
|
|
<span style={{ color: "red" }}>{errors.status}</span>
|
|
) : null
|
|
}
|
|
/>
|
|
</Grid>
|
|
<Grid item xs={12} sm={4} container spacing={1} justifyContent="center" alignItems="center">
|
|
<SingleSelect
|
|
arr={editableselect}
|
|
label="Editable/ Non Edital Field "
|
|
name="edit"
|
|
value={values.edit}
|
|
onChange={(event, newValue) => {
|
|
const syntheticEvent = {
|
|
target: {
|
|
name: "edit",
|
|
value: newValue,
|
|
},
|
|
};
|
|
handleChange(syntheticEvent);
|
|
}}
|
|
onBlur={handleBlur}
|
|
type="text"
|
|
helperText={
|
|
errors.edit && touched.edit ? (
|
|
<span style={{ color: "red" }}>{errors.edit}</span>
|
|
) : null
|
|
}
|
|
/>
|
|
</Grid>
|
|
<Grid item xs={12} sm={4} container spacing={1} justifyContent="center" alignItems="center">
|
|
<SingleSelect
|
|
arr={unitselect}
|
|
label="Select Unit "
|
|
name="selectunit"
|
|
value={values.selectunit}
|
|
onChange={(event, newValue) => {
|
|
const syntheticEvent = {
|
|
target: {
|
|
name: "selectunit",
|
|
value: newValue,
|
|
},
|
|
};
|
|
handleChange(syntheticEvent);
|
|
}}
|
|
onBlur={handleBlur}
|
|
type="text"
|
|
helperText={
|
|
errors.selectunit && touched.selectunit ? (
|
|
<span style={{ color: "red" }}>{errors.selectunit}</span>
|
|
) : null
|
|
}
|
|
/>
|
|
</Grid>
|
|
<Grid item xs={12} sm={4} container spacing={1} justifyContent="center" alignItems="center">
|
|
|
|
<Input
|
|
label="Ref Range"
|
|
name="refrange"
|
|
type="text"
|
|
size="large"
|
|
value={values.refrange}
|
|
onChange={handleChange}
|
|
onBlur={handleBlur}
|
|
helperText={
|
|
errors.refrange && touched.refrange ? (
|
|
<span style={{ color: "red" }}>
|
|
{errors.refrange}
|
|
</span>
|
|
) : null
|
|
}
|
|
/>
|
|
|
|
</Grid>
|
|
<Grid item xs={12} sm={4} container spacing={1} justifyContent="center" alignItems="center">
|
|
<SingleSelect
|
|
arr={paramselect}
|
|
label="Is OPD Param ? "
|
|
name="opd"
|
|
value={values.opd}
|
|
onChange={(event, newValue) => {
|
|
const syntheticEvent = {
|
|
target: {
|
|
name: "opd",
|
|
value: newValue,
|
|
},
|
|
};
|
|
handleChange(syntheticEvent);
|
|
}}
|
|
onBlur={handleBlur}
|
|
type="text"
|
|
helperText={
|
|
errors.opd && touched.opd ? (
|
|
<span style={{ color: "red" }}>{errors.opd}</span>
|
|
) : null
|
|
}
|
|
/>
|
|
</Grid>
|
|
<Grid item xs={12} sm={4} container spacing={1} justifyContent="center" alignItems="center">
|
|
<SingleSelect
|
|
arr={paramselect}
|
|
label="Is DayCare Param ? "
|
|
name="daycare"
|
|
value={values.daycare}
|
|
onChange={(event, newValue) => {
|
|
const syntheticEvent = {
|
|
target: {
|
|
name: "daycare",
|
|
value: newValue,
|
|
},
|
|
};
|
|
handleChange(syntheticEvent);
|
|
}}
|
|
onBlur={handleBlur}
|
|
type="text"
|
|
helperText={
|
|
errors.daycare && touched.daycare ? (
|
|
<span style={{ color: "red" }}>{errors.daycare}</span>
|
|
) : null
|
|
}
|
|
/>
|
|
</Grid>
|
|
<Grid item xs={12} sm={4} container spacing={1} justifyContent="center" alignItems="center">
|
|
<SingleSelect
|
|
arr={paramselect}
|
|
label="Is Injury Param ? "
|
|
name="injury"
|
|
value={values.injury}
|
|
onChange={(event, newValue) => {
|
|
const syntheticEvent = {
|
|
target: {
|
|
name: "injury",
|
|
value: newValue,
|
|
},
|
|
};
|
|
handleChange(syntheticEvent);
|
|
}}
|
|
onBlur={handleBlur}
|
|
type="text"
|
|
helperText={
|
|
errors.injury && touched.injury ? (
|
|
<span style={{ color: "red" }}>{errors.injury}</span>
|
|
) : null
|
|
}
|
|
/>
|
|
</Grid>
|
|
<Grid item xs={12} sm={4} container spacing={1} justifyContent="center" alignItems="center">
|
|
<SingleSelect
|
|
arr={rulesselect}
|
|
label="Range Rules"
|
|
name="rangerule"
|
|
value={values.rangerule}
|
|
onChange={(event, newValue) => {
|
|
const syntheticEvent = {
|
|
target: {
|
|
name: "rangerule",
|
|
value: newValue,
|
|
},
|
|
};
|
|
handleChange(syntheticEvent);
|
|
}}
|
|
onBlur={handleBlur}
|
|
type="text"
|
|
helperText={
|
|
errors.rangerule && touched.rangerule ? (
|
|
<span style={{ color: "red" }}>{errors.rangerule}</span>
|
|
) : null
|
|
}
|
|
/>
|
|
</Grid>
|
|
<Grid item xs={12} sm={4} container spacing={1} justifyContent="center" alignItems="center">
|
|
<SingleSelect
|
|
arr={parentselect}
|
|
label="Parent Param "
|
|
name="parent"
|
|
value={values.parent}
|
|
onChange={(event, newValue) => {
|
|
const syntheticEvent = {
|
|
target: {
|
|
name: "parent",
|
|
value: newValue,
|
|
},
|
|
};
|
|
handleChange(syntheticEvent);
|
|
}}
|
|
onBlur={handleBlur}
|
|
type="text"
|
|
helperText={
|
|
errors.parent && touched.parent ? (
|
|
<span style={{ color: "red" }}>{errors.parent}</span>
|
|
) : null
|
|
}
|
|
/>
|
|
</Grid>
|
|
<Grid item xs={12} sm={4} container spacing={1} justifyContent="center" alignItems="center">
|
|
<SingleSelect
|
|
arr={mandatoryselect}
|
|
label="Mandatory ?"
|
|
name="mandatory"
|
|
value={values.mandatory}
|
|
onChange={(event, newValue) => {
|
|
const syntheticEvent = {
|
|
target: {
|
|
name: "mandatory",
|
|
value: newValue,
|
|
},
|
|
};
|
|
handleChange(syntheticEvent);
|
|
}}
|
|
onBlur={handleBlur}
|
|
type="text"
|
|
helperText={
|
|
errors.mandatory && touched.mandatory ? (
|
|
<span style={{ color: "red" }}>{errors.mandatory}</span>
|
|
) : null
|
|
}
|
|
/>
|
|
</Grid>
|
|
<Grid item xs={12} sm={4} container spacing={1} justifyContent="center" alignItems="center">
|
|
<Input
|
|
label="Default Value"
|
|
name="default"
|
|
type="text"
|
|
size="large"
|
|
value={values.default}
|
|
onChange={handleChange}
|
|
onBlur={handleBlur}
|
|
helperText={
|
|
errors.default && touched.default ? (
|
|
<span style={{ color: "red" }}>
|
|
{errors.default}
|
|
</span>
|
|
) : null
|
|
}
|
|
/>
|
|
</Grid>
|
|
</Grid>
|
|
</FormControl>
|
|
</Grid>
|
|
</Grid>
|
|
</form>
|
|
</div>*/
|
|
}
|