SMLPP00800_처방변경이력.xfdl 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SMLPP00800" position="absolute 0 0 1256 805" titletext="처방변경이력" oninit="SMLPP00800_onload">
  5. <Layouts>
  6. <Layout>
  7. <Static id="caption6" text="처방리스트" class="tit_2" position="absolute 0 77 100 96"/>
  8. <Div id="div_grp" taborder="1" style="align:center top;" class="div_SA" position="absolute 0 26 1256 68" anchor="left top right">
  9. <Layouts>
  10. <Layout>
  11. <Edit id="edt_barcdno" taborder="12" class="input_search" position="absolute 71 10 170 29" anchor="default" onkeydown="div_grp_edt_barcdno_onkeydown" useime="none" imemode="alpha" maxlength="9" inputtype="number" inputmode="upper"/>
  12. <Static id="caption2" text="검색값 " class="search_name" position="absolute 10 10 71 30" anchor="default"/>
  13. <Static id="caption4" text="~" position="absolute 901 10 917 30" style="align:center;" anchor="default"/>
  14. <Static id="caption5" text="수정일자" class="search_name" position="absolute 727 10 801 30" anchor="default"/>
  15. <Calendar id="edt_ddto" taborder="13" class="input_search" position="absolute 917 10 1017 29" mask="####-##-##" anchor="default" dateformat="yyyy-MM-dd" value="null"/>
  16. <Calendar id="edt_ddfrom" taborder="14" class="input_search" position="absolute 801 10 901 29" mask="####-##-##" anchor="default" dateformat="yyyy-MM-dd" value="null"/>
  17. <Static id="caption3" text="병리번호" class="search_name" position="absolute 294 10 368 30" anchor="default"/>
  18. <Combo id="cmb_trsmdeptcd" taborder="15" class="combo_search" position="absolute 173 10 270 29" anchor="default" innerdataset="@ds_cond_seamthd" codecolumn="value" datacolumn="label" index="0" value="0" text="등록번호" onitemchanged="div_grp_cmb_trsmdeptcd_onitemchanged"/>
  19. <Combo id="cmb_ptnocd" taborder="16" position="absolute 368 10 524 29" anchor="default" innerdataset="@ds_cond_ptnocode" codecolumn="ptnocd" datacolumn="ptnonm" index="-1"/>
  20. <Edit id="edt_fromptno" taborder="17" class="text_center" position="absolute 557 10 607 29" anchor="default" maxlength="6" inputtype="number"/>
  21. <Static id="caption7" text="~" position="absolute 607 10 623 30" anchor="default" style="align:center;"/>
  22. <Edit id="edt_toptno" taborder="18" class="text_center" position="absolute 653 10 703 29" anchor="default" inputtype="number" maxlength="6"/>
  23. <Edit id="edt_toyear" taborder="19" class="text_center" position="absolute 623 10 650 29" anchor="default" inputtype="number" maxlength="2"/>
  24. <Edit id="edt_fromyear" taborder="20" class="text_center" position="absolute 527 10 554 29" anchor="default" inputtype="number" maxlength="2"/>
  25. <Button id="btn_sea" taborder="21" text="조회" class="btn1" position="absolute 1188 10 1244 29" anchor="top right" onclick="div_grp_btn_sea_onclick"/>
  26. </Layout>
  27. </Layouts>
  28. </Div>
  29. <Grid id="grd_prcpupdthist" class="CSS::lis.css" taborder="2" useinputpanel="false" position="absolute 0 97 1256 805" autofittype="none" anchor="all" binddataset="ds_grid_grd_prcpupdthist" cellsizingtype="both" autosizingtype="none">
  30. <Formats>
  31. <Format id="default">
  32. <Columns>
  33. <Column size="0"/>
  34. <Column size="0"/>
  35. <Column size="90"/>
  36. <Column size="70"/>
  37. <Column size="70"/>
  38. <Column size="70"/>
  39. <Column size="60"/>
  40. <Column size="60"/>
  41. <Column size="144"/>
  42. <Column size="60"/>
  43. <Column size="94"/>
  44. <Column size="60"/>
  45. <Column size="90"/>
  46. <Column size="60"/>
  47. <Column size="90"/>
  48. <Column size="70"/>
  49. <Column size="60"/>
  50. <Column size="70"/>
  51. </Columns>
  52. <Rows>
  53. <Row size="35" band="head"/>
  54. <Row size="28"/>
  55. </Rows>
  56. <Band id="head">
  57. <Cell text="기관코드"/>
  58. <Cell col="1" text="병리번호"/>
  59. <Cell col="2" text="병리번호"/>
  60. <Cell col="3" text="처방일자"/>
  61. <Cell col="4" text="접수일자"/>
  62. <Cell col="5" text="등록번호"/>
  63. <Cell col="6" text="환자성명"/>
  64. <Cell col="7" text="변경전&#10;처방코드"/>
  65. <Cell col="8" text="변경전&#10;처방명"/>
  66. <Cell col="9" text="변경후&#10;처방코드"/>
  67. <Cell col="10" text="변경후&#10;처방명"/>
  68. <Cell col="11" text="변경전&#10;검체코드"/>
  69. <Cell col="12" text="변경전&#10;검체명"/>
  70. <Cell col="13" text="변경후&#10;검체코드"/>
  71. <Cell col="14" text="변경후&#10;검체명"/>
  72. <Cell col="15" text="변경일자"/>
  73. <Cell col="16" text="변경시간"/>
  74. <Cell col="17" text="변경자"/>
  75. </Band>
  76. <Band id="body">
  77. <Cell/>
  78. <Cell col="1"/>
  79. <Cell col="2" class="text_center" text="bind:dispptno"/>
  80. <Cell col="3" text="bind:prcpdd" mask="expr:prcpdd==null?'':'####-##-##'"/>
  81. <Cell col="4" text="bind:acptdd" mask="expr:acptdd==null?'':'####-##-##'"/>
  82. <Cell col="5" displaytype="text" edittype="normal" class="text_center" text="bind:pid"/>
  83. <Cell col="6" class="text_center" text="bind:patnm"/>
  84. <Cell col="7" style="align:left;" text="bind:bfprcpcd"/>
  85. <Cell col="8" style="align:left;" text="bind:bfprcpnm"/>
  86. <Cell col="9" style="align:left;" text="bind:afprcpcd"/>
  87. <Cell col="10" style="align:left;" text="bind:afprcpnm"/>
  88. <Cell col="11" style="align:left;" class="text_center" text="bind:bfspccd"/>
  89. <Cell col="12" style="align:left;" text="bind:bfspcnm"/>
  90. <Cell col="13" style="align:left;" class="text_center" text="bind:afspccd"/>
  91. <Cell col="14" style="align:left;" text="bind:afspcnm"/>
  92. <Cell col="15" text="bind:updtdd" mask="expr:updtdd==null?'':'####-##-##'"/>
  93. <Cell col="16" text="bind:updttm" mask="expr:updttm==null?'':'##:##:##'"/>
  94. <Cell col="17" text="bind:updtnm"/>
  95. <Cell col="18"/>
  96. </Band>
  97. </Format>
  98. </Formats>
  99. </Grid>
  100. <Button id="btn_excel" taborder="3" text="EXCEL저장" class="btn7" position="absolute 1162 74 1253 94" anchor="top right" onclick="btn_excel_onclick"/>
  101. <Static id="caption1" text="처방변경이력" class="tit_1" position="absolute 0 1 145 26"/>
  102. </Layout>
  103. </Layouts>
  104. <Objects>
  105. <Dataset id="ds_cond_seamthd" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  106. <ColumnInfo>
  107. <Column id="label" type="STRING" size="256"/>
  108. <Column id="value" type="STRING" size="256"/>
  109. </ColumnInfo>
  110. <Rows>
  111. <Row>
  112. <Col id="label">등록번호</Col>
  113. <Col id="value">0</Col>
  114. </Row>
  115. <Row>
  116. <Col id="label">처방코드(전)</Col>
  117. <Col id="value">1</Col>
  118. </Row>
  119. <Row>
  120. <Col id="label">검체코드(전)</Col>
  121. <Col id="value">2</Col>
  122. </Row>
  123. </Rows>
  124. </Dataset>
  125. <Dataset id="ds_cond_ptnocode" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  126. <ColumnInfo>
  127. <Column id="instcd" type="STRING" size="256"/>
  128. <Column id="ptnocd" type="STRING" size="256"/>
  129. <Column id="ptnonm" type="STRING" size="256"/>
  130. </ColumnInfo>
  131. </Dataset>
  132. <Dataset id="ds_grid_grd_prcpupdthist" firefirstcount="0" firenextcount="0" useclientlayout="true" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  133. <ColumnInfo>
  134. <column id="instcd" type="STRING" size="256"/>
  135. <column id="ptno" type="STRING" size="256"/>
  136. <column id="dispptno" type="STRING" size="256"/>
  137. <column id="prcpdd" type="STRING" size="256"/>
  138. <column id="acptdd" type="STRING" size="256"/>
  139. <column id="pid" type="STRING" size="256"/>
  140. <column id="patnm" type="STRING" size="256"/>
  141. <column id="bfprcpcd" type="STRING" size="256"/>
  142. <column id="bfprcpnm" type="STRING" size="256"/>
  143. <column id="afprcpcd" type="STRING" size="256"/>
  144. <column id="afprcpnm" type="STRING" size="256"/>
  145. <column id="bfspccd" type="STRING" size="256"/>
  146. <column id="bfspcnm" type="STRING" size="256"/>
  147. <column id="afspccd" type="STRING" size="256"/>
  148. <column id="afspcnm" type="STRING" size="256"/>
  149. <column id="updtdd" type="STRING" size="256"/>
  150. <column id="updttm" type="STRING" size="256"/>
  151. <column id="updtnm" type="STRING" size="256"/>
  152. </ColumnInfo>
  153. </Dataset>
  154. <Dataset id="ds_data_sysdtinfo" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  155. <ColumnInfo>
  156. <Column id="sysdd" type="STRING" size="256"/>
  157. <Column id="systm" type="STRING" size="256"/>
  158. </ColumnInfo>
  159. </Dataset>
  160. </Objects>
  161. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  162. * System Name : KU2.0
  163. * Job Name :
  164. * File Name : SMLPP00800_처방변경이력.xfdl
  165. * Creator :
  166. * Make Date : 2015-11-11
  167. *
  168. * Description :
  169. *---------------------------------------------------------------------------------------
  170. * Modify Date Modifier Modify Description
  171. *---------------------------------------------------------------------------------------
  172. * 2014-03-11 DBS Converting Program(TF->XP)
  173. *
  174. *---------------------------------------------------------------------------------------
  175. ****************************************************************************************/
  176. //=======================================================================================
  177. // Lib Include
  178. //---------------------------------------------------------------------------------------
  179. include "com_commonxp::comm_main.xjs";
  180. include "lis_commonxp::LLZ001.xjs";
  181. include "lis_commonxp::LZZ001.xjs";
  182. include "lis_commonxp::LPZ001.xjs";
  183. var instcd = "";
  184. var seaddkind = ""; // 검색일자종류(0:처방일자, 1:접수일자)
  185. //=======================================================================================
  186. // Function
  187. //---------------------------------------------------------------------------------------
  188. /****************************************************************************************
  189. * Components :
  190. * Components ID : model1
  191. * Event : lf_setInit
  192. * Argument : 01.obj : Object Event has occurred
  193. * : 02.e : Event Object
  194. * Description : 초기화 함수
  195. ****************************************************************************************/
  196. function lf_exeInitialize() {
  197. var sCurDate = "";
  198. ds_grid_grd_prcpupdthist.clearData();
  199. instcd = sysf_getUserInfo("dutplceinstcd");
  200. var sInDsName = dsf_createDsRow("ds_temp_search"
  201. , [{col: "instcd", val:instcd }
  202. ]);
  203. // 서브밋호출
  204. var oParam = {};
  205. oParam.id = "TRLPZ00102";
  206. oParam.service = "plgycomnusemngtapp.BaseInfoCode";
  207. oParam.method = "reqGetSystemDateTimeInformation";
  208. oParam.inds = "refData="+sInDsName;
  209. oParam.outds = "ds_data_sysdtinfo=sysdtinfo";
  210. oParam.async = false;
  211. oParam.callback = "cbf_SMLPP00800";
  212. tranf_submit(oParam);
  213. }
  214. /****************************************************************************************
  215. * Components :
  216. * Components ID : btn_search
  217. * Event : onlbuttonup
  218. * Argument : 01.btnflag :
  219. * : 02. :
  220. * Description : 처방변경이력 조회 처리 함수
  221. ****************************************************************************************/
  222. function lf_getPrcpUpdtList() {
  223. var sPtNoCd = div_grp.cmb_ptnocd.value;
  224. if(sPtNoCd.replace("-", "") != "") {
  225. // 조회시 병리번호 From ~ To 체크/셋팅
  226. gf_getPtNoSetting(div_grp.edt_ddfrom.value
  227. , div_grp.edt_ddto.value
  228. , div_grp.cmb_ptnocd
  229. , div_grp.edt_fromyear
  230. , div_grp.edt_fromptno
  231. , div_grp.edt_toyear
  232. , div_grp.edt_toptno);
  233. }
  234. var refval = div_grp.edt_barcdno.value;
  235. var refmthd = div_grp.cmb_trsmdeptcd.value;
  236. var ptnocode = sPtNoCd.replace("-", "");
  237. var fromyear = div_grp.edt_fromyear.value;
  238. var fromptno = div_grp.edt_fromptno.value;
  239. var toyear = div_grp.edt_toyear.value;
  240. var toptno = div_grp.edt_toptno.value;
  241. var refddkind = seaddkind;
  242. var fromdd = div_grp.edt_ddfrom.value;
  243. var todd = div_grp.edt_ddto.value;
  244. var sInDsName = dsf_createDsRow("ds_temp_search"
  245. , [{col: "instcd", val:instcd }
  246. , {col: "fromdd", val:fromdd }
  247. , {col: "todd", val:todd }
  248. , {col: "refval", val:refval }
  249. , {col: "refmthd", val:refmthd }
  250. , {col: "ptnocode", val:ptnocode }
  251. , {col: "fromyear", val:fromyear }
  252. , {col: "fromptno", val:fromptno }
  253. , {col: "toyear", val:toyear }
  254. , {col: "toptno", val:toptno }
  255. , {col: "refddkind", val:refddkind }
  256. ]);
  257. // 서브밋호출
  258. var oParam = {};
  259. oParam.id = "TRLPP00801";
  260. oParam.service = "plgyrefmngtapp.AcptSpecRef";
  261. oParam.method = "reqGetPrcpUpdtList";
  262. oParam.inds = "refData="+sInDsName;
  263. oParam.outds = "ds_grid_grd_prcpupdthist=refrslt";
  264. oParam.async = false;
  265. oParam.callback = "cbf_SMLPP00800";
  266. tranf_submit(oParam);
  267. }
  268. // 그리드 자료 Excel로 저장 처리 function
  269. function lf_exeSaveToExcel() {
  270. if(ds_grid_grd_prcpupdthist.rowcount > 0){
  271. grdf_exportExcel(grd_prcpupdthist, lf_lisGetTitle(this), "처방변경이력", false, "", "none", false);
  272. } else {
  273. sysf_messageBox("저장할 내용이","I004","");
  274. }
  275. }
  276. // 검색값을 입력하고 Enter키를 누를 경우 처리 Function
  277. function lf_exeSeaValOnKeyPress() {
  278. // if(div_grp.cmb_trsmdeptcd.value == "0") {
  279. // div_grp.edt_barcdno.value = utlf_lPad(div_grp.edt_barcdno.value, 9, "0"); //등록번호 9자리로 변경
  280. // }
  281. lf_getPrcpUpdtList();
  282. }
  283. // callback 함수
  284. function cbf_SMLPP00800(strSvcID, nErrorCode, strErrorMag) {
  285. if(nErrorCode != 0) {
  286. sysf_messageBox("ID: "+ strSvcID + " Error: " + strErrorMag, "E009", "");
  287. }else{
  288. switch(strSvcID){
  289. case "TRLPZ00102":
  290. var refflagcd = "0";
  291. var sInDsName = dsf_createDsRow("ds_temp_search"
  292. , [{col: "instcd", val:instcd }
  293. , {col: "refflagcd", val:refflagcd }
  294. ]);
  295. // 서브밋호출
  296. var oParam = {};
  297. oParam.id = "TRLPZ00109";
  298. oParam.service = "plgycomnusemngtapp.BaseInfoCode";
  299. oParam.method = "reqGetPtNoCdList";
  300. oParam.inds = "refdata=="+sInDsName;
  301. oParam.outds = "ds_cond_ptnocode=rsltlist";
  302. oParam.async = false;
  303. oParam.callback = "cbf_SMLPP00800";
  304. tranf_submit(oParam);
  305. break;
  306. case "TRLPZ00109":
  307. var sCurDate = ds_data_sysdtinfo.getColumn(0, "sysdd");
  308. // 초기값 설정
  309. div_grp.edt_barcdno.value = ""; // 검색값 초기화
  310. div_grp.cmb_trsmdeptcd.value = "0"; // 검색방법(0:등록번호,1:환자성명,2:처방코드(변경전),3:검체코드(변경전) 초기화
  311. seaddkind = "1"; // 검색일자종류(0:처방일자, 1:접수일자)
  312. div_grp.edt_ddfrom.value = ds_data_sysdtinfo.getColumn(0, "sysdd"); // 취소일자(From)
  313. div_grp.edt_ddto.value = ds_data_sysdtinfo.getColumn(0, "sysdd"); // 취소일자(To)
  314. div_grp.cmb_ptnocd.value = "-";
  315. div_grp.edt_fromyear.value = sCurDate.substr(2,2);
  316. div_grp.edt_toyear.value = sCurDate.substr(2,2);
  317. div_grp.edt_fromptno.value = "";
  318. div_grp.edt_toptno.value = "";
  319. grdf_setGridSort(grd_prcpupdthist);
  320. break;
  321. case "TRLPJ00701":
  322. break;
  323. default:
  324. break;
  325. }
  326. }
  327. }
  328. //=======================================================================================
  329. // Event
  330. //---------------------------------------------------------------------------------------
  331. /****************************************************************************************
  332. * Components :
  333. * Components ID: SMLPP00800
  334. * Event : onload
  335. * Argument : 01.obj : Form
  336. * : 02.e : Event InitEventInfo
  337. * Description :
  338. ****************************************************************************************/
  339. function SMLPP00800_onload(obj:Form, e:InitEventInfo)
  340. {
  341. grdf_initGrid(grd_prcpupdthist);
  342. //폼 초기화 함수
  343. frmf_initForm(obj);
  344. lf_exeInitialize();
  345. }
  346. /****************************************************************************************
  347. * Components :
  348. * Components ID : edt_barcdno
  349. * Event :
  350. * Argument : 01.obj : Object Event has occurred
  351. * : 02.e : Event Object
  352. * Description : 검색값 edit keydown 이벤트
  353. ****************************************************************************************/
  354. function div_grp_edt_barcdno_onkeydown(obj:Edit, e:KeyEventInfo)
  355. {
  356. if(e.keycode==13) {
  357. lf_exeSeaValOnKeyPress();
  358. }
  359. }
  360. /****************************************************************************************
  361. * Components :
  362. * Components ID: cmb_trsmdeptcd
  363. * Event : onitemchanged
  364. * Argument : 01.obj : Combo
  365. * : 02.e : ItemChangeEventInfo
  366. * Description : 검색조건이 바뀔때 입력 자릿수 지정
  367. ****************************************************************************************/
  368. function div_grp_cmb_trsmdeptcd_onitemchanged(obj:Combo, e:ItemChangeEventInfo)
  369. {
  370. div_grp.edt_barcdno.value = "";
  371. switch (div_grp.cmb_trsmdeptcd.value) {
  372. case "0":
  373. div_grp.edt_barcdno.maxlength = "9" ;
  374. div_grp.edt_barcdno.inputtype="number";
  375. break;
  376. case "1":
  377. div_grp.edt_barcdno.maxlength = "15" ;
  378. div_grp.edt_barcdno.inputtype="numberandenglish";
  379. break;
  380. case "2":
  381. div_grp.edt_barcdno.maxlength = "6" ;
  382. div_grp.edt_barcdno.inputtype="numberandenglish";
  383. break;
  384. default:
  385. div_grp.edt_barcdno.maxlength = "9" ;
  386. div_grp.edt_barcdno.inputtype="numberandenglish";
  387. break;
  388. }
  389. }
  390. function div_grp_btn_sea_onclick(obj:Button, e:ClickEventInfo)
  391. {
  392. lf_getPrcpUpdtList();
  393. }
  394. function btn_excel_onclick(obj:Button, e:ClickEventInfo)
  395. {
  396. lf_exeSaveToExcel();
  397. }
  398. ]]></Script>
  399. </Form>
  400. </FDL>