SMMNB00400_내환자 Setting 등록.xfdl 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SMMNB00400" position="absolute 0 0 360 745" titletext="내 환자 Setting" oninit="SMMNB00400_oninit" onload="SMMNB00400_onload">
  5. <Layouts>
  6. <Layout>
  7. <Div position="absolute 0 0 360 25" id="group1">
  8. <Layouts>
  9. <Layout>
  10. <Static text="내 환자 Setting" position="absolute 0 0 135 25" id="caption6" class="tit_1"/>
  11. </Layout>
  12. </Layouts>
  13. </Div>
  14. <Div position="absolute 0 13 360 745" id="group2" scrollbars="autoboth">
  15. <Layouts>
  16. <Layout>
  17. <Grid position="absolute 0 67 357 710" id="grd_mypatlist" binddataset="ds_main_mypatinfo_mypatlist" oncellclick="group2_grd_mypatlist_oncellclick" scrollbars="autovert" anchor="all">
  18. <Formats>
  19. <Format id="default">
  20. <Columns>
  21. <Column size="25" band="left"/>
  22. <Column size="64" band="left"/>
  23. <Column size="0" band="left"/>
  24. <Column size="79" band="left"/>
  25. <Column size="50" band="left"/>
  26. <Column size="125" band="left"/>
  27. <Column size="0" band="left"/>
  28. <Column size="0"/>
  29. <Column size="0"/>
  30. </Columns>
  31. <Rows>
  32. <Row size="24" band="head"/>
  33. <Row size="24"/>
  34. </Rows>
  35. <Band id="head">
  36. <Cell/>
  37. <Cell col="1" text="병실"/>
  38. <Cell col="2" text="병상"/>
  39. <Cell col="3" text="환자명"/>
  40. <Cell col="4" text="S/A"/>
  41. <Cell col="5" text="진료과"/>
  42. <Cell col="6" text="병동"/>
  43. <Cell col="7" text="환자번호"/>
  44. <Cell col="8" text="전세팅"/>
  45. </Band>
  46. <Band id="body">
  47. <Cell displaytype="checkbox" edittype="checkbox" text="bind:mysetting" expr="expr:(mysetting == &quot;true&quot; || mysetting == 1) ? 1 : 0"/>
  48. <Cell col="1" style="align:left middle;background:#ffffffff;background2:#ffffffff;" text="bind:roomcd" suppress="1" suppressalign="middle"/>
  49. <Cell col="2" style="align:left middle;" text="bind:bedcd"/>
  50. <Cell col="3" style="align:left middle;background:#ffffffff;background2:#ffffffff;" text="bind:patnm"/>
  51. <Cell col="4" style="align:left middle;background:#ffffffff;background2:#ffffffff;" text="bind:sexage"/>
  52. <Cell col="5" style="align:left middle;background:#ffffffff;background2:#ffffffff;" text="bind:orddeptnm"/>
  53. <Cell col="6" text="bind:wardcd"/>
  54. <Cell col="7" text="bind:pid"/>
  55. <Cell col="8" text="bind:bfsetting"/>
  56. </Band>
  57. </Format>
  58. </Formats>
  59. </Grid>
  60. <Shape position="absolute 0 62 357 68" linetype="horizontal" id="line1" class="line_10"/>
  61. <Static text="내환자리스트" position="absolute 1 46 99 62" id="caption8" class="tit_2"/>
  62. <Button position="absolute 263 43 305 62" id="btn_save" class="btn2" text="저장" onclick="group2_btn_save_onclick"/>
  63. <Static text="사원번호" position="absolute 0 13 70 36" id="caption1" class="cell_1"/>
  64. <Static text="간호사명" position="absolute 179 13 249 36" id="caption2" class="cell_1"/>
  65. <Edit readonly="true" position="absolute 73 15 175 34" id="opt_empno"/>
  66. <Edit readonly="true" position="absolute 252 15 354 34" id="opt_nursnm"/>
  67. <Shape position="absolute 0 11 357 17" linetype="horizontal" id="line2" class="line_3"/>
  68. <Shape position="absolute 0 33 357 39" linetype="horizontal" id="line3" class="line_3"/>
  69. <Combo position="absolute 98 43 219 62" id="sct_wardlist" class="combo_default" innerdataset="@ds_init_ward_dept" datacolumn="depthngnm" codecolumn="deptcd" onitemchanged="group2_sct_wardlist_onitemchanged"/>
  70. <Button position="absolute 220 43 262 62" id="btn_ref" class="btn2" text="조회" onclick="group2_btn_ref_onclick"/>
  71. <TextArea position="absolute 0 520 357 635" align="align:center middle;" id="tar_settinginfo" visible="false" readonly="true" style="background:#ffffccff;border:1 solid #808080ff ;align:left middle;font:Dotum,13,bold;" anchor="all"/>
  72. <Button position="absolute 306 43 359 62" id="button1" class="btn2" text="초기화" onclick="group2_button1_onclick"/>
  73. <Static text="[표]" position="absolute 332 715 360 730" id="caption3" anchor="right bottom"/>
  74. <CheckBox position="absolute 4 70 24 90" id="bool1" onclick="group2_bool1_onclick" truevalue="true"/>
  75. </Layout>
  76. </Layouts>
  77. </Div>
  78. <ImageViewer position="absolute 325 8 340 23" id="img1" image="URL('theme://images\icon_btn.png')" onmousemove="img1_onmousemove" onmouseleave="img1_onmouseleave"/>
  79. <Static text="내환자 SETTING은 입원, 전실된 환자가 &#13;&#10;자동으로 설정되지 않으므로&#13;&#10;내환자가 추가된 경우에는 재설정해주시기 바랍니다.&#13;&#10;설정된 내환자 정보는 24시간 저장됩니다.&#13;&#10; " position="absolute 20 210 320 275" align="align:left middle;" id="cap_key" class="text_essential" visible="false" style="padding:0 0 0 10;"/>
  80. </Layout>
  81. </Layouts>
  82. <Objects>
  83. <Dataset id="ds_main_cond" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  84. <ColumnInfo>
  85. <Column id="wardcd" type="STRING" size="256"/>
  86. <Column id="userid" type="STRING" size="256"/>
  87. <Column id="usernm" type="STRING" size="256"/>
  88. <Column id="multicheck" type="STRING" size="256"/>
  89. </ColumnInfo>
  90. <Rows>
  91. <Row>
  92. <Col id="wardcd"/>
  93. <Col id="userid"/>
  94. <Col id="usernm"/>
  95. <Col id="multicheck"/>
  96. </Row>
  97. </Rows>
  98. </Dataset>
  99. <Dataset id="ds_main_mypatinfo_mypatlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false" oncolumnchanged="ds_main_mypatinfo_mypatlist_oncolumnchanged">
  100. <ColumnInfo>
  101. <Column id="mysetting" type="STRING" size="256"/>
  102. <Column id="roomcd" type="STRING" size="256"/>
  103. <Column id="bedcd" type="STRING" size="256"/>
  104. <Column id="patnm" type="STRING" size="256"/>
  105. <Column id="sexage" type="STRING" size="256"/>
  106. <Column id="orddeptnm" type="STRING" size="256"/>
  107. <Column id="wardcd" type="STRING" size="256"/>
  108. <Column id="pid" type="STRING" size="256"/>
  109. <Column id="bfsetting" type="STRING" size="256"/>
  110. </ColumnInfo>
  111. <Rows>
  112. <Row>
  113. <Col id="mysetting"/>
  114. <Col id="roomcd"/>
  115. <Col id="bedcd"/>
  116. <Col id="patnm"/>
  117. <Col id="sexage"/>
  118. <Col id="orddeptnm"/>
  119. <Col id="wardcd"/>
  120. <Col id="pid"/>
  121. <Col id="bfsetting"/>
  122. </Row>
  123. </Rows>
  124. </Dataset>
  125. <Dataset id="ds_main_settinginfo" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  126. <ColumnInfo>
  127. <Column id="settingtime" type="STRING" size="256"/>
  128. </ColumnInfo>
  129. <Rows>
  130. <Row/>
  131. </Rows>
  132. </Dataset>
  133. <Dataset id="ds_main_saveinfo" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  134. <ColumnInfo>
  135. <Column id="message" type="STRING" size="256"/>
  136. </ColumnInfo>
  137. <Rows>
  138. <Row/>
  139. </Rows>
  140. </Dataset>
  141. <Dataset id="ds_send" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  142. <Dataset id="ds_init_ward_dept" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  143. <ColumnInfo>
  144. <Column id="deptcd" type="STRING" size="256"/>
  145. <Column id="depthngnm" type="STRING" size="256"/>
  146. </ColumnInfo>
  147. <Rows>
  148. <Row/>
  149. </Rows>
  150. </Dataset>
  151. <Dataset id="ds_hidden" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  152. </Objects>
  153. <Bind>
  154. <BindItem id="item0" compid="group2.opt_empno" propid="value" datasetid="ds_main_cond" columnid="userid"/>
  155. <BindItem id="item1" compid="group2.opt_nursnm" propid="value" datasetid="ds_main_cond" columnid="usernm"/>
  156. <BindItem id="item2" compid="group2.sct_wardlist" propid="value" datasetid="ds_main_cond" columnid="wardcd"/>
  157. <BindItem id="item3" compid="group2.tar_settinginfo" propid="value" datasetid="ds_main_saveinfo" columnid="message"/>
  158. </Bind>
  159. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  160. * System Name :
  161. * Job Name :
  162. * Creator :
  163. * Make Date : 2015-11-13
  164. * Description :
  165. *---------------------------------------------------------------------------------------
  166. * Modify Date Modifier Modify Description
  167. *---------------------------------------------------------------------------------------
  168. * 2015-11-13 Live Converter TF->XP
  169. *
  170. *---------------------------------------------------------------------------------------
  171. ****************************************************************************************/
  172. include "com_commonxp::comm_main.xjs";
  173. var arErrorCode = new HashArray();
  174. function cf_TXMNB00401(sSvcId, nErrorCode, sErrorMsg) {
  175. arErrorCode.push(sSvcId, nErrorCode);
  176. if(nErrorCode < 0) return;
  177. utlf_addLog("***** cf_TXMNB00401 *****");
  178. }
  179. /*SMMNB00400_oninit*/
  180. function SMMNB00400_oninit(obj:Form, e:InitEventInfo)
  181. {
  182. frmf_initForm(obj);
  183. }
  184. /*SMMNB00400_onload*/
  185. function SMMNB00400_onload(obj:Form, e:LoadEventInfo)
  186. {
  187. //20070726 1530
  188. var instcd = sysf_getUserInfo("dutplceinstcd");
  189. var standard_yn = "orduseyn";
  190. var ord_deptflag = "W";
  191. var rslt_ref = "ds_init_ward_dept";
  192. appf_getDeptCodeList(instcd, standard_yn, ord_deptflag, "depthngnm", "asc", "", "", "",rslt_ref ,false, "");
  193. ds_main_mypatinfo_mypatlist.clearData();
  194. if (frmf_checkOpener()) {
  195. var wardcd = opener.frmf_getParameter("wardcd");
  196. ds_main_cond.setColumn(0, "userid", sysf_getUserId());
  197. ds_main_cond.setColumn(0, "usernm", sysf_getUserName());
  198. if( !utlf_isNull(wardcd) ) {
  199. ds_main_cond.setColumn(0, "wardcd", wardcd);
  200. } else {
  201. ds_main_cond.setColumn(0, "wardcd", sysf_getUserInfo("dutplcecd"));
  202. }
  203. } else {
  204. ds_main_cond.setColumn(0, "userid", sysf_getUserId());
  205. ds_main_cond.setColumn(0, "usernm", sysf_getUserName());
  206. ds_main_cond.setColumn(0, "wardcd", sysf_getUserInfo("dutplcecd"));
  207. }
  208. ds_send.clearData();
  209. dsf_makeValue(ds_send,"wardcd", "string", ds_main_cond.getColumn(0, "wardcd"));
  210. dsf_makeValue(ds_send,"userid", "string", ds_main_cond.getColumn(0, "userid"));
  211. var oParam = {};
  212. oParam.id = "TRMNB00402";
  213. oParam.service = "wardcareapp.WardCareMngt";
  214. oParam.method = "reqGetPatList";
  215. oParam.inds = "reqcond=ds_send";
  216. oParam.outds = "ds_main_mypatinfo_mypatlist=mypatlist";
  217. oParam.async = false;
  218. tranf_submit(oParam);
  219. for(var i =0; i < ds_main_mypatinfo_mypatlist.rowcount; i++){
  220. dsf_makeValue(ds_main_mypatinfo_mypatlist,"bfsetting", "string", ds_main_mypatinfo_mypatlist.getColumn(i, "mysetting"), i);
  221. }
  222. grdf_setRowStyle( group2.grd_mypatlist , "0" , "true" , "mysetting" , "equal");
  223. }
  224. // 환자리스트 조회
  225. function fGetPatList(pFlag){
  226. ds_main_cond.setColumn(0, "multicheck", "N");
  227. group2.grd_mypatlist.position ="absolute 0 67 357 730";
  228. group2.tar_settinginfo.visible = false;
  229. ds_send.clearData();
  230. dsf_makeValue(ds_send,"wardcd", "string", ds_main_cond.getColumn(0, "wardcd"));
  231. dsf_makeValue(ds_send,"srchflag", "string", pFlag);
  232. var oParam = {};
  233. oParam.id = "TRMNB00402";
  234. oParam.service = "wardcareapp.WardCareMngt";
  235. oParam.method = "reqGetPatList";
  236. oParam.inds = "reqcond=ds_send";
  237. oParam.outds = "ds_main_mypatinfo_mypatlist=mypatlist";
  238. oParam.async = false;
  239. tranf_submit(oParam);
  240. for(var i =0; i < ds_main_mypatinfo_mypatlist.rowcount; i++){
  241. dsf_makeValue(ds_main_mypatinfo_mypatlist,"bfsetting", "string", ds_main_mypatinfo_mypatlist.getColumn(i, "mysetting"), i);
  242. }
  243. grdf_initGridStyle(group2.grd_mypatlist);
  244. group2.bool1.value = "false";
  245. grdf_setRowStyle( group2.grd_mypatlist , "0" , "true" , "mysetting" , "equal");
  246. }
  247. /*group2_grd_mypatlist_oncellclick*/
  248. function group2_grd_mypatlist_oncellclick(obj:Grid, e:GridClickEventInfo)
  249. {
  250. if( e.col > 0 && e.row > -1) {
  251. if (e.col == 1) {
  252. var arrRows = ds_main_mypatinfo_mypatlist.findRow(e.col, ds_main_mypatinfo_mypatlist.getColumn(e.row, e.col));
  253. var currentMysetting = ds_main_mypatinfo_mypatlist.getColumn(arrRows, "mysetting");
  254. if(currentMysetting == "true" ) {
  255. currentMysetting = "false";
  256. } else {
  257. currentMysetting = "true";
  258. }
  259. ds_main_mypatinfo_mypatlist.setColumn(arrRows, "mysetting",currentMysetting);
  260. for(var j =arrRows; j < ds_main_mypatinfo_mypatlist.rowcount; j++){
  261. if(ds_main_mypatinfo_mypatlist.getColumn(j, e.col) == ds_main_mypatinfo_mypatlist.getColumn(j+1, e.col)){
  262. ds_main_mypatinfo_mypatlist.setColumn(j+1, "mysetting",currentMysetting);
  263. }else{
  264. break;
  265. }
  266. }
  267. } else {
  268. var currentMysetting = ds_main_mypatinfo_mypatlist.getColumn(e.row, "mysetting");
  269. if (currentMysetting == "true") {
  270. ds_main_mypatinfo_mypatlist.setColumn(e.row, "mysetting", "false");
  271. }else{
  272. ds_main_mypatinfo_mypatlist.setColumn(e.row, "mysetting", "true");
  273. }
  274. }
  275. }
  276. grdf_initGridStyle(group2.grd_mypatlist);
  277. grdf_setRowStyle(group2.grd_mypatlist , "0" , "true" , "mysetting" , "equal");
  278. }
  279. /*group2_btn_save_onclick*/
  280. function group2_btn_save_onclick(obj:Button, e:ClickEventInfo)
  281. {
  282. ds_send.clearData();
  283. var updateData = grdf_getGridUpdateData(group2.grd_mypatlist, "u");
  284. ds_send.copyData(updateData, true);
  285. if(ds_main_mypatinfo_mypatlist.rowcount > 0 ){
  286. var oParam = {};
  287. oParam.id = "TXMNB00401";
  288. oParam.service = "wardcareapp.WardCareMngt";
  289. oParam.method = "reqSetMyPatList";
  290. oParam.inds = "reqlist=ds_send";
  291. oParam.outds = "ds_main_settinginfo=settinginfo";
  292. oParam.async = false;
  293. oParam.callback = "cf_TXMNB00401";
  294. tranf_submit(oParam);
  295. if(arErrorCode.pop("TXMNB00401") > -1){
  296. grdf_setStatus(group2.grd_mypatlist, ""); // submit() 성공하면 그리드의 i,u,d 상태 제거
  297. fGetPatList("setting"); // 환자리스트 조회
  298. ds_main_saveinfo.setColumn(0, "message"," " + ds_main_settinginfo.getColumn(0, "settingtime") + "\n ["+ sysf_getUserName() + "]간호사의 \n 내환자가 Setting 되었습니다.");
  299. group2.grd_mypatlist.position ="absolute 0 67 357 472";
  300. group2.tar_settinginfo.visible = true;
  301. }
  302. } else {
  303. sysf_messageBox("저장할 내역이 ", "I004")
  304. }
  305. }
  306. /*group2_sct_wardlist_onitemchanged*/
  307. function group2_sct_wardlist_onitemchanged(obj:Combo, e:ItemChangeEventInfo)
  308. {
  309. ds_send.clearData();
  310. dsf_makeValue(ds_send,"wardcd", "string", ds_main_cond.getColumn(0, "wardcd"));
  311. var oParam = {};
  312. oParam.id = "TRMNB00402";
  313. oParam.service = "wardcareapp.WardCareMngt";
  314. oParam.method = "reqGetPatList";
  315. oParam.inds = "reqcond=ds_send";
  316. oParam.outds = "ds_main_mypatinfo_mypatlist=mypatlist";
  317. oParam.async = false;
  318. tranf_submit(oParam);
  319. for(var i =0; i < ds_main_mypatinfo_mypatlist.rowcount; i++){
  320. dsf_makeValue(ds_main_mypatinfo_mypatlist,"bfsetting", "string", ds_main_mypatinfo_mypatlist.getColumn(i, "mysetting"), i);
  321. }
  322. grdf_initGridStyle(group2.grd_mypatlist);
  323. group2.bool1.value = "false";
  324. grdf_setRowStyle( group2.grd_mypatlist , "0" , "true" , "mysetting" , "equal");
  325. }
  326. /*group2_btn_ref_onclick*/
  327. function group2_btn_ref_onclick(obj:Button, e:ClickEventInfo)
  328. {
  329. fGetPatList(); // 환자리스트 조회
  330. }
  331. /*group2_button1_onclick*/
  332. function group2_button1_onclick(obj:Button, e:ClickEventInfo)
  333. {
  334. var btn = sysf_messageBox("초기화를 ", "Q004");
  335. if (btn == '6') {
  336. ds_send.clearData();
  337. dsf_makeValue(ds_send,"userid" , "string", ds_main_cond.getColumn(0, "userid"));
  338. dsf_makeValue(ds_send,"flag" , "string", "Y");
  339. var oParam = {};
  340. oParam.id = "TXMNB00402";
  341. oParam.service = "wardcareapp.WardCareMngt";
  342. oParam.method = "reqSetInitPat";
  343. oParam.inds = "reqdata=ds_send";
  344. oParam.outds = "";
  345. oParam.async = false;
  346. tranf_submit(oParam);
  347. fGetPatList("setting"); // 환자리스트 조회
  348. ds_main_saveinfo.setColumn(0, "message", " " + ds_main_settinginfo.getColumn(0, "settingtime") + "\n ["+ sysf_getUserName() + "]간호사의 \n 내환자가 초기화 되었습니다.");
  349. group2.grd_mypatlist.position ="absolute 0 67 357 472";
  350. group2.tar_settinginfo.visible = true;
  351. } else if (btn == '7') {
  352. return;
  353. }
  354. }
  355. /*img1_onmousemove*/
  356. function img1_onmousemove(obj:ImageViewer, e:MouseEventInfo)
  357. {
  358. cap_key.visible =true;
  359. }
  360. /*img1_onmouseleave*/
  361. function img1_onmouseleave(obj:ImageViewer, e:MouseEventInfo)
  362. {
  363. cap_key.visible =false;
  364. }
  365. /*ds_main_mypatinfo_mypatlist_oncolumnchanged*/
  366. function ds_main_mypatinfo_mypatlist_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
  367. {
  368. if( e.columnid == "mysetting" ){
  369. obj.setColumn(e.row, "mysetting", (e.newvalue == "true" || e.newvalue == 1) ? "true" : "false");
  370. }
  371. }
  372. /*group2_bool1_onclick*/
  373. function group2_bool1_onclick(obj:CheckBox, e:ClickEventInfo)
  374. {
  375. var multicheck = group2.bool1.value;
  376. ds_main_cond.setColumn(0, "multicheck", multicheck);
  377. var xMyPatListPath = "ds_main_mypatinfo_mypatlist";
  378. var nodeCnt = ds_main_mypatinfo_mypatlist.rowcount;
  379. for(var i = 0; i < nodeCnt; i++){
  380. if(multicheck == "true"){
  381. ds_main_mypatinfo_mypatlist.setColumn(i, "mysetting", "true");
  382. }else{
  383. ds_main_mypatinfo_mypatlist.setColumn(i, "mysetting", "false");
  384. }
  385. }
  386. }
  387. ]]></Script>
  388. </Form>
  389. </FDL>