SPPIJ00800_퇴원확정변경.xfdl 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SPPIJ00800" position="absolute 0 0 866 331" titletext="퇴원확정 변경 관리" oninit="SPPIJ00800_oninit" onload="SPPIJ00800_onload">
  5. <Layouts>
  6. <Layout>
  7. <Shape id="rectangle1" type="rectangle" onclick="rectangle1_onclick" position="absolute 0 197 866 326" anchor="left right bottom"/>
  8. <Static text="퇴원확정 변경" position="absolute 0 0 115 21" id="caption1" class="tit_2" anchor="left top"/>
  9. <Shape position="absolute 0 17 866 23" linetype="horizontal" id="line1" class="line_1" style="strokepen:3 solid #33bbbbff;" anchor="left top right"/>
  10. <Static text="환자번호" position="absolute 0 24 71 43" id="caption3" class="cell_1" anchor="left top"/>
  11. <Edit position="absolute 70 24 170 43" id="ipt_pid" class="input_default" oneditclick="ipt_pid_oneditclick" onkeydown="ipt_pid_onkeydown" anchor="left top" autoselect="true" taborder="1"/>
  12. <Grid position="absolute 0 48 866 191" id="datagrid1" binddataset="ds_datagrid1" autofittype="col" cellsizingtype="col" anchor="all" oncloseup="datagrid1_oncloseup" taborder="4">
  13. <Formats>
  14. <Format id="default">
  15. <Columns>
  16. <Column size="17"/>
  17. <Column size="70"/>
  18. <Column size="75"/>
  19. <Column size="20"/>
  20. <Column size="20"/>
  21. <Column size="105"/>
  22. <Column size="70"/>
  23. <Column size="105"/>
  24. <Column size="20"/>
  25. <Column size="30"/>
  26. <Column size="191"/>
  27. <Column size="80"/>
  28. <Column size="30"/>
  29. <Column size="30"/>
  30. </Columns>
  31. <Rows>
  32. <Row size="34" 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="예&#13;&#10;고"/>
  40. <Cell col="4" text="확&#13;&#10;정"/>
  41. <Cell col="5" text="확정일자"/>
  42. <Cell col="6" text="확정자"/>
  43. <Cell col="7" text="수정일자"/>
  44. <Cell col="8" text="상&#13;&#10;태"/>
  45. <Cell col="9" text="추가&#13;&#10;처방"/>
  46. <Cell col="10" text="KTAS"/>
  47. <Cell col="11" text="변경사유"/>
  48. <Cell col="12" text="입외&#13;&#10;구분"/>
  49. <Cell col="13" text="사유&#13;&#10;이력"/>
  50. </Band>
  51. <Band id="body">
  52. <Cell celltype="head"/>
  53. <Cell col="1" text="bind:hngnm"/>
  54. <Cell col="2" displaytype="date" text="bind:indd" mask="yyyy-MM-dd"/>
  55. <Cell col="3" text="bind:dschdclrtyn"/>
  56. <Cell col="4" text="bind:dschnotiyn"/>
  57. <Cell col="5" displaytype="normal" edittype="none" text="bind:dschnotidt" mask="####-##-## ##:##"/>
  58. <Cell col="6" text="bind:dschnotirgstnm"/>
  59. <Cell col="7" displaytype="normal" edittype="none" text="bind:dschnotirgstdt" mask="####-##-## ##:##"/>
  60. <Cell col="8" text="bind:indschstat"/>
  61. <Cell col="9" text="bind:iprcaddyn" taborder="0"/>
  62. <Cell col="10" displaytype="combo" edittype="none" text="bind:specordtype" taborder="1" combodataset="ds_init_PK103list" combocodecol="cdid" combodatacol="detldesc" combodisplayrowcount="100"/>
  63. <Cell col="11" displaytype="text" text="bind:rem"/>
  64. <Cell col="12" displaytype="normal" edittype="none" text="bind:brateflag"/>
  65. <Cell col="13" displaytype="text" edittype="normal" text="bind:otheropinfo"/>
  66. </Band>
  67. </Format>
  68. </Formats>
  69. </Grid>
  70. <Button position="absolute 280 24 345 43" id="btn_noti" class="btn2" text="퇴원확정" onclick="btn_noti_onclick" anchor="left top" taborder="3"/>
  71. <Button position="absolute 180 24 277 43" id="btn_noticncl" class="btn2" text="퇴원확정 취소" onclick="btn_noticncl_onclick" anchor="left top" taborder="0"/>
  72. <Button position="absolute 813 24 866 43" id="btn_close" class="btn4" text="닫 기" onclick="btn_close_onclick" anchor="top right" taborder="2"/>
  73. <Static id="caption7" text="* 퇴원확정 취소 : 처방 DC 및 추가처방 가능 (확정='N', 확정자='심사자명', 추가처방='Y')" position="absolute 15 201 512 221" anchor="left bottom" style="color:blue;"/>
  74. <Static id="caption6" text="* 응급실/화학요법실/일일수술실 환자는 진행되지 않습니다. " position="absolute 15 281 358 301" anchor="left bottom" style="color:crimson;"/>
  75. <Static id="caption5" text="* 청구 생성된 환자인 경우 진행되지 않습니다." position="absolute 15 261 331 281" anchor="left bottom" style="color:crimson;"/>
  76. <Static id="caption4" text="* 상태가 &quot;가퇴원&quot; 혹은 &quot;퇴원&quot;인 경우 진행되지 않습니다." position="absolute 15 221 331 241" anchor="left bottom" style="color:crimson;"/>
  77. <Static id="caption2" text="* 퇴원 확정 당일인 경우 진행 되지 않습니다." position="absolute 15 241 303 261" anchor="left bottom" style="color:crimson;"/>
  78. <Static id="caption8" text=" → 2015년 3월 20일자로 모든 환자에 대해 변경 가능하도록 수정하였습니다. " position="absolute 15 301 446 321" anchor="left bottom" style="color:crimson;"/>
  79. <Button id="btn_ktas" taborder="5" text="KTAS &amp; 입외구분 변경" class="btn2" position="absolute 348 24 488 43" anchor="left top" onclick="btn_ktas_onclick"/>
  80. <Div id="grp_ktasresn" taborder="6" position="absolute 108 136 704 259" style="background:white;border:2 solid #808080ff ;" visible="false">
  81. <Layouts>
  82. <Layout>
  83. <Static id="caption1" text="KTAS &amp; 입외구분 변경사유 입력" class="tit_2" position="absolute 1 4 222 25" anchor="left top" onclick="grp_ktasresn_caption1_onclick"/>
  84. <TextArea id="ipt_rem" taborder="1" position="absolute 2 23 591 117" anchor="default"/>
  85. <Button id="btn_ktassave" taborder="2" text="변경 저장" position="absolute 467 1 539 21" class="btn5" onclick="grp_ktasresn_btn_ktassave_onclick" anchor="default"/>
  86. <Button id="Button00" taborder="3" text="닫기" position="absolute 540 1 591 21" class="btn4" onclick="grp_ktasresn_Button00_onclick" anchor="default"/>
  87. <Combo id="cmb_ktas" taborder="4" position="absolute 259 1 466 21" index="-1" innerdataset="@ds_init_PK103list" codecolumn="cdid" datacolumn="detldesc" visible="true" onitemchanged="grp_ktasresn_cmb_ktas_onitemchanged" anchor="default"/>
  88. </Layout>
  89. </Layouts>
  90. </Div>
  91. </Layout>
  92. </Layouts>
  93. <Objects>
  94. <Dataset id="ds_datagrid1" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
  95. <ColumnInfo>
  96. <Column id="hngnm" type="STRING"/>
  97. <Column id="indd" type="STRING"/>
  98. <Column id="dschdclrtyn" type="STRING"/>
  99. <Column id="dschnotiyn" type="STRING"/>
  100. <Column id="dschnotidt" type="STRING"/>
  101. <Column id="dschnotirgstnm" type="STRING"/>
  102. <Column id="dschnotirgstdt" type="STRING"/>
  103. <Column id="indschstat" type="STRING"/>
  104. <Column id="iprcaddyn" type="STRING"/>
  105. <Column id="cretno" type="STRING" size="256"/>
  106. <Column id="seqno" type="STRING" size="256"/>
  107. </ColumnInfo>
  108. </Dataset>
  109. <Dataset id="ds_send_upt" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  110. <ColumnInfo>
  111. <Column id="pid" type="STRING" size="256"/>
  112. <Column id="indd" type="STRING" size="256"/>
  113. <Column id="cretno" type="STRING" size="256"/>
  114. <Column id="seqno" type="STRING" size="256"/>
  115. <Column id="gbn" type="STRING" size="256"/>
  116. <Column id="specordtype" type="STRING" size="256"/>
  117. <Column id="brateflag" type="STRING" size="256"/>
  118. <Column id="rem" type="STRING" size="256"/>
  119. <Column id="otheropinfo" type="STRING" size="256"/>
  120. <Column id="remstatus" type="STRING" size="256"/>
  121. </ColumnInfo>
  122. <Rows>
  123. <Row/>
  124. </Rows>
  125. </Dataset>
  126. <Dataset id="ds_init_PK103list" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  127. </Objects>
  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. include "com_commonxp::comm_main.xjs";
  142. include "pam_pamcomnxp::PAM001.xjs";
  143. function SPPIJ00800_oninit(obj:Form, e:InitEventInfo)
  144. {
  145. frmf_initForm(obj);
  146. }
  147. function SPPIJ00800_onload(obj:Form, e:LoadEventInfo)
  148. {
  149. grdf_setRowTypeIcon(datagrid1, 0);
  150. grdf_setToolTipBind(datagrid1);
  151. var arrParam = new Array();
  152. arrParam = [{dsNm: "ds_init_PK103list", cdGrpId: "PK103", showValue: false}];
  153. pamfGetCodeList(arrParam, true, "cf_pamfGetCodeList");
  154. if(frmf_checkOpener()){
  155. ipt_pid.value = spid
  156. cf_TRPIJ00801();
  157. }
  158. }
  159. function cf_pamfGetCodeList(){
  160. var addrow = ds_init_PK103list.addRow();
  161. ds_init_PK103list.setColumn(addrow,"cdid","I");
  162. ds_init_PK103list.setColumn(addrow,"cdnm","I");
  163. ds_init_PK103list.setColumn(addrow,"detldesc","입퇴변경 I -> O");
  164. addrow = ds_init_PK103list.addRow();
  165. ds_init_PK103list.setColumn(addrow,"cdid","O");
  166. ds_init_PK103list.setColumn(addrow,"cdnm","O");
  167. ds_init_PK103list.setColumn(addrow,"detldesc","외퇴변경 O ->");
  168. }
  169. function fDschNotiChange(gubun) {
  170. var pid = ipt_pid.value;
  171. var row = ds_datagrid1.rowposition;
  172. var indd = ds_datagrid1.getColumn(row, "indd");
  173. var cretno = ds_datagrid1.getColumn(row, "cretno");
  174. var seqno = ds_datagrid1.getColumn(row, "seqno");
  175. var dschnotiyn = ds_datagrid1.getColumn(row, "dschnotiyn");
  176. var indschstat = ds_datagrid1.getColumn(row, "indschstat");
  177. var specordtype = ds_datagrid1.getColumn(row, "specordtype");
  178. var brateflag = ds_datagrid1.getColumn(row, "brateflag");
  179. var rem = ds_datagrid1.getColumn(row, "rem");
  180. var otheropinfo = ds_datagrid1.getColumn(row, "otheropinfo");
  181. var remstatus = ds_datagrid1.getColumn(row, "remstatus");
  182. var userid = sysf_getUserId();
  183. var specordtype_old = ds_datagrid1.getColumn(row, "specordtype_old");
  184. ds_send_upt.setColumn(0, "pid", pid);
  185. ds_send_upt.setColumn(0, "indd", indd);
  186. ds_send_upt.setColumn(0, "cretno", cretno);
  187. ds_send_upt.setColumn(0, "seqno", seqno);
  188. ds_send_upt.setColumn(0, "gbn", gubun);
  189. ds_send_upt.setColumn(0, "specordtype", specordtype);
  190. ds_send_upt.setColumn(0, "brateflag", brateflag);
  191. ds_send_upt.setColumn(0, "remstatus", remstatus);
  192. //if(pid == '')
  193. if( utlf_isNull(pid))
  194. {
  195. sysf_messageBox("변경할 대상이 ","I004");
  196. return;
  197. }
  198. if (gubun == "Y")
  199. {
  200. if (dschnotiyn == "Y")
  201. {
  202. sysf_messageBox("이미 퇴원확정 상태이므로 실행할 수","I004"); // 퇴원확정 클릭 시 기존 확정 상태 체크함
  203. return;
  204. }
  205. }
  206. if (gubun == "N") {
  207. if (indschstat != "재") {
  208. sysf_messageBox("상태가 가퇴원 혹은 퇴원인 경우 퇴원확정 취소할 수","I004"); // 퇴원확정 취소 클릭 시 수납 상태 체크함
  209. return;
  210. }
  211. if (dschnotiyn == "N") {
  212. sysf_messageBox("퇴원확정 상태가 아니므로 취소할 수","I004"); // 퇴원확정 취소 클릭 시 기존 확정 상태 체크함
  213. return;
  214. }
  215. }
  216. if (gubun == "K") {
  217. if (rem == grp_ktasresn.ipt_rem.value || utlf_isNull(grp_ktasresn.ipt_rem.value)) {
  218. sysf_messageBox("KTAS 변경 사유는","I003");
  219. return;
  220. }
  221. ds_send_upt.setColumn(0, "rem", utlf_transNullToEmpty(grp_ktasresn.ipt_rem.value));
  222. ds_send_upt.setColumn(0, "otheropinfo", utlf_transNullToEmpty(otheropinfo) +
  223. "\r\n[id:"+ userid +"]" +
  224. "[val:"+ specordtype_old +"]->" +
  225. "[val:"+ specordtype +"]" +
  226. "[dt:"+ utlf_getCurrentDateTime() +"]" +
  227. "[rem:"+ utlf_transNullToEmpty(grp_ktasresn.ipt_rem.value) +"]");
  228. }
  229. var oParam = {};
  230. oParam.id = "TXPIJ00801";
  231. oParam.service = "bfjudgapp.InHospJudg";
  232. oParam.method = "reqChgNoti";
  233. oParam.inds = "req=ds_send_upt";
  234. oParam.outds = "";
  235. oParam.async = false;
  236. oParam.callback = "cf_TRPIJ00801";
  237. tranf_submit(oParam);
  238. }
  239. function cf_TRPIJ00801(){
  240. ipt_pid.updateToDataset();
  241. dsf_createDsRow("ds_send", [{col:"pid", type:"STRING", size:256, val : ipt_pid.value}]);
  242. var oParam = {};
  243. oParam.id = "TRPIJ00801";
  244. oParam.service = "bfjudgapp.InHospJudg";
  245. oParam.method = "reqGetInpt";
  246. oParam.inds = "req=ds_send";
  247. oParam.outds = "ds_datagrid1=gridinpt";
  248. oParam.async = false;
  249. //oParam.callback = "cf_TRPIJ00801";
  250. tranf_submit(oParam);
  251. grp_ktasresn.visible = false;
  252. }
  253. function btn_close_onclick(obj:Button, e:ClickEventInfo)
  254. {
  255. this.close();
  256. }
  257. function btn_noticncl_onclick(obj:Button, e:ClickEventInfo)
  258. {
  259. fDschNotiChange('N');
  260. }
  261. function btn_noti_onclick(obj:Button, e:ClickEventInfo)
  262. {
  263. var posi = ds_datagrid1.rowposition;
  264. //응급실 퇴실취소 유무 체크하여 메세지 팝업 by 설승민 2020.03.09
  265. if(ds_datagrid1.getColumn(posi,"erorddeptcd") == '2280000000' && (ds_datagrid1.getColumn(posi,"eroutdt") == '-' || utlf_isNull(ds_datagrid1.getColumn(posi,"eroutdt")))){
  266. if(ds_datagrid1.getColumn(posi,"dschnotidt").substr(0,1) == '-'){
  267. sysf_messageBox("응급실 퇴실취소입니다. 응급실로 문의주세요");
  268. return;
  269. }
  270. }
  271. fDschNotiChange('Y');
  272. }
  273. function ipt_pid_onkeydown(obj:Edit, e:KeyEventInfo)
  274. {
  275. var Ids = dsf_createDsRow("ds_send", [{col:"pid", type:"STRING", size:256, val : ipt_pid.value}]);
  276. if(e.keycode == 13)
  277. {
  278. cf_TRPIJ00801();
  279. }
  280. }
  281. //function
  282. function datagrid1_onkeydown(obj:Grid, e:KeyEventInfo)
  283. {
  284. }
  285. function datagrid1_oncloseup(obj:Grid, e:GridEditEventInfo)
  286. {
  287. var ioflag = ds_init_PK103list.lookupExpr("cdid=='"+e.value+"'","cdnm");
  288. ds_datagrid1.setColumn(e.row, "brateflag", ioflag);
  289. }
  290. function btn_ktas_onclick(obj:Button, e:ClickEventInfo)
  291. {
  292. var row = ds_datagrid1.rowposition;
  293. var specordtype = ds_datagrid1.getColumn(row, "specordtype");
  294. grp_ktasresn.ipt_rem.value = "";
  295. grp_ktasresn.cmb_ktas.value = specordtype;
  296. grp_ktasresn.visible = true;
  297. }
  298. function grp_ktasresn_Button00_onclick(obj:Button, e:ClickEventInfo)
  299. {
  300. grp_ktasresn.visible = false;
  301. }
  302. function grp_ktasresn_btn_ktassave_onclick(obj:Button, e:ClickEventInfo)
  303. {
  304. fDschNotiChange('K');
  305. //grp_ktasresn.visible = false;
  306. }
  307. function grp_ktasresn_cmb_ktas_onitemchanged(obj:Combo, e:ItemChangeEventInfo)
  308. {
  309. var row = ds_datagrid1.rowposition;
  310. var ioflag = ds_init_PK103list.lookupExpr("cdid=='"+obj.value+"'","cdnm");
  311. if (obj.value != "I" && obj.value != "O") {
  312. ds_datagrid1.setColumn(row, "specordtype", obj.value);
  313. }
  314. ds_datagrid1.setColumn(row, "brateflag", ioflag);
  315. }
  316. function grp_ktasresn_caption1_onclick(obj:Static, e:ClickEventInfo)
  317. {
  318. }
  319. ]]></Script>
  320. </Form>
  321. </FDL>