SMMND03700_유지종료예약취소.xfdl 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464
  1. <?xml version="1.0" encoding="utf-8" standalone="no"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SMMND03700" position="absolute 0 0 360 445" titletext="유지종료환자미래예약취소" onload="SMMND03700_onload" onbeforeclose="SMMND03700_onload SMMND03700_onbeforeclose">
  5. <Layouts>
  6. <Layout>
  7. <Grid id="grd_cvrt" binddataset="ds_main_detlrsrvlist_detlrsrvinfo" class="datagrid2" position="absolute 4 78 356 415" style="align:center ;" oncellclick="grd_cvrt_oncellclick">
  8. <Formats>
  9. <Format id="default">
  10. <Columns>
  11. <Column size="0"/>
  12. <Column size="0"/>
  13. <Column size="0"/>
  14. <Column size="0"/>
  15. <Column size="26"/>
  16. <Column size="56"/>
  17. <Column size="77"/>
  18. <Column size="32"/>
  19. <Column size="33"/>
  20. <Column size="33"/>
  21. <Column size="36"/>
  22. <Column size="52"/>
  23. <Column size="0"/>
  24. <Column size="0"/>
  25. <Column size="0"/>
  26. <Column size="0"/>
  27. <Column size="0"/>
  28. <Column size="0"/>
  29. </Columns>
  30. <Rows>
  31. <Row size="24" band="head"/>
  32. <Row size="24"/>
  33. </Rows>
  34. <Band id="head">
  35. <Cell text="status"/>
  36. <Cell col="1" text="등록번호"/>
  37. <Cell col="2" text="환자명"/>
  38. <Cell col="3" text="S_A"/>
  39. <Cell col="4" text=""/>
  40. <Cell col="5" text="투석구분"/>
  41. <Cell col="6" text="예약일자"/>
  42. <Cell col="7" text="요일"/>
  43. <Cell col="8" text="Shift"/>
  44. <Cell col="9" text="구분"/>
  45. <Cell col="10" text="Bed &#10;No."/>
  46. <Cell col="11" text="Viral&#10;marker"/>
  47. <Cell col="12" text="수납"/>
  48. <Cell col="13" text="histstat"/>
  49. <Cell col="14" text="orddd"/>
  50. <Cell col="15" text="cretno"/>
  51. <Cell col="16" text="orddeptcd"/>
  52. <Cell col="17" text="orddrid"/>
  53. </Band>
  54. <Band id="body">
  55. <Cell text="bind:status"/>
  56. <Cell col="1" text="bind:pid"/>
  57. <Cell col="2" text="bind:hngnm"/>
  58. <Cell col="3" text="bind:sexage"/>
  59. <Cell col="4" text="bind:acptyn"/>
  60. <Cell col="5" text="bind:dialflag"/>
  61. <Cell col="6" text="bind:rsrvdd"/>
  62. <Cell col="7" text="bind:dw"/>
  63. <Cell col="8" text="bind:shiftflag"/>
  64. <Cell col="9" text="bind:ioflag"/>
  65. <Cell col="10" text="bind:dialseatflag"/>
  66. <Cell col="11" text="bind:viralmarker"/>
  67. <Cell col="12" text="bind:rcptflag"/>
  68. <Cell col="13" text="bind:histstat"/>
  69. <Cell col="14" text="bind:orddd"/>
  70. <Cell col="15" text="bind:cretno"/>
  71. <Cell col="16" text="bind:orddeptcd"/>
  72. <Cell col="17" text="bind:orddrid"/>
  73. </Band>
  74. </Format>
  75. </Formats>
  76. </Grid>
  77. <Static id="caption7" class="tit_2" position="absolute 9 61 115 77" style="align: bottom;" text="상세 예약정보"/>
  78. <Shape id="line8" class="line_1" linetype="horizontal" position="absolute 5 21 355 25" style="strokepen:3 solid #33bbbbff;align:bottom;" anchor="default"/>
  79. <Static id="caption3" class="tit_2" position="absolute 10 4 160 20" style="align: bottom;" text="유지종료미래예약취소"/>
  80. <Shape id="line1" class="line_1" linetype="horizontal" position="absolute 5 50 355 53" style="align: bottom;" anchor="default"/>
  81. <Edit id="ipt_pid" class="input_default" position="absolute 66 27 138 46" style="" anchor="default" autoselect="true"/>
  82. <Static id="caption9" class="cell_1" position="absolute 5 25 64 48" style="align:center middle;" text="등록번호"/>
  83. <Edit id="opt_hngnm" class="output_fix" position="absolute 143 26 206 45" style="align:center ;" anchor="default" readonly="true" autoselect="true"/>
  84. <Edit id="opt_sa" class="output_fix" position="absolute 211 26 251 45" style="align:center ;" anchor="default" readonly="true" autoselect="true"/>
  85. <Button id="btn_save" class="btn2" position="absolute 308 26 350 45" style="" text="취소" onclick="btn_save_onclick"/>
  86. <Button id="btn_close" class="btn4" position="absolute 295 420 351 442" style="" text="닫기" onclick="btn_close_onclick"/>
  87. </Layout>
  88. </Layouts>
  89. <Objects>
  90. <Dataset id="ds_main_detlrsrvlist_detlrsrvinfo" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  91. <ColumnInfo>
  92. <Column id="status" type="STRING" size="256"/>
  93. <Column id="pid" type="STRING" size="256"/>
  94. <Column id="hngnm" type="STRING" size="256"/>
  95. <Column id="sexage" type="STRING" size="256"/>
  96. <Column id="acptyn" type="STRING" size="256"/>
  97. <Column id="rsrvdd" type="STRING" size="256"/>
  98. <Column id="dw" type="STRING" size="256"/>
  99. <Column id="shiftflag" type="STRING" size="256"/>
  100. <Column id="ioflag" type="STRING" size="256"/>
  101. <Column id="dialseatflag" type="STRING" size="256"/>
  102. <Column id="viralmarker" type="STRING" size="256"/>
  103. <Column id="rcptflag" type="STRING" size="256"/>
  104. <Column id="histstat" type="STRING" size="256"/>
  105. <Column id="orddd" type="STRING" size="256"/>
  106. <Column id="cretno" type="STRING" size="256"/>
  107. <Column id="orddeptcd" type="STRING" size="256"/>
  108. <Column id="orddrid" type="STRING" size="256"/>
  109. <Column id="dialflag" type="STRING" size="256"/>
  110. </ColumnInfo>
  111. <Rows>
  112. <Row>
  113. <Col id="status"/>
  114. <Col id="pid"/>
  115. <Col id="hngnm"/>
  116. <Col id="sexage"/>
  117. <Col id="acptyn"/>
  118. <Col id="rsrvdd"/>
  119. <Col id="dw"/>
  120. <Col id="shiftflag"/>
  121. <Col id="ioflag"/>
  122. <Col id="dialseatflag"/>
  123. <Col id="viralmarker"/>
  124. <Col id="rcptflag"/>
  125. <Col id="histstat"/>
  126. <Col id="orddd"/>
  127. <Col id="cretno"/>
  128. <Col id="orddeptcd"/>
  129. <Col id="orddrid"/>
  130. <Col id="dialflag"/>
  131. </Row>
  132. </Rows>
  133. </Dataset>
  134. <Dataset id="ds_main" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  135. <ColumnInfo/>
  136. </Dataset>
  137. <Dataset id="ds_temp" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  138. <ColumnInfo>
  139. <Column id="rtnmsg" type="STRING" size="256"/>
  140. </ColumnInfo>
  141. <Rows>
  142. <Row>
  143. <Col id="rtnmsg"/>
  144. </Row>
  145. </Rows>
  146. </Dataset>
  147. <Dataset id="ds_send" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  148. <ColumnInfo>
  149. <Column id="reqdata" type="STRING" size="256"/>
  150. <Column id="savedata" type="STRING" size="256"/>
  151. <Column id="date" type="STRING" size="256"/>
  152. </ColumnInfo>
  153. </Dataset>
  154. <Dataset id="ds_main_detlrsrvlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  155. <ColumnInfo/>
  156. </Dataset>
  157. <Dataset id="ds_main_detlrsrvlist_detlrsrvsrch" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  158. <ColumnInfo>
  159. <Column id="pid" type="STRING" size="256"/>
  160. <Column id="hngnm" type="STRING" size="256"/>
  161. <Column id="srchdd1" type="STRING" size="256"/>
  162. <Column id="srchdd2" type="STRING" size="256"/>
  163. <Column id="sa" type="STRING" size="256"/>
  164. <Column id="dialflag" type="STRING" size="256"/>
  165. </ColumnInfo>
  166. <Rows>
  167. <Row>
  168. <Col id="pid"/>
  169. <Col id="hngnm"/>
  170. <Col id="srchdd1"/>
  171. <Col id="srchdd2"/>
  172. <Col id="sa"/>
  173. <Col id="dialflag"/>
  174. </Row>
  175. </Rows>
  176. </Dataset>
  177. <Dataset id="ds_send_reqdata" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  178. <Dataset id="ds_send_savedata" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  179. </Objects>
  180. <Bind>
  181. <BindItem id="item0" compid="ipt_pid" propid="value" datasetid="ds_main_detlrsrvlist_detlrsrvsrch" columnid="pid"/>
  182. <BindItem id="item1" compid="opt_hngnm" propid="value" datasetid="ds_main_detlrsrvlist_detlrsrvsrch" columnid="hngnm"/>
  183. <BindItem id="item2" compid="opt_sa" propid="value" datasetid="ds_main_detlrsrvlist_detlrsrvsrch" columnid="sa"/>
  184. </Bind>
  185. <Script type="xscript4.0"><![CDATA[include 'com_commonxp::comm_main.xjs';
  186. include 'emr_carecomxp::CareCom.xjs';
  187. //include 'emr_dialroomxp::SMMND03700.xjs';
  188. var arErrorCode = new HashArray();
  189. function SMMND03700_onload(obj:Form, e:LoadEventInfo) {
  190. frmf_initForm(obj);
  191. grdf_initGrid(this.grd_cvrt);
  192. //grdf_setGridSort(grd_XXX);
  193. //grdf_setRowTypeIcon(grd_XXX, 0_컬럼위치값);
  194. fInit();
  195. grd_cvrt.fixedcellcheckbox(0,4)=true; //체크박스 위에 전체 선택 하는 콤보 셋팅
  196. }
  197. function SMMND03700_onbeforeclose(obj:Form, e:CloseEventInfo) {
  198. var dialflag = ds_main_detlrsrvlist_detlrsrvsrch.getColumn(0, "dialflag");
  199. /* 취소시 해당투석예약의 체크여부를 체크 */
  200. for(i=1;i<=ds_main_detlrsrvlist_detlrsrvinfo.rowcount;i++){
  201. if(ds_main_detlrsrvlist_detlrsrvinfo.getColumn(i, "acptyn") == "false"){
  202. if(ds_main_detlrsrvlist_detlrsrvinfo.getColumn(i, "dialflag") == dialflag){
  203. sysf_messageBox("해당투석예약을 다 체크 후 예약취소를 하셔야합니다.", "E");// ipt_pid.setFocus();
  204. return;
  205. }
  206. }
  207. }
  208. }
  209. // header파일 중 SMMND03700.js 파일 시작
  210. /*
  211. HD Scheduling (SMMND03700.xrw - JScript )
  212. - Version :
  213. 1) : Ver.1.00.01
  214. */
  215. /**
  216. * _group :
  217. * _ver : 2009.02.24
  218. * _by : 김양수
  219. * _---------------------------------------------------
  220. * _type : function
  221. * _access : public
  222. * _desc : 화면 초기화..
  223. * _param :
  224. * _return :
  225. * _---------------------------------------------------
  226. */
  227. function fInit(){
  228. var sRtn = utlf_getCurrentDate(); //현재일자 리턴
  229. /** 받아온 Param Setting **/
  230. var value = opener.frmf_getParameter("SMMND03700_patinfo");
  231. value = value.split("▦");
  232. var pid = value[0];
  233. var pnm = value[1];
  234. var sa = value[2];
  235. var dialflag = value[3];
  236. ds_main_detlrsrvlist_detlrsrvsrch.setColumn( 0, "pid", pid);
  237. ds_main_detlrsrvlist_detlrsrvsrch.setColumn( 0, "hngnm", pnm);
  238. ds_main_detlrsrvlist_detlrsrvsrch.setColumn( 0, "sa", sa);
  239. ds_main_detlrsrvlist_detlrsrvsrch.setColumn( 0, "dialflag", dialflag);
  240. /** 조회일자계산(2년 후 일자) **/
  241. ds_main_detlrsrvlist_detlrsrvsrch.setColumn( 0, "srchdd1",sRtn);
  242. var sRtnOneMonthLater = ((sRtn.toDate().getAddDate(2, "Y"))).getDateFormat(); // 2년 후 일자
  243. ds_main_detlrsrvlist_detlrsrvsrch.setColumn( 0, "srchdd2",sRtnOneMonthLater);
  244. //model.refresh();
  245. fSrchDetlrSrvInfo(); //상세예약정보 조회
  246. }
  247. /**
  248. * _group :
  249. * _ver : 2009.02.24
  250. * _by : 김양수
  251. * _---------------------------------------------------
  252. * _type : function
  253. * _access : public
  254. * _desc : 상세 예약정보 조회(환자개인별)
  255. * _param :
  256. * _return :
  257. * _---------------------------------------------------
  258. */
  259. function fSrchDetlrSrvInfo(){
  260. //* 환자 등록번호 입력여부 체크 *//
  261. if(ds_main_detlrsrvlist_detlrsrvsrch.getColumn(0, "pid") == ""){
  262. sysf_messageBox("등록번호를 입력하십시오.", "E"); ipt_pid.setFocus();
  263. return;
  264. }
  265. //* 상세 예약정보 리스트를 조회한다. *//
  266. ds_send_reqdata.clearData();
  267. dsf_makeValue( ds_send_reqdata, "pid", "string", ds_main_detlrsrvlist_detlrsrvsrch.getColumn(0, "pid"));
  268. dsf_makeValue( ds_send_reqdata, "srchdd1", "string", ds_main_detlrsrvlist_detlrsrvsrch.getColumn(0, "srchdd1")); //선택된날자~2년후날자조회
  269. dsf_makeValue( ds_send_reqdata, "srchdd2", "string", ds_main_detlrsrvlist_detlrsrvsrch.getColumn(0, "srchdd2"));
  270. dsf_makeValue( ds_send_reqdata, "dialflag", "string", ds_main_detlrsrvlist_detlrsrvsrch.getColumn(0, "dialflag")); //투석구분
  271. ds_main_detlrsrvlist_detlrsrvinfo.clearData();
  272. // if(submit("TRMND03600", false)){
  273. var oParam = {};
  274. oParam.id = "TRMND03600";
  275. oParam.service = "dialapp.DialPatMngt";
  276. oParam.method = "reqGetEndDetlRsrvInfo";
  277. oParam.inds = "req=ds_send_reqdata";
  278. oParam.outds = "ds_main_detlrsrvlist_detlrsrvinfo=detlrsrvinfo";
  279. oParam.async = false;
  280. oParam.callback = "cf_TRMND03600";
  281. tranf_submit(oParam);
  282. if(arErrorCode.pop("TRMND03600") > -1) {
  283. //복막투석일경우 shift의 의미가 없으므로 조회가 되면 안됨-20090302
  284. for(var i = 0; i < ds_main_detlrsrvlist_detlrsrvinfo.rowcount; i++){
  285. if(ds_main_detlrsrvlist_detlrsrvinfo.getColumn(i, "dialflag") == "P"){
  286. ds_main_detlrsrvlist.setColumn( i , "shiftflag", "");
  287. }
  288. }
  289. /* 체크박스 초기화 */
  290. for(var i = 0; i < ds_main_detlrsrvlist_detlrsrvinfo.rowcount; i++){
  291. ds_main_detlrsrvlist.setColumn( i , "acptyn", "false");
  292. }
  293. }
  294. //
  295. //grd_cvrt.refresh();
  296. //grd_cvrt.allstyle("all", "background-color") = "white";
  297. //grd_cvrt.refresh();
  298. }
  299. function cf_TRMND03600(sSvcId, nErrorCode, sErrorMsg) {
  300. arErrorCode.push(sSvcId, nErrorCode);
  301. }
  302. /**
  303. * _group :
  304. * _ver : 2009.02.24
  305. * _by : 김양수
  306. * _---------------------------------------------------
  307. * _type : function
  308. * _access : public
  309. * _desc : 상세 예약정보 취소(환자개인별)
  310. * _param :
  311. * _return :
  312. * _---------------------------------------------------
  313. */
  314. function fRsrvCancel(){
  315. var dialflag = ds_main_detlrsrvlist_detlrsrvsrch.getColumn(0, "dialflag");
  316. /* 취소시 해당투석예약의 체크여부를 체크 */
  317. for(i=1;i<=ds_main_detlrsrvlist_detlrsrvinfo.rowcount;i++){
  318. if(ds_main_detlrsrvlist_detlrsrvinfo.getColumn(i, "acptyn") == "false"){
  319. if(ds_main_detlrsrvlist_detlrsrvinfo.getColumn(i, "dialflag") == dialflag){
  320. sysf_messageBox("해당투석예약을 다 체크 후 예약취소를 하셔야합니다.", "E");// ipt_pid.setFocus();
  321. return;
  322. }
  323. }
  324. }
  325. /* 상태정보 setting */
  326. for(var i = 1; i <= grd_cvrt.rows; i++){
  327. if(ds_main_detlrsrvlist_detlrsrvinfo.getColumn(i, "acptyn") == "true"){
  328. grd_cvrt.textmatrix(i,0) = "d";
  329. }else{
  330. grd_cvrt.textmatrix(i,0) = "";
  331. }
  332. }
  333. ds_send_savedata.clearData();
  334. //dsf_makeValue( ds_send, "savedata", "string", grd_cvrt.getupdatedataAll("i"));
  335. dsf_copyDs(ds_send_savedata, grdf_getGridUpdateData(grd_cvrt),"replace");
  336. // if(submit("TXMND01101") == true){
  337. var oParam = {};
  338. oParam.id = "TXMND01101";
  339. oParam.service = "dialapp.DialPatMngt";
  340. oParam.method = "reqExeSaveDetlrSrvInfo";
  341. oParam.inds = "req=ds_send_savedata";
  342. oParam.outds = "ds_temp=rtnmsg";
  343. oParam.async = false;
  344. oParam.callback = "cf_TXMND01101";
  345. tranf_submit(oParam);
  346. if(arErrorCode.pop("TXMND01101") > -1) {
  347. sysf_messageBox("", "I001", ""); //성공 메세지
  348. fSrchDetlrSrvInfo(); //결과조회 함수호출
  349. }
  350. }
  351. function cf_TXMND01101(sSvcId, nErrorCode, sErrorMsg) {
  352. arErrorCode.push(sSvcId, nErrorCode);
  353. }
  354. /**
  355. * _group :
  356. * _ver : 2009.02.25
  357. * _by : 김양수
  358. * _---------------------------------------------------
  359. * _type : function
  360. * _access : public
  361. * _desc : 그리드 클릭시 선택컬럼 값 변경
  362. * _param :
  363. * _return :
  364. * _---------------------------------------------------
  365. */
  366. function fClickedGridRow(e){
  367. var iRow = 0;
  368. var iCol = 0;
  369. iRow = e.row;
  370. iCol = e.col;
  371. //** 전체선택 체크박스 기능 ******************************************//
  372. if(iRow == "0"){
  373. if(grd_cvrt.fixedcellischeck(0, grd_cvrt.colRef("acptyn"))==true){ // 선택시
  374. for(i = 0; i < ds_main_detlrsrvlist_detlrsrvinfo.rowcount;i++){
  375. ds_main_detlrsrvlist_detlrsrvinfo.setColumn( i, "acptyn", "true");
  376. }
  377. } else{
  378. for(i = 0; i < ds_main_detlrsrvlist_detlrsrvinfo.rowcount;i++){
  379. ds_main_detlrsrvlist_detlrsrvinfo.setColumn( i, "acptyn", "false");
  380. }
  381. }
  382. }
  383. //***************************************************************************************//
  384. if(iCol == 4) return;
  385. if(iRow < 1) return;
  386. if(ds_main_detlrsrvlist_detlrsrvinfo.getColumn(iRow, "acptyn")) == "true"){
  387. ds_main_detlrsrvlist.setColumn( iRow , "acptyn","false");
  388. }else{
  389. ds_main_detlrsrvlist.setColumn( iRow , "acptyn", "true");
  390. }
  391. }
  392. // header파일 중 SMMND03700.js 파일 끝
  393. function grd_cvrt_oncellclick(obj:Grid, e:GridClickEventInfo) {
  394. fClickedGridRow(e);
  395. }
  396. function btn_save_onclick(obj:Button, e:ClickEventInfo) {
  397. fRsrvCancel();
  398. }
  399. function btn_close_onclick(obj:Button, e:ClickEventInfo) {
  400. var dialflag = ds_main_detlrsrvlist_detlrsrvsrch.getColumn(0, "dialflag");
  401. /* 취소시 해당투석예약의 체크여부를 체크 */
  402. for(i=0;i < ds_main_detlrsrvlist_detlrsrvinfo.rowcount;i++){
  403. if(ds_main_detlrsrvlist_detlrsrvinfo.getColumn(i, "acptyn") == "false"){
  404. if(ds_main_detlrsrvlist_detlrsrvinfo.getColumn(i, "dialflag") == dialflag){
  405. sysf_messageBox("해당투석예약을 다 체크 후 예약취소를 하셔야합니다.", "E");// ipt_pid.setFocus();
  406. return;
  407. }
  408. }
  409. }
  410. this.close();
  411. }
  412. ]]></Script>
  413. </Form>
  414. </FDL>