SMMQI04100_항암FlowSheetBatch.xfdl 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.4">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SMMQI04100" position="absolute 0 0 325 120" titletext="항암FlowSheet배치" oninit="SMMQI04100_oninit" onload="SMMQI04100_onload">
  5. <Layouts>
  6. <Layout>
  7. <Shape position="absolute 0 10 309 65" id="roundrect1" type="roundrectangle"/>
  8. <Button position="absolute 190 70 246 92" id="button1" class="btn4" text="확인" onclick="button1_onclick"/>
  9. <Button position="absolute 250 70 306 92" id="button2" class="btn4" text="취소" onclick="button2_onclick"/>
  10. <Static text="배치일자:" position="absolute 5 20 91 37" id="caption1" class="search_name"/>
  11. <Calendar position="absolute 90 20 180 39" id="input2" class="input_s_essential"/>
  12. <Calendar position="absolute 205 20 295 39" id="input1" class="input_s_essential"/>
  13. <Static text="~" position="absolute 185 20 200 40" id="caption2"/>
  14. <Static text="작업 상 시간이 걸릴수 있습니다." position="absolute 4 73 182 93" id="caption3"/>
  15. <Static text="환자번호:" position="absolute 5 43 94 60" id="caption4" class="search_name"/>
  16. <Edit position="absolute 90 41 190 60" id="input3"/>
  17. </Layout>
  18. </Layouts>
  19. <Objects>
  20. <Dataset id="ds_main_cond" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  21. <ColumnInfo>
  22. <Column id="fromdd" type="STRING" size="256"/>
  23. <Column id="todd" type="STRING" size="256"/>
  24. <Column id="instcd" type="STRING" size="256"/>
  25. <Column id="pid" type="STRING" size="256"/>
  26. <Column id="userid" type="STRING" size="256"/>
  27. </ColumnInfo>
  28. <Rows>
  29. <Row/>
  30. </Rows>
  31. </Dataset>
  32. <Dataset id="ds_send" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  33. <Dataset id="ds_init_bathexec" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  34. <Dataset id="ds_temp_countinfo" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  35. <ColumnInfo>
  36. <Column id="count" type="STRING" size="256"/>
  37. </ColumnInfo>
  38. <Rows>
  39. <Row/>
  40. </Rows>
  41. </Dataset>
  42. </Objects>
  43. <Bind>
  44. <BindItem id="item0" compid="input2" propid="value" datasetid="ds_main_cond" columnid="fromdd"/>
  45. <BindItem id="item1" compid="input1" propid="value" datasetid="ds_main_cond" columnid="todd"/>
  46. <BindItem id="item2" compid="input3" propid="value" datasetid="ds_main_cond" columnid="pid"/>
  47. </Bind>
  48. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  49. * System Name :
  50. * Job Name :
  51. * Creator :
  52. * Make Date : 2015-03-11
  53. * Description :
  54. *---------------------------------------------------------------------------------------
  55. * Modify Date Modifier Modify Description
  56. *---------------------------------------------------------------------------------------
  57. * 2015-03-11 Live Converter TF->XP
  58. *
  59. *---------------------------------------------------------------------------------------
  60. ****************************************************************************************/
  61. include "com_commonxp::comm_main.xjs";
  62. include "emr_prcpmngtxp::MMOCommon.xjs";
  63. include "emr_prcpmngtxp::MMO001.xjs";
  64. var arErrorCode = new HashArray();
  65. function SMMQI04100_oninit(obj:Form, e:InitEventInfo)
  66. {
  67. frmf_initForm(obj);
  68. }
  69. function SMMQI04100_onload(obj:Form, e:LoadEventInfo)
  70. {
  71. fInitialize();
  72. }
  73. function button1_onclick(obj:Button, e:ClickEventInfo)
  74. {
  75. fCnfmBtn();
  76. }
  77. function button2_onclick(obj:Button, e:ClickEventInfo)
  78. {
  79. fClose();
  80. }
  81. /**
  82. * @desc : 초기화
  83. * @
  84. * @param :
  85. * @return :
  86. * @---------------------------------------------------
  87. */
  88. function fInitialize(){
  89. ds_main_cond.setColumn(0,"instcd", sysf_getUserInfo("dutplceinstcd"));
  90. ds_main_cond.setColumn(0,"userid", sysf_getUserInfo("userid"));
  91. ds_main_cond.setColumn(0,"fromdd", utlf_getCurrentDate());
  92. ds_main_cond.setColumn(0,"todd", utlf_getCurrentDate());
  93. lf_getHardCDList("N", 5666, 0 , "ds_init_bathexec");
  94. //lf_gethardcdArrayList(new Array("ds_init_bathexec|5666"));
  95. }
  96. /**
  97. * @desc : 미비 확인
  98. * @
  99. * @param :
  100. * @return :
  101. * @---------------------------------------------------
  102. */
  103. function fCnfmBtn(){
  104. if(utlf_isNull(ds_main_cond.getColumn(0,"pid").getTrim())){
  105. if(utlf_isNull(ds_init_bathexec.lookup("hardcd", sysf_getUserId(),"hardcd"))){
  106. if( utlf_getDateInterval(ds_main_cond.getColumn(0,"fromdd"), ds_main_cond.getColumn(0,"todd")) > 31 ){
  107. sysf_messageBox("배치 최대 기간은 1달입니다. 일자구분에서 날짜를 수정하세요!", "E999", "");
  108. return false;
  109. }
  110. }
  111. }
  112. //model.resetInstanceNode("/root/temp/countinfo/count");
  113. var oParam = {};
  114. oParam.id = "TRMQI04100";
  115. oParam.service = "qiapp.QIdxMngt";
  116. oParam.method = "reqGetAntiCancerFlowSheetCount";
  117. oParam.inds = "req=ds_main_cond";
  118. oParam.outds = "ds_temp_countinfo=countinfo";
  119. oParam.async = false;
  120. oParam.callback = "cf_TRMQI04100";
  121. tranf_submit(oParam);
  122. var count = ds_temp_countinfo.getColumn(0,"count");
  123. if(count > 0){
  124. var flag = sysf_messageBox(ds_main_cond.getColumn(0,"fromdd")+" ~ "+ ds_main_cond.getColumn(0,"todd")+" 사이에 "+ count + "건의 배치정보가 존재 합니다. \n" , "Q003");
  125. if(flag == "6"){
  126. fExecute();
  127. }
  128. }else{
  129. fExecute();
  130. }
  131. }
  132. function cf_TRMQI04100(sSvcId, nErrorCode, sErrorMsg) {
  133. if(nErrorCode < 0) return;
  134. }
  135. function fExecute(){
  136. var oParam = {};
  137. oParam.id = "TXMQI04100";
  138. oParam.service = "qiapp.QIdxMngt";
  139. oParam.method = "reqExeAntiCancerFlowSheetBatch";
  140. oParam.inds = "req=ds_main_cond";
  141. oParam.outds = "";
  142. oParam.async = false;
  143. oParam.callback = "cf_TXMQI04100";
  144. tranf_submit(oParam);
  145. if (arErrorCode.pop("TXMQI04100") > -1){
  146. alert("미비 배치가 성공하였습니다. ");
  147. }else {
  148. alert("미비 배치가 실패하였습니다. 담당자에게 문의 바랍니다. ");
  149. }
  150. }
  151. function cf_TXMQI04100(sSvcId, nErrorCode, sErrorMsg) {
  152. arErrorCode.push(sSvcId, nErrorCode);
  153. }
  154. /**
  155. * @desc : Close
  156. * @
  157. * @param :
  158. * @return :
  159. * @---------------------------------------------------
  160. */
  161. function fClose(){
  162. close();
  163. }
  164. ]]></Script>
  165. </Form>
  166. </FDL>