SPPMC07300_동명이인환자관리.xfdl 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SPPMC07300" position="absolute 0 0 580 370" titletext="동명이인환자관리" onload="SPPMC07300_onload">
  5. <Layouts>
  6. <Layout>
  7. <Grid position="absolute 5 110 555 359" id="datagrid1" binddataset="ds_main_patlist">
  8. <Formats>
  9. <Format id="default">
  10. <Columns>
  11. <Column size="80"/>
  12. <Column size="80"/>
  13. <Column size="80"/>
  14. <Column size="80"/>
  15. <Column size="40"/>
  16. <Column size="120"/>
  17. <Column size="52"/>
  18. </Columns>
  19. <Rows>
  20. <Row size="24" band="head"/>
  21. <Row size="24"/>
  22. </Rows>
  23. <Band id="head">
  24. <Cell text="환자번호"/>
  25. <Cell col="1" text="성명"/>
  26. <Cell col="2" text="표시명"/>
  27. <Cell col="3" text="입원일자"/>
  28. <Cell col="4" text="상태"/>
  29. <Cell col="5" text="병동"/>
  30. <Cell col="6" text="병실"/>
  31. </Band>
  32. <Band id="body">
  33. <Cell style="align:left middle;padding:0 0 0 4;" text="bind:pid"/>
  34. <Cell col="1" style="align:left middle;padding:0 0 0 4;" text="bind:hngnm"/>
  35. <Cell col="2" style="align:left middle;padding:0 0 0 4;" text="bind:hngnm2"/>
  36. <Cell col="3" style="align:left middle;padding:0 0 0 4;" text="bind:indd"/>
  37. <Cell col="4" style="align:left middle;padding:0 0 0 4;" text="bind:indschacptstat"/>
  38. <Cell col="5" style="align:left middle;padding:0 0 0 4;" text="bind:wardnm"/>
  39. <Cell col="6" style="align:left middle;padding:0 0 0 4;" text="bind:roomcd"/>
  40. </Band>
  41. </Format>
  42. </Formats>
  43. </Grid>
  44. <Edit position="absolute 109 33 202 52" id="input1" taborder="1" onkeydown="input1_onkeydown"/>
  45. <Button position="absolute 209 34 225 50" id="button1" class="icon_search" taborder="2" text="" onclick="button1_onclick"/>
  46. <Static text="수정표시명" position="absolute 308 54 390 74" id="caption2" class="cell_1"/>
  47. <Edit position="absolute 392 54 490 73" id="input2" taborder="3"/>
  48. <Button position="absolute 499 53 555 75" align="align:left middle;" id="button2" class="btn4" taborder="4" text="수정" onclick="button2_onclick"/>
  49. <Static text="성명/현표시명" position="absolute 6 54 107 74" id="caption4" class="cell_1" visible="true"/>
  50. <Edit position="absolute 109 54 202 73" id="input3" enable="false"/>
  51. <Edit position="absolute 201 54 299 73" id="input4" enable="false"/>
  52. <Static text="환자정보" position="absolute 6 9 92 27" id="caption5" class="tit_2"/>
  53. <Static text="동명이인환자 리스트" position="absolute 5 88 149 104" id="caption6" class="tit_2"/>
  54. <Shape position="absolute 5 27 555 33" linetype="horizontal" id="line1" class="line_1" style="strokepen:3 solid #33bbbbff;"/>
  55. <Shape position="absolute 5 106 555 112" linetype="horizontal" id="line2" class="line_1" style="strokepen:3 solid #33bbbbff;"/>
  56. <Static text="환자번호" position="absolute 6 32 107 52" id="caption7" class="cell_1" visible="true"/>
  57. <ListBox id="ListBox00" taborder="5" position="absolute 300 35 558 50" style="color:red;background:#00000000;border:0 solid #9ebed4ff ;align:center middle;" codecolumn="codecolumn" datacolumn="datacolumn" scrollbars="none" onitemdblclick="ListBox00_onitemdblclick">
  58. <Dataset id="innerdataset">
  59. <ColumnInfo>
  60. <Column id="codecolumn" size="256"/>
  61. <Column id="datacolumn" size="256"/>
  62. </ColumnInfo>
  63. <Rows>
  64. <Row>
  65. <Col id="codecolumn"/>
  66. <Col id="datacolumn">* 동명이인환자 리스트를 참고하여 수정 *</Col>
  67. </Row>
  68. </Rows>
  69. </Dataset>
  70. </ListBox>
  71. </Layout>
  72. </Layouts>
  73. <Objects>
  74. <Dataset id="ds_main_patlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
  75. <ColumnInfo>
  76. <Column id="pid" type="STRING" size="256" sumtext="등록번호"/>
  77. <Column id="hngnm" type="STRING" size="256" sumtext="환자명"/>
  78. <Column id="hngnm2" type="STRING" size="256" sumtext="환자명2"/>
  79. <Column id="indd" type="STRING" size="256" sumtext="입원일자"/>
  80. <Column id="indschacptstat" type="STRING" size="256" sumtext="상태"/>
  81. <Column id="wardnm" type="STRING" size="256" sumtext="병동명"/>
  82. <Column id="roomcd" type="STRING" size="256" sumtext="병실코드"/>
  83. </ColumnInfo>
  84. </Dataset>
  85. <Dataset id="ds_send" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  86. <ColumnInfo>
  87. <Column id="pid" type="STRING" size="256"/>
  88. <Column id="hngnm2" type="STRING" size="256"/>
  89. <Column id="autoyn" type="STRING" size="256"/>
  90. <Column id="hngnm" type="STRING" size="256"/>
  91. </ColumnInfo>
  92. <Rows>
  93. <Row>
  94. <Col id="pid"/>
  95. <Col id="hngnm2"/>
  96. <Col id="autoyn"/>
  97. <Col id="hngnm"/>
  98. </Row>
  99. </Rows>
  100. </Dataset>
  101. <Dataset id="ds_main_patinfo" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  102. <ColumnInfo>
  103. <Column id="hngnm" type="STRING" size="256"/>
  104. <Column id="hngnm2" type="STRING" size="256"/>
  105. <Column id="newhngnm2" type="STRING" size="256"/>
  106. </ColumnInfo>
  107. <Rows>
  108. <Row>
  109. <Col id="hngnm"/>
  110. <Col id="hngnm2"/>
  111. <Col id="newhngnm2"/>
  112. </Row>
  113. </Rows>
  114. </Dataset>
  115. <Dataset id="ds_resultlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  116. <ColumnInfo>
  117. <Column id="hngnm" type="STRING" size="256" sumtext="환자명"/>
  118. <Column id="hngnm2" type="STRING" size="256" sumtext="표시명"/>
  119. </ColumnInfo>
  120. </Dataset>
  121. </Objects>
  122. <Bind>
  123. <BindItem id="item0" compid="input1" propid="value" datasetid="ds_send" columnid="pid"/>
  124. <BindItem id="item1" compid="input3" propid="value" datasetid="ds_main_patinfo" columnid="hngnm"/>
  125. <BindItem id="item2" compid="input4" propid="value" datasetid="ds_main_patinfo" columnid="hngnm2"/>
  126. <BindItem id="item3" compid="input2" propid="value" datasetid="ds_send" columnid="hngnm2"/>
  127. </Bind>
  128. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  129. * System Name :
  130. * Job Name :
  131. * Creator :
  132. * Make Date : 2016-05-24
  133. * Description :
  134. *---------------------------------------------------------------------------------------
  135. * Modify Date Modifier Modify Description
  136. *---------------------------------------------------------------------------------------
  137. * 2016-05-24 Live Converter TF->XP
  138. *
  139. *---------------------------------------------------------------------------------------
  140. ****************************************************************************************/
  141. //=======================================================================================
  142. // Lib Include
  143. //---------------------------------------------------------------------------------------
  144. include 'com_commonxp::comm_main.xjs';
  145. //=======================================================================================
  146. // Local Methods
  147. //---------------------------------------------------------------------------------------
  148. /****************************************************************************************
  149. * Argument :
  150. * Description : fSearch
  151. ****************************************************************************************/
  152. function fSearch(pid){
  153. ds_main_patinfo.setColumn(0, 'hngnm', '');
  154. ds_main_patinfo.setColumn(0, 'hngnm2', '');
  155. dsf_createDsRow('ds_req', [{ col: 'pid', type: 'string', size: 256, val: pid }], false);
  156. ds_resultlist.clearData();
  157. var oParam = {};
  158. oParam.id = "TRPMC07302";
  159. oParam.service = "patinfomngtapp.PatBaseInfo";
  160. oParam.method = "reqGetHngNm";
  161. oParam.inds = "req=ds_req";
  162. oParam.outds = "ds_resultlist=resultlist";
  163. oParam.async = false;
  164. //oParam.callback = "cf_TRPMC07302";
  165. tranf_submit(oParam);
  166. ds_main_patinfo.copyData(ds_resultlist);
  167. ds_main_patlist.clearData();
  168. ds_main_patlist.addRow();
  169. oParam = {};
  170. oParam.id = "TRPMC07300";
  171. oParam.service = "patinfomngtapp.PatBaseInfo";
  172. oParam.method = "reqGetNameConflictList";
  173. oParam.inds = "req=ds_req";
  174. oParam.outds = "ds_main_patlist=resultlist";
  175. oParam.async = false;
  176. //oParam.callback = "cf_TRPMC07300";
  177. tranf_submit(oParam);
  178. if(ds_main_patlist.rowcount < 1){
  179. sysf_messageBox('동명이인 환자가 존재하지 않습니다.', 'I000');
  180. }
  181. }
  182. /****************************************************************************************
  183. * Argument :
  184. * Description : fSave
  185. ****************************************************************************************/
  186. function fSave(pid, hngnm2){
  187. //ds_send.setColumn(0, "pid", ds_main_patinfo.getColumn(0, "pid")); // 화면상에 존재
  188. ds_send.setColumn(0, "hngnm", ds_main_patinfo.getColumn(0, "hngnm"));
  189. //ds_send.setColumn(0, "hngnm2", ds_main_patinfo.getColumn(0, "hngnm2")); // 화면상에 존재
  190. ds_send.setColumn(0, 'autoyn', 'N');
  191. var oParam = {};
  192. oParam.id = "TXPMC07301";
  193. oParam.service = "patinfomngtapp.PatBaseInfo";
  194. oParam.method = "reqSetHngnm2";
  195. oParam.inds = "req=ds_send";
  196. oParam.outds = "ds_resultlist=resultlist";
  197. oParam.async = false;
  198. tranf_submit(oParam);
  199. if(ds_resultlist.rowcount > 0){
  200. ds_main_patinfo.setColumn(0, "hngnm2", ds_resultlist.getColumn(0, "hngnm2"));
  201. sysf_messageBox('저장되었습니다.', 'I000');
  202. }
  203. return hngnm2;
  204. }
  205. /**
  206. * 화면호출없이 자동으로 중복제거 후 등록
  207. * @param {[type]} pid [description]
  208. * @param {[type]} hngnm [description]
  209. * @return {[type]} [description]
  210. */
  211. function fAutoSave(pid, hngnm) {
  212. ds_send.setColumn(0, "pid", pid);
  213. ds_send.setColumn(0, "hngnm", hngnm);
  214. ds_send.setColumn(0, "autoyn", "Y");
  215. dsf_createDs('ds_res');
  216. var oParam = {};
  217. oParam.id = "TXPMC07301";
  218. oParam.service = "patinfomngtapp.PatBaseInfo";
  219. oParam.method = "reqSetHngnm2";
  220. oParam.inds = "req=ds_send";
  221. oParam.outds = "ds_res=resultlist";
  222. oParam.async = false;
  223. tranf_submit(oParam);
  224. var hngnm2 = utlf_transNullToEmpty(ds_res.getColumn(0, "hngnm2"));
  225. return hngnm2;
  226. }
  227. //=======================================================================================
  228. // Events
  229. //---------------------------------------------------------------------------------------
  230. /****************************************************************************************
  231. * Argument :
  232. * Description : onload
  233. ****************************************************************************************/
  234. function SPPMC07300_onload(obj:Form, e:LoadEventInfo){
  235. // 폼 초기화
  236. frmf_initForm(obj);
  237. }
  238. /****************************************************************************************
  239. * Argument :
  240. * Description : 환자정보 환자번호 키보드 입력 이벤트
  241. ****************************************************************************************/
  242. function input1_onkeydown(obj:Edit, e:KeyEventInfo){
  243. if(e.keycode == 13){
  244. obj.updateToDataset();
  245. button1.click();
  246. }
  247. }
  248. /****************************************************************************************
  249. * Argument :
  250. * Description : 환자정보 환자번호 검색 아이콘 버튼 클릭 이벤트
  251. ****************************************************************************************/
  252. function button1_onclick(obj:Button, e:ClickEventInfo){
  253. var pid = ds_send.getColumn(0, 'pid');
  254. if(utlf_isNull(pid)){
  255. sysf_messageBox('환자번호는 필수입니다.', 'C000');
  256. return;
  257. }
  258. fSearch(pid);
  259. }
  260. /****************************************************************************************
  261. * Argument :
  262. * Description : 수정 버튼 클릭 이벤트
  263. ****************************************************************************************/
  264. function button2_onclick(obj:Button, e:ClickEventInfo){
  265. var pid = ds_send.getColumn(0, 'pid');
  266. var hngnm2 = ds_send.getColumn(0, 'hngnm2');
  267. // 필수값 체크
  268. if(utlf_isNull(pid) || utlf_isNull(hngnm2)){
  269. sysf_messageBox('환자번호 및 표시명은 필수입니다.', 'C000');
  270. return;
  271. }
  272. // 중복체크
  273. for(var i = 0; i < ds_main_patlist.rowcount; i++){
  274. if(ds_main_patlist.getColumn(i, 'hngnm2') == hngnm2){
  275. // 동일한 이름이 존재
  276. sysf_messageBox('동일한 표시명이 존재합니다. 표시명을 수정하십시요.', 'C000');
  277. return;
  278. }
  279. }
  280. fSave(pid, hngnm2);
  281. }
  282. function ListBox00_onitemdblclick(obj:ListBox, e:ListBoxClickEventInfo)
  283. {
  284. trace('dbclick');
  285. }
  286. ]]></Script>
  287. </Form>
  288. </FDL>