박정하 박정하 2023-06-13
230613 박정하 캘린더 변경 작업 중
@e64699750a19e10f004731295d40eda665d424a3
client/views/component/Calendar.jsx
--- client/views/component/Calendar.jsx
+++ client/views/component/Calendar.jsx
@@ -3,13 +3,23 @@
 import "react-calendar/dist/Calendar.css";
 import moment from "moment";
 
-export default function CalendarComponent(props) {  
+export default function CalendarComponent({ data }) {
+  console.log('createCalendar data : ', data);
+
   const [value, setValue] = useState(new Date());
   //const mark = ["12-04-2023", "21-04-2023", "05-04-2023", "02-04-2023"];
-  const mark = ["2023-04-12", "2023-04-21"];
+  //const mark = ["2023-04-12", "2023-06-12"];
+
+  let marks = [];
+  for (let i = 0; i < data['visit'].length; i++) {
+    marks.push(data['visit'][i]['xName']);
+  }
+
+  const mark = marks
+
   return (
-   <>
-   <Calendar
+    <>
+      <Calendar
         onChange={setValue}
         value={value}
         tileClassName={({ date, view }) => {
@@ -17,7 +27,46 @@
             return "highlight";
           }
         }}
+        tileContent={({ date, view }) => {
+          return (
+            <>
+              <div className="flex justify-center items-center absoluteDiv">
+                <div>
+                  <p><small>복약량</small></p>
+                  {data['medication'].map((item, idx) => {
+                    return (
+                      item['xName'] === moment(date).format("YYYY-MM-DD") ? item['sum'] + '/' + item['total'] : null
+                    )
+                  })}
+                </div>
+                <div>
+                  <p><small>온도(℃)</small></p>
+                  {data['temperature'].map((item, idx) => {
+                    return (
+                      item['xName'] === moment(date).format("YYYY-MM-DD") && item['time'] == '02:00' ? item['temperature'] : null
+                    )
+                  })}/
+                  {data['temperature'].map((item, idx) => {
+                    return (
+                      item['xName'] === moment(date).format("YYYY-MM-DD") && item['time'] == '10:00' ? item['temperature'] : null
+                    )
+                  })}/
+                  {data['temperature'].map((item, idx) => {
+                    return (
+                      item['xName'] === moment(date).format("YYYY-MM-DD") && item['time'] == '14:00' ? item['temperature'] : null
+                    )
+                  })}/
+                  {data['temperature'].map((item, idx) => {
+                    return (
+                      item['xName'] === moment(date).format("YYYY-MM-DD") && item['time'] == '23:00' ? item['temperature'] : null
+                    )
+                  })}
+                </div>
+              </div>
+            </>
+          );
+        }}
       />
-   </>
+    </>
   );
 }
client/views/component/Table.jsx
--- client/views/component/Table.jsx
+++ client/views/component/Table.jsx
@@ -133,13 +133,13 @@
                             navigate(`/QuestionConfirm/${i.qna_idx}`);
                           }
                           else if (view == "mySeniorMedicine") {
-                            navigate("/MedicineCareSelectOne");
+                            navigate("/HealthcareSelectOne");
                           }
                           else if (view == "mySeniorTemperature") {
-                            navigate("/TemperatureManagementSelectOne");
+                            navigate("/HealthcareSelectOne");
                           }
                           else if (view == "mySeniorVisit") {
-                            navigate("/VisitSelectOne");
+                            navigate("/HealthcareSelectOne");
                           }
                           else {
                             return;
client/views/pages/AppRoute.jsx
--- client/views/pages/AppRoute.jsx
+++ client/views/pages/AppRoute.jsx
@@ -40,6 +40,7 @@
 import EquipmentManagementSelectOne from "./equipment/EquipmentManagementSelectOne.jsx";
 import UserSelect from "./user_management/UserSelect.jsx";
 import AgencySeniorSelect from "./user_management/AgencySeniorSelect.jsx";
+import AgencyAdminSeniorSelect from "./user_management/AgencyAdminSeniorSelect.jsx";
 import QandASelect from "./callcenter/QandASelect.jsx";
 import QandASelectOne from "./callcenter/QandASelectOne.jsx";
 import QandAInsert from "./callcenter/QandAInsert.jsx";
@@ -58,9 +59,10 @@
 import QuestionSelect from "./callcenter/QuestionSelect.jsx";
 import Join from "./join/Join.jsx";
 import Healthcare from "./healthcare/Healthcare.jsx"
-import TeamHealthcare from "./healthcare/TeamHealthcare.jsx"
+import HealthcareAdmin from "./healthcare/HealthcareAdmin.jsx"
 import Medicalcare from "./healthcare/Medicalcare.jsx"
-import TeamMedicalcare from "./healthcare/TeamMedicalcare.jsx"
+import MedicalcareAdmin from "./healthcare/MedicalcareAdmin.jsx"
+import HealthcareSelectOne from "./healthcare/HealthcareSelectOne.jsx"
 
 import UserEdit from "./user_management/UserEdit.jsx";
 import AgentSelectOne from "./user_management/AgentSelectOne.jsx";
@@ -289,7 +291,7 @@
   },
   {
     title: "대상자 관리",
-    path: "/AgencySeniorSelect",
+    path: "/AgencyAdminSeniorSelect",
     icon: (
       <PersonIcon sx={{ fontSize: 20, color: "#333333", marginRight: 1 }} />
     ),
@@ -303,14 +305,14 @@
   },
   {
     title: "생활 복지 관리",
-    path: "/TeamHealthcare",
+    path: "/HealthcareAdmin",
     icon: (
       <Diversity1Icon sx={{ fontSize: 20, color: "#333333", marginRight: 1 }} />
     ),
   },
   {
     title: "건강 관리",
-    path: "/TeamMedicalcare",
+    path: "/MedicalcareAdmin",
     icon: (
       <LocalHospitalIcon sx={{ fontSize: 20, color: "#333333", marginRight: 1 }} />
     ),
@@ -329,17 +331,21 @@
   return (
     <Routes>
 
-      <Route path="/TeamMedicalcare" element={<TeamMedicalcare />}></Route>
-      <Route path="/TeamHealthcare" element={<TeamHealthcare />}></Route>
+      <Route path="/MedicalcareAdmin" element={<MedicalcareAdmin />}></Route>
+      <Route path="/HealthcareAdmin" element={<HealthcareAdmin />}></Route>
       <Route path="/Join" element={<Join />}></Route>
       <Route path="/QuestionSelect" element={<QuestionSelect />}></Route>
 
       <Route path="/" element={<Main_agencyAdmin />}></Route>
-      <Route path="/AgencySeniorSelect" element={<AgencySeniorSelect />}></Route>
+      <Route path="/AgencyAdminSeniorSelect" element={<AgencyAdminSeniorSelect />}></Route>
       <Route path="/SeniorEdit" element={<SeniorEdit />}></Route>
       <Route path="/SeniorSelectOne" element={<SeniorSelectOne />}></Route>
       <Route path="/UserEdit" element={<UserEdit />}></Route>
       <Route path="/AgentSelectOne" element={<AgentSelectOne />}></Route>
+      <Route
+        path="/HealthcareSelectOne"
+        element={<HealthcareSelectOne />}
+      ></Route>
       <Route
         path="/MedicineCareSelectOne"
         element={<MedicineCareSelectOne />}
@@ -428,6 +434,10 @@
       <Route path="/UserEdit" element={<UserEdit />}></Route>
       <Route path="/AgentSelectOne" element={<AgentSelectOne />}></Route>
       <Route
+        path="/HealthcareSelectOne"
+        element={<HealthcareSelectOne />}
+      ></Route>
+      <Route
         path="/MedicineCareSelectOne"
         element={<MedicineCareSelectOne />}
       ></Route>
client/views/pages/equipment/GovernmentEquipmentSelect.jsx
--- client/views/pages/equipment/GovernmentEquipmentSelect.jsx
+++ client/views/pages/equipment/GovernmentEquipmentSelect.jsx
@@ -748,7 +748,7 @@
             <div className="board-wrap" style={{ marginTop: "3rem" }} >
               <div className="btn-wrap margin-bottom">
                 <div className="btn-wrap flex-end margin-bottom ">
-                  <button className={"btn-small gray-btn"} onClick={() => navigate("/AgencySeniorSelect")}>대상자 관리</button>
+                  <button className={"btn-small gray-btn"} onClick={() => (state.loginUser['authority'] == 'ROLE_AGENCYADMIN') ? navigate("/AgencyAdminSeniorSelect") : navigate("/AgencySeniorSelect")}>대상자 관리</button>
                 </div>
                 {rentalContent}
               </div>
client/views/pages/healthcare/Healthcare.jsx
--- client/views/pages/healthcare/Healthcare.jsx
+++ client/views/pages/healthcare/Healthcare.jsx
@@ -216,7 +216,7 @@
             {senior.seniorList.map((item, idx) => {
               return (
                 <tr key={idx} onClick={() => {
-                  navigate("/MedicineCareSelectOne", {
+                  navigate("/HealthcareSelectOne", {
                     state: {
                       'senior_id': item['user_id'],
                       'agency_id': item['agency_id'],
@@ -275,19 +275,19 @@
               <th rowSpan={2}>생년월일</th>
               <th rowSpan={2}>성별</th>
               <th rowSpan={2}>연락처</th>
-              <th colSpan={12}>최근온도</th>
+              <th colSpan={12}>최근온도 (℃)</th>
             </tr>
             <tr>
-              <th colSpan={4}>어제</th>
-              <th colSpan={4}>이틀 전</th>
-              <th colSpan={4}>사흘 전</th>
+              <th colSpan={4}>최근 하루 전</th>
+              <th colSpan={4}>최근 이틀 전</th>
+              <th colSpan={4}>최근 사흘 전</th>
             </tr>
           </thead>
           <tbody>
             {senior.seniorList.map((item, idx) => {
               return (
                 <tr key={idx} onClick={() => {
-                  navigate("/TemperatureManagementSelectOne", {
+                  navigate("/HealthcareSelectOne", {
                     state: {
                       'senior_id': item['user_id'],
                       'agency_id': item['agency_id'],
@@ -306,7 +306,8 @@
                       item['seniorTemperatureList'].map((data, dataIdx) => {
                         return (
                           <td data-label="최근온도">
-                            {data['temperature']} <small>({data['time']})</small>
+                            {data['temperature']}
+                            {/* <small>({data['time']})</small> */}
                           </td>
                         )
                       })
@@ -355,7 +356,7 @@
             {senior.seniorList.map((item, idx) => {
               return (
                 <tr key={idx} onClick={() => {
-                  navigate("/VisitSelectOne", {
+                  navigate("/HealthcareSelectOne", {
                     state: {
                       'senior_id': item['senior_id'],
                     }
client/views/pages/healthcare/HealthcareAdmin.jsx (Renamed from client/views/pages/healthcare/TeamHealthcare.jsx)
--- client/views/pages/healthcare/TeamHealthcare.jsx
+++ client/views/pages/healthcare/HealthcareAdmin.jsx
@@ -38,8 +38,7 @@
     seniorSelectList(1);
   }
 
-  const [seniorNum, setSeniorNum] = React.useState();
-  const [isMySenior, setIsMySenior] = React.useState(true);
+  const [isMySenior, setIsMySenior] = React.useState(false);
   React.useEffect(() => {
     searching();
   }, [isMySenior])
@@ -69,6 +68,7 @@
       data.seniorList.map((item, idx) => {
         setSeniorNum(item);
         seniorMedicationSelectList(item);
+        seniorTemperatureSelectListByDay(item);
       })
       console.log("돌봄 대상자(시니어) 목록 조회 : ", data);
       setSenior(data);
@@ -89,7 +89,6 @@
       },
       body: JSON.stringify(seniorNum),
     }).then((response) => response.json()).then((data) => {
-      console.log("seniorMedicationList data : ", data);
       setSeniorMedicationList(data, seniorNum);
       seniorMedicationSelectListByDay(data, seniorNum);
     }).catch((error) => {
@@ -113,7 +112,6 @@
         showMedicationTimeCode[seniorMedicationList[i]] = true;
       }
       setShowMedicationTimeCode(showMedicationTimeCode);
-      console.log('showMedicationTimeCode : ', showMedicationTimeCode);
 
       if (CommonUtil.isEmpty(data) == false) {
         let _stackChartData = [];
@@ -134,13 +132,55 @@
               continue;
             }
           }
-          // _stackChartData.push(chartData);          
           _stackChartData.push({ "sum": sum, "total": counter })
         }
         seniorNum.seniorMedicationList = _stackChartData;
       }
     }).catch((error) => {
       console.log('seniorMedicationSelectListByDay() /user/seniorMedicationSelectListByDay.json error : ', error);
+    });
+  };
+
+
+  const seniorTemperatureList = ['02:00', '10:00', '14:00', '23:00']
+
+  //특정 대상자의 일별, 시간별 온도 목록
+  const [seniorTemperatureListByDay, setSeniorTemperatureListByDay] = React.useState([]);
+  const [stackTemperatureData, setStackTemperatureData] = React.useState([]);
+  //특정 대상자의 일별, 시간별 온도 목록 조회
+  const seniorTemperatureSelectListByDay = (seniorNum) => {
+    fetch("/user/seniorTemperatureSelectListByDay.json", {
+      method: "POST",
+      headers: {
+        'Content-Type': 'application/json; charset=UTF-8'
+      },
+      body: JSON.stringify(seniorNum),
+    }).then((response) => response.json()).then((data) => {
+      console.log("seniorTemperatureListByDay data : ", data);
+      setSeniorTemperatureListByDay(data);
+
+      if (CommonUtil.isEmpty(data) == false) {
+        let _stackTemperatureData = [];
+        let chartData = {};
+        for (let i = data.length - 1; i >= (data.length > 12 ? data.length - 12 : 0); i--) {
+          chartData = {
+            xName: data[i]['temperature_date'],
+          };
+          chartData['temperature'] = data[i]['temperature_data'];
+          chartData['time'] = data[i]['temperature_time'];
+
+          if (data[i]['temperature_date'].substr(5, 2) >= 11 || data[i]['temperature_date'].substr(5, 2) <= 2) {
+            _stackTemperatureData.unshift(chartData);
+          } else {
+            _stackTemperatureData.push(chartData);
+          }
+        }
+
+        seniorNum.seniorTemperatureList = _stackTemperatureData;
+        console.log('_stackTemperatureData : ', _stackTemperatureData);
+      }
+    }).catch((error) => {
+      console.log('seniorTemperatureSelectListByDay() /user/seniorTemperatureSelectListByDay.json error : ', error);
     });
   };
 
@@ -228,21 +268,31 @@
         <table className={"protector-user"}>
           <thead>
             <tr>
-              <th>No</th>
-              <th>소속기관명</th>
-              <th>이름</th>
-              <th>생년월일</th>
-              <th>성별</th>
-              <th>연락처</th>
-              <th>최근최저온도</th>
-              <th>최근최고온도</th>
+              <th rowSpan={2}>No</th>
+              <th rowSpan={2}>소속기관명</th>
+              <th rowSpan={2}>이름</th>
+              <th rowSpan={2}>생년월일</th>
+              <th rowSpan={2}>성별</th>
+              <th rowSpan={2}>연락처</th>
+              <th colSpan={12}>최근온도 (℃)</th>
+            </tr>
+            <tr>
+              <th colSpan={4}>최근 하루 전</th>
+              <th colSpan={4}>최근 이틀 전</th>
+              <th colSpan={4}>최근 사흘 전</th>
             </tr>
           </thead>
           <tbody>
             {senior.seniorList.map((item, idx) => {
               return (
                 <tr key={idx} onClick={() => {
-                  navigate("/TemperatureManagementSelectOne");
+                  navigate("/HealthcareSelectOne", {
+                    state: {
+                      'senior_id': item['user_id'],
+                      'agency_id': item['agency_id'],
+                      'government_id': item['government_id']
+                    }
+                  })
                 }}>
                   <td data-label="No">{senior.seniorListCount - idx - (senior.search.currentPage - 1) * senior.search.perPage}</td>
                   <td data-label="소속기관명">{item['agency_name']}</td>
@@ -250,18 +300,23 @@
                   <td data-label="생년월일">{item['user_birth']}</td>
                   <td data-label="성별">{item['user_gender']}</td>
                   <td data-label="연락처">{item['user_phonenumber']}</td>
-                  <td data-label="최근최저온도">
-                    18℃
-                  </td>
-                  <td data-label="최근최고온도">
-                    26℃
-                  </td>
+                  {
+                    item['seniorTemperatureList'] && item['seniorTemperatureList'].length > 0 ?
+                      item['seniorTemperatureList'].map((data, dataIdx) => {
+                        return (
+                          <td data-label="최근온도">
+                            {data['temperature']}
+                            {/* <small>({data['time']})</small> */}
+                          </td>
+                        )
+                      })
+                      : null}
                 </tr>
               )
             })}
             {CommonUtil.isEmpty(senior.seniorList) ?
               <tr>
-                <td colSpan={8}>조회된 데이터가 없습니다</td>
+                <td colSpan={18}>조회된 데이터가 없습니다</td>
               </tr>
               : null}
           </tbody>
@@ -300,7 +355,7 @@
             {senior.seniorList.map((item, idx) => {
               return (
                 <tr key={idx} onClick={() => {
-                  navigate("/VisitSelectOne", {
+                  navigate("/HealthcareSelectOne", {
                     state: {
                       'senior_id': item['senior_id'],
                     }
 
client/views/pages/healthcare/HealthcareSelectOne.jsx (added)
+++ client/views/pages/healthcare/HealthcareSelectOne.jsx
@@ -0,0 +1,213 @@
+import React from "react";
+import { useNavigate, useLocation } from "react-router";
+import { useSelector } from "react-redux";
+
+import Title from "../../component/Title.jsx";
+import Button from "../../component/Button.jsx";
+import Modal from "../../component/Modal.jsx";
+import Calendar from "../../component/Calendar.jsx";
+import ContentTitle from "../../component/ContentTitle.jsx";
+import TableTitle from "../../component/Tabletitle.jsx";
+import SubTitle from "../../component/SubTitle.jsx";
+import Donut2 from "../../component/chart/Donut2.jsx";
+import LineColor_medicine from "../../component/chart/LineColor_medicine.jsx";
+import MedicationIcon from '@mui/icons-material/Medication';
+import Senior from '../../../resources/files/images/senior.png';
+
+import CommonUtil from "../../../resources/js/CommonUtil.js";
+
+export default function MedicineCareSelectOne() {
+  const navigate = useNavigate();
+  const location = useLocation();
+
+  //전역 변수 저장 객체
+  const state = useSelector((state) => { return state });
+
+  //시니어 정보
+  const [senior, setSenior] = React.useState({
+    'user_id': state.loginUser['authority'] == 'ROLE_SENIOR' ? state.loginUser['user_id'] : null,
+    'user_name': state.loginUser['authority'] == 'ROLE_SENIOR' ? state.loginUser['user_name'] : null,
+    'senior_id': state.loginUser['authority'] == 'ROLE_SENIOR' ? state.loginUser['user_id'] : null,
+  });
+
+  //시니어 상세 조회
+  const seniorSelectOne = () => {
+    fetch("/user/seniorSelectOne.json", {
+      method: "POST",
+      headers: {
+        'Content-Type': 'application/json; charset=UTF-8'
+      },
+      body: JSON.stringify(senior),
+    }).then((response) => response.json()).then((data) => {
+      console.log("seniorSelectOne data : ", data);
+      setSenior(data);
+    }).catch((error) => {
+      console.log('seniorSelectOne() /user/seniorSelectOne.json error : ', error);
+    });
+  };
+
+  const handleChangeSelect = (e) => {
+    setMySenior(e.target.value);
+    setIsMySenior(true);
+  };
+
+  const SelectBox = () => {
+    if (state['seniorList'].length > 1) {
+      return (
+        <select className="margin-bottom2" onChange={handleChangeSelect} value={mySenior}>
+          {state['seniorList'].map((item, idx) => {
+            return (
+              <option key={item} value={idx}>{item['user_name']}</option>
+            )
+          })}
+        </select>
+      )
+    }
+  }
+
+
+  //특정 대상자의 실제 복약 정보
+  const [seniorMedicationList, setSeniorMedicationList] = React.useState([]);
+  const [showMedicationTimeCode, setShowMedicationTimeCode] = React.useState({});
+  //특정 대상자의 실제 복약 정보 목록 조회
+  const seniorMedicationSelectList = (seniorNum) => {
+    fetch("/user/seniorMedicationSelectList.json", {
+      method: "POST",
+      headers: {
+        'Content-Type': 'application/json; charset=UTF-8'
+      },
+      body: JSON.stringify(seniorNum),
+    }).then((response) => response.json()).then((data) => {
+      console.log("seniorMedicationList data : ", data);
+      setSeniorMedicationList(data);
+      seniorMedicationSelectListByDay(data, seniorNum);
+    }).catch((error) => {
+      console.log('seniorMedicationSelectList() /user/seniorMedicationSelectList.json error : ', error);
+    });
+  };
+
+  //특정 대상자의 일별, 복약시간별 복약 목록
+  const [seniorMedicationListByDay, setSeniorMedicationListByDay] = React.useState([]);
+  const [stackChartData, setStackChartData] = React.useState([]);
+  //특정 대상자의 일별, 복약시간별 복약 목록 조회
+  const seniorMedicationSelectListByDay = (seniorMedicationList, seniorNum) => {
+    fetch("/user/seniorMedicationSelectListByDay.json", {
+      method: "POST",
+      headers: {
+        'Content-Type': 'application/json; charset=UTF-8'
+      },
+      body: JSON.stringify(seniorNum),
+    }).then((response) => response.json()).then((data) => {
+      console.log("seniorMedicationListByDay data : ", data);
+      setSeniorMedicationListByDay(data);
+
+      let showMedicationTimeCode = {};
+      for (let i = 0; i < seniorMedicationList.length; i++) {
+        showMedicationTimeCode[seniorMedicationList[i]] = true;
+      }
+      setShowMedicationTimeCode(showMedicationTimeCode);
+      console.log('showMedicationTimeCode : ', showMedicationTimeCode);
+
+      if (CommonUtil.isEmpty(data) == false) {
+        let _stackChartData = [];
+        for (let i = 0; i < data.length; i++) {
+          let sum = 0;      // 실제 복약량
+          let counter = 0;  // 복약해야하는 양
+          for (let j = 0; j < data[i]['medication_time_code_list'].length; j++) {
+            if (CommonUtil.isEmpty(showMedicationTimeCode[data[i]['medication_time_code_list'][j]]) == false) {
+              counter++;
+              if (i > 0) {
+                sum += data[i]['medication_time_code_count_list'][j];
+              }
+            } else {
+              continue;
+            }
+          }
+          _stackChartData.push({ "xName": data[i]['medication_default_date'], "sum": sum, "total": counter })
+        }
+        setStackChartData(_stackChartData);
+        console.log('_stackChartData : ', _stackChartData);
+      }
+
+    }).catch((error) => {
+      console.log('seniorMedicationSelectListByDay() /user/seniorMedicationSelectListByDay.json error : ', error);
+    });
+  };
+
+  const seniorTemperatureList = ['02:00', '10:00', '14:00', '23:00']
+
+  //특정 대상자의 일별, 시간별 온도 목록
+  const [seniorTemperatureListByDay, setSeniorTemperatureListByDay] = React.useState([]);
+  const [stackTemperatureData, setStackTemperatureData] = React.useState([]);
+  //특정 대상자의 일별, 시간별 온도 목록 조회
+  const seniorTemperatureSelectListByDay = (seniorNum) => {
+    fetch("/user/seniorTemperatureSelectListByDay.json", {
+      method: "POST",
+      headers: {
+        'Content-Type': 'application/json; charset=UTF-8'
+      },
+      body: JSON.stringify(seniorNum),
+    }).then((response) => response.json()).then((data) => {
+      console.log("seniorTemperatureListByDay data : ", data);
+      setSeniorTemperatureListByDay(data);
+
+      if (CommonUtil.isEmpty(data) == false) {
+        let _stackTemperatureData = [];
+        let chartData = {};
+        for (let i = 0; i < data.length; i++) {
+          chartData = {
+            xName: data[i]['temperature_date'],
+          };
+          chartData['temperature'] = data[i]['temperature_data'];
+          chartData['time'] = data[i]['temperature_time'];
+
+          _stackTemperatureData.push(chartData);
+        }
+        setStackTemperatureData(_stackTemperatureData);
+        console.log('_stackTemperatureData : ', _stackTemperatureData);
+      }
+    }).catch((error) => {
+      console.log('seniorTemperatureSelectListByDay() /user/seniorTemperatureSelectListByDay.json error : ', error);
+    });
+  };
+
+  //방문 기록 정보
+  const [visitRecordList, setVisitRecordList] = React.useState({});
+  //방문 기록 목록 조회
+  const visitRecordSelectList = (seniorNum) => {
+    fetch("/welfare/visitRecordSelectList.json", {
+      method: "POST",
+      headers: {
+        'Content-Type': 'application/json; charset=UTF-8'
+      },
+      body: JSON.stringify(seniorNum),
+    }).then((response) => response.json()).then((data) => {
+      console.log("방문 기록 목록 조회 결과(건수) : ", data);
+      let _stackVisitData = [];
+      let chartData = {};
+      for (let i = 0; i < data['visitRecordList'].length; i++) {
+        chartData = {
+          xName: data['visitRecordList'][i]['visit_date'],
+        };
+        chartData['reason'] = data['visitRecordList'][i]['visit_reason'];
+        _stackVisitData.push(chartData);
+      }
+      setVisitRecordList(_stackVisitData);
+      console.log('_stackVisitData : ', _stackVisitData);
+    }).catch((error) => {
+      console.log('visitRecordSelectList() /user/visitRecordSelectList.json error : ', error);
+    });
+  }
+
+  return (
+    <>
+      <main className="pink">
+        <SelectBox />
+        <div className="flex-start main-guardian"><img src={Senior} alt="" />
+          <Title title={`${senior['user_name']} 어르신`} explanation={"방문, 복약, 온도, 배터리 현황을 확인하세요."} />
+        </div>
+        <Calendar data={{ medication: stackChartData, temperature: stackTemperatureData, visit: visitRecordList }} />
+      </main>
+    </>
+  );
+}(No newline at end of file)
 
client/views/pages/healthcare/MedicalcareAdmin.jsx (added)
+++ client/views/pages/healthcare/MedicalcareAdmin.jsx
@@ -0,0 +1,1740 @@
+import React from "react";
+import { useNavigate, useLocation } from "react-router";
+import { useSelector } from "react-redux";
+
+
+import SubTitle from "../../component/SubTitle.jsx";
+import Modal from "../../component/Modal.jsx";
+import DetailTitle from "../../component/DetailTitle.jsx";
+import Pagination from "../../component/Pagination.jsx";
+import CommonFile from "../../component/file/CommonFile.jsx";
+
+import CommonUtil from "../../../resources/js/CommonUtil.js";
+
+
+export default function UserAuthoriySelect() {
+  const navigate = useNavigate();
+  const location = useLocation();
+
+  //전역 변수 저장 객체
+  const state = useSelector((state) => { return state });
+  const defaultUserId = CommonUtil.isEmpty(state.loginUser) ? null : state.loginUser['user_id'];
+
+  //검색(엔터)
+  const searchingEnter = (key) => {
+    if (key == 'Enter') {
+      searching();
+    } else {
+      return;
+    }
+  }
+  //검색
+  const searching = () => {
+    if (CommonUtil.isEmpty(state.loginUser) == false
+      && state.loginUser['authority'] == 'ROLE_AGENCY' && isMySenior) {
+      senior.search['agent_id'] = state.loginUser['user_id'];
+    } else {
+      senior.search['agent_id'] = null;
+    }
+
+    setSenior({ ...senior });
+
+    seniorSelectList(1);
+  }
+
+  const [isMySenior, setIsMySenior] = React.useState(false);
+  React.useEffect(() => {
+    searching();
+  }, [isMySenior])
+  //보호사(간호사)의 돌봄 대상자(시니어)
+  const [senior, setSenior] = React.useState({
+    seniorList: [], seniorListCount: 0, search: {
+      'government_id': CommonUtil.isEmpty(state.loginUser) ? null : state.loginUser['government_id'],
+      'agency_id': CommonUtil.isEmpty(state.loginUser) ? null : state.loginUser['agency_id'],
+      'searchType': null,
+      'searchText': null,
+      'currentPage': 1,
+      'perPage': 10,
+    }
+  });
+  //보호사(간호사)의 돌봄 대상자(시니어) 목록 조회
+  const seniorSelectList = (currentPage) => {
+    senior.search.currentPage = CommonUtil.isEmpty(currentPage) ? 1 : currentPage;
+
+    fetch("/user/seniorSelectList.json", {
+      method: "POST",
+      headers: {
+        'Content-Type': 'application/json; charset=UTF-8'
+      },
+      body: JSON.stringify(senior.search),
+    }).then((response) => response.json()).then((data) => {
+      data.search = senior.search;
+      console.log("돌봄 대상자(시니어) 목록 조회 : ", data);
+      setSenior(data);
+    }).catch((error) => {
+      console.log('seniorSelectList() /user/seniorSelectList.json error : ', error);
+    });
+  }
+
+
+  //현재 선택한 대상자 정보
+  const [targetSenior, setTargetSenior] = React.useState({ 'senior_id': null });
+
+  //문진표
+  const [modalOpen, setModalOpen] = React.useState(false);
+  const openModal = (senior) => {
+    targetSenior['senior_id'] = senior['senior_id'];
+    setTargetSenior(senior);
+    questionnaireSelectList();
+
+    setModalOpen(true);
+  };
+  const closeModal = () => {
+    setTargetSenior({ 'senior_id': null });
+    setModalOpen(false);
+  };
+  //내원기록
+  const [modalOpen2, setModalOpen2] = React.useState(false);
+  const openModal2 = (senior) => {
+    targetSenior['senior_id'] = senior['senior_id'];
+    setTargetSenior(senior);
+    hospitalMedicalRecordSelectList();
+
+    setModalOpen2(true);
+  };
+  const closeModal2 = () => {
+    setTargetSenior({ 'senior_id': null });
+    setModalOpen2(false);
+  };
+  //심전도
+  const [modalOpen3, setModalOpen3] = React.useState(false);
+  const openModal3 = (senior) => {
+    targetSenior['senior_id'] = senior['senior_id'];
+    setTargetSenior(senior);
+    ecgSelectList();
+
+    setModalOpen3(true);
+  };
+  const closeModal3 = () => {
+    setTargetSenior({ 'senior_id': null });
+    setModalOpen3(false);
+  };
+  //혈압
+  const [modalOpen4, setModalOpen4] = React.useState(false);
+  const openModal4 = (senior) => {
+    targetSenior['senior_id'] = senior['senior_id'];
+    setTargetSenior(senior);
+    bloodPressureSelectList();
+
+    setModalOpen4(true);
+  };
+  const closeModal4 = () => {
+    setTargetSenior({ 'senior_id': null });
+    setModalOpen4(false);
+  };
+
+  /****************** 문진표 (시작) ******************/
+  const questionnaireInit = {
+    'senior_id': null,
+    'questionnaire_record_idx': null,
+    'weight_change_amount': 0,
+    'past_history': null,
+    'agent_id': defaultUserId,
+    'medical_record_idx': null,
+
+    'smoke_type': false,
+    'no_smoke_period': null,
+    'smoke_period': null,
+    'daily_smoke_amount': null,
+
+    'drink_type': false,
+    'weekly_drink_amount': null,
+    'onetime_alcoholic_kind': null,
+    'onetime_bottle_amount': null,
+    'onetime_cup_amount': null,
+
+    'exercise_type': false,
+    'weekly_exercise_amount': null,
+    'onetime_exercise_hour': null,
+    'onetime_exercise_minute': null,
+    'onetime_exercise_kind': null,
+
+    'medication_pill': '',
+    'medication_pill_etc': '',
+  };
+  //문진표 정보
+  const [questionnaire, setQuestionnaire] = React.useState({ ...questionnaireInit });
+  const questionnaireRef = React.useRef({ ...questionnaireInit });
+
+  //문진표 등록
+  const questionnaireInsert = () => {
+    questionnaire['senior_id'] = targetSenior['senior_id'];
+    questionnaire['agent_id'] = defaultUserId;
+    setQuestionnaire({ ...questionnaire });
+
+    fetch("/hospital/questionnaireInsert.json", {
+      method: "POST",
+      headers: {
+        'Content-Type': 'application/json; charset=UTF-8'
+      },
+      body: JSON.stringify(questionnaire),
+    }).then((response) => response.json()).then((data) => {
+      console.log("문진표 등록 결과(건수) : ", data);
+      if (data > 0) {
+        alert("저장완료");
+        closeModal();
+      } else {
+        alert("저장에 실패하였습니다. 관리자에게 문의바랍니다.");
+      }
+    }).catch((error) => {
+      console.log('questionnaireInsert() /hospital/questionnaireInsert.json error : ', error);
+    });
+  }
+
+  //문진표 수정
+  const questionnaireUpdate = () => {
+    questionnaire['senior_id'] = targetSenior['senior_id'];
+    questionnaire['agent_id'] = defaultUserId;
+    setQuestionnaire({ ...questionnaire });
+
+    fetch("/hospital/questionnaireUpdate.json", {
+      method: "POST",
+      headers: {
+        'Content-Type': 'application/json; charset=UTF-8'
+      },
+      body: JSON.stringify(questionnaire),
+    }).then((response) => response.json()).then((data) => {
+      console.log("문진표 수정 결과(건수) : ", data);
+      if (data > 0) {
+        alert("저장완료");
+        closeModal();
+      } else {
+        alert("저장에 실패하였습니다. 관리자에게 문의바랍니다.");
+      }
+    }).catch((error) => {
+      console.log('questionnaireUpdate() /hospital/questionnaireUpdate.json error : ', error);
+    });
+  }
+
+  //문진표 목록 조회
+  const questionnaireSelectList = () => {
+    fetch("/hospital/questionnaireSelectList.json", {
+      method: "POST",
+      headers: {
+        'Content-Type': 'application/json; charset=UTF-8'
+      },
+      body: JSON.stringify(targetSenior),
+    }).then((response) => response.json()).then((data) => {
+      console.log("문진표 목록 조회 결과(건수) : ", data);
+      if (CommonUtil.isEmpty(data.questionnaireList) == false) {
+        let item = data.questionnaireList[0];//최신순으로 가지고오기 때문에, 0 인텍스가 젤 최신
+        if (CommonUtil.isEmpty(item['medication_pill'])) {
+          item['medication_pill'] = '';
+        } else {
+          const startCheckWord = '기타「';
+          const endCheckWord = '」';
+          if (item['medication_pill'].indexOf(startCheckWord) > -1) {
+            let startIndex = item['medication_pill'].indexOf(startCheckWord);
+            let lastIndex = item['medication_pill'].lastIndexOf(endCheckWord);
+            console.log("000000 item['medication_pill_etc'] : ", item['medication_pill_etc'], "item['medication_pill'] : ", item['medication_pill']);
+            item['medication_pill_etc'] = item['medication_pill'].substring(startIndex + startCheckWord.length, lastIndex);
+            let medicationPillFront = item['medication_pill'].substring(0, startIndex + startCheckWord.length);
+            let medicationPillBack = item['medication_pill'].substring(lastIndex);
+            item['medication_pill'] = medicationPillFront + medicationPillBack;
+            console.log("333333 item['medication_pill_etc'] : ", item['medication_pill_etc'], "item['medication_pill'] : ", item['medication_pill']);
+          } else {
+            item['medication_pill_etc'] = '';
+          }
+        }
+
+        setQuestionnaire(item);
+      }
+    }).catch((error) => {
+      console.log('questionnaireSelectList() /hospital/questionnaireSelectList.json error : ', error);
+    });
+  }
+  /****************** 문진표 (종료) ******************/
+
+
+
+  /****************** 병원 진료 기록 (시작) ******************/
+  const hospitalMedicalRecordInit = {
+    'senior_id': null,
+    'medical_record_idx': null,
+    'medical_date': CommonUtil.getDate(),
+    'medical_reason': '',
+    'medical_content': '',
+    'agent_id': defaultUserId
+  };
+  //병원 진료 기록 정보
+  const [hospitalMedicalRecord, setHospitalMedicalRecord] = React.useState({ ...hospitalMedicalRecordInit });
+  const hospitalMedicalRecordRef = React.useRef({ ...hospitalMedicalRecordInit });
+
+  //병원 진료 기록 유효성 검사
+  const hospitalMedicalRecordValidation = () => {
+    const target = hospitalMedicalRecord;
+    const targetRef = hospitalMedicalRecordRef;
+
+    if (CommonUtil.isEmpty(target['medical_date']) == true) {
+      targetRef.current['medical_date'].focus();
+      alert("진료 일자를 선택해 주세요.");
+      return false;
+    }
+    if (CommonUtil.isEmpty(target['medical_reason']) == true) {
+      targetRef.current['medical_reason'].focus();
+      alert("진료 사유를 입력해 주세요.");
+      return false;
+    }
+    if (CommonUtil.isEmpty(target['medical_content']) == true) {
+      targetRef.current['medical_content'].focus();
+      alert("진료 내용을 입력해 주세요.");
+      return false;
+    }
+
+    return true;
+  }
+
+
+  //병원 진료 기록 등록
+  const hospitalMedicalRecordInsert = () => {
+    if (hospitalMedicalRecordValidation() == false) {
+      return;
+    }
+
+    hospitalMedicalRecord['senior_id'] = targetSenior['senior_id'];
+    hospitalMedicalRecord['agent_id'] = defaultUserId;
+    setHospitalMedicalRecord({ ...hospitalMedicalRecord });
+
+    fetch("/hospital/hospitalMedicalRecordInsert.json", {
+      method: "POST",
+      headers: {
+        'Content-Type': 'application/json; charset=UTF-8'
+      },
+      body: JSON.stringify(hospitalMedicalRecord),
+    }).then((response) => response.json()).then((data) => {
+      console.log("병원 진료 기록 등록 결과(건수) : ", data);
+      if (data > 0) {
+        setHospitalMedicalRecordInit();
+        hospitalMedicalRecordSelectList();
+        //closeModal2();
+        alert("등록완료");
+
+      } else {
+        alert("등록에 실패하였습니다. 관리자에게 문의바랍니다.");
+      }
+    }).catch((error) => {
+      console.log('hospitalMedicalRecordInsert() /hospital/hospitalMedicalRecordInsert.json error : ', error);
+    });
+  }
+
+  //병원 진료 기록 수정
+  const hospitalMedicalRecordUpdate = () => {
+    if (hospitalMedicalRecordValidation() == false) {
+      return;
+    }
+
+    hospitalMedicalRecord['senior_id'] = targetSenior['senior_id'];
+    hospitalMedicalRecord['agent_id'] = defaultUserId;
+    setHospitalMedicalRecord({ ...hospitalMedicalRecord });
+
+    fetch("/hospital/hospitalMedicalRecordUpdate.json", {
+      method: "POST",
+      headers: {
+        'Content-Type': 'application/json; charset=UTF-8'
+      },
+      body: JSON.stringify(hospitalMedicalRecord),
+    }).then((response) => response.json()).then((data) => {
+      console.log("병원 진료 기록 수정 결과(건수) : ", data);
+      if (data > 0) {
+        setHospitalMedicalRecordInit();
+        hospitalMedicalRecordSelectList();
+        //closeModal2();
+        alert("수정완료");
+      } else {
+        alert("수정에 실패하였습니다. 관리자에게 문의바랍니다.");
+      }
+    }).catch((error) => {
+      console.log('hospitalMedicalRecordUpdate() /hospital/hospitalMedicalRecordUpdate.json error : ', error);
+    });
+  }
+
+  //병원 진료 기록 삭제
+  const hospitalMedicalRecordDelete = () => {
+    if (confirm('진료 기록을 삭제하시겠습니까?') == false) {
+      return;
+    }
+
+    fetch("/hospital/hospitalMedicalRecordDelete.json", {
+      method: "POST",
+      headers: {
+        'Content-Type': 'application/json; charset=UTF-8'
+      },
+      body: JSON.stringify(hospitalMedicalRecord),
+    }).then((response) => response.json()).then((data) => {
+      console.log("병원 진료 기록 삭제 결과(건수) : ", data);
+      if (data > 0) {
+        setHospitalMedicalRecordInit();
+        hospitalMedicalRecordSelectList();
+        //closeModal2();
+        alert("삭제완료");
+      } else {
+        alert("삭제에 실패하였습니다. 관리자에게 문의바랍니다.");
+      }
+    }).catch((error) => {
+      console.log('hospitalMedicalRecordDelete() /hospital/hospitalMedicalRecordDelete.json error : ', error);
+    });
+  }
+
+  //초기화 취소
+  const setHospitalMedicalRecordInit = () => {
+    setHospitalMedicalRecord({ ...hospitalMedicalRecordInit });
+  }
+
+  //병원 진료 기록 정보
+  const [hospitalMedicalRecordList, setHospitalMedicalRecordList] = React.useState({ hospitalMedicalRecordList: [], hospitalMedicalRecordListCount: 0, search: { currentPage: 1, perPage: 5 } });
+  //병원 진료 기록 목록 조회
+  const hospitalMedicalRecordSelectList = (currentPage) => {
+    hospitalMedicalRecordList.search.currentPage = CommonUtil.isEmpty(currentPage) ? 1 : currentPage;
+    hospitalMedicalRecordList.search['senior_id'] = targetSenior['senior_id'];
+    setHospitalMedicalRecordList({ ...hospitalMedicalRecordList });
+
+    fetch("/hospital/hospitalMedicalRecordSelectList.json", {
+      method: "POST",
+      headers: {
+        'Content-Type': 'application/json; charset=UTF-8'
+      },
+      body: JSON.stringify(hospitalMedicalRecordList.search),
+    }).then((response) => response.json()).then((data) => {
+      console.log("병원 진료 기록 목록 조회 결과(건수) : ", data);
+      data.search = hospitalMedicalRecordList.search;
+      setHospitalMedicalRecordList(data);
+    }).catch((error) => {
+      console.log('hospitalMedicalRecordSelectList() /hospital/hospitalMedicalRecordSelectList.json error : ', error);
+    });
+  }
+  /****************** 병원 진료 기록 (종료) ******************/
+
+
+
+  /****************** 심전도 (시작) ******************/
+  const ecgInit = {
+    'senior_id': null,
+    'ecg_record_idx': null,
+    'bradycardia_count': 0,
+    'tachycardia_count': 0,
+    'max_heart_rate': 0.0,
+    'min_heart_rate': 0.0,
+    'abnormal_heart_rate': 0.0,
+    'average_heart_rate': 0.0,
+    'max_rr': 0.0,
+    'min_rr': 0.0,
+    'average_rr': 0.0,
+    'ecg_reading_date': CommonUtil.getDate(),
+    'ecg_finding_type': '',
+    'ecg_finding_content': '',
+    'agent_id': defaultUserId,
+    'medical_record_idx': null,
+    'common_group_file_idx': null,
+    commonFileList: [],//심전도 업로드 파일 목록
+
+    isEdit: false,//직접 수정일 때, true (수정 or 등록 상관없음);
+  };
+  //심전도 정보
+  const [ecg, setEcg] = React.useState({ ...ecgInit });
+  const ecgRef = React.useRef({ ...ecgInit });
+
+  //심전도 유효성 검사
+  const ecgValidation = () => {
+    const target = ecg;
+    const targetRef = ecgRef;
+
+    if (CommonUtil.isEmpty(target['ecg_reading_date']) == true) {
+      targetRef.current['ecg_reading_date'].focus();
+      alert("판독 소견 측정 일자를 선택해 주세요.");
+      return false;
+    }
+    if (CommonUtil.isEmpty(target['ecg_finding_type']) == true) {
+      targetRef.current['ecg_finding_type'].focus();
+      alert("판독 소견 측정 종류를 입력해 주세요.");
+      return false;
+    }
+    if (CommonUtil.isEmpty(target['ecg_finding_content']) == true) {
+      targetRef.current['ecg_finding_content'].focus();
+      alert("판독 소견 측정 내용을 입력해 주세요.");
+      return false;
+    }
+    //파일 입력
+    if (target.isEdit == false) {
+      if (CommonUtil.isEmpty(target['commonFileList']) == true) {
+        //targetRef.current['commonFileList'].focus();
+        alert("심전도 측정 파일을 올려주세요.");
+        return false;
+      }
+    } else {//직접 입력
+      if (CommonUtil.isEmpty(target['bradycardia_count']) == true) {
+        targetRef.current['bradycardia_count'].focus();
+        alert("서맥 횟수를 입력해 주세요.");
+        return false;
+      }
+      if (CommonUtil.isEmpty(target['tachycardia_count']) == true) {
+        targetRef.current['tachycardia_count'].focus();
+        alert("빈맥 횟수 입력해 주세요.");
+        return false;
+      }
+      if (CommonUtil.isEmpty(target['max_heart_rate']) == true) {
+        targetRef.current['average_heart_rate'].focus();
+        alert("최대 심박수를 입력해 주세요.");
+        return false;
+      }
+      if (CommonUtil.isEmpty(target['min_heart_rate']) == true) {
+        targetRef.current['average_heart_rate'].focus();
+        alert("최소 심박수를 입력해 주세요.");
+        return false;
+      }
+      if (CommonUtil.isEmpty(target['average_heart_rate']) == true) {
+        targetRef.current['average_heart_rate'].focus();
+        alert("평균 심박수를 입력해 주세요.");
+        return false;
+      }
+      if (CommonUtil.isEmpty(target['abnormal_heart_rate']) == true) {
+        targetRef.current['abnormal_heart_rate'].focus();
+        alert("이상 심박수를 입력해 주세요.");
+        return false;
+      }
+      if (CommonUtil.isEmpty(target['max_rr']) == true) {
+        targetRef.current['max_rr'].focus();
+        alert("최대 R-R를 입력해 주세요.");
+        return false;
+      }
+      if (CommonUtil.isEmpty(target['min_rr']) == true) {
+        targetRef.current['min_rr'].focus();
+        alert("최소 R-R를 입력해 주세요.");
+        return false;
+      }
+      if (CommonUtil.isEmpty(target['average_rr']) == true) {
+        targetRef.current['average_rr'].focus();
+        alert("평균 R-R를 입력해 주세요.");
+        return false;
+      }
+    }
+
+    return true;
+  }
+
+
+  //심전도 등록
+  const ecgInsert = () => {
+    if (ecgValidation() == false) {
+      return;
+    }
+
+    ecg['senior_id'] = targetSenior['senior_id'];
+    ecg['agent_id'] = defaultUserId;
+    setEcg({ ...ecg });
+
+    fetch("/hospital/ecgInsert.json", {
+      method: "POST",
+      headers: {
+        'Content-Type': 'application/json; charset=UTF-8'
+      },
+      body: JSON.stringify(ecg),
+    }).then((response) => response.json()).then((data) => {
+      console.log("심전도 등록 결과(건수) : ", data);
+      if (data > 0) {
+        setEcgInit();
+        ecgSelectList();
+        //closeModal3();
+        alert("등록완료");
+
+      } else {
+        alert("등록에 실패하였습니다. 관리자에게 문의바랍니다.");
+      }
+    }).catch((error) => {
+      console.log('ecgInsert() /hospital/ecgInsert.json error : ', error);
+    });
+  }
+
+  //심전도 수정
+  const ecgUpdate = () => {
+    if (ecgValidation() == false) {
+      return;
+    }
+
+    ecg['senior_id'] = targetSenior['senior_id'];
+    ecg['agent_id'] = defaultUserId;
+    setEcg({ ...ecg });
+
+    fetch("/hospital/ecgUpdate.json", {
+      method: "POST",
+      headers: {
+        'Content-Type': 'application/json; charset=UTF-8'
+      },
+      body: JSON.stringify(ecg),
+    }).then((response) => response.json()).then((data) => {
+      console.log("심전도 수정 결과(건수) : ", data);
+      if (data > 0) {
+        setEcgInit();
+        ecg.commonFileList = [];
+        setEcg({ ...ecg });
+        ecgSelectList();
+        //closeModal3();
+        alert("수정완료");
+      } else {
+        alert("수정에 실패하였습니다. 관리자에게 문의바랍니다.");
+      }
+    }).catch((error) => {
+      console.log('ecgUpdate() /hospital/ecgUpdate.json error : ', error);
+    });
+  }
+
+  //심전도 삭제
+  const ecgDelete = () => {
+    if (confirm('심전도 판독 소견을 삭제하시겠습니까?') == false) {
+      return;
+    }
+
+    fetch("/hospital/ecgDelete.json", {
+      method: "POST",
+      headers: {
+        'Content-Type': 'application/json; charset=UTF-8'
+      },
+      body: JSON.stringify(ecg),
+    }).then((response) => response.json()).then((data) => {
+      console.log("심전도 삭제 결과(건수) : ", data);
+      if (data > 0) {
+        setEcgInit();
+        ecg.commonFileList = [];
+        setEcg({ ...ecg });
+        ecgSelectList();
+        //closeModal3();
+        alert("삭제완료");
+      } else {
+        alert("삭제에 실패하였습니다. 관리자에게 문의바랍니다.");
+      }
+    }).catch((error) => {
+      console.log('ecgDelete() /hospital/ecgDelete.json error : ', error);
+    });
+  }
+
+  //초기화 취소
+  const setEcgInit = () => {
+    setEcg({ ...ecgInit });
+  }
+
+  //심전도 정보
+  const [ecgList, setEcgList] = React.useState({ ecgList: [], ecgListCount: 0, search: { currentPage: 1, perPage: 5 } });
+  //심전도 목록 조회
+  const ecgSelectList = (currentPage) => {
+    ecgList.search.currentPage = CommonUtil.isEmpty(currentPage) ? 1 : currentPage;
+    ecgList.search['senior_id'] = targetSenior['senior_id'];
+    setEcgList({ ...ecgList });
+
+    fetch("/hospital/ecgSelectList.json", {
+      method: "POST",
+      headers: {
+        'Content-Type': 'application/json; charset=UTF-8'
+      },
+      body: JSON.stringify(ecgList.search),
+    }).then((response) => response.json()).then((data) => {
+      console.log("심전도 목록 조회 결과(건수) : ", data);
+      data.search = ecgList.search;
+      setEcgList(data);
+    }).catch((error) => {
+      console.log('ecgSelectList() /hospital/ecgSelectList.json error : ', error);
+    });
+  }
+  /****************** 심전도 기록 (종료) ******************/
+
+
+
+  /****************** 혈압 (시작) ******************/
+  const bloodPressureInit = {
+    'senior_id': null,
+    'blood_pressure_record_idx': null,
+    'max_blood_pressure': null,
+    'min_blood_pressure': null,
+    'pulse_rate': null,
+    'medical_record_idx': null,
+    'blood_pressure_record_date': CommonUtil.getDate(),
+    'agent_id': defaultUserId
+  };
+  //혈압 정보
+  const [bloodPressure, setBloodPressure] = React.useState({ ...bloodPressureInit });
+  const bloodPressureRef = React.useRef({ ...bloodPressureInit });
+
+  //혈압 유효성 검사
+  const bloodPressureValidation = () => {
+    const target = bloodPressure;
+    const targetRef = bloodPressureRef;
+
+    if (CommonUtil.isEmpty(target['blood_pressure_record_date']) == true) {
+      targetRef.current['blood_pressure_record_date'].focus();
+      alert("진료 일자를 선택해 주세요.");
+      return false;
+    }
+    if (CommonUtil.isEmpty(target['max_blood_pressure']) == true) {
+      targetRef.current['max_blood_pressure'].focus();
+      alert("최고 혈압을 입력해 주세요.");
+      return false;
+    }
+    if (CommonUtil.isEmpty(target['min_blood_pressure']) == true) {
+      targetRef.current['min_blood_pressure'].focus();
+      alert("최저 혈압을 입력해 주세요.");
+      return false;
+    }
+    if (CommonUtil.isEmpty(target['pulse_rate']) == true) {
+      targetRef.current['pulse_rate'].focus();
+      alert("맥박수를 입력해 주세요.");
+      return false;
+    }
+
+    return true;
+  }
+
+
+  //혈압 등록
+  const bloodPressureInsert = () => {
+    if (bloodPressureValidation() == false) {
+      return;
+    }
+
+    bloodPressure['senior_id'] = targetSenior['senior_id'];
+    bloodPressure['agent_id'] = defaultUserId;
+    setBloodPressure({ ...bloodPressure });
+
+    fetch("/hospital/bloodPressureInsert.json", {
+      method: "POST",
+      headers: {
+        'Content-Type': 'application/json; charset=UTF-8'
+      },
+      body: JSON.stringify(bloodPressure),
+    }).then((response) => response.json()).then((data) => {
+      console.log("혈압 등록 결과(건수) : ", data);
+      if (data > 0) {
+        setBloodPressureInit();
+        bloodPressureSelectList();
+        //closeModal2();
+        alert("등록완료");
+
+      } else {
+        alert("등록에 실패하였습니다. 관리자에게 문의바랍니다.");
+      }
+    }).catch((error) => {
+      console.log('bloodPressureInsert() /hospital/bloodPressureInsert.json error : ', error);
+    });
+  }
+
+  //혈압 수정
+  const bloodPressureUpdate = () => {
+    if (bloodPressureValidation() == false) {
+      return;
+    }
+
+    bloodPressure['senior_id'] = targetSenior['senior_id'];
+    bloodPressure['agent_id'] = defaultUserId;
+    setBloodPressure({ ...bloodPressure });
+
+    fetch("/hospital/bloodPressureUpdate.json", {
+      method: "POST",
+      headers: {
+        'Content-Type': 'application/json; charset=UTF-8'
+      },
+      body: JSON.stringify(bloodPressure),
+    }).then((response) => response.json()).then((data) => {
+      console.log("혈압 수정 결과(건수) : ", data);
+      if (data > 0) {
+        setBloodPressureInit();
+        bloodPressureSelectList();
+        //closeModal2();
+        alert("수정완료");
+      } else {
+        alert("수정에 실패하였습니다. 관리자에게 문의바랍니다.");
+      }
+    }).catch((error) => {
+      console.log('bloodPressureUpdate() /hospital/bloodPressureUpdate.json error : ', error);
+    });
+  }
+
+  //혈압 삭제
+  const bloodPressureDelete = () => {
+    if (confirm('혈압 측정 정보를 삭제하시겠습니까?') == false) {
+      return;
+    }
+
+    fetch("/hospital/bloodPressureDelete.json", {
+      method: "POST",
+      headers: {
+        'Content-Type': 'application/json; charset=UTF-8'
+      },
+      body: JSON.stringify(bloodPressure),
+    }).then((response) => response.json()).then((data) => {
+      console.log("혈압 삭제 결과(건수) : ", data);
+      if (data > 0) {
+        setBloodPressureInit();
+        bloodPressureSelectList();
+        //closeModal2();
+        alert("삭제완료");
+      } else {
+        alert("삭제에 실패하였습니다. 관리자에게 문의바랍니다.");
+      }
+    }).catch((error) => {
+      console.log('bloodPressureDelete() /hospital/bloodPressureDelete.json error : ', error);
+    });
+  }
+
+  //초기화 취소
+  const setBloodPressureInit = () => {
+    setBloodPressure({ ...bloodPressureInit });
+  }
+
+  //혈압 정보
+  const [bloodPressureList, setBloodPressureList] = React.useState({ bloodPressureList: [], bloodPressureListCount: 0, search: { currentPage: 1, perPage: 5 } });
+  //혈압 목록 조회
+  const bloodPressureSelectList = (currentPage) => {
+    bloodPressureList.search.currentPage = CommonUtil.isEmpty(currentPage) ? 1 : currentPage;
+    bloodPressureList.search['senior_id'] = targetSenior['senior_id'];
+    setBloodPressureList({ ...bloodPressureList });
+
+    fetch("/hospital/bloodPressureSelectList.json", {
+      method: "POST",
+      headers: {
+        'Content-Type': 'application/json; charset=UTF-8'
+      },
+      body: JSON.stringify(bloodPressureList.search),
+    }).then((response) => response.json()).then((data) => {
+      console.log("혈압 목록 조회 결과(건수) : ", data);
+      data.search = bloodPressureList.search;
+      setBloodPressureList(data);
+    }).catch((error) => {
+      console.log('bloodPressureSelectList() /hospital/bloodPressureSelectList.json error : ', error);
+    });
+  }
+  /****************** 혈압 (종료) ******************/
+
+  React.useEffect(() => {
+    searching();
+  }, []);
+
+
+  //현재 탭 Index
+  const [tabIndex, setTabIndex] = React.useState(0);
+  //탭 초기화
+  const tab = [{
+    title: `문진표관리`,
+    content: (
+      <div>
+        <div className="flex equip-tab">
+          <SubTitle explanation={"돌봄 대상자의 병원 내원 기록 및 문진표를 관리할 수 있습니다."} />
+        </div>
+        <table className={"protector-user"}>
+          <thead>
+            <tr>
+              <th>No</th>
+              <th>소속기관명</th>
+              <th>이름</th>
+              <th>생년월일</th>
+              <th>성별</th>
+              <th>연락처</th>
+              <th>문진표관리</th>
+              <th>내원기록관리</th>
+            </tr>
+          </thead>
+          <tbody>
+            {senior.seniorList.map((item, idx) => {
+              return (
+                <tr key={idx}>
+                  <td data-label="No">{senior.seniorListCount - idx - (senior.search.currentPage - 1) * senior.search.perPage}</td>
+                  <td data-label="소속기관명">{item['agency_name']}</td>
+                  <td data-label="이름">{item['user_name']}</td>
+                  <td data-label="생년월일">{item['user_birth']}</td>
+                  <td data-label="성별">{item['user_gender']}</td>
+                  <td data-label="연락처">{item['user_phonenumber']}</td>
+                  <td data-label="문진표관리">
+                    <button className="btn-small gray-btn" onClick={() => openModal(item)}>작성하기</button>
+                  </td>
+                  <td data-label="내원기록관리">
+                    <button className="btn-small gray-btn" onClick={() => openModal2(item)}>작성하기</button>
+                  </td>
+                </tr>
+              )
+            })}
+            {CommonUtil.isEmpty(senior.seniorList) ?
+              <tr>
+                <td colSpan={8}>조회된 데이터가 없습니다</td>
+              </tr>
+              : null}
+          </tbody>
+        </table>
+        <Pagination
+          currentPage={senior.search.currentPage}
+          perPage={senior.search.perPage}
+          totalCount={senior.seniorListCount}
+          maxRange={5}
+          click={seniorSelectList}
+        />
+      </div>
+    )
+  }, {
+    title: `심전도관리`,
+    content: (
+      <div>
+        <div className="flex equip-tab">
+          <SubTitle explanation={"돌봄 대상자의 심전도 정보를 관리할 수 있습니다."} />
+        </div>
+        <table className={"protector-user"}>
+          <thead>
+            <tr>
+              <th>No</th>
+              <th>소속기관명</th>
+              <th>이름</th>
+              <th>생년월일</th>
+              <th>성별</th>
+              <th>연락처</th>
+              <th>심전도관리</th>
+            </tr>
+          </thead>
+          <tbody>
+            {senior.seniorList.map((item, idx) => {
+              return (
+                <tr key={idx}>
+                  <td data-label="No">{senior.seniorListCount - idx - (senior.search.currentPage - 1) * senior.search.perPage}</td>
+                  <td data-label="소속기관명">{item['agency_name']}</td>
+                  <td data-label="이름">{item['user_name']}</td>
+                  <td data-label="생년월일">{item['user_birth']}</td>
+                  <td data-label="성별">{item['user_gender']}</td>
+                  <td data-label="연락처">{item['user_phonenumber']}</td>
+                  <td data-label="심전도관리">
+                    <button className="btn-small gray-btn" onClick={() => openModal3(item)}>심전도관리</button>
+                  </td>
+                </tr>
+              )
+            })}
+            {CommonUtil.isEmpty(senior.seniorList) ?
+              <tr>
+                <td colSpan={7}>조회된 데이터가 없습니다</td>
+              </tr>
+              : null}
+          </tbody>
+        </table>
+        <Pagination
+          currentPage={senior.search.currentPage}
+          perPage={senior.search.perPage}
+          totalCount={senior.seniorListCount}
+          maxRange={5}
+          click={seniorSelectList}
+        />
+      </div>
+    )
+  }, {
+    title: `혈압관리`,
+    content: (
+      <div>
+        <div className="flex equip-tab">
+          <SubTitle explanation={"돌봄 대상자의 혈압 정보를 관리할 수 있습니다."} />
+        </div>
+        <table className={"protector-user"}>
+          <thead>
+            <tr>
+              <th>No</th>
+              <th>소속기관명</th>
+              <th>이름</th>
+              <th>생년월일</th>
+              <th>성별</th>
+              <th>연락처</th>
+              <th>혈압관리</th>
+            </tr>
+          </thead>
+          <tbody>
+            {senior.seniorList.map((item, idx) => {
+              return (
+                <tr key={idx}>
+                  <td data-label="No">{senior.seniorListCount - idx - (senior.search.currentPage - 1) * senior.search.perPage}</td>
+                  <td data-label="소속기관명">{item['agency_name']}</td>
+                  <td data-label="이름">{item['user_name']}</td>
+                  <td data-label="생년월일">{item['user_birth']}</td>
+                  <td data-label="성별">{item['user_gender']}</td>
+                  <td data-label="연락처">{item['user_phonenumber']}</td>
+                  <td data-label="혈압관리">
+                    <button className="btn-small gray-btn" onClick={() => openModal4(item)}>혈압관리</button>
+                  </td>
+                </tr>
+              )
+            })}
+            {CommonUtil.isEmpty(senior.seniorList) ?
+              <tr>
+                <td colSpan={7}>조회된 데이터가 없습니다</td>
+              </tr>
+              : null}
+          </tbody>
+        </table>
+        <Pagination
+          currentPage={senior.search.currentPage}
+          perPage={senior.search.perPage}
+          totalCount={senior.seniorListCount}
+          maxRange={5}
+          click={seniorSelectList}
+        />
+      </div>
+    )
+  }];
+
+  return (
+    <main>
+
+      {/* <Modal_Questionnaire open={modalOpen} close={closeModal} /> */}
+      {/* <Modal_MedicalHistory open={modalOpen2} close={closeModal2} /> */}
+      {/* <Modal_ECG open={modalOpen3} close={closeModal3} /> */}
+      {/* <Modal_Blood open={modalOpen4} close={closeModal4} /> */}
+
+      <div className="search-management flex-start margin-bottom2">
+        <select style={{ maxWidth: '150px' }}
+          onChange={(e) => { senior.search.searchType = e.target.value; setSenior({ ...senior }); }}>
+          <option value="" selected={CommonUtil.isEmpty(senior.search.searchType)}>전체</option>
+          <option value="user_name" selected={senior.search.searchType == 'user_name'}>이름</option>
+          <option value="user_id" selected={senior.search.searchType == 'user_id'}>아이디</option>
+          <option value="user_phonenumber" selected={senior.search.searchType == 'user_phonenumber'}>연락처</option>
+        </select>
+        <input type="text" className="senior-search" value={senior.search.searchText}
+          onChange={(e) => { senior.search.searchText = e.target.value; setSenior({ ...senior }); }}
+          onKeyUp={(e) => searchingEnter(e.key)} />
+        <button className="btn-small gray-btn" onClick={searching}>검색</button>
+      </div>
+
+      <div className="content-wrap">
+        <DetailTitle contentTitle={"대상자의 문진표 / 심전도 / 혈압 관리를 할 수 있습니다."} />
+
+        <div style={{ height: "calc(100% - 61px)" }}>
+          <div className="right" style={{ height: "100%", }}>
+            <div style={{ height: "100%" }}>
+              <div className="tab-container" style={{ marginTop: "5rem" }}>
+                {/* {CommonUtil.isEmpty(state.loginUser) == false && state.loginUser['authority'] == 'ROLE_AGENCY' ?
+                                <div className="flex-end margin-bottom">
+                                    <div className="flex searchselect" style={{width: 'auto'}}>
+
+                                        <input type="radio" id="my_senior" name="senior" checked={isMySenior}
+                                            onChange={(e) => {e.target.checked ? setIsMySenior(true) : null}}/>
+                                        <label for="my_senior" style={{marginRight: '3rem'}}>나의 대상자 보기</label>
+
+                                        <input type="radio" id="all_senior" name="senior" checked={!isMySenior}
+                                            onChange={(e) => {e.target.checked ? setIsMySenior(false) : null}}/>
+                                        <label for="all_senior" style={{marginRight: '0'}}>전체 대상자 보기</label>
+
+                                    </div>
+                                </div>
+                                :null} */}
+                <ul className="tab-menu flex-end">
+                  {tab.map((item, idx) => {
+                    return (
+                      <li onClick={() => setTabIndex(idx)} className={idx == tabIndex ? 'active' : null}>
+                        {item.title}
+                      </li>
+                    )
+                  })}
+                </ul>
+                <div className="content-wrap userlist">
+
+                  <ul className="tab-content">
+                    <li>
+                      {tab[tabIndex].content}
+                    </li>
+                  </ul>
+                </div>
+              </div>
+            </div>
+          </div>
+        </div>
+      </div>
+
+
+      <Modal open={modalOpen} close={closeModal} header="문진표 작성">
+        <div className="board-wrap">
+          <div>
+            <table className="margin-bottom2  questionnaire-table">
+              <tr>
+                <th>흡연을 하십니까?</th>
+                <td className="flex-start">
+                  <input type="radio" name="smoke" id="smoke-true"
+                    checked={questionnaire['smoke_type'] == true}
+                    onChange={(e) => {
+                      if (e.target.checked) {
+                        questionnaire['smoke_type'] = true;
+                        setQuestionnaire({ ...questionnaire });
+                      }
+                    }
+                    }
+                  />
+                  <label for="smoke-true">예</label>
+                  <input type="radio" name="smoke" id="smoke-false"
+                    checked={questionnaire['smoke_type'] == false}
+                    onChange={(e) => {
+                      if (e.target.checked) {
+                        questionnaire['smoke_type'] = false;
+                        setQuestionnaire({ ...questionnaire });
+                      }
+                    }
+                    }
+                  />
+                  <label for="smoke-false">아니요</label>
+                </td>
+              </tr>
+              <tr>
+                <th>음주를 하십니까?</th>
+                <td className="flex-start">
+                  <input type="radio" name="drink" id="drink-true"
+                    checked={questionnaire['drink_type'] == true}
+                    onChange={(e) => {
+                      if (e.target.checked) {
+                        questionnaire['drink_type'] = true;
+                        setQuestionnaire({ ...questionnaire });
+                      }
+                    }
+                    }
+                  />
+                  <label for="drink-true">예</label>
+                  <input type="radio" name="drink" id="drink-false"
+                    checked={questionnaire['drink_type'] == false}
+                    onChange={(e) => {
+                      if (e.target.checked) {
+                        questionnaire['drink_type'] = false;
+                        setQuestionnaire({ ...questionnaire });
+                      }
+                    }
+                    }
+                  />
+                  <label for="drink-false">아니요</label>
+                </td>
+              </tr>
+              <tr>
+                <th>일주일에 운동을 몇회 하십니까?</th>
+                <td className="flex-start">
+                  <input type="radio" name="exercise" id="exercise-false"
+                    checked={questionnaire['exercise_type'] == false}
+                    onChange={(e) => {
+                      if (e.target.checked) {
+                        questionnaire['exercise_type'] = false;
+                        setQuestionnaire({ ...questionnaire });
+                      }
+                    }
+                    }
+                  />
+                  <label for="exercise-false">안함</label>
+
+                  <input type="radio" name="exercise" id="exercise-1"
+                    checked={questionnaire['exercise_type'] == true && questionnaire['weekly_exercise_amount'] == 1}
+                    onChange={(e) => {
+                      if (e.target.checked) {
+                        questionnaire['exercise_type'] = true;
+                        questionnaire['weekly_exercise_amount'] = 1;
+                        setQuestionnaire({ ...questionnaire });
+                      }
+                    }
+                    }
+                  />
+                  <label for="exercise-1">1회</label>
+
+                  <input type="radio" name="exercise" id="exercise-2"
+                    checked={questionnaire['exercise_type'] == true && questionnaire['weekly_exercise_amount'] == 2}
+                    onChange={(e) => {
+                      if (e.target.checked) {
+                        questionnaire['exercise_type'] = true;
+                        questionnaire['weekly_exercise_amount'] = 2;
+                        setQuestionnaire({ ...questionnaire });
+                      }
+                    }
+                    }
+                  />
+                  <label for="exercise-2">2회</label>
+
+                  <input type="radio" name="exercise" id="exercise-3"
+                    checked={questionnaire['exercise_type'] == true && questionnaire['weekly_exercise_amount'] == 3}
+                    onChange={(e) => {
+                      if (e.target.checked) {
+                        questionnaire['exercise_type'] = true;
+                        questionnaire['weekly_exercise_amount'] = 3;
+                        setQuestionnaire({ ...questionnaire });
+                      }
+                    }
+                    }
+                  />
+                  <label for="exercise-3">3회</label>
+
+                  <input type="radio" name="exercise" id="exercise-4"
+                    checked={questionnaire['exercise_type'] == true && questionnaire['weekly_exercise_amount'] == 4}
+                    onChange={(e) => {
+                      if (e.target.checked) {
+                        questionnaire['exercise_type'] = true;
+                        questionnaire['weekly_exercise_amount'] = 4;
+                        setQuestionnaire({ ...questionnaire });
+                      }
+                    }
+                    }
+                  />
+                  <label for="exercise-4">4회</label>
+
+                  <input type="radio" name="exercise" id="exercise-5"
+                    checked={questionnaire['exercise_type'] == true && questionnaire['weekly_exercise_amount'] == 5}
+                    onChange={(e) => {
+                      if (e.target.checked) {
+                        questionnaire['exercise_type'] = true;
+                        questionnaire['weekly_exercise_amount'] = 5;
+                        setQuestionnaire({ ...questionnaire });
+                      }
+                    }
+                    }
+                  />
+                  <label for="exercise-5">5회</label>
+
+                  <input type="radio" name="exercise" id="exercise-6"
+                    checked={questionnaire['exercise_type'] == true && questionnaire['weekly_exercise_amount'] == 6}
+                    onChange={(e) => {
+                      if (e.target.checked) {
+                        questionnaire['exercise_type'] = true;
+                        questionnaire['weekly_exercise_amount'] = 6;
+                        setQuestionnaire({ ...questionnaire });
+                      }
+                    }
+                    }
+                  />
+                  <label for="exercise-6">6회</label>
+
+                  <input type="radio" name="exercise" id="exercise-7"
+                    checked={questionnaire['exercise_type'] == true && questionnaire['weekly_exercise_amount'] == 7}
+                    onChange={(e) => {
+                      if (e.target.checked) {
+                        questionnaire['exercise_type'] = true;
+                        questionnaire['weekly_exercise_amount'] = 7;
+                        setQuestionnaire({ ...questionnaire });
+                      }
+                    }
+                    }
+                  />
+                  <label for="exercise-7">매일</label>
+                </td>
+              </tr>
+              <tr>
+                <th>최근 3개월 동안 갑작스런 체중 변화가 있었습니까?</th>
+                <td className="flex-start">
+                  <input type="radio" name="weight" id="weight-up"
+                    checked={questionnaire['weight_change_amount'] == 1}
+                    onChange={(e) => {
+                      if (e.target.checked) {
+                        questionnaire['weight_change_amount'] = 1;
+                        setQuestionnaire({ ...questionnaire });
+                      }
+                    }
+                    }
+                  />
+                  <label for="weight-up">예 - 증가</label>
+
+                  <input type="radio" name="weight" id="weight-down"
+                    checked={questionnaire['weight_change_amount'] == -1}
+                    onChange={(e) => {
+                      if (e.target.checked) {
+                        questionnaire['weight_change_amount'] = -1;
+                        setQuestionnaire({ ...questionnaire });
+                      }
+                    }
+                    }
+                  />
+                  <label for="weight-down">예 - 감소</label>
+
+                  <input type="radio" name="weight" id="weight-false"
+                    checked={questionnaire['weight_change_amount'] == 0}
+                    onChange={(e) => {
+                      if (e.target.checked) {
+                        questionnaire['weight_change_amount'] = 0;
+                        setQuestionnaire({ ...questionnaire });
+                      }
+                    }
+                    }
+                  />
+                  <label for="weight-false">아니요</label>
+                </td>
+              </tr>
+              <tr>
+                <th>현재 복용중인 약이 있으면 체크를 해주세요.</th>
+                <td className="flex-start">
+
+                  <input type="checkbox" name="pills" id="pills-1"
+                    checked={questionnaire['medication_pill'].indexOf('아스피린(항혈소판제)') > -1}
+                    onChange={(e) => {
+                      if (e.target.checked) {
+                        questionnaire['medication_pill'] += '아스피린(항혈소판제),';
+                        setQuestionnaire({ ...questionnaire });
+                      } else {
+                        questionnaire['medication_pill'] = questionnaire['medication_pill'].replace('아스피린(항혈소판제),', '');
+                        setQuestionnaire({ ...questionnaire });
+                      }
+                    }
+                    }
+                  />
+                  <label for="pills-1">아스피린(항혈소판제)</label>
+
+                  <input type="checkbox" name="pills" id="pills-2"
+                    checked={questionnaire['medication_pill'].indexOf('당뇨약') > -1}
+                    onChange={(e) => {
+                      if (e.target.checked) {
+                        questionnaire['medication_pill'] += '당뇨약,';
+                        setQuestionnaire({ ...questionnaire });
+                      } else {
+                        questionnaire['medication_pill'] = questionnaire['medication_pill'].replace('당뇨약,', '');
+                        setQuestionnaire({ ...questionnaire });
+                      }
+                    }
+                    }
+                  />
+                  <label for="pills-2">당뇨약</label>
+
+                  <input type="checkbox" name="pills" id="pills-3"
+                    checked={questionnaire['medication_pill'].indexOf('고혈압약') > -1}
+                    onChange={(e) => {
+                      if (e.target.checked) {
+                        questionnaire['medication_pill'] += '고혈압약,';
+                        setQuestionnaire({ ...questionnaire });
+                      } else {
+                        questionnaire['medication_pill'] = questionnaire['medication_pill'].replace('고혈압약,', '');
+                        setQuestionnaire({ ...questionnaire });
+                      }
+                    }
+                    }
+                  />
+                  <label for="pills-3">고혈압약</label>
+
+                  <input type="checkbox" name="pills" id="pills-etc"
+                    checked={questionnaire['medication_pill'].indexOf('기타「」,') > -1}
+                    onChange={(e) => {
+                      if (e.target.checked) {
+                        questionnaire['medication_pill'] += '기타「」,';
+                        setQuestionnaire({ ...questionnaire });
+                      } else {
+                        questionnaire['medication_pill'] = questionnaire['medication_pill'].replace('기타「」,', '');
+                        questionnaire['medication_pill_etc'] = '';
+                        setQuestionnaire({ ...questionnaire });
+                      }
+                    }
+                    }
+                  />
+                  <label for="pills-etc">기타</label>
+                  <input type="text" style={{ width: 'max-content', marginLeft: '1rem' }}
+                    disabled={questionnaire['medication_pill'].indexOf('기타「」,') == -1}
+                    value={questionnaire['medication_pill_etc']}
+                    onChange={(e) => {
+                      questionnaire['medication_pill_etc'] = e.target.value;
+                      setQuestionnaire({ ...questionnaire });
+                    }}
+                  />
+
+                </td>
+              </tr>
+            </table>
+          </div>
+          <div className="flex-center">
+            {CommonUtil.isEmpty(questionnaire['questionnaire_record_idx'])
+              ? <button className="btn-small red-btn" onClick={questionnaireInsert}>저장</button>
+              : <button className="btn-small red-btn" onClick={questionnaireUpdate}>저장</button>
+            }
+          </div>
+        </div>
+      </Modal>
+
+
+      <Modal open={modalOpen2} close={closeModal2} header="내원기록 관리 및 조회">
+        <div className="board-wrap">
+          <table className="margin-bottom2 senior-insert ">
+            <tr>
+              <th>진료 일자</th>
+              <td>
+                <input type="date"
+                  value={hospitalMedicalRecord['medical_date']}
+                  onChange={(e) => {
+                    hospitalMedicalRecord['medical_date'] = e.target.value;
+                    setHospitalMedicalRecord({ ...hospitalMedicalRecord });
+                  }}
+                  ref={el => hospitalMedicalRecordRef.current['medical_date'] = el}
+                />
+              </td>
+            </tr>
+            <tr>
+              <th>진료 사유</th>
+              <td className="flex-start ">
+                <input type="text"
+                  value={hospitalMedicalRecord['medical_reason']}
+                  onChange={(e) => {
+                    hospitalMedicalRecord['medical_reason'] = e.target.value;
+                    setHospitalMedicalRecord({ ...hospitalMedicalRecord });
+                  }}
+                  ref={el => hospitalMedicalRecordRef.current['medical_reason'] = el}
+                />
+              </td>
+            </tr>
+            <tr>
+              <th>진료 내용</th>
+              <td colSpan={3}>
+                <textarea className="medicine" cols="30" rows="2"
+                  value={hospitalMedicalRecord['medical_content']}
+                  onChange={(e) => {
+                    hospitalMedicalRecord['medical_content'] = e.target.value;
+                    setHospitalMedicalRecord({ ...hospitalMedicalRecord });
+                  }}
+                  ref={el => hospitalMedicalRecordRef.current['medical_content'] = el}
+                ></textarea>
+              </td>
+            </tr>
+          </table>
+          <div className="btn-wrap flex-center margin-bottom5">
+            {CommonUtil.isEmpty(hospitalMedicalRecord['medical_record_idx'])
+              ? <button className="btn-small red-btn" onClick={hospitalMedicalRecordInsert}>등록</button>
+
+              : <>
+                <button className="btn-small gray-btn" onClick={setHospitalMedicalRecordInit}>수정취소</button>
+                <button className="btn-small red-btn" onClick={hospitalMedicalRecordUpdate}>수정</button>
+                <button className="btn-small red-btn" onClick={hospitalMedicalRecordDelete}>삭제</button>
+              </>
+            }
+          </div>
+          <div>
+            <table className="caregiver-user senior-insert  senior-table">
+              <thead>
+                <tr>
+                  <th>No</th>
+                  <th>진료 일자</th>
+                  <th>진료 사유</th>
+                  <th>진료 내용</th>
+                  <th>기록 작성자</th>
+                </tr>
+              </thead>
+              <tbody>
+                {hospitalMedicalRecordList.hospitalMedicalRecordList.map((item, idx) => {
+                  return (
+                    <tr key={idx} onClick={() => { setHospitalMedicalRecord(item) }}>
+                      <td data-label="No">{hospitalMedicalRecordList.hospitalMedicalRecordListCount - idx - (hospitalMedicalRecordList.search.currentPage - 1) * hospitalMedicalRecordList.search.perPage}</td>
+                      <td data-label="진료 일자">{item['medical_date']}</td>
+                      <td data-label="진료 내용">{item['medical_reason']}</td>
+                      <td data-label="진료 사유">{item['medical_content']}</td>
+                      <td data-label="기록 작성자">{item['insert_user_name']}</td>
+                    </tr>
+                  )
+                })}
+                {CommonUtil.isEmpty(hospitalMedicalRecordList.hospitalMedicalRecordList) ?
+                  <tr>
+                    <td colSpan={5}>조회된 데이터가 없습니다</td>
+                  </tr>
+                  : null}
+              </tbody>
+            </table>
+            <Pagination
+              currentPage={hospitalMedicalRecordList.search.currentPage}
+              perPage={hospitalMedicalRecordList.search.perPage}
+              totalCount={hospitalMedicalRecordList.hospitalMedicalRecordListCount}
+              maxRange={5}
+              click={hospitalMedicalRecordSelectList}
+            />
+          </div>
+        </div>
+      </Modal>
+
+
+      <Modal open={modalOpen3} close={closeModal3} header="심전도판독소견 관리 및 조회">
+        <div className="board-wrap">
+          <table className="margin-bottom2 senior-insert ">
+            <tr>
+              <th>측정 일자</th>
+              <td colSpan={5}>
+                <input type="date" value={ecg['ecg_reading_date']}
+                  onChange={(e) => {
+                    ecg['ecg_reading_date'] = e.target.value;
+                    setEcg({ ...ecg });
+                  }}
+                  ref={el => ecgRef.current['ecg_reading_date'] = el}
+                />
+              </td>
+            </tr>
+            <tr>
+              <th>판독 소견 종류</th>
+              <td colSpan={5}>
+                <input type="text" value={ecg['ecg_finding_type']}
+                  onChange={(e) => {
+                    ecg['ecg_finding_type'] = e.target.value;
+                    setEcg({ ...ecg });
+                  }}
+                  ref={el => ecgRef.current['ecg_finding_type'] = el}
+                />
+              </td>
+            </tr>
+            <tr>
+              <th>판독 소견 내용</th>
+              <td colSpan={5}>
+                <textarea className="medicine" cols="30" rows="2"
+                  value={ecg['ecg_finding_content']}
+                  onChange={(e) => {
+                    ecg['ecg_finding_content'] = e.target.value;
+                    setEcg({ ...ecg });
+                  }}
+                  ref={el => ecgRef.current['ecg_finding_content'] = el}
+                ></textarea>
+              </td>
+            </tr>
+            {ecg.isEdit == false
+              ? <tr>
+                <th>측정 파일</th>
+                <td colSpan={5}>
+                  <CommonFile commonFileList={ecg['commonFileList']} multiple={false} accept={'.dat, .ecg'} />
+                </td>
+              </tr>
+              : <>
+                <tr>
+                  <th>서맥 횟수</th>
+                  <td>
+                    <input type="number" value={ecg['bradycardia_count']}
+                      onChange={(e) => {
+                        ecg['bradycardia_count'] = e.target.value;
+                        setEcg({ ...ecg });
+                      }}
+                      ref={el => ecgRef.current['bradycardia_count'] = el}
+                    />
+                  </td>
+                  <th>빈맥 횟수</th>
+                  <td>
+                    <input type="number" value={ecg['tachycardia_count']}
+                      onChange={(e) => {
+                        ecg['tachycardia_count'] = e.target.value;
+                        setEcg({ ...ecg });
+                      }}
+                      ref={el => ecgRef.current['tachycardia_count'] = el}
+                    />
+                  </td>
+                  <th>이상 심박수</th>
+                  <td>
+                    <input type="number" value={ecg['abnormal_heart_rate']}
+                      onChange={(e) => {
+                        ecg['abnormal_heart_rate'] = e.target.value;
+                        setEcg({ ...ecg });
+                      }}
+                      ref={el => ecgRef.current['abnormal_heart_rate'] = el}
+                    />
+                  </td>
+                </tr>
+                <tr>
+                  <th>최대 심박수</th>
+                  <td>
+                    <input type="number" value={ecg['max_heart_rate']}
+                      onChange={(e) => {
+                        ecg['max_heart_rate'] = e.target.value;
+                        setEcg({ ...ecg });
+                      }}
+                      ref={el => ecgRef.current['max_heart_rate'] = el}
+                    />
+                  </td>
+                  <th>최소 심박수</th>
+                  <td>
+                    <input type="number" value={ecg['min_heart_rate']}
+                      onChange={(e) => {
+                        ecg['min_heart_rate'] = e.target.value;
+                        setEcg({ ...ecg });
+                      }}
+                      ref={el => ecgRef.current['min_heart_rate'] = el}
+                    />
+                  </td>
+                  <th>평균 심박수</th>
+                  <td>
+                    <input type="number" value={ecg['average_heart_rate']}
+                      onChange={(e) => {
+                        ecg['average_heart_rate'] = e.target.value;
+                        setEcg({ ...ecg });
+                      }}
+                      ref={el => ecgRef.current['average_heart_rate'] = el}
+                    />
+                  </td>
+                </tr>
+                <tr>
+                  <th>최대 R-R</th>
+                  <td>
+                    <input type="number" value={ecg['max_rr']}
+                      onChange={(e) => {
+                        ecg['max_rr'] = e.target.value;
+                        setEcg({ ...ecg });
+                      }}
+                      ref={el => ecgRef.current['max_rr'] = el}
+                    />
+                  </td>
+                  <th>최소 R-R</th>
+                  <td>
+                    <input type="number" value={ecg['min_rr']}
+                      onChange={(e) => {
+                        ecg['min_rr'] = e.target.value;
+                        setEcg({ ...ecg });
+                      }}
+                      ref={el => ecgRef.current['min_rr'] = el}
+                    />
+                  </td>
+                  <th>평균 R-R</th>
+                  <td>
+                    <input type="number" value={ecg['average_rr']}
+                      onChange={(e) => {
+                        ecg['average_rr'] = e.target.value;
+                        setEcg({ ...ecg });
+                      }}
+                      ref={el => ecgRef.current['average_rr'] = el}
+                    />
+                  </td>
+                </tr>
+              </>}
+          </table>
+          <div className="btn-wrap flex-center margin-bottom5">
+            {CommonUtil.isEmpty(ecg['ecg_record_idx'])
+              ? <button className="btn-small red-btn" onClick={ecgInsert}>등록</button>
+              : <>
+                <button className="btn-small gray-btn" onClick={setEcgInit}>수정취소</button>
+                <button className="btn-small red-btn" onClick={ecgUpdate}>수정</button>
+                <button className="btn-small red-btn" onClick={ecgDelete}>삭제</button>
+              </>
+            }
+          </div>
+          <div>
+            <table className="caregiver-user senior-table">
+              <thead>
+                <tr>
+                  <th>No</th>
+                  <th>소견 작성 일자</th>
+                  <th>판독 소견 종류</th>
+                  <th>소견 작성자</th>
+                </tr>
+              </thead>
+              <tbody>
+                {ecgList.ecgList.map((item, idx) => {
+                  return (
+                    <tr key={idx} onClick={() => { item.isEdit = false; setEcg(item); }}>
+                      <td data-label="No">{ecgList.ecgListCount - idx - (ecgList.search.currentPage - 1) * ecgList.search.perPage}</td>
+                      <td data-label="소견 작성 일자">{item['ecg_reading_date']}</td>
+                      <td data-label="판독 소견 종류">{item['ecg_finding_type']}</td>
+                      <td data-label="소견 작성자">{item['insert_user_name']}</td>
+                    </tr>
+                  )
+                })}
+                {CommonUtil.isEmpty(ecgList.ecgList) ?
+                  <tr>
+                    <td colSpan={4}>조회된 데이터가 없습니다</td>
+                  </tr>
+                  : null}
+              </tbody>
+            </table>
+            <Pagination
+              currentPage={ecgList.search.currentPage}
+              perPage={ecgList.search.perPage}
+              totalCount={ecgList.ecgListCount}
+              maxRange={5}
+              click={ecgSelectList}
+            />
+          </div>
+        </div>
+      </Modal>
+
+
+      <Modal open={modalOpen4} close={closeModal4} header="혈압측정결과 관리 및 조회">
+        <div className="board-wrap">
+          <table className="margin-bottom2 senior-insert ">
+            <tr>
+              <th>측정일자</th>
+              <td>
+                <input type="date" value={bloodPressure['blood_pressure_record_date']}
+                  onChange={(e) => {
+                    bloodPressure['blood_pressure_record_date'] = e.target.value;
+                    setBloodPressure({ ...bloodPressure });
+                  }}
+                  ref={el => bloodPressureRef.current['blood_pressure_record_date'] = el}
+                />
+              </td>
+            </tr>
+            <tr>
+              <th>최고혈압</th>
+              <td>
+                <input type="number" value={bloodPressure['max_blood_pressure']}
+                  onChange={(e) => {
+                    bloodPressure['max_blood_pressure'] = e.target.value;
+                    setBloodPressure({ ...bloodPressure });
+                  }}
+                  ref={el => bloodPressureRef.current['max_blood_pressure'] = el}
+                />
+              </td>
+            </tr>
+            <tr>
+              <th>최저혈압</th>
+              <td>
+                <input type="number" value={bloodPressure['min_blood_pressure']}
+                  onChange={(e) => {
+                    bloodPressure['min_blood_pressure'] = e.target.value;
+                    setBloodPressure({ ...bloodPressure });
+                  }}
+                  ref={el => bloodPressureRef.current['min_blood_pressure'] = el}
+                />
+              </td>
+            </tr>
+            <tr>
+              <th>맥박수</th>
+              <td>
+                <input type="number" value={bloodPressure['pulse_rate']}
+                  onChange={(e) => {
+                    bloodPressure['pulse_rate'] = e.target.value;
+                    setBloodPressure({ ...bloodPressure });
+                  }}
+                  ref={el => bloodPressureRef.current['pulse_rate'] = el}
+                />
+              </td>
+            </tr>
+          </table>
+          <div className="btn-wrap flex-center margin-bottom5">
+            {CommonUtil.isEmpty(bloodPressure['blood_pressure_record_idx'])
+              ? <button className="btn-small red-btn" onClick={bloodPressureInsert}>등록</button>
+              : <>
+                <button className="btn-small gray-btn" onClick={setBloodPressureInit}>수정취소</button>
+                <button className="btn-small red-btn" onClick={bloodPressureUpdate}>수정</button>
+                <button className="btn-small red-btn" onClick={bloodPressureDelete}>삭제</button>
+              </>
+            }
+          </div>
+          <div>
+            <table className="caregiver-user senior-insert  senior-table">
+              <thead>
+                <tr>
+                  <th>No</th>
+                  <th>기록 작성일</th>
+                  <th>최고 혈압</th>
+                  <th>최저 혈압</th>
+                  <th>맥박수</th>
+                  <th>기록 작성자</th>
+                </tr>
+              </thead>
+              <tbody>
+                {bloodPressureList.bloodPressureList.map((item, idx) => {
+                  return (
+                    <tr key={idx} onClick={() => { setBloodPressure(item); }}>
+                      <td data-label="No">{bloodPressureList.bloodPressureListCount - idx - (bloodPressureList.search.currentPage - 1) * bloodPressureList.search.perPage}</td>
+                      <td data-label="기록 작성일">{item['blood_pressure_record_date']}</td>
+                      <td data-label="최고 혈압">{item['max_blood_pressure']}</td>
+                      <td data-label="최저 혈압">{item['min_blood_pressure']}</td>
+                      <td data-label="맥박수">{item['pulse_rate']}</td>
+                      <td data-label="기록 작성자">{item['insert_user_name']}</td>
+                    </tr>
+                  )
+                })}
+                {CommonUtil.isEmpty(bloodPressureList.bloodPressureList) ?
+                  <tr>
+                    <td colSpan={6}>조회된 데이터가 없습니다</td>
+                  </tr>
+                  : null}
+              </tbody>
+            </table>
+            <Pagination
+              currentPage={bloodPressureList.search.currentPage}
+              perPage={bloodPressureList.search.perPage}
+              totalCount={bloodPressureList.bloodPressureListCount}
+              maxRange={5}
+              click={bloodPressureSelectList}
+            />
+          </div>
+        </div>
+      </Modal>
+
+    </main>
+  );
+}
 
client/views/pages/healthcare/TeamMedicalcare.jsx (deleted)
--- client/views/pages/healthcare/TeamMedicalcare.jsx
@@ -1,1705 +0,0 @@
-import React from "react";
-import { useNavigate, useLocation } from "react-router";
-import { useSelector } from "react-redux";
-
-
-import SubTitle from "../../component/SubTitle.jsx";
-import Modal from "../../component/Modal.jsx";
-import DetailTitle from "../../component/DetailTitle.jsx";
-import Pagination from "../../component/Pagination.jsx";
-import CommonFile from "../../component/file/CommonFile.jsx";
-
-import CommonUtil from "../../../resources/js/CommonUtil.js";
-
-
-export default function UserAuthoriySelect() {
-    const navigate = useNavigate();
-    const location = useLocation();
-
-    //전역 변수 저장 객체
-    const state = useSelector((state) => {return state});
-    const defaultUserId = CommonUtil.isEmpty(state.loginUser) ? null : state.loginUser['user_id'];
-
-    //검색(엔터)
-	const searchingEnter = (key) => {
-		if (key == 'Enter') {
-			searching();
-		} else {
-			return;
-		}
-	}
-    //검색
-	const searching = () => {
-        if (CommonUtil.isEmpty(state.loginUser) == false
-            && state.loginUser['authority'] == 'ROLE_AGENCY' && isMySenior) {
-            senior.search['agent_id'] = state.loginUser['user_id'];
-        } else {
-            senior.search['agent_id'] = null;
-        }
-		
-		setSenior({...senior});
-
-		seniorSelectList(1);
-	}
-
-    const [isMySenior, setIsMySenior] = React.useState(true);
-    React.useEffect(() => {
-        searching();
-    }, [isMySenior])
-    //보호사(간호사)의 돌봄 대상자(시니어)
-	const [senior, setSenior] = React.useState({seniorList: [], seniorListCount: 0, search: {
-        'government_id': CommonUtil.isEmpty(state.loginUser) ? null : state.loginUser['government_id'],
-        'agency_id': CommonUtil.isEmpty(state.loginUser) ? null : state.loginUser['agency_id'],
-		'searchType': null,
-		'searchText': null,
-		'currentPage': 1,
-		'perPage': 10,
-	}});
-	//보호사(간호사)의 돌봄 대상자(시니어) 목록 조회
-	const seniorSelectList = (currentPage) => {
-		senior.search.currentPage = CommonUtil.isEmpty(currentPage) ? 1 : currentPage;
-
-		fetch("/user/seniorSelectList.json", {
-			method: "POST",
-			headers: {
-				'Content-Type': 'application/json; charset=UTF-8'
-			},
-			body: JSON.stringify(senior.search),
-		}).then((response) => response.json()).then((data) => {
-			data.search = senior.search;
-			console.log("돌봄 대상자(시니어) 목록 조회 : ", data);
-			setSenior(data);
-		}).catch((error) => {
-			console.log('seniorSelectList() /user/seniorSelectList.json error : ', error);
-		});
-	}
-
-
-    //현재 선택한 대상자 정보
-    const [targetSenior, setTargetSenior] = React.useState({'senior_id': null});
-
-    //문진표
-    const [modalOpen, setModalOpen] = React.useState(false);
-    const openModal = (senior) => {
-        targetSenior['senior_id'] = senior['senior_id'];
-        setTargetSenior(senior);
-        questionnaireSelectList();
-
-        setModalOpen(true);
-    };
-    const closeModal = () => {
-        setTargetSenior({'senior_id': null});
-        setModalOpen(false);
-    };
-    //내원기록
-    const [modalOpen2, setModalOpen2] = React.useState(false);
-    const openModal2 = (senior) => {
-        targetSenior['senior_id'] = senior['senior_id'];
-        setTargetSenior(senior);
-        hospitalMedicalRecordSelectList();
-
-        setModalOpen2(true);
-    };
-    const closeModal2 = () => {
-        setTargetSenior({'senior_id': null});
-        setModalOpen2(false);
-    };
-    //심전도
-    const [modalOpen3, setModalOpen3] = React.useState(false);
-    const openModal3 = (senior) => {
-        targetSenior['senior_id'] = senior['senior_id'];
-        setTargetSenior(senior);
-        ecgSelectList();
-
-        setModalOpen3(true);
-    };
-    const closeModal3 = () => {
-        setTargetSenior({'senior_id': null});
-        setModalOpen3(false);
-    };
-    //혈압
-    const [modalOpen4, setModalOpen4] = React.useState(false);
-    const openModal4 = (senior) => {
-        targetSenior['senior_id'] = senior['senior_id'];
-        setTargetSenior(senior);
-        bloodPressureSelectList();
-
-        setModalOpen4(true);
-    };
-    const closeModal4 = () => {
-        setTargetSenior({'senior_id': null});
-        setModalOpen4(false);
-    };
-
-    /****************** 문진표 (시작) ******************/
-    const questionnaireInit = {
-        'senior_id': null,
-        'questionnaire_record_idx': null,
-        'weight_change_amount': 0,
-        'past_history': null,
-        'agent_id': defaultUserId,
-        'medical_record_idx': null,
-
-        'smoke_type': false,
-        'no_smoke_period': null,
-        'smoke_period': null,
-        'daily_smoke_amount': null,
-
-        'drink_type': false,
-        'weekly_drink_amount': null,
-        'onetime_alcoholic_kind': null,
-        'onetime_bottle_amount': null,
-        'onetime_cup_amount': null,
-
-        'exercise_type': false,
-        'weekly_exercise_amount': null,
-        'onetime_exercise_hour': null,
-        'onetime_exercise_minute': null,
-        'onetime_exercise_kind': null,
-
-        'medication_pill': '',
-        'medication_pill_etc': '',
-    };
-    //문진표 정보
-    const [questionnaire, setQuestionnaire] = React.useState({...questionnaireInit});
-    const questionnaireRef = React.useRef({...questionnaireInit});
-
-	//문진표 등록
-	const questionnaireInsert = () => {
-        questionnaire['senior_id'] = targetSenior['senior_id'];
-        questionnaire['agent_id'] = defaultUserId;
-        setQuestionnaire({...questionnaire});
-
-		fetch("/hospital/questionnaireInsert.json", {
-			method: "POST",
-			headers: {
-				'Content-Type': 'application/json; charset=UTF-8'
-			},
-			body: JSON.stringify(questionnaire),
-		}).then((response) => response.json()).then((data) => {
-			console.log("문진표 등록 결과(건수) : ", data);
-			if (data > 0) {
-				alert("저장완료");
-				closeModal();
-			} else {
-				alert("저장에 실패하였습니다. 관리자에게 문의바랍니다.");
-			}
-		}).catch((error) => {
-			console.log('questionnaireInsert() /hospital/questionnaireInsert.json error : ', error);
-		});
-    }
-
-    //문진표 수정
-	const questionnaireUpdate = () => {
-        questionnaire['senior_id'] = targetSenior['senior_id'];
-        questionnaire['agent_id'] = defaultUserId;
-        setQuestionnaire({...questionnaire});
-
-		fetch("/hospital/questionnaireUpdate.json", {
-			method: "POST",
-			headers: {
-				'Content-Type': 'application/json; charset=UTF-8'
-			},
-			body: JSON.stringify(questionnaire),
-		}).then((response) => response.json()).then((data) => {
-			console.log("문진표 수정 결과(건수) : ", data);
-			if (data > 0) {
-				alert("저장완료");
-				closeModal();
-			} else {
-				alert("저장에 실패하였습니다. 관리자에게 문의바랍니다.");
-			}
-		}).catch((error) => {
-			console.log('questionnaireUpdate() /hospital/questionnaireUpdate.json error : ', error);
-		});
-    }
-
-    //문진표 목록 조회
-	const questionnaireSelectList = () => {
-		fetch("/hospital/questionnaireSelectList.json", {
-			method: "POST",
-			headers: {
-				'Content-Type': 'application/json; charset=UTF-8'
-			},
-			body: JSON.stringify(targetSenior),
-		}).then((response) => response.json()).then((data) => {
-			console.log("문진표 목록 조회 결과(건수) : ", data);
-            if (CommonUtil.isEmpty(data.questionnaireList) == false) {
-                let item = data.questionnaireList[0];//최신순으로 가지고오기 때문에, 0 인텍스가 젤 최신
-                if (CommonUtil.isEmpty(item['medication_pill'])) {
-                    item['medication_pill'] = '';
-                } else {
-                    const startCheckWord = '기타「';
-                    const endCheckWord = '」';
-                    if (item['medication_pill'].indexOf(startCheckWord) > -1) {
-                        let startIndex = item['medication_pill'].indexOf(startCheckWord);
-                        let lastIndex = item['medication_pill'].lastIndexOf(endCheckWord);
-                        console.log("000000 item['medication_pill_etc'] : ", item['medication_pill_etc'], "item['medication_pill'] : ", item['medication_pill']);
-                        item['medication_pill_etc'] = item['medication_pill'].substring(startIndex + startCheckWord.length, lastIndex);
-                        let medicationPillFront = item['medication_pill'].substring(0, startIndex + startCheckWord.length);
-                        let medicationPillBack = item['medication_pill'].substring(lastIndex);
-                        item['medication_pill'] = medicationPillFront + medicationPillBack;
-                        console.log("333333 item['medication_pill_etc'] : ", item['medication_pill_etc'], "item['medication_pill'] : ", item['medication_pill']);
-                    } else {
-                        item['medication_pill_etc'] = '';
-                    }
-                }
-                
-                setQuestionnaire(item);
-            }
-		}).catch((error) => {
-			console.log('questionnaireSelectList() /hospital/questionnaireSelectList.json error : ', error);
-		});
-    }
-    /****************** 문진표 (종료) ******************/
-
-
-
-    /****************** 병원 진료 기록 (시작) ******************/
-    const hospitalMedicalRecordInit = {
-        'senior_id': null,
-        'medical_record_idx': null,
-        'medical_date': CommonUtil.getDate(),
-        'medical_reason': '',
-        'medical_content': '',
-        'agent_id': defaultUserId
-    };
-    //병원 진료 기록 정보
-    const [hospitalMedicalRecord, setHospitalMedicalRecord] = React.useState({...hospitalMedicalRecordInit});
-    const hospitalMedicalRecordRef = React.useRef({...hospitalMedicalRecordInit});
-
-    //병원 진료 기록 유효성 검사
-    const hospitalMedicalRecordValidation = () => {
-        const target = hospitalMedicalRecord;
-		const targetRef = hospitalMedicalRecordRef;
-
-		if (CommonUtil.isEmpty(target['medical_date']) == true) {
-			targetRef.current['medical_date'].focus();
-			alert("진료 일자를 선택해 주세요.");
-			return false;
-		}
-		if (CommonUtil.isEmpty(target['medical_reason']) == true) {
-			targetRef.current['medical_reason'].focus();
-			alert("진료 사유를 입력해 주세요.");
-			return false;
-		}
-        if (CommonUtil.isEmpty(target['medical_content']) == true) {
-			targetRef.current['medical_content'].focus();
-			alert("진료 내용을 입력해 주세요.");
-			return false;
-		}
-
-        return true;
-    }
-
-
-	//병원 진료 기록 등록
-	const hospitalMedicalRecordInsert = () => {
-        if (hospitalMedicalRecordValidation() == false) {
-            return;
-        }
-
-        hospitalMedicalRecord['senior_id'] = targetSenior['senior_id'];
-        hospitalMedicalRecord['agent_id'] = defaultUserId;
-        setHospitalMedicalRecord({...hospitalMedicalRecord});
-
-		fetch("/hospital/hospitalMedicalRecordInsert.json", {
-			method: "POST",
-			headers: {
-				'Content-Type': 'application/json; charset=UTF-8'
-			},
-			body: JSON.stringify(hospitalMedicalRecord),
-		}).then((response) => response.json()).then((data) => {
-			console.log("병원 진료 기록 등록 결과(건수) : ", data);
-			if (data > 0) {
-                setHospitalMedicalRecordInit();
-                hospitalMedicalRecordSelectList();
-                //closeModal2();
-				alert("등록완료");
-				
-			} else {
-				alert("등록에 실패하였습니다. 관리자에게 문의바랍니다.");
-			}
-		}).catch((error) => {
-			console.log('hospitalMedicalRecordInsert() /hospital/hospitalMedicalRecordInsert.json error : ', error);
-		});
-    }
-
-    //병원 진료 기록 수정
-	const hospitalMedicalRecordUpdate = () => {
-        if (hospitalMedicalRecordValidation() == false) {
-            return;
-        }
-
-        hospitalMedicalRecord['senior_id'] = targetSenior['senior_id'];
-        hospitalMedicalRecord['agent_id'] = defaultUserId;
-        setHospitalMedicalRecord({...hospitalMedicalRecord});
-
-		fetch("/hospital/hospitalMedicalRecordUpdate.json", {
-			method: "POST",
-			headers: {
-				'Content-Type': 'application/json; charset=UTF-8'
-			},
-			body: JSON.stringify(hospitalMedicalRecord),
-		}).then((response) => response.json()).then((data) => {
-			console.log("병원 진료 기록 수정 결과(건수) : ", data);
-			if (data > 0) {
-                setHospitalMedicalRecordInit();
-                hospitalMedicalRecordSelectList();
-                //closeModal2();
-				alert("수정완료");
-			} else {
-				alert("수정에 실패하였습니다. 관리자에게 문의바랍니다.");
-			}
-		}).catch((error) => {
-			console.log('hospitalMedicalRecordUpdate() /hospital/hospitalMedicalRecordUpdate.json error : ', error);
-		});
-    }
-
-    //병원 진료 기록 삭제
-	const hospitalMedicalRecordDelete = () => {
-        if (confirm('진료 기록을 삭제하시겠습니까?') == false) {
-            return;
-        }
-
-		fetch("/hospital/hospitalMedicalRecordDelete.json", {
-			method: "POST",
-			headers: {
-				'Content-Type': 'application/json; charset=UTF-8'
-			},
-			body: JSON.stringify(hospitalMedicalRecord),
-		}).then((response) => response.json()).then((data) => {
-			console.log("병원 진료 기록 삭제 결과(건수) : ", data);
-			if (data > 0) {
-                setHospitalMedicalRecordInit();
-                hospitalMedicalRecordSelectList();
-                //closeModal2();
-				alert("삭제완료");
-			} else {
-				alert("삭제에 실패하였습니다. 관리자에게 문의바랍니다.");
-			}
-		}).catch((error) => {
-			console.log('hospitalMedicalRecordDelete() /hospital/hospitalMedicalRecordDelete.json error : ', error);
-		});
-    }
-
-    //초기화 취소
-    const setHospitalMedicalRecordInit = () => {
-        setHospitalMedicalRecord({...hospitalMedicalRecordInit});
-    }
-
-    //병원 진료 기록 정보
-    const [hospitalMedicalRecordList, setHospitalMedicalRecordList] = React.useState({hospitalMedicalRecordList: [], hospitalMedicalRecordListCount:0, search: {currentPage: 1, perPage: 5}});
-    //병원 진료 기록 목록 조회
-	const hospitalMedicalRecordSelectList = (currentPage) => {
-        hospitalMedicalRecordList.search.currentPage = CommonUtil.isEmpty(currentPage) ? 1 : currentPage;
-        hospitalMedicalRecordList.search['senior_id'] = targetSenior['senior_id'];
-        setHospitalMedicalRecordList({...hospitalMedicalRecordList});
-
-		fetch("/hospital/hospitalMedicalRecordSelectList.json", {
-			method: "POST",
-			headers: {
-				'Content-Type': 'application/json; charset=UTF-8'
-			},
-			body: JSON.stringify(hospitalMedicalRecordList.search),
-		}).then((response) => response.json()).then((data) => {
-			console.log("병원 진료 기록 목록 조회 결과(건수) : ", data);
-            data.search = hospitalMedicalRecordList.search;
-            setHospitalMedicalRecordList(data);
-		}).catch((error) => {
-			console.log('hospitalMedicalRecordSelectList() /hospital/hospitalMedicalRecordSelectList.json error : ', error);
-		});
-    }
-    /****************** 병원 진료 기록 (종료) ******************/
-
-
-
-    /****************** 심전도 (시작) ******************/
-    const ecgInit = {
-        'senior_id': null,
-        'ecg_record_idx': null,
-        'bradycardia_count': 0,
-        'tachycardia_count': 0,
-        'max_heart_rate': 0.0,
-        'min_heart_rate': 0.0,
-        'abnormal_heart_rate': 0.0,
-        'average_heart_rate': 0.0,
-        'max_rr': 0.0,
-        'min_rr': 0.0,
-        'average_rr': 0.0,
-        'ecg_reading_date': CommonUtil.getDate(),
-        'ecg_finding_type': '',
-        'ecg_finding_content': '',
-        'agent_id': defaultUserId,
-        'medical_record_idx': null,
-        'common_group_file_idx': null,
-        commonFileList: [],//심전도 업로드 파일 목록
-
-        isEdit: false,//직접 수정일 때, true (수정 or 등록 상관없음);
-    };
-    //심전도 정보
-    const [ecg, setEcg] = React.useState({...ecgInit});
-    const ecgRef = React.useRef({...ecgInit});
-
-    //심전도 유효성 검사
-    const ecgValidation = () => {
-        const target = ecg;
-		const targetRef = ecgRef;
-
-		if (CommonUtil.isEmpty(target['ecg_reading_date']) == true) {
-			targetRef.current['ecg_reading_date'].focus();
-			alert("판독 소견 측정 일자를 선택해 주세요.");
-			return false;
-		}
-        if (CommonUtil.isEmpty(target['ecg_finding_type']) == true) {
-			targetRef.current['ecg_finding_type'].focus();
-			alert("판독 소견 측정 종류를 입력해 주세요.");
-			return false;
-		}
-        if (CommonUtil.isEmpty(target['ecg_finding_content']) == true) {
-			targetRef.current['ecg_finding_content'].focus();
-			alert("판독 소견 측정 내용을 입력해 주세요.");
-			return false;
-		}
-        //파일 입력
-		if (target.isEdit == false) {
-            if (CommonUtil.isEmpty(target['commonFileList']) == true) {
-                //targetRef.current['commonFileList'].focus();
-                alert("심전도 측정 파일을 올려주세요.");
-                return false;
-            }
-        } else {//직접 입력
-            if (CommonUtil.isEmpty(target['bradycardia_count']) == true) {
-                targetRef.current['bradycardia_count'].focus();
-                alert("서맥 횟수를 입력해 주세요.");
-                return false;
-            }
-            if (CommonUtil.isEmpty(target['tachycardia_count']) == true) {
-                targetRef.current['tachycardia_count'].focus();
-                alert("빈맥 횟수 입력해 주세요.");
-                return false;
-            }
-            if (CommonUtil.isEmpty(target['max_heart_rate']) == true) {
-                targetRef.current['average_heart_rate'].focus();
-                alert("최대 심박수를 입력해 주세요.");
-                return false;
-            }
-            if (CommonUtil.isEmpty(target['min_heart_rate']) == true) {
-                targetRef.current['average_heart_rate'].focus();
-                alert("최소 심박수를 입력해 주세요.");
-                return false;
-            }
-            if (CommonUtil.isEmpty(target['average_heart_rate']) == true) {
-                targetRef.current['average_heart_rate'].focus();
-                alert("평균 심박수를 입력해 주세요.");
-                return false;
-            }
-            if (CommonUtil.isEmpty(target['abnormal_heart_rate']) == true) {
-                targetRef.current['abnormal_heart_rate'].focus();
-                alert("이상 심박수를 입력해 주세요.");
-                return false;
-            }
-            if (CommonUtil.isEmpty(target['max_rr']) == true) {
-                targetRef.current['max_rr'].focus();
-                alert("최대 R-R를 입력해 주세요.");
-                return false;
-            }
-            if (CommonUtil.isEmpty(target['min_rr']) == true) {
-                targetRef.current['min_rr'].focus();
-                alert("최소 R-R를 입력해 주세요.");
-                return false;
-            }
-            if (CommonUtil.isEmpty(target['average_rr']) == true) {
-                targetRef.current['average_rr'].focus();
-                alert("평균 R-R를 입력해 주세요.");
-                return false;
-            }
-        }
-        
-        return true;
-    }
-
-
-	//심전도 등록
-	const ecgInsert = () => {
-        if (ecgValidation() == false) {
-            return;
-        }
-
-        ecg['senior_id'] = targetSenior['senior_id'];
-        ecg['agent_id'] = defaultUserId;
-        setEcg({...ecg});
-
-		fetch("/hospital/ecgInsert.json", {
-			method: "POST",
-			headers: {
-				'Content-Type': 'application/json; charset=UTF-8'
-			},
-			body: JSON.stringify(ecg),
-		}).then((response) => response.json()).then((data) => {
-			console.log("심전도 등록 결과(건수) : ", data);
-			if (data > 0) {
-                setEcgInit();
-                ecgSelectList();
-                //closeModal3();
-				alert("등록완료");
-				
-			} else {
-				alert("등록에 실패하였습니다. 관리자에게 문의바랍니다.");
-			}
-		}).catch((error) => {
-			console.log('ecgInsert() /hospital/ecgInsert.json error : ', error);
-		});
-    }
-
-    //심전도 수정
-	const ecgUpdate = () => {
-        if (ecgValidation() == false) {
-            return;
-        }
-
-        ecg['senior_id'] = targetSenior['senior_id'];
-        ecg['agent_id'] = defaultUserId;
-        setEcg({...ecg});
-
-		fetch("/hospital/ecgUpdate.json", {
-			method: "POST",
-			headers: {
-				'Content-Type': 'application/json; charset=UTF-8'
-			},
-			body: JSON.stringify(ecg),
-		}).then((response) => response.json()).then((data) => {
-			console.log("심전도 수정 결과(건수) : ", data);
-			if (data > 0) {
-                setEcgInit();
-                ecg.commonFileList = [];
-                setEcg({...ecg});
-                ecgSelectList();
-                //closeModal3();
-				alert("수정완료");
-			} else {
-				alert("수정에 실패하였습니다. 관리자에게 문의바랍니다.");
-			}
-		}).catch((error) => {
-			console.log('ecgUpdate() /hospital/ecgUpdate.json error : ', error);
-		});
-    }
-
-    //심전도 삭제
-	const ecgDelete = () => {
-        if (confirm('심전도 판독 소견을 삭제하시겠습니까?') == false) {
-            return;
-        }
-
-		fetch("/hospital/ecgDelete.json", {
-			method: "POST",
-			headers: {
-				'Content-Type': 'application/json; charset=UTF-8'
-			},
-			body: JSON.stringify(ecg),
-		}).then((response) => response.json()).then((data) => {
-			console.log("심전도 삭제 결과(건수) : ", data);
-			if (data > 0) {
-                setEcgInit();
-                ecg.commonFileList = [];
-                setEcg({...ecg});
-                ecgSelectList();
-                //closeModal3();
-				alert("삭제완료");
-			} else {
-				alert("삭제에 실패하였습니다. 관리자에게 문의바랍니다.");
-			}
-		}).catch((error) => {
-			console.log('ecgDelete() /hospital/ecgDelete.json error : ', error);
-		});
-    }
-
-    //초기화 취소
-    const setEcgInit = () => {
-        setEcg({...ecgInit});
-    }
-
-    //심전도 정보
-    const [ecgList, setEcgList] = React.useState({ecgList: [], ecgListCount:0, search: {currentPage: 1, perPage: 5}});
-    //심전도 목록 조회
-	const ecgSelectList = (currentPage) => {
-        ecgList.search.currentPage = CommonUtil.isEmpty(currentPage) ? 1 : currentPage;
-        ecgList.search['senior_id'] = targetSenior['senior_id'];
-        setEcgList({...ecgList});
-
-		fetch("/hospital/ecgSelectList.json", {
-			method: "POST",
-			headers: {
-				'Content-Type': 'application/json; charset=UTF-8'
-			},
-			body: JSON.stringify(ecgList.search),
-		}).then((response) => response.json()).then((data) => {
-			console.log("심전도 목록 조회 결과(건수) : ", data);
-            data.search = ecgList.search;
-            setEcgList(data);
-		}).catch((error) => {
-			console.log('ecgSelectList() /hospital/ecgSelectList.json error : ', error);
-		});
-    }
-    /****************** 심전도 기록 (종료) ******************/
-
-
-
-    /****************** 혈압 (시작) ******************/
-    const bloodPressureInit = {
-        'senior_id': null,
-        'blood_pressure_record_idx': null,
-        'max_blood_pressure': null,
-        'min_blood_pressure': null,
-        'pulse_rate': null,
-        'medical_record_idx': null,
-        'blood_pressure_record_date': CommonUtil.getDate(),
-        'agent_id': defaultUserId
-    };
-    //혈압 정보
-    const [bloodPressure, setBloodPressure] = React.useState({...bloodPressureInit});
-    const bloodPressureRef = React.useRef({...bloodPressureInit});
-
-    //혈압 유효성 검사
-    const bloodPressureValidation = () => {
-        const target = bloodPressure;
-		const targetRef = bloodPressureRef;
-
-		if (CommonUtil.isEmpty(target['blood_pressure_record_date']) == true) {
-			targetRef.current['blood_pressure_record_date'].focus();
-			alert("진료 일자를 선택해 주세요.");
-			return false;
-		}
-		if (CommonUtil.isEmpty(target['max_blood_pressure']) == true) {
-			targetRef.current['max_blood_pressure'].focus();
-			alert("최고 혈압을 입력해 주세요.");
-			return false;
-		}
-        if (CommonUtil.isEmpty(target['min_blood_pressure']) == true) {
-			targetRef.current['min_blood_pressure'].focus();
-			alert("최저 혈압을 입력해 주세요.");
-			return false;
-		}
-        if (CommonUtil.isEmpty(target['pulse_rate']) == true) {
-			targetRef.current['pulse_rate'].focus();
-			alert("맥박수를 입력해 주세요.");
-			return false;
-		}
-
-        return true;
-    }
-
-
-	//혈압 등록
-	const bloodPressureInsert = () => {
-        if (bloodPressureValidation() == false) {
-            return;
-        }
-
-        bloodPressure['senior_id'] = targetSenior['senior_id'];
-        bloodPressure['agent_id'] = defaultUserId;
-        setBloodPressure({...bloodPressure});
-
-		fetch("/hospital/bloodPressureInsert.json", {
-			method: "POST",
-			headers: {
-				'Content-Type': 'application/json; charset=UTF-8'
-			},
-			body: JSON.stringify(bloodPressure),
-		}).then((response) => response.json()).then((data) => {
-			console.log("혈압 등록 결과(건수) : ", data);
-			if (data > 0) {
-                setBloodPressureInit();
-                bloodPressureSelectList();
-                //closeModal2();
-				alert("등록완료");
-				
-			} else {
-				alert("등록에 실패하였습니다. 관리자에게 문의바랍니다.");
-			}
-		}).catch((error) => {
-			console.log('bloodPressureInsert() /hospital/bloodPressureInsert.json error : ', error);
-		});
-    }
-
-    //혈압 수정
-	const bloodPressureUpdate = () => {
-        if (bloodPressureValidation() == false) {
-            return;
-        }
-
-        bloodPressure['senior_id'] = targetSenior['senior_id'];
-        bloodPressure['agent_id'] = defaultUserId;
-        setBloodPressure({...bloodPressure});
-
-		fetch("/hospital/bloodPressureUpdate.json", {
-			method: "POST",
-			headers: {
-				'Content-Type': 'application/json; charset=UTF-8'
-			},
-			body: JSON.stringify(bloodPressure),
-		}).then((response) => response.json()).then((data) => {
-			console.log("혈압 수정 결과(건수) : ", data);
-			if (data > 0) {
-                setBloodPressureInit();
-                bloodPressureSelectList();
-                //closeModal2();
-				alert("수정완료");
-			} else {
-				alert("수정에 실패하였습니다. 관리자에게 문의바랍니다.");
-			}
-		}).catch((error) => {
-			console.log('bloodPressureUpdate() /hospital/bloodPressureUpdate.json error : ', error);
-		});
-    }
-
-    //혈압 삭제
-	const bloodPressureDelete = () => {
-        if (confirm('혈압 측정 정보를 삭제하시겠습니까?') == false) {
-            return;
-        }
-
-		fetch("/hospital/bloodPressureDelete.json", {
-			method: "POST",
-			headers: {
-				'Content-Type': 'application/json; charset=UTF-8'
-			},
-			body: JSON.stringify(bloodPressure),
-		}).then((response) => response.json()).then((data) => {
-			console.log("혈압 삭제 결과(건수) : ", data);
-			if (data > 0) {
-                setBloodPressureInit();
-                bloodPressureSelectList();
-                //closeModal2();
-				alert("삭제완료");
-			} else {
-				alert("삭제에 실패하였습니다. 관리자에게 문의바랍니다.");
-			}
-		}).catch((error) => {
-			console.log('bloodPressureDelete() /hospital/bloodPressureDelete.json error : ', error);
-		});
-    }
-
-    //초기화 취소
-    const setBloodPressureInit = () => {
-        setBloodPressure({...bloodPressureInit});
-    }
-
-    //혈압 정보
-    const [bloodPressureList, setBloodPressureList] = React.useState({bloodPressureList: [], bloodPressureListCount:0, search: {currentPage: 1, perPage: 5}});
-    //혈압 목록 조회
-	const bloodPressureSelectList = (currentPage) => {
-        bloodPressureList.search.currentPage = CommonUtil.isEmpty(currentPage) ? 1 : currentPage;
-        bloodPressureList.search['senior_id'] = targetSenior['senior_id'];
-        setBloodPressureList({...bloodPressureList});
-
-		fetch("/hospital/bloodPressureSelectList.json", {
-			method: "POST",
-			headers: {
-				'Content-Type': 'application/json; charset=UTF-8'
-			},
-			body: JSON.stringify(bloodPressureList.search),
-		}).then((response) => response.json()).then((data) => {
-			console.log("혈압 목록 조회 결과(건수) : ", data);
-            data.search = bloodPressureList.search;
-            setBloodPressureList(data);
-		}).catch((error) => {
-			console.log('bloodPressureSelectList() /hospital/bloodPressureSelectList.json error : ', error);
-		});
-    }
-    /****************** 혈압 (종료) ******************/
-
-    React.useEffect(() => {
-        searching();
-    }, []);
-
-
-    //현재 탭 Index
-	const [tabIndex, setTabIndex] = React.useState(0);
-	//탭 초기화
-	const tab = [{
-		title: `문진표관리`,
-		content: (
-			<div>
-				<div className="flex equip-tab">
-					<SubTitle explanation={"돌봄 대상자의 병원 내원 기록 및 문진표를 관리할 수 있습니다."} />
-				</div>
-				<table className={"protector-user"}>
-					<thead>
-						<tr>
-							<th>No</th>
-                            <th>소속기관명</th>
-							<th>이름</th>
-							<th>생년월일</th>
-							<th>성별</th>
-							<th>연락처</th>
-							<th>문진표관리</th>
-                            <th>내원기록관리</th>
-						</tr>
-					</thead>
-					<tbody>
-						{senior.seniorList.map((item, idx) => { return (
-						<tr key={idx}>
-							<td data-label="No">{senior.seniorListCount - idx - (senior.search.currentPage - 1) * senior.search.perPage}</td>
-							<td data-label="소속기관명">{item['agency_name']}</td>
-							<td data-label="이름">{item['user_name']}</td>
-							<td data-label="생년월일">{item['user_birth']}</td>
-							<td data-label="성별">{item['user_gender']}</td>
-							<td data-label="연락처">{item['user_phonenumber']}</td>
-							<td data-label="문진표관리">
-                                <button className="btn-small gray-btn" onClick={() => openModal(item)}>작성하기</button>
-							</td>
-							<td data-label="내원기록관리">
-								<button className="btn-small gray-btn" onClick={() => openModal2(item)}>작성하기</button>
-							</td>
-						</tr>
-						)})}
-						{CommonUtil.isEmpty(senior.seniorList) ?
-						<tr>
-							<td colSpan={8}>조회된 데이터가 없습니다</td>
-						</tr>  
-						: null}
-					</tbody>
-				</table>
-				<Pagination
-					currentPage={senior.search.currentPage}
-					perPage={senior.search.perPage}
-					totalCount={senior.seniorListCount}
-					maxRange={5}
-					click={seniorSelectList}
-				/>
-			</div>
-		)
-	}, {
-		title: `심전도관리`,
-		content: (
-			<div>
-				<div className="flex equip-tab">
-					<SubTitle explanation={"돌봄 대상자의 심전도 정보를 관리할 수 있습니다."} />
-				</div>
-				<table className={"protector-user"}>
-					<thead>
-						<tr>
-							<th>No</th>
-                            <th>소속기관명</th>
-							<th>이름</th>
-							<th>생년월일</th>
-							<th>성별</th>
-							<th>연락처</th>
-							<th>심전도관리</th>
-						</tr>
-					</thead>
-					<tbody>
-						{senior.seniorList.map((item, idx) => { return (
-						<tr key={idx}>
-							<td data-label="No">{senior.seniorListCount - idx - (senior.search.currentPage - 1) * senior.search.perPage}</td>
-							<td data-label="소속기관명">{item['agency_name']}</td>
-							<td data-label="이름">{item['user_name']}</td>
-							<td data-label="생년월일">{item['user_birth']}</td>
-							<td data-label="성별">{item['user_gender']}</td>
-							<td data-label="연락처">{item['user_phonenumber']}</td>
-							<td data-label="심전도관리">
-                                <button className="btn-small gray-btn" onClick={() => openModal3(item)}>심전도관리</button>
-							</td>
-						</tr>
-						)})}
-						{CommonUtil.isEmpty(senior.seniorList) ?
-						<tr>
-							<td colSpan={7}>조회된 데이터가 없습니다</td>
-						</tr>  
-						: null}
-					</tbody>
-				</table>
-				<Pagination
-					currentPage={senior.search.currentPage}
-					perPage={senior.search.perPage}
-					totalCount={senior.seniorListCount}
-					maxRange={5}
-					click={seniorSelectList}
-				/>
-			</div>
-		)
-	}, {
-		title: `혈압관리`,
-		content: (
-			<div>
-				<div className="flex equip-tab">
-					<SubTitle explanation={"돌봄 대상자의 혈압 정보를 관리할 수 있습니다."} />
-				</div>
-                <table className={"protector-user"}>
-					<thead>
-						<tr>
-							<th>No</th>
-                            <th>소속기관명</th>
-							<th>이름</th>
-							<th>생년월일</th>
-							<th>성별</th>
-							<th>연락처</th>
-							<th>혈압관리</th>
-						</tr>
-					</thead>
-					<tbody>
-						{senior.seniorList.map((item, idx) => { return (
-						<tr key={idx}>
-							<td data-label="No">{senior.seniorListCount - idx - (senior.search.currentPage - 1) * senior.search.perPage}</td>
-							<td data-label="소속기관명">{item['agency_name']}</td>
-							<td data-label="이름">{item['user_name']}</td>
-							<td data-label="생년월일">{item['user_birth']}</td>
-							<td data-label="성별">{item['user_gender']}</td>
-							<td data-label="연락처">{item['user_phonenumber']}</td>
-							<td data-label="혈압관리">
-                                <button className="btn-small gray-btn" onClick={() => openModal4(item)}>혈압관리</button>
-							</td>
-						</tr>
-						)})}
-						{CommonUtil.isEmpty(senior.seniorList) ?
-						<tr>
-							<td colSpan={7}>조회된 데이터가 없습니다</td>
-						</tr>  
-						: null}
-					</tbody>
-				</table>
-				<Pagination
-					currentPage={senior.search.currentPage}
-					perPage={senior.search.perPage}
-					totalCount={senior.seniorListCount}
-					maxRange={5}
-					click={seniorSelectList}
-				/>
-			</div>
-		)
-	}];
-
-    return (
-        <main>
-
-            {/* <Modal_Questionnaire open={modalOpen} close={closeModal} /> */}
-            {/* <Modal_MedicalHistory open={modalOpen2} close={closeModal2} /> */}
-            {/* <Modal_ECG open={modalOpen3} close={closeModal3} /> */}
-            {/* <Modal_Blood open={modalOpen4} close={closeModal4} /> */}
-
-            <div className="search-management flex-start margin-bottom2">
-                <select style={{maxWidth: '150px'}}
-                    onChange={(e) => {senior.search.searchType = e.target.value; setSenior({...senior});}}>
-                    <option value="" selected={CommonUtil.isEmpty(senior.search.searchType)}>전체</option>
-                    <option value="user_name" selected={senior.search.searchType == 'user_name'}>이름</option>
-                    <option value="user_id" selected={senior.search.searchType == 'user_id'}>아이디</option>
-                    <option value="user_phonenumber" selected={senior.search.searchType == 'user_phonenumber'}>연락처</option>
-                </select>
-                <input type="text" className="senior-search" value={senior.search.searchText}
-                    onChange={(e) => {senior.search.searchText = e.target.value; setSenior({...senior});}}
-                    onKeyUp={(e) => searchingEnter(e.key)}/>
-                <button className="btn-small gray-btn" onClick={searching}>검색</button>
-            </div>
-
-            <div className="content-wrap">
-                <DetailTitle contentTitle={"대상자의 문진표 / 심전도 / 혈압 관리를 할 수 있습니다."} />
-
-                <div style={{ height: "calc(100% - 61px)" }}>
-                    <div className="right" style={{ height: "100%", }}>
-                        <div style={{ height: "100%" }}>
-                            <div className="tab-container" style={{ marginTop: "5rem"}}>
-                                {/* {CommonUtil.isEmpty(state.loginUser) == false && state.loginUser['authority'] == 'ROLE_AGENCY' ?
-                                <div className="flex-end margin-bottom">
-                                    <div className="flex searchselect" style={{width: 'auto'}}>
-
-                                        <input type="radio" id="my_senior" name="senior" checked={isMySenior}
-                                            onChange={(e) => {e.target.checked ? setIsMySenior(true) : null}}/>
-                                        <label for="my_senior" style={{marginRight: '3rem'}}>나의 대상자 보기</label>
-
-                                        <input type="radio" id="all_senior" name="senior" checked={!isMySenior}
-                                            onChange={(e) => {e.target.checked ? setIsMySenior(false) : null}}/>
-                                        <label for="all_senior" style={{marginRight: '0'}}>전체 대상자 보기</label>
-
-                                    </div>
-                                </div>
-                                :null} */}
-                                <ul className="tab-menu flex-end">
-                                    {tab.map((item, idx) => { return (
-                                    <li onClick={() => setTabIndex(idx)} className={idx == tabIndex ? 'active' : null}>
-                                        {item.title}
-                                    </li>
-                                    )})}
-                                </ul>
-                                <div className="content-wrap userlist">                                    
-                                    
-                                    <ul className="tab-content">
-                                        <li>
-                                            {tab[tabIndex].content}
-                                        </li>
-                                    </ul>
-                                </div>
-                            </div>
-                        </div>
-                    </div>
-                </div>
-            </div>
-
-
-            <Modal open={modalOpen} close={closeModal} header="문진표 작성">
-                <div className="board-wrap">        
-                    <div>
-                        <table className="margin-bottom2  questionnaire-table">
-                            <tr>
-                                <th>흡연을 하십니까?</th>
-                                <td className="flex-start">
-                                    <input type="radio" name="smoke" id="smoke-true"
-                                        checked={questionnaire['smoke_type'] == true}
-                                        onChange={(e) => {
-                                            if (e.target.checked) {
-                                                questionnaire['smoke_type'] = true;
-                                                setQuestionnaire({...questionnaire});
-                                            }}
-                                        }
-                                    />
-                                    <label for="smoke-true">예</label>
-                                    <input type="radio" name="smoke" id="smoke-false"
-                                        checked={questionnaire['smoke_type'] == false}
-                                        onChange={(e) => {
-                                            if (e.target.checked) {
-                                                questionnaire['smoke_type'] = false;
-                                                setQuestionnaire({...questionnaire});
-                                            }}
-                                        }
-                                    />
-                                    <label for="smoke-false">아니요</label>
-                                </td>              
-                            </tr>
-                            <tr>
-                                <th>음주를 하십니까?</th>
-                                <td className="flex-start">
-                                    <input type="radio" name="drink" id="drink-true"
-                                        checked={questionnaire['drink_type'] == true}
-                                        onChange={(e) => {
-                                            if (e.target.checked) {
-                                                questionnaire['drink_type'] = true;
-                                                setQuestionnaire({...questionnaire});
-                                            }}
-                                        }
-                                    />
-                                    <label for="drink-true">예</label>
-                                    <input type="radio" name="drink" id="drink-false"
-                                        checked={questionnaire['drink_type'] == false}
-                                        onChange={(e) => {
-                                            if (e.target.checked) {
-                                                questionnaire['drink_type'] = false;
-                                                setQuestionnaire({...questionnaire});
-                                            }}
-                                        }
-                                    />
-                                    <label for="drink-false">아니요</label>
-                                </td>              
-                            </tr>
-                            <tr>
-                                <th>일주일에 운동을 몇회 하십니까?</th>
-                                <td className="flex-start">
-                                    <input type="radio" name="exercise" id="exercise-false"
-                                        checked={questionnaire['exercise_type'] == false}
-                                        onChange={(e) => {
-                                            if (e.target.checked) {
-                                                questionnaire['exercise_type'] = false;
-                                                setQuestionnaire({...questionnaire});
-                                            }}
-                                        }
-                                    />
-                                    <label for="exercise-false">안함</label>
-
-                                    <input type="radio" name="exercise" id="exercise-1"
-                                        checked={questionnaire['exercise_type'] == true && questionnaire['weekly_exercise_amount'] == 1}
-                                        onChange={(e) => {
-                                            if (e.target.checked) {
-                                                questionnaire['exercise_type'] = true;
-                                                questionnaire['weekly_exercise_amount'] = 1;
-                                                setQuestionnaire({...questionnaire});
-                                            }}
-                                        }
-                                    />
-                                    <label for="exercise-1">1회</label>
-
-                                    <input type="radio" name="exercise" id="exercise-2"
-                                        checked={questionnaire['exercise_type'] == true && questionnaire['weekly_exercise_amount'] == 2}
-                                        onChange={(e) => {
-                                            if (e.target.checked) {
-                                                questionnaire['exercise_type'] = true;
-                                                questionnaire['weekly_exercise_amount'] = 2;
-                                                setQuestionnaire({...questionnaire});
-                                            }}
-                                        }
-                                    />
-                                    <label for="exercise-2">2회</label>
-
-                                    <input type="radio" name="exercise" id="exercise-3"
-                                        checked={questionnaire['exercise_type'] == true && questionnaire['weekly_exercise_amount'] == 3}
-                                        onChange={(e) => {
-                                            if (e.target.checked) {
-                                                questionnaire['exercise_type'] = true;
-                                                questionnaire['weekly_exercise_amount'] = 3;
-                                                setQuestionnaire({...questionnaire});
-                                            }}
-                                        }
-                                    />
-                                    <label for="exercise-3">3회</label>
-
-                                    <input type="radio" name="exercise" id="exercise-4"
-                                        checked={questionnaire['exercise_type'] == true && questionnaire['weekly_exercise_amount'] == 4}
-                                        onChange={(e) => {
-                                            if (e.target.checked) {
-                                                questionnaire['exercise_type'] = true;
-                                                questionnaire['weekly_exercise_amount'] = 4;
-                                                setQuestionnaire({...questionnaire});
-                                            }}
-                                        }
-                                    />
-                                    <label for="exercise-4">4회</label>
-
-                                    <input type="radio" name="exercise" id="exercise-5"
-                                        checked={questionnaire['exercise_type'] == true && questionnaire['weekly_exercise_amount'] == 5}
-                                        onChange={(e) => {
-                                            if (e.target.checked) {
-                                                questionnaire['exercise_type'] = true;
-                                                questionnaire['weekly_exercise_amount'] = 5;
-                                                setQuestionnaire({...questionnaire});
-                                            }}
-                                        }
-                                    />
-                                    <label for="exercise-5">5회</label>
-
-                                    <input type="radio" name="exercise" id="exercise-6"
-                                        checked={questionnaire['exercise_type'] == true && questionnaire['weekly_exercise_amount'] == 6}
-                                        onChange={(e) => {
-                                            if (e.target.checked) {
-                                                questionnaire['exercise_type'] = true;
-                                                questionnaire['weekly_exercise_amount'] = 6;
-                                                setQuestionnaire({...questionnaire});
-                                            }}
-                                        }
-                                    />
-                                    <label for="exercise-6">6회</label>
-
-                                    <input type="radio" name="exercise" id="exercise-7"
-                                        checked={questionnaire['exercise_type'] == true && questionnaire['weekly_exercise_amount'] == 7}
-                                        onChange={(e) => {
-                                            if (e.target.checked) {
-                                                questionnaire['exercise_type'] = true;
-                                                questionnaire['weekly_exercise_amount'] = 7;
-                                                setQuestionnaire({...questionnaire});
-                                            }}
-                                        }
-                                    />
-                                    <label for="exercise-7">매일</label>
-                                </td>
-                            </tr>
-                            <tr>
-                                <th>최근 3개월 동안 갑작스런 체중 변화가 있었습니까?</th>
-                                <td className="flex-start">
-                                    <input type="radio" name="weight" id="weight-up"
-                                        checked={questionnaire['weight_change_amount'] == 1}
-                                        onChange={(e) => {
-                                            if (e.target.checked) {
-                                                questionnaire['weight_change_amount'] = 1;
-                                                setQuestionnaire({...questionnaire});
-                                            }}
-                                        }
-                                    />
-                                    <label for="weight-up">예 - 증가</label>
-
-                                    <input type="radio" name="weight" id="weight-down"
-                                        checked={questionnaire['weight_change_amount'] == -1}
-                                        onChange={(e) => {
-                                            if (e.target.checked) {
-                                                questionnaire['weight_change_amount'] = -1;
-                                                setQuestionnaire({...questionnaire});
-                                            }}
-                                        }
-                                    />
-                                    <label for="weight-down">예 - 감소</label>
-
-                                    <input type="radio" name="weight" id="weight-false"
-                                        checked={questionnaire['weight_change_amount'] == 0}
-                                        onChange={(e) => {
-                                            if (e.target.checked) {
-                                                questionnaire['weight_change_amount'] = 0;
-                                                setQuestionnaire({...questionnaire});
-                                            }}
-                                        }
-                                    />
-                                    <label for="weight-false">아니요</label>
-                                </td>   
-                            </tr>
-                            <tr>
-                                <th>현재 복용중인 약이 있으면 체크를 해주세요.</th>
-                                <td className="flex-start">
-
-                                    <input type="checkbox" name="pills" id="pills-1"
-                                        checked={questionnaire['medication_pill'].indexOf('아스피린(항혈소판제)') > -1}
-                                        onChange={(e) => {
-                                            if (e.target.checked) {
-                                                questionnaire['medication_pill'] += '아스피린(항혈소판제),';
-                                                setQuestionnaire({...questionnaire});
-                                            } else {
-                                                questionnaire['medication_pill'] = questionnaire['medication_pill'].replace('아스피린(항혈소판제),', '');
-                                                setQuestionnaire({...questionnaire});
-                                            }}
-                                        }
-                                    />
-                                    <label for="pills-1">아스피린(항혈소판제)</label>
-
-                                    <input type="checkbox" name="pills" id="pills-2"
-                                        checked={questionnaire['medication_pill'].indexOf('당뇨약') > -1}
-                                        onChange={(e) => {
-                                            if (e.target.checked) {
-                                                questionnaire['medication_pill'] += '당뇨약,';
-                                                setQuestionnaire({...questionnaire});
-                                            } else {
-                                                questionnaire['medication_pill'] = questionnaire['medication_pill'].replace('당뇨약,', '');
-                                                setQuestionnaire({...questionnaire});
-                                            }}
-                                        }
-                                    />
-                                    <label for="pills-2">당뇨약</label>
-
-                                    <input type="checkbox" name="pills" id="pills-3"
-                                        checked={questionnaire['medication_pill'].indexOf('고혈압약') > -1}
-                                        onChange={(e) => {
-                                            if (e.target.checked) {
-                                                questionnaire['medication_pill'] += '고혈압약,';
-                                                setQuestionnaire({...questionnaire});
-                                            } else {
-                                                questionnaire['medication_pill'] = questionnaire['medication_pill'].replace('고혈압약,', '');
-                                                setQuestionnaire({...questionnaire});
-                                            }}
-                                        }
-                                    />
-                                    <label for="pills-3">고혈압약</label>
-
-                                    <input type="checkbox" name="pills" id="pills-etc"
-                                        checked={questionnaire['medication_pill'].indexOf('기타「」,') > -1}
-                                        onChange={(e) => {
-                                            if (e.target.checked) {
-                                                questionnaire['medication_pill'] += '기타「」,';
-                                                setQuestionnaire({...questionnaire});
-                                            } else {
-                                                questionnaire['medication_pill'] = questionnaire['medication_pill'].replace('기타「」,', '');
-                                                questionnaire['medication_pill_etc'] = '';
-                                                setQuestionnaire({...questionnaire});
-                                            }}
-                                        }
-                                    />
-                                    <label for="pills-etc">기타</label>
-                                    <input type="text" style={{width: 'max-content', marginLeft: '1rem'}}
-                                        disabled={questionnaire['medication_pill'].indexOf('기타「」,') == -1}
-                                        value={questionnaire['medication_pill_etc']}
-                                        onChange={(e) => {
-                                            questionnaire['medication_pill_etc'] = e.target.value;
-                                            setQuestionnaire({...questionnaire});
-                                        }}
-                                    />
-
-                                </td>              
-                            </tr>
-                        </table>
-                    </div>
-                    <div className="flex-center">
-                        {CommonUtil.isEmpty(questionnaire['questionnaire_record_idx'])
-                            ? <button className="btn-small red-btn" onClick={questionnaireInsert}>저장</button>
-                            : <button className="btn-small red-btn" onClick={questionnaireUpdate}>저장</button>
-                        }
-                    </div>
-                </div>
-			</Modal>
-
-
-            <Modal open={modalOpen2} close={closeModal2} header="내원기록 관리 및 조회">
-                <div className="board-wrap">
-                    <table className="margin-bottom2 senior-insert ">
-                        <tr>
-                            <th>진료 일자</th>
-                            <td>
-                                <input type="date"
-                                    value={hospitalMedicalRecord['medical_date']}
-                                    onChange={(e) => {
-                                        hospitalMedicalRecord['medical_date'] = e.target.value;
-                                        setHospitalMedicalRecord({...hospitalMedicalRecord});
-                                    }}
-                                    ref={el => hospitalMedicalRecordRef.current['medical_date'] = el}
-                                />
-                            </td>              
-                        </tr>
-                        <tr>
-                            <th>진료 사유</th>
-                            <td className="flex-start ">
-                                <input type="text"
-                                    value={hospitalMedicalRecord['medical_reason']}
-                                    onChange={(e) => {
-                                        hospitalMedicalRecord['medical_reason'] = e.target.value;
-                                        setHospitalMedicalRecord({...hospitalMedicalRecord});
-                                    }}
-                                    ref={el => hospitalMedicalRecordRef.current['medical_reason'] = el}
-                                />
-                            </td>              
-                        </tr>
-                        <tr>
-                            <th>진료 내용</th>
-                            <td colSpan={3}>
-                                <textarea className="medicine" cols="30" rows="2"
-                                    value={hospitalMedicalRecord['medical_content']}
-                                    onChange={(e) => {
-                                        hospitalMedicalRecord['medical_content'] = e.target.value;
-                                        setHospitalMedicalRecord({...hospitalMedicalRecord});
-                                    }}
-                                    ref={el => hospitalMedicalRecordRef.current['medical_content'] = el}
-                                ></textarea>
-                            </td>
-                        </tr>         
-                    </table>
-                    <div className="btn-wrap flex-center margin-bottom5">
-                        {CommonUtil.isEmpty(hospitalMedicalRecord['medical_record_idx'])
-                            ? <button className="btn-small red-btn" onClick={hospitalMedicalRecordInsert}>등록</button>
-                            
-                            : <>
-                                <button className="btn-small gray-btn" onClick={setHospitalMedicalRecordInit}>수정취소</button>
-                                <button className="btn-small red-btn" onClick={hospitalMedicalRecordUpdate}>수정</button>
-                                <button className="btn-small red-btn" onClick={hospitalMedicalRecordDelete}>삭제</button>
-                            </>
-                        }
-                    </div>
-                    <div>
-                        <table className="caregiver-user senior-insert  senior-table">
-                            <thead>
-                                <tr>
-                                    <th>No</th>
-                                    <th>진료 일자</th>
-                                    <th>진료 사유</th>
-                                    <th>진료 내용</th>
-                                    <th>기록 작성자</th>
-                                </tr>
-                            </thead>
-                            <tbody>
-                                {hospitalMedicalRecordList.hospitalMedicalRecordList.map((item, idx) => { return (
-                                <tr key={idx} onClick={() => {setHospitalMedicalRecord(item)}}>
-                                    <td data-label="No">{hospitalMedicalRecordList.hospitalMedicalRecordListCount - idx - (hospitalMedicalRecordList.search.currentPage - 1) * hospitalMedicalRecordList.search.perPage}</td>
-                                    <td data-label="진료 일자">{item['medical_date']}</td>
-                                    <td data-label="진료 내용">{item['medical_reason']}</td>
-                                    <td data-label="진료 사유">{item['medical_content']}</td>
-                                    <td data-label="기록 작성자">{item['insert_user_name']}</td>
-                                </tr>
-                                )})}
-                                {CommonUtil.isEmpty(hospitalMedicalRecordList.hospitalMedicalRecordList) ?
-                                <tr>
-                                    <td colSpan={5}>조회된 데이터가 없습니다</td>
-                                </tr>  
-                                : null}
-                            </tbody>
-                        </table>
-                        <Pagination
-                            currentPage={hospitalMedicalRecordList.search.currentPage}
-                            perPage={hospitalMedicalRecordList.search.perPage}
-                            totalCount={hospitalMedicalRecordList.hospitalMedicalRecordListCount}
-                            maxRange={5}
-                            click={hospitalMedicalRecordSelectList}
-                        />
-                    </div>
-                </div>
-            </Modal>
-
-
-            <Modal open={modalOpen3} close={closeModal3} header="심전도판독소견 관리 및 조회">
-                <div className="board-wrap">
-                    <table className="margin-bottom2 senior-insert ">
-                        <tr>
-                            <th>측정 일자</th>
-                            <td colSpan={5}>
-                                <input type="date" value={ecg['ecg_reading_date']}
-                                    onChange={(e) => {
-                                        ecg['ecg_reading_date'] = e.target.value;
-                                        setEcg({...ecg});
-                                    }}
-                                    ref={el => ecgRef.current['ecg_reading_date'] = el}
-                                />
-                            </td>              
-                        </tr>
-                        <tr>
-                            <th>판독 소견 종류</th>
-                            <td colSpan={5}>
-                                <input type="text" value={ecg['ecg_finding_type']}
-                                    onChange={(e) => {
-                                        ecg['ecg_finding_type'] = e.target.value;
-                                        setEcg({...ecg});
-                                    }}
-                                    ref={el => ecgRef.current['ecg_finding_type'] = el}
-                                />
-                            </td>              
-                        </tr>
-                        <tr>
-                            <th>판독 소견 내용</th>
-                            <td colSpan={5}>
-                                <textarea className="medicine" cols="30" rows="2"
-                                    value={ecg['ecg_finding_content']}
-                                    onChange={(e) => {
-                                        ecg['ecg_finding_content'] = e.target.value;
-                                        setEcg({...ecg});
-                                    }}
-                                    ref={el => ecgRef.current['ecg_finding_content'] = el}
-                                ></textarea>
-                            </td>              
-                        </tr>
-                        {ecg.isEdit == false
-                        ? <tr>
-                            <th>측정 파일</th>
-                            <td colSpan={5}>
-                                <CommonFile commonFileList={ecg['commonFileList']} multiple={false} accept={'.dat, .ecg'}/>
-                            </td>              
-                        </tr>
-                        : <>
-                            <tr>
-                                <th>서맥 횟수</th>
-                                <td>
-                                    <input type="number" value={ecg['bradycardia_count']}
-                                        onChange={(e) => {
-                                            ecg['bradycardia_count'] = e.target.value;
-                                            setEcg({...ecg});
-                                        }}
-                                        ref={el => ecgRef.current['bradycardia_count'] = el}
-                                    />
-                                </td>
-                                <th>빈맥 횟수</th>
-                                <td>
-                                    <input type="number" value={ecg['tachycardia_count']}
-                                        onChange={(e) => {
-                                            ecg['tachycardia_count'] = e.target.value;
-                                            setEcg({...ecg});
-                                        }}
-                                        ref={el => ecgRef.current['tachycardia_count'] = el}
-                                    />
-                                </td>
-                                <th>이상 심박수</th>
-                                <td>
-                                    <input type="number" value={ecg['abnormal_heart_rate']}
-                                        onChange={(e) => {
-                                            ecg['abnormal_heart_rate'] = e.target.value;
-                                            setEcg({...ecg});
-                                        }}
-                                        ref={el => ecgRef.current['abnormal_heart_rate'] = el}
-                                    />
-                                </td>
-                            </tr>
-                            <tr>
-                                <th>최대 심박수</th>
-                                <td>
-                                    <input type="number" value={ecg['max_heart_rate']}
-                                        onChange={(e) => {
-                                            ecg['max_heart_rate'] = e.target.value;
-                                            setEcg({...ecg});
-                                        }}
-                                        ref={el => ecgRef.current['max_heart_rate'] = el}
-                                    />
-                                </td>
-                                <th>최소 심박수</th>
-                                <td>
-                                    <input type="number" value={ecg['min_heart_rate']}
-                                        onChange={(e) => {
-                                            ecg['min_heart_rate'] = e.target.value;
-                                            setEcg({...ecg});
-                                        }}
-                                        ref={el => ecgRef.current['min_heart_rate'] = el}
-                                    />
-                                </td>
-                                <th>평균 심박수</th>
-                                <td>
-                                    <input type="number" value={ecg['average_heart_rate']}
-                                        onChange={(e) => {
-                                            ecg['average_heart_rate'] = e.target.value;
-                                            setEcg({...ecg});
-                                        }}
-                                        ref={el => ecgRef.current['average_heart_rate'] = el}
-                                    />
-                                </td>
-                            </tr>
-                            <tr>
-                                <th>최대 R-R</th>
-                                <td>
-                                    <input type="number" value={ecg['max_rr']}
-                                        onChange={(e) => {
-                                            ecg['max_rr'] = e.target.value;
-                                            setEcg({...ecg});
-                                        }}
-                                        ref={el => ecgRef.current['max_rr'] = el}
-                                    />
-                                </td>
-                                <th>최소 R-R</th>
-                                <td>
-                                    <input type="number" value={ecg['min_rr']}
-                                        onChange={(e) => {
-                                            ecg['min_rr'] = e.target.value;
-                                            setEcg({...ecg});
-                                        }}
-                                        ref={el => ecgRef.current['min_rr'] = el}
-                                    />
-                                </td>
-                                <th>평균 R-R</th>
-                                <td>
-                                    <input type="number" value={ecg['average_rr']}
-                                        onChange={(e) => {
-                                            ecg['average_rr'] = e.target.value;
-                                            setEcg({...ecg});
-                                        }}
-                                        ref={el => ecgRef.current['average_rr'] = el}
-                                    />
-                                </td>
-                            </tr>
-                        </>}
-                    </table>
-                    <div className="btn-wrap flex-center margin-bottom5">
-                        {CommonUtil.isEmpty(ecg['ecg_record_idx'])
-                            ? <button className="btn-small red-btn" onClick={ecgInsert}>등록</button>
-                            : <>
-                                <button className="btn-small gray-btn" onClick={setEcgInit}>수정취소</button>
-                                <button className="btn-small red-btn" onClick={ecgUpdate}>수정</button>
-                                <button className="btn-small red-btn" onClick={ecgDelete}>삭제</button>
-                            </>
-                        }
-                    </div>
-                    <div>
-                        <table className="caregiver-user senior-table">
-                            <thead>
-                                <tr>
-                                    <th>No</th>
-                                    <th>소견 작성 일자</th>
-                                    <th>판독 소견 종류</th>
-                                    <th>소견 작성자</th>
-                                </tr>
-                            </thead>
-                            <tbody>
-                                {ecgList.ecgList.map((item, idx) => { return (
-                                <tr key={idx} onClick={() => {item.isEdit = false; setEcg(item);}}>
-                                    <td data-label="No">{ecgList.ecgListCount - idx - (ecgList.search.currentPage - 1) * ecgList.search.perPage}</td>
-                                    <td data-label="소견 작성 일자">{item['ecg_reading_date']}</td>
-                                    <td data-label="판독 소견 종류">{item['ecg_finding_type']}</td>
-                                    <td data-label="소견 작성자">{item['insert_user_name']}</td>
-                                </tr>
-                                )})}
-                                {CommonUtil.isEmpty(ecgList.ecgList) ?
-                                <tr>
-                                    <td colSpan={4}>조회된 데이터가 없습니다</td>
-                                </tr>  
-                                : null}
-                            </tbody>
-                        </table>
-                        <Pagination
-                            currentPage={ecgList.search.currentPage}
-                            perPage={ecgList.search.perPage}
-                            totalCount={ecgList.ecgListCount}
-                            maxRange={5}
-                            click={ecgSelectList}
-                        />
-                    </div>
-                </div>
-            </Modal>
-
-
-            <Modal open={modalOpen4} close={closeModal4} header="혈압측정결과 관리 및 조회">
-                <div className="board-wrap">
-                    <table className="margin-bottom2 senior-insert ">
-                        <tr>
-                            <th>측정일자</th>
-                            <td>
-                                <input type="date" value={bloodPressure['blood_pressure_record_date']}
-                                    onChange={(e) => {
-                                        bloodPressure['blood_pressure_record_date'] = e.target.value;
-                                        setBloodPressure({...bloodPressure});
-                                    }}
-                                    ref={el => bloodPressureRef.current['blood_pressure_record_date'] = el}
-                                />
-                            </td>              
-                        </tr>
-                        <tr>
-                            <th>최고혈압</th>
-                            <td>
-                                <input type="number" value={bloodPressure['max_blood_pressure']}
-                                    onChange={(e) => {
-                                        bloodPressure['max_blood_pressure'] = e.target.value;
-                                        setBloodPressure({...bloodPressure});
-                                    }}
-                                    ref={el => bloodPressureRef.current['max_blood_pressure'] = el}
-                                />
-                            </td>         
-                        </tr>
-                        <tr>
-                            <th>최저혈압</th>
-                            <td>
-                                <input type="number" value={bloodPressure['min_blood_pressure']}
-                                    onChange={(e) => {
-                                        bloodPressure['min_blood_pressure'] = e.target.value;
-                                        setBloodPressure({...bloodPressure});
-                                    }}
-                                    ref={el => bloodPressureRef.current['min_blood_pressure'] = el}
-                                />
-                            </td>
-                        </tr>
-                        <tr>
-                            <th>맥박수</th>
-                            <td>
-                                <input type="number" value={bloodPressure['pulse_rate']}
-                                    onChange={(e) => {
-                                        bloodPressure['pulse_rate'] = e.target.value;
-                                        setBloodPressure({...bloodPressure});
-                                    }}
-                                    ref={el => bloodPressureRef.current['pulse_rate'] = el}
-                                />
-                            </td>
-                        </tr>      
-                    </table>
-                    <div className="btn-wrap flex-center margin-bottom5">
-                        {CommonUtil.isEmpty(bloodPressure['blood_pressure_record_idx'])
-                            ? <button className="btn-small red-btn" onClick={bloodPressureInsert}>등록</button>
-                            : <>
-                                <button className="btn-small gray-btn" onClick={setBloodPressureInit}>수정취소</button>
-                                <button className="btn-small red-btn" onClick={bloodPressureUpdate}>수정</button>
-                                <button className="btn-small red-btn" onClick={bloodPressureDelete}>삭제</button>
-                            </>
-                        }
-                    </div>
-                    <div>
-                        <table className="caregiver-user senior-insert  senior-table">
-                            <thead>
-                                <tr>
-                                    <th>No</th>
-                                    <th>기록 작성일</th>
-                                    <th>최고 혈압</th>
-                                    <th>최저 혈압</th>
-                                    <th>맥박수</th>
-                                    <th>기록 작성자</th>
-                                </tr>
-                            </thead>
-                            <tbody>
-                                {bloodPressureList.bloodPressureList.map((item, idx) => { return (
-                                <tr key={idx} onClick={() => {setBloodPressure(item);}}>
-                                    <td data-label="No">{bloodPressureList.bloodPressureListCount - idx - (bloodPressureList.search.currentPage - 1) * bloodPressureList.search.perPage}</td>
-                                    <td data-label="기록 작성일">{item['blood_pressure_record_date']}</td>
-                                    <td data-label="최고 혈압">{item['max_blood_pressure']}</td>
-                                    <td data-label="최저 혈압">{item['min_blood_pressure']}</td>
-                                    <td data-label="맥박수">{item['pulse_rate']}</td>
-                                    <td data-label="기록 작성자">{item['insert_user_name']}</td>
-                                </tr>
-                                )})}
-                                {CommonUtil.isEmpty(bloodPressureList.bloodPressureList) ?
-                                <tr>
-                                    <td colSpan={6}>조회된 데이터가 없습니다</td>
-                                </tr>  
-                                : null}
-                            </tbody>
-                        </table>
-                        <Pagination
-                            currentPage={bloodPressureList.search.currentPage}
-                            perPage={bloodPressureList.search.perPage}
-                            totalCount={bloodPressureList.bloodPressureListCount}
-                            maxRange={5}
-                            click={bloodPressureSelectList}
-                        />
-                    </div>
-                </div>
-            </Modal>
-
-        </main>
-    );
-}
client/views/pages/main/Main_agencyAdmin.jsx
--- client/views/pages/main/Main_agencyAdmin.jsx
+++ client/views/pages/main/Main_agencyAdmin.jsx
@@ -22,280 +22,279 @@
 
 import "leaflet/dist/leaflet.css";
 
-export default function Main_government() {
+export default function Main_agencyAdmin() {
 
-    //전역 변수 저장 객체
-    const state = useSelector((state) => { return state });
+  //전역 변수 저장 객체
+  const state = useSelector((state) => { return state });
 
-    const [cityName, setCityName] = useState(state.loginUser['government_name']);
+  const [cityName, setCityName] = useState(state.loginUser['agency_name']);
 
-    //대상자(시니어) 목록 조회
-    const [senior, setSenior] = React.useState({ userList: [], userListCount: 0 });
-    const seniorSelectList = () => {
-        fetch("/user/userSelectList.json", {
-            method: "POST",
-            headers: {
-                'Content-Type': 'application/json; charset=UTF-8'
-            },
-            body: JSON.stringify({
-                'government_id': state.loginUser['government_id'],
-                'agency_id': state.loginUser['agency_id'],
-                'authority': 'ROLE_SENIOR',
-            }),
-        }).then((response) => response.json()).then((data) => {
-            console.log("대상자(시니어) 목록 조회 : ", data);
-            setSenior(data);
-        }).catch((error) => {
-            console.log('seniorSelectList() /user/userSelectList.json error : ', error);
-        });
-    }
-
-    //전체 대상자(시니어) 수 조회
-    const [seniorCount, setSeniorCount] = React.useState(0);
-    const seniorCountTotal = () => {
-        fetch("/stats/governmentSeniorCount.json", {
-            method: "POST",
-            headers: {
-                'Content-Type': 'application/json; charset=UTF-8'
-            },
-            body: JSON.stringify({
-                'government_id': state.loginUser['government_id'],
-            }),
-        }).then((response) => response.json()).then((data) => {
-            console.log("전체 대상자(시니어) 수 조회 : ", data);
-            setSeniorCount(data);
-        }).catch((error) => {
-            console.log('governmentSeniorCount() /stats/governmentSeniorCount.json error : ', error);
-        });
-    }
-
-    //온도 위험 대상자(시니어) 수 조회
-    const [temperatureCount, setTemperatureCount] = React.useState(0);
-    const temperatureRiskCount = () => {
-        fetch("/stats/governmentTemperatureRisk.json", {
-            method: "POST",
-            headers: {
-                'Content-Type': 'application/json; charset=UTF-8'
-            },
-            body: JSON.stringify({
-                'government_id': state.loginUser['government_id'],
-            }),
-        }).then((response) => response.json()).then((data) => {
-            console.log("온도 위험 대상자(시니어) 수 조회 : ", data);
-            setTemperatureCount(data);
-        }).catch((error) => {
-            console.log('temperatureRiskCount() /stats/governmentTemperatureRisk.json error : ', error);
-        });
-    }
-
-    //배터리 부족 대상자(시니어) 수 조회
-    const [batteryCount, setbatteryCount] = React.useState(0);
-    const batteryRiskCount = () => {
-        fetch("/stats/governmentBatteryRisk.json", {
-            method: "POST",
-            headers: {
-                'Content-Type': 'application/json; charset=UTF-8'
-            },
-            body: JSON.stringify({
-                'government_id': state.loginUser['government_id'],
-            }),
-        }).then((response) => response.json()).then((data) => {
-            console.log("배터리 부족 대상자(시니어) 수 조회 : ", data);
-            setbatteryCount(data);
-        }).catch((error) => {
-            console.log('batteryRiskCount() /stats/governmentBatteryRisk.json error : ', error);
-        });
-    }
-
-    //월별 방문 횟수 조회
-    const [visit, setVisit] = React.useState([]);
-    const visitByMonthList = () => {
-        fetch("/stats/visitByMonthList.json", {
-            method: "POST",
-            headers: {
-                'Content-Type': 'application/json; charset=UTF-8'
-            },
-            body: JSON.stringify({
-                'government_id': state.loginUser['government_id'],
-            }),
-        }).then((response) => response.json()).then((data) => {
-            console.log("월별 방문 횟수 조회 : ", data);
-            setVisit(data);
-        }).catch((error) => {
-            console.log('visitByMonthList() /stats/visitByMonthList.json error : ', error);
-        });
-    }
-
-    //시행 기관별 약상자 사용 현황
-    const [equipmentUsage, setEquipmentUsage] = React.useState([]);
-    const equipmentByAgency = () => {
-        fetch("/stats/equipmentByAgency.json", {
-            method: "POST",
-            headers: {
-                'Content-Type': 'application/json; charset=UTF-8'
-            },
-            body: JSON.stringify({
-                'government_id': state.loginUser['government_id'],
-            }),
-        }).then((response) => response.json()).then((data) => {
-            console.log("시행기관별 약상자 사용 현황 : ", data);
-            let newEquipmentList = updateList(data['agencyList'], data['equipmentList']);
-            console.log("new equipment list", newEquipmentList);
-            setEquipmentUsage(newEquipmentList);
-        }).catch((error) => {
-            console.log('equipmentByAgency() /stats/equipmentByAgency.json error : ', error);
-        });
-    }
-
-    //시행 기관별 대상자(시니어) 등록 현황
-    const [seniorEnroll, setSeniorEnroll] = React.useState([]);
-    const seniorByAgency = () => {
-        fetch("/stats/seniorByAgency.json", {
-            method: "POST",
-            headers: {
-                'Content-Type': 'application/json; charset=UTF-8'
-            },
-            body: JSON.stringify({
-                'government_id': state.loginUser['government_id'],
-            }),
-        }).then((response) => response.json()).then((data) => {
-            console.log("시행기관별 시니어 등록 현황 : ", data);
-            let newSeniorList = updateList(data['agencyList'], data['seniorList']);
-            console.log("new senior list", newSeniorList);
-            setSeniorEnroll(newSeniorList);
-        }).catch((error) => {
-            console.log('seniorByAgency() /stats/seniorByAgency.json error : ', error);
-        });
-    }
-
-    function updateList(agencyList, countList) {
-
-        const result = [];
-        for (let i = 0; i < agencyList.length; i++) {
-            const agency = agencyList[i];
-            let count = 0;
-            for (let j = 0; j < countList.length; j++) {
-                if (countList[j].agency_id === agency.agency_id) {
-                    count = countList[j].count;
-                    break;
-                }
-            }
-            result.push({ agency_id: agency.agency_id, agency_name: agency.agency_name, count: count });
-        }
-        return result;
-    }
-
-
-
-    const iconHouse = new L.Icon({
-        iconUrl: '/client/resources/files/images/house.png',
-        iconRetinaUrl: '/client/resources/files/images/house.png',
-        iconSize: [20, 20],
-        className: 'leaflet-background-radius-icon'//leaflet-div-icon
+  //대상자(시니어) 목록 조회
+  const [senior, setSenior] = React.useState({ userList: [], userListCount: 0 });
+  const seniorSelectList = () => {
+    fetch("/user/userSelectList.json", {
+      method: "POST",
+      headers: {
+        'Content-Type': 'application/json; charset=UTF-8'
+      },
+      body: JSON.stringify({
+        'agency_id': state.loginUser['agency_id'],
+        'authority': 'ROLE_SENIOR',
+      }),
+    }).then((response) => response.json()).then((data) => {
+      console.log("대상자(시니어) 목록 조회 : ", data);
+      setSenior(data);
+    }).catch((error) => {
+      console.log('seniorSelectList() /user/userSelectList.json error : ', error);
     });
+  }
 
-    React.useEffect(() => {
-        seniorSelectList();
-        seniorCountTotal();
-        temperatureRiskCount();
-        batteryRiskCount();
-        visitByMonthList();
-        equipmentByAgency();
-        seniorByAgency();
-    }, []);
+  //전체 대상자(시니어) 수 조회
+  const [seniorCount, setSeniorCount] = React.useState(0);
+  const seniorCountTotal = () => {
+    fetch("/stats/agencySeniorCount.json", {
+      method: "POST",
+      headers: {
+        'Content-Type': 'application/json; charset=UTF-8'
+      },
+      body: JSON.stringify({
+        'agency_id': state.loginUser['agency_id'],
+      }),
+    }).then((response) => response.json()).then((data) => {
+      console.log("전체 대상자(시니어) 수 조회 : ", data);
+      setSeniorCount(data);
+    }).catch((error) => {
+      console.log('agencySeniorCount() /stats/agencySeniorCount.json error : ', error);
+    });
+  }
+
+  //온도 위험 대상자(시니어) 수 조회
+  const [temperatureCount, setTemperatureCount] = React.useState(0);
+  const temperatureRiskCount = () => {
+    fetch("/stats/agencyTemperatureRisk.json", {
+      method: "POST",
+      headers: {
+        'Content-Type': 'application/json; charset=UTF-8'
+      },
+      body: JSON.stringify({
+        'agency_id': state.loginUser['agency_id'],
+      }),
+    }).then((response) => response.json()).then((data) => {
+      console.log("온도 위험 대상자(시니어) 수 조회 : ", data);
+      setTemperatureCount(data);
+    }).catch((error) => {
+      console.log('temperatureRiskCount() /stats/agencyTemperatureRisk.json error : ', error);
+    });
+  }
+
+  //배터리 부족 대상자(시니어) 수 조회
+  const [batteryCount, setbatteryCount] = React.useState(0);
+  const batteryRiskCount = () => {
+    fetch("/stats/agencyBatteryRisk.json", {
+      method: "POST",
+      headers: {
+        'Content-Type': 'application/json; charset=UTF-8'
+      },
+      body: JSON.stringify({
+        'agency_id': state.loginUser['agency_id'],
+      }),
+    }).then((response) => response.json()).then((data) => {
+      console.log("배터리 부족 대상자(시니어) 수 조회 : ", data);
+      setbatteryCount(data);
+    }).catch((error) => {
+      console.log('batteryRiskCount() /stats/agencyBatteryRisk.json error : ', error);
+    });
+  }
+
+  //월별 방문 횟수 조회
+  const [visit, setVisit] = React.useState([]);
+  const visitByMonthList = () => {
+    fetch("/stats/visitByMonthList.json", {
+      method: "POST",
+      headers: {
+        'Content-Type': 'application/json; charset=UTF-8'
+      },
+      body: JSON.stringify({
+        'agency_id': state.loginUser['agency_id'],
+      }),
+    }).then((response) => response.json()).then((data) => {
+      console.log("월별 방문 횟수 조회 : ", data);
+      setVisit(data);
+    }).catch((error) => {
+      console.log('visitByMonthList() /stats/visitByMonthList.json error : ', error);
+    });
+  }
+
+  //시행 기관별 약상자 사용 현황
+  const [equipmentUsage, setEquipmentUsage] = React.useState([]);
+  const equipmentByAgency = () => {
+    fetch("/stats/equipmentByAgency.json", {
+      method: "POST",
+      headers: {
+        'Content-Type': 'application/json; charset=UTF-8'
+      },
+      body: JSON.stringify({
+        'agency_id': state.loginUser['agency_id'],
+      }),
+    }).then((response) => response.json()).then((data) => {
+      console.log("시행기관별 약상자 사용 현황 : ", data);
+      let newEquipmentList = updateList(data['agencyList'], data['equipmentList']);
+      console.log("new equipment list", newEquipmentList);
+      setEquipmentUsage(newEquipmentList);
+    }).catch((error) => {
+      console.log('equipmentByAgency() /stats/equipmentByAgency.json error : ', error);
+    });
+  }
+
+  //시행 기관별 대상자(시니어) 등록 현황
+  const [seniorEnroll, setSeniorEnroll] = React.useState([]);
+  const seniorByAgency = () => {
+    fetch("/stats/seniorByAgency.json", {
+      method: "POST",
+      headers: {
+        'Content-Type': 'application/json; charset=UTF-8'
+      },
+      body: JSON.stringify({
+        'agency_id': state.loginUser['agency_id'],
+      }),
+    }).then((response) => response.json()).then((data) => {
+      console.log("시행기관별 시니어 등록 현황 : ", data);
+      let newSeniorList = updateList(data['agencyList'], data['seniorList']);
+      console.log("new senior list", newSeniorList);
+      setSeniorEnroll(newSeniorList);
+    }).catch((error) => {
+      console.log('seniorByAgency() /stats/seniorByAgency.json error : ', error);
+    });
+  }
+
+  function updateList(agencyList, countList) {
+
+    const result = [];
+    for (let i = 0; i < agencyList.length; i++) {
+      const agency = agencyList[i];
+      let count = 0;
+      for (let j = 0; j < countList.length; j++) {
+        if (countList[j].agency_id === agency.agency_id) {
+          count = countList[j].count;
+          break;
+        }
+      }
+      result.push({ agency_id: agency.agency_id, agency_name: agency.agency_name, count: count });
+    }
+    return result;
+  }
 
 
-    return (
-        <main>
-            <div className="main-grid-government">
-                <div className="sub-grid-government">
-                    <ul className="content-box statistics-govern" background="#f7acba">
-                        <li>
-                            <p><ElderlyIcon sx={{ width: "50px", height: "50px", color: "#ffffff", background: "#bf0629", borderRadius: "50px" }} /></p>
-                            <p>{cityName} 전체 대상자</p>
-                            <p>{seniorCount}</p>
-                        </li>
-                    </ul>
-                    <ul className="content-box statistics-govern" background="#8ef3d1">
-                        <li>
-                            <p><MedicationIcon sx={{ width: "50px", height: "50px", color: "#ffffff", background: "#076143", borderRadius: "50px" }} /></p>
-                            <p>{cityName} 미복약 위험 대상자</p>
-                            <p>11</p>
-                        </li>
-                    </ul>
-                    <ul className="content-box statistics-govern" background="#ebe7b9" >
-                        <li>
-                            <p><DeviceThermostatIcon sx={{ width: "50px", height: "50px", color: "#ffffff", background: "#f1de05", borderRadius: "50px" }} /></p>
-                            <p>{cityName} 댁내 온도 위험 대상자</p>
-                            <p>{temperatureCount}</p>
-                        </li>
-                    </ul>
-                    <ul className="content-box statistics-govern" background="#5f9af3">
-                        <li>
-                            <p><BatteryCharging20Icon sx={{ width: "50px", height: "50px", color: "#ffffff", background: "#5f9af3", borderRadius: "50px" }} /></p>
-                            <p>{cityName} 배터리 부족 대상자 </p>
-                            <p>{batteryCount}</p>
-                        </li>
-                    </ul>
-                </div>
-                <div className="content-box combine-left-government combine-bottom-government2 main-main">
-                    <div className="flex">
-                        <Title title={"지역별 케어 대상자 분포 현황"} explanation={"지역 선택 시 해당 지역의 대상자리스트가 보여집니다."} />
-                    </div>
-                    <div style={{ height: 'calc(100% - 60px)' }}>
-                        <MapContainer center={latLng(35.8713802646197, 128.601805491072)} zoom={13} scrollWheelZoom={true} style={{ height: '100%' }}>
-                            <TileLayer
-                                attribution='&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
-                                url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
-                            />
-                            {/* <Marker position={[128.601405491072, 35.8913802646197]}>
+
+  const iconHouse = new L.Icon({
+    iconUrl: '/client/resources/files/images/house.png',
+    iconRetinaUrl: '/client/resources/files/images/house.png',
+    iconSize: [20, 20],
+    className: 'leaflet-background-radius-icon'//leaflet-div-icon
+  });
+
+  React.useEffect(() => {
+    seniorSelectList();
+    seniorCountTotal();
+    temperatureRiskCount();
+    batteryRiskCount();
+    visitByMonthList();
+    equipmentByAgency();
+    seniorByAgency();
+  }, []);
+
+
+  return (
+    <main>
+      <div className="main-grid-government">
+        <div className="sub-grid-government">
+          <ul className="content-box statistics-govern" background="#f7acba">
+            <li>
+              <p><ElderlyIcon sx={{ width: "50px", height: "50px", color: "#ffffff", background: "#bf0629", borderRadius: "50px" }} /></p>
+              <p>{cityName} 전체 대상자</p>
+              <p>{seniorCount}</p>
+            </li>
+          </ul>
+          <ul className="content-box statistics-govern" background="#8ef3d1">
+            <li>
+              <p><MedicationIcon sx={{ width: "50px", height: "50px", color: "#ffffff", background: "#076143", borderRadius: "50px" }} /></p>
+              <p>{cityName} 미복약 위험 대상자</p>
+              <p>11</p>
+            </li>
+          </ul>
+          <ul className="content-box statistics-govern" background="#ebe7b9" >
+            <li>
+              <p><DeviceThermostatIcon sx={{ width: "50px", height: "50px", color: "#ffffff", background: "#f1de05", borderRadius: "50px" }} /></p>
+              <p>{cityName} 댁내 온도 위험 대상자</p>
+              <p>{temperatureCount}</p>
+            </li>
+          </ul>
+          <ul className="content-box statistics-govern" background="#5f9af3">
+            <li>
+              <p><BatteryCharging20Icon sx={{ width: "50px", height: "50px", color: "#ffffff", background: "#5f9af3", borderRadius: "50px" }} /></p>
+              <p>{cityName} 배터리 부족 대상자 </p>
+              <p>{batteryCount}</p>
+            </li>
+          </ul>
+        </div>
+        <div className="content-box combine-left-government combine-bottom-government2 main-main">
+          <div className="flex">
+            <Title title={"지역별 케어 대상자 분포 현황"} explanation={"지역 선택 시 해당 지역의 대상자리스트가 보여집니다."} />
+          </div>
+          <div style={{ height: 'calc(100% - 60px)' }}>
+            <MapContainer center={latLng(35.8713802646197, 128.601805491072)} zoom={13} scrollWheelZoom={true} style={{ height: '100%' }}>
+              <TileLayer
+                attribution='&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
+                url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
+              />
+              {/* <Marker position={[128.601405491072, 35.8913802646197]}>
                         <Popup>
                             A pretty CSS3 popup. <br /> Easily customizable.
                         </Popup>
                         </Marker> */}
 
-                            <LayerGroup>
-                                {senior.userList.map((item, idx) => {
-                                    return item['y'] != null && item['x'] != null ? (
-                                        <Marker position={[item['y'], item['x']]} icon={iconHouse}>
-                                            <Popup>
-                                                <div>
-                                                    {item['user_name']}({item['user_birth']} - {item['user_gender']})
-                                                </div>
-                                            </Popup>
-                                        </Marker>
-                                    ): null
-                                })}
-                            </LayerGroup>
-                        </MapContainer>
-                    </div>
-                    {/* <Map setCityName={setCityName} /> */}
-                </div>
-                <div className="content-box combine-all-government combine-bottom-government2">
-                    <div className="flex">
-                        <Title title={`${cityName} 월별 방문 횟수`} explanation={"최근 6개월간 방문 횟수의 변화를 확인할 수 있습니다."} />
-                    </div>
-                    <RowChart_govern data={visit} />
-                </div>
-                <div className="content-box combine-left-government2">
-                    <div className="flex">
-                        <Title title={`${cityName} 복용률 평균`} explanation={"해당 지역의 대상자 복용률이 그래프로 보여집니다."} />
-                    </div>
-                    <Chart2_govern />
-                </div>
-                <div className="content-box combine-right-government2">
-                    <div className="flex">
-                        <Title title={`기관별 대상자 등록 현황`} explanation={"약상자 사용자의 데이터 차트가 보여집니다."} />
-                    </div>
-                    <Chart5 data={seniorEnroll} />
-                </div>
-                <div className="content-box combine-right-government">
-                    <div className="flex">
-                        <Title title={`기관별 약상자 사용 현황`} explanation={""} />
-                    </div>
-                    <Donut1_govern data={equipmentUsage} />
-                </div>
-            </div>
-        </main>
-    );
+              <LayerGroup>
+                {senior.userList.map((item, idx) => {
+                  return item['y'] != null && item['x'] != null ? (
+                    <Marker position={[item['y'], item['x']]} icon={iconHouse}>
+                      <Popup>
+                        <div>
+                          {item['user_name']}({item['user_birth']} - {item['user_gender']})
+                        </div>
+                      </Popup>
+                    </Marker>
+                  ) : null
+                })}
+              </LayerGroup>
+            </MapContainer>
+          </div>
+          {/* <Map setCityName={setCityName} /> */}
+        </div>
+        <div className="content-box combine-all-government combine-bottom-government2">
+          <div className="flex">
+            <Title title={`${cityName} 월별 방문 횟수`} explanation={"최근 6개월간 방문 횟수의 변화를 확인할 수 있습니다."} />
+          </div>
+          <RowChart_govern data={visit} />
+        </div>
+        <div className="content-box combine-left-government2">
+          <div className="flex">
+            <Title title={`${cityName} 복용률 평균`} explanation={"해당 지역의 대상자 복용률이 그래프로 보여집니다."} />
+          </div>
+          <Chart2_govern />
+        </div>
+        <div className="content-box combine-right-government2">
+          <div className="flex">
+            <Title title={`보호사별 대상자 등록 현황`} explanation={"약상자 사용자의 데이터 차트가 보여집니다."} />
+          </div>
+          <Chart5 data={seniorEnroll} />
+        </div>
+        <div className="content-box combine-right-government">
+          <div className="flex">
+            <Title title={`보호사별 약상자 사용 현황`} explanation={""} />
+          </div>
+          <Donut1_govern data={equipmentUsage} />
+        </div>
+      </div>
+    </main>
+  );
 }
client/views/pages/main/Main_guardian.jsx
--- client/views/pages/main/Main_guardian.jsx
+++ client/views/pages/main/Main_guardian.jsx
@@ -37,6 +37,8 @@
 import percent_m_80 from '../../../resources/files/images/percent_m_80.png';
 import percent_m_100 from '../../../resources/files/images/percent_m_100.png';
 
+import CommonUtil from "../../../resources/js/CommonUtil.js";
+
 export default function Main_guardian() {
   const navigate = useNavigate();
   const location = useLocation();
@@ -45,79 +47,87 @@
   const state = useSelector((state) => { return state });
   //console.log('state.seniorList[state.currentSeniorIndex] : ', state.seniorList[state.currentSeniorIndex]);
 
-  const tableHead1 = ["", "", "", "", "", ""];
-  const Key1 = ["morning", "morning2", "lunch", "lunch2", "dinner", "dinner2"];
-  const content1 = [
-    {
-      morning: "아침",
-      morning2: (
-        <CheckCircleOutlineIcon sx={{ width: "3rem", height: "3rem", color: "#067943", borderRadius: "50px" }} />
-      ),
-      lunch: "점심",
-      lunch2: (
-        <CheckCircleOutlineIcon sx={{ width: "3rem", height: "3rem", color: "#067943", borderRadius: "50px" }} />
-      ),
-      dinner: "저녁",
-      dinner2: (
-        <CheckCircleOutlineIcon sx={{ width: "3rem", height: "3rem", color: "#067943", borderRadius: "50px" }} />
-      ),
-    }
-  ];
-  const tableHead2 = ["", "", "", "", "", ""];
-  const Key2 = ["morning", "morning2", "lunch", "lunch2", "dinner", "dinner2"];
-  const content2 = [
-    {
-      morning: "아침",
-      morning2: (
-        <ClearIcon sx={{ width: "3rem", height: "3rem", color: "#bf0629", borderRadius: "50px" }} />
-      ),
-      lunch: "점심",
-      lunch2: (
-        <ClearIcon sx={{ width: "3rem", height: "3rem", color: "#bf0629", borderRadius: "50px" }} />
-      ),
-      dinner: "저녁",
-      dinner2: (
-        <ClearIcon sx={{ width: "3rem", height: "3rem", color: "#bf0629", borderRadius: "50px" }} />
-      ),
-    }
-  ];
-  const tableHead3 = ["월", "화", "수", "목", "금", "토", "일"];
-  const Key3 = ["mon", "tue", "wed", "thu", "fri", "sat", "sun"];
-  const content3 = [
-    {
-      mon: "24°C",
-      tue: "24°C",
-      wed: "24°C",
-      thu: "24°C",
-      fri: "24°C",
-      sat: "24°C",
-      sun: "24°C",
-    }
-  ];
+  // const tableHead1 = ["", "", "", "", "", ""];
+  // const Key1 = ["morning", "morning2", "lunch", "lunch2", "dinner", "dinner2"];
+  // const content1 = [
+  //   {
+  //     morning: "아침",
+  //     morning2: (
+  //       <CheckCircleOutlineIcon sx={{ width: "3rem", height: "3rem", color: "#067943", borderRadius: "50px" }} />
+  //     ),
+  //     lunch: "점심",
+  //     lunch2: (
+  //       <CheckCircleOutlineIcon sx={{ width: "3rem", height: "3rem", color: "#067943", borderRadius: "50px" }} />
+  //     ),
+  //     dinner: "저녁",
+  //     dinner2: (
+  //       <CheckCircleOutlineIcon sx={{ width: "3rem", height: "3rem", color: "#067943", borderRadius: "50px" }} />
+  //     ),
+  //   }
+  // ];
+  // const tableHead2 = ["", "", "", "", "", ""];
+  // const Key2 = ["morning", "morning2", "lunch", "lunch2", "dinner", "dinner2"];
+  // const content2 = [
+  //   {
+  //     morning: "아침",
+  //     morning2: (
+  //       <ClearIcon sx={{ width: "3rem", height: "3rem", color: "#bf0629", borderRadius: "50px" }} />
+  //     ),
+  //     lunch: "점심",
+  //     lunch2: (
+  //       <ClearIcon sx={{ width: "3rem", height: "3rem", color: "#bf0629", borderRadius: "50px" }} />
+  //     ),
+  //     dinner: "저녁",
+  //     dinner2: (
+  //       <ClearIcon sx={{ width: "3rem", height: "3rem", color: "#bf0629", borderRadius: "50px" }} />
+  //     ),
+  //   }
+  // ];
+  // const tableHead3 = ["월", "화", "수", "목", "금", "토", "일"];
+  // const Key3 = ["mon", "tue", "wed", "thu", "fri", "sat", "sun"];
+  // const content3 = [
+  //   {
+  //     mon: "24°C",
+  //     tue: "24°C",
+  //     wed: "24°C",
+  //     thu: "24°C",
+  //     fri: "24°C",
+  //     sat: "24°C",
+  //     sun: "24°C",
+  //   }
+  // ];
 
   //검색
   const searching = () => {
-    if (state['seniorList'] && state['seniorList'].length > 0) {
-      if (isMySenior) {
-        setSenior(state['seniorList'][isMySenior]['senior_id']);
-      } else if (state['seniorList'].length > 0) {
-        setSenior(state['seniorList'][0]['senior_id']);
-      }
+    if (CommonUtil.isEmpty(state.loginUser) == false
+      && state.loginUser['authority'] == 'ROLE_GUARDIAN' & isMySenior) {
+      console.log('here!!', mySenior);
+      setSenior(state['seniorList'][mySenior]);
+    } else if (state['seniorList'] != null && state['seniorList'].length > 0) {
+      setSenior(state['seniorList'][0]);
     }
+    if (CommonUtil.isEmpty(state.loginUser) == false
+      && state.loginUser['authority'] == 'ROLE_SENIOR') {
+      setSenior({ ...senior });
+      seniorSelectOne();
+    }
+
+    seniorMedicationSelectList(senior);
+    seniorTemperatureSelectListByDay(senior);
+    visitRecordSelectList(senior);
   }
 
-  const [isMySenior, setIsMySenior] = React.useState(true);
+  const [mySenior, setMySenior] = React.useState();
+  const [isMySenior, setIsMySenior] = React.useState(false);
   React.useEffect(() => {
     searching();
-  }, [isMySenior])
+  }, [mySenior, isMySenior])
 
   //시니어 정보
   const [senior, setSenior] = React.useState({
     'user_id': state.loginUser['authority'] == 'ROLE_SENIOR' ? state.loginUser['user_id'] : null,
     'user_name': state.loginUser['authority'] == 'ROLE_SENIOR' ? state.loginUser['user_name'] : null,
     'senior_id': state.loginUser['authority'] == 'ROLE_SENIOR' ? state.loginUser['user_id'] : null,
-
-    'seniorMedicationList': []
   });
 
   //시니어 상세 조회
@@ -136,6 +146,159 @@
     });
   };
 
+  const handleChangeSelect = (e) => {
+    setMySenior(e.target.value);
+    setIsMySenior(true);
+  };
+
+  const SelectBox = () => {
+    if (state['seniorList'].length > 1) {
+      return (
+        <select className="margin-bottom2" onChange={handleChangeSelect} value={mySenior}>
+          {state['seniorList'].map((item, idx) => {
+            return (
+              <option key={item} value={idx}>{item['user_name']}</option>
+            )
+          })}
+        </select>
+      )
+    }
+  }
+
+
+  //특정 대상자의 실제 복약 정보
+  const [seniorMedicationList, setSeniorMedicationList] = React.useState([]);
+  const [showMedicationTimeCode, setShowMedicationTimeCode] = React.useState({});
+  //특정 대상자의 실제 복약 정보 목록 조회
+  const seniorMedicationSelectList = (seniorNum) => {
+    fetch("/user/seniorMedicationSelectList.json", {
+      method: "POST",
+      headers: {
+        'Content-Type': 'application/json; charset=UTF-8'
+      },
+      body: JSON.stringify(seniorNum),
+    }).then((response) => response.json()).then((data) => {
+      console.log("seniorMedicationList data : ", data);
+      setSeniorMedicationList(data);
+      seniorMedicationSelectListByDay(data, seniorNum);
+    }).catch((error) => {
+      console.log('seniorMedicationSelectList() /user/seniorMedicationSelectList.json error : ', error);
+    });
+  };
+
+  //특정 대상자의 일별, 복약시간별 복약 목록
+  const [seniorMedicationListByDay, setSeniorMedicationListByDay] = React.useState([]);
+  const [stackChartData, setStackChartData] = React.useState([]);
+  //특정 대상자의 일별, 복약시간별 복약 목록 조회
+  const seniorMedicationSelectListByDay = (seniorMedicationList, seniorNum) => {
+    fetch("/user/seniorMedicationSelectListByDay.json", {
+      method: "POST",
+      headers: {
+        'Content-Type': 'application/json; charset=UTF-8'
+      },
+      body: JSON.stringify(seniorNum),
+    }).then((response) => response.json()).then((data) => {
+      console.log("seniorMedicationListByDay data : ", data);
+      setSeniorMedicationListByDay(data);
+
+      let showMedicationTimeCode = {};
+      for (let i = 0; i < seniorMedicationList.length; i++) {
+        showMedicationTimeCode[seniorMedicationList[i]] = true;
+      }
+      setShowMedicationTimeCode(showMedicationTimeCode);
+      console.log('showMedicationTimeCode : ', showMedicationTimeCode);
+
+      if (CommonUtil.isEmpty(data) == false) {
+        let _stackChartData = [];
+        for (let i = 0; i < data.length; i++) {
+          let sum = 0;      // 실제 복약량
+          let counter = 0;  // 복약해야하는 양
+          for (let j = 0; j < data[i]['medication_time_code_list'].length; j++) {
+            if (CommonUtil.isEmpty(showMedicationTimeCode[data[i]['medication_time_code_list'][j]]) == false) {
+              counter++;
+              if (i > 0) {
+                sum += data[i]['medication_time_code_count_list'][j];
+              }
+            } else {
+              continue;
+            }
+          }
+          _stackChartData.push({ "xName": data[i]['medication_default_date'], "sum": sum, "total": counter })
+        }
+        setStackChartData(_stackChartData);
+        console.log('_stackChartData : ', _stackChartData);
+      }
+
+    }).catch((error) => {
+      console.log('seniorMedicationSelectListByDay() /user/seniorMedicationSelectListByDay.json error : ', error);
+    });
+  };
+
+  const seniorTemperatureList = ['02:00', '10:00', '14:00', '23:00']
+
+  //특정 대상자의 일별, 시간별 온도 목록
+  const [seniorTemperatureListByDay, setSeniorTemperatureListByDay] = React.useState([]);
+  const [stackTemperatureData, setStackTemperatureData] = React.useState([]);
+  //특정 대상자의 일별, 시간별 온도 목록 조회
+  const seniorTemperatureSelectListByDay = (seniorNum) => {
+    fetch("/user/seniorTemperatureSelectListByDay.json", {
+      method: "POST",
+      headers: {
+        'Content-Type': 'application/json; charset=UTF-8'
+      },
+      body: JSON.stringify(seniorNum),
+    }).then((response) => response.json()).then((data) => {
+      console.log("seniorTemperatureListByDay data : ", data);
+      setSeniorTemperatureListByDay(data);
+
+      if (CommonUtil.isEmpty(data) == false) {
+        let _stackTemperatureData = [];
+        let chartData = {};
+        for (let i = 0; i < data.length; i++) {
+          chartData = {
+            xName: data[i]['temperature_date'],
+          };
+          chartData['temperature'] = data[i]['temperature_data'];
+          chartData['time'] = data[i]['temperature_time'];
+
+          _stackTemperatureData.push(chartData);
+        }
+        setStackTemperatureData(_stackTemperatureData);
+        console.log('_stackTemperatureData : ', _stackTemperatureData);
+      }
+    }).catch((error) => {
+      console.log('seniorTemperatureSelectListByDay() /user/seniorTemperatureSelectListByDay.json error : ', error);
+    });
+  };
+
+  //방문 기록 정보
+  const [visitRecordList, setVisitRecordList] = React.useState({});
+  //방문 기록 목록 조회
+  const visitRecordSelectList = (seniorNum) => {
+    fetch("/welfare/visitRecordSelectList.json", {
+      method: "POST",
+      headers: {
+        'Content-Type': 'application/json; charset=UTF-8'
+      },
+      body: JSON.stringify(seniorNum),
+    }).then((response) => response.json()).then((data) => {
+      console.log("방문 기록 목록 조회 결과(건수) : ", data);
+      let _stackVisitData = [];
+      let chartData = {};
+      for (let i = 0; i < data['visitRecordList'].length; i++) {
+        chartData = {
+          xName: data['visitRecordList'][i]['visit_date'],
+        };
+        chartData['reason'] = data['visitRecordList'][i]['visit_reason'];
+        _stackVisitData.push(chartData);
+      }
+      setVisitRecordList(_stackVisitData);
+      console.log('_stackVisitData : ', _stackVisitData);
+    }).catch((error) => {
+      console.log('visitRecordSelectList() /user/visitRecordSelectList.json error : ', error);
+    });
+  }
+
   React.useEffect(() => {
     searching();
   }, []);
@@ -143,97 +306,90 @@
   return (
     <>
       <main className="pink">
-        {state['seniorList'].length > 1 ? (
-          <select className="margin-bottom2" onChange={(value) => { setIsMySenior(value.target.value) }}>
-            {state['seniorList'].map((item, idx) => {
-              return (
-                <option key={idx} value={idx}>{item['user_name']}</option>
-              )
-            })}
-          </select>) : null}
-
+        <SelectBox />
         <div className="flex-start main-guardian"><img src={Senior} alt="" />
           <Title title={`${senior['user_name']} 어르신`} explanation={"방문, 복약, 온도, 배터리 현황을 확인하세요."} />
         </div>
-        <div className="main-grid-guardian">
-          <div className="combine-left combine-all-government battery-wrap ">
-            <div className="battery">
-              <div className="flex-start">
-                <img className="guardian-img" src={battery} alt="" />
-                <div className="pc flex-start"><p>현재 스마트 약상자의 배터리가 <em className="red">28</em>% 입니다.</p><p className="red">※충전이 필요합니다.</p></div >
-              </div>
-              <div className="battery-img">
-                {/* 0%일때 */}
-                <img src={zeropercent} alt="" />
-                {/* 0~20%일때 */}
-                <img src={twentypercent} alt="" />
-                {/* 20~40%일때 */}
-                <img src={fortypercent} alt="" className="show" />
-                {/* 40~60%일때 */}
-                <img src={sixtytypercent} alt="" />
-                {/* 60~80% 일때 */}
-                <img src={eightytypercent} alt="" />
-                {/* 80~100%일때 */}
-                <img src={pullpercent} alt="" />
-              </div>
-            </div>
-            <div className="battery-mobile">
-              <div className="flex-start "><img className="guardian-img" src={battery} alt="" /><TitleSmall title={"배터리"} /><TitleSmall title={"28%"} /><p className="red">※충전이 필요합니다.</p></div >
-              <div className="battery-img">
-                <img src={percent_m_0} alt="" />
-                <img src={percent_m_20} alt="" />
-                <img src={percent_m_40} alt="" className="show" />
-                <img src={percent_m_60} alt="" />
-                <img src={percent_m_80} alt="" />
-                <img src={percent_m_100} alt="" />
-              </div>
-            </div>
-
-          </div>
-          <div className="statistics-guardian combine-right3">
-            <div className="flex-start margin-bottom2"><img className="guardian-img" src={medicine} alt="" /><TitleSmall title={"복약체크"} explanation={"약을 잘 복용하고 계신지 체크해주세요."} /></div>
-            <ul className="">
-              <li className="guardian-medicine smallbox">
-                <DateDay />
-                <ul className="flex">
-                  <li>
-                    <img src={mornon} alt="" />
-                    <img src={mornoff} alt="" className="show" />
-                    <p className="medicine-title">아침</p>
-                  </li>
-                  <li>
-                    <img src={lunchon} alt="" />
-                    <img src={lunchoff} alt="" className="show" />
-                    <p className="medicine-title">점심</p>
-                  </li>
-                  <li>
-                    <img src={dinneron} alt="" />
-                    <img src={dinneroff} alt="" className="show" />
-                    <p className="medicine-title">저녁</p>
-                  </li>
-                </ul>
-              </li>
-            </ul>
-          </div>
-          <div className=" statistics-guardian combine-right3">
-            <div className="flex-start margin-bottom2 "><img className="guardian-img" src={temperature} alt="" /><TitleSmall title={"온도체크"} explanation={"댁내 온도가 적절한지 체크해보세요."} /></div>
-            <ul >
-              <li className="smallbox">
-                <DateMonth />
-                <Chart6 />
-              </li>
-            </ul>
-          </div>
-          <div className=" statistics-guardian combine-left2 combine-middle-government">
-            <div className="flex-start margin-bottom2 "><img className="guardian-img" src={calendarBig} alt="" /><TitleSmall title={"방문체크"} /></div>
-            <ul >
-              <li className="smallbox">
-                <Calendar />
-              </li>
-            </ul>
-          </div>
-        </div>
+        <Calendar data={{ medication: stackChartData, temperature: stackTemperatureData, visit: visitRecordList }} />
       </main>
     </>
   );
 }
+
+{/* <main className="pink">
+  <SelectBox />
+  <div className="flex-start main-guardian"><img src={Senior} alt="" />
+    <Title title={`${senior['user_name']} 어르신`} explanation={"방문, 복약, 온도, 배터리 현황을 확인하세요."} />
+  </div>
+  <div className="main-grid-guardian">
+    <div className="combine-left combine-all-government battery-wrap ">
+      <div className="battery">
+        <div className="flex-start">
+          <img className="guardian-img" src={battery} alt="" />
+          <div className="pc flex-start"><p>현재 스마트 약상자의 배터리가 <em className="red">28</em>% 입니다.</p><p className="red">※충전이 필요합니다.</p></div >
+        </div>
+        <div className="battery-img">
+          <img src={zeropercent} alt="" />
+          <img src={twentypercent} alt="" />
+          <img src={fortypercent} alt="" className="show" />
+          <img src={sixtytypercent} alt="" />
+          <img src={eightytypercent} alt="" />
+          <img src={pullpercent} alt="" />
+        </div>
+      </div>
+      <div className="battery-mobile">
+        <div className="flex-start "><img className="guardian-img" src={battery} alt="" /><TitleSmall title={"배터리"} /><TitleSmall title={"28%"} /><p className="red">※충전이 필요합니다.</p></div >
+        <div className="battery-img">
+          <img src={percent_m_0} alt="" />
+          <img src={percent_m_20} alt="" />
+          <img src={percent_m_40} alt="" className="show" />
+          <img src={percent_m_60} alt="" />
+          <img src={percent_m_80} alt="" />
+          <img src={percent_m_100} alt="" />
+        </div>
+      </div>
+    </div>
+    <div className="statistics-guardian combine-right3">
+      <div className="flex-start margin-bottom2"><img className="guardian-img" src={medicine} alt="" /><TitleSmall title={"복약체크"} explanation={"약을 잘 복용하고 계신지 체크해주세요."} /></div>
+      <ul className="">
+        <li className="guardian-medicine smallbox">
+          <DateDay />
+          <ul className="flex">
+            <li>
+              <img src={mornon} alt="" />
+              <img src={mornoff} alt="" className="show" />
+              <p className="medicine-title">아침</p>
+            </li>
+            <li>
+              <img src={lunchon} alt="" />
+              <img src={lunchoff} alt="" className="show" />
+              <p className="medicine-title">점심</p>
+            </li>
+            <li>
+              <img src={dinneron} alt="" />
+              <img src={dinneroff} alt="" className="show" />
+              <p className="medicine-title">저녁</p>
+            </li>
+          </ul>
+        </li>
+      </ul>
+    </div>
+    <div className=" statistics-guardian combine-right3">
+      <div className="flex-start margin-bottom2 "><img className="guardian-img" src={temperature} alt="" /><TitleSmall title={"온도체크"} explanation={"댁내 온도가 적절한지 체크해보세요."} /></div>
+      <ul >
+        <li className="smallbox">
+          <DateMonth />
+          <Chart6 />
+        </li>
+      </ul>
+    </div>
+    <div className=" statistics-guardian combine-left2 combine-middle-government">
+      <div className="flex-start margin-bottom2 "><img className="guardian-img" src={calendarBig} alt="" /><TitleSmall title={"방문체크"} /></div>
+      <ul >
+        <li className="smallbox">
+          <Calendar />
+        </li>
+      </ul>
+    </div>
+  </div>
+</main> */}
(No newline at end of file)
 
client/views/pages/user_management/AgencyAdminSeniorSelect.jsx (added)
+++ client/views/pages/user_management/AgencyAdminSeniorSelect.jsx
@@ -0,0 +1,372 @@
+import React from "react";
+import { useNavigate, useLocation } from "react-router";
+import { useSelector } from "react-redux";
+
+import SubTitle from "../../component/SubTitle.jsx";
+import Pagination from "../../component/Pagination.jsx";
+import House from "../../../resources/files/icon/house.png";
+import Arrow from "../../../resources/files/icon/arrow.png";
+
+import Modal_SeniorInsert from "../../component/Modal_SeniorInsert.jsx";
+
+import CommonUtil from "../../../resources/js/CommonUtil.js";
+
+export default function AgencyAdminSeniorSelect() {
+  const navigate = useNavigate();
+  const location = useLocation();
+
+  //대상자(시니어) 등록 모달 오픈 여부
+  const [modalSeniorInsertIsOpen, setModalSeniorInsertIsOpen] = React.useState(false);
+  //대상자(시니어) 등록 모달 오픈
+  const modalSeniorInsertOpen = () => {
+    setModalSeniorInsertIsOpen(true);
+  };
+  //대상자(시니어) 등록 모달 닫기
+  const modalSeniorInsertClose = () => {
+    setModalSeniorInsertIsOpen(false);
+  };
+
+  //전역 변수 저장 객체
+  const state = useSelector((state) => { return state });
+
+
+
+  //시행기관 담당자 목록
+  const [agent, setAgent] = React.useState({
+    userList: [], userListCount: 0, search: {
+      'government_id': state.loginUser['government_id'],
+      'agency_id': state.loginUser['agency_id'],
+      'authority': 'ROLE_AGENCY',
+    }
+  });
+  //시행기관 담당자 목록 조회
+  const agentSelectList = () => {
+    fetch("/user/userSelectList.json", {
+      method: "POST",
+      headers: {
+        'Content-Type': 'application/json; charset=UTF-8'
+      },
+      body: JSON.stringify(agent.search),
+    }).then((response) => response.json()).then((data) => {
+      data.search = agent.search;
+      console.log("시행기관 담당자 목록 조회 : ", data);
+      setAgent(data);
+    }).catch((error) => {
+      console.log('agentSelectList() /user/userSelectList.json error : ', error);
+    });
+  }
+
+
+
+
+  //검색 변수 (초기화값)
+  const [search, setSearch] = React.useState({
+    'searchType': null,
+    'searchText': null,
+    'currentPage': 1,
+    'perPage': 10,
+  });
+  const searchingEnter = (key) => {
+    if (key == 'Enter') {
+      searching();
+    } else {
+      return;
+    }
+  }
+  const searching = () => {
+    mySenior.search['searchType'] = search['searchType'];
+    mySenior.search['searchText'] = search['searchText'];
+    mySenior.search['agent_id'] = state.loginUser['user_id'];
+    setMySenior({ ...mySenior });
+
+    agencySenior.search['searchType'] = search['searchType'];
+    agencySenior.search['searchText'] = search['searchText'];
+    agencySenior.search['agency_id'] = state.loginUser['agency_id'];
+    setAgencySenior({ ...agencySenior });
+
+    mySeniorSelectList(1);
+    agencySeniorSelectList(1);
+  }
+
+
+  //보호사(간호사)의 돌봄 대상자(시니어)
+  const [mySenior, setMySenior] = React.useState({ seniorList: [], seniorListCount: 0, search: JSON.parse(JSON.stringify(search)) });
+  //보호사(간호사)의 돌봄 대상자(시니어) 목록 조회
+  const mySeniorSelectList = (currentPage) => {
+    mySenior.search.currentPage = CommonUtil.isEmpty(currentPage) ? 1 : currentPage;
+
+    fetch("/user/seniorSelectList.json", {
+      method: "POST",
+      headers: {
+        'Content-Type': 'application/json; charset=UTF-8'
+      },
+      body: JSON.stringify(mySenior.search),
+    }).then((response) => response.json()).then((data) => {
+      data.search = mySenior.search;
+      console.log("보호사(간호사)의 돌봄 대상자(시니어) 목록 조회 : ", data);
+      setMySenior(data);
+    }).catch((error) => {
+      console.log('seniorSelectList() /user/seniorSelectList.json error : ', error);
+    });
+  }
+
+
+
+  //시행기관의 대상자(시니어)
+  const [agencySenior, setAgencySenior] = React.useState({ seniorList: [], seniorListCount: 0, search: JSON.parse(JSON.stringify(search)) });
+  //시행기관의 대상자(시니어) 목록 조회
+  const agencySeniorSelectList = (currentPage) => {
+    agencySenior.search.currentPage = CommonUtil.isEmpty(currentPage) ? 1 : currentPage;
+
+    fetch("/user/seniorSelectList.json", {
+      method: "POST",
+      headers: {
+        'Content-Type': 'application/json; charset=UTF-8'
+      },
+      body: JSON.stringify(agencySenior.search),
+    }).then((response) => response.json()).then((data) => {
+      data.search = agencySenior.search;
+      console.log("시행기관의 대상자(시니어) 목록 조회 : ", data);
+      setAgencySenior(data);
+    }).catch((error) => {
+      console.log('agencySeniorSelectList() /user/seniorSelectList.json error : ', error);
+    });
+  }
+  //보호사 선택 -> 시행기관의 대상자(시니어) 목록 조회
+  const agentChange = (userId) => {
+    agencySenior.search['agent_id'] = userId;
+    setAgencySenior({ ...agencySenior });
+    agencySeniorSelectList(1);
+  }
+  //선택한 보호사의 이름
+  const getSearchAgentName = () => {
+    for (let i = 0; i < agent.userList.length; i++) {
+      if (agent.userList[i]['user_id'] == agencySenior.search['agent_id']) {
+        return agent.userList[i]['user_name'];
+      }
+    }
+    return '보호사';
+  }
+
+
+
+  //보호사의 대상자 등록
+  const agentSeniorInsert = (senior, agentId) => {
+    if (confirm(`${senior['user_name']}님을 돌봄 대상자로 추가하시겠습니까?`) == false) {
+      return;
+    } else {
+      senior['agent_id'] = state.loginUser['user_id'];
+    }
+    fetch("/user/agentSeniorInsert.json", {
+      method: "POST",
+      headers: {
+        'Content-Type': 'application/json; charset=UTF-8'
+      },
+      body: JSON.stringify(senior),
+    }).then((response) => response.json()).then((data) => {
+      if (data > 0) {
+        setTabIndex(0);
+        search.searchText = '';
+        search.searchType = '';
+        searching();
+        alert("추가완료");
+      } else {
+        alert("추가에 실패하였습니다. 관리자에게 문의바랍니다.");
+      }
+    }).catch((error) => {
+      console.log('agencySeniorSelectList() /user/seniorSelectList.json error : ', error);
+    });
+  }
+
+
+  React.useEffect(() => {
+    agentSelectList();
+    searching();
+  }, []);
+
+
+  //현재 탭 Index
+  const [tabIndex, setTabIndex] = React.useState(0);
+  //탭 초기화
+  const tab = [{
+    title: `우리기관 돌봄 대상자 (${agencySenior.seniorListCount})`,
+    content: (
+      <div>
+        <div className="flex-align-start userauthoriylist gap5">
+          <div className="left">
+            <SubTitle explanation={"우리기관 보호사"} />
+            <div style={{ fontSize: '16px', marginTop: '0px' }} className="category">
+              <a className="active" onClick={() => { agentChange(null) }}>
+                {state.loginUser['government_name']}
+              </a>
+              <ul style={{ marginLeft: '15px' }}>
+                <li style={{ margin: '10px 0px' }}>
+                  <span style={{ marginRight: '5px' }}><img src={House} alt="" /></span>
+                  <a className="active" onClick={() => { agentChange(null) }}>
+                    {state.loginUser['agency_name']}
+                  </a>
+                  <ul style={{ marginLeft: '15px' }}>
+                    {agent.userList.map((user, idx) => {
+                      return (
+                        <li style={{ margin: '10px 0px' }} key={idx}>
+                          <span style={{ marginRight: '5px' }}><img src={Arrow} alt="" /></span>
+                          <a className={user['user_id'] == agencySenior.search['agent_id'] ? "active" : ""}
+                            onClick={() => { agentChange(user['user_id']) }}>
+                            {user['user_name']}
+                            {state.loginUser['user_id'] == user['user_id']
+                              ? '(나)'
+                              : `(${user['user_id']})`
+                            }
+                          </a>
+                        </li>
+                      )
+                    })}
+                    <li style={{ margin: '10px 0px' }}>
+                      <span style={{ marginRight: '5px' }}><img src={Arrow} alt="" /></span>
+                      <a className={'IS_NULL' == agencySenior.search['agent_id'] ? "active" : ""}
+                        onClick={() => { agentChange('IS_NULL') }}>
+                        미배정
+                      </a>
+                    </li>
+                  </ul>
+                </li>
+              </ul>
+            </div>
+          </div>
+          <div className="right">
+            <div className="flex equip-tab">
+              <SubTitle explanation={CommonUtil.isEmpty(agencySenior.search['agent_id'])
+                ? '현재 기관에서 관리중인 돌봄 대상자 목록입니다.'
+                : (agencySenior.search['agent_id'] == 'IS_NULL'
+                  ? '담당자가 배정되지 않은 돌봄 대상자 목록입니다.'
+                  : `${getSearchAgentName()}님의 돌봄 대상자 목록입니다.`
+                )
+              } />
+              <div className="btn-wrap flex-end margin-bottom ">
+                {/* <button className={"btn-small gray-btn"} onClick={() => {modalEquipmentOpen()}}>등록</button> */}
+              </div>
+            </div>
+            <table className={"protector-user"}>
+              <thead>
+                <tr>
+                  <th>No</th>
+                  <th>소속기관명</th>
+                  <th>이름</th>
+                  <th>생년월일</th>
+                  <th>성별</th>
+                  <th>연락처</th>
+                  <th>보호자</th>
+                  <th>보호사</th>
+                  <th>대상자관리</th>
+                </tr>
+              </thead>
+              <tbody>
+                {agencySenior.seniorList.map((item, idx) => {
+                  return (
+                    <tr key={idx}>
+                      <td data-label="No">{agencySenior.seniorListCount - idx - (agencySenior.search.currentPage - 1) * agencySenior.search.perPage}</td>
+                      <td data-label="소속기관명">{item['agency_name']}</td>
+                      <td data-label="이름">{item['user_name']}</td>
+                      <td data-label="생년월일">{item['user_birth']}</td>
+                      <td data-label="성별">{item['user_gender']}</td>
+                      <td data-label="연락처">{item['user_phonenumber']}</td>
+                      <td data-label="보호자">
+                        {CommonUtil.isEmpty(item['guardian_user_names'])
+                          ? '없음'
+                          : item['guardian_user_names']
+                        }
+                      </td>
+                      <td data-label="보호사">
+                        {CommonUtil.isEmpty(item['agent_user_names'])
+                          ? <button className="btn-small gray-btn" onClick={() => agentSeniorInsert(item)}>내 돌봄 대상자로 추가</button>
+                          : item['agent_user_names']
+                        }
+                      </td>
+                      <td data-label="대상자관리">
+                        <button className="btn-small gray-btn" onClick={() => {
+                          navigate("/SeniorSelectOne", {
+                            state: {
+                              'senior_id': item['senior_id'],
+                              'agency_id': item['agency_id'],
+                              'government_id': item['government_id']
+                            }
+                          })
+                        }}>대상자관리</button>
+                      </td>
+                    </tr>
+                  )
+                })}
+                {CommonUtil.isEmpty(agencySenior.seniorList) ?
+                  <tr>
+                    <td colSpan={9}>조회된 데이터가 없습니다</td>
+                  </tr>
+                  : null}
+              </tbody>
+            </table>
+            <Pagination
+              currentPage={agencySenior.search.currentPage}
+              perPage={agencySenior.search.perPage}
+              totalCount={agencySenior.seniorListCount}
+              maxRange={5}
+              click={agencySeniorSelectList}
+            />
+          </div>
+        </div>
+      </div>
+    )
+  }
+  ];
+
+
+  return (
+    <main>
+      <Modal_SeniorInsert
+        open={modalSeniorInsertIsOpen}
+        close={modalSeniorInsertClose}
+        seniorInsertCallback={() => {
+          search.searchText = '';
+          search.searchType = '';
+          searching();
+          modalSeniorInsertClose();
+        }}
+        defaultAgentId={state.loginUser['user_id']}
+        defaultAgencyId={state.loginUser['agency_id']}
+        defaultGovernmentId={state.loginUser['government_id']}
+      />
+      <div className="tab-container">
+
+        <ul className="tab-menu flex-start">
+          {tab.map((item, idx) => {
+            return (
+              <li onClick={() => setTabIndex(idx)} className={idx == tabIndex ? 'active' : null}>
+                {item.title}
+              </li>
+            )
+          })}
+        </ul>
+
+        <div className="content-wrap">
+          <div className="search-management flex-start margin-bottom2">
+            <select style={{ maxWidth: '150px' }}
+              onChange={(e) => { search.searchType = e.target.value; setSearch({ ...search }); }}>
+              <option value="" selected={CommonUtil.isEmpty(search.searchType)}>전체</option>
+              <option value="user_name" selected={search.searchType == 'user_name'}>이름</option>
+              <option value="user_id" selected={search.searchType == 'user_id'}>아이디</option>
+              <option value="user_phonenumber" selected={search.searchType == 'user_phonenumber'}>연락처</option>
+            </select>
+            <input type="text" className="senior-search" value={search.searchText}
+              onChange={(e) => { search.searchText = e.target.value; setSearch({ ...search }); }}
+              onKeyUp={(e) => searchingEnter(e.key)} />
+            <button className="btn-small gray-btn" onClick={searching}>검색</button>
+          </div>
+
+          <ul className="tab-content">
+            <li>
+              {tab[tabIndex].content}
+            </li>
+          </ul>
+        </div>
+      </div>
+    </main>
+  );
+}
Add a comment
List