
--- client/views/pages/AppRoute.jsx
+++ client/views/pages/AppRoute.jsx
... | ... | @@ -106,7 +106,7 @@ |
106 | 106 |
/> |
107 | 107 |
), |
108 | 108 |
}, |
109 |
- { |
|
109 |
+ /* { |
|
110 | 110 |
title: "대상자 관리", |
111 | 111 |
icon: ( |
112 | 112 |
<Diversity1Icon |
... | ... | @@ -123,7 +123,7 @@ |
123 | 123 |
path:"/Medicalcare", |
124 | 124 |
}, |
125 | 125 |
], |
126 |
- }, |
|
126 |
+ }, */ |
|
127 | 127 |
|
128 | 128 |
|
129 | 129 |
]; |
... | ... | @@ -228,13 +228,6 @@ |
228 | 228 |
], |
229 | 229 |
}, */ |
230 | 230 |
{ |
231 |
- title: "위험 기준 관리", |
|
232 |
- path: "/RiskSet", |
|
233 |
- icon: ( |
|
234 |
- <SettingsIcon sx={{ fontSize: 20, marginRight: 1 }} /> |
|
235 |
- ) |
|
236 |
- }, |
|
237 |
- { |
|
238 | 231 |
title: "문의 현황 조회", |
239 | 232 |
path: "/QandASelect", |
240 | 233 |
icon: ( |
... | ... | @@ -242,6 +235,13 @@ |
242 | 235 |
sx={{ fontSize: 20, marginRight: 1 }} |
243 | 236 |
/> |
244 | 237 |
) |
238 |
+ }, |
|
239 |
+ { |
|
240 |
+ title: "위험 기준 관리", |
|
241 |
+ path: "/RiskSet", |
|
242 |
+ icon: ( |
|
243 |
+ <SettingsIcon sx={{ fontSize: 20, marginRight: 1 }} /> |
|
244 |
+ ) |
|
245 | 245 |
} |
246 | 246 |
]; |
247 | 247 |
function GovernmentAppRoute() { |
--- client/views/pages/healthcare/Healthcare.jsx
+++ client/views/pages/healthcare/Healthcare.jsx
... | ... | @@ -1,243 +1,294 @@ |
1 |
-import React, { useState } from "react"; |
|
2 |
-import ContentTitle from "../../component/ContentTitle.jsx"; |
|
1 |
+import React from "react"; |
|
2 |
+import { useNavigate, useLocation } from "react-router"; |
|
3 |
+import { useSelector } from "react-redux"; |
|
4 |
+ |
|
3 | 5 |
import SubTitle from "../../component/SubTitle.jsx"; |
4 |
-import Modal from "../../component/Modal.jsx"; |
|
5 |
-import Table from "../../component/Table.jsx"; |
|
6 |
-import Button from "../../component/Button.jsx"; |
|
7 |
-import { useNavigate } from "react-router"; |
|
8 |
-import { width } from "@mui/system"; |
|
9 |
-import DetailSearch from "../../component/DetailSearch.jsx"; |
|
10 | 6 |
import DetailTitle from "../../component/DetailTitle.jsx"; |
11 |
-import person from "../../../resources/files/icon/person.png"; |
|
7 |
+import Pagination from "../../component/Pagination.jsx"; |
|
12 | 8 |
|
13 |
-export default function Healthcare() { |
|
9 |
+import CommonUtil from "../../../resources/js/CommonUtil.js"; |
|
10 |
+ |
|
11 |
+ |
|
12 |
+export default function UserAuthoriySelect() { |
|
14 | 13 |
const navigate = useNavigate(); |
15 |
- const [tapName, setTapName] = useState("복약관리") |
|
16 |
- const thead = [ |
|
17 |
- "No", "이름", "대상자등록번호", "생년월일", "연락처", "주소", "최근 복약률", |
|
18 |
- ]; |
|
19 |
- const key = [ |
|
20 |
- "No", "name", "number", "birth", "phone", "address", "average", |
|
21 |
- ]; |
|
22 |
- const content = [ |
|
23 |
- { |
|
24 |
- No: ( |
|
25 |
- <p><span><img src={person} alt="" />{thead[0]}</span> 1</p> |
|
26 |
- ), |
|
27 |
- name: ( |
|
28 |
- <p><span>{thead[1]}</span> 김복남</p> |
|
29 |
- ), |
|
30 |
- number: ( |
|
31 |
- <p><span>{thead[2]}</span> 00000001</p> |
|
32 |
- ), |
|
33 |
- birth: ( |
|
34 |
- <p><span>{thead[3]}</span> 1948.11.15</p> |
|
35 |
- ), |
|
36 |
- phone: ( |
|
37 |
- <p><span>{thead[4]}</span> 010-1234-5678</p> |
|
38 |
- ), |
|
39 |
- address: ( |
|
40 |
- <p><span>{thead[5]}</span> 경상북도 군위군 삼국유사면</p> |
|
41 |
- ), |
|
42 |
- average: ( |
|
43 |
- <p><span>{thead[6]}</span> 0%</p> |
|
44 |
- ), |
|
45 |
- // detail: ( |
|
46 |
- // <Button |
|
47 |
- // className={"btn-small gray-btn"} |
|
48 |
- // btnName={"보기"} |
|
49 |
- // onClick={() => { |
|
50 |
- // navigate("/MedicineCareSelectOne"); |
|
51 |
- // }} |
|
52 |
- // /> |
|
53 |
- // ), |
|
54 |
- }, |
|
14 |
+ const location = useLocation(); |
|
55 | 15 |
|
56 |
- ]; |
|
16 |
+ //전역 변수 저장 객체 |
|
17 |
+ const state = useSelector((state) => {return state}); |
|
57 | 18 |
|
58 |
- const thead1 = [ |
|
59 |
- "No", "이름", "대상자등록번호", "생년월일", "연락처", "주소", "최근 최저 온도", "최근 최고 온도", |
|
60 |
- ]; |
|
61 |
- const key1 = ["No", "name", "number", "birth", "phone", "address", "low", "high", |
|
62 |
- ]; |
|
63 |
- const content1 = [ |
|
64 |
- { |
|
65 |
- No: ( |
|
66 |
- <p><span><img src={person} alt="" />{thead1[0]}</span> 1</p> |
|
67 |
- ), |
|
68 |
- name: ( |
|
69 |
- <p><span>{thead1[1]}</span> 김복남</p> |
|
70 |
- ), |
|
71 |
- number: ( |
|
72 |
- <p><span>{thead1[2]}</span> 00000001</p> |
|
73 |
- ), |
|
74 |
- birth: ( |
|
75 |
- <p><span>{thead1[3]}</span> 1948.11.15</p> |
|
76 |
- ), |
|
77 |
- phone: ( |
|
78 |
- <p><span>{thead1[4]}</span> 010-1234-5678</p> |
|
79 |
- ), |
|
80 |
- address: ( |
|
81 |
- <p><span>{thead1[5]}</span> 경상북도 군위군 삼국유사면</p> |
|
82 |
- ), |
|
83 |
- high: ( |
|
84 |
- <p><span>{thead1[6]}</span> 18°C</p> |
|
85 |
- ), |
|
86 |
- low: ( |
|
87 |
- <p><span>{thead1[7]}</span> 18°C</p> |
|
88 |
- ), |
|
89 |
- // detail: ( |
|
90 |
- // <Button |
|
91 |
- // className={"btn-small gray-btn"} |
|
92 |
- // btnName={"보기"} |
|
93 |
- // onClick={() => { |
|
94 |
- // navigate("/TemperatureManagementSelectOne"); |
|
95 |
- // }} |
|
96 |
- // /> |
|
97 |
- // ), |
|
19 |
+ //검색(엔터) |
|
20 |
+ const searchingEnter = (key) => { |
|
21 |
+ if (key == 'Enter') { |
|
22 |
+ searching(); |
|
23 |
+ } else { |
|
24 |
+ return; |
|
25 |
+ } |
|
26 |
+ } |
|
27 |
+ //검색 |
|
28 |
+ const searching = () => { |
|
29 |
+ if (CommonUtil.isEmpty(state.loginUser) == false |
|
30 |
+ && state.loginUser['authority'] == 'ROLE_AGENCY' && isMySenior) { |
|
31 |
+ senior.search['agent_id'] = state.loginUser['user_id']; |
|
32 |
+ } else { |
|
33 |
+ senior.search['agent_id'] = null; |
|
98 | 34 |
} |
99 |
- ]; |
|
100 |
- const thead2 = [ |
|
101 |
- "No", "이름", "대상자등록번호", "생년월일", "연락처", "주소", "최근 방문일", "방문목적", "상세사유", |
|
102 |
- ]; |
|
103 |
- const key2 = [ |
|
104 |
- "No", "name", "number", "birth", "phone", "address", "visit", "reason", "reason_detail", |
|
105 |
- ]; |
|
106 |
- const content2 = [ |
|
107 |
- { |
|
108 |
- No: ( |
|
109 |
- <p><span><img src={person} alt="" />{thead2[0]}</span> 1</p> |
|
110 |
- ), |
|
111 |
- name: ( |
|
112 |
- <p><span>{thead2[1]}</span> 김복남</p> |
|
113 |
- ), |
|
114 |
- number: |
|
115 |
- ( |
|
116 |
- <p><span>{thead2[2]}</span> 00000001</p> |
|
117 |
- ), |
|
118 |
- birth: |
|
119 |
- ( |
|
120 |
- <p><span>{thead2[3]}</span> 1948.11.15</p> |
|
121 |
- ), |
|
122 |
- phone: ( |
|
123 |
- <p><span>{thead2[4]}</span> 010-1234-5678</p> |
|
124 |
- ), |
|
125 |
- address: ( |
|
126 |
- <p><span>{thead2[5]}</span> 경상북도 군위군 삼국유사면</p> |
|
127 |
- ), |
|
128 |
- visit: ( |
|
129 |
- <p><span>{thead2[6]}</span> 2023.02.08</p> |
|
130 |
- ), |
|
131 |
- reason: ( |
|
132 |
- <p><span>{thead2[7]}</span> 정기방문</p> |
|
133 |
- ), |
|
134 |
- reason_detail: ( |
|
135 |
- <p><span>{thead2[8]}</span> 정기방문일</p> |
|
136 |
- ), |
|
137 |
- // detail: ( |
|
138 |
- // <Button |
|
139 |
- // className={"btn-small gray-btn"} |
|
140 |
- // btnName={"보기"} |
|
141 |
- // onClick={() => { |
|
142 |
- // navigate("/VisitSelectOne"); |
|
143 |
- // }} |
|
144 |
- // /> |
|
145 |
- // ), |
|
146 |
- }, |
|
147 |
- ]; |
|
148 |
- const data = [ |
|
149 |
- { |
|
150 |
- id: 1, |
|
151 |
- title: "복약관리", |
|
152 |
- description: ( |
|
153 |
- <Table |
|
154 |
- className={" senior-table"} |
|
155 |
- head={thead} |
|
156 |
- contents={content} |
|
157 |
- contentKey={key} |
|
158 |
- view={"mySeniorMedicine"} |
|
159 |
- onClick={() => { |
|
160 |
- navigate("/MedicineCareSelectOne"); |
|
161 |
- }} |
|
162 |
- /> |
|
163 |
- ), |
|
164 |
- }, |
|
165 |
- { |
|
166 |
- id: 2, |
|
167 |
- title: "댁내온도관리", |
|
168 |
- description: ( |
|
169 |
- <Table |
|
170 |
- className={"senior-table"} |
|
171 |
- head={thead1} |
|
172 |
- contents={content1} |
|
173 |
- contentKey={key1} |
|
174 |
- view={"mySeniorTemperature"} |
|
175 |
- onClick={() => { |
|
176 |
- navigate("/TemperatureManagementSelectOne"); |
|
177 |
- }} |
|
178 |
- /> |
|
179 |
- ), |
|
180 |
- }, |
|
181 |
- { |
|
182 |
- id: 3, |
|
183 |
- title: "방문관리", |
|
184 |
- description: ( |
|
185 |
- <Table |
|
186 |
- className={"senior-table"} |
|
187 |
- head={thead2} |
|
188 |
- contents={content2} |
|
189 |
- contentKey={key2} |
|
190 |
- view={"mySeniorVisit"} |
|
191 |
- onClick={() => { |
|
192 |
- navigate("/VisitSelectOne"); |
|
193 |
- }} |
|
194 |
- /> |
|
195 |
- ), |
|
196 |
- }, |
|
197 |
- ] |
|
198 |
- const [index, setIndex] = React.useState(1); |
|
35 |
+ |
|
36 |
+ setSenior({...senior}); |
|
37 |
+ |
|
38 |
+ seniorSelectList(1); |
|
39 |
+ } |
|
40 |
+ |
|
41 |
+ const [isMySenior, setIsMySenior] = React.useState(true); |
|
42 |
+ React.useEffect(() => { |
|
43 |
+ searching(); |
|
44 |
+ }, [isMySenior]) |
|
45 |
+ //보호사(간호사)의 돌봄 대상자(시니어) |
|
46 |
+ const [senior, setSenior] = React.useState({seniorList: [], seniorListCount: 0, search: { |
|
47 |
+ 'government_id': CommonUtil.isEmpty(state.loginUser) ? null : state.loginUser['government_id'], |
|
48 |
+ 'agency_id': CommonUtil.isEmpty(state.loginUser) ? null : state.loginUser['agency_id'], |
|
49 |
+ 'searchType': null, |
|
50 |
+ 'searchText': null, |
|
51 |
+ 'currentPage': 1, |
|
52 |
+ 'perPage': 10, |
|
53 |
+ }}); |
|
54 |
+ //보호사(간호사)의 돌봄 대상자(시니어) 목록 조회 |
|
55 |
+ const seniorSelectList = (currentPage) => { |
|
56 |
+ senior.search.currentPage = CommonUtil.isEmpty(currentPage) ? 1 : currentPage; |
|
57 |
+ |
|
58 |
+ fetch("/user/seniorSelectList.json", { |
|
59 |
+ method: "POST", |
|
60 |
+ headers: { |
|
61 |
+ 'Content-Type': 'application/json; charset=UTF-8' |
|
62 |
+ }, |
|
63 |
+ body: JSON.stringify(senior.search), |
|
64 |
+ }).then((response) => response.json()).then((data) => { |
|
65 |
+ data.search = senior.search; |
|
66 |
+ console.log("돌봄 대상자(시니어) 목록 조회 : ", data); |
|
67 |
+ setSenior(data); |
|
68 |
+ }).catch((error) => { |
|
69 |
+ console.log('seniorSelectList() /user/seniorSelectList.json error : ', error); |
|
70 |
+ }); |
|
71 |
+ } |
|
72 |
+ |
|
73 |
+ |
|
74 |
+ React.useEffect(() => { |
|
75 |
+ searching(); |
|
76 |
+ }, []); |
|
77 |
+ |
|
78 |
+ |
|
79 |
+ //현재 탭 Index |
|
80 |
+ const [tabIndex, setTabIndex] = React.useState(0); |
|
81 |
+ //탭 초기화 |
|
82 |
+ const tab = [{ |
|
83 |
+ title: `복약관리`, |
|
84 |
+ content: ( |
|
85 |
+ <div> |
|
86 |
+ <div className="flex equip-tab"> |
|
87 |
+ <SubTitle explanation={"돌봄 대상자 클릭 시, 상세페이지로 이동합니다."} /> |
|
88 |
+ </div> |
|
89 |
+ <table className={"protector-user"}> |
|
90 |
+ <thead> |
|
91 |
+ <tr> |
|
92 |
+ <th>No</th> |
|
93 |
+ <th>소속기관명</th> |
|
94 |
+ <th>이름</th> |
|
95 |
+ <th>생년월일</th> |
|
96 |
+ <th>성별</th> |
|
97 |
+ <th>연락처</th> |
|
98 |
+ <th>최근복약률</th> |
|
99 |
+ </tr> |
|
100 |
+ </thead> |
|
101 |
+ <tbody> |
|
102 |
+ {senior.seniorList.map((item, idx) => { return ( |
|
103 |
+ <tr key={idx} onClick={() => { |
|
104 |
+ navigate("/MedicineCareSelectOne"); |
|
105 |
+ }}> |
|
106 |
+ <td data-label="No">{senior.seniorListCount - idx - (senior.search.currentPage - 1) * senior.search.perPage}</td> |
|
107 |
+ <td data-label="소속기관명">{item['agency_name']}</td> |
|
108 |
+ <td data-label="이름">{item['user_name']}</td> |
|
109 |
+ <td data-label="생년월일">{item['user_birth']}</td> |
|
110 |
+ <td data-label="성별">{item['user_gender']}</td> |
|
111 |
+ <td data-label="연락처">{item['user_phonenumber']}</td> |
|
112 |
+ <td data-label="문진표관리"> |
|
113 |
+ 80% |
|
114 |
+ </td> |
|
115 |
+ </tr> |
|
116 |
+ )})} |
|
117 |
+ {CommonUtil.isEmpty(senior.seniorList) ? |
|
118 |
+ <tr> |
|
119 |
+ <td colSpan={7}>조회된 데이터가 없습니다</td> |
|
120 |
+ </tr> |
|
121 |
+ : null} |
|
122 |
+ </tbody> |
|
123 |
+ </table> |
|
124 |
+ <Pagination |
|
125 |
+ currentPage={senior.search.currentPage} |
|
126 |
+ perPage={senior.search.perPage} |
|
127 |
+ totalCount={senior.seniorListCount} |
|
128 |
+ maxRange={5} |
|
129 |
+ click={seniorSelectList} |
|
130 |
+ /> |
|
131 |
+ </div> |
|
132 |
+ ) |
|
133 |
+ }, { |
|
134 |
+ title: `댁내온도관리`, |
|
135 |
+ content: ( |
|
136 |
+ <div> |
|
137 |
+ <div className="flex equip-tab"> |
|
138 |
+ <SubTitle explanation={"돌봄 대상자 클릭 시, 상세페이지로 이동합니다."} /> |
|
139 |
+ </div> |
|
140 |
+ <table className={"protector-user"}> |
|
141 |
+ <thead> |
|
142 |
+ <tr> |
|
143 |
+ <th>No</th> |
|
144 |
+ <th>소속기관명</th> |
|
145 |
+ <th>이름</th> |
|
146 |
+ <th>생년월일</th> |
|
147 |
+ <th>성별</th> |
|
148 |
+ <th>연락처</th> |
|
149 |
+ <th>최근최저온도</th> |
|
150 |
+ <th>최근최고온도</th> |
|
151 |
+ </tr> |
|
152 |
+ </thead> |
|
153 |
+ <tbody> |
|
154 |
+ {senior.seniorList.map((item, idx) => { return ( |
|
155 |
+ <tr key={idx} onClick={() => { |
|
156 |
+ navigate("/TemperatureManagementSelectOne"); |
|
157 |
+ }}> |
|
158 |
+ <td data-label="No">{senior.seniorListCount - idx - (senior.search.currentPage - 1) * senior.search.perPage}</td> |
|
159 |
+ <td data-label="소속기관명">{item['agency_name']}</td> |
|
160 |
+ <td data-label="이름">{item['user_name']}</td> |
|
161 |
+ <td data-label="생년월일">{item['user_birth']}</td> |
|
162 |
+ <td data-label="성별">{item['user_gender']}</td> |
|
163 |
+ <td data-label="연락처">{item['user_phonenumber']}</td> |
|
164 |
+ <td data-label="최근최저온도"> |
|
165 |
+ 18℃ |
|
166 |
+ </td> |
|
167 |
+ <td data-label="최근최고온도"> |
|
168 |
+ 26℃ |
|
169 |
+ </td> |
|
170 |
+ </tr> |
|
171 |
+ )})} |
|
172 |
+ {CommonUtil.isEmpty(senior.seniorList) ? |
|
173 |
+ <tr> |
|
174 |
+ <td colSpan={8}>조회된 데이터가 없습니다</td> |
|
175 |
+ </tr> |
|
176 |
+ : null} |
|
177 |
+ </tbody> |
|
178 |
+ </table> |
|
179 |
+ <Pagination |
|
180 |
+ currentPage={senior.search.currentPage} |
|
181 |
+ perPage={senior.search.perPage} |
|
182 |
+ totalCount={senior.seniorListCount} |
|
183 |
+ maxRange={5} |
|
184 |
+ click={seniorSelectList} |
|
185 |
+ /> |
|
186 |
+ </div> |
|
187 |
+ ) |
|
188 |
+ }, { |
|
189 |
+ title: `방문관리`, |
|
190 |
+ content: ( |
|
191 |
+ <div> |
|
192 |
+ <div className="flex equip-tab"> |
|
193 |
+ <SubTitle explanation={"돌봄 대상자 클릭 시, 상세페이지로 이동합니다."} /> |
|
194 |
+ </div> |
|
195 |
+ <table className={"protector-user"}> |
|
196 |
+ <thead> |
|
197 |
+ <tr> |
|
198 |
+ <th>No</th> |
|
199 |
+ <th>소속기관명</th> |
|
200 |
+ <th>이름</th> |
|
201 |
+ <th>생년월일</th> |
|
202 |
+ <th>성별</th> |
|
203 |
+ <th>연락처</th> |
|
204 |
+ <th>최근방문일</th> |
|
205 |
+ <th>방문목적</th> |
|
206 |
+ </tr> |
|
207 |
+ </thead> |
|
208 |
+ <tbody> |
|
209 |
+ {senior.seniorList.map((item, idx) => { return ( |
|
210 |
+ <tr key={idx} onClick={() => { |
|
211 |
+ navigate("/VisitSelectOne"); |
|
212 |
+ }}> |
|
213 |
+ <td data-label="No">{senior.seniorListCount - idx - (senior.search.currentPage - 1) * senior.search.perPage}</td> |
|
214 |
+ <td data-label="소속기관명">{item['agency_name']}</td> |
|
215 |
+ <td data-label="이름">{item['user_name']}</td> |
|
216 |
+ <td data-label="생년월일">{item['user_birth']}</td> |
|
217 |
+ <td data-label="성별">{item['user_gender']}</td> |
|
218 |
+ <td data-label="연락처">{item['user_phonenumber']}</td> |
|
219 |
+ <td>2023-04-11</td> |
|
220 |
+ <td>정기방문</td> |
|
221 |
+ </tr> |
|
222 |
+ )})} |
|
223 |
+ {CommonUtil.isEmpty(senior.seniorList) ? |
|
224 |
+ <tr> |
|
225 |
+ <td colSpan={8}>조회된 데이터가 없습니다</td> |
|
226 |
+ </tr> |
|
227 |
+ : null} |
|
228 |
+ </tbody> |
|
229 |
+ </table> |
|
230 |
+ <Pagination |
|
231 |
+ currentPage={senior.search.currentPage} |
|
232 |
+ perPage={senior.search.perPage} |
|
233 |
+ totalCount={senior.seniorListCount} |
|
234 |
+ maxRange={5} |
|
235 |
+ click={seniorSelectList} |
|
236 |
+ /> |
|
237 |
+ </div> |
|
238 |
+ ) |
|
239 |
+ }]; |
|
199 | 240 |
|
200 | 241 |
return ( |
201 | 242 |
<main> |
243 |
+ <div className="search-management flex-start margin-bottom2"> |
|
244 |
+ <select style={{maxWidth: '150px'}} |
|
245 |
+ onChange={(e) => {senior.search.searchType = e.target.value; setSenior({...senior});}}> |
|
246 |
+ <option value="" selected={CommonUtil.isEmpty(senior.search.searchType)}>전체</option> |
|
247 |
+ <option value="user_name" selected={senior.search.searchType == 'user_name'}>이름</option> |
|
248 |
+ <option value="user_id" selected={senior.search.searchType == 'user_id'}>아이디</option> |
|
249 |
+ <option value="user_phonenumber" selected={senior.search.searchType == 'user_phonenumber'}>연락처</option> |
|
250 |
+ </select> |
|
251 |
+ <input type="text" className="senior-search" value={senior.search.searchText} |
|
252 |
+ onChange={(e) => {senior.search.searchText = e.target.value; setSenior({...senior});}} |
|
253 |
+ onKeyUp={(e) => searchingEnter(e)}/> |
|
254 |
+ <button className="btn-small gray-btn" onClick={searching}>검색</button> |
|
255 |
+ </div> |
|
256 |
+ |
|
202 | 257 |
<div className="content-wrap"> |
203 |
- <DetailTitle contentTitle={"대상자의 복약 / 댁내온도 / 방문 관리를 할 수 있습니다."} /> |
|
204 |
- <div |
|
205 |
- style={{ height: "calc(100% - 61px)" }} |
|
206 |
- > |
|
258 |
+ <DetailTitle contentTitle={"대상자의 문진표 / 심전도 / 혈압 관리를 할 수 있습니다."} /> |
|
259 |
+ |
|
260 |
+ <div style={{ height: "calc(100% - 61px)" }}> |
|
207 | 261 |
<div className="right" style={{ height: "100%", }}> |
208 | 262 |
<div style={{ height: "100%" }}> |
209 |
- <div className="tab-container" style={{ marginTop: "5rem", }}> |
|
263 |
+ <div className="tab-container" style={{ marginTop: "5rem"}}> |
|
264 |
+ {CommonUtil.isEmpty(state.loginUser) == false && state.loginUser['authority'] == 'ROLE_AGENCY' ? |
|
265 |
+ <div className="flex-end margin-bottom"> |
|
266 |
+ <div className="flex searchselect" style={{width: 'auto'}}> |
|
267 |
+ |
|
268 |
+ <input type="radio" id="my_senior" name="senior" checked={isMySenior} |
|
269 |
+ onChange={(e) => {e.target.checked ? setIsMySenior(true) : null}}/> |
|
270 |
+ <label for="my_senior" style={{marginRight: '3rem'}}>나의 대상자 보기</label> |
|
271 |
+ |
|
272 |
+ <input type="radio" id="all_senior" name="senior" checked={!isMySenior} |
|
273 |
+ onChange={(e) => {e.target.checked ? setIsMySenior(false) : null}}/> |
|
274 |
+ <label for="all_senior" style={{marginRight: '0'}}>전체 대상자 보기</label> |
|
275 |
+ |
|
276 |
+ </div> |
|
277 |
+ </div> |
|
278 |
+ :null} |
|
210 | 279 |
<ul className="tab-menu flex-end"> |
211 |
- {data.map((item) => ( |
|
212 |
- <li |
|
213 |
- key={item.id} |
|
214 |
- className={index === item.id ? "active" : null} |
|
215 |
- onClick={() => setIndex(item.id)} |
|
216 |
- > |
|
217 |
- {item.title} |
|
218 |
- </li> |
|
219 |
- ))} |
|
280 |
+ {tab.map((item, idx) => { return ( |
|
281 |
+ <li onClick={() => setTabIndex(idx)} className={idx == tabIndex ? 'active' : null}> |
|
282 |
+ {item.title} |
|
283 |
+ </li> |
|
284 |
+ )})} |
|
220 | 285 |
</ul> |
221 |
- <div className="content-wrap userlist"> |
|
286 |
+ <div className="content-wrap userlist"> |
|
222 | 287 |
|
223 |
- <div className="search-management flex-start margin-bottom2"> |
|
224 |
- <DetailSearch /> |
|
225 |
- </div> |
|
226 |
- <div className="flex"> |
|
227 |
- <SubTitle explanation={"대상자 클릭 시 상세페이지로 이동합니다."} className="margin-bottom" /> |
|
228 |
- <div className="flex searchselect"> |
|
229 |
- <input type="radio"/> |
|
230 |
- <label htmlFor="">나의 대상자 보기</label> |
|
231 |
- <input type="radio" /> |
|
232 |
- <label htmlFor="">전체 대상자 보기</label> |
|
233 |
- </div> |
|
234 |
- </div> |
|
235 | 288 |
<ul className="tab-content"> |
236 |
- {data |
|
237 |
- .filter((item) => index === item.id) |
|
238 |
- .map((item) => ( |
|
239 |
- <li>{item.description}</li> |
|
240 |
- ))} |
|
289 |
+ <li> |
|
290 |
+ {tab[tabIndex].content} |
|
291 |
+ </li> |
|
241 | 292 |
</ul> |
242 | 293 |
</div> |
243 | 294 |
</div> |
+++ client/views/pages/healthcare/Healthcare_back_230413.jsx
... | ... | @@ -0,0 +1,250 @@ |
1 | +import React, { useState } from "react"; | |
2 | +import ContentTitle from "../../component/ContentTitle.jsx"; | |
3 | +import SubTitle from "../../component/SubTitle.jsx"; | |
4 | +import Modal from "../../component/Modal.jsx"; | |
5 | +import Table from "../../component/Table.jsx"; | |
6 | +import Button from "../../component/Button.jsx"; | |
7 | +import { useNavigate } from "react-router"; | |
8 | +import { width } from "@mui/system"; | |
9 | +import DetailSearch from "../../component/DetailSearch.jsx"; | |
10 | +import DetailTitle from "../../component/DetailTitle.jsx"; | |
11 | +import person from "../../../resources/files/icon/person.png"; | |
12 | + | |
13 | +export default function Healthcare() { | |
14 | + const navigate = useNavigate(); | |
15 | + const [tapName, setTapName] = useState("복약관리") | |
16 | + const thead = [ | |
17 | + "No", "이름", "대상자등록번호", "생년월일", "연락처", "주소", "최근 복약률", | |
18 | + ]; | |
19 | + const key = [ | |
20 | + "No", "name", "number", "birth", "phone", "address", "average", | |
21 | + ]; | |
22 | + const content = [ | |
23 | + { | |
24 | + No: ( | |
25 | + <p><span><img src={person} alt="" />{thead[0]}</span> 1</p> | |
26 | + ), | |
27 | + name: ( | |
28 | + <p><span>{thead[1]}</span> 김복남</p> | |
29 | + ), | |
30 | + number: ( | |
31 | + <p><span>{thead[2]}</span> 00000001</p> | |
32 | + ), | |
33 | + birth: ( | |
34 | + <p><span>{thead[3]}</span> 1948.11.15</p> | |
35 | + ), | |
36 | + phone: ( | |
37 | + <p><span>{thead[4]}</span> 010-1234-5678</p> | |
38 | + ), | |
39 | + address: ( | |
40 | + <p><span>{thead[5]}</span> 경상북도 군위군 삼국유사면</p> | |
41 | + ), | |
42 | + average: ( | |
43 | + <p><span>{thead[6]}</span> 0%</p> | |
44 | + ), | |
45 | + // detail: ( | |
46 | + // <Button | |
47 | + // className={"btn-small gray-btn"} | |
48 | + // btnName={"보기"} | |
49 | + // onClick={() => { | |
50 | + // navigate("/MedicineCareSelectOne"); | |
51 | + // }} | |
52 | + // /> | |
53 | + // ), | |
54 | + }, | |
55 | + | |
56 | + ]; | |
57 | + | |
58 | + const thead1 = [ | |
59 | + "No", "이름", "대상자등록번호", "생년월일", "연락처", "주소", "최근 최저 온도", "최근 최고 온도", | |
60 | + ]; | |
61 | + const key1 = ["No", "name", "number", "birth", "phone", "address", "low", "high", | |
62 | + ]; | |
63 | + const content1 = [ | |
64 | + { | |
65 | + No: ( | |
66 | + <p><span><img src={person} alt="" />{thead1[0]}</span> 1</p> | |
67 | + ), | |
68 | + name: ( | |
69 | + <p><span>{thead1[1]}</span> 김복남</p> | |
70 | + ), | |
71 | + number: ( | |
72 | + <p><span>{thead1[2]}</span> 00000001</p> | |
73 | + ), | |
74 | + birth: ( | |
75 | + <p><span>{thead1[3]}</span> 1948.11.15</p> | |
76 | + ), | |
77 | + phone: ( | |
78 | + <p><span>{thead1[4]}</span> 010-1234-5678</p> | |
79 | + ), | |
80 | + address: ( | |
81 | + <p><span>{thead1[5]}</span> 경상북도 군위군 삼국유사면</p> | |
82 | + ), | |
83 | + high: ( | |
84 | + <p><span>{thead1[6]}</span> 18°C</p> | |
85 | + ), | |
86 | + low: ( | |
87 | + <p><span>{thead1[7]}</span> 18°C</p> | |
88 | + ), | |
89 | + // detail: ( | |
90 | + // <Button | |
91 | + // className={"btn-small gray-btn"} | |
92 | + // btnName={"보기"} | |
93 | + // onClick={() => { | |
94 | + // navigate("/TemperatureManagementSelectOne"); | |
95 | + // }} | |
96 | + // /> | |
97 | + // ), | |
98 | + } | |
99 | + ]; | |
100 | + const thead2 = [ | |
101 | + "No", "이름", "대상자등록번호", "생년월일", "연락처", "주소", "최근 방문일", "방문목적", "상세사유", | |
102 | + ]; | |
103 | + const key2 = [ | |
104 | + "No", "name", "number", "birth", "phone", "address", "visit", "reason", "reason_detail", | |
105 | + ]; | |
106 | + const content2 = [ | |
107 | + { | |
108 | + No: ( | |
109 | + <p><span><img src={person} alt="" />{thead2[0]}</span> 1</p> | |
110 | + ), | |
111 | + name: ( | |
112 | + <p><span>{thead2[1]}</span> 김복남</p> | |
113 | + ), | |
114 | + number: | |
115 | + ( | |
116 | + <p><span>{thead2[2]}</span> 00000001</p> | |
117 | + ), | |
118 | + birth: | |
119 | + ( | |
120 | + <p><span>{thead2[3]}</span> 1948.11.15</p> | |
121 | + ), | |
122 | + phone: ( | |
123 | + <p><span>{thead2[4]}</span> 010-1234-5678</p> | |
124 | + ), | |
125 | + address: ( | |
126 | + <p><span>{thead2[5]}</span> 경상북도 군위군 삼국유사면</p> | |
127 | + ), | |
128 | + visit: ( | |
129 | + <p><span>{thead2[6]}</span> 2023.02.08</p> | |
130 | + ), | |
131 | + reason: ( | |
132 | + <p><span>{thead2[7]}</span> 정기방문</p> | |
133 | + ), | |
134 | + reason_detail: ( | |
135 | + <p><span>{thead2[8]}</span> 정기방문일</p> | |
136 | + ), | |
137 | + // detail: ( | |
138 | + // <Button | |
139 | + // className={"btn-small gray-btn"} | |
140 | + // btnName={"보기"} | |
141 | + // onClick={() => { | |
142 | + // navigate("/VisitSelectOne"); | |
143 | + // }} | |
144 | + // /> | |
145 | + // ), | |
146 | + }, | |
147 | + ]; | |
148 | + const data = [ | |
149 | + { | |
150 | + id: 1, | |
151 | + title: "복약관리", | |
152 | + description: ( | |
153 | + <Table | |
154 | + className={" senior-table"} | |
155 | + head={thead} | |
156 | + contents={content} | |
157 | + contentKey={key} | |
158 | + view={"mySeniorMedicine"} | |
159 | + onClick={() => { | |
160 | + navigate("/MedicineCareSelectOne"); | |
161 | + }} | |
162 | + /> | |
163 | + ), | |
164 | + }, | |
165 | + { | |
166 | + id: 2, | |
167 | + title: "댁내온도관리", | |
168 | + description: ( | |
169 | + <Table | |
170 | + className={"senior-table"} | |
171 | + head={thead1} | |
172 | + contents={content1} | |
173 | + contentKey={key1} | |
174 | + view={"mySeniorTemperature"} | |
175 | + onClick={() => { | |
176 | + navigate("/TemperatureManagementSelectOne"); | |
177 | + }} | |
178 | + /> | |
179 | + ), | |
180 | + }, | |
181 | + { | |
182 | + id: 3, | |
183 | + title: "방문관리", | |
184 | + description: ( | |
185 | + <Table | |
186 | + className={"senior-table"} | |
187 | + head={thead2} | |
188 | + contents={content2} | |
189 | + contentKey={key2} | |
190 | + view={"mySeniorVisit"} | |
191 | + onClick={() => { | |
192 | + navigate("/VisitSelectOne"); | |
193 | + }} | |
194 | + /> | |
195 | + ), | |
196 | + }, | |
197 | + ] | |
198 | + const [index, setIndex] = React.useState(1); | |
199 | + | |
200 | + return ( | |
201 | + <main> | |
202 | + <div className="content-wrap"> | |
203 | + <DetailTitle contentTitle={"대상자의 복약 / 댁내온도 / 방문 관리를 할 수 있습니다."} /> | |
204 | + <div | |
205 | + style={{ height: "calc(100% - 61px)" }} | |
206 | + > | |
207 | + <div className="right" style={{ height: "100%", }}> | |
208 | + <div style={{ height: "100%" }}> | |
209 | + <div className="tab-container" style={{ marginTop: "5rem", }}> | |
210 | + <ul className="tab-menu flex-end"> | |
211 | + {data.map((item) => ( | |
212 | + <li | |
213 | + key={item.id} | |
214 | + className={index === item.id ? "active" : null} | |
215 | + onClick={() => setIndex(item.id)} | |
216 | + > | |
217 | + {item.title} | |
218 | + </li> | |
219 | + ))} | |
220 | + </ul> | |
221 | + <div className="content-wrap userlist"> | |
222 | + | |
223 | + <div className="search-management flex-start margin-bottom2"> | |
224 | + <DetailSearch /> | |
225 | + </div> | |
226 | + <div className="flex"> | |
227 | + <SubTitle explanation={"대상자 클릭 시 상세페이지로 이동합니다."} className="margin-bottom" /> | |
228 | + <div className="flex searchselect"> | |
229 | + <input type="radio"/> | |
230 | + <label htmlFor="">나의 대상자 보기</label> | |
231 | + <input type="radio" /> | |
232 | + <label htmlFor="">전체 대상자 보기</label> | |
233 | + </div> | |
234 | + </div> | |
235 | + <ul className="tab-content"> | |
236 | + {data | |
237 | + .filter((item) => index === item.id) | |
238 | + .map((item) => ( | |
239 | + <li>{item.description}</li> | |
240 | + ))} | |
241 | + </ul> | |
242 | + </div> | |
243 | + </div> | |
244 | + </div> | |
245 | + </div> | |
246 | + </div> | |
247 | + </div> | |
248 | + </main> | |
249 | + ); | |
250 | +} |
--- client/views/pages/healthcare/Medicalcare.jsx
+++ client/views/pages/healthcare/Medicalcare.jsx
... | ... | @@ -1,258 +1,622 @@ |
1 |
-import React, { useState } from "react"; |
|
2 |
-import ContentTitle from "../../component/ContentTitle.jsx"; |
|
1 |
+import React from "react"; |
|
2 |
+import { useNavigate, useLocation } from "react-router"; |
|
3 |
+import { useSelector } from "react-redux"; |
|
4 |
+ |
|
5 |
+ |
|
3 | 6 |
import SubTitle from "../../component/SubTitle.jsx"; |
4 | 7 |
import Modal from "../../component/Modal.jsx"; |
5 |
-import Table from "../../component/Table.jsx"; |
|
6 |
-import Button from "../../component/Button.jsx"; |
|
7 |
-import { useNavigate } from "react-router"; |
|
8 |
-import { width } from "@mui/system"; |
|
9 |
-import DetailSearch from "../../component/DetailSearch.jsx"; |
|
10 | 8 |
import DetailTitle from "../../component/DetailTitle.jsx"; |
11 | 9 |
import Modal_Questionnaire from "../../component/Modal_Questionnaire.jsx"; |
12 | 10 |
import Modal_MedicalHistory from "../../component/Modal_MedicalHistory.jsx"; |
13 | 11 |
import Modal_Blood from "../../component/Modal_Blood.jsx"; |
14 | 12 |
import Modal_ECG from "../../component/Modal_ECG.jsx"; |
15 |
-import person from "../../../resources/files/icon/person.png"; |
|
13 |
+import Pagination from "../../component/Pagination.jsx"; |
|
14 |
+ |
|
15 |
+import CommonUtil from "../../../resources/js/CommonUtil.js"; |
|
16 |
+ |
|
16 | 17 |
|
17 | 18 |
export default function UserAuthoriySelect() { |
18 | 19 |
const navigate = useNavigate(); |
20 |
+ const location = useLocation(); |
|
21 |
+ |
|
22 |
+ //전역 변수 저장 객체 |
|
23 |
+ const state = useSelector((state) => {return state}); |
|
24 |
+ const defaultUserId = CommonUtil.isEmpty(state.loginUser) ? null : state.loginUser['user_id']; |
|
25 |
+ |
|
26 |
+ //검색(엔터) |
|
27 |
+ const searchingEnter = (key) => { |
|
28 |
+ if (key == 'Enter') { |
|
29 |
+ searching(); |
|
30 |
+ } else { |
|
31 |
+ return; |
|
32 |
+ } |
|
33 |
+ } |
|
34 |
+ //검색 |
|
35 |
+ const searching = () => { |
|
36 |
+ if (CommonUtil.isEmpty(state.loginUser) == false |
|
37 |
+ && state.loginUser['authority'] == 'ROLE_AGENCY' && isMySenior) { |
|
38 |
+ senior.search['agent_id'] = state.loginUser['user_id']; |
|
39 |
+ } else { |
|
40 |
+ senior.search['agent_id'] = null; |
|
41 |
+ } |
|
42 |
+ |
|
43 |
+ setSenior({...senior}); |
|
44 |
+ |
|
45 |
+ seniorSelectList(1); |
|
46 |
+ } |
|
47 |
+ |
|
48 |
+ const [isMySenior, setIsMySenior] = React.useState(true); |
|
49 |
+ React.useEffect(() => { |
|
50 |
+ searching(); |
|
51 |
+ }, [isMySenior]) |
|
52 |
+ //보호사(간호사)의 돌봄 대상자(시니어) |
|
53 |
+ const [senior, setSenior] = React.useState({seniorList: [], seniorListCount: 0, search: { |
|
54 |
+ 'government_id': CommonUtil.isEmpty(state.loginUser) ? null : state.loginUser['government_id'], |
|
55 |
+ 'agency_id': CommonUtil.isEmpty(state.loginUser) ? null : state.loginUser['agency_id'], |
|
56 |
+ 'searchType': null, |
|
57 |
+ 'searchText': null, |
|
58 |
+ 'currentPage': 1, |
|
59 |
+ 'perPage': 10, |
|
60 |
+ }}); |
|
61 |
+ //보호사(간호사)의 돌봄 대상자(시니어) 목록 조회 |
|
62 |
+ const seniorSelectList = (currentPage) => { |
|
63 |
+ senior.search.currentPage = CommonUtil.isEmpty(currentPage) ? 1 : currentPage; |
|
64 |
+ |
|
65 |
+ fetch("/user/seniorSelectList.json", { |
|
66 |
+ method: "POST", |
|
67 |
+ headers: { |
|
68 |
+ 'Content-Type': 'application/json; charset=UTF-8' |
|
69 |
+ }, |
|
70 |
+ body: JSON.stringify(senior.search), |
|
71 |
+ }).then((response) => response.json()).then((data) => { |
|
72 |
+ data.search = senior.search; |
|
73 |
+ console.log("돌봄 대상자(시니어) 목록 조회 : ", data); |
|
74 |
+ setSenior(data); |
|
75 |
+ }).catch((error) => { |
|
76 |
+ console.log('seniorSelectList() /user/seniorSelectList.json error : ', error); |
|
77 |
+ }); |
|
78 |
+ } |
|
79 |
+ |
|
80 |
+ |
|
81 |
+ //현재 선택한 대상자 정보 |
|
82 |
+ const [targetSenior, setTargetSenior] = React.useState({'senior_id': null}); |
|
83 |
+ |
|
84 |
+ //문진표 |
|
19 | 85 |
const [modalOpen, setModalOpen] = React.useState(false); |
20 |
- const openModal = () => { |
|
86 |
+ const openModal = (senior) => { |
|
87 |
+ targetSenior['senior_id'] = senior['senior_id']; |
|
88 |
+ setTargetSenior(senior); |
|
89 |
+ questionnaireSelectList(); |
|
90 |
+ |
|
21 | 91 |
setModalOpen(true); |
22 | 92 |
}; |
23 | 93 |
const closeModal = () => { |
94 |
+ setTargetSenior({'senior_id': null}); |
|
24 | 95 |
setModalOpen(false); |
25 | 96 |
}; |
26 |
- |
|
97 |
+ //내원기록 |
|
27 | 98 |
const [modalOpen2, setModalOpen2] = React.useState(false); |
28 |
- const openModal2 = () => { |
|
99 |
+ const openModal2 = (senior) => { |
|
100 |
+ targetSenior['senior_id'] = senior['senior_id']; |
|
101 |
+ setTargetSenior(senior); |
|
102 |
+ hospitalMedicalRecordSelectList(); |
|
103 |
+ |
|
29 | 104 |
setModalOpen2(true); |
30 | 105 |
}; |
31 | 106 |
const closeModal2 = () => { |
107 |
+ setTargetSenior({'senior_id': null}); |
|
32 | 108 |
setModalOpen2(false); |
33 | 109 |
}; |
110 |
+ //심전도 |
|
34 | 111 |
const [modalOpen3, setModalOpen3] = React.useState(false); |
35 |
- const openModal3 = () => { |
|
112 |
+ const openModal3 = (senior) => { |
|
113 |
+ targetSenior['senior_id'] = senior['senior_id']; |
|
114 |
+ setTargetSenior(senior); |
|
115 |
+ ecgSelectList(); |
|
116 |
+ |
|
36 | 117 |
setModalOpen3(true); |
37 | 118 |
}; |
38 | 119 |
const closeModal3 = () => { |
120 |
+ setTargetSenior({'senior_id': null}); |
|
39 | 121 |
setModalOpen3(false); |
40 | 122 |
}; |
123 |
+ //혈압 |
|
41 | 124 |
const [modalOpen4, setModalOpen4] = React.useState(false); |
42 |
- const openModal4 = () => { |
|
125 |
+ const openModal4 = (senior) => { |
|
126 |
+ targetSenior['senior_id'] = senior['senior_id']; |
|
127 |
+ setTargetSenior(senior); |
|
128 |
+ bloodPressureSelectList(); |
|
129 |
+ |
|
43 | 130 |
setModalOpen4(true); |
44 | 131 |
}; |
45 | 132 |
const closeModal4 = () => { |
133 |
+ setTargetSenior({'senior_id': null}); |
|
46 | 134 |
setModalOpen4(false); |
47 | 135 |
}; |
48 |
- const [tapName, setTapName] = useState("문진표 관리") |
|
49 |
- const thead = [ |
|
50 |
- "No", "이름", "대상자등록번호", "생년월일", "연락처", "주소", "문진표", "내원기록" |
|
51 |
- ]; |
|
52 |
- const key = [ |
|
53 |
- "No", "name", "number", "birth", "phone", "address", "average", "record" |
|
54 |
- ]; |
|
55 |
- const content = [ |
|
56 |
- { |
|
57 |
- No: ( |
|
58 |
- <p><span><img src={person} alt="" />{thead[0]}</span> 1</p> |
|
59 |
- ), |
|
60 |
- name: ( |
|
61 |
- <p><span>{thead[1]}</span> 김복남</p> |
|
62 |
- ), |
|
63 |
- number: ( |
|
64 |
- <p><span>{thead[2]}</span> 0000001</p> |
|
65 |
- ), |
|
66 |
- birth: ( |
|
67 |
- <p><span>{thead[3]}</span> 1948.11.15</p> |
|
68 |
- ), |
|
69 |
- phone: ( |
|
70 |
- <p><span>{thead[4]}</span> 010-1234-1234</p> |
|
71 |
- ), |
|
72 |
- address: ( |
|
73 |
- <p><span>{thead[5]}</span> 경상북도 군위군 삼국유사면</p> |
|
74 |
- ), |
|
75 |
- average: ( |
|
76 |
- <p><span>{thead[6]}</span> <Button |
|
77 |
- className={"btn-small gray-btn"} |
|
78 |
- btnName={"작성하기"} |
|
79 |
- onClick={openModal} |
|
80 |
- /></p> |
|
81 |
- ), |
|
82 |
- record: ( |
|
83 |
- <p><span>{thead[7]}</span> <Button |
|
84 |
- className={"btn-small gray-btn"} |
|
85 |
- btnName={"진료 내역"} |
|
86 |
- onClick={openModal2} |
|
87 |
- /></p> |
|
88 |
- ), |
|
89 |
- }, |
|
90 | 136 |
|
91 |
- ]; |
|
137 |
+ /****************** 문진표 (시작) ******************/ |
|
138 |
+ const questionnaireInit = { |
|
139 |
+ 'senior_id': null, |
|
140 |
+ 'questionnaire_record_idx': null, |
|
141 |
+ 'weight_change_amount': 0, |
|
142 |
+ 'past_history': null, |
|
143 |
+ 'agent_id': defaultUserId, |
|
144 |
+ 'medical_record_idx': null, |
|
92 | 145 |
|
93 |
- const thead1 = [ |
|
94 |
- "No", "이름", "대상자등록번호", "생년월일", "연락처", "주소", "심전도" |
|
95 |
- ]; |
|
96 |
- const key1 = ["No", "name", "number", "birth", "phone", "address", "ECG" |
|
97 |
- ]; |
|
98 |
- const content1 = [ |
|
99 |
- { |
|
100 |
- No: ( |
|
101 |
- <p><span><img src={person} alt="" />{thead1[0]}</span> 1</p> |
|
102 |
- ), |
|
103 |
- name: ( |
|
104 |
- <p><span>{thead1[1]}</span> 김복남</p> |
|
105 |
- ), |
|
106 |
- number: ( |
|
107 |
- <p><span>{thead1[2]}</span> 0000001</p> |
|
108 |
- ), |
|
109 |
- birth: ( |
|
110 |
- <p><span><img src={person} alt="" />{thead1[0]}</span> 1</p> |
|
111 |
- ), |
|
112 |
- phone: ( |
|
113 |
- <p><span>{thead1[4]}</span> 010-1234-1234</p> |
|
114 |
- ), |
|
115 |
- address: ( |
|
116 |
- <p><span>{thead1[5]}</span> 경상북도 군위군 삼국유사면</p> |
|
117 |
- ), |
|
118 |
- ECG: ( |
|
119 |
- <p><span>{thead1[6]}</span> <Button |
|
120 |
- className={"btn-small gray-btn"} |
|
121 |
- btnName={"등록"} |
|
122 |
- onClick={openModal3} |
|
123 |
- /></p> |
|
124 |
- ), |
|
146 |
+ 'smoke_type': false, |
|
147 |
+ 'no_smoke_period': null, |
|
148 |
+ 'smoke_period': null, |
|
149 |
+ 'daily_smoke_amount': null, |
|
150 |
+ |
|
151 |
+ 'drink_type': false, |
|
152 |
+ 'weekly_drink_amount': null, |
|
153 |
+ 'onetime_alcoholic_kind': null, |
|
154 |
+ 'onetime_bottle_amount': null, |
|
155 |
+ 'onetime_cup_amount': null, |
|
156 |
+ |
|
157 |
+ 'exercise_type': false, |
|
158 |
+ 'weekly_exercise_amount': null, |
|
159 |
+ 'onetime_exercise_hour': null, |
|
160 |
+ 'onetime_exercise_minute': null, |
|
161 |
+ 'onetime_exercise_kind': null, |
|
162 |
+ |
|
163 |
+ 'medication_pill': '', |
|
164 |
+ 'medication_pill_etc': '', |
|
165 |
+ }; |
|
166 |
+ //문진표 정보 |
|
167 |
+ const [questionnaire, setQuestionnaire] = React.useState({...questionnaireInit}); |
|
168 |
+ const questionnaireRef = React.useRef({...questionnaireInit}); |
|
169 |
+ |
|
170 |
+ //문진표 등록 |
|
171 |
+ const questionnaireInsert = () => { |
|
172 |
+ questionnaire['senior_id'] = targetSenior['senior_id']; |
|
173 |
+ questionnaire['agent_id'] = defaultUserId; |
|
174 |
+ setQuestionnaire({...questionnaire}); |
|
175 |
+ |
|
176 |
+ fetch("/hospital/questionnaireInsert.json", { |
|
177 |
+ method: "POST", |
|
178 |
+ headers: { |
|
179 |
+ 'Content-Type': 'application/json; charset=UTF-8' |
|
180 |
+ }, |
|
181 |
+ body: JSON.stringify(questionnaire), |
|
182 |
+ }).then((response) => response.json()).then((data) => { |
|
183 |
+ console.log("문진표 등록 결과(건수) : ", data); |
|
184 |
+ if (data > 0) { |
|
185 |
+ alert("저장완료"); |
|
186 |
+ closeModal(); |
|
187 |
+ } else { |
|
188 |
+ alert("저장에 실패하였습니다. 관리자에게 문의바랍니다."); |
|
189 |
+ } |
|
190 |
+ }).catch((error) => { |
|
191 |
+ console.log('questionnaireInsert() /hospital/questionnaireInsert.json error : ', error); |
|
192 |
+ }); |
|
193 |
+ } |
|
194 |
+ |
|
195 |
+ //문진표 수정 |
|
196 |
+ const questionnaireUpdate = () => { |
|
197 |
+ questionnaire['senior_id'] = targetSenior['senior_id']; |
|
198 |
+ questionnaire['agent_id'] = defaultUserId; |
|
199 |
+ setQuestionnaire({...questionnaire}); |
|
200 |
+ |
|
201 |
+ fetch("/hospital/questionnaireUpdate.json", { |
|
202 |
+ method: "POST", |
|
203 |
+ headers: { |
|
204 |
+ 'Content-Type': 'application/json; charset=UTF-8' |
|
205 |
+ }, |
|
206 |
+ body: JSON.stringify(questionnaire), |
|
207 |
+ }).then((response) => response.json()).then((data) => { |
|
208 |
+ console.log("문진표 수정 결과(건수) : ", data); |
|
209 |
+ if (data > 0) { |
|
210 |
+ alert("저장완료"); |
|
211 |
+ closeModal(); |
|
212 |
+ } else { |
|
213 |
+ alert("저장에 실패하였습니다. 관리자에게 문의바랍니다."); |
|
214 |
+ } |
|
215 |
+ }).catch((error) => { |
|
216 |
+ console.log('questionnaireUpdate() /hospital/questionnaireUpdate.json error : ', error); |
|
217 |
+ }); |
|
218 |
+ } |
|
219 |
+ |
|
220 |
+ //문진표 목록 조회 |
|
221 |
+ const questionnaireSelectList = () => { |
|
222 |
+ fetch("/hospital/questionnaireSelectList.json", { |
|
223 |
+ method: "POST", |
|
224 |
+ headers: { |
|
225 |
+ 'Content-Type': 'application/json; charset=UTF-8' |
|
226 |
+ }, |
|
227 |
+ body: JSON.stringify(targetSenior), |
|
228 |
+ }).then((response) => response.json()).then((data) => { |
|
229 |
+ console.log("문진표 목록 조회 결과(건수) : ", data); |
|
230 |
+ if (CommonUtil.isEmpty(data.questionnaireList) == false) { |
|
231 |
+ let item = data.questionnaireList[0];//최신순으로 가지고오기 때문에, 0 인텍스가 젤 최신 |
|
232 |
+ if (CommonUtil.isEmpty(item['medication_pill'])) { |
|
233 |
+ item['medication_pill'] = ''; |
|
234 |
+ } else { |
|
235 |
+ const startCheckWord = '기타「'; |
|
236 |
+ const endCheckWord = '」'; |
|
237 |
+ if (item['medication_pill'].indexOf(startCheckWord) > -1) { |
|
238 |
+ let startIndex = item['medication_pill'].indexOf(startCheckWord); |
|
239 |
+ let lastIndex = item['medication_pill'].lastIndexOf(endCheckWord); |
|
240 |
+ console.log("000000 item['medication_pill_etc'] : ", item['medication_pill_etc'], "item['medication_pill'] : ", item['medication_pill']); |
|
241 |
+ item['medication_pill_etc'] = item['medication_pill'].substring(startIndex + startCheckWord.length, lastIndex); |
|
242 |
+ let medicationPillFront = item['medication_pill'].substring(0, startIndex + startCheckWord.length); |
|
243 |
+ let medicationPillBack = item['medication_pill'].substring(lastIndex); |
|
244 |
+ item['medication_pill'] = medicationPillFront + medicationPillBack; |
|
245 |
+ console.log("333333 item['medication_pill_etc'] : ", item['medication_pill_etc'], "item['medication_pill'] : ", item['medication_pill']); |
|
246 |
+ } else { |
|
247 |
+ item['medication_pill_etc'] = ''; |
|
248 |
+ } |
|
249 |
+ } |
|
250 |
+ |
|
251 |
+ setQuestionnaire(item); |
|
252 |
+ } |
|
253 |
+ }).catch((error) => { |
|
254 |
+ console.log('questionnaireSelectList() /hospital/questionnaireSelectList.json error : ', error); |
|
255 |
+ }); |
|
256 |
+ } |
|
257 |
+ /****************** 문진표 (종료) ******************/ |
|
258 |
+ |
|
259 |
+ |
|
260 |
+ |
|
261 |
+ |
|
262 |
+ /****************** 병원 진료 기록 (시작) ******************/ |
|
263 |
+ const hospitalMedicalRecordInit = { |
|
264 |
+ 'senior_id': null, |
|
265 |
+ 'medical_record_idx': null, |
|
266 |
+ 'medical_date': CommonUtil.getDate(), |
|
267 |
+ 'medical_reason': '', |
|
268 |
+ 'medical_content': '', |
|
269 |
+ 'agent_id': defaultUserId |
|
270 |
+ }; |
|
271 |
+ //병원 진료 기록 정보 |
|
272 |
+ const [hospitalMedicalRecord, setHospitalMedicalRecord] = React.useState({...hospitalMedicalRecordInit}); |
|
273 |
+ const hospitalMedicalRecordRef = React.useRef({...hospitalMedicalRecordInit}); |
|
274 |
+ |
|
275 |
+ //병원 진료 기록 유효성 검사 |
|
276 |
+ const hospitalMedicalRecordValidation = () => { |
|
277 |
+ const target = hospitalMedicalRecord; |
|
278 |
+ const targetRef = hospitalMedicalRecordRef; |
|
279 |
+ |
|
280 |
+ if (CommonUtil.isEmpty(target['medical_date']) == true) { |
|
281 |
+ targetRef.current['medical_date'].focus(); |
|
282 |
+ alert("진료 일자를 선택해 주세요."); |
|
283 |
+ return false; |
|
284 |
+ } |
|
285 |
+ if (CommonUtil.isEmpty(target['medical_reason']) == true) { |
|
286 |
+ targetRef.current['medical_reason'].focus(); |
|
287 |
+ alert("진료 사유를 입력해 주세요."); |
|
288 |
+ return false; |
|
289 |
+ } |
|
290 |
+ if (CommonUtil.isEmpty(target['medical_content']) == true) { |
|
291 |
+ targetRef.current['medical_content'].focus(); |
|
292 |
+ alert("진료 내용을 입력해 주세요."); |
|
293 |
+ return false; |
|
294 |
+ } |
|
295 |
+ |
|
296 |
+ } |
|
297 |
+ |
|
298 |
+ |
|
299 |
+ //병원 진료 기록 등록 |
|
300 |
+ const hospitalMedicalRecordInsert = () => { |
|
301 |
+ if (hospitalMedicalRecordValidation() == false) { |
|
302 |
+ return; |
|
125 | 303 |
} |
126 |
- ]; |
|
127 |
- const thead2 = [ |
|
128 |
- "No", "이름", "대상자등록번호", "생년월일", "연락처", "주소", "최근등록일", "최고혈압", "최저혈압", "맥박수", "혈압측정", |
|
129 |
- ]; |
|
130 |
- const key2 = [ |
|
131 |
- "No", "name", "number", "birth", "phone", "address", "recent", "high", "low", "pulse", "average", |
|
132 |
- ]; |
|
133 |
- const content2 = [ |
|
134 |
- { |
|
135 |
- No: ( |
|
136 |
- <p><span><img src={person} alt="" />{thead2[0]}</span> 1</p> |
|
137 |
- ), |
|
138 |
- name: ( |
|
139 |
- <p><span>{thead2[1]}</span> 김복남</p> |
|
140 |
- ), |
|
141 |
- number: ( |
|
142 |
- <p><span>{thead2[2]}</span> 0000001</p> |
|
143 |
- ), |
|
144 |
- birth: ( |
|
145 |
- <p><span>{thead2[3]}</span> 1948.11.15</p> |
|
146 |
- ), |
|
147 |
- phone: ( |
|
148 |
- <p><span>{thead2[4]}</span> 010-1234-1234</p> |
|
149 |
- ), |
|
150 |
- address: ( |
|
151 |
- <p><span>{thead2[5]}</span> 경상북도 군위군 삼국유사면</p> |
|
152 |
- ), |
|
153 |
- recent: ( |
|
154 |
- <p><span>{thead2[6]}</span> 1948.11.15</p> |
|
155 |
- ), |
|
156 |
- high: ( |
|
157 |
- <p><span>{thead2[7]}</span> 130</p> |
|
158 |
- ), |
|
159 |
- low: ( |
|
160 |
- <p><span>{thead2[8]}</span> 90</p> |
|
161 |
- ), |
|
162 |
- pulse:( |
|
163 |
- <p><span>{thead2[9]}</span> 60</p> |
|
164 |
- ), |
|
165 |
- average:( |
|
166 |
- <p><span>{thead2[10]}</span> <Button |
|
167 |
- className={"btn-small gray-btn"} |
|
168 |
- btnName={"등록"} |
|
169 |
- onClick={openModal4} |
|
170 |
- /></p> |
|
171 |
- |
|
172 |
- ), |
|
173 |
- }, |
|
174 |
- ]; |
|
175 |
- const data = [ |
|
176 |
- { |
|
177 |
- id: 1, |
|
178 |
- title: "문진표 관리", |
|
179 |
- description: ( |
|
180 |
- <Table |
|
181 |
- className={" senior-table"} |
|
182 |
- head={thead} |
|
183 |
- contents={content} |
|
184 |
- contentKey={key} |
|
185 |
- /> |
|
186 |
- ), |
|
187 |
- }, |
|
188 |
- { |
|
189 |
- id: 2, |
|
190 |
- title: "심전도 관리", |
|
191 |
- description: ( |
|
192 |
- <Table |
|
193 |
- className={"senior-table"} |
|
194 |
- head={thead1} |
|
195 |
- contents={content1} |
|
196 |
- contentKey={key1} |
|
197 |
- /> |
|
198 |
- ), |
|
199 |
- }, |
|
200 |
- { |
|
201 |
- id: 3, |
|
202 |
- title: "혈압 관리", |
|
203 |
- description: ( |
|
204 |
- <Table |
|
205 |
- className={"senior-table"} |
|
206 |
- head={thead2} |
|
207 |
- contents={content2} |
|
208 |
- contentKey={key2} |
|
209 |
- /> |
|
210 |
- ), |
|
211 |
- }, |
|
212 |
- ] |
|
213 |
- const [index, setIndex] = React.useState(1); |
|
304 |
+ |
|
305 |
+ hospitalMedicalRecord['senior_id'] = targetSenior['senior_id']; |
|
306 |
+ hospitalMedicalRecord['agent_id'] = defaultUserId; |
|
307 |
+ setHospitalMedicalRecord({...hospitalMedicalRecord}); |
|
308 |
+ |
|
309 |
+ fetch("/hospital/hospitalMedicalRecordInsert.json", { |
|
310 |
+ method: "POST", |
|
311 |
+ headers: { |
|
312 |
+ 'Content-Type': 'application/json; charset=UTF-8' |
|
313 |
+ }, |
|
314 |
+ body: JSON.stringify(hospitalMedicalRecord), |
|
315 |
+ }).then((response) => response.json()).then((data) => { |
|
316 |
+ console.log("병원 진료 기록 등록 결과(건수) : ", data); |
|
317 |
+ if (data > 0) { |
|
318 |
+ setHospitalMedicalRecordInit(); |
|
319 |
+ hospitalMedicalRecordSelectList(); |
|
320 |
+ //closeModal2(); |
|
321 |
+ alert("등록완료"); |
|
322 |
+ |
|
323 |
+ } else { |
|
324 |
+ alert("등록에 실패하였습니다. 관리자에게 문의바랍니다."); |
|
325 |
+ } |
|
326 |
+ }).catch((error) => { |
|
327 |
+ console.log('hospitalMedicalRecordInsert() /hospital/hospitalMedicalRecordInsert.json error : ', error); |
|
328 |
+ }); |
|
329 |
+ } |
|
330 |
+ |
|
331 |
+ //병원 진료 기록 수정 |
|
332 |
+ const hospitalMedicalRecordUpdate = () => { |
|
333 |
+ if (hospitalMedicalRecordValidation() == false) { |
|
334 |
+ return; |
|
335 |
+ } |
|
336 |
+ |
|
337 |
+ hospitalMedicalRecord['senior_id'] = targetSenior['senior_id']; |
|
338 |
+ hospitalMedicalRecord['agent_id'] = defaultUserId; |
|
339 |
+ setHospitalMedicalRecord({...hospitalMedicalRecord}); |
|
340 |
+ |
|
341 |
+ fetch("/hospital/hospitalMedicalRecordUpdate.json", { |
|
342 |
+ method: "POST", |
|
343 |
+ headers: { |
|
344 |
+ 'Content-Type': 'application/json; charset=UTF-8' |
|
345 |
+ }, |
|
346 |
+ body: JSON.stringify(hospitalMedicalRecord), |
|
347 |
+ }).then((response) => response.json()).then((data) => { |
|
348 |
+ console.log("병원 진료 기록 수정 결과(건수) : ", data); |
|
349 |
+ if (data > 0) { |
|
350 |
+ setHospitalMedicalRecordInit(); |
|
351 |
+ hospitalMedicalRecordSelectList(); |
|
352 |
+ //closeModal2(); |
|
353 |
+ alert("수정완료"); |
|
354 |
+ } else { |
|
355 |
+ alert("수정에 실패하였습니다. 관리자에게 문의바랍니다."); |
|
356 |
+ } |
|
357 |
+ }).catch((error) => { |
|
358 |
+ console.log('hospitalMedicalRecordUpdate() /hospital/hospitalMedicalRecordUpdate.json error : ', error); |
|
359 |
+ }); |
|
360 |
+ } |
|
361 |
+ |
|
362 |
+ //초기화 취소 |
|
363 |
+ const setHospitalMedicalRecordInit = () => { |
|
364 |
+ setHospitalMedicalRecord({...hospitalMedicalRecordInit}); |
|
365 |
+ } |
|
366 |
+ |
|
367 |
+ //병원 진료 기록 정보 |
|
368 |
+ const [hospitalMedicalRecordList, setHospitalMedicalRecordList] = React.useState({hospitalMedicalRecordList: [], hospitalMedicalRecordListCount:0, search: {currentPage: 1, perPage: 5}}); |
|
369 |
+ //병원 진료 기록 목록 조회 |
|
370 |
+ const hospitalMedicalRecordSelectList = (currentPage) => { |
|
371 |
+ hospitalMedicalRecordList.search.currentPage = CommonUtil.isEmpty(currentPage) ? 1 : currentPage; |
|
372 |
+ hospitalMedicalRecordList.search['senior_id'] = targetSenior['senior_id']; |
|
373 |
+ setHospitalMedicalRecordList({...hospitalMedicalRecordList}); |
|
374 |
+ |
|
375 |
+ fetch("/hospital/hospitalMedicalRecordSelectList.json", { |
|
376 |
+ method: "POST", |
|
377 |
+ headers: { |
|
378 |
+ 'Content-Type': 'application/json; charset=UTF-8' |
|
379 |
+ }, |
|
380 |
+ body: JSON.stringify(hospitalMedicalRecordList.search), |
|
381 |
+ }).then((response) => response.json()).then((data) => { |
|
382 |
+ console.log("병원 진료 기록 목록 조회 결과(건수) : ", data); |
|
383 |
+ data.search = hospitalMedicalRecordList.search; |
|
384 |
+ setHospitalMedicalRecordList(data); |
|
385 |
+ }).catch((error) => { |
|
386 |
+ console.log('hospitalMedicalRecordSelectList() /hospital/hospitalMedicalRecordSelectList.json error : ', error); |
|
387 |
+ }); |
|
388 |
+ } |
|
389 |
+ /****************** 병원 진료 기록 (종료) ******************/ |
|
390 |
+ |
|
391 |
+ |
|
392 |
+ |
|
393 |
+ const ecgSelectList = () => {}; |
|
394 |
+ const bloodPressureSelectList = () => {}; |
|
395 |
+ |
|
396 |
+ React.useEffect(() => { |
|
397 |
+ searching(); |
|
398 |
+ }, []); |
|
399 |
+ |
|
400 |
+ |
|
401 |
+ //현재 탭 Index |
|
402 |
+ const [tabIndex, setTabIndex] = React.useState(0); |
|
403 |
+ //탭 초기화 |
|
404 |
+ const tab = [{ |
|
405 |
+ title: `문진표관리`, |
|
406 |
+ content: ( |
|
407 |
+ <div> |
|
408 |
+ <div className="flex equip-tab"> |
|
409 |
+ <SubTitle explanation={"돌봄 대상자의 병원 내원 기록 및 문진표를 관리할 수 있습니다."} /> |
|
410 |
+ </div> |
|
411 |
+ <table className={"protector-user"}> |
|
412 |
+ <thead> |
|
413 |
+ <tr> |
|
414 |
+ <th>No</th> |
|
415 |
+ <th>소속기관명</th> |
|
416 |
+ <th>이름</th> |
|
417 |
+ <th>생년월일</th> |
|
418 |
+ <th>성별</th> |
|
419 |
+ <th>연락처</th> |
|
420 |
+ <th>문진표관리</th> |
|
421 |
+ <th>내원기록관리</th> |
|
422 |
+ </tr> |
|
423 |
+ </thead> |
|
424 |
+ <tbody> |
|
425 |
+ {senior.seniorList.map((item, idx) => { return ( |
|
426 |
+ <tr key={idx}> |
|
427 |
+ <td data-label="No">{senior.seniorListCount - idx - (senior.search.currentPage - 1) * senior.search.perPage}</td> |
|
428 |
+ <td data-label="소속기관명">{item['agency_name']}</td> |
|
429 |
+ <td data-label="이름">{item['user_name']}</td> |
|
430 |
+ <td data-label="생년월일">{item['user_birth']}</td> |
|
431 |
+ <td data-label="성별">{item['user_gender']}</td> |
|
432 |
+ <td data-label="연락처">{item['user_phonenumber']}</td> |
|
433 |
+ <td data-label="문진표관리"> |
|
434 |
+ <button className="btn-small gray-btn" onClick={() => openModal(item)}>작성하기</button> |
|
435 |
+ </td> |
|
436 |
+ <td data-label="내원기록관리"> |
|
437 |
+ <button className="btn-small gray-btn" onClick={() => openModal2(item)}>작성하기</button> |
|
438 |
+ </td> |
|
439 |
+ </tr> |
|
440 |
+ )})} |
|
441 |
+ {CommonUtil.isEmpty(senior.seniorList) ? |
|
442 |
+ <tr> |
|
443 |
+ <td colSpan={8}>조회된 데이터가 없습니다</td> |
|
444 |
+ </tr> |
|
445 |
+ : null} |
|
446 |
+ </tbody> |
|
447 |
+ </table> |
|
448 |
+ <Pagination |
|
449 |
+ currentPage={senior.search.currentPage} |
|
450 |
+ perPage={senior.search.perPage} |
|
451 |
+ totalCount={senior.seniorListCount} |
|
452 |
+ maxRange={5} |
|
453 |
+ click={seniorSelectList} |
|
454 |
+ /> |
|
455 |
+ </div> |
|
456 |
+ ) |
|
457 |
+ }, { |
|
458 |
+ title: `심전도관리`, |
|
459 |
+ content: ( |
|
460 |
+ <div> |
|
461 |
+ <div className="flex equip-tab"> |
|
462 |
+ <SubTitle explanation={"돌봄 대상자의 심전도 정보를 관리할 수 있습니다."} /> |
|
463 |
+ </div> |
|
464 |
+ <table className={"protector-user"}> |
|
465 |
+ <thead> |
|
466 |
+ <tr> |
|
467 |
+ <th>No</th> |
|
468 |
+ <th>소속기관명</th> |
|
469 |
+ <th>이름</th> |
|
470 |
+ <th>생년월일</th> |
|
471 |
+ <th>성별</th> |
|
472 |
+ <th>연락처</th> |
|
473 |
+ <th>심전도관리</th> |
|
474 |
+ </tr> |
|
475 |
+ </thead> |
|
476 |
+ <tbody> |
|
477 |
+ {senior.seniorList.map((item, idx) => { return ( |
|
478 |
+ <tr key={idx}> |
|
479 |
+ <td data-label="No">{senior.seniorListCount - idx - (senior.search.currentPage - 1) * senior.search.perPage}</td> |
|
480 |
+ <td data-label="소속기관명">{item['agency_name']}</td> |
|
481 |
+ <td data-label="이름">{item['user_name']}</td> |
|
482 |
+ <td data-label="생년월일">{item['user_birth']}</td> |
|
483 |
+ <td data-label="성별">{item['user_gender']}</td> |
|
484 |
+ <td data-label="연락처">{item['user_phonenumber']}</td> |
|
485 |
+ <td data-label="심전도관리"> |
|
486 |
+ <button className="btn-small gray-btn" onClick={() => openModal3(item)}>심전도관리</button> |
|
487 |
+ </td> |
|
488 |
+ </tr> |
|
489 |
+ )})} |
|
490 |
+ {CommonUtil.isEmpty(senior.seniorList) ? |
|
491 |
+ <tr> |
|
492 |
+ <td colSpan={7}>조회된 데이터가 없습니다</td> |
|
493 |
+ </tr> |
|
494 |
+ : null} |
|
495 |
+ </tbody> |
|
496 |
+ </table> |
|
497 |
+ <Pagination |
|
498 |
+ currentPage={senior.search.currentPage} |
|
499 |
+ perPage={senior.search.perPage} |
|
500 |
+ totalCount={senior.seniorListCount} |
|
501 |
+ maxRange={5} |
|
502 |
+ click={seniorSelectList} |
|
503 |
+ /> |
|
504 |
+ </div> |
|
505 |
+ ) |
|
506 |
+ }, { |
|
507 |
+ title: `혈압관리`, |
|
508 |
+ content: ( |
|
509 |
+ <div> |
|
510 |
+ <div className="flex equip-tab"> |
|
511 |
+ <SubTitle explanation={"돌봄 대상자의 혈압 정보를 관리할 수 있습니다."} /> |
|
512 |
+ </div> |
|
513 |
+ <table className={"protector-user"}> |
|
514 |
+ <thead> |
|
515 |
+ <tr> |
|
516 |
+ <th>No</th> |
|
517 |
+ <th>소속기관명</th> |
|
518 |
+ <th>이름</th> |
|
519 |
+ <th>생년월일</th> |
|
520 |
+ <th>성별</th> |
|
521 |
+ <th>연락처</th> |
|
522 |
+ <th>최고혈압</th> |
|
523 |
+ <th>최저혈압</th> |
|
524 |
+ <th>맥박수</th> |
|
525 |
+ <th>혈압관리</th> |
|
526 |
+ </tr> |
|
527 |
+ </thead> |
|
528 |
+ <tbody> |
|
529 |
+ {senior.seniorList.map((item, idx) => { return ( |
|
530 |
+ <tr key={idx}> |
|
531 |
+ <td data-label="No">{senior.seniorListCount - idx - (senior.search.currentPage - 1) * senior.search.perPage}</td> |
|
532 |
+ <td data-label="소속기관명">{item['agency_name']}</td> |
|
533 |
+ <td data-label="이름">{item['user_name']}</td> |
|
534 |
+ <td data-label="생년월일">{item['user_birth']}</td> |
|
535 |
+ <td data-label="성별">{item['user_gender']}</td> |
|
536 |
+ <td data-label="연락처">{item['user_phonenumber']}</td> |
|
537 |
+ <td>120</td> |
|
538 |
+ <td>80</td> |
|
539 |
+ <td>76</td> |
|
540 |
+ <td data-label="혈압관리"> |
|
541 |
+ <button className="btn-small gray-btn" onClick={() => openModal4(item)}>혈압관리</button> |
|
542 |
+ </td> |
|
543 |
+ </tr> |
|
544 |
+ )})} |
|
545 |
+ {CommonUtil.isEmpty(senior.seniorList) ? |
|
546 |
+ <tr> |
|
547 |
+ <td colSpan={10}>조회된 데이터가 없습니다</td> |
|
548 |
+ </tr> |
|
549 |
+ : null} |
|
550 |
+ </tbody> |
|
551 |
+ </table> |
|
552 |
+ <Pagination |
|
553 |
+ currentPage={senior.search.currentPage} |
|
554 |
+ perPage={senior.search.perPage} |
|
555 |
+ totalCount={senior.seniorListCount} |
|
556 |
+ maxRange={5} |
|
557 |
+ click={seniorSelectList} |
|
558 |
+ /> |
|
559 |
+ </div> |
|
560 |
+ ) |
|
561 |
+ }]; |
|
214 | 562 |
|
215 | 563 |
return ( |
216 | 564 |
<main> |
565 |
+ |
|
566 |
+ {/* <Modal_Questionnaire open={modalOpen} close={closeModal} /> */} |
|
567 |
+ {/* <Modal_MedicalHistory open={modalOpen2} close={closeModal2} /> */} |
|
568 |
+ {/* <Modal_ECG open={modalOpen3} close={closeModal3} /> */} |
|
569 |
+ {/* <Modal_Blood open={modalOpen4} close={closeModal4} /> */} |
|
570 |
+ |
|
571 |
+ <div className="search-management flex-start margin-bottom2"> |
|
572 |
+ <select style={{maxWidth: '150px'}} |
|
573 |
+ onChange={(e) => {senior.search.searchType = e.target.value; setSenior({...senior});}}> |
|
574 |
+ <option value="" selected={CommonUtil.isEmpty(senior.search.searchType)}>전체</option> |
|
575 |
+ <option value="user_name" selected={senior.search.searchType == 'user_name'}>이름</option> |
|
576 |
+ <option value="user_id" selected={senior.search.searchType == 'user_id'}>아이디</option> |
|
577 |
+ <option value="user_phonenumber" selected={senior.search.searchType == 'user_phonenumber'}>연락처</option> |
|
578 |
+ </select> |
|
579 |
+ <input type="text" className="senior-search" value={senior.search.searchText} |
|
580 |
+ onChange={(e) => {senior.search.searchText = e.target.value; setSenior({...senior});}} |
|
581 |
+ onKeyUp={(e) => searchingEnter(e)}/> |
|
582 |
+ <button className="btn-small gray-btn" onClick={searching}>검색</button> |
|
583 |
+ </div> |
|
584 |
+ |
|
217 | 585 |
<div className="content-wrap"> |
218 |
- <DetailTitle contentTitle={"대상자의 문진표 / 심전도 / 혈압 관리를 할 수 있습니다."} /> |
|
219 |
- <Modal_Questionnaire open={modalOpen} close={closeModal} /> |
|
220 |
- <Modal_MedicalHistory open={modalOpen2} close={closeModal2} /> |
|
221 |
- <Modal_ECG open={modalOpen3} close={closeModal3} /> |
|
222 |
- <Modal_Blood open={modalOpen4} close={closeModal4} /> |
|
586 |
+ <DetailTitle contentTitle={"대상자의 문진표 / 심전도 / 혈압 관리를 할 수 있습니다."} /> |
|
587 |
+ |
|
223 | 588 |
<div style={{ height: "calc(100% - 61px)" }}> |
224 | 589 |
<div className="right" style={{ height: "100%", }}> |
225 | 590 |
<div style={{ height: "100%" }}> |
226 |
- <div className="tab-container" style={{ marginTop: "5rem", }}> |
|
591 |
+ <div className="tab-container" style={{ marginTop: "5rem"}}> |
|
592 |
+ {CommonUtil.isEmpty(state.loginUser) == false && state.loginUser['authority'] == 'ROLE_AGENCY' ? |
|
593 |
+ <div className="flex-end margin-bottom"> |
|
594 |
+ <div className="flex searchselect" style={{width: 'auto'}}> |
|
595 |
+ |
|
596 |
+ <input type="radio" id="my_senior" name="senior" checked={isMySenior} |
|
597 |
+ onChange={(e) => {e.target.checked ? setIsMySenior(true) : null}}/> |
|
598 |
+ <label for="my_senior" style={{marginRight: '3rem'}}>나의 대상자 보기</label> |
|
599 |
+ |
|
600 |
+ <input type="radio" id="all_senior" name="senior" checked={!isMySenior} |
|
601 |
+ onChange={(e) => {e.target.checked ? setIsMySenior(false) : null}}/> |
|
602 |
+ <label for="all_senior" style={{marginRight: '0'}}>전체 대상자 보기</label> |
|
603 |
+ |
|
604 |
+ </div> |
|
605 |
+ </div> |
|
606 |
+ :null} |
|
227 | 607 |
<ul className="tab-menu flex-end"> |
228 |
- {data.map((item) => ( |
|
229 |
- <li |
|
230 |
- key={item.id} |
|
231 |
- className={index === item.id ? "active" : null} |
|
232 |
- onClick={() => setIndex(item.id)} |
|
233 |
- > |
|
234 |
- {item.title} |
|
235 |
- </li> |
|
236 |
- ))} |
|
608 |
+ {tab.map((item, idx) => { return ( |
|
609 |
+ <li onClick={() => setTabIndex(idx)} className={idx == tabIndex ? 'active' : null}> |
|
610 |
+ {item.title} |
|
611 |
+ </li> |
|
612 |
+ )})} |
|
237 | 613 |
</ul> |
238 | 614 |
<div className="content-wrap userlist"> |
239 |
- <div className="search-management flex-start margin-bottom2"> |
|
240 |
- <DetailSearch /> |
|
241 |
- </div> |
|
242 |
- <div className="flex-end margin-bottom"> |
|
243 |
- <div className="flex searchselect"> |
|
244 |
- <input type="radio" /> |
|
245 |
- <label htmlFor="">나의 대상자 보기</label> |
|
246 |
- <input type="radio" /> |
|
247 |
- <label htmlFor="">전체 대상자 보기</label> |
|
248 |
- </div> |
|
249 |
- </div> |
|
615 |
+ |
|
250 | 616 |
<ul className="tab-content"> |
251 |
- {data |
|
252 |
- .filter((item) => index === item.id) |
|
253 |
- .map((item) => ( |
|
254 |
- <li>{item.description}</li> |
|
255 |
- ))} |
|
617 |
+ <li> |
|
618 |
+ {tab[tabIndex].content} |
|
619 |
+ </li> |
|
256 | 620 |
</ul> |
257 | 621 |
</div> |
258 | 622 |
</div> |
... | ... | @@ -260,6 +624,520 @@ |
260 | 624 |
</div> |
261 | 625 |
</div> |
262 | 626 |
</div> |
627 |
+ |
|
628 |
+ |
|
629 |
+ <Modal open={modalOpen} close={closeModal} header="문진표 작성"> |
|
630 |
+ <div className="board-wrap"> |
|
631 |
+ <div> |
|
632 |
+ <table className="margin-bottom2 questionnaire-table"> |
|
633 |
+ <tr> |
|
634 |
+ <th>흡연을 하십니까?</th> |
|
635 |
+ <td className="flex-start"> |
|
636 |
+ <input type="radio" name="smoke" id="smoke-true" |
|
637 |
+ checked={questionnaire['smoke_type'] == true} |
|
638 |
+ onChange={(e) => { |
|
639 |
+ if (e.target.checked) { |
|
640 |
+ questionnaire['smoke_type'] = true; |
|
641 |
+ setQuestionnaire({...questionnaire}); |
|
642 |
+ }} |
|
643 |
+ } |
|
644 |
+ /> |
|
645 |
+ <label for="smoke-true">예</label> |
|
646 |
+ <input type="radio" name="smoke" id="smoke-false" |
|
647 |
+ checked={questionnaire['smoke_type'] == false} |
|
648 |
+ onChange={(e) => { |
|
649 |
+ if (e.target.checked) { |
|
650 |
+ questionnaire['smoke_type'] = false; |
|
651 |
+ setQuestionnaire({...questionnaire}); |
|
652 |
+ }} |
|
653 |
+ } |
|
654 |
+ /> |
|
655 |
+ <label for="smoke-false">아니요</label> |
|
656 |
+ </td> |
|
657 |
+ </tr> |
|
658 |
+ <tr> |
|
659 |
+ <th>음주를 하십니까?</th> |
|
660 |
+ <td className="flex-start"> |
|
661 |
+ <input type="radio" name="drink" id="drink-true" |
|
662 |
+ checked={questionnaire['drink_type'] == true} |
|
663 |
+ onChange={(e) => { |
|
664 |
+ if (e.target.checked) { |
|
665 |
+ questionnaire['drink_type'] = true; |
|
666 |
+ setQuestionnaire({...questionnaire}); |
|
667 |
+ }} |
|
668 |
+ } |
|
669 |
+ /> |
|
670 |
+ <label for="drink-true">예</label> |
|
671 |
+ <input type="radio" name="drink" id="drink-false" |
|
672 |
+ checked={questionnaire['drink_type'] == false} |
|
673 |
+ onChange={(e) => { |
|
674 |
+ if (e.target.checked) { |
|
675 |
+ questionnaire['drink_type'] = false; |
|
676 |
+ setQuestionnaire({...questionnaire}); |
|
677 |
+ }} |
|
678 |
+ } |
|
679 |
+ /> |
|
680 |
+ <label for="drink-false">아니요</label> |
|
681 |
+ </td> |
|
682 |
+ </tr> |
|
683 |
+ <tr> |
|
684 |
+ <th>일주일에 운동을 몇회 하십니까?</th> |
|
685 |
+ <td className="flex-start"> |
|
686 |
+ <input type="radio" name="exercise" id="exercise-false" |
|
687 |
+ checked={questionnaire['exercise_type'] == false} |
|
688 |
+ onChange={(e) => { |
|
689 |
+ if (e.target.checked) { |
|
690 |
+ questionnaire['exercise_type'] = false; |
|
691 |
+ setQuestionnaire({...questionnaire}); |
|
692 |
+ }} |
|
693 |
+ } |
|
694 |
+ /> |
|
695 |
+ <label for="exercise-false">안함</label> |
|
696 |
+ |
|
697 |
+ <input type="radio" name="exercise" id="exercise-1" |
|
698 |
+ checked={questionnaire['exercise_type'] == true && questionnaire['weekly_exercise_amount'] == 1} |
|
699 |
+ onChange={(e) => { |
|
700 |
+ if (e.target.checked) { |
|
701 |
+ questionnaire['exercise_type'] = true; |
|
702 |
+ questionnaire['weekly_exercise_amount'] = 1; |
|
703 |
+ setQuestionnaire({...questionnaire}); |
|
704 |
+ }} |
|
705 |
+ } |
|
706 |
+ /> |
|
707 |
+ <label for="exercise-1">1회</label> |
|
708 |
+ |
|
709 |
+ <input type="radio" name="exercise" id="exercise-2" |
|
710 |
+ checked={questionnaire['exercise_type'] == true && questionnaire['weekly_exercise_amount'] == 2} |
|
711 |
+ onChange={(e) => { |
|
712 |
+ if (e.target.checked) { |
|
713 |
+ questionnaire['exercise_type'] = true; |
|
714 |
+ questionnaire['weekly_exercise_amount'] = 2; |
|
715 |
+ setQuestionnaire({...questionnaire}); |
|
716 |
+ }} |
|
717 |
+ } |
|
718 |
+ /> |
|
719 |
+ <label for="exercise-2">2회</label> |
|
720 |
+ |
|
721 |
+ <input type="radio" name="exercise" id="exercise-3" |
|
722 |
+ checked={questionnaire['exercise_type'] == true && questionnaire['weekly_exercise_amount'] == 3} |
|
723 |
+ onChange={(e) => { |
|
724 |
+ if (e.target.checked) { |
|
725 |
+ questionnaire['exercise_type'] = true; |
|
726 |
+ questionnaire['weekly_exercise_amount'] = 3; |
|
727 |
+ setQuestionnaire({...questionnaire}); |
|
728 |
+ }} |
|
729 |
+ } |
|
730 |
+ /> |
|
731 |
+ <label for="exercise-3">3회</label> |
|
732 |
+ |
|
733 |
+ <input type="radio" name="exercise" id="exercise-4" |
|
734 |
+ checked={questionnaire['exercise_type'] == true && questionnaire['weekly_exercise_amount'] == 4} |
|
735 |
+ onChange={(e) => { |
|
736 |
+ if (e.target.checked) { |
|
737 |
+ questionnaire['exercise_type'] = true; |
|
738 |
+ questionnaire['weekly_exercise_amount'] = 4; |
|
739 |
+ setQuestionnaire({...questionnaire}); |
|
740 |
+ }} |
|
741 |
+ } |
|
742 |
+ /> |
|
743 |
+ <label for="exercise-4">4회</label> |
|
744 |
+ |
|
745 |
+ <input type="radio" name="exercise" id="exercise-5" |
|
746 |
+ checked={questionnaire['exercise_type'] == true && questionnaire['weekly_exercise_amount'] == 5} |
|
747 |
+ onChange={(e) => { |
|
748 |
+ if (e.target.checked) { |
|
749 |
+ questionnaire['exercise_type'] = true; |
|
750 |
+ questionnaire['weekly_exercise_amount'] = 5; |
|
751 |
+ setQuestionnaire({...questionnaire}); |
|
752 |
+ }} |
|
753 |
+ } |
|
754 |
+ /> |
|
755 |
+ <label for="exercise-5">5회</label> |
|
756 |
+ |
|
757 |
+ <input type="radio" name="exercise" id="exercise-6" |
|
758 |
+ checked={questionnaire['exercise_type'] == true && questionnaire['weekly_exercise_amount'] == 6} |
|
759 |
+ onChange={(e) => { |
|
760 |
+ if (e.target.checked) { |
|
761 |
+ questionnaire['exercise_type'] = true; |
|
762 |
+ questionnaire['weekly_exercise_amount'] = 6; |
|
763 |
+ setQuestionnaire({...questionnaire}); |
|
764 |
+ }} |
|
765 |
+ } |
|
766 |
+ /> |
|
767 |
+ <label for="exercise-6">6회</label> |
|
768 |
+ |
|
769 |
+ <input type="radio" name="exercise" id="exercise-7" |
|
770 |
+ checked={questionnaire['exercise_type'] == true && questionnaire['weekly_exercise_amount'] == 7} |
|
771 |
+ onChange={(e) => { |
|
772 |
+ if (e.target.checked) { |
|
773 |
+ questionnaire['exercise_type'] = true; |
|
774 |
+ questionnaire['weekly_exercise_amount'] = 7; |
|
775 |
+ setQuestionnaire({...questionnaire}); |
|
776 |
+ }} |
|
777 |
+ } |
|
778 |
+ /> |
|
779 |
+ <label for="exercise-7">매일</label> |
|
780 |
+ </td> |
|
781 |
+ </tr> |
|
782 |
+ <tr> |
|
783 |
+ <th>최근 3개월 동안 갑작스런 체중 변화가 있었습니까?</th> |
|
784 |
+ <td className="flex-start"> |
|
785 |
+ <input type="radio" name="weight" id="weight-up" |
|
786 |
+ checked={questionnaire['weight_change_amount'] == 1} |
|
787 |
+ onChange={(e) => { |
|
788 |
+ if (e.target.checked) { |
|
789 |
+ questionnaire['weight_change_amount'] = 1; |
|
790 |
+ setQuestionnaire({...questionnaire}); |
|
791 |
+ }} |
|
792 |
+ } |
|
793 |
+ /> |
|
794 |
+ <label for="weight-up">예 - 증가</label> |
|
795 |
+ |
|
796 |
+ <input type="radio" name="weight" id="weight-down" |
|
797 |
+ checked={questionnaire['weight_change_amount'] == -1} |
|
798 |
+ onChange={(e) => { |
|
799 |
+ if (e.target.checked) { |
|
800 |
+ questionnaire['weight_change_amount'] = -1; |
|
801 |
+ setQuestionnaire({...questionnaire}); |
|
802 |
+ }} |
|
803 |
+ } |
|
804 |
+ /> |
|
805 |
+ <label for="weight-down">예 - 감소</label> |
|
806 |
+ |
|
807 |
+ <input type="radio" name="weight" id="weight-false" |
|
808 |
+ checked={questionnaire['weight_change_amount'] == 0} |
|
809 |
+ onChange={(e) => { |
|
810 |
+ if (e.target.checked) { |
|
811 |
+ questionnaire['weight_change_amount'] = 0; |
|
812 |
+ setQuestionnaire({...questionnaire}); |
|
813 |
+ }} |
|
814 |
+ } |
|
815 |
+ /> |
|
816 |
+ <label for="weight-false">아니요</label> |
|
817 |
+ </td> |
|
818 |
+ </tr> |
|
819 |
+ <tr> |
|
820 |
+ <th>현재 복용중인 약이 있으면 체크를 해주세요.</th> |
|
821 |
+ <td className="flex-start"> |
|
822 |
+ |
|
823 |
+ <input type="checkbox" name="pills" id="pills-1" |
|
824 |
+ checked={questionnaire['medication_pill'].indexOf('아스피린(항혈소판제)') > -1} |
|
825 |
+ onChange={(e) => { |
|
826 |
+ if (e.target.checked) { |
|
827 |
+ questionnaire['medication_pill'] += '아스피린(항혈소판제),'; |
|
828 |
+ setQuestionnaire({...questionnaire}); |
|
829 |
+ } else { |
|
830 |
+ questionnaire['medication_pill'] = questionnaire['medication_pill'].replace('아스피린(항혈소판제),', ''); |
|
831 |
+ setQuestionnaire({...questionnaire}); |
|
832 |
+ }} |
|
833 |
+ } |
|
834 |
+ /> |
|
835 |
+ <label for="pills-1">아스피린(항혈소판제)</label> |
|
836 |
+ |
|
837 |
+ <input type="checkbox" name="pills" id="pills-2" |
|
838 |
+ checked={questionnaire['medication_pill'].indexOf('당뇨약') > -1} |
|
839 |
+ onChange={(e) => { |
|
840 |
+ if (e.target.checked) { |
|
841 |
+ questionnaire['medication_pill'] += '당뇨약,'; |
|
842 |
+ setQuestionnaire({...questionnaire}); |
|
843 |
+ } else { |
|
844 |
+ questionnaire['medication_pill'] = questionnaire['medication_pill'].replace('당뇨약,', ''); |
|
845 |
+ setQuestionnaire({...questionnaire}); |
|
846 |
+ }} |
|
847 |
+ } |
|
848 |
+ /> |
|
849 |
+ <label for="pills-2">당뇨약</label> |
|
850 |
+ |
|
851 |
+ <input type="checkbox" name="pills" id="pills-3" |
|
852 |
+ checked={questionnaire['medication_pill'].indexOf('고혈압약') > -1} |
|
853 |
+ onChange={(e) => { |
|
854 |
+ if (e.target.checked) { |
|
855 |
+ questionnaire['medication_pill'] += '고혈압약,'; |
|
856 |
+ setQuestionnaire({...questionnaire}); |
|
857 |
+ } else { |
|
858 |
+ questionnaire['medication_pill'] = questionnaire['medication_pill'].replace('고혈압약,', ''); |
|
859 |
+ setQuestionnaire({...questionnaire}); |
|
860 |
+ }} |
|
861 |
+ } |
|
862 |
+ /> |
|
863 |
+ <label for="pills-3">고혈압약</label> |
|
864 |
+ |
|
865 |
+ <input type="checkbox" name="pills" id="pills-etc" |
|
866 |
+ checked={questionnaire['medication_pill'].indexOf('기타「」,') > -1} |
|
867 |
+ onChange={(e) => { |
|
868 |
+ if (e.target.checked) { |
|
869 |
+ questionnaire['medication_pill'] += '기타「」,'; |
|
870 |
+ setQuestionnaire({...questionnaire}); |
|
871 |
+ } else { |
|
872 |
+ questionnaire['medication_pill'] = questionnaire['medication_pill'].replace('기타「」,', ''); |
|
873 |
+ questionnaire['medication_pill_etc'] = ''; |
|
874 |
+ setQuestionnaire({...questionnaire}); |
|
875 |
+ }} |
|
876 |
+ } |
|
877 |
+ /> |
|
878 |
+ <label for="pills-etc">기타</label> |
|
879 |
+ <input type="text" style={{width: 'max-content', marginLeft: '1rem'}} |
|
880 |
+ disabled={questionnaire['medication_pill'].indexOf('기타「」,') == -1} |
|
881 |
+ value={questionnaire['medication_pill_etc']} |
|
882 |
+ onChange={(e) => { |
|
883 |
+ questionnaire['medication_pill_etc'] = e.target.value; |
|
884 |
+ setQuestionnaire({...questionnaire}); |
|
885 |
+ }} |
|
886 |
+ /> |
|
887 |
+ |
|
888 |
+ </td> |
|
889 |
+ </tr> |
|
890 |
+ </table> |
|
891 |
+ </div> |
|
892 |
+ <div className="flex-center"> |
|
893 |
+ {CommonUtil.isEmpty(questionnaire['questionnaire_record_idx']) |
|
894 |
+ ? <button className="btn-small red-btn" onClick={questionnaireInsert}>저장</button> |
|
895 |
+ : <button className="btn-small red-btn" onClick={questionnaireUpdate}>저장</button> |
|
896 |
+ } |
|
897 |
+ </div> |
|
898 |
+ </div> |
|
899 |
+ </Modal> |
|
900 |
+ |
|
901 |
+ |
|
902 |
+ <Modal open={modalOpen2} close={closeModal2} header="내원기록 관리 및 조회"> |
|
903 |
+ <div className="board-wrap"> |
|
904 |
+ <table className="margin-bottom2 senior-insert "> |
|
905 |
+ <tr> |
|
906 |
+ <th>진료 일자</th> |
|
907 |
+ <td> |
|
908 |
+ <input type="date" |
|
909 |
+ value={hospitalMedicalRecord['medical_date']} |
|
910 |
+ onChange={(e) => { |
|
911 |
+ hospitalMedicalRecord['medical_date'] = e.target.value; |
|
912 |
+ setHospitalMedicalRecord({...hospitalMedicalRecord}); |
|
913 |
+ }} |
|
914 |
+ ref={el => hospitalMedicalRecordRef.current['medical_date'] = el} |
|
915 |
+ /> |
|
916 |
+ </td> |
|
917 |
+ </tr> |
|
918 |
+ <tr> |
|
919 |
+ <th>진료 사유</th> |
|
920 |
+ <td className="flex-start "> |
|
921 |
+ <input type="text" |
|
922 |
+ value={hospitalMedicalRecord['medical_reason']} |
|
923 |
+ onChange={(e) => { |
|
924 |
+ hospitalMedicalRecord['medical_reason'] = e.target.value; |
|
925 |
+ setHospitalMedicalRecord({...hospitalMedicalRecord}); |
|
926 |
+ }} |
|
927 |
+ ref={el => hospitalMedicalRecordRef.current['medical_reason'] = el} |
|
928 |
+ /> |
|
929 |
+ </td> |
|
930 |
+ </tr> |
|
931 |
+ <tr> |
|
932 |
+ <th>진료 내용</th> |
|
933 |
+ <td colSpan={3}> |
|
934 |
+ <textarea className="medicine" cols="30" rows="2" |
|
935 |
+ value={hospitalMedicalRecord['medical_content']} |
|
936 |
+ onChange={(e) => { |
|
937 |
+ hospitalMedicalRecord['medical_content'] = e.target.value; |
|
938 |
+ setHospitalMedicalRecord({...hospitalMedicalRecord}); |
|
939 |
+ }} |
|
940 |
+ ref={el => hospitalMedicalRecordRef.current['medical_content'] = el} |
|
941 |
+ ></textarea> |
|
942 |
+ </td> |
|
943 |
+ </tr> |
|
944 |
+ </table> |
|
945 |
+ <div className="btn-wrap flex-center margin-bottom5"> |
|
946 |
+ {CommonUtil.isEmpty(hospitalMedicalRecord['medical_record_idx']) |
|
947 |
+ ? <button className="btn-small red-btn" onClick={hospitalMedicalRecordInsert}>등록</button> |
|
948 |
+ |
|
949 |
+ : <> |
|
950 |
+ <button className="btn-small gray-btn" onClick={setHospitalMedicalRecordInit}>수정취소</button> |
|
951 |
+ <button className="btn-small red-btn" onClick={hospitalMedicalRecordUpdate}>수정</button> |
|
952 |
+ </> |
|
953 |
+ } |
|
954 |
+ </div> |
|
955 |
+ <div> |
|
956 |
+ <table className="caregiver-user senior-insert senior-table"> |
|
957 |
+ <thead> |
|
958 |
+ <tr> |
|
959 |
+ <th>No</th> |
|
960 |
+ <th>진료 일자</th> |
|
961 |
+ <th>진료 사유</th> |
|
962 |
+ <th>진료 내용</th> |
|
963 |
+ <th>기록 작성자</th> |
|
964 |
+ </tr> |
|
965 |
+ </thead> |
|
966 |
+ <tbody> |
|
967 |
+ {hospitalMedicalRecordList.hospitalMedicalRecordList.map((item, idx) => { return ( |
|
968 |
+ <tr key={idx} onClick={() => {setHospitalMedicalRecord(item)}}> |
|
969 |
+ <td data-label="No">{hospitalMedicalRecordList.hospitalMedicalRecordListCount - idx - (hospitalMedicalRecordList.search.currentPage - 1) * hospitalMedicalRecordList.search.perPage}</td> |
|
970 |
+ <td data-label="진료 일자">{item['medical_date']}</td> |
|
971 |
+ <td data-label="진료 내용">{item['medical_reason']}</td> |
|
972 |
+ <td data-label="진료 사유">{item['medical_content']}</td> |
|
973 |
+ <td data-label="기록 작성자">{item['insert_user_name']}</td> |
|
974 |
+ </tr> |
|
975 |
+ )})} |
|
976 |
+ {CommonUtil.isEmpty(hospitalMedicalRecordList.hospitalMedicalRecordList) ? |
|
977 |
+ <tr> |
|
978 |
+ <td colSpan={5}>조회된 데이터가 없습니다</td> |
|
979 |
+ </tr> |
|
980 |
+ : null} |
|
981 |
+ </tbody> |
|
982 |
+ </table> |
|
983 |
+ <Pagination |
|
984 |
+ currentPage={hospitalMedicalRecordList.search.currentPage} |
|
985 |
+ perPage={hospitalMedicalRecordList.search.perPage} |
|
986 |
+ totalCount={hospitalMedicalRecordList.hospitalMedicalRecordListCount} |
|
987 |
+ maxRange={5} |
|
988 |
+ click={hospitalMedicalRecordSelectList} |
|
989 |
+ /> |
|
990 |
+ </div> |
|
991 |
+ </div> |
|
992 |
+ </Modal> |
|
993 |
+ |
|
994 |
+ |
|
995 |
+ <Modal open={modalOpen3} close={closeModal3} header="심전도판독소견 관리 및 조회"> |
|
996 |
+ <div className="board-wrap"> |
|
997 |
+ <table className="margin-bottom2 senior-insert "> |
|
998 |
+ <tr> |
|
999 |
+ <th>대상자명</th> |
|
1000 |
+ <td className="flex-start"> |
|
1001 |
+ <input type="text" placeholder="자동입력"/> |
|
1002 |
+ </td> |
|
1003 |
+ </tr> |
|
1004 |
+ <tr> |
|
1005 |
+ <th>측정 일자</th> |
|
1006 |
+ <td className="flex-start"> |
|
1007 |
+ <input type="text" placeholder="자동입력"/> |
|
1008 |
+ </td> |
|
1009 |
+ </tr> |
|
1010 |
+ <tr> |
|
1011 |
+ <th>측정 파일</th> |
|
1012 |
+ <td className="flex-start"> |
|
1013 |
+ <input type="file"></input> |
|
1014 |
+ </td> |
|
1015 |
+ </tr> |
|
1016 |
+ <tr> |
|
1017 |
+ <th>등록자</th> |
|
1018 |
+ <td className="flex-start"> |
|
1019 |
+ <input type="text" placeholder="자동입력"/> |
|
1020 |
+ </td> |
|
1021 |
+ </tr> |
|
1022 |
+ </table> |
|
1023 |
+ <div className="btn-wrap flex-center margin-bottom5"> |
|
1024 |
+ <button className="btn-small red-btn" onClick={closeModal3}>저장</button> |
|
1025 |
+ </div> |
|
1026 |
+ <div> |
|
1027 |
+ <table className="caregiver-user senior-table"> |
|
1028 |
+ <thead> |
|
1029 |
+ <tr> |
|
1030 |
+ <th>No</th> |
|
1031 |
+ <th>측정 일자</th> |
|
1032 |
+ <th>소견 작성 일자</th> |
|
1033 |
+ <th>소견 작성자</th> |
|
1034 |
+ </tr> |
|
1035 |
+ </thead> |
|
1036 |
+ <tbody> |
|
1037 |
+ {senior.seniorList.map((item, idx) => { return ( |
|
1038 |
+ <tr key={idx}> |
|
1039 |
+ <td data-label="No">{senior.seniorListCount - idx - (senior.search.currentPage - 1) * senior.search.perPage}</td> |
|
1040 |
+ <td data-label="소속기관명">{item['agency_name']}</td> |
|
1041 |
+ <td data-label="이름">{item['user_name']}</td> |
|
1042 |
+ <td data-label="생년월일">{item['user_birth']}</td> |
|
1043 |
+ </tr> |
|
1044 |
+ )})} |
|
1045 |
+ {CommonUtil.isEmpty(senior.seniorList) ? |
|
1046 |
+ <tr> |
|
1047 |
+ <td colSpan={4}>조회된 데이터가 없습니다</td> |
|
1048 |
+ </tr> |
|
1049 |
+ : null} |
|
1050 |
+ </tbody> |
|
1051 |
+ </table> |
|
1052 |
+ <Pagination |
|
1053 |
+ currentPage={senior.search.currentPage} |
|
1054 |
+ perPage={senior.search.perPage} |
|
1055 |
+ totalCount={senior.seniorListCount} |
|
1056 |
+ maxRange={5} |
|
1057 |
+ click={seniorSelectList} |
|
1058 |
+ /> |
|
1059 |
+ </div> |
|
1060 |
+ </div> |
|
1061 |
+ </Modal> |
|
1062 |
+ |
|
1063 |
+ |
|
1064 |
+ <Modal open={modalOpen4} close={closeModal4} header="혈압측정결과 관리 및 조회"> |
|
1065 |
+ <div className="board-wrap"> |
|
1066 |
+ <table className="margin-bottom2 senior-insert "> |
|
1067 |
+ <tr> |
|
1068 |
+ <th>대상자명</th> |
|
1069 |
+ <td className="flex-start"> |
|
1070 |
+ <input type="text" placeholder="자동입력"/> |
|
1071 |
+ </td> |
|
1072 |
+ </tr> |
|
1073 |
+ <tr> |
|
1074 |
+ <th>측정일자</th> |
|
1075 |
+ <td className="flex-start"> |
|
1076 |
+ <input type="text" placeholder="자동입력"/> |
|
1077 |
+ </td> |
|
1078 |
+ </tr> |
|
1079 |
+ <tr> |
|
1080 |
+ <th>최고혈압</th> |
|
1081 |
+ <td className="flex-start"> |
|
1082 |
+ <input type="text" /> |
|
1083 |
+ </td> |
|
1084 |
+ </tr> |
|
1085 |
+ <tr> |
|
1086 |
+ <th>최저혈압</th> |
|
1087 |
+ <td className="flex-start"> |
|
1088 |
+ <input type="text" /> |
|
1089 |
+ </td> |
|
1090 |
+ </tr> |
|
1091 |
+ <tr> |
|
1092 |
+ <th>맥박수</th> |
|
1093 |
+ <td className="flex-start"> |
|
1094 |
+ <input type="text" /> |
|
1095 |
+ </td> |
|
1096 |
+ </tr> |
|
1097 |
+ </table> |
|
1098 |
+ <div className="btn-wrap flex-center margin-bottom5"> |
|
1099 |
+ <button className="btn-small red-btn" onClick={closeModal4}>저장</button> |
|
1100 |
+ </div> |
|
1101 |
+ <div> |
|
1102 |
+ <table className="caregiver-user senior-insert senior-table"> |
|
1103 |
+ <thead> |
|
1104 |
+ <tr> |
|
1105 |
+ <th>No</th> |
|
1106 |
+ <th>측정 일자</th> |
|
1107 |
+ <th>최고 혈압</th> |
|
1108 |
+ <th>최저 혈압</th> |
|
1109 |
+ <th>맥박수</th> |
|
1110 |
+ <th>기록 작성자</th> |
|
1111 |
+ </tr> |
|
1112 |
+ </thead> |
|
1113 |
+ <tbody> |
|
1114 |
+ {senior.seniorList.map((item, idx) => { return ( |
|
1115 |
+ <tr key={idx}> |
|
1116 |
+ <td data-label="No">{senior.seniorListCount - idx - (senior.search.currentPage - 1) * senior.search.perPage}</td> |
|
1117 |
+ <td data-label="소속기관명">{item['agency_name']}</td> |
|
1118 |
+ <td data-label="이름">{item['user_name']}</td> |
|
1119 |
+ <td data-label="생년월일">{item['user_birth']}</td> |
|
1120 |
+ <td data-label="성별">{item['user_gender']}</td> |
|
1121 |
+ </tr> |
|
1122 |
+ )})} |
|
1123 |
+ {CommonUtil.isEmpty(senior.seniorList) ? |
|
1124 |
+ <tr> |
|
1125 |
+ <td colSpan={5}>조회된 데이터가 없습니다</td> |
|
1126 |
+ </tr> |
|
1127 |
+ : null} |
|
1128 |
+ </tbody> |
|
1129 |
+ </table> |
|
1130 |
+ <Pagination |
|
1131 |
+ currentPage={senior.search.currentPage} |
|
1132 |
+ perPage={senior.search.perPage} |
|
1133 |
+ totalCount={senior.seniorListCount} |
|
1134 |
+ maxRange={5} |
|
1135 |
+ click={seniorSelectList} |
|
1136 |
+ /> |
|
1137 |
+ </div> |
|
1138 |
+ </div> |
|
1139 |
+ </Modal> |
|
1140 |
+ |
|
263 | 1141 |
</main> |
264 | 1142 |
); |
265 | 1143 |
} |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?