SPPMC04100_진료의뢰서입력.xfdl 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SPPMC04100" position="absolute 0 0 684 395" titletext="진료의뢰서환자입력" onload="SPPMC04100_onload">
  5. <Layouts>
  6. <Layout>
  7. <Grid id="grd_ordreqfrm" taborder="1" binddataset="ds_main_h_cnst" useinputpanel="false" position="absolute 0 28 675 362" autoenter="select">
  8. <Formats>
  9. <Format id="default">
  10. <Columns>
  11. <Column size="25" band="left"/>
  12. <Column size="0"/>
  13. <Column size="0"/>
  14. <Column size="120"/>
  15. <Column size="70"/>
  16. <Column size="98"/>
  17. <Column size="0"/>
  18. <Column size="0"/>
  19. <Column size="0"/>
  20. <Column size="0"/>
  21. <Column size="0"/>
  22. <Column size="120"/>
  23. <Column size="80"/>
  24. <Column size="200"/>
  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/>
  36. <Cell col="1" text="상태"/>
  37. <Cell col="2" text="등록번호"/>
  38. <Cell col="3" text="진료과"/>
  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="기관코드"/>
  44. <Cell col="9" text="이력상태"/>
  45. <Cell col="10" text="시작일자"/>
  46. <Cell col="11" text="의뢰병원명"/>
  47. <Cell col="12" text="의뢰의사명"/>
  48. <Cell col="13" text="참고사항"/>
  49. <Cell col="14" text="최초등록자ID"/>
  50. <Cell col="15" text="최초등록일시"/>
  51. <Cell col="16" text="최종수정자ID"/>
  52. <Cell col="17" text="최종수정일시"/>
  53. </Band>
  54. <Band id="body">
  55. <Cell celltype="head" expr="expr:currow + 1"/>
  56. <Cell col="1" text="bind:cnst_stat"/>
  57. <Cell col="2" text="bind:cnst_pid"/>
  58. <Cell col="3" displaytype="combo" edittype="combo" text="bind:cnst_orddeptcd" combodataset="ds_init_orddeptcdlist" combocodecol="nm" combodatacol="nm"/>
  59. <Cell col="4" displaytype="combo" edittype="combo" text="bind:cnst_insuflag" combodataset="ds_static_insuflag" combocodecol="value" combodatacol="label"/>
  60. <Cell col="5" displaytype="combo" edittype="combo" text="bind:cnst_ordreqkind" combodataset="ds_init_P0310list" combocodecol="cdid" combodatacol="cdnm"/>
  61. <Cell col="6" displaytype="date" edittype="date" text="bind:cnst_todd" mask="yyyy-mm-dd"/>
  62. <Cell col="7" text="bind:cnst_seqno"/>
  63. <Cell col="8" text="bind:cnst_instcd"/>
  64. <Cell col="9" text="bind:cnst_histstat"/>
  65. <Cell col="10" displaytype="date" edittype="date" text="bind:cnst_fromdd" mask="yyyy-mm-dd"/>
  66. <Cell col="11" displaytype="text" edittype="text" text="bind:cnst_reqformhospnm"/>
  67. <Cell col="12" displaytype="text" edittype="text" text="bind:cnst_reqformdrnm"/>
  68. <Cell col="13" displaytype="text" edittype="text" text="bind:cnst_remfact"/>
  69. <Cell col="14" text="bind:cnst_fstrgstrid"/>
  70. <Cell col="15" text="bind:cnst_fstrgstdt"/>
  71. <Cell col="16" text="bind:cnst_lastupdtrid"/>
  72. <Cell col="17" text="bind:cnst_lastupdtdt"/>
  73. </Band>
  74. </Format>
  75. </Formats>
  76. </Grid>
  77. <Shape id="line1" linetype="horizontal" class="line_1" position="absolute 0 24 675 30" style="strokepen:3 solid #33bbbbff;"/>
  78. <Static id="caption1" text="진료의뢰서 내역" class="tit_2" position="absolute 5 7 140 23"/>
  79. <Button id="btn_addrow" taborder="2" text="행추가" class="btn2" position="absolute 520 4 573 23" onclick="btn_addrow_onclick"/>
  80. <Button id="btn_delrow" taborder="3" text="행삭제" class="btn5" position="absolute 576 4 629 23" onclick="btn_delrow_onclick"/>
  81. <Button id="button1" taborder="4" text="저장" class="btn5" position="absolute 632 4 674 23" onclick="button1_onclick"/>
  82. <Button id="btn_confirm" taborder="5" text="확인" class="btn4" position="absolute 560 367 616 389" onclick="btn_confirm_onclick"/>
  83. <Button id="btn_cancel" taborder="6" text="취소" class="btn4" position="absolute 619 367 675 389" onclick="btn_cancel_onclick"/>
  84. <Shape id="line88" class="line_6" position="absolute 0 361 675 367"/>
  85. </Layout>
  86. </Layouts>
  87. <Objects>
  88. <Dataset id="ds_main_h_cnst" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
  89. <ColumnInfo>
  90. <Column id="cnst_stat" type="STRING"/>
  91. <Column id="cnst_pid" type="STRING" size="256" sumtext="환자등록번호"/>
  92. <Column id="cnst_orddeptcd" type="STRING" size="256" sumtext="진료과코드"/>
  93. <Column id="cnst_insuflag" type="STRING" size="256" sumtext="보호/보험구분"/>
  94. <Column id="cnst_ordreqkind" type="STRING" size="256" sumtext="진료의뢰서 종류"/>
  95. <Column id="cnst_todd" type="STRING" size="256" sumtext="종료일자"/>
  96. <Column id="cnst_seqno" type="STRING" size="256" sumtext="일련번호"/>
  97. <Column id="cnst_instcd" type="STRING" size="256" sumtext="기관코드"/>
  98. <Column id="cnst_histstat" type="STRING" size="256" sumtext="이력상태"/>
  99. <Column id="cnst_fromdd" type="STRING" size="256" sumtext="시작일자"/>
  100. <Column id="cnst_reqformhospnm" type="STRING" size="256" sumtext="의뢰병원명"/>
  101. <Column id="cnst_reqformdrnm" type="STRING" size="256" sumtext="의뢰의사명"/>
  102. <Column id="cnst_remfact" type="STRING" size="256" sumtext="비고"/>
  103. <Column id="cnst_fstrgstrid" type="STRING" size="256" sumtext="최초등록자ID"/>
  104. <Column id="cnst_fstrgstdt" type="STRING" size="256" sumtext="최초등록일시"/>
  105. <Column id="cnst_lastupdtrid" type="STRING" size="256" sumtext="최종수정자ID"/>
  106. <Column id="cnst_lastupdtdt" type="STRING" size="256" sumtext="최종수정일시"/>
  107. </ColumnInfo>
  108. </Dataset>
  109. <Dataset id="ds_hidden_session" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  110. <Dataset id="ds_init_P0310list" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  111. <ColumnInfo>
  112. <Column id="cdid" type="STRING" size="256"/>
  113. <Column id="cdnm" type="STRING" size="256"/>
  114. </ColumnInfo>
  115. </Dataset>
  116. <Dataset id="ds_init_orddeptcdlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  117. <ColumnInfo>
  118. <Column id="cd" type="STRING" size="256"/>
  119. <Column id="nm" type="STRING" size="256"/>
  120. </ColumnInfo>
  121. </Dataset>
  122. <Dataset id="ds_init_orddridlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  123. <Dataset id="ds_init_centcdlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  124. <Dataset id="ds_init_subdeptcdlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  125. <Dataset id="ds_tmp_h_cnst" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
  126. <ColumnInfo>
  127. <Column id="cnst_stat" type="STRING"/>
  128. <Column id="cnst_pid" type="STRING" size="256" sumtext="환자등록번호"/>
  129. <Column id="cnst_orddeptcd" type="STRING" size="256" sumtext="진료과코드"/>
  130. <Column id="cnst_insuflag" type="STRING" size="256" sumtext="보호/보험구분"/>
  131. <Column id="cnst_ordreqkind" type="STRING" size="256" sumtext="진료의뢰서 종류"/>
  132. <Column id="cnst_todd" type="STRING" size="256" sumtext="종료일자"/>
  133. <Column id="cnst_seqno" type="STRING" size="256" sumtext="일련번호"/>
  134. <Column id="cnst_instcd" type="STRING" size="256" sumtext="기관코드"/>
  135. <Column id="cnst_histstat" type="STRING" size="256" sumtext="이력상태"/>
  136. <Column id="cnst_fromdd" type="STRING" size="256" sumtext="시작일자"/>
  137. <Column id="cnst_reqformhospnm" type="STRING" size="256" sumtext="의뢰병원명"/>
  138. <Column id="cnst_reqformdrnm" type="STRING" size="256" sumtext="의뢰의사명"/>
  139. <Column id="cnst_remfact" type="STRING" size="256" sumtext="비고"/>
  140. <Column id="cnst_fstrgstrid" type="STRING" size="256" sumtext="최초등록자ID"/>
  141. <Column id="cnst_fstrgstdt" type="STRING" size="256" sumtext="최초등록일시"/>
  142. <Column id="cnst_lastupdtrid" type="STRING" size="256" sumtext="최종수정자ID"/>
  143. <Column id="cnst_lastupdtdt" type="STRING" size="256" sumtext="최종수정일시"/>
  144. </ColumnInfo>
  145. </Dataset>
  146. <Dataset id="ds_static_insuflag" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  147. <ColumnInfo>
  148. <Column id="label" type="STRING" size="256"/>
  149. <Column id="value" type="STRING" size="256"/>
  150. </ColumnInfo>
  151. <Rows>
  152. <Row>
  153. <Col id="label">보험</Col>
  154. <Col id="value">1</Col>
  155. </Row>
  156. <Row>
  157. <Col id="label">보호</Col>
  158. <Col id="value">2</Col>
  159. </Row>
  160. </Rows>
  161. </Dataset>
  162. </Objects>
  163. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  164. * System Name :
  165. * Job Name :
  166. * Creator :
  167. * Make Date : 2016-05-24
  168. * Description :
  169. *---------------------------------------------------------------------------------------
  170. * Modify Date Modifier Modify Description
  171. *---------------------------------------------------------------------------------------
  172. * 2016-05-24 Live Converter TF->XP
  173. *
  174. *---------------------------------------------------------------------------------------
  175. ****************************************************************************************/
  176. //=======================================================================================
  177. // Lib Include
  178. //---------------------------------------------------------------------------------------
  179. include 'com_commonxp::comm_main.xjs';
  180. include 'pam_opatmngtxp::PMOCOM.xjs';
  181. include 'pam_pamcomnxp::PAM.xjs';
  182. var arErrorCode = new HashArray();
  183. var gPID, strSend, strRcv, sOrdDeptCD, sOrdReqKind, sInsuFlag, etcOrdFlag;
  184. //=======================================================================================
  185. // Local methods
  186. //---------------------------------------------------------------------------------------
  187. /****************************************************************************************
  188. * Argument :
  189. * Description :
  190. ****************************************************************************************/
  191. //=======================================================================================
  192. // callback
  193. //---------------------------------------------------------------------------------------
  194. function callback(sSvcId, nErrorCode, sErrorMsg){
  195. arErrorCode.push(sSvcId, nErrorCode);
  196. }
  197. //=======================================================================================
  198. // Events
  199. //---------------------------------------------------------------------------------------
  200. /****************************************************************************************
  201. * Argument :
  202. * Description : onload
  203. ****************************************************************************************/
  204. function SPPMC04100_onload(obj:Form, e:LoadEventInfo){
  205. // 폼 초기화
  206. frmf_initForm(obj);
  207. fGetUserInfosSampling();
  208. appf_getCodeList([{ dsNm: 'ds_init_P0310list', cdGrpId: 'P0310' }]); // 진료의뢰서종류
  209. // 진료과코드 진료의사ID 조회
  210. pamGetDeptCDDrIDList();
  211. if(frmf_checkOpener()){
  212. opener.frmf_setParameter('SPPMC04100_RTN', '');
  213. var SPPMC04100_PARM = opener.frmf_getParameter('SPPMC04100_PARM');
  214. var arr = SPPMC04100_PARM.split('▦');
  215. gPID = arr[0];
  216. strSend = arr[1];
  217. strRcv = utlf_transNullToEmpty(arr[2]);
  218. var SPPMC04100_PARM1 = utlf_transNullToEmpty(opener.frmf_getParameter('SPPMC04100_PARM1'));
  219. arr = SPPMC04100_PARM1.split('▦');
  220. sOrdDeptCD = arr[0];
  221. sOrdReqKind = arr[1];
  222. sInsuFlag = arr[2];
  223. etcOrdFlag = arr[3];
  224. if(etcOrdFlag == 'H'){
  225. sOrdReqKind = '3';
  226. }
  227. else if(sOrdReqKind == '3'){
  228. sOrdReqKind = '1';
  229. }
  230. if(sInsuFlag == '11' || sInsuFlag == '21' || sInsuFlag == '22'){
  231. sInsuFlag = sInsuFlag.substr(0, 1);
  232. }
  233. opener.frmf_setParameter('SPPMC04100_PARM', '');
  234. opener.frmf_setParameter('SPPMC04100_PARM1', '');
  235. }
  236. }
  237. /****************************************************************************************
  238. * Argument :
  239. * Description : 행추가 버튼 클릭
  240. ****************************************************************************************/
  241. function btn_addrow_onclick(obj:Button, e:ClickEventInfo){
  242. var i = ds_main_h_cnst.addRow();
  243. ds_main_h_cnst.setColumn(i, 'cnst_stat', 'I');
  244. ds_main_h_cnst.setColumn(i, 'cnst_pid', gPID);
  245. ds_main_h_cnst.setColumn(i, 'cnst_orddeptcd', sOrdDeptCD);
  246. ds_main_h_cnst.setColumn(i, 'cnst_insuflag', sInsuFlag);
  247. ds_main_h_cnst.setColumn(i, 'cnst_ordreqkind', sOrdReqKind);
  248. ds_main_h_cnst.setColumn(i, 'cnst_todd', '99991231');
  249. ds_main_h_cnst.setColumn(i, 'cnst_seqno', '0');
  250. ds_main_h_cnst.setColumn(i, 'cnst_histstat', 'Y');
  251. ds_main_h_cnst.setColumn(i, 'cnst_fromdd', utlf_getCurrentDate());
  252. }
  253. /****************************************************************************************
  254. * Argument :
  255. * Description : 행삭제 버튼 클릭
  256. ****************************************************************************************/
  257. function btn_delrow_onclick(obj:Button, e:ClickEventInfo){
  258. if(sysf_messageBox('선택된 행의 진료의뢰서 내역을', 'Q001') != 6){
  259. return;
  260. }
  261. var row = grd_ordreqfrm.currentrow;
  262. if(row > -1){
  263. // 디비에 입력되지 않은 데이터는 그리드에서만 삭제한다.
  264. if(ds_main_h_cnst.getColumn(row, 'cnst_stat') == 'I'){
  265. ds_main_h_cnst.deleteRow(row);
  266. }
  267. else{
  268. ds_tmp_h_cnst.clearData();
  269. ds_tmp_h_cnst.copyRow(ds_tmp_h_cnst.addRow, ds_main_h_cnst, row);
  270. var oParam = {};
  271. oParam.id = "TRPMO04151";
  272. oParam.service = "opatmngtapp.OutRgst";
  273. oParam.method = "reqDelOrdReqForms";
  274. oParam.inds = "req=ds_tmp_h_cnst";
  275. oParam.outds = "";
  276. oParam.async = false;
  277. oParam.callback = "callback";
  278. tranf_submit(oParam);
  279. if(arErrorCode.pop("TRPMO04151") > -1){
  280. ds_main_h_cnst.deleteRow(row);
  281. }
  282. }
  283. }
  284. }
  285. /****************************************************************************************
  286. * Argument :
  287. * Description : 저장 버튼 클릭
  288. ****************************************************************************************/
  289. function button1_onclick(obj:Button, e:ClickEventInfo){
  290. if(sysf_messageBox('진료의뢰서 내역을 저장 하시겠습니까?', 'Q999') != 6){
  291. return;
  292. }
  293. var updated = grdf_getGridUpdateData(grd_ordreqfrm, 'all');
  294. grdf_setStatusColumn(updated, 'm');
  295. ds_tmp_h_cnst.copyData(updated, true);
  296. var oParam = {};
  297. oParam.id = "TRPMO04151";
  298. oParam.service = "opatmngtapp.OutRgst";
  299. oParam.method = "reqUpdateOrdReqForms";
  300. oParam.inds = "req=ds_tmp_h_cnst";
  301. oParam.outds = "";
  302. oParam.async = false;
  303. oParam.callback = "callback";
  304. tranf_submit(oParam);
  305. if(arErrorCode.pop("TRPMO04151") > -1){
  306. grdf_setStatus(grd_ordreqfrm, '');
  307. }
  308. }
  309. /****************************************************************************************
  310. * Argument :
  311. * Description : 확인 버튼 클릭
  312. ****************************************************************************************/
  313. function btn_confirm_onclick(obj:Button, e:ClickEventInfo){
  314. if(!frmf_isRequiredControls('cmb_ordreqkind', 'ipt_fromdd', 'ipt_orddeptcd')){
  315. return;
  316. }
  317. if(frmf_checkOpener()){
  318. opener.frmf_setParameter('SPPMC04100_RTN', 'Y');
  319. if(strRcv != '' && strRcv != ' ' && strRcv != '-'){
  320. opener.ds_main_h_cnst.copyData(ds_main_h_cnst, true);
  321. }
  322. this.close();
  323. }
  324. }
  325. /****************************************************************************************
  326. * Argument :
  327. * Description : 취소 버튼 클릭
  328. ****************************************************************************************/
  329. function btn_cancel_onclick(obj:Button, e:ClickEventInfo){
  330. if(frmf_checkOpener()){
  331. opener.frmf_setParameter('SPPMC04100_RTN', 'N');
  332. this.close();
  333. }
  334. }
  335. ]]></Script>
  336. </Form>
  337. </FDL>