
--- client/views/pages/callcenter/QandASelect.jsx
+++ client/views/pages/callcenter/QandASelect.jsx
... | ... | @@ -7,197 +7,202 @@ |
7 | 7 |
import CommonUtil from "../../../resources/js/CommonUtil.js"; |
8 | 8 |
|
9 | 9 |
export default function QandASelect() { |
10 |
- const navigate = useNavigate(); |
|
11 |
- const location = useLocation(); |
|
10 |
+ const navigate = useNavigate(); |
|
11 |
+ const location = useLocation(); |
|
12 | 12 |
|
13 |
- //전역 변수 저장 객체 |
|
14 |
- const state = useSelector((state) => {return state}); |
|
15 |
- const defaultGovernmentId = CommonUtil.isEmpty(state.loginUser) ? null : state.loginUser['government_id']; |
|
16 |
- const defaultAgencyId = CommonUtil.isEmpty(state.loginUser) ? null : state.loginUser['agency_id']; |
|
17 |
- const defaultUserId = CommonUtil.isEmpty(state.loginUser) == false |
|
18 |
- && (state.loginUser['authority'] == 'ROLE_SENIOR' |
|
19 |
- || state.loginUser['authority'] == 'ROLE_GUARDIAN') |
|
20 |
- ? state.loginUser['user_id'] : null; |
|
13 |
+ //전역 변수 저장 객체 |
|
14 |
+ const state = useSelector((state) => { return state }); |
|
15 |
+ const defaultGovernmentId = CommonUtil.isEmpty(state.loginUser) ? null : state.loginUser['government_id']; |
|
16 |
+ const defaultAgencyId = CommonUtil.isEmpty(state.loginUser) ? null : state.loginUser['agency_id']; |
|
17 |
+ const defaultUserId = CommonUtil.isEmpty(state.loginUser) == false |
|
18 |
+ && (state.loginUser['authority'] == 'ROLE_AGENCY' |
|
19 |
+ || state.loginUser['authority'] == 'ROLE_SENIOR' |
|
20 |
+ || state.loginUser['authority'] == 'ROLE_GUARDIAN') |
|
21 |
+ ? state.loginUser['user_id'] : null; |
|
21 | 22 |
|
22 | 23 |
|
23 |
- //기관 계층 구조 목록 |
|
24 |
- const [orgListOfHierarchy, setOrgListOfHierarchy] = React.useState([]); |
|
25 |
- //기관(관리, 시행) 계층 구조 목록 조회 |
|
26 |
- const orgSelectListOfHierarchy = () => { |
|
27 |
- const param = { |
|
28 |
- 'government_id': defaultGovernmentId, |
|
29 |
- 'agency_id': defaultAgencyId |
|
30 |
- } |
|
31 |
- if (CommonUtil.isEmpty(state.loginUser) == false |
|
32 |
- && state.loginUser['authority'] == 'ROLE_ADMIN') { |
|
33 |
- param['government_id'] = null; |
|
34 |
- param['agency_id'] = null; |
|
35 |
- } |
|
36 |
- |
|
37 |
- fetch("/org/orgSelectListOfHierarchy.json", { |
|
38 |
- method: "POST", |
|
39 |
- headers: { |
|
40 |
- 'Content-Type': 'application/json; charset=UTF-8' |
|
41 |
- }, |
|
42 |
- body: JSON.stringify(param), |
|
43 |
- }).then((response) => response.json()).then((data) => { |
|
44 |
- console.log("기관(관리, 시행) 계층 구조 목록 조회 : ", data); |
|
45 |
- setOrgListOfHierarchy(data); |
|
46 |
- }).catch((error) => { |
|
47 |
- console.log('orgSelectListOfHierarchy() /org/orgSelectListOfHierarchy.json error : ', error); |
|
48 |
- }); |
|
49 |
- }; |
|
50 |
- |
|
51 |
- const [search, setSearch] = React.useState({ |
|
52 |
- 'government_id': defaultGovernmentId, |
|
53 |
- 'agency_id': defaultAgencyId, |
|
54 |
- 'user_id': defaultUserId, |
|
55 |
- |
|
56 |
- 'equipment_serial_number': null, |
|
57 |
- 'inquiry_answer_user_id': null, |
|
58 |
- |
|
59 |
- 'searchType': null, |
|
60 |
- 'searchText': null, |
|
61 |
- 'currentPage': 0, |
|
62 |
- 'perPage': 10, |
|
63 |
- }); |
|
64 |
- const searchingEnter = (key) => { |
|
65 |
- if (key == 'Enter') { |
|
66 |
- searching(); |
|
67 |
- } else { |
|
68 |
- return; |
|
69 |
- } |
|
70 |
- } |
|
71 |
- const searching = () => { |
|
72 |
- equipmentInquirySelectList(1); |
|
73 |
- } |
|
74 |
- |
|
75 |
- //문의 목록 |
|
76 |
- const [equipmentInquiry, setEquipmentInquiry] = React.useState({ |
|
77 |
- equipmentInquiryList: [], |
|
78 |
- equipmentInquiryListCount: 0, |
|
79 |
- }); |
|
80 |
- //문의 목록 조회 |
|
81 |
- const equipmentInquirySelectList = (currentPage) => { |
|
82 |
- search.currentPage = CommonUtil.isEmpty(currentPage) ? 1 : currentPage; |
|
83 |
- fetch("/equipment/equipmentInquirySelectList.json", { |
|
84 |
- method: "POST", |
|
85 |
- headers: { |
|
86 |
- 'Content-Type': 'application/json; charset=UTF-8' |
|
87 |
- }, |
|
88 |
- body: JSON.stringify(search), |
|
89 |
- }).then((response) => response.json()).then((data) => { |
|
90 |
- console.log("문의 목록 조회 : ", data); |
|
91 |
- setEquipmentInquiry(data); |
|
92 |
- }).catch((error) => { |
|
93 |
- console.log('equipmentInquirySelectList() /equipment/equipmentInquirySelectList.json error : ', error); |
|
94 |
- }); |
|
95 |
- }; |
|
96 |
- |
|
97 |
- |
|
98 |
- //문의 상세조회 페이지 이동 |
|
99 |
- const equipmentInquirySelectOnePage = (item) => { |
|
100 |
- navigate("/QandASelectOne", {state: { |
|
101 |
- 'inquiry_idx': item['inquiry_idx'], |
|
102 |
- }}); |
|
24 |
+ //기관 계층 구조 목록 |
|
25 |
+ const [orgListOfHierarchy, setOrgListOfHierarchy] = React.useState([]); |
|
26 |
+ //기관(관리, 시행) 계층 구조 목록 조회 |
|
27 |
+ const orgSelectListOfHierarchy = () => { |
|
28 |
+ const param = { |
|
29 |
+ 'government_id': defaultGovernmentId, |
|
30 |
+ 'agency_id': defaultAgencyId |
|
31 |
+ } |
|
32 |
+ if (CommonUtil.isEmpty(state.loginUser) == false |
|
33 |
+ && state.loginUser['authority'] == 'ROLE_ADMIN') { |
|
34 |
+ param['government_id'] = null; |
|
35 |
+ param['agency_id'] = null; |
|
103 | 36 |
} |
104 | 37 |
|
38 |
+ fetch("/org/orgSelectListOfHierarchy.json", { |
|
39 |
+ method: "POST", |
|
40 |
+ headers: { |
|
41 |
+ 'Content-Type': 'application/json; charset=UTF-8' |
|
42 |
+ }, |
|
43 |
+ body: JSON.stringify(param), |
|
44 |
+ }).then((response) => response.json()).then((data) => { |
|
45 |
+ console.log("기관(관리, 시행) 계층 구조 목록 조회 : ", data); |
|
46 |
+ setOrgListOfHierarchy(data); |
|
47 |
+ }).catch((error) => { |
|
48 |
+ console.log('orgSelectListOfHierarchy() /org/orgSelectListOfHierarchy.json error : ', error); |
|
49 |
+ }); |
|
50 |
+ }; |
|
105 | 51 |
|
106 |
- React.useEffect(() => { |
|
107 |
- orgSelectListOfHierarchy(); |
|
108 |
- searching(); |
|
109 |
- }, []); |
|
110 |
- |
|
111 |
- return ( |
|
112 |
- <main> |
|
113 |
- <div className="search-management flex-end margin-bottom2 margin-top gap"> |
|
114 |
- <select style={{maxWidth: '150px'}} value={search['equipment_serial_number']} |
|
115 |
- onChange={(e) => {search['equipment_serial_number'] = e.target.value; setSearch({...search});}}> |
|
116 |
- <option value="">문의구분</option> |
|
117 |
- <option value="IS_NULL">일반문의</option> |
|
118 |
- <option value="IS_NOT_NULL">장비문의</option> |
|
119 |
- </select> |
|
120 |
- <select style={{maxWidth: '150px'}} value={search['inquiry_answer_user_id']} |
|
121 |
- onChange={(e) => {search['inquiry_answer_user_id'] = e.target.value; setSearch({...search});}}> |
|
122 |
- <option value="">상태</option> |
|
123 |
- <option value="IS_NULL">답변대기중</option> |
|
124 |
- <option value="IS_NOT_NULL">답변완료</option> |
|
125 |
- </select> |
|
126 |
- <select style={{maxWidth: '150px'}} value={search['searchType']} |
|
127 |
- onChange={(e) => {search['searchType'] = e.target.value; setSearch({...search});}}> |
|
128 |
- <option value="">전체</option> |
|
129 |
- <option value="user_name">문의자 이름</option> |
|
130 |
- <option value="user_id">문의자 ID</option> |
|
131 |
- <option value="user_phonenumber">문의자 연락처</option> |
|
132 |
- <option value="inquiry_title">제목</option> |
|
133 |
- <option value="inquiry_content">문의내용</option> |
|
134 |
- <option value="inquiry_answer_content">답변내용</option> |
|
135 |
- <option value="equipment_serial_number">시리얼 넘버</option> |
|
136 |
- </select> |
|
137 |
- <input type="text" |
|
138 |
- value={search['searchText']} |
|
139 |
- onChange={(e) => {search['searchText'] = e.target.value; setSearch({...search});}} |
|
140 |
- onKeyUp={(e) => searchingEnter(e.key)} |
|
141 |
- /> |
|
142 |
- <button className="btn-small gray-btn" style={{maxWidth: '150px'}} onClick={searching}>검색</button> |
|
143 |
- </div> |
|
52 |
+ const [search, setSearch] = React.useState({ |
|
53 |
+ 'government_id': defaultGovernmentId, |
|
54 |
+ 'agency_id': defaultAgencyId, |
|
55 |
+ 'user_id': defaultUserId, |
|
144 | 56 |
|
145 |
- <div className="content-wrap"> |
|
146 |
- <DetailTitle contentTitle={"Q&A"} /> |
|
147 |
- <div className="board-wrap" style={{ marginTop: "3rem" }} > |
|
148 |
- {CommonUtil.isEmpty(state.loginUser) == false && state.loginUser['authority'] != 'ROLE_ADMIN' ? |
|
149 |
- <div className="btn-wrap flex-end margin-bottom"> |
|
150 |
- <button className="btn-small gray-btn" onClick={() => {navigate("/QandAInsert");}}>문의하기</button> |
|
151 |
- </div> |
|
152 |
- : null} |
|
153 |
- <table class="equipment-detail senior-table"> |
|
154 |
- <thead> |
|
155 |
- <tr> |
|
156 |
- <th>No</th> |
|
157 |
- <th>관리기관</th> |
|
158 |
- <th>시행기관</th> |
|
159 |
- <th>제목</th> |
|
160 |
- <th>작성자</th> |
|
161 |
- <th>작성일시</th> |
|
162 |
- <th>문의구분</th> |
|
163 |
- <th>처리여부</th> |
|
164 |
- </tr> |
|
165 |
- </thead> |
|
166 |
- <tbody> |
|
167 |
- {equipmentInquiry.equipmentInquiryList.map((item, idx) => { return ( |
|
168 |
- <tr key={idx} onClick={() => equipmentInquirySelectOnePage(item)}> |
|
169 |
- <td data-label="No">{equipmentInquiry.equipmentInquiryListCount - idx - (search.currentPage - 1) * search.perPage}</td> |
|
170 |
- <td data-label="관리기관">{item['insert_user_government_name']}</td> |
|
171 |
- <td data-label="시행기관">{item['insert_user_agency_name']}</td> |
|
172 |
- <td data-label="제목">{item['inquiry_title']}</td> |
|
173 |
- <td data-label="작성자">{item['insert_user_name']}</td> |
|
174 |
- <td data-label="작성일시">{item['inquiry_insert_datetime']}</td> |
|
175 |
- <td data-label="문의구분"> |
|
176 |
- {CommonUtil.isEmpty(item['inquiry_type']) == false ? `장비(${item['inquiry_type']})` : '일반문의'} |
|
177 |
- </td> |
|
178 |
- <td data-label="처리여부"> |
|
179 |
- {CommonUtil.isEmpty(item['inquiry_answer_user_id']) == false ? '답변완료' : '답변대기중'} |
|
180 |
- </td> |
|
181 |
- </tr> |
|
182 |
- )})} |
|
183 |
- {CommonUtil.isEmpty(equipmentInquiry.equipmentInquiryList) ? |
|
184 |
- <tr> |
|
185 |
- <td colSpan={8}>조회된 데이터가 없습니다</td> |
|
186 |
- </tr> |
|
187 |
- : null} |
|
188 |
- </tbody> |
|
189 |
- </table> |
|
190 |
- <Pagination |
|
191 |
- currentPage={search.currentPage} |
|
192 |
- perPage={search.perPage} |
|
193 |
- totalCount={equipmentInquiry.equipmentInquiryListCount} |
|
194 |
- maxRange={5} |
|
195 |
- click={equipmentInquirySelectList} |
|
196 |
- /> |
|
197 |
- |
|
198 |
- </div> |
|
57 |
+ 'equipment_serial_number': null, |
|
58 |
+ 'inquiry_answer_user_id': null, |
|
59 |
+ |
|
60 |
+ 'searchType': null, |
|
61 |
+ 'searchText': null, |
|
62 |
+ 'currentPage': 0, |
|
63 |
+ 'perPage': 10, |
|
64 |
+ }); |
|
65 |
+ const searchingEnter = (key) => { |
|
66 |
+ if (key == 'Enter') { |
|
67 |
+ searching(); |
|
68 |
+ } else { |
|
69 |
+ return; |
|
70 |
+ } |
|
71 |
+ } |
|
72 |
+ const searching = () => { |
|
73 |
+ equipmentInquirySelectList(1); |
|
74 |
+ } |
|
75 |
+ |
|
76 |
+ //문의 목록 |
|
77 |
+ const [equipmentInquiry, setEquipmentInquiry] = React.useState({ |
|
78 |
+ equipmentInquiryList: [], |
|
79 |
+ equipmentInquiryListCount: 0, |
|
80 |
+ }); |
|
81 |
+ //문의 목록 조회 |
|
82 |
+ const equipmentInquirySelectList = (currentPage) => { |
|
83 |
+ search.currentPage = CommonUtil.isEmpty(currentPage) ? 1 : currentPage; |
|
84 |
+ fetch("/equipment/equipmentInquirySelectList.json", { |
|
85 |
+ method: "POST", |
|
86 |
+ headers: { |
|
87 |
+ 'Content-Type': 'application/json; charset=UTF-8' |
|
88 |
+ }, |
|
89 |
+ body: JSON.stringify(search), |
|
90 |
+ }).then((response) => response.json()).then((data) => { |
|
91 |
+ console.log("문의 목록 조회 : ", data); |
|
92 |
+ setEquipmentInquiry(data); |
|
93 |
+ }).catch((error) => { |
|
94 |
+ console.log('equipmentInquirySelectList() /equipment/equipmentInquirySelectList.json error : ', error); |
|
95 |
+ }); |
|
96 |
+ }; |
|
97 |
+ |
|
98 |
+ |
|
99 |
+ //문의 상세조회 페이지 이동 |
|
100 |
+ const equipmentInquirySelectOnePage = (item) => { |
|
101 |
+ navigate("/QandASelectOne", { |
|
102 |
+ state: { |
|
103 |
+ 'inquiry_idx': item['inquiry_idx'], |
|
104 |
+ } |
|
105 |
+ }); |
|
106 |
+ } |
|
107 |
+ |
|
108 |
+ |
|
109 |
+ React.useEffect(() => { |
|
110 |
+ orgSelectListOfHierarchy(); |
|
111 |
+ searching(); |
|
112 |
+ }, []); |
|
113 |
+ |
|
114 |
+ return ( |
|
115 |
+ <main> |
|
116 |
+ <div className="search-management flex-end margin-bottom2 margin-top gap"> |
|
117 |
+ <select style={{ maxWidth: '150px' }} value={search['equipment_serial_number']} |
|
118 |
+ onChange={(e) => { search['equipment_serial_number'] = e.target.value; setSearch({ ...search }); }}> |
|
119 |
+ <option value="">문의구분</option> |
|
120 |
+ <option value="IS_NULL">일반문의</option> |
|
121 |
+ <option value="IS_NOT_NULL">장비문의</option> |
|
122 |
+ </select> |
|
123 |
+ <select style={{ maxWidth: '150px' }} value={search['inquiry_answer_user_id']} |
|
124 |
+ onChange={(e) => { search['inquiry_answer_user_id'] = e.target.value; setSearch({ ...search }); }}> |
|
125 |
+ <option value="">상태</option> |
|
126 |
+ <option value="IS_NULL">답변대기중</option> |
|
127 |
+ <option value="IS_NOT_NULL">답변완료</option> |
|
128 |
+ </select> |
|
129 |
+ <select style={{ maxWidth: '150px' }} value={search['searchType']} |
|
130 |
+ onChange={(e) => { search['searchType'] = e.target.value; setSearch({ ...search }); }}> |
|
131 |
+ <option value="">전체</option> |
|
132 |
+ <option value="user_name">문의자 이름</option> |
|
133 |
+ <option value="user_id">문의자 ID</option> |
|
134 |
+ <option value="user_phonenumber">문의자 연락처</option> |
|
135 |
+ <option value="inquiry_title">제목</option> |
|
136 |
+ <option value="inquiry_content">문의내용</option> |
|
137 |
+ <option value="inquiry_answer_content">답변내용</option> |
|
138 |
+ <option value="equipment_serial_number">시리얼 넘버</option> |
|
139 |
+ </select> |
|
140 |
+ <input type="text" |
|
141 |
+ value={search['searchText']} |
|
142 |
+ onChange={(e) => { search['searchText'] = e.target.value; setSearch({ ...search }); }} |
|
143 |
+ onKeyUp={(e) => searchingEnter(e.key)} |
|
144 |
+ /> |
|
145 |
+ <button className="btn-small gray-btn" style={{ maxWidth: '150px' }} onClick={searching}>검색</button> |
|
146 |
+ </div> |
|
147 |
+ |
|
148 |
+ <div className="content-wrap"> |
|
149 |
+ <DetailTitle contentTitle={"Q&A"} /> |
|
150 |
+ <div className="board-wrap" style={{ marginTop: "3rem" }} > |
|
151 |
+ {CommonUtil.isEmpty(state.loginUser) == false && state.loginUser['authority'] != 'ROLE_ADMIN' ? |
|
152 |
+ <div className="btn-wrap flex-end margin-bottom"> |
|
153 |
+ <button className="btn-small gray-btn" onClick={() => { navigate("/QandAInsert"); }}>문의하기</button> |
|
199 | 154 |
</div> |
200 |
- </main> |
|
201 |
- ); |
|
155 |
+ : null} |
|
156 |
+ <table class="equipment-detail senior-table"> |
|
157 |
+ <thead> |
|
158 |
+ <tr> |
|
159 |
+ <th>No</th> |
|
160 |
+ <th>관리기관</th> |
|
161 |
+ <th>시행기관</th> |
|
162 |
+ <th>제목</th> |
|
163 |
+ <th>작성자</th> |
|
164 |
+ <th>작성일시</th> |
|
165 |
+ <th>문의구분</th> |
|
166 |
+ <th>처리여부</th> |
|
167 |
+ </tr> |
|
168 |
+ </thead> |
|
169 |
+ <tbody> |
|
170 |
+ {equipmentInquiry.equipmentInquiryList.map((item, idx) => { |
|
171 |
+ return ( |
|
172 |
+ <tr key={idx} onClick={() => equipmentInquirySelectOnePage(item)}> |
|
173 |
+ <td data-label="No">{equipmentInquiry.equipmentInquiryListCount - idx - (search.currentPage - 1) * search.perPage}</td> |
|
174 |
+ <td data-label="관리기관">{item['insert_user_government_name']}</td> |
|
175 |
+ <td data-label="시행기관">{item['insert_user_agency_name']}</td> |
|
176 |
+ <td data-label="제목">{item['inquiry_title']}</td> |
|
177 |
+ <td data-label="작성자">{item['insert_user_name']}</td> |
|
178 |
+ <td data-label="작성일시">{item['inquiry_insert_datetime']}</td> |
|
179 |
+ <td data-label="문의구분"> |
|
180 |
+ {CommonUtil.isEmpty(item['inquiry_type']) == false ? `장비(${item['inquiry_type']})` : '일반문의'} |
|
181 |
+ </td> |
|
182 |
+ <td data-label="처리여부"> |
|
183 |
+ {CommonUtil.isEmpty(item['inquiry_answer_user_id']) == false ? '답변완료' : '답변대기중'} |
|
184 |
+ </td> |
|
185 |
+ </tr> |
|
186 |
+ ) |
|
187 |
+ })} |
|
188 |
+ {CommonUtil.isEmpty(equipmentInquiry.equipmentInquiryList) ? |
|
189 |
+ <tr> |
|
190 |
+ <td colSpan={8}>조회된 데이터가 없습니다</td> |
|
191 |
+ </tr> |
|
192 |
+ : null} |
|
193 |
+ </tbody> |
|
194 |
+ </table> |
|
195 |
+ <Pagination |
|
196 |
+ currentPage={search.currentPage} |
|
197 |
+ perPage={search.perPage} |
|
198 |
+ totalCount={equipmentInquiry.equipmentInquiryListCount} |
|
199 |
+ maxRange={5} |
|
200 |
+ click={equipmentInquirySelectList} |
|
201 |
+ /> |
|
202 |
+ |
|
203 |
+ </div> |
|
204 |
+ </div> |
|
205 |
+ </main> |
|
206 |
+ ); |
|
202 | 207 |
} |
203 | 208 |
|
--- client/views/pages/equipment/EquipmentManagementInsert.jsx
+++ client/views/pages/equipment/EquipmentManagementInsert.jsx
... | ... | @@ -6,7 +6,7 @@ |
6 | 6 |
<main> |
7 | 7 |
<div className="content-wrap"> |
8 | 8 |
<div className="page-title margin-bottom">장비 등록</div> |
9 |
- <div className="flex-align-start margin-bottom2 insert"> |
|
9 |
+ <div className="flex-align-start margin-bottom2 insert"> |
|
10 | 10 |
<table className="flex70 margin-bottom"> |
11 | 11 |
<tbody className="equipment-insert"> |
12 | 12 |
<tr> |
... | ... | @@ -19,14 +19,14 @@ |
19 | 19 |
<th>기기종류</th> |
20 | 20 |
<td colSpan={5}> |
21 | 21 |
<div className="flex-start"> |
22 |
- <input type="checkbox" /> |
|
22 |
+ <input type="checkbox" /> |
|
23 | 23 |
<label htmlFor=""> |
24 |
- |
|
24 |
+ |
|
25 | 25 |
스마트 약상자 |
26 | 26 |
</label> |
27 | 27 |
<input type="checkbox" /> |
28 | 28 |
<label htmlFor=""> |
29 |
- |
|
29 |
+ |
|
30 | 30 |
심전도 |
31 | 31 |
</label> |
32 | 32 |
</div> |
... | ... | @@ -51,11 +51,15 @@ |
51 | 51 |
<tr> |
52 | 52 |
<th>대여일</th> |
53 | 53 |
<td> |
54 |
- <input type="date"/> |
|
54 |
+ <input type="date" |
|
55 |
+ onKeyDown={function (e) { e.preventDefault() }} |
|
56 |
+ /> |
|
55 | 57 |
</td> |
56 | 58 |
<th>반납일</th> |
57 | 59 |
<td> |
58 |
- <input type="date" /> |
|
60 |
+ <input type="date" |
|
61 |
+ onKeyDown={function (e) { e.preventDefault() }} |
|
62 |
+ /> |
|
59 | 63 |
</td> |
60 | 64 |
<th>작동여부</th> |
61 | 65 |
<td> |
... | ... | @@ -92,7 +96,7 @@ |
92 | 96 |
<tr> |
93 | 97 |
<th>비고</th> |
94 | 98 |
<td colSpan={5}> |
95 |
- <textarea name="" id="" cols="30" rows="10" style={{height:"167px"}}></textarea> |
|
99 |
+ <textarea name="" id="" cols="30" rows="10" style={{ height: "167px" }}></textarea> |
|
96 | 100 |
</td> |
97 | 101 |
</tr> |
98 | 102 |
</tbody> |
--- client/views/pages/equipment/EquipmentRentalInsert.jsx
+++ client/views/pages/equipment/EquipmentRentalInsert.jsx
... | ... | @@ -57,8 +57,10 @@ |
57 | 57 |
<th>대여일</th> |
58 | 58 |
<td colSpan={5}> |
59 | 59 |
<div className="flex"> |
60 |
- <input type="date" />~ |
|
61 |
- <input type="date" /> |
|
60 |
+ <input type="date" |
|
61 |
+ onKeyDown={function (e) { e.preventDefault() }} />~ |
|
62 |
+ <input type="date" |
|
63 |
+ onKeyDown={function (e) { e.preventDefault() }} /> |
|
62 | 64 |
</div> |
63 | 65 |
</td> |
64 | 66 |
</tr> |
--- client/views/pages/equipment/EquipmentSelect.jsx
+++ client/views/pages/equipment/EquipmentSelect.jsx
... | ... | @@ -847,6 +847,7 @@ |
847 | 847 |
<th>생산일자</th> |
848 | 848 |
<td> |
849 | 849 |
<input type="date" |
850 |
+ onKeyDown={function (e) { e.preventDefault() }} |
|
850 | 851 |
value={equipment['equipment_product_date']} |
851 | 852 |
ref={el => equipmentRef.current['equipment_product_date'] = el} |
852 | 853 |
onChange={(e) => equipmentValueChange('equipment_product_date', e.target.value)} /> |
... | ... | @@ -856,6 +857,7 @@ |
856 | 857 |
<th><span style={{ color: "red" }}>*</span>입고일자</th> |
857 | 858 |
<td> |
858 | 859 |
<input type="date" |
860 |
+ onKeyDown={function (e) { e.preventDefault() }} |
|
859 | 861 |
value={equipment['equipment_stock_date']} |
860 | 862 |
ref={el => equipmentRef.current['equipment_stock_date'] = el} |
861 | 863 |
onChange={(e) => equipmentValueChange('equipment_stock_date', e.target.value)} /> |
... | ... | @@ -905,6 +907,7 @@ |
905 | 907 |
<div className="search-management flex-end margin-bottom2 margin-top"> |
906 | 908 |
<div style={{ width: '90px', fontWeight: '600' }}>납품일자</div> |
907 | 909 |
<input type="date" |
910 |
+ onKeyDown={function (e) { e.preventDefault() }} |
|
908 | 911 |
value={equipmentDelivery['delivery_date']} |
909 | 912 |
onChange={(e) => { |
910 | 913 |
equipmentDelivery['delivery_date'] = e.target.value; |
--- client/views/pages/equipment/GovernmentEquipmentSelect.jsx
+++ client/views/pages/equipment/GovernmentEquipmentSelect.jsx
... | ... | @@ -739,6 +739,7 @@ |
739 | 739 |
<th>생산일자</th> |
740 | 740 |
<td> |
741 | 741 |
<input type="date" |
742 |
+ onKeyDown={function (e) { e.preventDefault() }} |
|
742 | 743 |
value={equipment['equipment_product_date']} |
743 | 744 |
ref={el => equipmentRef.current['equipment_product_date'] = el} |
744 | 745 |
onChange={(e) => equipmentValueChange('equipment_product_date', e.target.value)} /> |
... | ... | @@ -748,6 +749,7 @@ |
748 | 749 |
<th><span style={{ color: "red" }}>*</span>입고일자</th> |
749 | 750 |
<td> |
750 | 751 |
<input type="date" |
752 |
+ onKeyDown={function (e) { e.preventDefault() }} |
|
751 | 753 |
value={equipment['equipment_stock_date']} |
752 | 754 |
ref={el => equipmentRef.current['equipment_stock_date'] = el} |
753 | 755 |
onChange={(e) => equipmentValueChange('equipment_stock_date', e.target.value)} /> |
--- client/views/pages/healthcare/HealthcareSelectOne.jsx
+++ client/views/pages/healthcare/HealthcareSelectOne.jsx
... | ... | @@ -527,7 +527,9 @@ |
527 | 527 |
<tr> |
528 | 528 |
<th>방문날짜</th> |
529 | 529 |
<td colSpan={3}> |
530 |
- <input type="date" value={visitRecord['visit_date']} |
|
530 |
+ <input type="date" |
|
531 |
+ onKeyDown={function (e) { e.preventDefault() }} |
|
532 |
+ value={visitRecord['visit_date']} |
|
531 | 533 |
onChange={(e) => { |
532 | 534 |
visitRecord['visit_date'] = e.target.value; |
533 | 535 |
setVisitRecord({ ...visitRecord }); |
--- client/views/pages/healthcare/Medicalcare.jsx
+++ client/views/pages/healthcare/Medicalcare.jsx
... | ... | @@ -13,993 +13,1007 @@ |
13 | 13 |
|
14 | 14 |
|
15 | 15 |
export default function UserAuthoriySelect() { |
16 |
- const navigate = useNavigate(); |
|
17 |
- const location = useLocation(); |
|
16 |
+ const navigate = useNavigate(); |
|
17 |
+ const location = useLocation(); |
|
18 | 18 |
|
19 |
- //전역 변수 저장 객체 |
|
20 |
- const state = useSelector((state) => {return state}); |
|
21 |
- const defaultUserId = CommonUtil.isEmpty(state.loginUser) ? null : state.loginUser['user_id']; |
|
19 |
+ //전역 변수 저장 객체 |
|
20 |
+ const state = useSelector((state) => { return state }); |
|
21 |
+ const defaultUserId = CommonUtil.isEmpty(state.loginUser) ? null : state.loginUser['user_id']; |
|
22 | 22 |
|
23 |
- //검색(엔터) |
|
24 |
- const searchingEnter = (key) => { |
|
25 |
- if (key == 'Enter') { |
|
26 |
- searching(); |
|
27 |
- } else { |
|
28 |
- return; |
|
29 |
- } |
|
30 |
- } |
|
31 |
- //검색 |
|
32 |
- const searching = () => { |
|
33 |
- if (CommonUtil.isEmpty(state.loginUser) == false |
|
34 |
- && state.loginUser['authority'] == 'ROLE_AGENCY' && isMySenior) { |
|
35 |
- senior.search['agent_id'] = state.loginUser['user_id']; |
|
23 |
+ //검색(엔터) |
|
24 |
+ const searchingEnter = (key) => { |
|
25 |
+ if (key == 'Enter') { |
|
26 |
+ searching(); |
|
27 |
+ } else { |
|
28 |
+ return; |
|
29 |
+ } |
|
30 |
+ } |
|
31 |
+ //검색 |
|
32 |
+ const searching = () => { |
|
33 |
+ if (CommonUtil.isEmpty(state.loginUser) == false |
|
34 |
+ && state.loginUser['authority'] == 'ROLE_AGENCY' && isMySenior) { |
|
35 |
+ senior.search['agent_id'] = state.loginUser['user_id']; |
|
36 |
+ } else { |
|
37 |
+ senior.search['agent_id'] = null; |
|
38 |
+ } |
|
39 |
+ |
|
40 |
+ setSenior({ ...senior }); |
|
41 |
+ |
|
42 |
+ seniorSelectList(1); |
|
43 |
+ } |
|
44 |
+ |
|
45 |
+ const [isMySenior, setIsMySenior] = React.useState(true); |
|
46 |
+ React.useEffect(() => { |
|
47 |
+ searching(); |
|
48 |
+ }, [isMySenior]) |
|
49 |
+ //보호사(간호사)의 돌봄 대상자(시니어) |
|
50 |
+ const [senior, setSenior] = React.useState({ |
|
51 |
+ seniorList: [], seniorListCount: 0, search: { |
|
52 |
+ 'government_id': CommonUtil.isEmpty(state.loginUser) ? null : state.loginUser['government_id'], |
|
53 |
+ 'agency_id': CommonUtil.isEmpty(state.loginUser) ? null : state.loginUser['agency_id'], |
|
54 |
+ 'searchType': null, |
|
55 |
+ 'searchText': null, |
|
56 |
+ 'currentPage': 1, |
|
57 |
+ 'perPage': 10, |
|
58 |
+ } |
|
59 |
+ }); |
|
60 |
+ //보호사(간호사)의 돌봄 대상자(시니어) 목록 조회 |
|
61 |
+ const seniorSelectList = (currentPage) => { |
|
62 |
+ senior.search.currentPage = CommonUtil.isEmpty(currentPage) ? 1 : currentPage; |
|
63 |
+ |
|
64 |
+ fetch("/user/seniorSelectList.json", { |
|
65 |
+ method: "POST", |
|
66 |
+ headers: { |
|
67 |
+ 'Content-Type': 'application/json; charset=UTF-8' |
|
68 |
+ }, |
|
69 |
+ body: JSON.stringify(senior.search), |
|
70 |
+ }).then((response) => response.json()).then((data) => { |
|
71 |
+ data.search = senior.search; |
|
72 |
+ console.log("돌봄 대상자(시니어) 목록 조회 : ", data); |
|
73 |
+ setSenior(data); |
|
74 |
+ }).catch((error) => { |
|
75 |
+ console.log('seniorSelectList() /user/seniorSelectList.json error : ', error); |
|
76 |
+ }); |
|
77 |
+ } |
|
78 |
+ |
|
79 |
+ |
|
80 |
+ //현재 선택한 대상자 정보 |
|
81 |
+ const [targetSenior, setTargetSenior] = React.useState({ 'senior_id': null }); |
|
82 |
+ |
|
83 |
+ //문진표 |
|
84 |
+ const [modalOpen, setModalOpen] = React.useState(false); |
|
85 |
+ const openModal = (senior) => { |
|
86 |
+ targetSenior['senior_id'] = senior['senior_id']; |
|
87 |
+ setTargetSenior(senior); |
|
88 |
+ questionnaireSelectList(); |
|
89 |
+ |
|
90 |
+ setModalOpen(true); |
|
91 |
+ }; |
|
92 |
+ const closeModal = () => { |
|
93 |
+ setTargetSenior({ 'senior_id': null }); |
|
94 |
+ setModalOpen(false); |
|
95 |
+ }; |
|
96 |
+ //내원기록 |
|
97 |
+ const [modalOpen2, setModalOpen2] = React.useState(false); |
|
98 |
+ const openModal2 = (senior) => { |
|
99 |
+ targetSenior['senior_id'] = senior['senior_id']; |
|
100 |
+ setTargetSenior(senior); |
|
101 |
+ hospitalMedicalRecordSelectList(); |
|
102 |
+ |
|
103 |
+ setModalOpen2(true); |
|
104 |
+ }; |
|
105 |
+ const closeModal2 = () => { |
|
106 |
+ setTargetSenior({ 'senior_id': null }); |
|
107 |
+ setModalOpen2(false); |
|
108 |
+ }; |
|
109 |
+ //심전도 |
|
110 |
+ const [modalOpen3, setModalOpen3] = React.useState(false); |
|
111 |
+ const openModal3 = (senior) => { |
|
112 |
+ targetSenior['senior_id'] = senior['senior_id']; |
|
113 |
+ |
|
114 |
+ setEcgInit(); |
|
115 |
+ ecg.commonFileList = []; |
|
116 |
+ |
|
117 |
+ setTargetSenior(senior); |
|
118 |
+ ecgSelectList(); |
|
119 |
+ |
|
120 |
+ setModalOpen3(true); |
|
121 |
+ }; |
|
122 |
+ const closeModal3 = () => { |
|
123 |
+ setTargetSenior({ 'senior_id': null }); |
|
124 |
+ setModalOpen3(false); |
|
125 |
+ }; |
|
126 |
+ //혈압 |
|
127 |
+ const [modalOpen4, setModalOpen4] = React.useState(false); |
|
128 |
+ const openModal4 = (senior) => { |
|
129 |
+ targetSenior['senior_id'] = senior['senior_id']; |
|
130 |
+ |
|
131 |
+ setBloodPressureInit(); |
|
132 |
+ |
|
133 |
+ setTargetSenior(senior); |
|
134 |
+ bloodPressureSelectList(); |
|
135 |
+ |
|
136 |
+ setModalOpen4(true); |
|
137 |
+ }; |
|
138 |
+ const closeModal4 = () => { |
|
139 |
+ setTargetSenior({ 'senior_id': null }); |
|
140 |
+ setModalOpen4(false); |
|
141 |
+ }; |
|
142 |
+ |
|
143 |
+ /****************** 문진표 (시작) ******************/ |
|
144 |
+ const questionnaireInit = { |
|
145 |
+ 'senior_id': null, |
|
146 |
+ 'questionnaire_record_idx': null, |
|
147 |
+ 'weight_change_amount': 0, |
|
148 |
+ 'past_history': null, |
|
149 |
+ 'agent_id': defaultUserId, |
|
150 |
+ 'medical_record_idx': null, |
|
151 |
+ |
|
152 |
+ 'smoke_type': false, |
|
153 |
+ 'no_smoke_period': null, |
|
154 |
+ 'smoke_period': null, |
|
155 |
+ 'daily_smoke_amount': null, |
|
156 |
+ |
|
157 |
+ 'drink_type': false, |
|
158 |
+ 'weekly_drink_amount': null, |
|
159 |
+ 'onetime_alcoholic_kind': null, |
|
160 |
+ 'onetime_bottle_amount': null, |
|
161 |
+ 'onetime_cup_amount': null, |
|
162 |
+ |
|
163 |
+ 'exercise_type': false, |
|
164 |
+ 'weekly_exercise_amount': null, |
|
165 |
+ 'onetime_exercise_hour': null, |
|
166 |
+ 'onetime_exercise_minute': null, |
|
167 |
+ 'onetime_exercise_kind': null, |
|
168 |
+ |
|
169 |
+ 'medication_pill': '', |
|
170 |
+ 'medication_pill_etc': '', |
|
171 |
+ }; |
|
172 |
+ //문진표 정보 |
|
173 |
+ const [questionnaire, setQuestionnaire] = React.useState({ ...questionnaireInit }); |
|
174 |
+ const questionnaireRef = React.useRef({ ...questionnaireInit }); |
|
175 |
+ |
|
176 |
+ //문진표 등록 |
|
177 |
+ const questionnaireInsert = () => { |
|
178 |
+ questionnaire['senior_id'] = targetSenior['senior_id']; |
|
179 |
+ questionnaire['agent_id'] = defaultUserId; |
|
180 |
+ setQuestionnaire({ ...questionnaire }); |
|
181 |
+ |
|
182 |
+ fetch("/hospital/questionnaireInsert.json", { |
|
183 |
+ method: "POST", |
|
184 |
+ headers: { |
|
185 |
+ 'Content-Type': 'application/json; charset=UTF-8' |
|
186 |
+ }, |
|
187 |
+ body: JSON.stringify(questionnaire), |
|
188 |
+ }).then((response) => response.json()).then((data) => { |
|
189 |
+ console.log("문진표 등록 결과(건수) : ", data); |
|
190 |
+ if (data > 0) { |
|
191 |
+ alert("저장완료"); |
|
192 |
+ closeModal(); |
|
193 |
+ } else { |
|
194 |
+ alert("저장에 실패하였습니다. 관리자에게 문의바랍니다."); |
|
195 |
+ } |
|
196 |
+ }).catch((error) => { |
|
197 |
+ console.log('questionnaireInsert() /hospital/questionnaireInsert.json error : ', error); |
|
198 |
+ }); |
|
199 |
+ } |
|
200 |
+ |
|
201 |
+ //문진표 수정 |
|
202 |
+ const questionnaireUpdate = () => { |
|
203 |
+ questionnaire['senior_id'] = targetSenior['senior_id']; |
|
204 |
+ questionnaire['agent_id'] = defaultUserId; |
|
205 |
+ setQuestionnaire({ ...questionnaire }); |
|
206 |
+ |
|
207 |
+ fetch("/hospital/questionnaireUpdate.json", { |
|
208 |
+ method: "POST", |
|
209 |
+ headers: { |
|
210 |
+ 'Content-Type': 'application/json; charset=UTF-8' |
|
211 |
+ }, |
|
212 |
+ body: JSON.stringify(questionnaire), |
|
213 |
+ }).then((response) => response.json()).then((data) => { |
|
214 |
+ console.log("문진표 수정 결과(건수) : ", data); |
|
215 |
+ if (data > 0) { |
|
216 |
+ alert("저장완료"); |
|
217 |
+ closeModal(); |
|
218 |
+ } else { |
|
219 |
+ alert("저장에 실패하였습니다. 관리자에게 문의바랍니다."); |
|
220 |
+ } |
|
221 |
+ }).catch((error) => { |
|
222 |
+ console.log('questionnaireUpdate() /hospital/questionnaireUpdate.json error : ', error); |
|
223 |
+ }); |
|
224 |
+ } |
|
225 |
+ |
|
226 |
+ //문진표 목록 조회 |
|
227 |
+ const questionnaireSelectList = () => { |
|
228 |
+ fetch("/hospital/questionnaireSelectList.json", { |
|
229 |
+ method: "POST", |
|
230 |
+ headers: { |
|
231 |
+ 'Content-Type': 'application/json; charset=UTF-8' |
|
232 |
+ }, |
|
233 |
+ body: JSON.stringify(targetSenior), |
|
234 |
+ }).then((response) => response.json()).then((data) => { |
|
235 |
+ console.log("문진표 목록 조회 결과(건수) : ", data); |
|
236 |
+ if (CommonUtil.isEmpty(data.questionnaireList) == false) { |
|
237 |
+ let item = data.questionnaireList[0];//최신순으로 가지고오기 때문에, 0 인텍스가 젤 최신 |
|
238 |
+ if (CommonUtil.isEmpty(item['medication_pill'])) { |
|
239 |
+ item['medication_pill'] = ''; |
|
36 | 240 |
} else { |
37 |
- senior.search['agent_id'] = null; |
|
241 |
+ const startCheckWord = '기타「'; |
|
242 |
+ const endCheckWord = '」'; |
|
243 |
+ if (item['medication_pill'].indexOf(startCheckWord) > -1) { |
|
244 |
+ let startIndex = item['medication_pill'].indexOf(startCheckWord); |
|
245 |
+ let lastIndex = item['medication_pill'].lastIndexOf(endCheckWord); |
|
246 |
+ console.log("000000 item['medication_pill_etc'] : ", item['medication_pill_etc'], "item['medication_pill'] : ", item['medication_pill']); |
|
247 |
+ item['medication_pill_etc'] = item['medication_pill'].substring(startIndex + startCheckWord.length, lastIndex); |
|
248 |
+ let medicationPillFront = item['medication_pill'].substring(0, startIndex + startCheckWord.length); |
|
249 |
+ let medicationPillBack = item['medication_pill'].substring(lastIndex); |
|
250 |
+ item['medication_pill'] = medicationPillFront + medicationPillBack; |
|
251 |
+ console.log("333333 item['medication_pill_etc'] : ", item['medication_pill_etc'], "item['medication_pill'] : ", item['medication_pill']); |
|
252 |
+ } else { |
|
253 |
+ item['medication_pill_etc'] = ''; |
|
254 |
+ } |
|
38 | 255 |
} |
39 |
- |
|
40 |
- setSenior({...senior}); |
|
41 | 256 |
|
42 |
- seniorSelectList(1); |
|
43 |
- } |
|
44 |
- |
|
45 |
- const [isMySenior, setIsMySenior] = React.useState(true); |
|
46 |
- React.useEffect(() => { |
|
47 |
- searching(); |
|
48 |
- }, [isMySenior]) |
|
49 |
- //보호사(간호사)의 돌봄 대상자(시니어) |
|
50 |
- const [senior, setSenior] = React.useState({seniorList: [], seniorListCount: 0, search: { |
|
51 |
- 'government_id': CommonUtil.isEmpty(state.loginUser) ? null : state.loginUser['government_id'], |
|
52 |
- 'agency_id': CommonUtil.isEmpty(state.loginUser) ? null : state.loginUser['agency_id'], |
|
53 |
- 'searchType': null, |
|
54 |
- 'searchText': null, |
|
55 |
- 'currentPage': 1, |
|
56 |
- 'perPage': 10, |
|
57 |
- }}); |
|
58 |
- //보호사(간호사)의 돌봄 대상자(시니어) 목록 조회 |
|
59 |
- const seniorSelectList = (currentPage) => { |
|
60 |
- senior.search.currentPage = CommonUtil.isEmpty(currentPage) ? 1 : currentPage; |
|
61 |
- |
|
62 |
- fetch("/user/seniorSelectList.json", { |
|
63 |
- method: "POST", |
|
64 |
- headers: { |
|
65 |
- 'Content-Type': 'application/json; charset=UTF-8' |
|
66 |
- }, |
|
67 |
- body: JSON.stringify(senior.search), |
|
68 |
- }).then((response) => response.json()).then((data) => { |
|
69 |
- data.search = senior.search; |
|
70 |
- console.log("돌봄 대상자(시니어) 목록 조회 : ", data); |
|
71 |
- setSenior(data); |
|
72 |
- }).catch((error) => { |
|
73 |
- console.log('seniorSelectList() /user/seniorSelectList.json error : ', error); |
|
74 |
- }); |
|
75 |
- } |
|
257 |
+ setQuestionnaire(item); |
|
258 |
+ } |
|
259 |
+ }).catch((error) => { |
|
260 |
+ console.log('questionnaireSelectList() /hospital/questionnaireSelectList.json error : ', error); |
|
261 |
+ }); |
|
262 |
+ } |
|
263 |
+ /****************** 문진표 (종료) ******************/ |
|
76 | 264 |
|
77 | 265 |
|
78 |
- //현재 선택한 대상자 정보 |
|
79 |
- const [targetSenior, setTargetSenior] = React.useState({'senior_id': null}); |
|
80 | 266 |
|
81 |
- //문진표 |
|
82 |
- const [modalOpen, setModalOpen] = React.useState(false); |
|
83 |
- const openModal = (senior) => { |
|
84 |
- targetSenior['senior_id'] = senior['senior_id']; |
|
85 |
- setTargetSenior(senior); |
|
86 |
- questionnaireSelectList(); |
|
267 |
+ /****************** 병원 진료 기록 (시작) ******************/ |
|
268 |
+ const hospitalMedicalRecordInit = { |
|
269 |
+ 'senior_id': null, |
|
270 |
+ 'medical_record_idx': null, |
|
271 |
+ 'medical_date': CommonUtil.getDate(), |
|
272 |
+ 'medical_reason': '', |
|
273 |
+ 'medical_content': '', |
|
274 |
+ 'agent_id': defaultUserId |
|
275 |
+ }; |
|
276 |
+ //병원 진료 기록 정보 |
|
277 |
+ const [hospitalMedicalRecord, setHospitalMedicalRecord] = React.useState({ ...hospitalMedicalRecordInit }); |
|
278 |
+ const hospitalMedicalRecordRef = React.useRef({ ...hospitalMedicalRecordInit }); |
|
87 | 279 |
|
88 |
- setModalOpen(true); |
|
89 |
- }; |
|
90 |
- const closeModal = () => { |
|
91 |
- setTargetSenior({'senior_id': null}); |
|
92 |
- setModalOpen(false); |
|
93 |
- }; |
|
94 |
- //내원기록 |
|
95 |
- const [modalOpen2, setModalOpen2] = React.useState(false); |
|
96 |
- const openModal2 = (senior) => { |
|
97 |
- targetSenior['senior_id'] = senior['senior_id']; |
|
98 |
- setTargetSenior(senior); |
|
280 |
+ //병원 진료 기록 유효성 검사 |
|
281 |
+ const hospitalMedicalRecordValidation = () => { |
|
282 |
+ const target = hospitalMedicalRecord; |
|
283 |
+ const targetRef = hospitalMedicalRecordRef; |
|
284 |
+ |
|
285 |
+ if (CommonUtil.isEmpty(target['medical_date']) == true) { |
|
286 |
+ targetRef.current['medical_date'].focus(); |
|
287 |
+ alert("진료 일자를 선택해 주세요."); |
|
288 |
+ return false; |
|
289 |
+ } |
|
290 |
+ if (CommonUtil.isEmpty(target['medical_reason']) == true) { |
|
291 |
+ targetRef.current['medical_reason'].focus(); |
|
292 |
+ alert("진료 사유를 입력해 주세요."); |
|
293 |
+ return false; |
|
294 |
+ } |
|
295 |
+ if (CommonUtil.isEmpty(target['medical_content']) == true) { |
|
296 |
+ targetRef.current['medical_content'].focus(); |
|
297 |
+ alert("진료 내용을 입력해 주세요."); |
|
298 |
+ return false; |
|
299 |
+ } |
|
300 |
+ |
|
301 |
+ return true; |
|
302 |
+ } |
|
303 |
+ |
|
304 |
+ |
|
305 |
+ //병원 진료 기록 등록 |
|
306 |
+ const hospitalMedicalRecordInsert = () => { |
|
307 |
+ if (hospitalMedicalRecordValidation() == false) { |
|
308 |
+ return; |
|
309 |
+ } |
|
310 |
+ |
|
311 |
+ hospitalMedicalRecord['senior_id'] = targetSenior['senior_id']; |
|
312 |
+ hospitalMedicalRecord['agent_id'] = defaultUserId; |
|
313 |
+ setHospitalMedicalRecord({ ...hospitalMedicalRecord }); |
|
314 |
+ |
|
315 |
+ fetch("/hospital/hospitalMedicalRecordInsert.json", { |
|
316 |
+ method: "POST", |
|
317 |
+ headers: { |
|
318 |
+ 'Content-Type': 'application/json; charset=UTF-8' |
|
319 |
+ }, |
|
320 |
+ body: JSON.stringify(hospitalMedicalRecord), |
|
321 |
+ }).then((response) => response.json()).then((data) => { |
|
322 |
+ console.log("병원 진료 기록 등록 결과(건수) : ", data); |
|
323 |
+ if (data > 0) { |
|
324 |
+ setHospitalMedicalRecordInit(); |
|
99 | 325 |
hospitalMedicalRecordSelectList(); |
326 |
+ //closeModal2(); |
|
327 |
+ alert("등록완료"); |
|
100 | 328 |
|
101 |
- setModalOpen2(true); |
|
102 |
- }; |
|
103 |
- const closeModal2 = () => { |
|
104 |
- setTargetSenior({'senior_id': null}); |
|
105 |
- setModalOpen2(false); |
|
106 |
- }; |
|
107 |
- //심전도 |
|
108 |
- const [modalOpen3, setModalOpen3] = React.useState(false); |
|
109 |
- const openModal3 = (senior) => { |
|
110 |
- targetSenior['senior_id'] = senior['senior_id']; |
|
111 |
- setTargetSenior(senior); |
|
329 |
+ } else { |
|
330 |
+ alert("등록에 실패하였습니다. 관리자에게 문의바랍니다."); |
|
331 |
+ } |
|
332 |
+ }).catch((error) => { |
|
333 |
+ console.log('hospitalMedicalRecordInsert() /hospital/hospitalMedicalRecordInsert.json error : ', error); |
|
334 |
+ }); |
|
335 |
+ } |
|
336 |
+ |
|
337 |
+ //병원 진료 기록 수정 |
|
338 |
+ const hospitalMedicalRecordUpdate = () => { |
|
339 |
+ if (hospitalMedicalRecordValidation() == false) { |
|
340 |
+ return; |
|
341 |
+ } |
|
342 |
+ |
|
343 |
+ hospitalMedicalRecord['senior_id'] = targetSenior['senior_id']; |
|
344 |
+ hospitalMedicalRecord['agent_id'] = defaultUserId; |
|
345 |
+ setHospitalMedicalRecord({ ...hospitalMedicalRecord }); |
|
346 |
+ |
|
347 |
+ fetch("/hospital/hospitalMedicalRecordUpdate.json", { |
|
348 |
+ method: "POST", |
|
349 |
+ headers: { |
|
350 |
+ 'Content-Type': 'application/json; charset=UTF-8' |
|
351 |
+ }, |
|
352 |
+ body: JSON.stringify(hospitalMedicalRecord), |
|
353 |
+ }).then((response) => response.json()).then((data) => { |
|
354 |
+ console.log("병원 진료 기록 수정 결과(건수) : ", data); |
|
355 |
+ if (data > 0) { |
|
356 |
+ setHospitalMedicalRecordInit(); |
|
357 |
+ hospitalMedicalRecordSelectList(); |
|
358 |
+ //closeModal2(); |
|
359 |
+ alert("수정완료"); |
|
360 |
+ } else { |
|
361 |
+ alert("수정에 실패하였습니다. 관리자에게 문의바랍니다."); |
|
362 |
+ } |
|
363 |
+ }).catch((error) => { |
|
364 |
+ console.log('hospitalMedicalRecordUpdate() /hospital/hospitalMedicalRecordUpdate.json error : ', error); |
|
365 |
+ }); |
|
366 |
+ } |
|
367 |
+ |
|
368 |
+ //병원 진료 기록 삭제 |
|
369 |
+ const hospitalMedicalRecordDelete = () => { |
|
370 |
+ if (confirm('진료 기록을 삭제하시겠습니까?') == false) { |
|
371 |
+ return; |
|
372 |
+ } |
|
373 |
+ |
|
374 |
+ fetch("/hospital/hospitalMedicalRecordDelete.json", { |
|
375 |
+ method: "POST", |
|
376 |
+ headers: { |
|
377 |
+ 'Content-Type': 'application/json; charset=UTF-8' |
|
378 |
+ }, |
|
379 |
+ body: JSON.stringify(hospitalMedicalRecord), |
|
380 |
+ }).then((response) => response.json()).then((data) => { |
|
381 |
+ console.log("병원 진료 기록 삭제 결과(건수) : ", data); |
|
382 |
+ if (data > 0) { |
|
383 |
+ setHospitalMedicalRecordInit(); |
|
384 |
+ hospitalMedicalRecordSelectList(); |
|
385 |
+ //closeModal2(); |
|
386 |
+ alert("삭제완료"); |
|
387 |
+ } else { |
|
388 |
+ alert("삭제에 실패하였습니다. 관리자에게 문의바랍니다."); |
|
389 |
+ } |
|
390 |
+ }).catch((error) => { |
|
391 |
+ console.log('hospitalMedicalRecordDelete() /hospital/hospitalMedicalRecordDelete.json error : ', error); |
|
392 |
+ }); |
|
393 |
+ } |
|
394 |
+ |
|
395 |
+ //초기화 취소 |
|
396 |
+ const setHospitalMedicalRecordInit = () => { |
|
397 |
+ setHospitalMedicalRecord({ ...hospitalMedicalRecordInit }); |
|
398 |
+ } |
|
399 |
+ |
|
400 |
+ //병원 진료 기록 정보 |
|
401 |
+ const [hospitalMedicalRecordList, setHospitalMedicalRecordList] = React.useState({ hospitalMedicalRecordList: [], hospitalMedicalRecordListCount: 0, search: { currentPage: 1, perPage: 5 } }); |
|
402 |
+ //병원 진료 기록 목록 조회 |
|
403 |
+ const hospitalMedicalRecordSelectList = (currentPage) => { |
|
404 |
+ hospitalMedicalRecordList.search.currentPage = CommonUtil.isEmpty(currentPage) ? 1 : currentPage; |
|
405 |
+ hospitalMedicalRecordList.search['senior_id'] = targetSenior['senior_id']; |
|
406 |
+ setHospitalMedicalRecordList({ ...hospitalMedicalRecordList }); |
|
407 |
+ |
|
408 |
+ fetch("/hospital/hospitalMedicalRecordSelectList.json", { |
|
409 |
+ method: "POST", |
|
410 |
+ headers: { |
|
411 |
+ 'Content-Type': 'application/json; charset=UTF-8' |
|
412 |
+ }, |
|
413 |
+ body: JSON.stringify(hospitalMedicalRecordList.search), |
|
414 |
+ }).then((response) => response.json()).then((data) => { |
|
415 |
+ console.log("병원 진료 기록 목록 조회 결과(건수) : ", data); |
|
416 |
+ data.search = hospitalMedicalRecordList.search; |
|
417 |
+ setHospitalMedicalRecordList(data); |
|
418 |
+ }).catch((error) => { |
|
419 |
+ console.log('hospitalMedicalRecordSelectList() /hospital/hospitalMedicalRecordSelectList.json error : ', error); |
|
420 |
+ }); |
|
421 |
+ } |
|
422 |
+ /****************** 병원 진료 기록 (종료) ******************/ |
|
423 |
+ |
|
424 |
+ |
|
425 |
+ |
|
426 |
+ /****************** 심전도 (시작) ******************/ |
|
427 |
+ const ecgInit = { |
|
428 |
+ 'senior_id': null, |
|
429 |
+ 'ecg_record_idx': null, |
|
430 |
+ 'bradycardia_count': 0, |
|
431 |
+ 'tachycardia_count': 0, |
|
432 |
+ 'max_heart_rate': 0.0, |
|
433 |
+ 'min_heart_rate': 0.0, |
|
434 |
+ 'abnormal_heart_rate': 0.0, |
|
435 |
+ 'average_heart_rate': 0.0, |
|
436 |
+ 'max_rr': 0.0, |
|
437 |
+ 'min_rr': 0.0, |
|
438 |
+ 'average_rr': 0.0, |
|
439 |
+ 'ecg_reading_date': CommonUtil.getDate(), |
|
440 |
+ 'ecg_finding_type': '', |
|
441 |
+ 'ecg_finding_content': '', |
|
442 |
+ 'agent_id': defaultUserId, |
|
443 |
+ 'medical_record_idx': null, |
|
444 |
+ 'common_group_file_idx': null, |
|
445 |
+ commonFileList: [],//심전도 업로드 파일 목록 |
|
446 |
+ |
|
447 |
+ isEdit: false,//직접 수정일 때, true (수정 or 등록 상관없음); |
|
448 |
+ }; |
|
449 |
+ //심전도 정보 |
|
450 |
+ const [ecg, setEcg] = React.useState({ ...ecgInit }); |
|
451 |
+ const ecgRef = React.useRef({ ...ecgInit }); |
|
452 |
+ |
|
453 |
+ //심전도 유효성 검사 |
|
454 |
+ const ecgValidation = () => { |
|
455 |
+ const target = ecg; |
|
456 |
+ const targetRef = ecgRef; |
|
457 |
+ |
|
458 |
+ if (CommonUtil.isEmpty(target['ecg_reading_date']) == true) { |
|
459 |
+ targetRef.current['ecg_reading_date'].focus(); |
|
460 |
+ alert("판독 소견 측정 일자를 선택해 주세요."); |
|
461 |
+ return false; |
|
462 |
+ } |
|
463 |
+ if (CommonUtil.isEmpty(target['ecg_finding_type']) == true) { |
|
464 |
+ targetRef.current['ecg_finding_type'].focus(); |
|
465 |
+ alert("판독 소견 측정 종류를 입력해 주세요."); |
|
466 |
+ return false; |
|
467 |
+ } |
|
468 |
+ if (CommonUtil.isEmpty(target['ecg_finding_content']) == true) { |
|
469 |
+ targetRef.current['ecg_finding_content'].focus(); |
|
470 |
+ alert("판독 소견 측정 내용을 입력해 주세요."); |
|
471 |
+ return false; |
|
472 |
+ } |
|
473 |
+ //파일 입력 |
|
474 |
+ if (target.isEdit == false) { |
|
475 |
+ if (CommonUtil.isEmpty(target['commonFileList']) == true) { |
|
476 |
+ //targetRef.current['commonFileList'].focus(); |
|
477 |
+ alert("심전도 측정 파일을 올려주세요."); |
|
478 |
+ return false; |
|
479 |
+ } |
|
480 |
+ } else {//직접 입력 |
|
481 |
+ if (CommonUtil.isEmpty(target['bradycardia_count']) == true) { |
|
482 |
+ targetRef.current['bradycardia_count'].focus(); |
|
483 |
+ alert("서맥 횟수를 입력해 주세요."); |
|
484 |
+ return false; |
|
485 |
+ } |
|
486 |
+ if (CommonUtil.isEmpty(target['tachycardia_count']) == true) { |
|
487 |
+ targetRef.current['tachycardia_count'].focus(); |
|
488 |
+ alert("빈맥 횟수 입력해 주세요."); |
|
489 |
+ return false; |
|
490 |
+ } |
|
491 |
+ if (CommonUtil.isEmpty(target['max_heart_rate']) == true) { |
|
492 |
+ targetRef.current['average_heart_rate'].focus(); |
|
493 |
+ alert("최대 심박수를 입력해 주세요."); |
|
494 |
+ return false; |
|
495 |
+ } |
|
496 |
+ if (CommonUtil.isEmpty(target['min_heart_rate']) == true) { |
|
497 |
+ targetRef.current['average_heart_rate'].focus(); |
|
498 |
+ alert("최소 심박수를 입력해 주세요."); |
|
499 |
+ return false; |
|
500 |
+ } |
|
501 |
+ if (CommonUtil.isEmpty(target['average_heart_rate']) == true) { |
|
502 |
+ targetRef.current['average_heart_rate'].focus(); |
|
503 |
+ alert("평균 심박수를 입력해 주세요."); |
|
504 |
+ return false; |
|
505 |
+ } |
|
506 |
+ if (CommonUtil.isEmpty(target['abnormal_heart_rate']) == true) { |
|
507 |
+ targetRef.current['abnormal_heart_rate'].focus(); |
|
508 |
+ alert("이상 심박수를 입력해 주세요."); |
|
509 |
+ return false; |
|
510 |
+ } |
|
511 |
+ if (CommonUtil.isEmpty(target['max_rr']) == true) { |
|
512 |
+ targetRef.current['max_rr'].focus(); |
|
513 |
+ alert("최대 R-R를 입력해 주세요."); |
|
514 |
+ return false; |
|
515 |
+ } |
|
516 |
+ if (CommonUtil.isEmpty(target['min_rr']) == true) { |
|
517 |
+ targetRef.current['min_rr'].focus(); |
|
518 |
+ alert("최소 R-R를 입력해 주세요."); |
|
519 |
+ return false; |
|
520 |
+ } |
|
521 |
+ if (CommonUtil.isEmpty(target['average_rr']) == true) { |
|
522 |
+ targetRef.current['average_rr'].focus(); |
|
523 |
+ alert("평균 R-R를 입력해 주세요."); |
|
524 |
+ return false; |
|
525 |
+ } |
|
526 |
+ } |
|
527 |
+ |
|
528 |
+ return true; |
|
529 |
+ } |
|
530 |
+ |
|
531 |
+ |
|
532 |
+ //심전도 등록 |
|
533 |
+ const ecgInsert = () => { |
|
534 |
+ if (ecgValidation() == false) { |
|
535 |
+ return; |
|
536 |
+ } |
|
537 |
+ |
|
538 |
+ ecg['senior_id'] = targetSenior['senior_id']; |
|
539 |
+ ecg['agent_id'] = defaultUserId; |
|
540 |
+ setEcg({ ...ecg }); |
|
541 |
+ |
|
542 |
+ fetch("/hospital/ecgInsert.json", { |
|
543 |
+ method: "POST", |
|
544 |
+ headers: { |
|
545 |
+ 'Content-Type': 'application/json; charset=UTF-8' |
|
546 |
+ }, |
|
547 |
+ body: JSON.stringify(ecg), |
|
548 |
+ }).then((response) => response.json()).then((data) => { |
|
549 |
+ console.log("심전도 등록 결과(건수) : ", data); |
|
550 |
+ if (data > 0) { |
|
551 |
+ setEcgInit(); |
|
552 |
+ ecg.commonFileList = []; |
|
112 | 553 |
ecgSelectList(); |
554 |
+ //closeModal3(); |
|
555 |
+ alert("등록완료"); |
|
113 | 556 |
|
114 |
- setModalOpen3(true); |
|
115 |
- }; |
|
116 |
- const closeModal3 = () => { |
|
117 |
- setTargetSenior({'senior_id': null}); |
|
118 |
- setModalOpen3(false); |
|
119 |
- }; |
|
120 |
- //혈압 |
|
121 |
- const [modalOpen4, setModalOpen4] = React.useState(false); |
|
122 |
- const openModal4 = (senior) => { |
|
123 |
- targetSenior['senior_id'] = senior['senior_id']; |
|
124 |
- setTargetSenior(senior); |
|
557 |
+ } else { |
|
558 |
+ alert("등록에 실패하였습니다. 관리자에게 문의바랍니다."); |
|
559 |
+ } |
|
560 |
+ }).catch((error) => { |
|
561 |
+ console.log('ecgInsert() /hospital/ecgInsert.json error : ', error); |
|
562 |
+ }); |
|
563 |
+ } |
|
564 |
+ |
|
565 |
+ //심전도 수정 |
|
566 |
+ const ecgUpdate = () => { |
|
567 |
+ if (ecgValidation() == false) { |
|
568 |
+ return; |
|
569 |
+ } |
|
570 |
+ |
|
571 |
+ ecg['senior_id'] = targetSenior['senior_id']; |
|
572 |
+ ecg['agent_id'] = defaultUserId; |
|
573 |
+ setEcg({ ...ecg }); |
|
574 |
+ |
|
575 |
+ fetch("/hospital/ecgUpdate.json", { |
|
576 |
+ method: "POST", |
|
577 |
+ headers: { |
|
578 |
+ 'Content-Type': 'application/json; charset=UTF-8' |
|
579 |
+ }, |
|
580 |
+ body: JSON.stringify(ecg), |
|
581 |
+ }).then((response) => response.json()).then((data) => { |
|
582 |
+ console.log("심전도 수정 결과(건수) : ", data); |
|
583 |
+ if (data > 0) { |
|
584 |
+ setEcgInit(); |
|
585 |
+ ecg.commonFileList = []; |
|
586 |
+ ecgSelectList(); |
|
587 |
+ //closeModal3(); |
|
588 |
+ alert("수정완료"); |
|
589 |
+ } else { |
|
590 |
+ alert("수정에 실패하였습니다. 관리자에게 문의바랍니다."); |
|
591 |
+ } |
|
592 |
+ }).catch((error) => { |
|
593 |
+ console.log('ecgUpdate() /hospital/ecgUpdate.json error : ', error); |
|
594 |
+ }); |
|
595 |
+ } |
|
596 |
+ |
|
597 |
+ //심전도 삭제 |
|
598 |
+ const ecgDelete = () => { |
|
599 |
+ if (confirm('심전도 판독 소견을 삭제하시겠습니까?') == false) { |
|
600 |
+ return; |
|
601 |
+ } |
|
602 |
+ |
|
603 |
+ fetch("/hospital/ecgDelete.json", { |
|
604 |
+ method: "POST", |
|
605 |
+ headers: { |
|
606 |
+ 'Content-Type': 'application/json; charset=UTF-8' |
|
607 |
+ }, |
|
608 |
+ body: JSON.stringify(ecg), |
|
609 |
+ }).then((response) => response.json()).then((data) => { |
|
610 |
+ console.log("심전도 삭제 결과(건수) : ", data); |
|
611 |
+ if (data > 0) { |
|
612 |
+ setEcgInit(); |
|
613 |
+ ecg.commonFileList = []; |
|
614 |
+ ecgSelectList(); |
|
615 |
+ //closeModal3(); |
|
616 |
+ alert("삭제완료"); |
|
617 |
+ } else { |
|
618 |
+ alert("삭제에 실패하였습니다. 관리자에게 문의바랍니다."); |
|
619 |
+ } |
|
620 |
+ }).catch((error) => { |
|
621 |
+ console.log('ecgDelete() /hospital/ecgDelete.json error : ', error); |
|
622 |
+ }); |
|
623 |
+ } |
|
624 |
+ |
|
625 |
+ //초기화 취소 |
|
626 |
+ const setEcgInit = () => { |
|
627 |
+ setEcg({ ...ecgInit }); |
|
628 |
+ } |
|
629 |
+ |
|
630 |
+ //심전도 정보 |
|
631 |
+ const [ecgList, setEcgList] = React.useState({ ecgList: [], ecgListCount: 0, search: { currentPage: 1, perPage: 5 } }); |
|
632 |
+ //심전도 목록 조회 |
|
633 |
+ const ecgSelectList = (currentPage) => { |
|
634 |
+ ecgList.search.currentPage = CommonUtil.isEmpty(currentPage) ? 1 : currentPage; |
|
635 |
+ ecgList.search['senior_id'] = targetSenior['senior_id']; |
|
636 |
+ setEcgList({ ...ecgList }); |
|
637 |
+ |
|
638 |
+ fetch("/hospital/ecgSelectList.json", { |
|
639 |
+ method: "POST", |
|
640 |
+ headers: { |
|
641 |
+ 'Content-Type': 'application/json; charset=UTF-8' |
|
642 |
+ }, |
|
643 |
+ body: JSON.stringify(ecgList.search), |
|
644 |
+ }).then((response) => response.json()).then((data) => { |
|
645 |
+ console.log("심전도 목록 조회 결과(건수) : ", data); |
|
646 |
+ data.search = ecgList.search; |
|
647 |
+ setEcgList(data); |
|
648 |
+ }).catch((error) => { |
|
649 |
+ console.log('ecgSelectList() /hospital/ecgSelectList.json error : ', error); |
|
650 |
+ }); |
|
651 |
+ } |
|
652 |
+ /****************** 심전도 기록 (종료) ******************/ |
|
653 |
+ |
|
654 |
+ |
|
655 |
+ |
|
656 |
+ /****************** 혈압 (시작) ******************/ |
|
657 |
+ const bloodPressureInit = { |
|
658 |
+ 'senior_id': null, |
|
659 |
+ 'blood_pressure_record_idx': null, |
|
660 |
+ 'max_blood_pressure': null, |
|
661 |
+ 'min_blood_pressure': null, |
|
662 |
+ 'pulse_rate': null, |
|
663 |
+ 'medical_record_idx': null, |
|
664 |
+ 'blood_pressure_record_date': CommonUtil.getDate(), |
|
665 |
+ 'agent_id': defaultUserId |
|
666 |
+ }; |
|
667 |
+ //혈압 정보 |
|
668 |
+ const [bloodPressure, setBloodPressure] = React.useState({ ...bloodPressureInit }); |
|
669 |
+ const bloodPressureRef = React.useRef({ ...bloodPressureInit }); |
|
670 |
+ |
|
671 |
+ //혈압 유효성 검사 |
|
672 |
+ const bloodPressureValidation = () => { |
|
673 |
+ const target = bloodPressure; |
|
674 |
+ const targetRef = bloodPressureRef; |
|
675 |
+ |
|
676 |
+ if (CommonUtil.isEmpty(target['blood_pressure_record_date']) == true) { |
|
677 |
+ targetRef.current['blood_pressure_record_date'].focus(); |
|
678 |
+ alert("진료 일자를 선택해 주세요."); |
|
679 |
+ return false; |
|
680 |
+ } |
|
681 |
+ if (CommonUtil.isEmpty(target['max_blood_pressure']) == true) { |
|
682 |
+ targetRef.current['max_blood_pressure'].focus(); |
|
683 |
+ alert("최고 혈압을 입력해 주세요."); |
|
684 |
+ return false; |
|
685 |
+ } |
|
686 |
+ if (CommonUtil.isEmpty(target['min_blood_pressure']) == true) { |
|
687 |
+ targetRef.current['min_blood_pressure'].focus(); |
|
688 |
+ alert("최저 혈압을 입력해 주세요."); |
|
689 |
+ return false; |
|
690 |
+ } |
|
691 |
+ if (CommonUtil.isEmpty(target['pulse_rate']) == true) { |
|
692 |
+ targetRef.current['pulse_rate'].focus(); |
|
693 |
+ alert("맥박수를 입력해 주세요."); |
|
694 |
+ return false; |
|
695 |
+ } |
|
696 |
+ |
|
697 |
+ return true; |
|
698 |
+ } |
|
699 |
+ |
|
700 |
+ |
|
701 |
+ //혈압 등록 |
|
702 |
+ const bloodPressureInsert = () => { |
|
703 |
+ if (bloodPressureValidation() == false) { |
|
704 |
+ return; |
|
705 |
+ } |
|
706 |
+ |
|
707 |
+ bloodPressure['senior_id'] = targetSenior['senior_id']; |
|
708 |
+ bloodPressure['agent_id'] = defaultUserId; |
|
709 |
+ setBloodPressure({ ...bloodPressure }); |
|
710 |
+ |
|
711 |
+ fetch("/hospital/bloodPressureInsert.json", { |
|
712 |
+ method: "POST", |
|
713 |
+ headers: { |
|
714 |
+ 'Content-Type': 'application/json; charset=UTF-8' |
|
715 |
+ }, |
|
716 |
+ body: JSON.stringify(bloodPressure), |
|
717 |
+ }).then((response) => response.json()).then((data) => { |
|
718 |
+ console.log("혈압 등록 결과(건수) : ", data); |
|
719 |
+ if (data > 0) { |
|
720 |
+ setBloodPressureInit(); |
|
125 | 721 |
bloodPressureSelectList(); |
722 |
+ //closeModal2(); |
|
723 |
+ alert("등록완료"); |
|
126 | 724 |
|
127 |
- setModalOpen4(true); |
|
128 |
- }; |
|
129 |
- const closeModal4 = () => { |
|
130 |
- setTargetSenior({'senior_id': null}); |
|
131 |
- setModalOpen4(false); |
|
132 |
- }; |
|
725 |
+ } else { |
|
726 |
+ alert("등록에 실패하였습니다. 관리자에게 문의바랍니다."); |
|
727 |
+ } |
|
728 |
+ }).catch((error) => { |
|
729 |
+ console.log('bloodPressureInsert() /hospital/bloodPressureInsert.json error : ', error); |
|
730 |
+ }); |
|
731 |
+ } |
|
133 | 732 |
|
134 |
- /****************** 문진표 (시작) ******************/ |
|
135 |
- const questionnaireInit = { |
|
136 |
- 'senior_id': null, |
|
137 |
- 'questionnaire_record_idx': null, |
|
138 |
- 'weight_change_amount': 0, |
|
139 |
- 'past_history': null, |
|
140 |
- 'agent_id': defaultUserId, |
|
141 |
- 'medical_record_idx': null, |
|
142 |
- |
|
143 |
- 'smoke_type': false, |
|
144 |
- 'no_smoke_period': null, |
|
145 |
- 'smoke_period': null, |
|
146 |
- 'daily_smoke_amount': null, |
|
147 |
- |
|
148 |
- 'drink_type': false, |
|
149 |
- 'weekly_drink_amount': null, |
|
150 |
- 'onetime_alcoholic_kind': null, |
|
151 |
- 'onetime_bottle_amount': null, |
|
152 |
- 'onetime_cup_amount': null, |
|
153 |
- |
|
154 |
- 'exercise_type': false, |
|
155 |
- 'weekly_exercise_amount': null, |
|
156 |
- 'onetime_exercise_hour': null, |
|
157 |
- 'onetime_exercise_minute': null, |
|
158 |
- 'onetime_exercise_kind': null, |
|
159 |
- |
|
160 |
- 'medication_pill': '', |
|
161 |
- 'medication_pill_etc': '', |
|
162 |
- }; |
|
163 |
- //문진표 정보 |
|
164 |
- const [questionnaire, setQuestionnaire] = React.useState({...questionnaireInit}); |
|
165 |
- const questionnaireRef = React.useRef({...questionnaireInit}); |
|
166 |
- |
|
167 |
- //문진표 등록 |
|
168 |
- const questionnaireInsert = () => { |
|
169 |
- questionnaire['senior_id'] = targetSenior['senior_id']; |
|
170 |
- questionnaire['agent_id'] = defaultUserId; |
|
171 |
- setQuestionnaire({...questionnaire}); |
|
172 |
- |
|
173 |
- fetch("/hospital/questionnaireInsert.json", { |
|
174 |
- method: "POST", |
|
175 |
- headers: { |
|
176 |
- 'Content-Type': 'application/json; charset=UTF-8' |
|
177 |
- }, |
|
178 |
- body: JSON.stringify(questionnaire), |
|
179 |
- }).then((response) => response.json()).then((data) => { |
|
180 |
- console.log("문진표 등록 결과(건수) : ", data); |
|
181 |
- if (data > 0) { |
|
182 |
- alert("저장완료"); |
|
183 |
- closeModal(); |
|
184 |
- } else { |
|
185 |
- alert("저장에 실패하였습니다. 관리자에게 문의바랍니다."); |
|
186 |
- } |
|
187 |
- }).catch((error) => { |
|
188 |
- console.log('questionnaireInsert() /hospital/questionnaireInsert.json error : ', error); |
|
189 |
- }); |
|
733 |
+ //혈압 수정 |
|
734 |
+ const bloodPressureUpdate = () => { |
|
735 |
+ if (bloodPressureValidation() == false) { |
|
736 |
+ return; |
|
190 | 737 |
} |
191 | 738 |
|
192 |
- //문진표 수정 |
|
193 |
- const questionnaireUpdate = () => { |
|
194 |
- questionnaire['senior_id'] = targetSenior['senior_id']; |
|
195 |
- questionnaire['agent_id'] = defaultUserId; |
|
196 |
- setQuestionnaire({...questionnaire}); |
|
739 |
+ bloodPressure['senior_id'] = targetSenior['senior_id']; |
|
740 |
+ bloodPressure['agent_id'] = defaultUserId; |
|
741 |
+ setBloodPressure({ ...bloodPressure }); |
|
197 | 742 |
|
198 |
- fetch("/hospital/questionnaireUpdate.json", { |
|
199 |
- method: "POST", |
|
200 |
- headers: { |
|
201 |
- 'Content-Type': 'application/json; charset=UTF-8' |
|
202 |
- }, |
|
203 |
- body: JSON.stringify(questionnaire), |
|
204 |
- }).then((response) => response.json()).then((data) => { |
|
205 |
- console.log("문진표 수정 결과(건수) : ", data); |
|
206 |
- if (data > 0) { |
|
207 |
- alert("저장완료"); |
|
208 |
- closeModal(); |
|
209 |
- } else { |
|
210 |
- alert("저장에 실패하였습니다. 관리자에게 문의바랍니다."); |
|
211 |
- } |
|
212 |
- }).catch((error) => { |
|
213 |
- console.log('questionnaireUpdate() /hospital/questionnaireUpdate.json error : ', error); |
|
214 |
- }); |
|
743 |
+ fetch("/hospital/bloodPressureUpdate.json", { |
|
744 |
+ method: "POST", |
|
745 |
+ headers: { |
|
746 |
+ 'Content-Type': 'application/json; charset=UTF-8' |
|
747 |
+ }, |
|
748 |
+ body: JSON.stringify(bloodPressure), |
|
749 |
+ }).then((response) => response.json()).then((data) => { |
|
750 |
+ console.log("혈압 수정 결과(건수) : ", data); |
|
751 |
+ if (data > 0) { |
|
752 |
+ setBloodPressureInit(); |
|
753 |
+ bloodPressureSelectList(); |
|
754 |
+ //closeModal2(); |
|
755 |
+ alert("수정완료"); |
|
756 |
+ } else { |
|
757 |
+ alert("수정에 실패하였습니다. 관리자에게 문의바랍니다."); |
|
758 |
+ } |
|
759 |
+ }).catch((error) => { |
|
760 |
+ console.log('bloodPressureUpdate() /hospital/bloodPressureUpdate.json error : ', error); |
|
761 |
+ }); |
|
762 |
+ } |
|
763 |
+ |
|
764 |
+ //혈압 삭제 |
|
765 |
+ const bloodPressureDelete = () => { |
|
766 |
+ if (confirm('혈압 측정 정보를 삭제하시겠습니까?') == false) { |
|
767 |
+ return; |
|
215 | 768 |
} |
216 | 769 |
|
217 |
- //문진표 목록 조회 |
|
218 |
- const questionnaireSelectList = () => { |
|
219 |
- fetch("/hospital/questionnaireSelectList.json", { |
|
220 |
- method: "POST", |
|
221 |
- headers: { |
|
222 |
- 'Content-Type': 'application/json; charset=UTF-8' |
|
223 |
- }, |
|
224 |
- body: JSON.stringify(targetSenior), |
|
225 |
- }).then((response) => response.json()).then((data) => { |
|
226 |
- console.log("문진표 목록 조회 결과(건수) : ", data); |
|
227 |
- if (CommonUtil.isEmpty(data.questionnaireList) == false) { |
|
228 |
- let item = data.questionnaireList[0];//최신순으로 가지고오기 때문에, 0 인텍스가 젤 최신 |
|
229 |
- if (CommonUtil.isEmpty(item['medication_pill'])) { |
|
230 |
- item['medication_pill'] = ''; |
|
231 |
- } else { |
|
232 |
- const startCheckWord = '기타「'; |
|
233 |
- const endCheckWord = '」'; |
|
234 |
- if (item['medication_pill'].indexOf(startCheckWord) > -1) { |
|
235 |
- let startIndex = item['medication_pill'].indexOf(startCheckWord); |
|
236 |
- let lastIndex = item['medication_pill'].lastIndexOf(endCheckWord); |
|
237 |
- console.log("000000 item['medication_pill_etc'] : ", item['medication_pill_etc'], "item['medication_pill'] : ", item['medication_pill']); |
|
238 |
- item['medication_pill_etc'] = item['medication_pill'].substring(startIndex + startCheckWord.length, lastIndex); |
|
239 |
- let medicationPillFront = item['medication_pill'].substring(0, startIndex + startCheckWord.length); |
|
240 |
- let medicationPillBack = item['medication_pill'].substring(lastIndex); |
|
241 |
- item['medication_pill'] = medicationPillFront + medicationPillBack; |
|
242 |
- console.log("333333 item['medication_pill_etc'] : ", item['medication_pill_etc'], "item['medication_pill'] : ", item['medication_pill']); |
|
243 |
- } else { |
|
244 |
- item['medication_pill_etc'] = ''; |
|
245 |
- } |
|
246 |
- } |
|
247 |
- |
|
248 |
- setQuestionnaire(item); |
|
249 |
- } |
|
250 |
- }).catch((error) => { |
|
251 |
- console.log('questionnaireSelectList() /hospital/questionnaireSelectList.json error : ', error); |
|
252 |
- }); |
|
253 |
- } |
|
254 |
- /****************** 문진표 (종료) ******************/ |
|
770 |
+ fetch("/hospital/bloodPressureDelete.json", { |
|
771 |
+ method: "POST", |
|
772 |
+ headers: { |
|
773 |
+ 'Content-Type': 'application/json; charset=UTF-8' |
|
774 |
+ }, |
|
775 |
+ body: JSON.stringify(bloodPressure), |
|
776 |
+ }).then((response) => response.json()).then((data) => { |
|
777 |
+ console.log("혈압 삭제 결과(건수) : ", data); |
|
778 |
+ if (data > 0) { |
|
779 |
+ setBloodPressureInit(); |
|
780 |
+ bloodPressureSelectList(); |
|
781 |
+ //closeModal2(); |
|
782 |
+ alert("삭제완료"); |
|
783 |
+ } else { |
|
784 |
+ alert("삭제에 실패하였습니다. 관리자에게 문의바랍니다."); |
|
785 |
+ } |
|
786 |
+ }).catch((error) => { |
|
787 |
+ console.log('bloodPressureDelete() /hospital/bloodPressureDelete.json error : ', error); |
|
788 |
+ }); |
|
789 |
+ } |
|
790 |
+ |
|
791 |
+ //초기화 취소 |
|
792 |
+ const setBloodPressureInit = () => { |
|
793 |
+ setBloodPressure({ ...bloodPressureInit }); |
|
794 |
+ } |
|
795 |
+ |
|
796 |
+ //혈압 정보 |
|
797 |
+ const [bloodPressureList, setBloodPressureList] = React.useState({ bloodPressureList: [], bloodPressureListCount: 0, search: { currentPage: 1, perPage: 5 } }); |
|
798 |
+ //혈압 목록 조회 |
|
799 |
+ const bloodPressureSelectList = (currentPage) => { |
|
800 |
+ bloodPressureList.search.currentPage = CommonUtil.isEmpty(currentPage) ? 1 : currentPage; |
|
801 |
+ bloodPressureList.search['senior_id'] = targetSenior['senior_id']; |
|
802 |
+ setBloodPressureList({ ...bloodPressureList }); |
|
803 |
+ |
|
804 |
+ fetch("/hospital/bloodPressureSelectList.json", { |
|
805 |
+ method: "POST", |
|
806 |
+ headers: { |
|
807 |
+ 'Content-Type': 'application/json; charset=UTF-8' |
|
808 |
+ }, |
|
809 |
+ body: JSON.stringify(bloodPressureList.search), |
|
810 |
+ }).then((response) => response.json()).then((data) => { |
|
811 |
+ console.log("혈압 목록 조회 결과(건수) : ", data); |
|
812 |
+ data.search = bloodPressureList.search; |
|
813 |
+ setBloodPressureList(data); |
|
814 |
+ }).catch((error) => { |
|
815 |
+ console.log('bloodPressureSelectList() /hospital/bloodPressureSelectList.json error : ', error); |
|
816 |
+ }); |
|
817 |
+ } |
|
818 |
+ /****************** 혈압 (종료) ******************/ |
|
819 |
+ |
|
820 |
+ React.useEffect(() => { |
|
821 |
+ searching(); |
|
822 |
+ }, []); |
|
255 | 823 |
|
256 | 824 |
|
825 |
+ //현재 탭 Index |
|
826 |
+ const [tabIndex, setTabIndex] = React.useState(0); |
|
827 |
+ //탭 초기화 |
|
828 |
+ const tab = [{ |
|
829 |
+ title: `문진표관리`, |
|
830 |
+ content: ( |
|
831 |
+ <div> |
|
832 |
+ <div className="flex equip-tab"> |
|
833 |
+ <SubTitle explanation={"돌봄 대상자의 병원 내원 기록 및 문진표를 관리할 수 있습니다."} /> |
|
834 |
+ </div> |
|
835 |
+ <table className={"protector-user"}> |
|
836 |
+ <thead> |
|
837 |
+ <tr> |
|
838 |
+ <th>No</th> |
|
839 |
+ <th>소속기관명</th> |
|
840 |
+ <th>이름</th> |
|
841 |
+ <th>생년월일</th> |
|
842 |
+ <th>성별</th> |
|
843 |
+ <th>연락처</th> |
|
844 |
+ <th>문진표관리</th> |
|
845 |
+ <th>내원기록관리</th> |
|
846 |
+ </tr> |
|
847 |
+ </thead> |
|
848 |
+ <tbody> |
|
849 |
+ {senior.seniorList.map((item, idx) => { |
|
850 |
+ return ( |
|
851 |
+ <tr key={idx}> |
|
852 |
+ <td data-label="No">{senior.seniorListCount - idx - (senior.search.currentPage - 1) * senior.search.perPage}</td> |
|
853 |
+ <td data-label="소속기관명">{item['agency_name']}</td> |
|
854 |
+ <td data-label="이름">{item['user_name']}</td> |
|
855 |
+ <td data-label="생년월일">{item['user_birth']}</td> |
|
856 |
+ <td data-label="성별">{item['user_gender']}</td> |
|
857 |
+ <td data-label="연락처">{item['user_phonenumber']}</td> |
|
858 |
+ <td data-label="문진표관리"> |
|
859 |
+ <button className="btn-small gray-btn" onClick={() => openModal(item)}>작성하기</button> |
|
860 |
+ </td> |
|
861 |
+ <td data-label="내원기록관리"> |
|
862 |
+ <button className="btn-small gray-btn" onClick={() => openModal2(item)}>작성하기</button> |
|
863 |
+ </td> |
|
864 |
+ </tr> |
|
865 |
+ ) |
|
866 |
+ })} |
|
867 |
+ {CommonUtil.isEmpty(senior.seniorList) ? |
|
868 |
+ <tr> |
|
869 |
+ <td colSpan={8}>조회된 데이터가 없습니다</td> |
|
870 |
+ </tr> |
|
871 |
+ : null} |
|
872 |
+ </tbody> |
|
873 |
+ </table> |
|
874 |
+ <Pagination |
|
875 |
+ currentPage={senior.search.currentPage} |
|
876 |
+ perPage={senior.search.perPage} |
|
877 |
+ totalCount={senior.seniorListCount} |
|
878 |
+ maxRange={5} |
|
879 |
+ click={seniorSelectList} |
|
880 |
+ /> |
|
881 |
+ </div> |
|
882 |
+ ) |
|
883 |
+ }, { |
|
884 |
+ title: `심전도관리`, |
|
885 |
+ content: ( |
|
886 |
+ <div> |
|
887 |
+ <div className="flex equip-tab"> |
|
888 |
+ <SubTitle explanation={"돌봄 대상자의 심전도 정보를 관리할 수 있습니다."} /> |
|
889 |
+ </div> |
|
890 |
+ <table className={"protector-user"}> |
|
891 |
+ <thead> |
|
892 |
+ <tr> |
|
893 |
+ <th>No</th> |
|
894 |
+ <th>소속기관명</th> |
|
895 |
+ <th>이름</th> |
|
896 |
+ <th>생년월일</th> |
|
897 |
+ <th>성별</th> |
|
898 |
+ <th>연락처</th> |
|
899 |
+ <th>심전도관리</th> |
|
900 |
+ </tr> |
|
901 |
+ </thead> |
|
902 |
+ <tbody> |
|
903 |
+ {senior.seniorList.map((item, idx) => { |
|
904 |
+ return ( |
|
905 |
+ <tr key={idx}> |
|
906 |
+ <td data-label="No">{senior.seniorListCount - idx - (senior.search.currentPage - 1) * senior.search.perPage}</td> |
|
907 |
+ <td data-label="소속기관명">{item['agency_name']}</td> |
|
908 |
+ <td data-label="이름">{item['user_name']}</td> |
|
909 |
+ <td data-label="생년월일">{item['user_birth']}</td> |
|
910 |
+ <td data-label="성별">{item['user_gender']}</td> |
|
911 |
+ <td data-label="연락처">{item['user_phonenumber']}</td> |
|
912 |
+ <td data-label="심전도관리"> |
|
913 |
+ <button className="btn-small gray-btn" onClick={() => openModal3(item)}>심전도관리</button> |
|
914 |
+ </td> |
|
915 |
+ </tr> |
|
916 |
+ ) |
|
917 |
+ })} |
|
918 |
+ {CommonUtil.isEmpty(senior.seniorList) ? |
|
919 |
+ <tr> |
|
920 |
+ <td colSpan={7}>조회된 데이터가 없습니다</td> |
|
921 |
+ </tr> |
|
922 |
+ : null} |
|
923 |
+ </tbody> |
|
924 |
+ </table> |
|
925 |
+ <Pagination |
|
926 |
+ currentPage={senior.search.currentPage} |
|
927 |
+ perPage={senior.search.perPage} |
|
928 |
+ totalCount={senior.seniorListCount} |
|
929 |
+ maxRange={5} |
|
930 |
+ click={seniorSelectList} |
|
931 |
+ /> |
|
932 |
+ </div> |
|
933 |
+ ) |
|
934 |
+ }, { |
|
935 |
+ title: `혈압관리`, |
|
936 |
+ content: ( |
|
937 |
+ <div> |
|
938 |
+ <div className="flex equip-tab"> |
|
939 |
+ <SubTitle explanation={"돌봄 대상자의 혈압 정보를 관리할 수 있습니다."} /> |
|
940 |
+ </div> |
|
941 |
+ <table className={"protector-user"}> |
|
942 |
+ <thead> |
|
943 |
+ <tr> |
|
944 |
+ <th>No</th> |
|
945 |
+ <th>소속기관명</th> |
|
946 |
+ <th>이름</th> |
|
947 |
+ <th>생년월일</th> |
|
948 |
+ <th>성별</th> |
|
949 |
+ <th>연락처</th> |
|
950 |
+ <th>혈압관리</th> |
|
951 |
+ </tr> |
|
952 |
+ </thead> |
|
953 |
+ <tbody> |
|
954 |
+ {senior.seniorList.map((item, idx) => { |
|
955 |
+ return ( |
|
956 |
+ <tr key={idx}> |
|
957 |
+ <td data-label="No">{senior.seniorListCount - idx - (senior.search.currentPage - 1) * senior.search.perPage}</td> |
|
958 |
+ <td data-label="소속기관명">{item['agency_name']}</td> |
|
959 |
+ <td data-label="이름">{item['user_name']}</td> |
|
960 |
+ <td data-label="생년월일">{item['user_birth']}</td> |
|
961 |
+ <td data-label="성별">{item['user_gender']}</td> |
|
962 |
+ <td data-label="연락처">{item['user_phonenumber']}</td> |
|
963 |
+ <td data-label="혈압관리"> |
|
964 |
+ <button className="btn-small gray-btn" onClick={() => openModal4(item)}>혈압관리</button> |
|
965 |
+ </td> |
|
966 |
+ </tr> |
|
967 |
+ ) |
|
968 |
+ })} |
|
969 |
+ {CommonUtil.isEmpty(senior.seniorList) ? |
|
970 |
+ <tr> |
|
971 |
+ <td colSpan={7}>조회된 데이터가 없습니다</td> |
|
972 |
+ </tr> |
|
973 |
+ : null} |
|
974 |
+ </tbody> |
|
975 |
+ </table> |
|
976 |
+ <Pagination |
|
977 |
+ currentPage={senior.search.currentPage} |
|
978 |
+ perPage={senior.search.perPage} |
|
979 |
+ totalCount={senior.seniorListCount} |
|
980 |
+ maxRange={5} |
|
981 |
+ click={seniorSelectList} |
|
982 |
+ /> |
|
983 |
+ </div> |
|
984 |
+ ) |
|
985 |
+ }]; |
|
257 | 986 |
|
258 |
- /****************** 병원 진료 기록 (시작) ******************/ |
|
259 |
- const hospitalMedicalRecordInit = { |
|
260 |
- 'senior_id': null, |
|
261 |
- 'medical_record_idx': null, |
|
262 |
- 'medical_date': CommonUtil.getDate(), |
|
263 |
- 'medical_reason': '', |
|
264 |
- 'medical_content': '', |
|
265 |
- 'agent_id': defaultUserId |
|
266 |
- }; |
|
267 |
- //병원 진료 기록 정보 |
|
268 |
- const [hospitalMedicalRecord, setHospitalMedicalRecord] = React.useState({...hospitalMedicalRecordInit}); |
|
269 |
- const hospitalMedicalRecordRef = React.useRef({...hospitalMedicalRecordInit}); |
|
987 |
+ return ( |
|
988 |
+ <main> |
|
270 | 989 |
|
271 |
- //병원 진료 기록 유효성 검사 |
|
272 |
- const hospitalMedicalRecordValidation = () => { |
|
273 |
- const target = hospitalMedicalRecord; |
|
274 |
- const targetRef = hospitalMedicalRecordRef; |
|
990 |
+ {/* <Modal_Questionnaire open={modalOpen} close={closeModal} /> */} |
|
991 |
+ {/* <Modal_MedicalHistory open={modalOpen2} close={closeModal2} /> */} |
|
992 |
+ {/* <Modal_ECG open={modalOpen3} close={closeModal3} /> */} |
|
993 |
+ {/* <Modal_Blood open={modalOpen4} close={closeModal4} /> */} |
|
275 | 994 |
|
276 |
- if (CommonUtil.isEmpty(target['medical_date']) == true) { |
|
277 |
- targetRef.current['medical_date'].focus(); |
|
278 |
- alert("진료 일자를 선택해 주세요."); |
|
279 |
- return false; |
|
280 |
- } |
|
281 |
- if (CommonUtil.isEmpty(target['medical_reason']) == true) { |
|
282 |
- targetRef.current['medical_reason'].focus(); |
|
283 |
- alert("진료 사유를 입력해 주세요."); |
|
284 |
- return false; |
|
285 |
- } |
|
286 |
- if (CommonUtil.isEmpty(target['medical_content']) == true) { |
|
287 |
- targetRef.current['medical_content'].focus(); |
|
288 |
- alert("진료 내용을 입력해 주세요."); |
|
289 |
- return false; |
|
290 |
- } |
|
995 |
+ <div className="search-management flex-start margin-bottom2"> |
|
996 |
+ <select style={{ maxWidth: '150px' }} |
|
997 |
+ onChange={(e) => { senior.search.searchType = e.target.value; setSenior({ ...senior }); }}> |
|
998 |
+ <option value="" selected={CommonUtil.isEmpty(senior.search.searchType)}>전체</option> |
|
999 |
+ <option value="user_name" selected={senior.search.searchType == 'user_name'}>이름</option> |
|
1000 |
+ <option value="user_id" selected={senior.search.searchType == 'user_id'}>아이디</option> |
|
1001 |
+ <option value="user_phonenumber" selected={senior.search.searchType == 'user_phonenumber'}>연락처</option> |
|
1002 |
+ </select> |
|
1003 |
+ <input type="text" className="senior-search" value={senior.search.searchText} |
|
1004 |
+ onChange={(e) => { senior.search.searchText = e.target.value; setSenior({ ...senior }); }} |
|
1005 |
+ onKeyUp={(e) => searchingEnter(e.key)} /> |
|
1006 |
+ <button className="btn-small gray-btn" onClick={searching}>검색</button> |
|
1007 |
+ </div> |
|
291 | 1008 |
|
292 |
- return true; |
|
293 |
- } |
|
1009 |
+ <div className="content-wrap"> |
|
1010 |
+ <DetailTitle contentTitle={"대상자의 문진표 / 심전도 / 혈압 관리를 할 수 있습니다."} /> |
|
294 | 1011 |
|
295 |
- |
|
296 |
- //병원 진료 기록 등록 |
|
297 |
- const hospitalMedicalRecordInsert = () => { |
|
298 |
- if (hospitalMedicalRecordValidation() == false) { |
|
299 |
- return; |
|
300 |
- } |
|
301 |
- |
|
302 |
- hospitalMedicalRecord['senior_id'] = targetSenior['senior_id']; |
|
303 |
- hospitalMedicalRecord['agent_id'] = defaultUserId; |
|
304 |
- setHospitalMedicalRecord({...hospitalMedicalRecord}); |
|
305 |
- |
|
306 |
- fetch("/hospital/hospitalMedicalRecordInsert.json", { |
|
307 |
- method: "POST", |
|
308 |
- headers: { |
|
309 |
- 'Content-Type': 'application/json; charset=UTF-8' |
|
310 |
- }, |
|
311 |
- body: JSON.stringify(hospitalMedicalRecord), |
|
312 |
- }).then((response) => response.json()).then((data) => { |
|
313 |
- console.log("병원 진료 기록 등록 결과(건수) : ", data); |
|
314 |
- if (data > 0) { |
|
315 |
- setHospitalMedicalRecordInit(); |
|
316 |
- hospitalMedicalRecordSelectList(); |
|
317 |
- //closeModal2(); |
|
318 |
- alert("등록완료"); |
|
319 |
- |
|
320 |
- } else { |
|
321 |
- alert("등록에 실패하였습니다. 관리자에게 문의바랍니다."); |
|
322 |
- } |
|
323 |
- }).catch((error) => { |
|
324 |
- console.log('hospitalMedicalRecordInsert() /hospital/hospitalMedicalRecordInsert.json error : ', error); |
|
325 |
- }); |
|
326 |
- } |
|
327 |
- |
|
328 |
- //병원 진료 기록 수정 |
|
329 |
- const hospitalMedicalRecordUpdate = () => { |
|
330 |
- if (hospitalMedicalRecordValidation() == false) { |
|
331 |
- return; |
|
332 |
- } |
|
333 |
- |
|
334 |
- hospitalMedicalRecord['senior_id'] = targetSenior['senior_id']; |
|
335 |
- hospitalMedicalRecord['agent_id'] = defaultUserId; |
|
336 |
- setHospitalMedicalRecord({...hospitalMedicalRecord}); |
|
337 |
- |
|
338 |
- fetch("/hospital/hospitalMedicalRecordUpdate.json", { |
|
339 |
- method: "POST", |
|
340 |
- headers: { |
|
341 |
- 'Content-Type': 'application/json; charset=UTF-8' |
|
342 |
- }, |
|
343 |
- body: JSON.stringify(hospitalMedicalRecord), |
|
344 |
- }).then((response) => response.json()).then((data) => { |
|
345 |
- console.log("병원 진료 기록 수정 결과(건수) : ", data); |
|
346 |
- if (data > 0) { |
|
347 |
- setHospitalMedicalRecordInit(); |
|
348 |
- hospitalMedicalRecordSelectList(); |
|
349 |
- //closeModal2(); |
|
350 |
- alert("수정완료"); |
|
351 |
- } else { |
|
352 |
- alert("수정에 실패하였습니다. 관리자에게 문의바랍니다."); |
|
353 |
- } |
|
354 |
- }).catch((error) => { |
|
355 |
- console.log('hospitalMedicalRecordUpdate() /hospital/hospitalMedicalRecordUpdate.json error : ', error); |
|
356 |
- }); |
|
357 |
- } |
|
358 |
- |
|
359 |
- //병원 진료 기록 삭제 |
|
360 |
- const hospitalMedicalRecordDelete = () => { |
|
361 |
- if (confirm('진료 기록을 삭제하시겠습니까?') == false) { |
|
362 |
- return; |
|
363 |
- } |
|
364 |
- |
|
365 |
- fetch("/hospital/hospitalMedicalRecordDelete.json", { |
|
366 |
- method: "POST", |
|
367 |
- headers: { |
|
368 |
- 'Content-Type': 'application/json; charset=UTF-8' |
|
369 |
- }, |
|
370 |
- body: JSON.stringify(hospitalMedicalRecord), |
|
371 |
- }).then((response) => response.json()).then((data) => { |
|
372 |
- console.log("병원 진료 기록 삭제 결과(건수) : ", data); |
|
373 |
- if (data > 0) { |
|
374 |
- setHospitalMedicalRecordInit(); |
|
375 |
- hospitalMedicalRecordSelectList(); |
|
376 |
- //closeModal2(); |
|
377 |
- alert("삭제완료"); |
|
378 |
- } else { |
|
379 |
- alert("삭제에 실패하였습니다. 관리자에게 문의바랍니다."); |
|
380 |
- } |
|
381 |
- }).catch((error) => { |
|
382 |
- console.log('hospitalMedicalRecordDelete() /hospital/hospitalMedicalRecordDelete.json error : ', error); |
|
383 |
- }); |
|
384 |
- } |
|
385 |
- |
|
386 |
- //초기화 취소 |
|
387 |
- const setHospitalMedicalRecordInit = () => { |
|
388 |
- setHospitalMedicalRecord({...hospitalMedicalRecordInit}); |
|
389 |
- } |
|
390 |
- |
|
391 |
- //병원 진료 기록 정보 |
|
392 |
- const [hospitalMedicalRecordList, setHospitalMedicalRecordList] = React.useState({hospitalMedicalRecordList: [], hospitalMedicalRecordListCount:0, search: {currentPage: 1, perPage: 5}}); |
|
393 |
- //병원 진료 기록 목록 조회 |
|
394 |
- const hospitalMedicalRecordSelectList = (currentPage) => { |
|
395 |
- hospitalMedicalRecordList.search.currentPage = CommonUtil.isEmpty(currentPage) ? 1 : currentPage; |
|
396 |
- hospitalMedicalRecordList.search['senior_id'] = targetSenior['senior_id']; |
|
397 |
- setHospitalMedicalRecordList({...hospitalMedicalRecordList}); |
|
398 |
- |
|
399 |
- fetch("/hospital/hospitalMedicalRecordSelectList.json", { |
|
400 |
- method: "POST", |
|
401 |
- headers: { |
|
402 |
- 'Content-Type': 'application/json; charset=UTF-8' |
|
403 |
- }, |
|
404 |
- body: JSON.stringify(hospitalMedicalRecordList.search), |
|
405 |
- }).then((response) => response.json()).then((data) => { |
|
406 |
- console.log("병원 진료 기록 목록 조회 결과(건수) : ", data); |
|
407 |
- data.search = hospitalMedicalRecordList.search; |
|
408 |
- setHospitalMedicalRecordList(data); |
|
409 |
- }).catch((error) => { |
|
410 |
- console.log('hospitalMedicalRecordSelectList() /hospital/hospitalMedicalRecordSelectList.json error : ', error); |
|
411 |
- }); |
|
412 |
- } |
|
413 |
- /****************** 병원 진료 기록 (종료) ******************/ |
|
414 |
- |
|
415 |
- |
|
416 |
- |
|
417 |
- /****************** 심전도 (시작) ******************/ |
|
418 |
- const ecgInit = { |
|
419 |
- 'senior_id': null, |
|
420 |
- 'ecg_record_idx': null, |
|
421 |
- 'bradycardia_count': 0, |
|
422 |
- 'tachycardia_count': 0, |
|
423 |
- 'max_heart_rate': 0.0, |
|
424 |
- 'min_heart_rate': 0.0, |
|
425 |
- 'abnormal_heart_rate': 0.0, |
|
426 |
- 'average_heart_rate': 0.0, |
|
427 |
- 'max_rr': 0.0, |
|
428 |
- 'min_rr': 0.0, |
|
429 |
- 'average_rr': 0.0, |
|
430 |
- 'ecg_reading_date': CommonUtil.getDate(), |
|
431 |
- 'ecg_finding_type': '', |
|
432 |
- 'ecg_finding_content': '', |
|
433 |
- 'agent_id': defaultUserId, |
|
434 |
- 'medical_record_idx': null, |
|
435 |
- 'common_group_file_idx': null, |
|
436 |
- commonFileList: [],//심전도 업로드 파일 목록 |
|
437 |
- |
|
438 |
- isEdit: false,//직접 수정일 때, true (수정 or 등록 상관없음); |
|
439 |
- }; |
|
440 |
- //심전도 정보 |
|
441 |
- const [ecg, setEcg] = React.useState({...ecgInit}); |
|
442 |
- const ecgRef = React.useRef({...ecgInit}); |
|
443 |
- |
|
444 |
- //심전도 유효성 검사 |
|
445 |
- const ecgValidation = () => { |
|
446 |
- const target = ecg; |
|
447 |
- const targetRef = ecgRef; |
|
448 |
- |
|
449 |
- if (CommonUtil.isEmpty(target['ecg_reading_date']) == true) { |
|
450 |
- targetRef.current['ecg_reading_date'].focus(); |
|
451 |
- alert("판독 소견 측정 일자를 선택해 주세요."); |
|
452 |
- return false; |
|
453 |
- } |
|
454 |
- if (CommonUtil.isEmpty(target['ecg_finding_type']) == true) { |
|
455 |
- targetRef.current['ecg_finding_type'].focus(); |
|
456 |
- alert("판독 소견 측정 종류를 입력해 주세요."); |
|
457 |
- return false; |
|
458 |
- } |
|
459 |
- if (CommonUtil.isEmpty(target['ecg_finding_content']) == true) { |
|
460 |
- targetRef.current['ecg_finding_content'].focus(); |
|
461 |
- alert("판독 소견 측정 내용을 입력해 주세요."); |
|
462 |
- return false; |
|
463 |
- } |
|
464 |
- //파일 입력 |
|
465 |
- if (target.isEdit == false) { |
|
466 |
- if (CommonUtil.isEmpty(target['commonFileList']) == true) { |
|
467 |
- //targetRef.current['commonFileList'].focus(); |
|
468 |
- alert("심전도 측정 파일을 올려주세요."); |
|
469 |
- return false; |
|
470 |
- } |
|
471 |
- } else {//직접 입력 |
|
472 |
- if (CommonUtil.isEmpty(target['bradycardia_count']) == true) { |
|
473 |
- targetRef.current['bradycardia_count'].focus(); |
|
474 |
- alert("서맥 횟수를 입력해 주세요."); |
|
475 |
- return false; |
|
476 |
- } |
|
477 |
- if (CommonUtil.isEmpty(target['tachycardia_count']) == true) { |
|
478 |
- targetRef.current['tachycardia_count'].focus(); |
|
479 |
- alert("빈맥 횟수 입력해 주세요."); |
|
480 |
- return false; |
|
481 |
- } |
|
482 |
- if (CommonUtil.isEmpty(target['max_heart_rate']) == true) { |
|
483 |
- targetRef.current['average_heart_rate'].focus(); |
|
484 |
- alert("최대 심박수를 입력해 주세요."); |
|
485 |
- return false; |
|
486 |
- } |
|
487 |
- if (CommonUtil.isEmpty(target['min_heart_rate']) == true) { |
|
488 |
- targetRef.current['average_heart_rate'].focus(); |
|
489 |
- alert("최소 심박수를 입력해 주세요."); |
|
490 |
- return false; |
|
491 |
- } |
|
492 |
- if (CommonUtil.isEmpty(target['average_heart_rate']) == true) { |
|
493 |
- targetRef.current['average_heart_rate'].focus(); |
|
494 |
- alert("평균 심박수를 입력해 주세요."); |
|
495 |
- return false; |
|
496 |
- } |
|
497 |
- if (CommonUtil.isEmpty(target['abnormal_heart_rate']) == true) { |
|
498 |
- targetRef.current['abnormal_heart_rate'].focus(); |
|
499 |
- alert("이상 심박수를 입력해 주세요."); |
|
500 |
- return false; |
|
501 |
- } |
|
502 |
- if (CommonUtil.isEmpty(target['max_rr']) == true) { |
|
503 |
- targetRef.current['max_rr'].focus(); |
|
504 |
- alert("최대 R-R를 입력해 주세요."); |
|
505 |
- return false; |
|
506 |
- } |
|
507 |
- if (CommonUtil.isEmpty(target['min_rr']) == true) { |
|
508 |
- targetRef.current['min_rr'].focus(); |
|
509 |
- alert("최소 R-R를 입력해 주세요."); |
|
510 |
- return false; |
|
511 |
- } |
|
512 |
- if (CommonUtil.isEmpty(target['average_rr']) == true) { |
|
513 |
- targetRef.current['average_rr'].focus(); |
|
514 |
- alert("평균 R-R를 입력해 주세요."); |
|
515 |
- return false; |
|
516 |
- } |
|
517 |
- } |
|
518 |
- |
|
519 |
- return true; |
|
520 |
- } |
|
521 |
- |
|
522 |
- |
|
523 |
- //심전도 등록 |
|
524 |
- const ecgInsert = () => { |
|
525 |
- if (ecgValidation() == false) { |
|
526 |
- return; |
|
527 |
- } |
|
528 |
- |
|
529 |
- ecg['senior_id'] = targetSenior['senior_id']; |
|
530 |
- ecg['agent_id'] = defaultUserId; |
|
531 |
- setEcg({...ecg}); |
|
532 |
- |
|
533 |
- fetch("/hospital/ecgInsert.json", { |
|
534 |
- method: "POST", |
|
535 |
- headers: { |
|
536 |
- 'Content-Type': 'application/json; charset=UTF-8' |
|
537 |
- }, |
|
538 |
- body: JSON.stringify(ecg), |
|
539 |
- }).then((response) => response.json()).then((data) => { |
|
540 |
- console.log("심전도 등록 결과(건수) : ", data); |
|
541 |
- if (data > 0) { |
|
542 |
- setEcgInit(); |
|
543 |
- ecgSelectList(); |
|
544 |
- //closeModal3(); |
|
545 |
- alert("등록완료"); |
|
546 |
- |
|
547 |
- } else { |
|
548 |
- alert("등록에 실패하였습니다. 관리자에게 문의바랍니다."); |
|
549 |
- } |
|
550 |
- }).catch((error) => { |
|
551 |
- console.log('ecgInsert() /hospital/ecgInsert.json error : ', error); |
|
552 |
- }); |
|
553 |
- } |
|
554 |
- |
|
555 |
- //심전도 수정 |
|
556 |
- const ecgUpdate = () => { |
|
557 |
- if (ecgValidation() == false) { |
|
558 |
- return; |
|
559 |
- } |
|
560 |
- |
|
561 |
- ecg['senior_id'] = targetSenior['senior_id']; |
|
562 |
- ecg['agent_id'] = defaultUserId; |
|
563 |
- setEcg({...ecg}); |
|
564 |
- |
|
565 |
- fetch("/hospital/ecgUpdate.json", { |
|
566 |
- method: "POST", |
|
567 |
- headers: { |
|
568 |
- 'Content-Type': 'application/json; charset=UTF-8' |
|
569 |
- }, |
|
570 |
- body: JSON.stringify(ecg), |
|
571 |
- }).then((response) => response.json()).then((data) => { |
|
572 |
- console.log("심전도 수정 결과(건수) : ", data); |
|
573 |
- if (data > 0) { |
|
574 |
- setEcgInit(); |
|
575 |
- ecg.commonFileList = []; |
|
576 |
- setEcg({...ecg}); |
|
577 |
- ecgSelectList(); |
|
578 |
- //closeModal3(); |
|
579 |
- alert("수정완료"); |
|
580 |
- } else { |
|
581 |
- alert("수정에 실패하였습니다. 관리자에게 문의바랍니다."); |
|
582 |
- } |
|
583 |
- }).catch((error) => { |
|
584 |
- console.log('ecgUpdate() /hospital/ecgUpdate.json error : ', error); |
|
585 |
- }); |
|
586 |
- } |
|
587 |
- |
|
588 |
- //심전도 삭제 |
|
589 |
- const ecgDelete = () => { |
|
590 |
- if (confirm('심전도 판독 소견을 삭제하시겠습니까?') == false) { |
|
591 |
- return; |
|
592 |
- } |
|
593 |
- |
|
594 |
- fetch("/hospital/ecgDelete.json", { |
|
595 |
- method: "POST", |
|
596 |
- headers: { |
|
597 |
- 'Content-Type': 'application/json; charset=UTF-8' |
|
598 |
- }, |
|
599 |
- body: JSON.stringify(ecg), |
|
600 |
- }).then((response) => response.json()).then((data) => { |
|
601 |
- console.log("심전도 삭제 결과(건수) : ", data); |
|
602 |
- if (data > 0) { |
|
603 |
- setEcgInit(); |
|
604 |
- ecg.commonFileList = []; |
|
605 |
- setEcg({...ecg}); |
|
606 |
- ecgSelectList(); |
|
607 |
- //closeModal3(); |
|
608 |
- alert("삭제완료"); |
|
609 |
- } else { |
|
610 |
- alert("삭제에 실패하였습니다. 관리자에게 문의바랍니다."); |
|
611 |
- } |
|
612 |
- }).catch((error) => { |
|
613 |
- console.log('ecgDelete() /hospital/ecgDelete.json error : ', error); |
|
614 |
- }); |
|
615 |
- } |
|
616 |
- |
|
617 |
- //초기화 취소 |
|
618 |
- const setEcgInit = () => { |
|
619 |
- setEcg({...ecgInit}); |
|
620 |
- } |
|
621 |
- |
|
622 |
- //심전도 정보 |
|
623 |
- const [ecgList, setEcgList] = React.useState({ecgList: [], ecgListCount:0, search: {currentPage: 1, perPage: 5}}); |
|
624 |
- //심전도 목록 조회 |
|
625 |
- const ecgSelectList = (currentPage) => { |
|
626 |
- ecgList.search.currentPage = CommonUtil.isEmpty(currentPage) ? 1 : currentPage; |
|
627 |
- ecgList.search['senior_id'] = targetSenior['senior_id']; |
|
628 |
- setEcgList({...ecgList}); |
|
629 |
- |
|
630 |
- fetch("/hospital/ecgSelectList.json", { |
|
631 |
- method: "POST", |
|
632 |
- headers: { |
|
633 |
- 'Content-Type': 'application/json; charset=UTF-8' |
|
634 |
- }, |
|
635 |
- body: JSON.stringify(ecgList.search), |
|
636 |
- }).then((response) => response.json()).then((data) => { |
|
637 |
- console.log("심전도 목록 조회 결과(건수) : ", data); |
|
638 |
- data.search = ecgList.search; |
|
639 |
- setEcgList(data); |
|
640 |
- }).catch((error) => { |
|
641 |
- console.log('ecgSelectList() /hospital/ecgSelectList.json error : ', error); |
|
642 |
- }); |
|
643 |
- } |
|
644 |
- /****************** 심전도 기록 (종료) ******************/ |
|
645 |
- |
|
646 |
- |
|
647 |
- |
|
648 |
- /****************** 혈압 (시작) ******************/ |
|
649 |
- const bloodPressureInit = { |
|
650 |
- 'senior_id': null, |
|
651 |
- 'blood_pressure_record_idx': null, |
|
652 |
- 'max_blood_pressure': null, |
|
653 |
- 'min_blood_pressure': null, |
|
654 |
- 'pulse_rate': null, |
|
655 |
- 'medical_record_idx': null, |
|
656 |
- 'blood_pressure_record_date': CommonUtil.getDate(), |
|
657 |
- 'agent_id': defaultUserId |
|
658 |
- }; |
|
659 |
- //혈압 정보 |
|
660 |
- const [bloodPressure, setBloodPressure] = React.useState({...bloodPressureInit}); |
|
661 |
- const bloodPressureRef = React.useRef({...bloodPressureInit}); |
|
662 |
- |
|
663 |
- //혈압 유효성 검사 |
|
664 |
- const bloodPressureValidation = () => { |
|
665 |
- const target = bloodPressure; |
|
666 |
- const targetRef = bloodPressureRef; |
|
667 |
- |
|
668 |
- if (CommonUtil.isEmpty(target['blood_pressure_record_date']) == true) { |
|
669 |
- targetRef.current['blood_pressure_record_date'].focus(); |
|
670 |
- alert("진료 일자를 선택해 주세요."); |
|
671 |
- return false; |
|
672 |
- } |
|
673 |
- if (CommonUtil.isEmpty(target['max_blood_pressure']) == true) { |
|
674 |
- targetRef.current['max_blood_pressure'].focus(); |
|
675 |
- alert("최고 혈압을 입력해 주세요."); |
|
676 |
- return false; |
|
677 |
- } |
|
678 |
- if (CommonUtil.isEmpty(target['min_blood_pressure']) == true) { |
|
679 |
- targetRef.current['min_blood_pressure'].focus(); |
|
680 |
- alert("최저 혈압을 입력해 주세요."); |
|
681 |
- return false; |
|
682 |
- } |
|
683 |
- if (CommonUtil.isEmpty(target['pulse_rate']) == true) { |
|
684 |
- targetRef.current['pulse_rate'].focus(); |
|
685 |
- alert("맥박수를 입력해 주세요."); |
|
686 |
- return false; |
|
687 |
- } |
|
688 |
- |
|
689 |
- return true; |
|
690 |
- } |
|
691 |
- |
|
692 |
- |
|
693 |
- //혈압 등록 |
|
694 |
- const bloodPressureInsert = () => { |
|
695 |
- if (bloodPressureValidation() == false) { |
|
696 |
- return; |
|
697 |
- } |
|
698 |
- |
|
699 |
- bloodPressure['senior_id'] = targetSenior['senior_id']; |
|
700 |
- bloodPressure['agent_id'] = defaultUserId; |
|
701 |
- setBloodPressure({...bloodPressure}); |
|
702 |
- |
|
703 |
- fetch("/hospital/bloodPressureInsert.json", { |
|
704 |
- method: "POST", |
|
705 |
- headers: { |
|
706 |
- 'Content-Type': 'application/json; charset=UTF-8' |
|
707 |
- }, |
|
708 |
- body: JSON.stringify(bloodPressure), |
|
709 |
- }).then((response) => response.json()).then((data) => { |
|
710 |
- console.log("혈압 등록 결과(건수) : ", data); |
|
711 |
- if (data > 0) { |
|
712 |
- setBloodPressureInit(); |
|
713 |
- bloodPressureSelectList(); |
|
714 |
- //closeModal2(); |
|
715 |
- alert("등록완료"); |
|
716 |
- |
|
717 |
- } else { |
|
718 |
- alert("등록에 실패하였습니다. 관리자에게 문의바랍니다."); |
|
719 |
- } |
|
720 |
- }).catch((error) => { |
|
721 |
- console.log('bloodPressureInsert() /hospital/bloodPressureInsert.json error : ', error); |
|
722 |
- }); |
|
723 |
- } |
|
724 |
- |
|
725 |
- //혈압 수정 |
|
726 |
- const bloodPressureUpdate = () => { |
|
727 |
- if (bloodPressureValidation() == false) { |
|
728 |
- return; |
|
729 |
- } |
|
730 |
- |
|
731 |
- bloodPressure['senior_id'] = targetSenior['senior_id']; |
|
732 |
- bloodPressure['agent_id'] = defaultUserId; |
|
733 |
- setBloodPressure({...bloodPressure}); |
|
734 |
- |
|
735 |
- fetch("/hospital/bloodPressureUpdate.json", { |
|
736 |
- method: "POST", |
|
737 |
- headers: { |
|
738 |
- 'Content-Type': 'application/json; charset=UTF-8' |
|
739 |
- }, |
|
740 |
- body: JSON.stringify(bloodPressure), |
|
741 |
- }).then((response) => response.json()).then((data) => { |
|
742 |
- console.log("혈압 수정 결과(건수) : ", data); |
|
743 |
- if (data > 0) { |
|
744 |
- setBloodPressureInit(); |
|
745 |
- bloodPressureSelectList(); |
|
746 |
- //closeModal2(); |
|
747 |
- alert("수정완료"); |
|
748 |
- } else { |
|
749 |
- alert("수정에 실패하였습니다. 관리자에게 문의바랍니다."); |
|
750 |
- } |
|
751 |
- }).catch((error) => { |
|
752 |
- console.log('bloodPressureUpdate() /hospital/bloodPressureUpdate.json error : ', error); |
|
753 |
- }); |
|
754 |
- } |
|
755 |
- |
|
756 |
- //혈압 삭제 |
|
757 |
- const bloodPressureDelete = () => { |
|
758 |
- if (confirm('혈압 측정 정보를 삭제하시겠습니까?') == false) { |
|
759 |
- return; |
|
760 |
- } |
|
761 |
- |
|
762 |
- fetch("/hospital/bloodPressureDelete.json", { |
|
763 |
- method: "POST", |
|
764 |
- headers: { |
|
765 |
- 'Content-Type': 'application/json; charset=UTF-8' |
|
766 |
- }, |
|
767 |
- body: JSON.stringify(bloodPressure), |
|
768 |
- }).then((response) => response.json()).then((data) => { |
|
769 |
- console.log("혈압 삭제 결과(건수) : ", data); |
|
770 |
- if (data > 0) { |
|
771 |
- setBloodPressureInit(); |
|
772 |
- bloodPressureSelectList(); |
|
773 |
- //closeModal2(); |
|
774 |
- alert("삭제완료"); |
|
775 |
- } else { |
|
776 |
- alert("삭제에 실패하였습니다. 관리자에게 문의바랍니다."); |
|
777 |
- } |
|
778 |
- }).catch((error) => { |
|
779 |
- console.log('bloodPressureDelete() /hospital/bloodPressureDelete.json error : ', error); |
|
780 |
- }); |
|
781 |
- } |
|
782 |
- |
|
783 |
- //초기화 취소 |
|
784 |
- const setBloodPressureInit = () => { |
|
785 |
- setBloodPressure({...bloodPressureInit}); |
|
786 |
- } |
|
787 |
- |
|
788 |
- //혈압 정보 |
|
789 |
- const [bloodPressureList, setBloodPressureList] = React.useState({bloodPressureList: [], bloodPressureListCount:0, search: {currentPage: 1, perPage: 5}}); |
|
790 |
- //혈압 목록 조회 |
|
791 |
- const bloodPressureSelectList = (currentPage) => { |
|
792 |
- bloodPressureList.search.currentPage = CommonUtil.isEmpty(currentPage) ? 1 : currentPage; |
|
793 |
- bloodPressureList.search['senior_id'] = targetSenior['senior_id']; |
|
794 |
- setBloodPressureList({...bloodPressureList}); |
|
795 |
- |
|
796 |
- fetch("/hospital/bloodPressureSelectList.json", { |
|
797 |
- method: "POST", |
|
798 |
- headers: { |
|
799 |
- 'Content-Type': 'application/json; charset=UTF-8' |
|
800 |
- }, |
|
801 |
- body: JSON.stringify(bloodPressureList.search), |
|
802 |
- }).then((response) => response.json()).then((data) => { |
|
803 |
- console.log("혈압 목록 조회 결과(건수) : ", data); |
|
804 |
- data.search = bloodPressureList.search; |
|
805 |
- setBloodPressureList(data); |
|
806 |
- }).catch((error) => { |
|
807 |
- console.log('bloodPressureSelectList() /hospital/bloodPressureSelectList.json error : ', error); |
|
808 |
- }); |
|
809 |
- } |
|
810 |
- /****************** 혈압 (종료) ******************/ |
|
811 |
- |
|
812 |
- React.useEffect(() => { |
|
813 |
- searching(); |
|
814 |
- }, []); |
|
815 |
- |
|
816 |
- |
|
817 |
- //현재 탭 Index |
|
818 |
- const [tabIndex, setTabIndex] = React.useState(0); |
|
819 |
- //탭 초기화 |
|
820 |
- const tab = [{ |
|
821 |
- title: `문진표관리`, |
|
822 |
- content: ( |
|
823 |
- <div> |
|
824 |
- <div className="flex equip-tab"> |
|
825 |
- <SubTitle explanation={"돌봄 대상자의 병원 내원 기록 및 문진표를 관리할 수 있습니다."} /> |
|
826 |
- </div> |
|
827 |
- <table className={"protector-user"}> |
|
828 |
- <thead> |
|
829 |
- <tr> |
|
830 |
- <th>No</th> |
|
831 |
- <th>소속기관명</th> |
|
832 |
- <th>이름</th> |
|
833 |
- <th>생년월일</th> |
|
834 |
- <th>성별</th> |
|
835 |
- <th>연락처</th> |
|
836 |
- <th>문진표관리</th> |
|
837 |
- <th>내원기록관리</th> |
|
838 |
- </tr> |
|
839 |
- </thead> |
|
840 |
- <tbody> |
|
841 |
- {senior.seniorList.map((item, idx) => { return ( |
|
842 |
- <tr key={idx}> |
|
843 |
- <td data-label="No">{senior.seniorListCount - idx - (senior.search.currentPage - 1) * senior.search.perPage}</td> |
|
844 |
- <td data-label="소속기관명">{item['agency_name']}</td> |
|
845 |
- <td data-label="이름">{item['user_name']}</td> |
|
846 |
- <td data-label="생년월일">{item['user_birth']}</td> |
|
847 |
- <td data-label="성별">{item['user_gender']}</td> |
|
848 |
- <td data-label="연락처">{item['user_phonenumber']}</td> |
|
849 |
- <td data-label="문진표관리"> |
|
850 |
- <button className="btn-small gray-btn" onClick={() => openModal(item)}>작성하기</button> |
|
851 |
- </td> |
|
852 |
- <td data-label="내원기록관리"> |
|
853 |
- <button className="btn-small gray-btn" onClick={() => openModal2(item)}>작성하기</button> |
|
854 |
- </td> |
|
855 |
- </tr> |
|
856 |
- )})} |
|
857 |
- {CommonUtil.isEmpty(senior.seniorList) ? |
|
858 |
- <tr> |
|
859 |
- <td colSpan={8}>조회된 데이터가 없습니다</td> |
|
860 |
- </tr> |
|
861 |
- : null} |
|
862 |
- </tbody> |
|
863 |
- </table> |
|
864 |
- <Pagination |
|
865 |
- currentPage={senior.search.currentPage} |
|
866 |
- perPage={senior.search.perPage} |
|
867 |
- totalCount={senior.seniorListCount} |
|
868 |
- maxRange={5} |
|
869 |
- click={seniorSelectList} |
|
870 |
- /> |
|
871 |
- </div> |
|
872 |
- ) |
|
873 |
- }, { |
|
874 |
- title: `심전도관리`, |
|
875 |
- content: ( |
|
876 |
- <div> |
|
877 |
- <div className="flex equip-tab"> |
|
878 |
- <SubTitle explanation={"돌봄 대상자의 심전도 정보를 관리할 수 있습니다."} /> |
|
879 |
- </div> |
|
880 |
- <table className={"protector-user"}> |
|
881 |
- <thead> |
|
882 |
- <tr> |
|
883 |
- <th>No</th> |
|
884 |
- <th>소속기관명</th> |
|
885 |
- <th>이름</th> |
|
886 |
- <th>생년월일</th> |
|
887 |
- <th>성별</th> |
|
888 |
- <th>연락처</th> |
|
889 |
- <th>심전도관리</th> |
|
890 |
- </tr> |
|
891 |
- </thead> |
|
892 |
- <tbody> |
|
893 |
- {senior.seniorList.map((item, idx) => { return ( |
|
894 |
- <tr key={idx}> |
|
895 |
- <td data-label="No">{senior.seniorListCount - idx - (senior.search.currentPage - 1) * senior.search.perPage}</td> |
|
896 |
- <td data-label="소속기관명">{item['agency_name']}</td> |
|
897 |
- <td data-label="이름">{item['user_name']}</td> |
|
898 |
- <td data-label="생년월일">{item['user_birth']}</td> |
|
899 |
- <td data-label="성별">{item['user_gender']}</td> |
|
900 |
- <td data-label="연락처">{item['user_phonenumber']}</td> |
|
901 |
- <td data-label="심전도관리"> |
|
902 |
- <button className="btn-small gray-btn" onClick={() => openModal3(item)}>심전도관리</button> |
|
903 |
- </td> |
|
904 |
- </tr> |
|
905 |
- )})} |
|
906 |
- {CommonUtil.isEmpty(senior.seniorList) ? |
|
907 |
- <tr> |
|
908 |
- <td colSpan={7}>조회된 데이터가 없습니다</td> |
|
909 |
- </tr> |
|
910 |
- : null} |
|
911 |
- </tbody> |
|
912 |
- </table> |
|
913 |
- <Pagination |
|
914 |
- currentPage={senior.search.currentPage} |
|
915 |
- perPage={senior.search.perPage} |
|
916 |
- totalCount={senior.seniorListCount} |
|
917 |
- maxRange={5} |
|
918 |
- click={seniorSelectList} |
|
919 |
- /> |
|
920 |
- </div> |
|
921 |
- ) |
|
922 |
- }, { |
|
923 |
- title: `혈압관리`, |
|
924 |
- content: ( |
|
925 |
- <div> |
|
926 |
- <div className="flex equip-tab"> |
|
927 |
- <SubTitle explanation={"돌봄 대상자의 혈압 정보를 관리할 수 있습니다."} /> |
|
928 |
- </div> |
|
929 |
- <table className={"protector-user"}> |
|
930 |
- <thead> |
|
931 |
- <tr> |
|
932 |
- <th>No</th> |
|
933 |
- <th>소속기관명</th> |
|
934 |
- <th>이름</th> |
|
935 |
- <th>생년월일</th> |
|
936 |
- <th>성별</th> |
|
937 |
- <th>연락처</th> |
|
938 |
- <th>혈압관리</th> |
|
939 |
- </tr> |
|
940 |
- </thead> |
|
941 |
- <tbody> |
|
942 |
- {senior.seniorList.map((item, idx) => { return ( |
|
943 |
- <tr key={idx}> |
|
944 |
- <td data-label="No">{senior.seniorListCount - idx - (senior.search.currentPage - 1) * senior.search.perPage}</td> |
|
945 |
- <td data-label="소속기관명">{item['agency_name']}</td> |
|
946 |
- <td data-label="이름">{item['user_name']}</td> |
|
947 |
- <td data-label="생년월일">{item['user_birth']}</td> |
|
948 |
- <td data-label="성별">{item['user_gender']}</td> |
|
949 |
- <td data-label="연락처">{item['user_phonenumber']}</td> |
|
950 |
- <td data-label="혈압관리"> |
|
951 |
- <button className="btn-small gray-btn" onClick={() => openModal4(item)}>혈압관리</button> |
|
952 |
- </td> |
|
953 |
- </tr> |
|
954 |
- )})} |
|
955 |
- {CommonUtil.isEmpty(senior.seniorList) ? |
|
956 |
- <tr> |
|
957 |
- <td colSpan={7}>조회된 데이터가 없습니다</td> |
|
958 |
- </tr> |
|
959 |
- : null} |
|
960 |
- </tbody> |
|
961 |
- </table> |
|
962 |
- <Pagination |
|
963 |
- currentPage={senior.search.currentPage} |
|
964 |
- perPage={senior.search.perPage} |
|
965 |
- totalCount={senior.seniorListCount} |
|
966 |
- maxRange={5} |
|
967 |
- click={seniorSelectList} |
|
968 |
- /> |
|
969 |
- </div> |
|
970 |
- ) |
|
971 |
- }]; |
|
972 |
- |
|
973 |
- return ( |
|
974 |
- <main> |
|
975 |
- |
|
976 |
- {/* <Modal_Questionnaire open={modalOpen} close={closeModal} /> */} |
|
977 |
- {/* <Modal_MedicalHistory open={modalOpen2} close={closeModal2} /> */} |
|
978 |
- {/* <Modal_ECG open={modalOpen3} close={closeModal3} /> */} |
|
979 |
- {/* <Modal_Blood open={modalOpen4} close={closeModal4} /> */} |
|
980 |
- |
|
981 |
- <div className="search-management flex-start margin-bottom2"> |
|
982 |
- <select style={{maxWidth: '150px'}} |
|
983 |
- onChange={(e) => {senior.search.searchType = e.target.value; setSenior({...senior});}}> |
|
984 |
- <option value="" selected={CommonUtil.isEmpty(senior.search.searchType)}>전체</option> |
|
985 |
- <option value="user_name" selected={senior.search.searchType == 'user_name'}>이름</option> |
|
986 |
- <option value="user_id" selected={senior.search.searchType == 'user_id'}>아이디</option> |
|
987 |
- <option value="user_phonenumber" selected={senior.search.searchType == 'user_phonenumber'}>연락처</option> |
|
988 |
- </select> |
|
989 |
- <input type="text" className="senior-search" value={senior.search.searchText} |
|
990 |
- onChange={(e) => {senior.search.searchText = e.target.value; setSenior({...senior});}} |
|
991 |
- onKeyUp={(e) => searchingEnter(e.key)}/> |
|
992 |
- <button className="btn-small gray-btn" onClick={searching}>검색</button> |
|
993 |
- </div> |
|
994 |
- |
|
995 |
- <div className="content-wrap"> |
|
996 |
- <DetailTitle contentTitle={"대상자의 문진표 / 심전도 / 혈압 관리를 할 수 있습니다."} /> |
|
997 |
- |
|
998 |
- <div style={{ height: "calc(100% - 61px)" }}> |
|
999 |
- <div className="right" style={{ height: "100%", }}> |
|
1000 |
- <div style={{ height: "100%" }}> |
|
1001 |
- <div className="tab-container" style={{ marginTop: "5rem"}}> |
|
1002 |
- {/* {CommonUtil.isEmpty(state.loginUser) == false && state.loginUser['authority'] == 'ROLE_AGENCY' ? |
|
1012 |
+ <div style={{ height: "calc(100% - 61px)" }}> |
|
1013 |
+ <div className="right" style={{ height: "100%", }}> |
|
1014 |
+ <div style={{ height: "100%" }}> |
|
1015 |
+ <div className="tab-container" style={{ marginTop: "5rem" }}> |
|
1016 |
+ {/* {CommonUtil.isEmpty(state.loginUser) == false && state.loginUser['authority'] == 'ROLE_AGENCY' ? |
|
1003 | 1017 |
<div className="flex-end margin-bottom"> |
1004 | 1018 |
<div className="flex searchselect" style={{width: 'auto'}}> |
1005 | 1019 |
|
... | ... | @@ -1014,692 +1028,723 @@ |
1014 | 1028 |
</div> |
1015 | 1029 |
</div> |
1016 | 1030 |
:null} */} |
1017 |
- <ul className="tab-menu flex-end"> |
|
1018 |
- {tab.map((item, idx) => { return ( |
|
1019 |
- <li onClick={() => setTabIndex(idx)} className={idx == tabIndex ? 'active' : null}> |
|
1020 |
- {item.title} |
|
1021 |
- </li> |
|
1022 |
- )})} |
|
1023 |
- </ul> |
|
1024 |
- <div className="content-wrap userlist"> |
|
1025 |
- |
|
1026 |
- <ul className="tab-content"> |
|
1027 |
- <li> |
|
1028 |
- {tab[tabIndex].content} |
|
1029 |
- </li> |
|
1030 |
- </ul> |
|
1031 |
- </div> |
|
1032 |
- </div> |
|
1033 |
- </div> |
|
1034 |
- </div> |
|
1031 |
+ <ul className="tab-menu flex-end"> |
|
1032 |
+ {tab.map((item, idx) => { |
|
1033 |
+ return ( |
|
1034 |
+ <li onClick={() => setTabIndex(idx)} className={idx == tabIndex ? 'active' : null}> |
|
1035 |
+ {item.title} |
|
1036 |
+ </li> |
|
1037 |
+ ) |
|
1038 |
+ })} |
|
1039 |
+ </ul> |
|
1040 |
+ <div className="content-wrap userlist"> |
|
1041 |
+ |
|
1042 |
+ <ul className="tab-content"> |
|
1043 |
+ <li> |
|
1044 |
+ {tab[tabIndex].content} |
|
1045 |
+ </li> |
|
1046 |
+ </ul> |
|
1035 | 1047 |
</div> |
1048 |
+ </div> |
|
1036 | 1049 |
</div> |
1050 |
+ </div> |
|
1051 |
+ </div> |
|
1052 |
+ </div> |
|
1037 | 1053 |
|
1038 | 1054 |
|
1039 |
- <Modal open={modalOpen} close={closeModal} header="문진표 작성"> |
|
1040 |
- <div className="board-wrap"> |
|
1041 |
- <div> |
|
1042 |
- <table className="margin-bottom2 questionnaire-table"> |
|
1043 |
- <tr> |
|
1044 |
- <th>흡연을 하십니까?</th> |
|
1045 |
- <td className="flex-start"> |
|
1046 |
- <input type="radio" name="smoke" id="smoke-true" |
|
1047 |
- checked={questionnaire['smoke_type'] == true} |
|
1048 |
- onChange={(e) => { |
|
1049 |
- if (e.target.checked) { |
|
1050 |
- questionnaire['smoke_type'] = true; |
|
1051 |
- setQuestionnaire({...questionnaire}); |
|
1052 |
- }} |
|
1053 |
- } |
|
1054 |
- /> |
|
1055 |
- <label for="smoke-true">예</label> |
|
1056 |
- <input type="radio" name="smoke" id="smoke-false" |
|
1057 |
- checked={questionnaire['smoke_type'] == false} |
|
1058 |
- onChange={(e) => { |
|
1059 |
- if (e.target.checked) { |
|
1060 |
- questionnaire['smoke_type'] = false; |
|
1061 |
- setQuestionnaire({...questionnaire}); |
|
1062 |
- }} |
|
1063 |
- } |
|
1064 |
- /> |
|
1065 |
- <label for="smoke-false">아니요</label> |
|
1066 |
- </td> |
|
1067 |
- </tr> |
|
1068 |
- <tr> |
|
1069 |
- <th>음주를 하십니까?</th> |
|
1070 |
- <td className="flex-start"> |
|
1071 |
- <input type="radio" name="drink" id="drink-true" |
|
1072 |
- checked={questionnaire['drink_type'] == true} |
|
1073 |
- onChange={(e) => { |
|
1074 |
- if (e.target.checked) { |
|
1075 |
- questionnaire['drink_type'] = true; |
|
1076 |
- setQuestionnaire({...questionnaire}); |
|
1077 |
- }} |
|
1078 |
- } |
|
1079 |
- /> |
|
1080 |
- <label for="drink-true">예</label> |
|
1081 |
- <input type="radio" name="drink" id="drink-false" |
|
1082 |
- checked={questionnaire['drink_type'] == false} |
|
1083 |
- onChange={(e) => { |
|
1084 |
- if (e.target.checked) { |
|
1085 |
- questionnaire['drink_type'] = false; |
|
1086 |
- setQuestionnaire({...questionnaire}); |
|
1087 |
- }} |
|
1088 |
- } |
|
1089 |
- /> |
|
1090 |
- <label for="drink-false">아니요</label> |
|
1091 |
- </td> |
|
1092 |
- </tr> |
|
1093 |
- <tr> |
|
1094 |
- <th>일주일에 운동을 몇회 하십니까?</th> |
|
1095 |
- <td className="flex-start"> |
|
1096 |
- <input type="radio" name="exercise" id="exercise-false" |
|
1097 |
- checked={questionnaire['exercise_type'] == false} |
|
1098 |
- onChange={(e) => { |
|
1099 |
- if (e.target.checked) { |
|
1100 |
- questionnaire['exercise_type'] = false; |
|
1101 |
- setQuestionnaire({...questionnaire}); |
|
1102 |
- }} |
|
1103 |
- } |
|
1104 |
- /> |
|
1105 |
- <label for="exercise-false">안함</label> |
|
1055 |
+ <Modal open={modalOpen} close={closeModal} header="문진표 작성"> |
|
1056 |
+ <div className="board-wrap"> |
|
1057 |
+ <div> |
|
1058 |
+ <table className="margin-bottom2 questionnaire-table"> |
|
1059 |
+ <tr> |
|
1060 |
+ <th>흡연을 하십니까?</th> |
|
1061 |
+ <td className="flex-start"> |
|
1062 |
+ <input type="radio" name="smoke" id="smoke-true" |
|
1063 |
+ checked={questionnaire['smoke_type'] == true} |
|
1064 |
+ onChange={(e) => { |
|
1065 |
+ if (e.target.checked) { |
|
1066 |
+ questionnaire['smoke_type'] = true; |
|
1067 |
+ setQuestionnaire({ ...questionnaire }); |
|
1068 |
+ } |
|
1069 |
+ } |
|
1070 |
+ } |
|
1071 |
+ /> |
|
1072 |
+ <label for="smoke-true">예</label> |
|
1073 |
+ <input type="radio" name="smoke" id="smoke-false" |
|
1074 |
+ checked={questionnaire['smoke_type'] == false} |
|
1075 |
+ onChange={(e) => { |
|
1076 |
+ if (e.target.checked) { |
|
1077 |
+ questionnaire['smoke_type'] = false; |
|
1078 |
+ setQuestionnaire({ ...questionnaire }); |
|
1079 |
+ } |
|
1080 |
+ } |
|
1081 |
+ } |
|
1082 |
+ /> |
|
1083 |
+ <label for="smoke-false">아니요</label> |
|
1084 |
+ </td> |
|
1085 |
+ </tr> |
|
1086 |
+ <tr> |
|
1087 |
+ <th>음주를 하십니까?</th> |
|
1088 |
+ <td className="flex-start"> |
|
1089 |
+ <input type="radio" name="drink" id="drink-true" |
|
1090 |
+ checked={questionnaire['drink_type'] == true} |
|
1091 |
+ onChange={(e) => { |
|
1092 |
+ if (e.target.checked) { |
|
1093 |
+ questionnaire['drink_type'] = true; |
|
1094 |
+ setQuestionnaire({ ...questionnaire }); |
|
1095 |
+ } |
|
1096 |
+ } |
|
1097 |
+ } |
|
1098 |
+ /> |
|
1099 |
+ <label for="drink-true">예</label> |
|
1100 |
+ <input type="radio" name="drink" id="drink-false" |
|
1101 |
+ checked={questionnaire['drink_type'] == false} |
|
1102 |
+ onChange={(e) => { |
|
1103 |
+ if (e.target.checked) { |
|
1104 |
+ questionnaire['drink_type'] = false; |
|
1105 |
+ setQuestionnaire({ ...questionnaire }); |
|
1106 |
+ } |
|
1107 |
+ } |
|
1108 |
+ } |
|
1109 |
+ /> |
|
1110 |
+ <label for="drink-false">아니요</label> |
|
1111 |
+ </td> |
|
1112 |
+ </tr> |
|
1113 |
+ <tr> |
|
1114 |
+ <th>일주일에 운동을 몇회 하십니까?</th> |
|
1115 |
+ <td className="flex-start"> |
|
1116 |
+ <input type="radio" name="exercise" id="exercise-false" |
|
1117 |
+ checked={questionnaire['exercise_type'] == false} |
|
1118 |
+ onChange={(e) => { |
|
1119 |
+ if (e.target.checked) { |
|
1120 |
+ questionnaire['exercise_type'] = false; |
|
1121 |
+ setQuestionnaire({ ...questionnaire }); |
|
1122 |
+ } |
|
1123 |
+ } |
|
1124 |
+ } |
|
1125 |
+ /> |
|
1126 |
+ <label for="exercise-false">안함</label> |
|
1106 | 1127 |
|
1107 |
- <input type="radio" name="exercise" id="exercise-1" |
|
1108 |
- checked={questionnaire['exercise_type'] == true && questionnaire['weekly_exercise_amount'] == 1} |
|
1109 |
- onChange={(e) => { |
|
1110 |
- if (e.target.checked) { |
|
1111 |
- questionnaire['exercise_type'] = true; |
|
1112 |
- questionnaire['weekly_exercise_amount'] = 1; |
|
1113 |
- setQuestionnaire({...questionnaire}); |
|
1114 |
- }} |
|
1115 |
- } |
|
1116 |
- /> |
|
1117 |
- <label for="exercise-1">1회</label> |
|
1128 |
+ <input type="radio" name="exercise" id="exercise-1" |
|
1129 |
+ checked={questionnaire['exercise_type'] == true && questionnaire['weekly_exercise_amount'] == 1} |
|
1130 |
+ onChange={(e) => { |
|
1131 |
+ if (e.target.checked) { |
|
1132 |
+ questionnaire['exercise_type'] = true; |
|
1133 |
+ questionnaire['weekly_exercise_amount'] = 1; |
|
1134 |
+ setQuestionnaire({ ...questionnaire }); |
|
1135 |
+ } |
|
1136 |
+ } |
|
1137 |
+ } |
|
1138 |
+ /> |
|
1139 |
+ <label for="exercise-1">1회</label> |
|
1118 | 1140 |
|
1119 |
- <input type="radio" name="exercise" id="exercise-2" |
|
1120 |
- checked={questionnaire['exercise_type'] == true && questionnaire['weekly_exercise_amount'] == 2} |
|
1121 |
- onChange={(e) => { |
|
1122 |
- if (e.target.checked) { |
|
1123 |
- questionnaire['exercise_type'] = true; |
|
1124 |
- questionnaire['weekly_exercise_amount'] = 2; |
|
1125 |
- setQuestionnaire({...questionnaire}); |
|
1126 |
- }} |
|
1127 |
- } |
|
1128 |
- /> |
|
1129 |
- <label for="exercise-2">2회</label> |
|
1141 |
+ <input type="radio" name="exercise" id="exercise-2" |
|
1142 |
+ checked={questionnaire['exercise_type'] == true && questionnaire['weekly_exercise_amount'] == 2} |
|
1143 |
+ onChange={(e) => { |
|
1144 |
+ if (e.target.checked) { |
|
1145 |
+ questionnaire['exercise_type'] = true; |
|
1146 |
+ questionnaire['weekly_exercise_amount'] = 2; |
|
1147 |
+ setQuestionnaire({ ...questionnaire }); |
|
1148 |
+ } |
|
1149 |
+ } |
|
1150 |
+ } |
|
1151 |
+ /> |
|
1152 |
+ <label for="exercise-2">2회</label> |
|
1130 | 1153 |
|
1131 |
- <input type="radio" name="exercise" id="exercise-3" |
|
1132 |
- checked={questionnaire['exercise_type'] == true && questionnaire['weekly_exercise_amount'] == 3} |
|
1133 |
- onChange={(e) => { |
|
1134 |
- if (e.target.checked) { |
|
1135 |
- questionnaire['exercise_type'] = true; |
|
1136 |
- questionnaire['weekly_exercise_amount'] = 3; |
|
1137 |
- setQuestionnaire({...questionnaire}); |
|
1138 |
- }} |
|
1139 |
- } |
|
1140 |
- /> |
|
1141 |
- <label for="exercise-3">3회</label> |
|
1154 |
+ <input type="radio" name="exercise" id="exercise-3" |
|
1155 |
+ checked={questionnaire['exercise_type'] == true && questionnaire['weekly_exercise_amount'] == 3} |
|
1156 |
+ onChange={(e) => { |
|
1157 |
+ if (e.target.checked) { |
|
1158 |
+ questionnaire['exercise_type'] = true; |
|
1159 |
+ questionnaire['weekly_exercise_amount'] = 3; |
|
1160 |
+ setQuestionnaire({ ...questionnaire }); |
|
1161 |
+ } |
|
1162 |
+ } |
|
1163 |
+ } |
|
1164 |
+ /> |
|
1165 |
+ <label for="exercise-3">3회</label> |
|
1142 | 1166 |
|
1143 |
- <input type="radio" name="exercise" id="exercise-4" |
|
1144 |
- checked={questionnaire['exercise_type'] == true && questionnaire['weekly_exercise_amount'] == 4} |
|
1145 |
- onChange={(e) => { |
|
1146 |
- if (e.target.checked) { |
|
1147 |
- questionnaire['exercise_type'] = true; |
|
1148 |
- questionnaire['weekly_exercise_amount'] = 4; |
|
1149 |
- setQuestionnaire({...questionnaire}); |
|
1150 |
- }} |
|
1151 |
- } |
|
1152 |
- /> |
|
1153 |
- <label for="exercise-4">4회</label> |
|
1167 |
+ <input type="radio" name="exercise" id="exercise-4" |
|
1168 |
+ checked={questionnaire['exercise_type'] == true && questionnaire['weekly_exercise_amount'] == 4} |
|
1169 |
+ onChange={(e) => { |
|
1170 |
+ if (e.target.checked) { |
|
1171 |
+ questionnaire['exercise_type'] = true; |
|
1172 |
+ questionnaire['weekly_exercise_amount'] = 4; |
|
1173 |
+ setQuestionnaire({ ...questionnaire }); |
|
1174 |
+ } |
|
1175 |
+ } |
|
1176 |
+ } |
|
1177 |
+ /> |
|
1178 |
+ <label for="exercise-4">4회</label> |
|
1154 | 1179 |
|
1155 |
- <input type="radio" name="exercise" id="exercise-5" |
|
1156 |
- checked={questionnaire['exercise_type'] == true && questionnaire['weekly_exercise_amount'] == 5} |
|
1157 |
- onChange={(e) => { |
|
1158 |
- if (e.target.checked) { |
|
1159 |
- questionnaire['exercise_type'] = true; |
|
1160 |
- questionnaire['weekly_exercise_amount'] = 5; |
|
1161 |
- setQuestionnaire({...questionnaire}); |
|
1162 |
- }} |
|
1163 |
- } |
|
1164 |
- /> |
|
1165 |
- <label for="exercise-5">5회</label> |
|
1180 |
+ <input type="radio" name="exercise" id="exercise-5" |
|
1181 |
+ checked={questionnaire['exercise_type'] == true && questionnaire['weekly_exercise_amount'] == 5} |
|
1182 |
+ onChange={(e) => { |
|
1183 |
+ if (e.target.checked) { |
|
1184 |
+ questionnaire['exercise_type'] = true; |
|
1185 |
+ questionnaire['weekly_exercise_amount'] = 5; |
|
1186 |
+ setQuestionnaire({ ...questionnaire }); |
|
1187 |
+ } |
|
1188 |
+ } |
|
1189 |
+ } |
|
1190 |
+ /> |
|
1191 |
+ <label for="exercise-5">5회</label> |
|
1166 | 1192 |
|
1167 |
- <input type="radio" name="exercise" id="exercise-6" |
|
1168 |
- checked={questionnaire['exercise_type'] == true && questionnaire['weekly_exercise_amount'] == 6} |
|
1169 |
- onChange={(e) => { |
|
1170 |
- if (e.target.checked) { |
|
1171 |
- questionnaire['exercise_type'] = true; |
|
1172 |
- questionnaire['weekly_exercise_amount'] = 6; |
|
1173 |
- setQuestionnaire({...questionnaire}); |
|
1174 |
- }} |
|
1175 |
- } |
|
1176 |
- /> |
|
1177 |
- <label for="exercise-6">6회</label> |
|
1193 |
+ <input type="radio" name="exercise" id="exercise-6" |
|
1194 |
+ checked={questionnaire['exercise_type'] == true && questionnaire['weekly_exercise_amount'] == 6} |
|
1195 |
+ onChange={(e) => { |
|
1196 |
+ if (e.target.checked) { |
|
1197 |
+ questionnaire['exercise_type'] = true; |
|
1198 |
+ questionnaire['weekly_exercise_amount'] = 6; |
|
1199 |
+ setQuestionnaire({ ...questionnaire }); |
|
1200 |
+ } |
|
1201 |
+ } |
|
1202 |
+ } |
|
1203 |
+ /> |
|
1204 |
+ <label for="exercise-6">6회</label> |
|
1178 | 1205 |
|
1179 |
- <input type="radio" name="exercise" id="exercise-7" |
|
1180 |
- checked={questionnaire['exercise_type'] == true && questionnaire['weekly_exercise_amount'] == 7} |
|
1181 |
- onChange={(e) => { |
|
1182 |
- if (e.target.checked) { |
|
1183 |
- questionnaire['exercise_type'] = true; |
|
1184 |
- questionnaire['weekly_exercise_amount'] = 7; |
|
1185 |
- setQuestionnaire({...questionnaire}); |
|
1186 |
- }} |
|
1187 |
- } |
|
1188 |
- /> |
|
1189 |
- <label for="exercise-7">매일</label> |
|
1190 |
- </td> |
|
1191 |
- </tr> |
|
1192 |
- <tr> |
|
1193 |
- <th>최근 3개월 동안 갑작스런 체중 변화가 있었습니까?</th> |
|
1194 |
- <td className="flex-start"> |
|
1195 |
- <input type="radio" name="weight" id="weight-up" |
|
1196 |
- checked={questionnaire['weight_change_amount'] == 1} |
|
1197 |
- onChange={(e) => { |
|
1198 |
- if (e.target.checked) { |
|
1199 |
- questionnaire['weight_change_amount'] = 1; |
|
1200 |
- setQuestionnaire({...questionnaire}); |
|
1201 |
- }} |
|
1202 |
- } |
|
1203 |
- /> |
|
1204 |
- <label for="weight-up">예 - 증가</label> |
|
1206 |
+ <input type="radio" name="exercise" id="exercise-7" |
|
1207 |
+ checked={questionnaire['exercise_type'] == true && questionnaire['weekly_exercise_amount'] == 7} |
|
1208 |
+ onChange={(e) => { |
|
1209 |
+ if (e.target.checked) { |
|
1210 |
+ questionnaire['exercise_type'] = true; |
|
1211 |
+ questionnaire['weekly_exercise_amount'] = 7; |
|
1212 |
+ setQuestionnaire({ ...questionnaire }); |
|
1213 |
+ } |
|
1214 |
+ } |
|
1215 |
+ } |
|
1216 |
+ /> |
|
1217 |
+ <label for="exercise-7">매일</label> |
|
1218 |
+ </td> |
|
1219 |
+ </tr> |
|
1220 |
+ <tr> |
|
1221 |
+ <th>최근 3개월 동안 갑작스런 체중 변화가 있었습니까?</th> |
|
1222 |
+ <td className="flex-start"> |
|
1223 |
+ <input type="radio" name="weight" id="weight-up" |
|
1224 |
+ checked={questionnaire['weight_change_amount'] == 1} |
|
1225 |
+ onChange={(e) => { |
|
1226 |
+ if (e.target.checked) { |
|
1227 |
+ questionnaire['weight_change_amount'] = 1; |
|
1228 |
+ setQuestionnaire({ ...questionnaire }); |
|
1229 |
+ } |
|
1230 |
+ } |
|
1231 |
+ } |
|
1232 |
+ /> |
|
1233 |
+ <label for="weight-up">예 - 증가</label> |
|
1205 | 1234 |
|
1206 |
- <input type="radio" name="weight" id="weight-down" |
|
1207 |
- checked={questionnaire['weight_change_amount'] == -1} |
|
1208 |
- onChange={(e) => { |
|
1209 |
- if (e.target.checked) { |
|
1210 |
- questionnaire['weight_change_amount'] = -1; |
|
1211 |
- setQuestionnaire({...questionnaire}); |
|
1212 |
- }} |
|
1213 |
- } |
|
1214 |
- /> |
|
1215 |
- <label for="weight-down">예 - 감소</label> |
|
1235 |
+ <input type="radio" name="weight" id="weight-down" |
|
1236 |
+ checked={questionnaire['weight_change_amount'] == -1} |
|
1237 |
+ onChange={(e) => { |
|
1238 |
+ if (e.target.checked) { |
|
1239 |
+ questionnaire['weight_change_amount'] = -1; |
|
1240 |
+ setQuestionnaire({ ...questionnaire }); |
|
1241 |
+ } |
|
1242 |
+ } |
|
1243 |
+ } |
|
1244 |
+ /> |
|
1245 |
+ <label for="weight-down">예 - 감소</label> |
|
1216 | 1246 |
|
1217 |
- <input type="radio" name="weight" id="weight-false" |
|
1218 |
- checked={questionnaire['weight_change_amount'] == 0} |
|
1219 |
- onChange={(e) => { |
|
1220 |
- if (e.target.checked) { |
|
1221 |
- questionnaire['weight_change_amount'] = 0; |
|
1222 |
- setQuestionnaire({...questionnaire}); |
|
1223 |
- }} |
|
1224 |
- } |
|
1225 |
- /> |
|
1226 |
- <label for="weight-false">아니요</label> |
|
1227 |
- </td> |
|
1228 |
- </tr> |
|
1229 |
- <tr> |
|
1230 |
- <th>현재 복용중인 약이 있으면 체크를 해주세요.</th> |
|
1231 |
- <td className="flex-start"> |
|
1247 |
+ <input type="radio" name="weight" id="weight-false" |
|
1248 |
+ checked={questionnaire['weight_change_amount'] == 0} |
|
1249 |
+ onChange={(e) => { |
|
1250 |
+ if (e.target.checked) { |
|
1251 |
+ questionnaire['weight_change_amount'] = 0; |
|
1252 |
+ setQuestionnaire({ ...questionnaire }); |
|
1253 |
+ } |
|
1254 |
+ } |
|
1255 |
+ } |
|
1256 |
+ /> |
|
1257 |
+ <label for="weight-false">아니요</label> |
|
1258 |
+ </td> |
|
1259 |
+ </tr> |
|
1260 |
+ <tr> |
|
1261 |
+ <th>현재 복용중인 약이 있으면 체크를 해주세요.</th> |
|
1262 |
+ <td className="flex-start"> |
|
1232 | 1263 |
|
1233 |
- <input type="checkbox" name="pills" id="pills-1" |
|
1234 |
- checked={questionnaire['medication_pill'].indexOf('아스피린(항혈소판제)') > -1} |
|
1235 |
- onChange={(e) => { |
|
1236 |
- if (e.target.checked) { |
|
1237 |
- questionnaire['medication_pill'] += '아스피린(항혈소판제),'; |
|
1238 |
- setQuestionnaire({...questionnaire}); |
|
1239 |
- } else { |
|
1240 |
- questionnaire['medication_pill'] = questionnaire['medication_pill'].replace('아스피린(항혈소판제),', ''); |
|
1241 |
- setQuestionnaire({...questionnaire}); |
|
1242 |
- }} |
|
1243 |
- } |
|
1244 |
- /> |
|
1245 |
- <label for="pills-1">아스피린(항혈소판제)</label> |
|
1264 |
+ <input type="checkbox" name="pills" id="pills-1" |
|
1265 |
+ checked={questionnaire['medication_pill'].indexOf('아스피린(항혈소판제)') > -1} |
|
1266 |
+ onChange={(e) => { |
|
1267 |
+ if (e.target.checked) { |
|
1268 |
+ questionnaire['medication_pill'] += '아스피린(항혈소판제),'; |
|
1269 |
+ setQuestionnaire({ ...questionnaire }); |
|
1270 |
+ } else { |
|
1271 |
+ questionnaire['medication_pill'] = questionnaire['medication_pill'].replace('아스피린(항혈소판제),', ''); |
|
1272 |
+ setQuestionnaire({ ...questionnaire }); |
|
1273 |
+ } |
|
1274 |
+ } |
|
1275 |
+ } |
|
1276 |
+ /> |
|
1277 |
+ <label for="pills-1">아스피린(항혈소판제)</label> |
|
1246 | 1278 |
|
1247 |
- <input type="checkbox" name="pills" id="pills-2" |
|
1248 |
- checked={questionnaire['medication_pill'].indexOf('당뇨약') > -1} |
|
1249 |
- onChange={(e) => { |
|
1250 |
- if (e.target.checked) { |
|
1251 |
- questionnaire['medication_pill'] += '당뇨약,'; |
|
1252 |
- setQuestionnaire({...questionnaire}); |
|
1253 |
- } else { |
|
1254 |
- questionnaire['medication_pill'] = questionnaire['medication_pill'].replace('당뇨약,', ''); |
|
1255 |
- setQuestionnaire({...questionnaire}); |
|
1256 |
- }} |
|
1257 |
- } |
|
1258 |
- /> |
|
1259 |
- <label for="pills-2">당뇨약</label> |
|
1279 |
+ <input type="checkbox" name="pills" id="pills-2" |
|
1280 |
+ checked={questionnaire['medication_pill'].indexOf('당뇨약') > -1} |
|
1281 |
+ onChange={(e) => { |
|
1282 |
+ if (e.target.checked) { |
|
1283 |
+ questionnaire['medication_pill'] += '당뇨약,'; |
|
1284 |
+ setQuestionnaire({ ...questionnaire }); |
|
1285 |
+ } else { |
|
1286 |
+ questionnaire['medication_pill'] = questionnaire['medication_pill'].replace('당뇨약,', ''); |
|
1287 |
+ setQuestionnaire({ ...questionnaire }); |
|
1288 |
+ } |
|
1289 |
+ } |
|
1290 |
+ } |
|
1291 |
+ /> |
|
1292 |
+ <label for="pills-2">당뇨약</label> |
|
1260 | 1293 |
|
1261 |
- <input type="checkbox" name="pills" id="pills-3" |
|
1262 |
- checked={questionnaire['medication_pill'].indexOf('고혈압약') > -1} |
|
1263 |
- onChange={(e) => { |
|
1264 |
- if (e.target.checked) { |
|
1265 |
- questionnaire['medication_pill'] += '고혈압약,'; |
|
1266 |
- setQuestionnaire({...questionnaire}); |
|
1267 |
- } else { |
|
1268 |
- questionnaire['medication_pill'] = questionnaire['medication_pill'].replace('고혈압약,', ''); |
|
1269 |
- setQuestionnaire({...questionnaire}); |
|
1270 |
- }} |
|
1271 |
- } |
|
1272 |
- /> |
|
1273 |
- <label for="pills-3">고혈압약</label> |
|
1294 |
+ <input type="checkbox" name="pills" id="pills-3" |
|
1295 |
+ checked={questionnaire['medication_pill'].indexOf('고혈압약') > -1} |
|
1296 |
+ onChange={(e) => { |
|
1297 |
+ if (e.target.checked) { |
|
1298 |
+ questionnaire['medication_pill'] += '고혈압약,'; |
|
1299 |
+ setQuestionnaire({ ...questionnaire }); |
|
1300 |
+ } else { |
|
1301 |
+ questionnaire['medication_pill'] = questionnaire['medication_pill'].replace('고혈압약,', ''); |
|
1302 |
+ setQuestionnaire({ ...questionnaire }); |
|
1303 |
+ } |
|
1304 |
+ } |
|
1305 |
+ } |
|
1306 |
+ /> |
|
1307 |
+ <label for="pills-3">고혈압약</label> |
|
1274 | 1308 |
|
1275 |
- <input type="checkbox" name="pills" id="pills-etc" |
|
1276 |
- checked={questionnaire['medication_pill'].indexOf('기타「」,') > -1} |
|
1277 |
- onChange={(e) => { |
|
1278 |
- if (e.target.checked) { |
|
1279 |
- questionnaire['medication_pill'] += '기타「」,'; |
|
1280 |
- setQuestionnaire({...questionnaire}); |
|
1281 |
- } else { |
|
1282 |
- questionnaire['medication_pill'] = questionnaire['medication_pill'].replace('기타「」,', ''); |
|
1283 |
- questionnaire['medication_pill_etc'] = ''; |
|
1284 |
- setQuestionnaire({...questionnaire}); |
|
1285 |
- }} |
|
1286 |
- } |
|
1287 |
- /> |
|
1288 |
- <label for="pills-etc">기타</label> |
|
1289 |
- <input type="text" style={{width: 'max-content', marginLeft: '1rem'}} |
|
1290 |
- disabled={questionnaire['medication_pill'].indexOf('기타「」,') == -1} |
|
1291 |
- value={questionnaire['medication_pill_etc']} |
|
1292 |
- onChange={(e) => { |
|
1293 |
- questionnaire['medication_pill_etc'] = e.target.value; |
|
1294 |
- setQuestionnaire({...questionnaire}); |
|
1295 |
- }} |
|
1296 |
- /> |
|
1309 |
+ <input type="checkbox" name="pills" id="pills-etc" |
|
1310 |
+ checked={questionnaire['medication_pill'].indexOf('기타「」,') > -1} |
|
1311 |
+ onChange={(e) => { |
|
1312 |
+ if (e.target.checked) { |
|
1313 |
+ questionnaire['medication_pill'] += '기타「」,'; |
|
1314 |
+ setQuestionnaire({ ...questionnaire }); |
|
1315 |
+ } else { |
|
1316 |
+ questionnaire['medication_pill'] = questionnaire['medication_pill'].replace('기타「」,', ''); |
|
1317 |
+ questionnaire['medication_pill_etc'] = ''; |
|
1318 |
+ setQuestionnaire({ ...questionnaire }); |
|
1319 |
+ } |
|
1320 |
+ } |
|
1321 |
+ } |
|
1322 |
+ /> |
|
1323 |
+ <label for="pills-etc">기타</label> |
|
1324 |
+ <input type="text" style={{ width: 'max-content', marginLeft: '1rem' }} |
|
1325 |
+ disabled={questionnaire['medication_pill'].indexOf('기타「」,') == -1} |
|
1326 |
+ value={questionnaire['medication_pill_etc']} |
|
1327 |
+ onChange={(e) => { |
|
1328 |
+ questionnaire['medication_pill_etc'] = e.target.value; |
|
1329 |
+ setQuestionnaire({ ...questionnaire }); |
|
1330 |
+ }} |
|
1331 |
+ /> |
|
1297 | 1332 |
|
1298 |
- </td> |
|
1299 |
- </tr> |
|
1300 |
- </table> |
|
1301 |
- </div> |
|
1302 |
- <div className="flex-center"> |
|
1303 |
- {CommonUtil.isEmpty(questionnaire['questionnaire_record_idx']) |
|
1304 |
- ? <button className="btn-small red-btn" onClick={questionnaireInsert}>저장</button> |
|
1305 |
- : <button className="btn-small red-btn" onClick={questionnaireUpdate}>저장</button> |
|
1306 |
- } |
|
1307 |
- </div> |
|
1308 |
- </div> |
|
1309 |
- </Modal> |
|
1333 |
+ </td> |
|
1334 |
+ </tr> |
|
1335 |
+ </table> |
|
1336 |
+ </div> |
|
1337 |
+ <div className="flex-center"> |
|
1338 |
+ {CommonUtil.isEmpty(questionnaire['questionnaire_record_idx']) |
|
1339 |
+ ? <button className="btn-small red-btn" onClick={questionnaireInsert}>저장</button> |
|
1340 |
+ : <button className="btn-small red-btn" onClick={questionnaireUpdate}>저장</button> |
|
1341 |
+ } |
|
1342 |
+ </div> |
|
1343 |
+ </div> |
|
1344 |
+ </Modal> |
|
1310 | 1345 |
|
1311 | 1346 |
|
1312 |
- <Modal open={modalOpen2} close={closeModal2} header="내원기록 관리 및 조회"> |
|
1313 |
- <div className="board-wrap"> |
|
1314 |
- <table className="margin-bottom2 senior-insert "> |
|
1315 |
- <tr> |
|
1316 |
- <th>진료 일자</th> |
|
1317 |
- <td> |
|
1318 |
- <input type="date" |
|
1319 |
- value={hospitalMedicalRecord['medical_date']} |
|
1320 |
- onChange={(e) => { |
|
1321 |
- hospitalMedicalRecord['medical_date'] = e.target.value; |
|
1322 |
- setHospitalMedicalRecord({...hospitalMedicalRecord}); |
|
1323 |
- }} |
|
1324 |
- ref={el => hospitalMedicalRecordRef.current['medical_date'] = el} |
|
1325 |
- /> |
|
1326 |
- </td> |
|
1327 |
- </tr> |
|
1328 |
- <tr> |
|
1329 |
- <th>진료 사유</th> |
|
1330 |
- <td className="flex-start "> |
|
1331 |
- <input type="text" |
|
1332 |
- value={hospitalMedicalRecord['medical_reason']} |
|
1333 |
- onChange={(e) => { |
|
1334 |
- hospitalMedicalRecord['medical_reason'] = e.target.value; |
|
1335 |
- setHospitalMedicalRecord({...hospitalMedicalRecord}); |
|
1336 |
- }} |
|
1337 |
- ref={el => hospitalMedicalRecordRef.current['medical_reason'] = el} |
|
1338 |
- /> |
|
1339 |
- </td> |
|
1340 |
- </tr> |
|
1341 |
- <tr> |
|
1342 |
- <th>진료 내용</th> |
|
1343 |
- <td colSpan={3}> |
|
1344 |
- <textarea className="medicine" cols="30" rows="2" |
|
1345 |
- value={hospitalMedicalRecord['medical_content']} |
|
1346 |
- onChange={(e) => { |
|
1347 |
- hospitalMedicalRecord['medical_content'] = e.target.value; |
|
1348 |
- setHospitalMedicalRecord({...hospitalMedicalRecord}); |
|
1349 |
- }} |
|
1350 |
- ref={el => hospitalMedicalRecordRef.current['medical_content'] = el} |
|
1351 |
- ></textarea> |
|
1352 |
- </td> |
|
1353 |
- </tr> |
|
1354 |
- </table> |
|
1355 |
- <div className="btn-wrap flex-center margin-bottom5"> |
|
1356 |
- {CommonUtil.isEmpty(hospitalMedicalRecord['medical_record_idx']) |
|
1357 |
- ? <button className="btn-small red-btn" onClick={hospitalMedicalRecordInsert}>등록</button> |
|
1358 |
- |
|
1359 |
- : <> |
|
1360 |
- <button className="btn-small gray-btn" onClick={setHospitalMedicalRecordInit}>수정취소</button> |
|
1361 |
- <button className="btn-small red-btn" onClick={hospitalMedicalRecordUpdate}>수정</button> |
|
1362 |
- <button className="btn-small red-btn" onClick={hospitalMedicalRecordDelete}>삭제</button> |
|
1363 |
- </> |
|
1364 |
- } |
|
1365 |
- </div> |
|
1366 |
- <div> |
|
1367 |
- <table className="caregiver-user senior-insert senior-table"> |
|
1368 |
- <thead> |
|
1369 |
- <tr> |
|
1370 |
- <th>No</th> |
|
1371 |
- <th>진료 일자</th> |
|
1372 |
- <th>진료 사유</th> |
|
1373 |
- <th>진료 내용</th> |
|
1374 |
- <th>기록 작성자</th> |
|
1375 |
- </tr> |
|
1376 |
- </thead> |
|
1377 |
- <tbody> |
|
1378 |
- {hospitalMedicalRecordList.hospitalMedicalRecordList.map((item, idx) => { return ( |
|
1379 |
- <tr key={idx} onClick={() => {setHospitalMedicalRecord(item)}}> |
|
1380 |
- <td data-label="No">{hospitalMedicalRecordList.hospitalMedicalRecordListCount - idx - (hospitalMedicalRecordList.search.currentPage - 1) * hospitalMedicalRecordList.search.perPage}</td> |
|
1381 |
- <td data-label="진료 일자">{item['medical_date']}</td> |
|
1382 |
- <td data-label="진료 내용">{item['medical_reason']}</td> |
|
1383 |
- <td data-label="진료 사유">{item['medical_content']}</td> |
|
1384 |
- <td data-label="기록 작성자">{item['insert_user_name']}</td> |
|
1385 |
- </tr> |
|
1386 |
- )})} |
|
1387 |
- {CommonUtil.isEmpty(hospitalMedicalRecordList.hospitalMedicalRecordList) ? |
|
1388 |
- <tr> |
|
1389 |
- <td colSpan={5}>조회된 데이터가 없습니다</td> |
|
1390 |
- </tr> |
|
1391 |
- : null} |
|
1392 |
- </tbody> |
|
1393 |
- </table> |
|
1394 |
- <Pagination |
|
1395 |
- currentPage={hospitalMedicalRecordList.search.currentPage} |
|
1396 |
- perPage={hospitalMedicalRecordList.search.perPage} |
|
1397 |
- totalCount={hospitalMedicalRecordList.hospitalMedicalRecordListCount} |
|
1398 |
- maxRange={5} |
|
1399 |
- click={hospitalMedicalRecordSelectList} |
|
1400 |
- /> |
|
1401 |
- </div> |
|
1402 |
- </div> |
|
1403 |
- </Modal> |
|
1347 |
+ <Modal open={modalOpen2} close={closeModal2} header="내원기록 관리 및 조회"> |
|
1348 |
+ <div className="board-wrap"> |
|
1349 |
+ <table className="margin-bottom2 senior-insert "> |
|
1350 |
+ <tr> |
|
1351 |
+ <th>진료 일자</th> |
|
1352 |
+ <td> |
|
1353 |
+ <input type="date" |
|
1354 |
+ onKeyDown={function (e) { e.preventDefault() }} |
|
1355 |
+ value={hospitalMedicalRecord['medical_date']} |
|
1356 |
+ onChange={(e) => { |
|
1357 |
+ hospitalMedicalRecord['medical_date'] = e.target.value; |
|
1358 |
+ setHospitalMedicalRecord({ ...hospitalMedicalRecord }); |
|
1359 |
+ }} |
|
1360 |
+ ref={el => hospitalMedicalRecordRef.current['medical_date'] = el} |
|
1361 |
+ /> |
|
1362 |
+ </td> |
|
1363 |
+ </tr> |
|
1364 |
+ <tr> |
|
1365 |
+ <th>진료 사유</th> |
|
1366 |
+ <td className="flex-start "> |
|
1367 |
+ <input type="text" |
|
1368 |
+ value={hospitalMedicalRecord['medical_reason']} |
|
1369 |
+ onChange={(e) => { |
|
1370 |
+ hospitalMedicalRecord['medical_reason'] = e.target.value; |
|
1371 |
+ setHospitalMedicalRecord({ ...hospitalMedicalRecord }); |
|
1372 |
+ }} |
|
1373 |
+ ref={el => hospitalMedicalRecordRef.current['medical_reason'] = el} |
|
1374 |
+ /> |
|
1375 |
+ </td> |
|
1376 |
+ </tr> |
|
1377 |
+ <tr> |
|
1378 |
+ <th>진료 내용</th> |
|
1379 |
+ <td colSpan={3}> |
|
1380 |
+ <textarea className="medicine" cols="30" rows="2" |
|
1381 |
+ value={hospitalMedicalRecord['medical_content']} |
|
1382 |
+ onChange={(e) => { |
|
1383 |
+ hospitalMedicalRecord['medical_content'] = e.target.value; |
|
1384 |
+ setHospitalMedicalRecord({ ...hospitalMedicalRecord }); |
|
1385 |
+ }} |
|
1386 |
+ ref={el => hospitalMedicalRecordRef.current['medical_content'] = el} |
|
1387 |
+ ></textarea> |
|
1388 |
+ </td> |
|
1389 |
+ </tr> |
|
1390 |
+ </table> |
|
1391 |
+ <div className="btn-wrap flex-center margin-bottom5"> |
|
1392 |
+ {CommonUtil.isEmpty(hospitalMedicalRecord['medical_record_idx']) |
|
1393 |
+ ? <button className="btn-small red-btn" onClick={hospitalMedicalRecordInsert}>등록</button> |
|
1394 |
+ |
|
1395 |
+ : <> |
|
1396 |
+ <button className="btn-small gray-btn" onClick={setHospitalMedicalRecordInit}>수정취소</button> |
|
1397 |
+ <button className="btn-small red-btn" onClick={hospitalMedicalRecordUpdate}>수정</button> |
|
1398 |
+ <button className="btn-small red-btn" onClick={hospitalMedicalRecordDelete}>삭제</button> |
|
1399 |
+ </> |
|
1400 |
+ } |
|
1401 |
+ </div> |
|
1402 |
+ <div> |
|
1403 |
+ <table className="caregiver-user senior-insert senior-table"> |
|
1404 |
+ <thead> |
|
1405 |
+ <tr> |
|
1406 |
+ <th>No</th> |
|
1407 |
+ <th>진료 일자</th> |
|
1408 |
+ <th>진료 사유</th> |
|
1409 |
+ <th>진료 내용</th> |
|
1410 |
+ <th>기록 작성자</th> |
|
1411 |
+ </tr> |
|
1412 |
+ </thead> |
|
1413 |
+ <tbody> |
|
1414 |
+ {hospitalMedicalRecordList.hospitalMedicalRecordList.map((item, idx) => { |
|
1415 |
+ return ( |
|
1416 |
+ <tr key={idx} onClick={() => { setHospitalMedicalRecord(item) }}> |
|
1417 |
+ <td data-label="No">{hospitalMedicalRecordList.hospitalMedicalRecordListCount - idx - (hospitalMedicalRecordList.search.currentPage - 1) * hospitalMedicalRecordList.search.perPage}</td> |
|
1418 |
+ <td data-label="진료 일자">{item['medical_date']}</td> |
|
1419 |
+ <td data-label="진료 내용">{item['medical_reason']}</td> |
|
1420 |
+ <td data-label="진료 사유">{item['medical_content']}</td> |
|
1421 |
+ <td data-label="기록 작성자">{item['insert_user_name']}</td> |
|
1422 |
+ </tr> |
|
1423 |
+ ) |
|
1424 |
+ })} |
|
1425 |
+ {CommonUtil.isEmpty(hospitalMedicalRecordList.hospitalMedicalRecordList) ? |
|
1426 |
+ <tr> |
|
1427 |
+ <td colSpan={5}>조회된 데이터가 없습니다</td> |
|
1428 |
+ </tr> |
|
1429 |
+ : null} |
|
1430 |
+ </tbody> |
|
1431 |
+ </table> |
|
1432 |
+ <Pagination |
|
1433 |
+ currentPage={hospitalMedicalRecordList.search.currentPage} |
|
1434 |
+ perPage={hospitalMedicalRecordList.search.perPage} |
|
1435 |
+ totalCount={hospitalMedicalRecordList.hospitalMedicalRecordListCount} |
|
1436 |
+ maxRange={5} |
|
1437 |
+ click={hospitalMedicalRecordSelectList} |
|
1438 |
+ /> |
|
1439 |
+ </div> |
|
1440 |
+ </div> |
|
1441 |
+ </Modal> |
|
1404 | 1442 |
|
1405 | 1443 |
|
1406 |
- <Modal open={modalOpen3} close={closeModal3} header="심전도판독소견 관리 및 조회"> |
|
1407 |
- <div className="board-wrap"> |
|
1408 |
- <table className="margin-bottom2 senior-insert "> |
|
1409 |
- <tr> |
|
1410 |
- <th>측정 일자</th> |
|
1411 |
- <td colSpan={5}> |
|
1412 |
- <input type="date" value={ecg['ecg_reading_date']} |
|
1413 |
- onChange={(e) => { |
|
1414 |
- ecg['ecg_reading_date'] = e.target.value; |
|
1415 |
- setEcg({...ecg}); |
|
1416 |
- }} |
|
1417 |
- ref={el => ecgRef.current['ecg_reading_date'] = el} |
|
1418 |
- /> |
|
1419 |
- </td> |
|
1420 |
- </tr> |
|
1421 |
- <tr> |
|
1422 |
- <th>판독 소견 종류</th> |
|
1423 |
- <td colSpan={5}> |
|
1424 |
- <input type="text" value={ecg['ecg_finding_type']} |
|
1425 |
- onChange={(e) => { |
|
1426 |
- ecg['ecg_finding_type'] = e.target.value; |
|
1427 |
- setEcg({...ecg}); |
|
1428 |
- }} |
|
1429 |
- ref={el => ecgRef.current['ecg_finding_type'] = el} |
|
1430 |
- /> |
|
1431 |
- </td> |
|
1432 |
- </tr> |
|
1433 |
- <tr> |
|
1434 |
- <th>판독 소견 내용</th> |
|
1435 |
- <td colSpan={5}> |
|
1436 |
- <textarea className="medicine" cols="30" rows="2" |
|
1437 |
- value={ecg['ecg_finding_content']} |
|
1438 |
- onChange={(e) => { |
|
1439 |
- ecg['ecg_finding_content'] = e.target.value; |
|
1440 |
- setEcg({...ecg}); |
|
1441 |
- }} |
|
1442 |
- ref={el => ecgRef.current['ecg_finding_content'] = el} |
|
1443 |
- ></textarea> |
|
1444 |
- </td> |
|
1445 |
- </tr> |
|
1446 |
- {ecg.isEdit == false |
|
1447 |
- ? <tr> |
|
1448 |
- <th>측정 파일</th> |
|
1449 |
- <td colSpan={5}> |
|
1450 |
- <CommonFile commonFileList={ecg['commonFileList']} multiple={false} accept={'.dat, .ecg'}/> |
|
1451 |
- </td> |
|
1452 |
- </tr> |
|
1453 |
- : <> |
|
1454 |
- <tr> |
|
1455 |
- <th>서맥 횟수</th> |
|
1456 |
- <td> |
|
1457 |
- <input type="number" value={ecg['bradycardia_count']} |
|
1458 |
- onChange={(e) => { |
|
1459 |
- ecg['bradycardia_count'] = e.target.value; |
|
1460 |
- setEcg({...ecg}); |
|
1461 |
- }} |
|
1462 |
- ref={el => ecgRef.current['bradycardia_count'] = el} |
|
1463 |
- /> |
|
1464 |
- </td> |
|
1465 |
- <th>빈맥 횟수</th> |
|
1466 |
- <td> |
|
1467 |
- <input type="number" value={ecg['tachycardia_count']} |
|
1468 |
- onChange={(e) => { |
|
1469 |
- ecg['tachycardia_count'] = e.target.value; |
|
1470 |
- setEcg({...ecg}); |
|
1471 |
- }} |
|
1472 |
- ref={el => ecgRef.current['tachycardia_count'] = el} |
|
1473 |
- /> |
|
1474 |
- </td> |
|
1475 |
- <th>이상 심박수</th> |
|
1476 |
- <td> |
|
1477 |
- <input type="number" value={ecg['abnormal_heart_rate']} |
|
1478 |
- onChange={(e) => { |
|
1479 |
- ecg['abnormal_heart_rate'] = e.target.value; |
|
1480 |
- setEcg({...ecg}); |
|
1481 |
- }} |
|
1482 |
- ref={el => ecgRef.current['abnormal_heart_rate'] = el} |
|
1483 |
- /> |
|
1484 |
- </td> |
|
1485 |
- </tr> |
|
1486 |
- <tr> |
|
1487 |
- <th>최대 심박수</th> |
|
1488 |
- <td> |
|
1489 |
- <input type="number" value={ecg['max_heart_rate']} |
|
1490 |
- onChange={(e) => { |
|
1491 |
- ecg['max_heart_rate'] = e.target.value; |
|
1492 |
- setEcg({...ecg}); |
|
1493 |
- }} |
|
1494 |
- ref={el => ecgRef.current['max_heart_rate'] = el} |
|
1495 |
- /> |
|
1496 |
- </td> |
|
1497 |
- <th>최소 심박수</th> |
|
1498 |
- <td> |
|
1499 |
- <input type="number" value={ecg['min_heart_rate']} |
|
1500 |
- onChange={(e) => { |
|
1501 |
- ecg['min_heart_rate'] = e.target.value; |
|
1502 |
- setEcg({...ecg}); |
|
1503 |
- }} |
|
1504 |
- ref={el => ecgRef.current['min_heart_rate'] = el} |
|
1505 |
- /> |
|
1506 |
- </td> |
|
1507 |
- <th>평균 심박수</th> |
|
1508 |
- <td> |
|
1509 |
- <input type="number" value={ecg['average_heart_rate']} |
|
1510 |
- onChange={(e) => { |
|
1511 |
- ecg['average_heart_rate'] = e.target.value; |
|
1512 |
- setEcg({...ecg}); |
|
1513 |
- }} |
|
1514 |
- ref={el => ecgRef.current['average_heart_rate'] = el} |
|
1515 |
- /> |
|
1516 |
- </td> |
|
1517 |
- </tr> |
|
1518 |
- <tr> |
|
1519 |
- <th>최대 R-R</th> |
|
1520 |
- <td> |
|
1521 |
- <input type="number" value={ecg['max_rr']} |
|
1522 |
- onChange={(e) => { |
|
1523 |
- ecg['max_rr'] = e.target.value; |
|
1524 |
- setEcg({...ecg}); |
|
1525 |
- }} |
|
1526 |
- ref={el => ecgRef.current['max_rr'] = el} |
|
1527 |
- /> |
|
1528 |
- </td> |
|
1529 |
- <th>최소 R-R</th> |
|
1530 |
- <td> |
|
1531 |
- <input type="number" value={ecg['min_rr']} |
|
1532 |
- onChange={(e) => { |
|
1533 |
- ecg['min_rr'] = e.target.value; |
|
1534 |
- setEcg({...ecg}); |
|
1535 |
- }} |
|
1536 |
- ref={el => ecgRef.current['min_rr'] = el} |
|
1537 |
- /> |
|
1538 |
- </td> |
|
1539 |
- <th>평균 R-R</th> |
|
1540 |
- <td> |
|
1541 |
- <input type="number" value={ecg['average_rr']} |
|
1542 |
- onChange={(e) => { |
|
1543 |
- ecg['average_rr'] = e.target.value; |
|
1544 |
- setEcg({...ecg}); |
|
1545 |
- }} |
|
1546 |
- ref={el => ecgRef.current['average_rr'] = el} |
|
1547 |
- /> |
|
1548 |
- </td> |
|
1549 |
- </tr> |
|
1550 |
- </>} |
|
1551 |
- </table> |
|
1552 |
- <div className="btn-wrap flex-center margin-bottom5"> |
|
1553 |
- {CommonUtil.isEmpty(ecg['ecg_record_idx']) |
|
1554 |
- ? <button className="btn-small red-btn" onClick={ecgInsert}>등록</button> |
|
1555 |
- : <> |
|
1556 |
- <button className="btn-small gray-btn" onClick={setEcgInit}>수정취소</button> |
|
1557 |
- <button className="btn-small red-btn" onClick={ecgUpdate}>수정</button> |
|
1558 |
- <button className="btn-small red-btn" onClick={ecgDelete}>삭제</button> |
|
1559 |
- </> |
|
1560 |
- } |
|
1561 |
- </div> |
|
1562 |
- <div> |
|
1563 |
- <table className="caregiver-user senior-table"> |
|
1564 |
- <thead> |
|
1565 |
- <tr> |
|
1566 |
- <th>No</th> |
|
1567 |
- <th>소견 작성 일자</th> |
|
1568 |
- <th>판독 소견 종류</th> |
|
1569 |
- <th>소견 작성자</th> |
|
1570 |
- </tr> |
|
1571 |
- </thead> |
|
1572 |
- <tbody> |
|
1573 |
- {ecgList.ecgList.map((item, idx) => { return ( |
|
1574 |
- <tr key={idx} onClick={() => {item.isEdit = false; setEcg(item);}}> |
|
1575 |
- <td data-label="No">{ecgList.ecgListCount - idx - (ecgList.search.currentPage - 1) * ecgList.search.perPage}</td> |
|
1576 |
- <td data-label="소견 작성 일자">{item['ecg_reading_date']}</td> |
|
1577 |
- <td data-label="판독 소견 종류">{item['ecg_finding_type']}</td> |
|
1578 |
- <td data-label="소견 작성자">{item['insert_user_name']}</td> |
|
1579 |
- </tr> |
|
1580 |
- )})} |
|
1581 |
- {CommonUtil.isEmpty(ecgList.ecgList) ? |
|
1582 |
- <tr> |
|
1583 |
- <td colSpan={4}>조회된 데이터가 없습니다</td> |
|
1584 |
- </tr> |
|
1585 |
- : null} |
|
1586 |
- </tbody> |
|
1587 |
- </table> |
|
1588 |
- <Pagination |
|
1589 |
- currentPage={ecgList.search.currentPage} |
|
1590 |
- perPage={ecgList.search.perPage} |
|
1591 |
- totalCount={ecgList.ecgListCount} |
|
1592 |
- maxRange={5} |
|
1593 |
- click={ecgSelectList} |
|
1594 |
- /> |
|
1595 |
- </div> |
|
1596 |
- </div> |
|
1597 |
- </Modal> |
|
1444 |
+ <Modal open={modalOpen3} close={closeModal3} header="심전도판독소견 관리 및 조회"> |
|
1445 |
+ <div className="board-wrap"> |
|
1446 |
+ <table className="margin-bottom2 senior-insert "> |
|
1447 |
+ <tr> |
|
1448 |
+ <th>측정 일자</th> |
|
1449 |
+ <td colSpan={5}> |
|
1450 |
+ <input type="date" |
|
1451 |
+ onKeyDown={function (e) { e.preventDefault() }} |
|
1452 |
+ value={ecg['ecg_reading_date']} |
|
1453 |
+ onChange={(e) => { |
|
1454 |
+ ecg['ecg_reading_date'] = e.target.value; |
|
1455 |
+ setEcg({ ...ecg }); |
|
1456 |
+ }} |
|
1457 |
+ ref={el => ecgRef.current['ecg_reading_date'] = el} |
|
1458 |
+ /> |
|
1459 |
+ </td> |
|
1460 |
+ </tr> |
|
1461 |
+ <tr> |
|
1462 |
+ <th>판독 소견 종류</th> |
|
1463 |
+ <td colSpan={5}> |
|
1464 |
+ <input type="text" value={ecg['ecg_finding_type']} |
|
1465 |
+ onChange={(e) => { |
|
1466 |
+ ecg['ecg_finding_type'] = e.target.value; |
|
1467 |
+ setEcg({ ...ecg }); |
|
1468 |
+ }} |
|
1469 |
+ ref={el => ecgRef.current['ecg_finding_type'] = el} |
|
1470 |
+ /> |
|
1471 |
+ </td> |
|
1472 |
+ </tr> |
|
1473 |
+ <tr> |
|
1474 |
+ <th>판독 소견 내용</th> |
|
1475 |
+ <td colSpan={5}> |
|
1476 |
+ <textarea className="medicine" cols="30" rows="2" |
|
1477 |
+ value={ecg['ecg_finding_content']} |
|
1478 |
+ onChange={(e) => { |
|
1479 |
+ ecg['ecg_finding_content'] = e.target.value; |
|
1480 |
+ setEcg({ ...ecg }); |
|
1481 |
+ }} |
|
1482 |
+ ref={el => ecgRef.current['ecg_finding_content'] = el} |
|
1483 |
+ ></textarea> |
|
1484 |
+ </td> |
|
1485 |
+ </tr> |
|
1486 |
+ {ecg.isEdit == false |
|
1487 |
+ ? <tr> |
|
1488 |
+ <th>측정 파일</th> |
|
1489 |
+ <td colSpan={5}> |
|
1490 |
+ <CommonFile commonFileList={ecg['commonFileList']} multiple={false} accept={'.dat, .ecg'} /> |
|
1491 |
+ </td> |
|
1492 |
+ </tr> |
|
1493 |
+ : <> |
|
1494 |
+ <tr> |
|
1495 |
+ <th>서맥 횟수</th> |
|
1496 |
+ <td> |
|
1497 |
+ <input type="number" value={ecg['bradycardia_count']} |
|
1498 |
+ onChange={(e) => { |
|
1499 |
+ ecg['bradycardia_count'] = e.target.value; |
|
1500 |
+ setEcg({ ...ecg }); |
|
1501 |
+ }} |
|
1502 |
+ ref={el => ecgRef.current['bradycardia_count'] = el} |
|
1503 |
+ /> |
|
1504 |
+ </td> |
|
1505 |
+ <th>빈맥 횟수</th> |
|
1506 |
+ <td> |
|
1507 |
+ <input type="number" value={ecg['tachycardia_count']} |
|
1508 |
+ onChange={(e) => { |
|
1509 |
+ ecg['tachycardia_count'] = e.target.value; |
|
1510 |
+ setEcg({ ...ecg }); |
|
1511 |
+ }} |
|
1512 |
+ ref={el => ecgRef.current['tachycardia_count'] = el} |
|
1513 |
+ /> |
|
1514 |
+ </td> |
|
1515 |
+ <th>이상 심박수</th> |
|
1516 |
+ <td> |
|
1517 |
+ <input type="number" value={ecg['abnormal_heart_rate']} |
|
1518 |
+ onChange={(e) => { |
|
1519 |
+ ecg['abnormal_heart_rate'] = e.target.value; |
|
1520 |
+ setEcg({ ...ecg }); |
|
1521 |
+ }} |
|
1522 |
+ ref={el => ecgRef.current['abnormal_heart_rate'] = el} |
|
1523 |
+ /> |
|
1524 |
+ </td> |
|
1525 |
+ </tr> |
|
1526 |
+ <tr> |
|
1527 |
+ <th>최대 심박수</th> |
|
1528 |
+ <td> |
|
1529 |
+ <input type="number" value={ecg['max_heart_rate']} |
|
1530 |
+ onChange={(e) => { |
|
1531 |
+ ecg['max_heart_rate'] = e.target.value; |
|
1532 |
+ setEcg({ ...ecg }); |
|
1533 |
+ }} |
|
1534 |
+ ref={el => ecgRef.current['max_heart_rate'] = el} |
|
1535 |
+ /> |
|
1536 |
+ </td> |
|
1537 |
+ <th>최소 심박수</th> |
|
1538 |
+ <td> |
|
1539 |
+ <input type="number" value={ecg['min_heart_rate']} |
|
1540 |
+ onChange={(e) => { |
|
1541 |
+ ecg['min_heart_rate'] = e.target.value; |
|
1542 |
+ setEcg({ ...ecg }); |
|
1543 |
+ }} |
|
1544 |
+ ref={el => ecgRef.current['min_heart_rate'] = el} |
|
1545 |
+ /> |
|
1546 |
+ </td> |
|
1547 |
+ <th>평균 심박수</th> |
|
1548 |
+ <td> |
|
1549 |
+ <input type="number" value={ecg['average_heart_rate']} |
|
1550 |
+ onChange={(e) => { |
|
1551 |
+ ecg['average_heart_rate'] = e.target.value; |
|
1552 |
+ setEcg({ ...ecg }); |
|
1553 |
+ }} |
|
1554 |
+ ref={el => ecgRef.current['average_heart_rate'] = el} |
|
1555 |
+ /> |
|
1556 |
+ </td> |
|
1557 |
+ </tr> |
|
1558 |
+ <tr> |
|
1559 |
+ <th>최대 R-R</th> |
|
1560 |
+ <td> |
|
1561 |
+ <input type="number" value={ecg['max_rr']} |
|
1562 |
+ onChange={(e) => { |
|
1563 |
+ ecg['max_rr'] = e.target.value; |
|
1564 |
+ setEcg({ ...ecg }); |
|
1565 |
+ }} |
|
1566 |
+ ref={el => ecgRef.current['max_rr'] = el} |
|
1567 |
+ /> |
|
1568 |
+ </td> |
|
1569 |
+ <th>최소 R-R</th> |
|
1570 |
+ <td> |
|
1571 |
+ <input type="number" value={ecg['min_rr']} |
|
1572 |
+ onChange={(e) => { |
|
1573 |
+ ecg['min_rr'] = e.target.value; |
|
1574 |
+ setEcg({ ...ecg }); |
|
1575 |
+ }} |
|
1576 |
+ ref={el => ecgRef.current['min_rr'] = el} |
|
1577 |
+ /> |
|
1578 |
+ </td> |
|
1579 |
+ <th>평균 R-R</th> |
|
1580 |
+ <td> |
|
1581 |
+ <input type="number" value={ecg['average_rr']} |
|
1582 |
+ onChange={(e) => { |
|
1583 |
+ ecg['average_rr'] = e.target.value; |
|
1584 |
+ setEcg({ ...ecg }); |
|
1585 |
+ }} |
|
1586 |
+ ref={el => ecgRef.current['average_rr'] = el} |
|
1587 |
+ /> |
|
1588 |
+ </td> |
|
1589 |
+ </tr> |
|
1590 |
+ </>} |
|
1591 |
+ </table> |
|
1592 |
+ <div className="btn-wrap flex-center margin-bottom5"> |
|
1593 |
+ {CommonUtil.isEmpty(ecg['ecg_record_idx']) |
|
1594 |
+ ? <button className="btn-small red-btn" onClick={ecgInsert}>등록</button> |
|
1595 |
+ : <> |
|
1596 |
+ <button className="btn-small gray-btn" onClick={setEcgInit}>수정취소</button> |
|
1597 |
+ <button className="btn-small red-btn" onClick={ecgUpdate}>수정</button> |
|
1598 |
+ <button className="btn-small red-btn" onClick={ecgDelete}>삭제</button> |
|
1599 |
+ </> |
|
1600 |
+ } |
|
1601 |
+ </div> |
|
1602 |
+ <div> |
|
1603 |
+ <table className="caregiver-user senior-table"> |
|
1604 |
+ <thead> |
|
1605 |
+ <tr> |
|
1606 |
+ <th>No</th> |
|
1607 |
+ <th>소견 작성 일자</th> |
|
1608 |
+ <th>판독 소견 종류</th> |
|
1609 |
+ <th>소견 작성자</th> |
|
1610 |
+ </tr> |
|
1611 |
+ </thead> |
|
1612 |
+ <tbody> |
|
1613 |
+ {ecgList.ecgList.map((item, idx) => { |
|
1614 |
+ return ( |
|
1615 |
+ <tr key={idx} onClick={() => { item.isEdit = false; setEcg(item); }}> |
|
1616 |
+ <td data-label="No">{ecgList.ecgListCount - idx - (ecgList.search.currentPage - 1) * ecgList.search.perPage}</td> |
|
1617 |
+ <td data-label="소견 작성 일자">{item['ecg_reading_date']}</td> |
|
1618 |
+ <td data-label="판독 소견 종류">{item['ecg_finding_type']}</td> |
|
1619 |
+ <td data-label="소견 작성자">{item['insert_user_name']}</td> |
|
1620 |
+ </tr> |
|
1621 |
+ ) |
|
1622 |
+ })} |
|
1623 |
+ {CommonUtil.isEmpty(ecgList.ecgList) ? |
|
1624 |
+ <tr> |
|
1625 |
+ <td colSpan={4}>조회된 데이터가 없습니다</td> |
|
1626 |
+ </tr> |
|
1627 |
+ : null} |
|
1628 |
+ </tbody> |
|
1629 |
+ </table> |
|
1630 |
+ <Pagination |
|
1631 |
+ currentPage={ecgList.search.currentPage} |
|
1632 |
+ perPage={ecgList.search.perPage} |
|
1633 |
+ totalCount={ecgList.ecgListCount} |
|
1634 |
+ maxRange={5} |
|
1635 |
+ click={ecgSelectList} |
|
1636 |
+ /> |
|
1637 |
+ </div> |
|
1638 |
+ </div> |
|
1639 |
+ </Modal> |
|
1598 | 1640 |
|
1599 | 1641 |
|
1600 |
- <Modal open={modalOpen4} close={closeModal4} header="혈압측정결과 관리 및 조회"> |
|
1601 |
- <div className="board-wrap"> |
|
1602 |
- <table className="margin-bottom2 senior-insert "> |
|
1603 |
- <tr> |
|
1604 |
- <th>측정일자</th> |
|
1605 |
- <td> |
|
1606 |
- <input type="date" value={bloodPressure['blood_pressure_record_date']} |
|
1607 |
- onChange={(e) => { |
|
1608 |
- bloodPressure['blood_pressure_record_date'] = e.target.value; |
|
1609 |
- setBloodPressure({...bloodPressure}); |
|
1610 |
- }} |
|
1611 |
- ref={el => bloodPressureRef.current['blood_pressure_record_date'] = el} |
|
1612 |
- /> |
|
1613 |
- </td> |
|
1614 |
- </tr> |
|
1615 |
- <tr> |
|
1616 |
- <th>최고혈압</th> |
|
1617 |
- <td> |
|
1618 |
- <input type="number" value={bloodPressure['max_blood_pressure']} |
|
1619 |
- onChange={(e) => { |
|
1620 |
- bloodPressure['max_blood_pressure'] = e.target.value; |
|
1621 |
- setBloodPressure({...bloodPressure}); |
|
1622 |
- }} |
|
1623 |
- ref={el => bloodPressureRef.current['max_blood_pressure'] = el} |
|
1624 |
- /> |
|
1625 |
- </td> |
|
1626 |
- </tr> |
|
1627 |
- <tr> |
|
1628 |
- <th>최저혈압</th> |
|
1629 |
- <td> |
|
1630 |
- <input type="number" value={bloodPressure['min_blood_pressure']} |
|
1631 |
- onChange={(e) => { |
|
1632 |
- bloodPressure['min_blood_pressure'] = e.target.value; |
|
1633 |
- setBloodPressure({...bloodPressure}); |
|
1634 |
- }} |
|
1635 |
- ref={el => bloodPressureRef.current['min_blood_pressure'] = el} |
|
1636 |
- /> |
|
1637 |
- </td> |
|
1638 |
- </tr> |
|
1639 |
- <tr> |
|
1640 |
- <th>맥박수</th> |
|
1641 |
- <td> |
|
1642 |
- <input type="number" value={bloodPressure['pulse_rate']} |
|
1643 |
- onChange={(e) => { |
|
1644 |
- bloodPressure['pulse_rate'] = e.target.value; |
|
1645 |
- setBloodPressure({...bloodPressure}); |
|
1646 |
- }} |
|
1647 |
- ref={el => bloodPressureRef.current['pulse_rate'] = el} |
|
1648 |
- /> |
|
1649 |
- </td> |
|
1650 |
- </tr> |
|
1651 |
- </table> |
|
1652 |
- <div className="btn-wrap flex-center margin-bottom5"> |
|
1653 |
- {CommonUtil.isEmpty(bloodPressure['blood_pressure_record_idx']) |
|
1654 |
- ? <button className="btn-small red-btn" onClick={bloodPressureInsert}>등록</button> |
|
1655 |
- : <> |
|
1656 |
- <button className="btn-small gray-btn" onClick={setBloodPressureInit}>수정취소</button> |
|
1657 |
- <button className="btn-small red-btn" onClick={bloodPressureUpdate}>수정</button> |
|
1658 |
- <button className="btn-small red-btn" onClick={bloodPressureDelete}>삭제</button> |
|
1659 |
- </> |
|
1660 |
- } |
|
1661 |
- </div> |
|
1662 |
- <div> |
|
1663 |
- <table className="caregiver-user senior-insert senior-table"> |
|
1664 |
- <thead> |
|
1665 |
- <tr> |
|
1666 |
- <th>No</th> |
|
1667 |
- <th>기록 작성일</th> |
|
1668 |
- <th>최고 혈압</th> |
|
1669 |
- <th>최저 혈압</th> |
|
1670 |
- <th>맥박수</th> |
|
1671 |
- <th>기록 작성자</th> |
|
1672 |
- </tr> |
|
1673 |
- </thead> |
|
1674 |
- <tbody> |
|
1675 |
- {bloodPressureList.bloodPressureList.map((item, idx) => { return ( |
|
1676 |
- <tr key={idx} onClick={() => {setBloodPressure(item);}}> |
|
1677 |
- <td data-label="No">{bloodPressureList.bloodPressureListCount - idx - (bloodPressureList.search.currentPage - 1) * bloodPressureList.search.perPage}</td> |
|
1678 |
- <td data-label="기록 작성일">{item['blood_pressure_record_date']}</td> |
|
1679 |
- <td data-label="최고 혈압">{item['max_blood_pressure']}</td> |
|
1680 |
- <td data-label="최저 혈압">{item['min_blood_pressure']}</td> |
|
1681 |
- <td data-label="맥박수">{item['pulse_rate']}</td> |
|
1682 |
- <td data-label="기록 작성자">{item['insert_user_name']}</td> |
|
1683 |
- </tr> |
|
1684 |
- )})} |
|
1685 |
- {CommonUtil.isEmpty(bloodPressureList.bloodPressureList) ? |
|
1686 |
- <tr> |
|
1687 |
- <td colSpan={6}>조회된 데이터가 없습니다</td> |
|
1688 |
- </tr> |
|
1689 |
- : null} |
|
1690 |
- </tbody> |
|
1691 |
- </table> |
|
1692 |
- <Pagination |
|
1693 |
- currentPage={bloodPressureList.search.currentPage} |
|
1694 |
- perPage={bloodPressureList.search.perPage} |
|
1695 |
- totalCount={bloodPressureList.bloodPressureListCount} |
|
1696 |
- maxRange={5} |
|
1697 |
- click={bloodPressureSelectList} |
|
1698 |
- /> |
|
1699 |
- </div> |
|
1700 |
- </div> |
|
1701 |
- </Modal> |
|
1702 |
- |
|
1703 |
- </main> |
|
1704 |
- ); |
|
1642 |
+ <Modal open={modalOpen4} close={closeModal4} header="혈압측정결과 관리 및 조회"> |
|
1643 |
+ <div className="board-wrap"> |
|
1644 |
+ <table className="margin-bottom2 senior-insert "> |
|
1645 |
+ <tr> |
|
1646 |
+ <th>측정일자</th> |
|
1647 |
+ <td> |
|
1648 |
+ <input type="date" |
|
1649 |
+ onKeyDown={function (e) { e.preventDefault() }} |
|
1650 |
+ value={bloodPressure['blood_pressure_record_date']} |
|
1651 |
+ onChange={(e) => { |
|
1652 |
+ bloodPressure['blood_pressure_record_date'] = e.target.value; |
|
1653 |
+ setBloodPressure({ ...bloodPressure }); |
|
1654 |
+ }} |
|
1655 |
+ ref={el => bloodPressureRef.current['blood_pressure_record_date'] = el} |
|
1656 |
+ /> |
|
1657 |
+ </td> |
|
1658 |
+ </tr> |
|
1659 |
+ <tr> |
|
1660 |
+ <th>최고혈압</th> |
|
1661 |
+ <td> |
|
1662 |
+ <input type="number" value={bloodPressure['max_blood_pressure']} |
|
1663 |
+ onChange={(e) => { |
|
1664 |
+ bloodPressure['max_blood_pressure'] = e.target.value; |
|
1665 |
+ setBloodPressure({ ...bloodPressure }); |
|
1666 |
+ }} |
|
1667 |
+ ref={el => bloodPressureRef.current['max_blood_pressure'] = el} |
|
1668 |
+ /> |
|
1669 |
+ </td> |
|
1670 |
+ </tr> |
|
1671 |
+ <tr> |
|
1672 |
+ <th>최저혈압</th> |
|
1673 |
+ <td> |
|
1674 |
+ <input type="number" value={bloodPressure['min_blood_pressure']} |
|
1675 |
+ onChange={(e) => { |
|
1676 |
+ bloodPressure['min_blood_pressure'] = e.target.value; |
|
1677 |
+ setBloodPressure({ ...bloodPressure }); |
|
1678 |
+ }} |
|
1679 |
+ ref={el => bloodPressureRef.current['min_blood_pressure'] = el} |
|
1680 |
+ /> |
|
1681 |
+ </td> |
|
1682 |
+ </tr> |
|
1683 |
+ <tr> |
|
1684 |
+ <th>맥박수</th> |
|
1685 |
+ <td> |
|
1686 |
+ <input type="number" value={bloodPressure['pulse_rate']} |
|
1687 |
+ onChange={(e) => { |
|
1688 |
+ bloodPressure['pulse_rate'] = e.target.value; |
|
1689 |
+ setBloodPressure({ ...bloodPressure }); |
|
1690 |
+ }} |
|
1691 |
+ ref={el => bloodPressureRef.current['pulse_rate'] = el} |
|
1692 |
+ /> |
|
1693 |
+ </td> |
|
1694 |
+ </tr> |
|
1695 |
+ </table> |
|
1696 |
+ <div className="btn-wrap flex-center margin-bottom5"> |
|
1697 |
+ {CommonUtil.isEmpty(bloodPressure['blood_pressure_record_idx']) |
|
1698 |
+ ? <button className="btn-small red-btn" onClick={bloodPressureInsert}>등록</button> |
|
1699 |
+ : <> |
|
1700 |
+ <button className="btn-small gray-btn" onClick={setBloodPressureInit}>수정취소</button> |
|
1701 |
+ <button className="btn-small red-btn" onClick={bloodPressureUpdate}>수정</button> |
|
1702 |
+ <button className="btn-small red-btn" onClick={bloodPressureDelete}>삭제</button> |
|
1703 |
+ </> |
|
1704 |
+ } |
|
1705 |
+ </div> |
|
1706 |
+ <div> |
|
1707 |
+ <table className="caregiver-user senior-insert senior-table"> |
|
1708 |
+ <thead> |
|
1709 |
+ <tr> |
|
1710 |
+ <th>No</th> |
|
1711 |
+ <th>기록 작성일</th> |
|
1712 |
+ <th>최고 혈압</th> |
|
1713 |
+ <th>최저 혈압</th> |
|
1714 |
+ <th>맥박수</th> |
|
1715 |
+ <th>기록 작성자</th> |
|
1716 |
+ </tr> |
|
1717 |
+ </thead> |
|
1718 |
+ <tbody> |
|
1719 |
+ {bloodPressureList.bloodPressureList.map((item, idx) => { |
|
1720 |
+ return ( |
|
1721 |
+ <tr key={idx} onClick={() => { setBloodPressure(item); }}> |
|
1722 |
+ <td data-label="No">{bloodPressureList.bloodPressureListCount - idx - (bloodPressureList.search.currentPage - 1) * bloodPressureList.search.perPage}</td> |
|
1723 |
+ <td data-label="기록 작성일">{item['blood_pressure_record_date']}</td> |
|
1724 |
+ <td data-label="최고 혈압">{item['max_blood_pressure']}</td> |
|
1725 |
+ <td data-label="최저 혈압">{item['min_blood_pressure']}</td> |
|
1726 |
+ <td data-label="맥박수">{item['pulse_rate']}</td> |
|
1727 |
+ <td data-label="기록 작성자">{item['insert_user_name']}</td> |
|
1728 |
+ </tr> |
|
1729 |
+ ) |
|
1730 |
+ })} |
|
1731 |
+ {CommonUtil.isEmpty(bloodPressureList.bloodPressureList) ? |
|
1732 |
+ <tr> |
|
1733 |
+ <td colSpan={6}>조회된 데이터가 없습니다</td> |
|
1734 |
+ </tr> |
|
1735 |
+ : null} |
|
1736 |
+ </tbody> |
|
1737 |
+ </table> |
|
1738 |
+ <Pagination |
|
1739 |
+ currentPage={bloodPressureList.search.currentPage} |
|
1740 |
+ perPage={bloodPressureList.search.perPage} |
|
1741 |
+ totalCount={bloodPressureList.bloodPressureListCount} |
|
1742 |
+ maxRange={5} |
|
1743 |
+ click={bloodPressureSelectList} |
|
1744 |
+ /> |
|
1745 |
+ </div> |
|
1746 |
+ </div> |
|
1747 |
+ </Modal> |
|
1748 |
+ </main> |
|
1749 |
+ ); |
|
1705 | 1750 |
} |
--- client/views/pages/healthcare/MedicalcareAdmin.jsx
+++ client/views/pages/healthcare/MedicalcareAdmin.jsx
... | ... | @@ -1345,6 +1345,7 @@ |
1345 | 1345 |
<th>진료 일자</th> |
1346 | 1346 |
<td> |
1347 | 1347 |
<input type="date" |
1348 |
+ onKeyDown={function (e) { e.preventDefault() }} |
|
1348 | 1349 |
value={hospitalMedicalRecord['medical_date']} |
1349 | 1350 |
onChange={(e) => { |
1350 | 1351 |
hospitalMedicalRecord['medical_date'] = e.target.value; |
... | ... | @@ -1440,7 +1441,9 @@ |
1440 | 1441 |
<tr> |
1441 | 1442 |
<th>측정 일자</th> |
1442 | 1443 |
<td colSpan={5}> |
1443 |
- <input type="date" value={ecg['ecg_reading_date']} |
|
1444 |
+ <input type="date" |
|
1445 |
+ onKeyDown={function (e) { e.preventDefault() }} |
|
1446 |
+ value={ecg['ecg_reading_date']} |
|
1444 | 1447 |
onChange={(e) => { |
1445 | 1448 |
ecg['ecg_reading_date'] = e.target.value; |
1446 | 1449 |
setEcg({ ...ecg }); |
... | ... | @@ -1636,7 +1639,9 @@ |
1636 | 1639 |
<tr> |
1637 | 1640 |
<th>측정일자</th> |
1638 | 1641 |
<td> |
1639 |
- <input type="date" value={bloodPressure['blood_pressure_record_date']} |
|
1642 |
+ <input type="date" |
|
1643 |
+ onKeyDown={function (e) { e.preventDefault() }} |
|
1644 |
+ value={bloodPressure['blood_pressure_record_date']} |
|
1640 | 1645 |
onChange={(e) => { |
1641 | 1646 |
bloodPressure['blood_pressure_record_date'] = e.target.value; |
1642 | 1647 |
setBloodPressure({ ...bloodPressure }); |
--- client/views/pages/healthcare/medicinecare/MedicineCareSelectOne.jsx
+++ client/views/pages/healthcare/medicinecare/MedicineCareSelectOne.jsx
... | ... | @@ -120,12 +120,12 @@ |
120 | 120 |
setStackChartData(_stackChartData); |
121 | 121 |
console.log('_stackChartData : ', _stackChartData); |
122 | 122 |
} |
123 |
- |
|
123 |
+ |
|
124 | 124 |
}).catch((error) => { |
125 | 125 |
console.log('seniorMedicationSelectListByDay() /user/seniorMedicationSelectListByDay.json error : ', error); |
126 | 126 |
}); |
127 | 127 |
}; |
128 |
- |
|
128 |
+ |
|
129 | 129 |
|
130 | 130 |
const [modalOpen, setModalOpen] = React.useState(false); |
131 | 131 |
const openModal = () => { |
... | ... | @@ -153,7 +153,8 @@ |
153 | 153 |
<tr> |
154 | 154 |
<th>복용날짜</th> |
155 | 155 |
<td> |
156 |
- <input type="date" name="date" id="date" /> |
|
156 |
+ <input type="date" name="date" id="date" |
|
157 |
+ onKeyDown={function (e) { e.preventDefault() }} /> |
|
157 | 158 |
</td> |
158 | 159 |
</tr> |
159 | 160 |
<tr> |
... | ... | @@ -229,78 +230,78 @@ |
229 | 230 |
<ContentTitle contentTitle={"복약 상세 페이지"} /> |
230 | 231 |
<div className="detail-graph"> |
231 | 232 |
<TableTitle tableTitle={`${senior['user_name']}님의 복약 내역`} />{/* 님의 복약 내역 */} |
232 |
- <Chart1 data={stackChartData}/> |
|
233 |
+ <Chart1 data={stackChartData} /> |
|
233 | 234 |
</div> |
234 |
- {CommonUtil.isEmpty(seniorMedicationListByDay) == false ? |
|
235 |
- <div className="medicine-grid margin-bottom"> |
|
236 |
- <div><SubTitle |
|
237 |
- className="margin-bottom" |
|
238 |
- explanation={"전체 기간 복약률"} |
|
239 |
- color={"#333333"} |
|
240 |
- /> |
|
241 |
- <div |
|
242 |
- style={{ |
|
243 |
- border: "1px solid #eeeeee", |
|
244 |
- borderRadius: "0.5rem", |
|
245 |
- padding: "1rem", |
|
246 |
- height: "20vh", |
|
247 |
- }} |
|
248 |
- > |
|
249 |
- <Donut2 /> |
|
235 |
+ {CommonUtil.isEmpty(seniorMedicationListByDay) == false ? |
|
236 |
+ <div className="medicine-grid margin-bottom"> |
|
237 |
+ <div><SubTitle |
|
238 |
+ className="margin-bottom" |
|
239 |
+ explanation={"전체 기간 복약률"} |
|
240 |
+ color={"#333333"} |
|
241 |
+ /> |
|
242 |
+ <div |
|
243 |
+ style={{ |
|
244 |
+ border: "1px solid #eeeeee", |
|
245 |
+ borderRadius: "0.5rem", |
|
246 |
+ padding: "1rem", |
|
247 |
+ height: "20vh", |
|
248 |
+ }} |
|
249 |
+ > |
|
250 |
+ <Donut2 /> |
|
251 |
+ </div> |
|
252 |
+ </div> |
|
253 |
+ <div><SubTitle |
|
254 |
+ className="margin-bottom" |
|
255 |
+ explanation={"주별 복약율 통계"} |
|
256 |
+ color={"#333333"} |
|
257 |
+ /> |
|
258 |
+ <div |
|
259 |
+ style={{ |
|
260 |
+ border: "1px solid #eeeeee", |
|
261 |
+ borderRadius: "0.5rem", |
|
262 |
+ padding: "1rem", |
|
263 |
+ height: "20vh", |
|
264 |
+ }} |
|
265 |
+ > |
|
266 |
+ <Chart3 /> |
|
267 |
+ </div> |
|
268 |
+ </div> |
|
269 |
+ <div><SubTitle |
|
270 |
+ className="margin-bottom" |
|
271 |
+ explanation={"월별 복약율 통계"} |
|
272 |
+ color={"#333333"} |
|
273 |
+ /> |
|
274 |
+ <div |
|
275 |
+ style={{ |
|
276 |
+ border: "1px solid #eeeeee", |
|
277 |
+ borderRadius: "0.5rem", |
|
278 |
+ padding: "1rem", |
|
279 |
+ height: "20vh", |
|
280 |
+ }} |
|
281 |
+ > |
|
282 |
+ <Chart /> |
|
283 |
+ </div> |
|
284 |
+ </div> |
|
285 |
+ <div><SubTitle |
|
286 |
+ className="margin-bottom" |
|
287 |
+ explanation={"년별 복약율 통계"} |
|
288 |
+ color={"#333333"} |
|
289 |
+ /> |
|
290 |
+ <div |
|
291 |
+ style={{ |
|
292 |
+ border: "1px solid #eeeeee", |
|
293 |
+ borderRadius: "0.5rem", |
|
294 |
+ padding: "1rem", |
|
295 |
+ height: "20vh", |
|
296 |
+ }} |
|
297 |
+ > |
|
298 |
+ <LineColor_medicine /> |
|
299 |
+ </div> |
|
250 | 300 |
</div> |
251 | 301 |
</div> |
252 |
- <div><SubTitle |
|
253 |
- className="margin-bottom" |
|
254 |
- explanation={"주별 복약율 통계"} |
|
255 |
- color={"#333333"} |
|
256 |
- /> |
|
257 |
- <div |
|
258 |
- style={{ |
|
259 |
- border: "1px solid #eeeeee", |
|
260 |
- borderRadius: "0.5rem", |
|
261 |
- padding: "1rem", |
|
262 |
- height: "20vh", |
|
263 |
- }} |
|
264 |
- > |
|
265 |
- <Chart3 /> |
|
266 |
- </div> |
|
267 |
- </div> |
|
268 |
- <div><SubTitle |
|
269 |
- className="margin-bottom" |
|
270 |
- explanation={"월별 복약율 통계"} |
|
271 |
- color={"#333333"} |
|
272 |
- /> |
|
273 |
- <div |
|
274 |
- style={{ |
|
275 |
- border: "1px solid #eeeeee", |
|
276 |
- borderRadius: "0.5rem", |
|
277 |
- padding: "1rem", |
|
278 |
- height: "20vh", |
|
279 |
- }} |
|
280 |
- > |
|
281 |
- <Chart /> |
|
282 |
- </div> |
|
283 |
- </div> |
|
284 |
- <div><SubTitle |
|
285 |
- className="margin-bottom" |
|
286 |
- explanation={"년별 복약율 통계"} |
|
287 |
- color={"#333333"} |
|
288 |
- /> |
|
289 |
- <div |
|
290 |
- style={{ |
|
291 |
- border: "1px solid #eeeeee", |
|
292 |
- borderRadius: "0.5rem", |
|
293 |
- padding: "1rem", |
|
294 |
- height: "20vh", |
|
295 |
- }} |
|
296 |
- > |
|
297 |
- <LineColor_medicine /> |
|
298 |
- </div> |
|
299 |
- </div> |
|
300 |
- </div> |
|
301 |
- : null} |
|
302 |
+ : null} |
|
302 | 303 |
<div className="board-wrap"> |
303 |
- <div style={{maxHeight: '30vh', overflow: 'auto'}}> |
|
304 |
+ <div style={{ maxHeight: '30vh', overflow: 'auto' }}> |
|
304 | 305 |
<table className="margin-bottom2 medicine-detail-table"> |
305 | 306 |
<thead> |
306 | 307 |
<tr> |
... | ... | @@ -312,45 +313,49 @@ |
312 | 313 |
<th rowSpan="2">수정일시</th> |
313 | 314 |
<th rowSpan="2">관리</th> |
314 | 315 |
</tr> |
315 |
- |
|
316 |
+ |
|
316 | 317 |
<tr> |
317 |
- {Object.keys(showMedicationTimeCode).map((key, idx) => { return ( |
|
318 |
- <th>{key}</th> |
|
319 |
- )})} |
|
318 |
+ {Object.keys(showMedicationTimeCode).map((key, idx) => { |
|
319 |
+ return ( |
|
320 |
+ <th>{key}</th> |
|
321 |
+ ) |
|
322 |
+ })} |
|
320 | 323 |
</tr> |
321 | 324 |
|
322 | 325 |
</thead> |
323 | 326 |
<tbody> |
324 |
- {seniorMedicationListByDay.map((item, idx) => { return ( |
|
325 |
- <tr> |
|
326 |
- <td data-label="No">{idx + 1}</td> |
|
327 |
- <td data-label="날짜">{item['medication_default_date']}</td> |
|
328 |
- {Object.keys(showMedicationTimeCode).map((key, idx) => { |
|
329 |
- return CommonUtil.isEmpty(showMedicationTimeCode[key]) == false ? |
|
330 |
- item['medication_time_code_list'].map((code, codeIdx) => { |
|
331 |
- return key == code ? <td>{item['medication_time_code_count_list'][codeIdx]}</td> : null |
|
332 |
- }) : null |
|
333 |
- })} |
|
334 |
- <td data-label="수정 상세 사유">-</td> |
|
335 |
- <td data-label="수정자">-</td> |
|
336 |
- <td data-label="수정일시">-</td> |
|
337 |
- <td data-label="관리"> |
|
338 |
- <div className="btn-wrap flex-center"> |
|
339 |
- <Button |
|
340 |
- className={"btn-small lightgray-btn"} |
|
341 |
- btnName={"수정"} |
|
342 |
- onClick={openModal} |
|
343 |
- /> |
|
344 |
- <Button className={"btn-small gray-btn"} btnName={"삭제"} onClick={function() {alert('정말 삭제하시겠습니까?')}}/> |
|
345 |
- </div> |
|
346 |
- </td> |
|
347 |
- </tr> |
|
348 |
- )})} |
|
327 |
+ {seniorMedicationListByDay.map((item, idx) => { |
|
328 |
+ return ( |
|
329 |
+ <tr> |
|
330 |
+ <td data-label="No">{idx + 1}</td> |
|
331 |
+ <td data-label="날짜">{item['medication_default_date']}</td> |
|
332 |
+ {Object.keys(showMedicationTimeCode).map((key, idx) => { |
|
333 |
+ return CommonUtil.isEmpty(showMedicationTimeCode[key]) == false ? |
|
334 |
+ item['medication_time_code_list'].map((code, codeIdx) => { |
|
335 |
+ return key == code ? <td>{item['medication_time_code_count_list'][codeIdx]}</td> : null |
|
336 |
+ }) : null |
|
337 |
+ })} |
|
338 |
+ <td data-label="수정 상세 사유">-</td> |
|
339 |
+ <td data-label="수정자">-</td> |
|
340 |
+ <td data-label="수정일시">-</td> |
|
341 |
+ <td data-label="관리"> |
|
342 |
+ <div className="btn-wrap flex-center"> |
|
343 |
+ <Button |
|
344 |
+ className={"btn-small lightgray-btn"} |
|
345 |
+ btnName={"수정"} |
|
346 |
+ onClick={openModal} |
|
347 |
+ /> |
|
348 |
+ <Button className={"btn-small gray-btn"} btnName={"삭제"} onClick={function () { alert('정말 삭제하시겠습니까?') }} /> |
|
349 |
+ </div> |
|
350 |
+ </td> |
|
351 |
+ </tr> |
|
352 |
+ ) |
|
353 |
+ })} |
|
349 | 354 |
{CommonUtil.isEmpty(seniorMedicationListByDay) ? |
350 |
- <tr> |
|
351 |
- <td colSpan={6 + Object.keys(showMedicationTimeCode).length}>조회된 데이터가 없습니다</td> |
|
352 |
- </tr> |
|
353 |
- : null} |
|
355 |
+ <tr> |
|
356 |
+ <td colSpan={6 + Object.keys(showMedicationTimeCode).length}>조회된 데이터가 없습니다</td> |
|
357 |
+ </tr> |
|
358 |
+ : null} |
|
354 | 359 |
</tbody> |
355 | 360 |
</table> |
356 | 361 |
</div> |
--- client/views/pages/healthcare/statistics/MedicineStatistics.jsx
+++ client/views/pages/healthcare/statistics/MedicineStatistics.jsx
... | ... | @@ -31,7 +31,8 @@ |
31 | 31 |
> |
32 | 32 |
<div className="flex-end gap"> |
33 | 33 |
<div className="flex flex30"> |
34 |
- <input type="date" name="" id="" /> |
|
34 |
+ <input type="date" name="" id="" |
|
35 |
+ onKeyDown={function (e) { e.preventDefault() }} /> |
|
35 | 36 |
</div> |
36 | 37 |
<div className=""> |
37 | 38 |
<Button className={"gray-btn"} btnName={"검색"} /> |
--- client/views/pages/main/Main_guardian.jsx
+++ client/views/pages/main/Main_guardian.jsx
... | ... | @@ -449,7 +449,9 @@ |
449 | 449 |
<tr> |
450 | 450 |
<th>방문날짜</th> |
451 | 451 |
<td colSpan={3}> |
452 |
- <input type="date" value={visitRecord['visit_date']} |
|
452 |
+ <input type="date" |
|
453 |
+ onKeyDown={function (e) { e.preventDefault() }} |
|
454 |
+ value={visitRecord['visit_date']} |
|
453 | 455 |
onChange={(e) => { |
454 | 456 |
visitRecord['visit_date'] = e.target.value; |
455 | 457 |
setVisitRecord({ ...visitRecord }); |
--- client/views/pages/senior_management/SeniorSelectOne.jsx
+++ client/views/pages/senior_management/SeniorSelectOne.jsx
... | ... | @@ -333,7 +333,7 @@ |
333 | 333 |
const [agent, setAgent] = React.useState({ agentListBySenior: [], agentListCountBySenior: 0 }); |
334 | 334 |
//대상자의 생활보호사 목록 조회 |
335 | 335 |
const agentSelectListBySenior = () => { |
336 |
- |
|
336 |
+ |
|
337 | 337 |
fetch("/user/agentSelectListBySenior.json", { |
338 | 338 |
method: "POST", |
339 | 339 |
headers: { |
... | ... | @@ -494,6 +494,7 @@ |
494 | 494 |
<div className="search-management flex-end margin-bottom2 margin-top"> |
495 | 495 |
<div style={{ width: '120px', fontWeight: '600', fontSize: '16px' }}>대여 시작일</div> |
496 | 496 |
<input type="date" |
497 |
+ onKeyDown={function (e) { e.preventDefault() }} |
|
497 | 498 |
value={equipmentRental['rental_start_date']} |
498 | 499 |
onChange={(e) => { |
499 | 500 |
equipmentRental['rental_start_date'] = e.target.value; |
... | ... | @@ -554,10 +555,12 @@ |
554 | 555 |
<tr> |
555 | 556 |
<th>장비대여종료일</th> |
556 | 557 |
<td> |
557 |
- <input type="date" defaultValue={new Date().toLocaleDateString('en-CA')} onChange={(e) => { |
|
558 |
- console.log('e.target.value : ', e.target.value); |
|
559 |
- setRentalEndDate(e.target.value); |
|
560 |
- }} /> |
|
558 |
+ <input type="date" |
|
559 |
+ onKeyDown={function (e) { e.preventDefault() }} |
|
560 |
+ defaultValue={new Date().toLocaleDateString('en-CA')} onChange={(e) => { |
|
561 |
+ console.log('e.target.value : ', e.target.value); |
|
562 |
+ setRentalEndDate(e.target.value); |
|
563 |
+ }} /> |
|
561 | 564 |
</td> |
562 | 565 |
</tr> |
563 | 566 |
</tbody> |
--- client/views/pages/user_management/AgencyAdminSeniorSelect.jsx
+++ client/views/pages/user_management/AgencyAdminSeniorSelect.jsx
... | ... | @@ -171,7 +171,7 @@ |
171 | 171 |
alert(state.loginUser['title_name'] + "를 선택해 주세요."); |
172 | 172 |
return; |
173 | 173 |
} |
174 |
- var insertBtn = confirm("등록하시겠습니까?"); |
|
174 |
+ var insertBtn = confirm("기존에 배정된 생활지원사가 있는 경우, 기존의 매칭을 종료하고 새로운 생활지원사가 매칭됩니다."); |
|
175 | 175 |
if (insertBtn) { |
176 | 176 |
for (let i = 0; i < CheckList.length; i++) { |
177 | 177 |
agentSeniorInsert(CheckList[i]); |
... | ... | @@ -183,6 +183,8 @@ |
183 | 183 |
|
184 | 184 |
// 생활보호사 배정 |
185 | 185 |
const agentSeniorInsert = (seniorId) => { |
186 |
+ agentSeniorDelete(seniorId); |
|
187 |
+ |
|
186 | 188 |
fetch("/user/agentSeniorInsert.json", { |
187 | 189 |
method: "POST", |
188 | 190 |
headers: { |
... | ... | @@ -202,6 +204,31 @@ |
202 | 204 |
}); |
203 | 205 |
} |
204 | 206 |
|
207 |
+ // 생활보호사 제거 |
|
208 |
+ const agentSeniorDelete = (seniorId) => { |
|
209 |
+ fetch("/user/agentSeniorDelete.json", { |
|
210 |
+ method: "POST", |
|
211 |
+ headers: { |
|
212 |
+ 'Content-Type': 'application/json; charset=UTF-8' |
|
213 |
+ }, |
|
214 |
+ body: JSON.stringify({ |
|
215 |
+ senior_id: seniorId |
|
216 |
+ }), |
|
217 |
+ }).then((response) => response.json()).then((data) => { |
|
218 |
+ console.log("사용자 등록 결과(건수) : ", data); |
|
219 |
+ |
|
220 |
+ if (data > 0) { |
|
221 |
+ console.log("매칭이 종료 되었습니다."); |
|
222 |
+ agentSelectList(); |
|
223 |
+ searching(); |
|
224 |
+ } else { |
|
225 |
+ console.log("매칭 종료에 실패하였습니다."); |
|
226 |
+ } |
|
227 |
+ }).catch((error) => { |
|
228 |
+ console.log('agentSeniorDelete() /user/agentSeniorDelete.json error : ', error); |
|
229 |
+ }); |
|
230 |
+ } |
|
231 |
+ |
|
205 | 232 |
|
206 | 233 |
//시행기관의 삭제 대상자(시니어) |
207 | 234 |
const [agencyDeleteSenior, setAgencyDeleteSenior] = React.useState({ seniorList: [], seniorListCount: 0, search: JSON.parse(JSON.stringify(search)) }); |
--- client/views/pages/visit/visit/VisitInsert.jsx
+++ client/views/pages/visit/visit/VisitInsert.jsx
... | ... | @@ -16,9 +16,9 @@ |
16 | 16 |
return ( |
17 | 17 |
<main> |
18 | 18 |
<div className="content-wrap"> |
19 |
- <ContentTitle contentTitle={"방문 등록"} /> |
|
19 |
+ <ContentTitle contentTitle={"방문 등록"} /> |
|
20 | 20 |
<div className="margin-bottom2 insert flex-align-start"> |
21 |
- <div className="flex30"> |
|
21 |
+ <div className="flex30"> |
|
22 | 22 |
<div className="flex margin-bottom"> |
23 | 23 |
<input |
24 | 24 |
type="text" |
... | ... | @@ -44,44 +44,45 @@ |
44 | 44 |
<tr> |
45 | 45 |
<th>생년월일</th> |
46 | 46 |
<td colSpan={3}> |
47 |
- <input type="text" name="" id="" disabled /> |
|
47 |
+ <input type="text" name="" id="" disabled /> |
|
48 | 48 |
</td> |
49 | 49 |
</tr> |
50 | 50 |
<tr> |
51 | 51 |
<th>성별</th> |
52 | 52 |
<td> |
53 |
- <input type="text" name="" id="" disabled /> |
|
53 |
+ <input type="text" name="" id="" disabled /> |
|
54 | 54 |
</td> |
55 | 55 |
</tr> |
56 | 56 |
<tr> |
57 | 57 |
<th>주소</th> |
58 | 58 |
<td> |
59 |
- <input type="text" name="" id="" disabled /> |
|
59 |
+ <input type="text" name="" id="" disabled /> |
|
60 | 60 |
</td> |
61 | 61 |
</tr> |
62 | 62 |
<tr> |
63 | 63 |
<th>방문날짜</th> |
64 | 64 |
<td colSpan={3}> |
65 |
- <input type="date" name="" id="" /> |
|
65 |
+ <input type="date" name="" id="" |
|
66 |
+ onKeyDown={function (e) { e.preventDefault() }} /> |
|
66 | 67 |
</td> |
67 | 68 |
</tr> |
68 | 69 |
<tr> |
69 | 70 |
<th>방문사유</th> |
70 | 71 |
<td className="flex"> |
71 | 72 |
<div className="flex-start"> |
72 |
- <input type="checkbox" className="flex10"/> |
|
73 |
+ <input type="checkbox" className="flex10" /> |
|
73 | 74 |
<label htmlFor="" className="flex90"> |
74 | 75 |
정기방문 |
75 | 76 |
</label> |
76 | 77 |
</div> |
77 | 78 |
<div className="flex-start"> |
78 |
- <input type="checkbox" className="flex10"/> |
|
79 |
+ <input type="checkbox" className="flex10" /> |
|
79 | 80 |
<label htmlFor="" className="flex90"> |
80 | 81 |
어르신케어 |
81 | 82 |
</label> |
82 | 83 |
</div> |
83 | 84 |
<div className="flex-start"> |
84 |
- <input type="checkbox" className="flex10"/> |
|
85 |
+ <input type="checkbox" className="flex10" /> |
|
85 | 86 |
<label htmlFor="" className="flex90"> |
86 | 87 |
장비점검 |
87 | 88 |
</label> |
... | ... | @@ -91,7 +92,7 @@ |
91 | 92 |
<tr> |
92 | 93 |
<th>방문 상세 사유</th> |
93 | 94 |
<td colSpan={3}> |
94 |
- <textarea style={{height:"225px"}} name="" id="" cols="30" rows="10"></textarea> |
|
95 |
+ <textarea style={{ height: "225px" }} name="" id="" cols="30" rows="10"></textarea> |
|
95 | 96 |
</td> |
96 | 97 |
</tr> |
97 | 98 |
</tbody> |
--- client/views/pages/visit/visit/VisitSelectOne.jsx
+++ client/views/pages/visit/visit/VisitSelectOne.jsx
... | ... | @@ -12,337 +12,341 @@ |
12 | 12 |
import CommonUtil from "../../../../resources/js/CommonUtil.js"; |
13 | 13 |
|
14 | 14 |
export default function VisitSelectOne() { |
15 |
- const navigate = useNavigate(); |
|
16 |
- const location = useLocation(); |
|
15 |
+ const navigate = useNavigate(); |
|
16 |
+ const location = useLocation(); |
|
17 | 17 |
|
18 |
- //전역 변수 저장 객체 |
|
19 |
- const state = useSelector((state) => {return state}); |
|
20 |
- const defaultUserId = CommonUtil.isEmpty(state.loginUser) ? null : state.loginUser['user_id']; |
|
18 |
+ //전역 변수 저장 객체 |
|
19 |
+ const state = useSelector((state) => { return state }); |
|
20 |
+ const defaultUserId = CommonUtil.isEmpty(state.loginUser) ? null : state.loginUser['user_id']; |
|
21 | 21 |
|
22 |
- const [modalOpen, setModalOpen] = React.useState(false); |
|
23 |
- const openModal = () => { |
|
24 |
- setModalOpen(true); |
|
25 |
- }; |
|
26 |
- const closeModal = () => { |
|
27 |
- setModalOpen(false); |
|
28 |
- }; |
|
22 |
+ const [modalOpen, setModalOpen] = React.useState(false); |
|
23 |
+ const openModal = () => { |
|
24 |
+ setModalOpen(true); |
|
25 |
+ }; |
|
26 |
+ const closeModal = () => { |
|
27 |
+ setModalOpen(false); |
|
28 |
+ }; |
|
29 | 29 |
|
30 |
- //시니어 정보 |
|
31 |
- const [senior, setSenior] = React.useState({ |
|
32 |
- 'user_id': location.state['senior_id'], |
|
33 |
- 'user_name': null, |
|
34 |
- 'user_password': null, |
|
35 |
- 'user_phonenumber': null, |
|
36 |
- 'user_birth': null, |
|
37 |
- 'user_gender': null, |
|
38 |
- 'user_address': null, |
|
39 |
- 'user_email': null, |
|
40 |
- 'authority': 'ROLE_SENIOR', |
|
41 |
- 'agency_id': null, |
|
42 |
- 'government_id': null, |
|
30 |
+ //시니어 정보 |
|
31 |
+ const [senior, setSenior] = React.useState({ |
|
32 |
+ 'user_id': location.state['senior_id'], |
|
33 |
+ 'user_name': null, |
|
34 |
+ 'user_password': null, |
|
35 |
+ 'user_phonenumber': null, |
|
36 |
+ 'user_birth': null, |
|
37 |
+ 'user_gender': null, |
|
38 |
+ 'user_address': null, |
|
39 |
+ 'user_email': null, |
|
40 |
+ 'authority': 'ROLE_SENIOR', |
|
41 |
+ 'agency_id': null, |
|
42 |
+ 'government_id': null, |
|
43 | 43 |
|
44 |
- 'senior_id': location.state['senior_id'], |
|
45 |
- 'care_grade': null, |
|
46 |
- 'medication_pill': null, |
|
47 |
- 'underlie_disease': null, |
|
48 |
- 'senior_note': null, |
|
44 |
+ 'senior_id': location.state['senior_id'], |
|
45 |
+ 'care_grade': null, |
|
46 |
+ 'medication_pill': null, |
|
47 |
+ 'underlie_disease': null, |
|
48 |
+ 'senior_note': null, |
|
49 | 49 |
|
50 |
- 'seniorMedicationList': [] |
|
50 |
+ 'seniorMedicationList': [] |
|
51 |
+ }); |
|
52 |
+ //시니어 상세 조회 |
|
53 |
+ const seniorSelectOne = () => { |
|
54 |
+ fetch("/user/seniorSelectOne.json", { |
|
55 |
+ method: "POST", |
|
56 |
+ headers: { |
|
57 |
+ 'Content-Type': 'application/json; charset=UTF-8' |
|
58 |
+ }, |
|
59 |
+ body: JSON.stringify(senior), |
|
60 |
+ }).then((response) => response.json()).then((data) => { |
|
61 |
+ console.log("seniorSelectOne data : ", data); |
|
62 |
+ setSenior(data); |
|
63 |
+ }).catch((error) => { |
|
64 |
+ console.log('seniorSelectOne() /user/seniorSelectOne.json error : ', error); |
|
51 | 65 |
}); |
52 |
- //시니어 상세 조회 |
|
53 |
- const seniorSelectOne = () => { |
|
54 |
- fetch("/user/seniorSelectOne.json", { |
|
55 |
- method: "POST", |
|
56 |
- headers: { |
|
57 |
- 'Content-Type': 'application/json; charset=UTF-8' |
|
58 |
- }, |
|
59 |
- body: JSON.stringify(senior), |
|
60 |
- }).then((response) => response.json()).then((data) => { |
|
61 |
- console.log("seniorSelectOne data : ", data); |
|
62 |
- setSenior(data); |
|
63 |
- }).catch((error) => { |
|
64 |
- console.log('seniorSelectOne() /user/seniorSelectOne.json error : ', error); |
|
65 |
- }); |
|
66 |
- }; |
|
66 |
+ }; |
|
67 | 67 |
|
68 |
- /****************** 방문 기록 (시작) ******************/ |
|
69 |
- const visitRecordInit = { |
|
70 |
- 'senior_id': location.state['senior_id'], |
|
71 |
- 'visit_date': CommonUtil.getDate(), |
|
72 |
- 'visit_reason': null, |
|
73 |
- 'visit_content': null, |
|
74 |
- |
|
75 |
- 'agent_id': defaultUserId, |
|
68 |
+ /****************** 방문 기록 (시작) ******************/ |
|
69 |
+ const visitRecordInit = { |
|
70 |
+ 'senior_id': location.state['senior_id'], |
|
71 |
+ 'visit_date': CommonUtil.getDate(), |
|
72 |
+ 'visit_reason': null, |
|
73 |
+ 'visit_content': null, |
|
76 | 74 |
|
77 |
- isInsert: true, |
|
78 |
- }; |
|
79 |
- //방문 기록 정보 |
|
80 |
- const [visitRecord, setVisitRecord] = React.useState({...visitRecordInit}); |
|
81 |
- const visitRecordRef = React.useRef({...visitRecordInit}); |
|
75 |
+ 'agent_id': defaultUserId, |
|
82 | 76 |
|
83 |
- //방문 기록 유효성 검사 |
|
84 |
- const visitRecordValidation = () => { |
|
85 |
- const target = visitRecord; |
|
86 |
- const targetRef = visitRecordRef; |
|
77 |
+ isInsert: true, |
|
78 |
+ }; |
|
79 |
+ //방문 기록 정보 |
|
80 |
+ const [visitRecord, setVisitRecord] = React.useState({ ...visitRecordInit }); |
|
81 |
+ const visitRecordRef = React.useRef({ ...visitRecordInit }); |
|
87 | 82 |
|
88 |
- if (CommonUtil.isEmpty(target['visit_date']) == true) { |
|
89 |
- targetRef.current['visit_date'].focus(); |
|
90 |
- alert("방문 일자를 선택해 주세요."); |
|
91 |
- return false; |
|
92 |
- } |
|
93 |
- if (CommonUtil.isEmpty(target['visit_reason']) == true) { |
|
94 |
- targetRef.current['visit_reason'].focus(); |
|
95 |
- alert("방문 목적을 선택해 주세요."); |
|
96 |
- return false; |
|
97 |
- } |
|
98 |
- if (CommonUtil.isEmpty(target['visit_content']) == true) { |
|
99 |
- targetRef.current['visit_content'].focus(); |
|
100 |
- alert("방문 상세 사유를 입력해 주세요."); |
|
101 |
- return false; |
|
102 |
- } |
|
83 |
+ //방문 기록 유효성 검사 |
|
84 |
+ const visitRecordValidation = () => { |
|
85 |
+ const target = visitRecord; |
|
86 |
+ const targetRef = visitRecordRef; |
|
103 | 87 |
|
104 |
- return true; |
|
88 |
+ if (CommonUtil.isEmpty(target['visit_date']) == true) { |
|
89 |
+ targetRef.current['visit_date'].focus(); |
|
90 |
+ alert("방문 일자를 선택해 주세요."); |
|
91 |
+ return false; |
|
92 |
+ } |
|
93 |
+ if (CommonUtil.isEmpty(target['visit_reason']) == true) { |
|
94 |
+ targetRef.current['visit_reason'].focus(); |
|
95 |
+ alert("방문 목적을 선택해 주세요."); |
|
96 |
+ return false; |
|
97 |
+ } |
|
98 |
+ if (CommonUtil.isEmpty(target['visit_content']) == true) { |
|
99 |
+ targetRef.current['visit_content'].focus(); |
|
100 |
+ alert("방문 상세 사유를 입력해 주세요."); |
|
101 |
+ return false; |
|
105 | 102 |
} |
106 | 103 |
|
104 |
+ return true; |
|
105 |
+ } |
|
107 | 106 |
|
108 |
- //방문 기록 등록 |
|
109 |
- const visitRecordInsert = () => { |
|
110 |
- if (visitRecordValidation() == false) { |
|
111 |
- return; |
|
112 |
- } |
|
113 | 107 |
|
114 |
- visitRecord['senior_id'] = location.state['senior_id']; |
|
115 |
- visitRecord['agent_id'] = defaultUserId; |
|
116 |
- setVisitRecord({...visitRecord}); |
|
117 |
- |
|
118 |
- fetch("/welfare/visitRecordInsert.json", { |
|
119 |
- method: "POST", |
|
120 |
- headers: { |
|
121 |
- 'Content-Type': 'application/json; charset=UTF-8' |
|
122 |
- }, |
|
123 |
- body: JSON.stringify(visitRecord), |
|
124 |
- }).then((response) => response.json()).then((data) => { |
|
125 |
- console.log("방문 기록 등록 결과(건수) : ", data); |
|
126 |
- if (data > 0) { |
|
127 |
- setVisitRecordInit(); |
|
128 |
- visitRecordSelectList(); |
|
129 |
- closeModal(); |
|
130 |
- alert("등록완료"); |
|
131 |
- |
|
132 |
- } else { |
|
133 |
- alert("등록에 실패하였습니다. 관리자에게 문의바랍니다."); |
|
134 |
- } |
|
135 |
- }).catch((error) => { |
|
136 |
- console.log('visitRecordInsert() /welfare/visitRecordInsert.json error : ', error); |
|
137 |
- }); |
|
108 |
+ //방문 기록 등록 |
|
109 |
+ const visitRecordInsert = () => { |
|
110 |
+ if (visitRecordValidation() == false) { |
|
111 |
+ return; |
|
138 | 112 |
} |
139 | 113 |
|
140 |
- //방문 기록 수정 |
|
141 |
- const visitRecordUpdate = () => { |
|
142 |
- if (visitRecordValidation() == false) { |
|
143 |
- return; |
|
144 |
- } |
|
114 |
+ visitRecord['senior_id'] = location.state['senior_id']; |
|
115 |
+ visitRecord['agent_id'] = defaultUserId; |
|
116 |
+ setVisitRecord({ ...visitRecord }); |
|
145 | 117 |
|
146 |
- visitRecord['senior_id'] = location.state['senior_id']; |
|
147 |
- visitRecord['agent_id'] = defaultUserId; |
|
148 |
- setVisitRecord({...visitRecord}); |
|
118 |
+ fetch("/welfare/visitRecordInsert.json", { |
|
119 |
+ method: "POST", |
|
120 |
+ headers: { |
|
121 |
+ 'Content-Type': 'application/json; charset=UTF-8' |
|
122 |
+ }, |
|
123 |
+ body: JSON.stringify(visitRecord), |
|
124 |
+ }).then((response) => response.json()).then((data) => { |
|
125 |
+ console.log("방문 기록 등록 결과(건수) : ", data); |
|
126 |
+ if (data > 0) { |
|
127 |
+ setVisitRecordInit(); |
|
128 |
+ visitRecordSelectList(); |
|
129 |
+ closeModal(); |
|
130 |
+ alert("등록완료"); |
|
149 | 131 |
|
150 |
- fetch("/welfare/visitRecordUpdate.json", { |
|
151 |
- method: "POST", |
|
152 |
- headers: { |
|
153 |
- 'Content-Type': 'application/json; charset=UTF-8' |
|
154 |
- }, |
|
155 |
- body: JSON.stringify(visitRecord), |
|
156 |
- }).then((response) => response.json()).then((data) => { |
|
157 |
- console.log("방문 기록 수정 결과(건수) : ", data); |
|
158 |
- if (data > 0) { |
|
159 |
- setVisitRecordInit(); |
|
160 |
- visitRecordSelectList(); |
|
161 |
- closeModal(); |
|
162 |
- alert("수정완료"); |
|
163 |
- } else { |
|
164 |
- alert("수정에 실패하였습니다. 관리자에게 문의바랍니다."); |
|
165 |
- } |
|
166 |
- }).catch((error) => { |
|
167 |
- console.log('visitRecordUpdate() /welfare/visitRecordUpdate.json error : ', error); |
|
168 |
- }); |
|
132 |
+ } else { |
|
133 |
+ alert("등록에 실패하였습니다. 관리자에게 문의바랍니다."); |
|
134 |
+ } |
|
135 |
+ }).catch((error) => { |
|
136 |
+ console.log('visitRecordInsert() /welfare/visitRecordInsert.json error : ', error); |
|
137 |
+ }); |
|
138 |
+ } |
|
139 |
+ |
|
140 |
+ //방문 기록 수정 |
|
141 |
+ const visitRecordUpdate = () => { |
|
142 |
+ if (visitRecordValidation() == false) { |
|
143 |
+ return; |
|
169 | 144 |
} |
170 | 145 |
|
171 |
- //방문 기록 삭제 |
|
172 |
- const visitRecordDelete = () => { |
|
173 |
- if (confirm('방문 기록 정보를 삭제하시겠습니까?') == false) { |
|
174 |
- return; |
|
175 |
- } |
|
146 |
+ visitRecord['senior_id'] = location.state['senior_id']; |
|
147 |
+ visitRecord['agent_id'] = defaultUserId; |
|
148 |
+ setVisitRecord({ ...visitRecord }); |
|
176 | 149 |
|
177 |
- fetch("/welfare/visitRecordDelete.json", { |
|
178 |
- method: "POST", |
|
179 |
- headers: { |
|
180 |
- 'Content-Type': 'application/json; charset=UTF-8' |
|
181 |
- }, |
|
182 |
- body: JSON.stringify(visitRecord), |
|
183 |
- }).then((response) => response.json()).then((data) => { |
|
184 |
- console.log("방문 기록 삭제 결과(건수) : ", data); |
|
185 |
- if (data > 0) { |
|
186 |
- setVisitRecordInit(); |
|
187 |
- visitRecordSelectList(); |
|
188 |
- closeModal(); |
|
189 |
- alert("삭제완료"); |
|
190 |
- } else { |
|
191 |
- alert("삭제에 실패하였습니다. 관리자에게 문의바랍니다."); |
|
192 |
- } |
|
193 |
- }).catch((error) => { |
|
194 |
- console.log('visitRecordDelete() /welfare/visitRecordDelete.json error : ', error); |
|
195 |
- }); |
|
150 |
+ fetch("/welfare/visitRecordUpdate.json", { |
|
151 |
+ method: "POST", |
|
152 |
+ headers: { |
|
153 |
+ 'Content-Type': 'application/json; charset=UTF-8' |
|
154 |
+ }, |
|
155 |
+ body: JSON.stringify(visitRecord), |
|
156 |
+ }).then((response) => response.json()).then((data) => { |
|
157 |
+ console.log("방문 기록 수정 결과(건수) : ", data); |
|
158 |
+ if (data > 0) { |
|
159 |
+ setVisitRecordInit(); |
|
160 |
+ visitRecordSelectList(); |
|
161 |
+ closeModal(); |
|
162 |
+ alert("수정완료"); |
|
163 |
+ } else { |
|
164 |
+ alert("수정에 실패하였습니다. 관리자에게 문의바랍니다."); |
|
165 |
+ } |
|
166 |
+ }).catch((error) => { |
|
167 |
+ console.log('visitRecordUpdate() /welfare/visitRecordUpdate.json error : ', error); |
|
168 |
+ }); |
|
169 |
+ } |
|
170 |
+ |
|
171 |
+ //방문 기록 삭제 |
|
172 |
+ const visitRecordDelete = () => { |
|
173 |
+ if (confirm('방문 기록 정보를 삭제하시겠습니까?') == false) { |
|
174 |
+ return; |
|
196 | 175 |
} |
197 | 176 |
|
198 |
- //초기화 취소 |
|
199 |
- const setVisitRecordInit = () => { |
|
200 |
- setVisitRecord({...visitRecordInit}); |
|
201 |
- } |
|
177 |
+ fetch("/welfare/visitRecordDelete.json", { |
|
178 |
+ method: "POST", |
|
179 |
+ headers: { |
|
180 |
+ 'Content-Type': 'application/json; charset=UTF-8' |
|
181 |
+ }, |
|
182 |
+ body: JSON.stringify(visitRecord), |
|
183 |
+ }).then((response) => response.json()).then((data) => { |
|
184 |
+ console.log("방문 기록 삭제 결과(건수) : ", data); |
|
185 |
+ if (data > 0) { |
|
186 |
+ setVisitRecordInit(); |
|
187 |
+ visitRecordSelectList(); |
|
188 |
+ closeModal(); |
|
189 |
+ alert("삭제완료"); |
|
190 |
+ } else { |
|
191 |
+ alert("삭제에 실패하였습니다. 관리자에게 문의바랍니다."); |
|
192 |
+ } |
|
193 |
+ }).catch((error) => { |
|
194 |
+ console.log('visitRecordDelete() /welfare/visitRecordDelete.json error : ', error); |
|
195 |
+ }); |
|
196 |
+ } |
|
202 | 197 |
|
203 |
- //방문 기록 정보 |
|
204 |
- const [visitRecordList, setVisitRecordList] = React.useState({visitRecordList: [], visitRecordListCount:0, search: {currentPage: 1, perPage: 5}}); |
|
205 |
- //방문 기록 목록 조회 |
|
206 |
- const visitRecordSelectList = (currentPage) => { |
|
207 |
- visitRecordList.search.currentPage = CommonUtil.isEmpty(currentPage) ? 1 : currentPage; |
|
208 |
- visitRecordList.search['senior_id'] = location.state['senior_id']; |
|
209 |
- setVisitRecordList({...visitRecordList}); |
|
198 |
+ //초기화 취소 |
|
199 |
+ const setVisitRecordInit = () => { |
|
200 |
+ setVisitRecord({ ...visitRecordInit }); |
|
201 |
+ } |
|
210 | 202 |
|
211 |
- fetch("/welfare/visitRecordSelectList.json", { |
|
212 |
- method: "POST", |
|
213 |
- headers: { |
|
214 |
- 'Content-Type': 'application/json; charset=UTF-8' |
|
215 |
- }, |
|
216 |
- body: JSON.stringify(visitRecordList.search), |
|
217 |
- }).then((response) => response.json()).then((data) => { |
|
218 |
- console.log("방문 기록 목록 조회 결과(건수) : ", data); |
|
219 |
- data.search = visitRecordList.search; |
|
220 |
- setVisitRecordList(data); |
|
221 |
- }).catch((error) => { |
|
222 |
- console.log('visitRecordSelectList() /welfare/visitRecordSelectList.json error : ', error); |
|
223 |
- }); |
|
224 |
- } |
|
203 |
+ //방문 기록 정보 |
|
204 |
+ const [visitRecordList, setVisitRecordList] = React.useState({ visitRecordList: [], visitRecordListCount: 0, search: { currentPage: 1, perPage: 5 } }); |
|
205 |
+ //방문 기록 목록 조회 |
|
206 |
+ const visitRecordSelectList = (currentPage) => { |
|
207 |
+ visitRecordList.search.currentPage = CommonUtil.isEmpty(currentPage) ? 1 : currentPage; |
|
208 |
+ visitRecordList.search['senior_id'] = location.state['senior_id']; |
|
209 |
+ setVisitRecordList({ ...visitRecordList }); |
|
225 | 210 |
|
226 |
- React.useEffect(() => { |
|
227 |
- seniorSelectOne(); |
|
228 |
- visitRecordSelectList(1); |
|
229 |
- }, []) |
|
211 |
+ fetch("/welfare/visitRecordSelectList.json", { |
|
212 |
+ method: "POST", |
|
213 |
+ headers: { |
|
214 |
+ 'Content-Type': 'application/json; charset=UTF-8' |
|
215 |
+ }, |
|
216 |
+ body: JSON.stringify(visitRecordList.search), |
|
217 |
+ }).then((response) => response.json()).then((data) => { |
|
218 |
+ console.log("방문 기록 목록 조회 결과(건수) : ", data); |
|
219 |
+ data.search = visitRecordList.search; |
|
220 |
+ setVisitRecordList(data); |
|
221 |
+ }).catch((error) => { |
|
222 |
+ console.log('visitRecordSelectList() /welfare/visitRecordSelectList.json error : ', error); |
|
223 |
+ }); |
|
224 |
+ } |
|
230 | 225 |
|
231 |
- return ( |
|
232 |
- <main> |
|
233 |
- |
|
234 |
- <div className="content-wrap"> |
|
235 |
- <ContentTitle contentTitle={"방문 상세 페이지"}/> |
|
236 |
- <div className="detail-graph"> |
|
237 |
- <TableTitle tableTitle={`${senior['user_name']} 님의 방문 내역`}/> |
|
238 |
- <Chart2 /> |
|
239 |
- </div> |
|
240 |
- <div className="board-wrap"> |
|
241 |
- <div className="btn-wrap flex-end margin-bottom"> |
|
242 |
- <button className="btn-small gray-btn" onClick={openModal}>등록</button> |
|
243 |
- </div> |
|
226 |
+ React.useEffect(() => { |
|
227 |
+ seniorSelectOne(); |
|
228 |
+ visitRecordSelectList(1); |
|
229 |
+ }, []) |
|
244 | 230 |
|
245 |
- <table className="medicine-table senior-table"> |
|
246 |
- <thead> |
|
247 |
- <tr> |
|
248 |
- <th>No</th> |
|
249 |
- <th>방문일</th> |
|
250 |
- <th>방문목적</th> |
|
251 |
- </tr> |
|
252 |
- </thead> |
|
253 |
- <tbody> |
|
254 |
- {visitRecordList.visitRecordList.map((item, idx) => { return ( |
|
255 |
- <tr key={idx} onClick={() => {setVisitRecord(item); openModal();}}> |
|
256 |
- <td data-label="No">{visitRecordList.visitRecordList - idx - (visitRecordList.search.currentPage - 1) * visitRecordList.search.perPage}</td> |
|
257 |
- <td data-label="방문일">{item['visit_date']}</td> |
|
258 |
- <td data-label="방문목적">{item['visit_reason']}</td> |
|
259 |
- </tr> |
|
260 |
- )})} |
|
261 |
- {CommonUtil.isEmpty(visitRecordList.visitRecordList) ? |
|
262 |
- <tr> |
|
263 |
- <td colSpan={3}>조회된 데이터가 없습니다</td> |
|
264 |
- </tr> |
|
265 |
- : null} |
|
266 |
- </tbody> |
|
267 |
- </table> |
|
268 |
- <Pagination |
|
269 |
- currentPage={visitRecordList.search.currentPage} |
|
270 |
- perPage={visitRecordList.search.perPage} |
|
271 |
- totalCount={visitRecordList.visitRecordListCount} |
|
272 |
- maxRange={10} |
|
273 |
- click={visitRecordSelectList} |
|
274 |
- /> |
|
275 |
- <div className="btn-wrap flex-center"> |
|
276 |
- <button className="btn-large gray-btn" onClick={() => {navigate(-1)}}>이전</button> |
|
277 |
- </div> |
|
278 |
- </div> |
|
279 |
- </div> |
|
280 |
- |
|
231 |
+ return ( |
|
232 |
+ <main> |
|
233 |
+ |
|
234 |
+ <div className="content-wrap"> |
|
235 |
+ <ContentTitle contentTitle={"방문 상세 페이지"} /> |
|
236 |
+ <div className="detail-graph"> |
|
237 |
+ <TableTitle tableTitle={`${senior['user_name']} 님의 방문 내역`} /> |
|
238 |
+ <Chart2 /> |
|
239 |
+ </div> |
|
240 |
+ <div className="board-wrap"> |
|
241 |
+ <div className="btn-wrap flex-end margin-bottom"> |
|
242 |
+ <button className="btn-small gray-btn" onClick={openModal}>등록</button> |
|
243 |
+ </div> |
|
244 |
+ |
|
245 |
+ <table className="medicine-table senior-table"> |
|
246 |
+ <thead> |
|
247 |
+ <tr> |
|
248 |
+ <th>No</th> |
|
249 |
+ <th>방문일</th> |
|
250 |
+ <th>방문목적</th> |
|
251 |
+ </tr> |
|
252 |
+ </thead> |
|
253 |
+ <tbody> |
|
254 |
+ {visitRecordList.visitRecordList.map((item, idx) => { |
|
255 |
+ return ( |
|
256 |
+ <tr key={idx} onClick={() => { setVisitRecord(item); openModal(); }}> |
|
257 |
+ <td data-label="No">{visitRecordList.visitRecordList - idx - (visitRecordList.search.currentPage - 1) * visitRecordList.search.perPage}</td> |
|
258 |
+ <td data-label="방문일">{item['visit_date']}</td> |
|
259 |
+ <td data-label="방문목적">{item['visit_reason']}</td> |
|
260 |
+ </tr> |
|
261 |
+ ) |
|
262 |
+ })} |
|
263 |
+ {CommonUtil.isEmpty(visitRecordList.visitRecordList) ? |
|
264 |
+ <tr> |
|
265 |
+ <td colSpan={3}>조회된 데이터가 없습니다</td> |
|
266 |
+ </tr> |
|
267 |
+ : null} |
|
268 |
+ </tbody> |
|
269 |
+ </table> |
|
270 |
+ <Pagination |
|
271 |
+ currentPage={visitRecordList.search.currentPage} |
|
272 |
+ perPage={visitRecordList.search.perPage} |
|
273 |
+ totalCount={visitRecordList.visitRecordListCount} |
|
274 |
+ maxRange={10} |
|
275 |
+ click={visitRecordSelectList} |
|
276 |
+ /> |
|
277 |
+ <div className="btn-wrap flex-center"> |
|
278 |
+ <button className="btn-large gray-btn" onClick={() => { navigate(-1) }}>이전</button> |
|
279 |
+ </div> |
|
280 |
+ </div> |
|
281 |
+ </div> |
|
281 | 282 |
|
282 | 283 |
|
283 | 284 |
|
284 |
- <Modal open={modalOpen} close={closeModal} header="방문 정보 관리"> |
|
285 |
- <div className="board-wrap"> |
|
286 |
- <table className="flex70 margin-bottom">{/* questionnaire-table */} |
|
287 |
- <tbody> |
|
288 |
- <tr> |
|
289 |
- <th>방문날짜</th> |
|
290 |
- <td colSpan={3}> |
|
291 |
- <input type="date" value={visitRecord['visit_date']} |
|
292 |
- onChange={(e) => { |
|
293 |
- visitRecord['visit_date'] = e.target.value; |
|
294 |
- setVisitRecord({...visitRecord}); |
|
295 |
- }} |
|
296 |
- ref={el => visitRecordRef.current['visit_date'] = el} |
|
297 |
- /> |
|
298 |
- </td> |
|
299 |
- </tr> |
|
300 |
- <tr> |
|
301 |
- <th>방문목적</th> |
|
302 |
- <td> |
|
303 |
- <select onChange={(e) => { |
|
304 |
- visitRecord['visit_reason'] = e.target.value; |
|
305 |
- setVisitRecord({...visitRecord}); |
|
306 |
- }} |
|
307 |
- ref={el => visitRecordRef.current['visit_reason'] = el} |
|
308 |
- > |
|
309 |
- <option value="" selected={CommonUtil.isEmpty(visitRecord['visit_reason'])}>방문목적선택</option> |
|
310 |
- <option value="정기방문" selected={visitRecord['visit_reason'] == "정기방문"}>정기방문</option> |
|
311 |
- <option value="어르신케어" selected={visitRecord['visit_reason'] == "어르신케어"}>어르신케어</option> |
|
312 |
- <option value="장비점검" selected={visitRecord['visit_reason'] == "장비점검"}>장비점검</option> |
|
313 |
- <option value="정기방문" selected={visitRecord['visit_reason'] == "기타"}>기타</option> |
|
314 |
- </select> |
|
315 |
- </td> |
|
316 |
- </tr> |
|
317 |
- <tr> |
|
318 |
- <th>방문 상세 사유</th> |
|
319 |
- <td colSpan={3}> |
|
320 |
- <textarea className="medicine" style={{height:"225px"}} name="" id="" cols="30" rows="10" |
|
321 |
- value={visitRecord['visit_content']} |
|
322 |
- onChange={(e) => { |
|
323 |
- visitRecord['visit_content'] = e.target.value; |
|
324 |
- setVisitRecord({...visitRecord}); |
|
325 |
- }} |
|
326 |
- ref={el => visitRecordRef.current['visit_content'] = el} |
|
327 |
- ></textarea> |
|
328 |
- </td> |
|
329 |
- </tr> |
|
330 |
- </tbody> |
|
331 |
- </table> |
|
332 |
- <div className="flex-center"> |
|
333 |
- {CommonUtil.isEmpty(visitRecord.isInsert) == false && visitRecord.isInsert |
|
334 |
- ? <button className="btn-small red-btn" onClick={visitRecordInsert}>등록</button> |
|
335 |
- : <> |
|
336 |
- <button className="btn-small red-btn" onClick={visitRecordUpdate}>수정</button> |
|
337 |
- <button className="btn-small red-btn" onClick={visitRecordDelete}>삭제</button> |
|
338 |
- </> |
|
339 |
- } |
|
340 |
- </div> |
|
341 |
- </div> |
|
342 |
- </Modal> |
|
285 |
+ |
|
286 |
+ <Modal open={modalOpen} close={closeModal} header="방문 정보 관리"> |
|
287 |
+ <div className="board-wrap"> |
|
288 |
+ <table className="flex70 margin-bottom">{/* questionnaire-table */} |
|
289 |
+ <tbody> |
|
290 |
+ <tr> |
|
291 |
+ <th>방문날짜</th> |
|
292 |
+ <td colSpan={3}> |
|
293 |
+ <input type="date" |
|
294 |
+ onKeyDown={function (e) { e.preventDefault() }} |
|
295 |
+ value={visitRecord['visit_date']} |
|
296 |
+ onChange={(e) => { |
|
297 |
+ visitRecord['visit_date'] = e.target.value; |
|
298 |
+ setVisitRecord({ ...visitRecord }); |
|
299 |
+ }} |
|
300 |
+ ref={el => visitRecordRef.current['visit_date'] = el} |
|
301 |
+ /> |
|
302 |
+ </td> |
|
303 |
+ </tr> |
|
304 |
+ <tr> |
|
305 |
+ <th>방문목적</th> |
|
306 |
+ <td> |
|
307 |
+ <select onChange={(e) => { |
|
308 |
+ visitRecord['visit_reason'] = e.target.value; |
|
309 |
+ setVisitRecord({ ...visitRecord }); |
|
310 |
+ }} |
|
311 |
+ ref={el => visitRecordRef.current['visit_reason'] = el} |
|
312 |
+ > |
|
313 |
+ <option value="" selected={CommonUtil.isEmpty(visitRecord['visit_reason'])}>방문목적선택</option> |
|
314 |
+ <option value="정기방문" selected={visitRecord['visit_reason'] == "정기방문"}>정기방문</option> |
|
315 |
+ <option value="어르신케어" selected={visitRecord['visit_reason'] == "어르신케어"}>어르신케어</option> |
|
316 |
+ <option value="장비점검" selected={visitRecord['visit_reason'] == "장비점검"}>장비점검</option> |
|
317 |
+ <option value="정기방문" selected={visitRecord['visit_reason'] == "기타"}>기타</option> |
|
318 |
+ </select> |
|
319 |
+ </td> |
|
320 |
+ </tr> |
|
321 |
+ <tr> |
|
322 |
+ <th>방문 상세 사유</th> |
|
323 |
+ <td colSpan={3}> |
|
324 |
+ <textarea className="medicine" style={{ height: "225px" }} name="" id="" cols="30" rows="10" |
|
325 |
+ value={visitRecord['visit_content']} |
|
326 |
+ onChange={(e) => { |
|
327 |
+ visitRecord['visit_content'] = e.target.value; |
|
328 |
+ setVisitRecord({ ...visitRecord }); |
|
329 |
+ }} |
|
330 |
+ ref={el => visitRecordRef.current['visit_content'] = el} |
|
331 |
+ ></textarea> |
|
332 |
+ </td> |
|
333 |
+ </tr> |
|
334 |
+ </tbody> |
|
335 |
+ </table> |
|
336 |
+ <div className="flex-center"> |
|
337 |
+ {CommonUtil.isEmpty(visitRecord.isInsert) == false && visitRecord.isInsert |
|
338 |
+ ? <button className="btn-small red-btn" onClick={visitRecordInsert}>등록</button> |
|
339 |
+ : <> |
|
340 |
+ <button className="btn-small red-btn" onClick={visitRecordUpdate}>수정</button> |
|
341 |
+ <button className="btn-small red-btn" onClick={visitRecordDelete}>삭제</button> |
|
342 |
+ </> |
|
343 |
+ } |
|
344 |
+ </div> |
|
345 |
+ </div> |
|
346 |
+ </Modal> |
|
343 | 347 |
|
344 | 348 |
|
345 | 349 |
|
346 |
- </main> |
|
347 |
- ); |
|
350 |
+ </main> |
|
351 |
+ ); |
|
348 | 352 |
} |
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?