SPMNW12800_이력정보.xfdl 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SPMNW12800" position="absolute 0 0 638 246" titletext="이력정보" onload="SPMNW12800_onload" oninit="SPMNW12800_oninit">
  5. <Layouts>
  6. <Layout>
  7. <Div position="absolute 0 0 633 244" id="grp_biz" scrollbars="autoboth">
  8. <Layouts>
  9. <Layout>
  10. <Static position="absolute 5 3 152 19" id="cap_title" class="tit_2" anchor="default"/>
  11. <Button position="absolute 589 0 631 19" id="button1" class="btn2" text="등록" onclick="grp_biz_button1_onclick" anchor="default"/>
  12. <Shape position="absolute 0 20 632 26" linetype="horizontal" id="line1" class="line_10" anchor="default"/>
  13. <Grid position="absolute 0 25 632 233" id="grd_inhist" visible="false" scrollbars="autoboth" binddataset="ds_grd_inhist" autofittype="col" anchor="default" autoenter="select">
  14. <Formats>
  15. <Format id="default">
  16. <Columns>
  17. <Column size="30"/>
  18. <Column size="75"/>
  19. <Column size="75"/>
  20. <Column size="240"/>
  21. <Column size="192"/>
  22. <Column size="0"/>
  23. </Columns>
  24. <Rows>
  25. <Row size="24" band="head"/>
  26. <Row size="24"/>
  27. </Rows>
  28. <Band id="head">
  29. <Cell text="선택"/>
  30. <Cell col="1" text="입원일자"/>
  31. <Cell col="2" text="퇴원일자"/>
  32. <Cell col="3" text="병명"/>
  33. <Cell col="4" text="진료기관"/>
  34. <Cell col="5" text="inhistpk"/>
  35. </Band>
  36. <Band id="body">
  37. <Cell displaytype="checkbox" edittype="checkbox" text="bind:chk"/>
  38. <Cell col="1" displaytype="date" text="bind:indd" mask="yyyy-MM-dd" calendardisplaynulltype="nulltext"/>
  39. <Cell col="2" displaytype="date" text="bind:dschdd" mask="yyyy-MM-dd" calendardisplaynulltype="nulltext"/>
  40. <Cell col="3" style="align:left;" text="bind:illnm"/>
  41. <Cell col="4" text="bind:orddept"/>
  42. <Cell col="5" text="bind:inhistpk"/>
  43. </Band>
  44. </Format>
  45. </Formats>
  46. </Grid>
  47. <Grid position="absolute 0 26 632 238" id="grd_ophist" visible="false" scrollbars="autoboth" binddataset="ds_grd_ophist" autofittype="col" anchor="default" autoenter="select">
  48. <Formats>
  49. <Format id="default">
  50. <Columns>
  51. <Column size="30"/>
  52. <Column size="75"/>
  53. <Column size="321"/>
  54. <Column size="187"/>
  55. <Column size="0"/>
  56. </Columns>
  57. <Rows>
  58. <Row size="24" band="head"/>
  59. <Row size="24"/>
  60. </Rows>
  61. <Band id="head">
  62. <Cell text="선택"/>
  63. <Cell col="1" text="수술일자"/>
  64. <Cell col="2" text="수술명"/>
  65. <Cell col="3" text="진료기관"/>
  66. <Cell col="4" text="ophistpk"/>
  67. </Band>
  68. <Band id="body">
  69. <Cell displaytype="checkbox" edittype="checkbox" text="bind:chk"/>
  70. <Cell col="1" displaytype="date" text="bind:opdd" mask="yyyy-MM-dd" calendardisplaynulltype="nulltext"/>
  71. <Cell col="2" style="align:left;" text="bind:opnm"/>
  72. <Cell col="3" text="bind:orddept"/>
  73. <Cell col="4" text="bind:ophistpk"/>
  74. </Band>
  75. </Format>
  76. </Formats>
  77. </Grid>
  78. </Layout>
  79. </Layouts>
  80. </Div>
  81. </Layout>
  82. </Layouts>
  83. <Objects>
  84. <Dataset id="ds_grd_inhist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
  85. <ColumnInfo>
  86. <Column id="chk" type="STRING" size="256" sumtext="체크"/>
  87. <Column id="indd" type="STRING" size="256" sumtext="입원일자"/>
  88. <Column id="dschdd" type="STRING" size="256" sumtext="퇴원일자"/>
  89. <Column id="illnm" type="STRING" size="256" sumtext="병명"/>
  90. <Column id="orddept" type="STRING" size="256" sumtext="진료기관"/>
  91. <Column id="inhistpk" type="STRING" size="256" sumtext="입원이력PK정보"/>
  92. </ColumnInfo>
  93. </Dataset>
  94. <Dataset id="ds_grd_ophist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
  95. <ColumnInfo>
  96. <Column id="chk" type="STRING"/>
  97. <Column id="opdd" type="STRING"/>
  98. <Column id="opnm" type="STRING"/>
  99. <Column id="orddept" type="STRING"/>
  100. <Column id="ophistpk" type="STRING"/>
  101. </ColumnInfo>
  102. </Dataset>
  103. <Dataset id="ds_send" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  104. </Objects>
  105. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  106. * System Name :
  107. * Job Name :
  108. * Creator :
  109. * Make Date : 2015-11-13
  110. * Description :
  111. *---------------------------------------------------------------------------------------
  112. * Modify Date Modifier Modify Description
  113. *---------------------------------------------------------------------------------------
  114. * 2015-11-13 Live Converter TF->XP
  115. *
  116. *---------------------------------------------------------------------------------------
  117. ****************************************************************************************/
  118. include "com_commonxp::comm_main.xjs";
  119. var parentFormId = "";
  120. function SPMNW12800_onload(obj:Form, e:LoadEventInfo)
  121. {
  122. //histflag : inhist (입원이력), ophist(수술이력)
  123. var histflag = opener.frmf_getParameter("histflag");
  124. var pid = opener.frmf_getParameter("pid");
  125. var indd = opener.frmf_getParameter("indd");
  126. var instcd = opener.frmf_getParameter("instcd");
  127. parentFormId = opener.frmf_getParameter("parentFormId");
  128. parentFormId = frmf_findPopup(parentFormId);
  129. if(histflag == "inhist"){
  130. grp_biz.cap_title.text = "입원이력정보";
  131. //grp_biz.grd_inhist.position.top = "25px";
  132. //grp_biz.grd_inhist.position.height = "278px";
  133. grp_biz.grd_inhist.visible = true;
  134. grp_biz.grd_ophist.visible = false;
  135. }else{
  136. grp_biz.cap_title.text = "수술이력정보";
  137. //grp_biz.grd_ophist.position.top = "25px";
  138. //grp_biz.grd_ophist.position.height = "278px";
  139. grp_biz.grd_ophist.visible = true;
  140. grp_biz.grd_inhist.visible = false;
  141. }
  142. ds_send.clearData();
  143. dsf_createDsRow("ds_send", [
  144. {col:"pid", type:"STRING", size:256, val: pid }
  145. , {col:"indd", type:"STRING", size:256, val: indd}
  146. , {col:"instcd", type:"STRING", size:256, val: instcd}
  147. , {col:"histflag", type:"STRING", size:256, val: histflag}
  148. ]);
  149. //submit("TRMNW12801");
  150. var oParam = {};
  151. oParam.id = "TRMNW12801";
  152. oParam.service = "wardcareapp.WardCareRec";
  153. oParam.method = "reqGetHistInfo";
  154. oParam.inds = "req=ds_send";
  155. oParam.outds = "ds_grd_inhist=inhistinfo ds_grd_ophist=ophistinfo";
  156. oParam.async = false;
  157. //oParam.callback = "cf_TRMNW12801";
  158. tranf_submit(oParam);
  159. if(ds_grd_inhist.rowcount > 0)
  160. {
  161. if(utlf_isNull(ds_grd_inhist.getColumnInfo("chk")))
  162. {
  163. dsf_makeValue(ds_grd_inhist, "chk", "string", "");
  164. }
  165. }
  166. if(ds_grd_ophist.rowcount > 0)
  167. {
  168. if(utlf_isNull(ds_grd_ophist.getColumnInfo("chk")))
  169. {
  170. dsf_makeValue(ds_grd_ophist, "chk", "string", "");
  171. }
  172. }
  173. }
  174. function grp_biz_button1_onclick(obj:Button, e:ClickEventInfo)
  175. {
  176. var histflag = opener.frmf_getParameter("histflag");
  177. //입원이력
  178. if(histflag == "inhist"){
  179. if (utlf_isNull(ds_grd_inhist.lookup("chk", "1", "chk")) ) {
  180. sysf_messageBox("선택된 항목이 ", "I004");
  181. return;
  182. }
  183. //동일이력 존재여부 체크
  184. for (i = 0; i < this.ds_grd_inhist.rowcount; i++) {
  185. if (ds_grd_inhist.getColumn( i, "chk") == "1") {
  186. var inhistpk = ds_grd_inhist.getColumn( i , "inhistpk");
  187. if(parentFormId.ds_data_inhist2.getCaseCount("inhistpk == '"+ inhistpk +"'") > 0)
  188. {
  189. sysf_messageBox("동일한 이력정보가 있습니다.", "I");
  190. return;
  191. }
  192. }
  193. }
  194. for (i = 0; i < ds_grd_inhist.rowcount; i++) {
  195. if (ds_grd_inhist.getColumn( i , "chk") == "1") {
  196. var bfinhistlist = parentFormId.ds_data_inhist2;
  197. if (bfinhistlist.rowcount == 0 || !utlf_isNull(parentFormId.ds_data_inhist2.getColumn( bfinhistlist.rowcount -1 , "indd"))){
  198. parentFormId.ds_data_inhist2.addRow();
  199. }
  200. var inhistlist = parentFormId.ds_data_inhist2;
  201. parentFormId.ds_data_inhist2.setColumn(inhistlist.rowcount - 1, "indd", ds_grd_inhist.getColumn( i , "indd"));
  202. parentFormId.ds_data_inhist2.setColumn(inhistlist.rowcount - 1, "dschdd", ds_grd_inhist.getColumn( i , "dschdd"));
  203. parentFormId.ds_data_inhist2.setColumn(inhistlist.rowcount - 1, "illnm", ds_grd_inhist.getColumn( i , "illnm"));
  204. parentFormId.ds_data_inhist2.setColumn(inhistlist.rowcount - 1, "orddept", ds_grd_inhist.getColumn( i , "orddept"));
  205. parentFormId.ds_data_inhist2.setColumn(inhistlist.rowcount - 1, "inhistpk", ds_grd_inhist.getColumn( i , "inhistpk"));
  206. }
  207. }
  208. //수술이력
  209. }else{
  210. if (utlf_isNull(ds_grd_ophist.lookup("chk", "1", "chk")) ) {
  211. sysf_messageBox("선택된 항목이 ", "I004");
  212. return;
  213. }
  214. //동일이력 존재여부 체크
  215. for (i = 0; i < ds_grd_ophist.rowcount; i++) {
  216. if (ds_grd_ophist.getColumn(i , "chk") == "1") {
  217. var ophistpk = ds_grd_ophist.getColumn(i , "ophistpk");
  218. sysf_trace(parentFormId)
  219. sysf_trace(parentFormId.name)
  220. if(parentFormId.ds_data_ophist2.getCaseCount("ophistpk == '"+ ophistpk +"'") > 0)
  221. {
  222. sysf_messageBox("동일한 이력정보가 있습니다.", "I");
  223. return;
  224. }
  225. }
  226. }
  227. for (i = 0; i < ds_grd_ophist.rowcount; i++) {
  228. if (ds_grd_ophist.getColumn(i , "chk") == "1") {
  229. var bfophistlist = parentFormId.ds_data_ophist2;
  230. if (bfophistlist.rowcount == 0 || !utlf_isNull(parentFormId.ds_data_ophist2.getColumn( bfophistlist.rowcount - 1, "opdd"))){
  231. parentFormId.ds_data_ophist2.addRow();
  232. }
  233. var ophistlist = parentFormId.ds_data_ophist2;
  234. parentFormId.ds_data_ophist2.setColumn( ophistlist.rowcount - 1, "opdd", ds_grd_ophist.getColumn( i , "opdd"));
  235. parentFormId.ds_data_ophist2.setColumn( ophistlist.rowcount - 1, "opnm", ds_grd_ophist.getColumn( i , "opnm"));
  236. parentFormId.ds_data_ophist2.setColumn( ophistlist.rowcount - 1, "orddept", ds_grd_ophist.getColumn( i , "orddept"));
  237. parentFormId.ds_data_ophist2.setColumn( ophistlist.rowcount - 1, "ophistpk", ds_grd_ophist.getColumn( i , "ophistpk"));
  238. }
  239. }
  240. //opener.grd_ophist.refresh();
  241. }
  242. //model.close();
  243. this.close();
  244. }
  245. function SPMNW12800_oninit(obj:Form, e:InitEventInfo)
  246. {
  247. frmf_initForm(obj);
  248. }
  249. ]]></Script>
  250. </Form>
  251. </FDL>