SMMNH03300_pop통증사정도구 VAS입력및조회.xfdl 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SMMNH03300" position="absolute 0 0 490 600" titletext="VAS/KPS추가 입력 및 조회" oninit="SMMNH03300_oninit" onload="SMMNH03300_onload">
  5. <Layouts>
  6. <Layout>
  7. <Div position="absolute 5 5 483 590" id="grp_biz" scrollbars="autoboth">
  8. <Layouts>
  9. <Layout>
  10. <Static text="입력시간" position="absolute 153 3 219 26" align="align:center middle;" id="caption2" class="cell_1"/>
  11. <Grid position="absolute 1 67 477 583" id="grd_vashlist" binddataset="ds_main_vash_vashlist" autofittype="col">
  12. <Formats>
  13. <Format id="default">
  14. <Columns>
  15. <Column size="23"/>
  16. <Column size="25"/>
  17. <Column size="150"/>
  18. <Column size="112"/>
  19. <Column size="150"/>
  20. <Column size="0"/>
  21. <Column size="0"/>
  22. <Column size="0"/>
  23. <Column size="0"/>
  24. </Columns>
  25. <Rows>
  26. <Row size="24" band="head"/>
  27. <Row size="24"/>
  28. </Rows>
  29. <Band id="head">
  30. <Cell/>
  31. <Cell col="1"/>
  32. <Cell col="2" text="입력일시"/>
  33. <Cell col="3" text="test"/>
  34. <Cell col="4" text="입력자"/>
  35. <Cell col="5"/>
  36. <Cell col="6"/>
  37. <Cell col="7"/>
  38. <Cell col="8"/>
  39. </Band>
  40. <Band id="body">
  41. <Cell celltype="head" expr="currow+1"/>
  42. <Cell col="1" class="update_n" text="bind:status"/>
  43. <Cell col="2" text="bind:recdt"/>
  44. <Cell col="3" text="bind:vasrslt"/>
  45. <Cell col="4" text="bind:usernm"/>
  46. <Cell col="5" text="bind:staiud"/>
  47. <Cell col="6" text="bind:recdd"/>
  48. <Cell col="7" text="bind:rectm"/>
  49. <Cell col="8" text="bind:userid"/>
  50. </Band>
  51. </Format>
  52. </Formats>
  53. </Grid>
  54. <Static position="absolute 1 10 155 32" id="caption1" class="tit_2"/>
  55. <Button position="absolute 280 7 333 26" id="button2" class="btn2" text="행추가" onclick="grp_biz_button2_onclick"/>
  56. <Button position="absolute 335 7 388 26" id="button1" class="btn2" text="행삭제" onclick="grp_biz_button1_onclick"/>
  57. <Shape position="absolute -1 26 475 32" linetype="horizontal" id="line1" class="line_1" style="strokepen:3 solid #33bbbbff;"/>
  58. <Button position="absolute 262 8 278 24" id="btn_clock" class="icon_clock" text="" onclick="grp_biz_btn_clock_onclick"/>
  59. <MaskEdit position="absolute 221 6 260 25" id="ipt_recdt" class="input_search" mask="##:##" autoselect="true" maskchar=" " trimtype="both" type="string" displaynulltext=" "/>
  60. <Grid position="absolute 0 30 476 64" id="vasval" class="datagrid2" scrollbars="autoboth" taborder="17" autofittype="col" oncellclick="grp_biz_vasval_oncellclick">
  61. <Formats>
  62. <Format id="default">
  63. <Columns>
  64. <Column size="43"/>
  65. <Column size="43"/>
  66. <Column size="43"/>
  67. <Column size="43"/>
  68. <Column size="43"/>
  69. <Column size="43"/>
  70. <Column size="43"/>
  71. <Column size="43"/>
  72. <Column size="43"/>
  73. <Column size="43"/>
  74. <Column size="43"/>
  75. </Columns>
  76. <Rows>
  77. <Row size="24" band="head"/>
  78. <Row size="24"/>
  79. </Rows>
  80. <Band id="head">
  81. <Cell text="0"/>
  82. <Cell col="1" text="1"/>
  83. <Cell col="2" text="2"/>
  84. <Cell col="3" text="3"/>
  85. <Cell col="4" text="4"/>
  86. <Cell col="5" text="5"/>
  87. <Cell col="6" text="6"/>
  88. <Cell col="7" text="7"/>
  89. <Cell col="8" text="8"/>
  90. <Cell col="9" text="9"/>
  91. <Cell col="10" text="10"/>
  92. </Band>
  93. <Band id="body">
  94. <Cell/>
  95. <Cell col="1"/>
  96. <Cell col="2"/>
  97. <Cell col="3"/>
  98. <Cell col="4"/>
  99. <Cell col="5"/>
  100. <Cell col="6"/>
  101. <Cell col="7"/>
  102. <Cell col="8"/>
  103. <Cell col="9"/>
  104. <Cell col="10"/>
  105. </Band>
  106. </Format>
  107. </Formats>
  108. </Grid>
  109. <Button position="absolute 390 7 432 26" id="button3" class="btn5" text="저장" onclick="grp_biz_button3_onclick"/>
  110. <Button position="absolute 434 7 476 26" id="button4" class="btn2" text="닫기" onclick="grp_biz_button4_onclick"/>
  111. </Layout>
  112. </Layouts>
  113. </Div>
  114. </Layout>
  115. </Layouts>
  116. <Objects>
  117. <Dataset id="ds_temp" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false" oncolumnchanged="ds_temp_oncolumnchanged">
  118. <ColumnInfo>
  119. <Column id="recdt" type="STRING" size="256"/>
  120. </ColumnInfo>
  121. <Rows>
  122. <Row/>
  123. </Rows>
  124. </Dataset>
  125. <Dataset id="ds_main_vash_vashlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  126. <ColumnInfo>
  127. <Column id="status" type="STRING" size="256" sumtext="상태"/>
  128. <Column id="recdt" type="STRING" size="256" sumtext="입력일시"/>
  129. <Column id="vasrslt" type="STRING" size="256" sumtext="vas값"/>
  130. <Column id="usernm" type="STRING" size="256" sumtext="입력자"/>
  131. <Column id="staiud" type="STRING" size="256" sumtext="상태"/>
  132. <Column id="recdd" type="STRING" size="256" sumtext="입력일자"/>
  133. <Column id="rectm" type="STRING" size="256" sumtext="입력시간"/>
  134. <Column id="userid" type="STRING" size="256" sumtext="입력자 ID"/>
  135. </ColumnInfo>
  136. </Dataset>
  137. <Dataset id="ds_send_sVashData" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  138. </Objects>
  139. <Bind>
  140. <BindItem id="item0" compid="grp_biz.ipt_recdt" propid="value" datasetid="ds_temp" columnid="recdt"/>
  141. </Bind>
  142. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  143. * System Name :
  144. * Job Name :
  145. * Creator :
  146. * Make Date : 2015-11-13
  147. * Description :
  148. *---------------------------------------------------------------------------------------
  149. * Modify Date Modifier Modify Description
  150. *---------------------------------------------------------------------------------------
  151. * 2015-11-13 Live Converter TF->XP
  152. *
  153. *---------------------------------------------------------------------------------------
  154. ****************************************************************************************/
  155. include "com_commonxp::comm_main.xjs";
  156. include "emr_agonalcarexp::SMMNH03300.xjs";
  157. function SMMNH03300_oninit(obj:Form, e:InitEventInfo)
  158. {
  159. frmf_initForm(obj);
  160. }
  161. var pid = opener.frmf_getParameter("pid");
  162. var cretdd = opener.frmf_getParameter("cretdd");
  163. var crettm = opener.frmf_getParameter("crettm");
  164. var recitemcd = opener.frmf_getParameter("recitemcd");
  165. var recdd = opener.frmf_getParameter("recdd");
  166. var vas_row = opener.frmf_getParameter("vas_row");
  167. var vas_col = opener.frmf_getParameter("vas_col");
  168. var vashval = opener.frmf_getParameter("vashval");
  169. var spid = opener.frmf_getParameter("spid");
  170. var popGbn = opener.frmf_getParameter("popGbn");
  171. var rectm;
  172. function SMMNH03300_onload(obj:Form, e:LoadEventInfo)
  173. {
  174. grdf_initGrid(grp_biz.grd_vashlist);
  175. grdf_setRowTypeIcon(grp_biz.grd_vashlist, 1);
  176. if(utlf_isNull(vashval))
  177. {
  178. vashval = "I";
  179. }
  180. else
  181. {
  182. vashval = "U";
  183. }
  184. fInit();
  185. }
  186. function grp_biz_btn_clock_onclick(obj:Button, e:ClickEventInfo)
  187. {
  188. var curtime = utlf_getCurrentTime().substr(0, 4);
  189. ds_temp.setColumn(0, "recdt", curtime);
  190. }
  191. function ds_temp_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
  192. {
  193. var recdt = obj.getColumn(0, "recdt");
  194. if(Number(recdt.substr(0,2)) > 24)
  195. {
  196. sysf_messageBox("시간 입력에","E009");
  197. obj.setColumn(0, "recdt", "");
  198. grp_biz.ipt_recdt.setFocus();
  199. return;
  200. }
  201. if(Number(recdt.substr(2,4)) > 60)
  202. {
  203. sysf_messageBox("분 입력에","E009");
  204. ds_temp.setColumn(0, "recdt", "");
  205. grp_biz.ipt_recdt.setFocus();
  206. return;
  207. }
  208. }
  209. function grp_biz_button2_onclick(obj:Button, e:ClickEventInfo)
  210. {
  211. var curDate = utlf_getCurrentDate();
  212. var inpTime = ds_temp.getColumn(0, "recdt");
  213. if(utlf_isNull(inpTime)|| !utlf_isValidDateTime(inpTime, "hhmm"))
  214. {
  215. inpTime = utlf_getCurrentTime().substr(0, 4);
  216. ds_temp.setColumn(0, "recdt", inpTime);
  217. }
  218. var grdtm;
  219. for(var i = 0; i < ds_main_vash_vashlist.rowcount; i++)
  220. {
  221. grdtm = ds_main_vash_vashlist.getColumn(i, "rectm");
  222. if(grdtm == inpTime)
  223. {
  224. sysf_messageBox("입력시간이 같으면 행을 추가 할수 ","I004");
  225. return;
  226. }
  227. }
  228. var registddtmStr = curDate.substr(0, 4) + "-";
  229. registddtmStr += curDate.substr(4, 2) + "-";
  230. registddtmStr += curDate.substr(6) + " ";
  231. registddtmStr += inpTime.substr(0, 2) + ":";
  232. registddtmStr += inpTime.substr(2);
  233. ds_main_vash_vashlist.insertRow(0);
  234. ds_main_vash_vashlist.setColumn(0, "recdt", registddtmStr);
  235. ds_main_vash_vashlist.setColumn(0, "staiud", "insert");
  236. ds_main_vash_vashlist.setColumn(0, "recdd", recdd);
  237. ds_main_vash_vashlist.setColumn(0, "rectm", inpTime);
  238. ds_main_vash_vashlist.setColumn(0, "userid", sysf_getUserId());
  239. ds_main_vash_vashlist.setColumn(0, "usernm", sysf_getUserName());
  240. // var arrRow = new Array();
  241. // arrRow[0] = 0;
  242. // grdf_setStatus(grp_biz.grd_clbsmast, "I", arrRow);
  243. }
  244. function grp_biz_button1_onclick(obj:Button, e:ClickEventInfo)
  245. {
  246. if(ds_main_vash_vashlist.rowposition > -1)
  247. {
  248. ds_main_vash_vashlist.enableevent = false;
  249. ds_main_vash_vashlist.updatecontrol = false;
  250. ds_main_vash_vashlist.setColumn(ds_main_vash_vashlist.rowposition, "staiud", "delete");
  251. ds_main_vash_vashlist.setRowType(ds_main_vash_vashlist.rowposition, 8);
  252. ds_main_vash_vashlist.updatecontrol = true;
  253. ds_main_vash_vashlist.enableevent = true;
  254. // var arrRow = new Array();
  255. // arrRow[0] = ds_main_vash_vashlist.rowposition;
  256. // grdf_setStatus(grp_biz.grd_clbsmast, "D", arrRow);
  257. }
  258. }
  259. function grp_biz_button4_onclick(obj:Button, e:ClickEventInfo)
  260. {
  261. this.close();
  262. }
  263. function grp_biz_button3_onclick(obj:Button, e:ClickEventInfo)
  264. {
  265. //var xVashPath = "/root/main/vash/vashlist";
  266. if(utlf_isNull(ds_main_vash_vashlist.getColumn(0, "vasrslt")))
  267. {
  268. sysf_messageBox(popGbn + "점수는 필수 입력 사항","E008");
  269. grp_biz.grd_vashlist.setFocus();
  270. return;
  271. }
  272. if(sysf_messageBox("","Q002") != 6)
  273. {
  274. return;
  275. }
  276. var sVashData =
  277. "pid" //01등록번호
  278. + "▦cretdd" //02생성일자
  279. + "▦crettm" //03생성시간
  280. + "▦recitemcd" //04기록항목코드
  281. + "▦recdd" //05기록일자
  282. + "▦rectm" //06기록시간
  283. + "▦vasrslt" //07값
  284. + "▦staiud" //08상태
  285. + "▦userid" //09입력자
  286. + "▩" ;
  287. for(var i = 0; i < ds_main_vash_vashlist.rowcount; i++)
  288. {
  289. sVashData +=
  290. pid //01등록번호
  291. + "▦" + cretdd //02생성일자
  292. + "▦" + crettm //03생성시간
  293. + "▦" + recitemcd //04기록항목코드
  294. + "▦" + recdd //05기록일자
  295. + "▦" + ds_main_vash_vashlist.getColumn(i, "rectm")
  296. + "▦" + ds_main_vash_vashlist.getColumn(i, "vasrslt")
  297. + "▦" + ds_main_vash_vashlist.getColumn(i, "staiud")
  298. + "▦" + ds_main_vash_vashlist.getColumn(i, "userid")
  299. + "▩" ;
  300. }
  301. dsf_setCSVToDs("ds_send_sVashData", sVashData);
  302. var oParam = {};
  303. oParam.id = "TRMNH03302";
  304. oParam.service = "hospiceapp.HospiceRecMngt";
  305. oParam.method = "reqsetVash";
  306. oParam.inds = "reqsetVash=ds_send_sVashData";
  307. oParam.outds = "";
  308. oParam.async = false;
  309. //oParam.callback = "cf_TRMNH03302";
  310. tranf_submit(oParam);
  311. ds_send.clearData();
  312. dsf_createDsRow("ds_send", [{col:"pid", type:"STRING", size:256 , val : pid}
  313. , {col:"cretdd", type:"STRING", size:256 , val : cretdd}
  314. , {col:"crettm", type:"STRING", size:256 , val : crettm}
  315. , {col:"recitemcd", type:"STRING", size:256 , val : recitemcd}
  316. , {col:"recdd", type:"STRING", size:256 , val : recdd}]);
  317. var oParam = {};
  318. oParam.id = "TRMNH03301";
  319. oParam.service = "hospiceapp.HospiceRecMngt";
  320. oParam.method = "reqVashList";
  321. oParam.inds = "reqVashList=ds_send";
  322. oParam.outds = "ds_main_vash_vashlist=vashlist";
  323. oParam.async = false;
  324. //oParam.callback = "cf_TRMNH03301";
  325. tranf_submit(oParam);
  326. ds_send.clearData();
  327. dsf_createDsRow("ds_send", [{col:"pid", type:"STRING", size:256 , val : pid}
  328. , {col:"cretdd", type:"STRING", size:256 , val : cretdd}
  329. , {col:"crettm", type:"STRING", size:256 , val : crettm}
  330. , {col:"recitemcd", type:"STRING", size:256 , val : recitemcd}
  331. , {col:"recdd", type:"STRING", size:256 , val : recdd}
  332. , {col:"dday", type:"STRING", size:256 , val : ds_main_vash_vashlist.getColumn(0, "vasrslt")}
  333. , {col:"userid", type:"STRING", size:256 , val : ds_main_vash_vashlist.getColumn(0, "userid")}
  334. , {col:"vashval", type:"STRING", size:256 , val : vashval}
  335. , {col:"spid", type:"STRING", size:256 , val : spid}]);
  336. var oParam = {};
  337. oParam.id = "TRMNH03303";
  338. oParam.service = "hospiceapp.HospiceRecMngt";
  339. oParam.method = "reqsetUptVash";
  340. oParam.inds = "reqsetUptVash=ds_send";
  341. oParam.outds = "";
  342. oParam.async = false;
  343. //oParam.callback = "cf_TRMNH03303";
  344. tranf_submit(oParam);
  345. opener.ds_main_inpt_pasmlist.setColumn(vas_row, vas_col, ds_main_vash_vashlist.getColumn(0, "vasrslt"));
  346. opener.ds_main_inpt_pasmlist.setColumn(vas_row, vas_col-1, ds_main_vash_vashlist.getColumn(0, "vasrslt"));
  347. this.close();
  348. }
  349. function grp_biz_vasval_oncellclick(obj:Grid, e:GridClickEventInfo)
  350. {
  351. if(ds_main_vash_vashlist.rowposition > -1)
  352. {
  353. ds_main_vash_vashlist.setColumn(ds_main_vash_vashlist.rowposition, "recdt", grp_biz.vasval.getCellProperty("Head", e.col, "text"));
  354. var staiud = ds_main_vash_vashlist.getColumn(ds_main_vash_vashlist.rowposition, "staiud");
  355. if( (staiud =="insert") || (staiud =="delete"))
  356. {
  357. return;
  358. }
  359. ds_main_vash_vashlist.setColumn(ds_main_vash_vashlist.rowposition, "staiud", "update");
  360. // var arrRow = new Array();
  361. // arrRow[0] = ds_main_vash_vashlist.rowposition;
  362. // grdf_setStatus(grp_biz.grd_vashlist, "U", arrRow);
  363. }
  364. }
  365. ]]></Script>
  366. </Form>
  367. </FDL>